phantasmal-world/static/js/main.840f3b07.chunk.js
Daan Vanden Bosch 4d8d339d53 Release 14.
2019-07-13 21:54:51 +02:00

2 lines
240 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{245:function(e,t,n){e.exports=n(538)},250:function(e,t,n){},256:function(e,t,n){},329:function(e,t,n){},335:function(e,t,n){},337:function(e,t,n){},364:function(e,t,n){},368:function(e,t,n){},369:function(e,t,n){},370:function(e,t,n){},373:function(e,t,n){},393:function(e,t,n){},394:function(e,t,n){},395:function(e,t,n){},396:function(e,t,n){},526:function(e,t,n){},530:function(e,t,n){},531:function(e,t,n){},533:function(e,t,n){},534:function(e,t,n){},538:function(e,t,n){"use strict";n.r(t);var r=n(0),a=n.n(r),i=n(13),o=n.n(i),s=n(24),l=n.n(s),u=(n(250),n(133),n(55)),c=(n(253),n(110)),d=n(7),p=n(10),h=n(20),_=n(19),m=n(21),f=n(29),v=n(105),w=n(17),b=n(11),y=(n(47),n(5)),k=function(){function e(t,n){Object(d.a)(this,e),this.x=void 0,this.y=void 0,this.x=t,this.y=n}return Object(p.a)(e,[{key:"add",value:function(e){return this.x+=e.x,this.y+=e.y,this}},{key:"clone",value:function(){return new e(this.x,this.y)}}]),e}(),g=function(){function e(t,n,r){Object(d.a)(this,e),this.x=void 0,this.y=void 0,this.z=void 0,this.x=t,this.y=n,this.z=r}return Object(p.a)(e,[{key:"add",value:function(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}},{key:"clone",value:function(){return new e(this.x,this.y,this.z)}}]),e}();function R(e){var t=Object.values(e),n=t.filter(function(e){return"number"===typeof e});return n.length?n:t}var j,O,S,x,D=function(){function e(t,n){Object(d.a)(this,e),this.keys=void 0,this.values=new Map,this.keys=R(t);var r=!0,a=!1,i=void 0;try{for(var o,s=this.keys[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;this.values.set(l,n(l))}}catch(u){a=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}}return Object(p.a)(e,[{key:"get",value:function(e){return this.values.get(e)}}]),e}(),E=function e(t,n,r,a,i,o,s){Object(d.a)(this,e),this.id=t,this.name=n,this.min_atp=r,this.max_atp=a,this.ata=i,this.max_grind=o,this.required_atp=s},C=function e(t,n,r,a,i,o,s,l,u,c,p){Object(d.a)(this,e),this.id=t,this.name=n,this.atp=r,this.ata=a,this.min_evp=i,this.max_evp=o,this.min_dfp=s,this.max_dfp=l,this.mst=u,this.hp=c,this.lck=p},L=function e(t,n,r,a,i,o,s,l,u,c,p){Object(d.a)(this,e),this.id=t,this.name=n,this.atp=r,this.ata=a,this.min_evp=i,this.max_evp=o,this.min_dfp=s,this.max_dfp=l,this.mst=u,this.hp=c,this.lck=p},B=function e(t,n){Object(d.a)(this,e),this.id=t,this.name=n},M=function e(t,n){Object(d.a)(this,e),this.id=t,this.name=n},F=(j=function(){function e(t){Object(d.a)(this,e),this.type=t,Object(w.a)(this,"attribute",O,this),Object(w.a)(this,"hit",S,this),Object(w.a)(this,"grind",x,this)}return Object(p.a)(e,[{key:"grind_atp",get:function(){return 2*this.grind}}]),e}(),O=Object(b.a)(j.prototype,"attribute",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),S=Object(b.a)(j.prototype,"hit",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),x=Object(b.a)(j.prototype,"grind",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Object(b.a)(j.prototype,"grind_atp",[y.f],Object.getOwnPropertyDescriptor(j.prototype,"grind_atp"),j.prototype),j),I=function(){function e(t,n,r,a,i,o,s){if(Object(d.a)(this,e),this.id=void 0,this.code=void 0,this.name=void 0,this.simple_name=void 0,this.ultimate_name=void 0,this.episode=void 0,this.enemy=void 0,this.rare_type=void 0,!Number.isInteger(t)||t<0)throw new Error("Expected id to be an integer greater than or equal to 0, got ".concat(t,"."));if(!n)throw new Error("code is required.");if(!r)throw new Error("name is required.");if(!a)throw new Error("simple_name is required.");if(!i)throw new Error("ultimate_name is required.");if(null!=o&&1!==o&&2!==o&&4!==o)throw new Error("episode should be undefined, 1, 2 or 4, got ".concat(o,"."));if("boolean"!==typeof s)throw new Error("enemy is required.");if(this.id=t,this.code=n,this.simple_name=a,this.ultimate_name=i,this.name=r,this.episode=o,this.enemy=s,e.by_code_map.set(n,this),o){var l=e.by_ep_and_name[o];l&&(l.set(a,this),l.set(i,this))}}return Object(p.a)(e,null,[{key:"by_code",value:function(e){return this.by_code_map.get(e)}},{key:"by_name_and_episode",value:function(e,t){return he(t),this.by_ep_and_name[t].get(e)}}]),e}();I.by_code_map=new Map,I.by_ep_and_name=[void 0,new Map,new Map,void 0,new Map],I.Unknown=void 0,I.FemaleFat=void 0,I.FemaleMacho=void 0,I.FemaleTall=void 0,I.MaleDwarf=void 0,I.MaleFat=void 0,I.MaleMacho=void 0,I.MaleOld=void 0,I.BlueSoldier=void 0,I.RedSoldier=void 0,I.Principal=void 0,I.Tekker=void 0,I.GuildLady=void 0,I.Scientist=void 0,I.Nurse=void 0,I.Irene=void 0,I.ItemShop=void 0,I.Nurse2=void 0,I.Hildebear=void 0,I.Hildeblue=void 0,I.RagRappy=void 0,I.AlRappy=void 0,I.Monest=void 0,I.Mothmant=void 0,I.SavageWolf=void 0,I.BarbarousWolf=void 0,I.Booma=void 0,I.Gobooma=void 0,I.Gigobooma=void 0,I.Dragon=void 0,I.GrassAssassin=void 0,I.PoisonLily=void 0,I.NarLily=void 0,I.NanoDragon=void 0,I.EvilShark=void 0,I.PalShark=void 0,I.GuilShark=void 0,I.PofuillySlime=void 0,I.PouillySlime=void 0,I.PanArms=void 0,I.Migium=void 0,I.Hidoom=void 0,I.DeRolLe=void 0,I.Dubchic=void 0,I.Gilchic=void 0,I.Garanz=void 0,I.SinowBeat=void 0,I.SinowGold=void 0,I.Canadine=void 0,I.Canane=void 0,I.Dubswitch=void 0,I.VolOpt=void 0,I.Delsaber=void 0,I.ChaosSorcerer=void 0,I.DarkGunner=void 0,I.DeathGunner=void 0,I.ChaosBringer=void 0,I.DarkBelra=void 0,I.Dimenian=void 0,I.LaDimenian=void 0,I.SoDimenian=void 0,I.Bulclaw=void 0,I.Bulk=void 0,I.Claw=void 0,I.DarkFalz=void 0,I.Hildebear2=void 0,I.Hildeblue2=void 0,I.RagRappy2=void 0,I.LoveRappy=void 0,I.StRappy=void 0,I.HalloRappy=void 0,I.EggRappy=void 0,I.Monest2=void 0,I.Mothmant2=void 0,I.PoisonLily2=void 0,I.NarLily2=void 0,I.GrassAssassin2=void 0,I.Dimenian2=void 0,I.LaDimenian2=void 0,I.SoDimenian2=void 0,I.DarkBelra2=void 0,I.BarbaRay=void 0,I.SavageWolf2=void 0,I.BarbarousWolf2=void 0,I.PanArms2=void 0,I.Migium2=void 0,I.Hidoom2=void 0,I.Dubchic2=void 0,I.Gilchic2=void 0,I.Garanz2=void 0,I.Dubswitch2=void 0,I.Delsaber2=void 0,I.ChaosSorcerer2=void 0,I.GolDragon=void 0,I.SinowBerill=void 0,I.SinowSpigell=void 0,I.Merillia=void 0,I.Meriltas=void 0,I.Mericarol=void 0,I.Mericus=void 0,I.Merikle=void 0,I.UlGibbon=void 0,I.ZolGibbon=void 0,I.Gibbles=void 0,I.Gee=void 0,I.GiGue=void 0,I.IllGill=void 0,I.DelLily=void 0,I.Epsilon=void 0,I.GalGryphon=void 0,I.Deldepth=void 0,I.Delbiter=void 0,I.Dolmolm=void 0,I.Dolmdarl=void 0,I.Morfos=void 0,I.Recobox=void 0,I.Recon=void 0,I.SinowZoa=void 0,I.SinowZele=void 0,I.OlgaFlow=void 0,I.SandRappy=void 0,I.DelRappy=void 0,I.Astark=void 0,I.SatelliteLizard=void 0,I.Yowie=void 0,I.MerissaA=void 0,I.MerissaAA=void 0,I.Girtablulu=void 0,I.Zu=void 0,I.Pazuzu=void 0,I.Boota=void 0,I.ZeBoota=void 0,I.BaBoota=void 0,I.Dorphon=void 0,I.DorphonEclair=void 0,I.Goran=void 0,I.PyroGoran=void 0,I.GoranDetonator=void 0,I.SaintMilion=void 0,I.Shambertin=void 0,I.Kondrieu=void 0,function(){var e=0;I.Unknown=new I(e++,"Unknown","Unknown","Unknown","Unknown",void 0,!1),I.FemaleFat=new I(e++,"FemaleFat","Female Fat","Female Fat","Female Fat",void 0,!1),I.FemaleMacho=new I(e++,"FemaleMacho","Female Macho","Female Macho","Female Macho",void 0,!1),I.FemaleTall=new I(e++,"FemaleTall","Female Tall","Female Tall","Female Tall",void 0,!1),I.MaleDwarf=new I(e++,"MaleDwarf","Male Dwarf","Male Dwarf","Male Dwarf",void 0,!1),I.MaleFat=new I(e++,"MaleFat","Male Fat","Male Fat","Male Fat",void 0,!1),I.MaleMacho=new I(e++,"MaleMacho","Male Macho","Male Macho","Male Macho",void 0,!1),I.MaleOld=new I(e++,"MaleOld","Male Old","Male Old","Male Old",void 0,!1),I.BlueSoldier=new I(e++,"BlueSoldier","Blue Soldier","Blue Soldier","Blue Soldier",void 0,!1),I.RedSoldier=new I(e++,"RedSoldier","Red Soldier","Red Soldier","Red Soldier",void 0,!1),I.Principal=new I(e++,"Principal","Principal","Principal","Principal",void 0,!1),I.Tekker=new I(e++,"Tekker","Tekker","Tekker","Tekker",void 0,!1),I.GuildLady=new I(e++,"GuildLady","Guild Lady","Guild Lady","Guild Lady",void 0,!1),I.Scientist=new I(e++,"Scientist","Scientist","Scientist","Scientist",void 0,!1),I.Nurse=new I(e++,"Nurse","Nurse","Nurse","Nurse",void 0,!1),I.Irene=new I(e++,"Irene","Irene","Irene","Irene",void 0,!1),I.ItemShop=new I(e++,"ItemShop","Item Shop","Item Shop","Item Shop",void 0,!1),I.Nurse2=new I(e++,"Nurse2","Nurse (Ep. II)","Nurse","Nurse",2,!1),I.Hildebear=new I(e++,"Hildebear","Hildebear","Hildebear","Hildelt",1,!0),I.Hildeblue=new I(e++,"Hildeblue","Hildeblue","Hildeblue","Hildetorr",1,!0),I.Hildebear.rare_type=I.Hildeblue,I.RagRappy=new I(e++,"RagRappy","Rag Rappy","Rag Rappy","El Rappy",1,!0),I.AlRappy=new I(e++,"AlRappy","Al Rappy","Al Rappy","Pal Rappy",1,!0),I.RagRappy.rare_type=I.AlRappy,I.Monest=new I(e++,"Monest","Monest","Monest","Mothvist",1,!0),I.Mothmant=new I(e++,"Mothmant","Mothmant","Mothmant","Mothvert",1,!0),I.SavageWolf=new I(e++,"SavageWolf","Savage Wolf","Savage Wolf","Gulgus",1,!0),I.BarbarousWolf=new I(e++,"BarbarousWolf","Barbarous Wolf","Barbarous Wolf","Gulgus-Gue",1,!0),I.Booma=new I(e++,"Booma","Booma","Booma","Bartle",1,!0),I.Gobooma=new I(e++,"Gobooma","Gobooma","Gobooma","Barble",1,!0),I.Gigobooma=new I(e++,"Gigobooma","Gigobooma","Gigobooma","Tollaw",1,!0),I.Dragon=new I(e++,"Dragon","Dragon","Dragon","Sil Dragon",1,!0),I.GrassAssassin=new I(e++,"GrassAssassin","Grass Assassin","Grass Assassin","Crimson Assassin",1,!0),I.PoisonLily=new I(e++,"PoisonLily","Poison Lily","Poison Lily","Ob Lily",1,!0),I.NarLily=new I(e++,"NarLily","Nar Lily","Nar Lily","Mil Lily",1,!0),I.PoisonLily.rare_type=I.NarLily,I.NanoDragon=new I(e++,"NanoDragon","Nano Dragon","Nano Dragon","Nano Dragon",1,!0),I.EvilShark=new I(e++,"EvilShark","Evil Shark","Evil Shark","Vulmer",1,!0),I.PalShark=new I(e++,"PalShark","Pal Shark","Pal Shark","Govulmer",1,!0),I.GuilShark=new I(e++,"GuilShark","Guil Shark","Guil Shark","Melqueek",1,!0),I.PofuillySlime=new I(e++,"PofuillySlime","Pofuilly Slime","Pofuilly Slime","Pofuilly Slime",1,!0),I.PouillySlime=new I(e++,"PouillySlime","Pouilly Slime","Pouilly Slime","Pouilly Slime",1,!0),I.PofuillySlime.rare_type=I.PouillySlime,I.PanArms=new I(e++,"PanArms","Pan Arms","Pan Arms","Pan Arms",1,!0),I.Migium=new I(e++,"Migium","Migium","Migium","Migium",1,!0),I.Hidoom=new I(e++,"Hidoom","Hidoom","Hidoom","Hidoom",1,!0),I.DeRolLe=new I(e++,"DeRolLe","De Rol Le","De Rol Le","Dal Ra Lie",1,!0),I.Dubchic=new I(e++,"Dubchic","Dubchic","Dubchic","Dubchich",1,!0),I.Gilchic=new I(e++,"Gilchic","Gilchic","Gilchic","Gilchich",1,!0),I.Garanz=new I(e++,"Garanz","Garanz","Garanz","Baranz",1,!0),I.SinowBeat=new I(e++,"SinowBeat","Sinow Beat","Sinow Beat","Sinow Blue",1,!0),I.SinowGold=new I(e++,"SinowGold","Sinow Gold","Sinow Gold","Sinow Red",1,!0),I.Canadine=new I(e++,"Canadine","Canadine","Canadine","Canabin",1,!0),I.Canane=new I(e++,"Canane","Canane","Canane","Canune",1,!0),I.Dubswitch=new I(e++,"Dubswitch","Dubswitch","Dubswitch","Dubswitch",1,!0),I.VolOpt=new I(e++,"VolOpt","Vol Opt","Vol Opt","Vol Opt ver.2",1,!0),I.Delsaber=new I(e++,"Delsaber","Delsaber","Delsaber","Delsaber",1,!0),I.ChaosSorcerer=new I(e++,"ChaosSorcerer","Chaos Sorcerer","Chaos Sorcerer","Gran Sorcerer",1,!0),I.DarkGunner=new I(e++,"DarkGunner","Dark Gunner","Dark Gunner","Dark Gunner",1,!0),I.DeathGunner=new I(e++,"DeathGunner","Death Gunner","Death Gunner","Death Gunner",1,!0),I.ChaosBringer=new I(e++,"ChaosBringer","Chaos Bringer","Chaos Bringer","Dark Bringer",1,!0),I.DarkBelra=new I(e++,"DarkBelra","Dark Belra","Dark Belra","Indi Belra",1,!0),I.Dimenian=new I(e++,"Dimenian","Dimenian","Dimenian","Arlan",1,!0),I.LaDimenian=new I(e++,"LaDimenian","La Dimenian","La Dimenian","Merlan",1,!0),I.SoDimenian=new I(e++,"SoDimenian","So Dimenian","So Dimenian","Del-D",1,!0),I.Bulclaw=new I(e++,"Bulclaw","Bulclaw","Bulclaw","Bulclaw",1,!0),I.Bulk=new I(e++,"Bulk","Bulk","Bulk","Bulk",1,!0),I.Claw=new I(e++,"Claw","Claw","Claw","Claw",1,!0),I.DarkFalz=new I(e++,"DarkFalz","Dark Falz","Dark Falz","Dark Falz",1,!0),I.Hildebear2=new I(e++,"Hildebear2","Hildebear (Ep. II)","Hildebear","Hildelt",2,!0),I.Hildeblue2=new I(e++,"Hildeblue2","Hildeblue (Ep. II)","Hildeblue","Hildetorr",2,!0),I.Hildebear2.rare_type=I.Hildeblue2,I.RagRappy2=new I(e++,"RagRappy2","Rag Rappy (Ep. II)","Rag Rappy","El Rappy",2,!0),I.LoveRappy=new I(e++,"LoveRappy","Love Rappy","Love Rappy","Love Rappy",2,!0),I.RagRappy2.rare_type=I.LoveRappy,I.StRappy=new I(e++,"StRappy","St. Rappy","St. Rappy","St. Rappy",2,!0),I.HalloRappy=new I(e++,"HalloRappy","Hallo Rappy","Hallo Rappy","Hallo Rappy",2,!0),I.EggRappy=new I(e++,"EggRappy","Egg Rappy","Egg Rappy","Egg Rappy",2,!0),I.Monest2=new I(e++,"Monest2","Monest (Ep. II)","Monest","Mothvist",2,!0),I.Mothmant2=new I(e++,"Mothmant2","Mothmant","Mothmant","Mothvert",2,!0),I.PoisonLily2=new I(e++,"PoisonLily2","Poison Lily (Ep. II)","Poison Lily","Ob Lily",2,!0),I.NarLily2=new I(e++,"NarLily2","Nar Lily (Ep. II)","Nar Lily","Mil Lily",2,!0),I.PoisonLily2.rare_type=I.NarLily2,I.GrassAssassin2=new I(e++,"GrassAssassin2","Grass Assassin (Ep. II)","Grass Assassin","Crimson Assassin",2,!0),I.Dimenian2=new I(e++,"Dimenian2","Dimenian (Ep. II)","Dimenian","Arlan",2,!0),I.LaDimenian2=new I(e++,"LaDimenian2","La Dimenian (Ep. II)","La Dimenian","Merlan",2,!0),I.SoDimenian2=new I(e++,"SoDimenian2","So Dimenian (Ep. II)","So Dimenian","Del-D",2,!0),I.DarkBelra2=new I(e++,"DarkBelra2","Dark Belra (Ep. II)","Dark Belra","Indi Belra",2,!0),I.BarbaRay=new I(e++,"BarbaRay","Barba Ray","Barba Ray","Barba Ray",2,!0),I.SavageWolf2=new I(e++,"SavageWolf2","Savage Wolf (Ep. II)","Savage Wolf","Gulgus",2,!0),I.BarbarousWolf2=new I(e++,"BarbarousWolf2","Barbarous Wolf (Ep. II)","Barbarous Wolf","Gulgus-Gue",2,!0),I.PanArms2=new I(e++,"PanArms2","Pan Arms (Ep. II)","Pan Arms","Pan Arms",2,!0),I.Migium2=new I(e++,"Migium2","Migium (Ep. II)","Migium","Migium",2,!0),I.Hidoom2=new I(e++,"Hidoom2","Hidoom (Ep. II)","Hidoom","Hidoom",2,!0),I.Dubchic2=new I(e++,"Dubchic2","Dubchic (Ep. II)","Dubchic","Dubchich",2,!0),I.Gilchic2=new I(e++,"Gilchic2","Gilchic (Ep. II)","Gilchic","Gilchich",2,!0),I.Garanz2=new I(e++,"Garanz2","Garanz (Ep. II)","Garanz","Baranz",2,!0),I.Dubswitch2=new I(e++,"Dubswitch2","Dubswitch (Ep. II)","Dubswitch","Dubswitch",2,!0),I.Delsaber2=new I(e++,"Delsaber2","Delsaber (Ep. II)","Delsaber","Delsaber",2,!0),I.ChaosSorcerer2=new I(e++,"ChaosSorcerer2","Chaos Sorcerer (Ep. II)","Chaos Sorcerer","Gran Sorcerer",2,!0),I.GolDragon=new I(e++,"GolDragon","Gol Dragon","Gol Dragon","Gol Dragon",2,!0),I.SinowBerill=new I(e++,"SinowBerill","Sinow Berill","Sinow Berill","Sinow Berill",2,!0),I.SinowSpigell=new I(e++,"SinowSpigell","Sinow Spigell","Sinow Spigell","Sinow Spigell",2,!0),I.Merillia=new I(e++,"Merillia","Merillia","Merillia","Merillia",2,!0),I.Meriltas=new I(e++,"Meriltas","Meriltas","Meriltas","Meriltas",2,!0),I.Mericarol=new I(e++,"Mericarol","Mericarol","Mericarol","Mericarol",2,!0),I.Mericus=new I(e++,"Mericus","Mericus","Mericus","Mericus",2,!0),I.Merikle=new I(e++,"Merikle","Merikle","Merikle","Merikle",2,!0),I.UlGibbon=new I(e++,"UlGibbon","Ul Gibbon","Ul Gibbon","Ul Gibbon",2,!0),I.ZolGibbon=new I(e++,"ZolGibbon","Zol Gibbon","Zol Gibbon","Zol Gibbon",2,!0),I.Gibbles=new I(e++,"Gibbles","Gibbles","Gibbles","Gibbles",2,!0),I.Gee=new I(e++,"Gee","Gee","Gee","Gee",2,!0),I.GiGue=new I(e++,"GiGue","Gi Gue","Gi Gue","Gi Gue",2,!0),I.IllGill=new I(e++,"IllGill","Ill Gill","Ill Gill","Ill Gill",2,!0),I.DelLily=new I(e++,"DelLily","Del Lily","Del Lily","Del Lily",2,!0),I.Epsilon=new I(e++,"Epsilon","Epsilon","Epsilon","Epsilon",2,!0),I.GalGryphon=new I(e++,"GalGryphon","Gal Gryphon","Gal Gryphon","Gal Gryphon",2,!0),I.Deldepth=new I(e++,"Deldepth","Deldepth","Deldepth","Deldepth",2,!0),I.Delbiter=new I(e++,"Delbiter","Delbiter","Delbiter","Delbiter",2,!0),I.Dolmolm=new I(e++,"Dolmolm","Dolmolm","Dolmolm","Dolmolm",2,!0),I.Dolmdarl=new I(e++,"Dolmdarl","Dolmdarl","Dolmdarl","Dolmdarl",2,!0),I.Morfos=new I(e++,"Morfos","Morfos","Morfos","Morfos",2,!0),I.Recobox=new I(e++,"Recobox","Recobox","Recobox","Recobox",2,!0),I.Recon=new I(e++,"Recon","Recon","Recon","Recon",2,!0),I.SinowZoa=new I(e++,"SinowZoa","Sinow Zoa","Sinow Zoa","Sinow Zoa",2,!0),I.SinowZele=new I(e++,"SinowZele","Sinow Zele","Sinow Zele","Sinow Zele",2,!0),I.OlgaFlow=new I(e++,"OlgaFlow","Olga Flow","Olga Flow","Olga Flow",2,!0),I.SandRappy=new I(e++,"SandRappy","Sand Rappy","Sand Rappy","Sand Rappy",4,!0),I.DelRappy=new I(e++,"DelRappy","Del Rappy","Del Rappy","Del Rappy",4,!0),I.SandRappy.rare_type=I.DelRappy,I.Astark=new I(e++,"Astark","Astark","Astark","Astark",4,!0),I.SatelliteLizard=new I(e++,"SatelliteLizard","Satellite Lizard","Satellite Lizard","Satellite Lizard",4,!0),I.Yowie=new I(e++,"Yowie","Yowie","Yowie","Yowie",4,!0),I.MerissaA=new I(e++,"MerissaA","Merissa A","Merissa A","Merissa A",4,!0),I.MerissaAA=new I(e++,"MerissaAA","Merissa AA","Merissa AA","Merissa AA",4,!0),I.MerissaA.rare_type=I.MerissaAA,I.Girtablulu=new I(e++,"Girtablulu","Girtablulu","Girtablulu","Girtablulu",4,!0),I.Zu=new I(e++,"Zu","Zu","Zu","Zu",4,!0),I.Pazuzu=new I(e++,"Pazuzu","Pazuzu","Pazuzu","Pazuzu",4,!0),I.Zu.rare_type=I.Pazuzu,I.Boota=new I(e++,"Boota","Boota","Boota","Boota",4,!0),I.ZeBoota=new I(e++,"ZeBoota","Ze Boota","Ze Boota","Ze Boota",4,!0),I.BaBoota=new I(e++,"BaBoota","Ba Boota","Ba Boota","Ba Boota",4,!0),I.Dorphon=new I(e++,"Dorphon","Dorphon","Dorphon","Dorphon",4,!0),I.DorphonEclair=new I(e++,"DorphonEclair","Dorphon Eclair","Dorphon Eclair","Dorphon Eclair",4,!0),I.Dorphon.rare_type=I.DorphonEclair,I.Goran=new I(e++,"Goran","Goran","Goran","Goran",4,!0),I.PyroGoran=new I(e++,"PyroGoran","Pyro Goran","Pyro Goran","Pyro Goran",4,!0),I.GoranDetonator=new I(e++,"GoranDetonator","Goran Detonator","Goran Detonator","Goran Detonator",4,!0),I.SaintMilion=new I(e++,"SaintMilion","Saint-Milion","Saint-Milion","Saint-Milion",4,!0),I.Shambertin=new I(e++,"Shambertin","Shambertin","Shambertin","Shambertin",4,!0),I.Kondrieu=new I(e++,"Kondrieu","Kondrieu","Kondrieu","Kondrieu",4,!0),I.SaintMilion.rare_type=I.Kondrieu,I.Shambertin.rare_type=I.Kondrieu}();var z,P,G,T,A,W,U,N,H,q,V,Z,Y,K,Q,X,J,$,ee,te,ne,re,ae,ie=[I.Unknown,I.FemaleFat,I.FemaleMacho,I.FemaleTall,I.MaleDwarf,I.MaleFat,I.MaleMacho,I.MaleOld,I.BlueSoldier,I.RedSoldier,I.Principal,I.Tekker,I.GuildLady,I.Scientist,I.Nurse,I.Irene,I.ItemShop,I.Nurse2,I.Hildebear,I.Hildeblue,I.RagRappy,I.AlRappy,I.Monest,I.Mothmant,I.SavageWolf,I.BarbarousWolf,I.Booma,I.Gobooma,I.Gigobooma,I.Dragon,I.GrassAssassin,I.PoisonLily,I.NarLily,I.NanoDragon,I.EvilShark,I.PalShark,I.GuilShark,I.PofuillySlime,I.PouillySlime,I.PanArms,I.Migium,I.Hidoom,I.DeRolLe,I.Dubchic,I.Gilchic,I.Garanz,I.SinowBeat,I.SinowGold,I.Canadine,I.Canane,I.Dubswitch,I.VolOpt,I.Delsaber,I.ChaosSorcerer,I.DarkGunner,I.DeathGunner,I.ChaosBringer,I.DarkBelra,I.Dimenian,I.LaDimenian,I.SoDimenian,I.Bulclaw,I.Bulk,I.Claw,I.DarkFalz,I.Hildebear2,I.Hildeblue2,I.RagRappy2,I.LoveRappy,I.StRappy,I.HalloRappy,I.EggRappy,I.Monest2,I.Mothmant2,I.PoisonLily2,I.NarLily2,I.GrassAssassin2,I.Dimenian2,I.LaDimenian2,I.SoDimenian2,I.DarkBelra2,I.BarbaRay,I.SavageWolf2,I.BarbarousWolf2,I.PanArms2,I.Migium2,I.Hidoom2,I.Dubchic2,I.Gilchic2,I.Garanz2,I.Dubswitch2,I.Delsaber2,I.ChaosSorcerer2,I.GolDragon,I.SinowBerill,I.SinowSpigell,I.Merillia,I.Meriltas,I.Mericarol,I.Mericus,I.Merikle,I.UlGibbon,I.ZolGibbon,I.Gibbles,I.Gee,I.GiGue,I.IllGill,I.DelLily,I.Epsilon,I.GalGryphon,I.Deldepth,I.Delbiter,I.Dolmolm,I.Dolmdarl,I.Morfos,I.Recobox,I.Recon,I.SinowZoa,I.SinowZele,I.OlgaFlow,I.SandRappy,I.DelRappy,I.Astark,I.SatelliteLizard,I.Yowie,I.MerissaA,I.MerissaAA,I.Girtablulu,I.Zu,I.Pazuzu,I.Boota,I.ZeBoota,I.BaBoota,I.Dorphon,I.DorphonEclair,I.Goran,I.PyroGoran,I.GoranDetonator,I.SaintMilion,I.Shambertin,I.Kondrieu],oe=ie.filter(function(e){return e.enemy}),se=function(){function e(t,n,r){if(Object(d.a)(this,e),this.id=void 0,this.pso_id=void 0,this.name=void 0,!Number.isInteger(t)||t<1)throw new Error("Expected id to be an integer greater than or equal to 1, got ".concat(t,"."));if(null!=n&&(!Number.isInteger(n)||n<0))throw new Error("Expected pso_id to be null or an integer greater than or equal to 0, got ".concat(n,"."));if(!r)throw new Error("name is required.");this.id=t,this.pso_id=n,this.name=r}return Object(p.a)(e,null,[{key:"from_pso_id",value:function(t){switch(t){default:return e.Unknown;case 0:return e.PlayerSet;case 1:return e.Particle;case 2:return e.Teleporter;case 3:return e.Warp;case 4:return e.LightCollision;case 5:return e.Item;case 6:return e.EnvSound;case 7:return e.FogCollision;case 8:return e.EventCollision;case 9:return e.CharaCollision;case 10:return e.ElementalTrap;case 11:return e.StatusTrap;case 12:return e.HealTrap;case 13:return e.LargeElementalTrap;case 14:return e.ObjRoomID;case 15:return e.Sensor;case 16:return e.UnknownItem16;case 17:return e.Lensflare;case 18:return e.ScriptCollision;case 19:return e.HealRing;case 20:return e.MapCollision;case 21:return e.ScriptCollisionA;case 22:return e.ItemLight;case 23:return e.RadarCollision;case 24:return e.FogCollisionSW;case 25:return e.BossTeleporter;case 26:return e.ImageBoard;case 27:return e.QuestWarp;case 28:return e.Epilogue;case 29:return e.UnknownItem29;case 30:return e.UnknownItem30;case 31:return e.UnknownItem31;case 32:return e.BoxDetectObject;case 33:return e.SymbolChatObject;case 34:return e.TouchPlateObject;case 35:return e.TargetableObject;case 36:return e.EffectObject;case 37:return e.CountDownObject;case 38:return e.UnknownItem38;case 39:return e.UnknownItem39;case 40:return e.UnknownItem40;case 41:return e.UnknownItem41;case 64:return e.MenuActivation;case 65:return e.TelepipeLocation;case 66:return e.BGMCollision;case 67:return e.MainRagolTeleporter;case 68:return e.LobbyTeleporter;case 69:return e.PrincipalWarp;case 70:return e.ShopDoor;case 71:return e.HuntersGuildDoor;case 72:return e.TeleporterDoor;case 73:return e.MedicalCenterDoor;case 74:return e.Elevator;case 75:return e.EasterEgg;case 76:return e.ValentinesHeart;case 77:return e.ChristmasTree;case 78:return e.ChristmasWreath;case 79:return e.HalloweenPumpkin;case 80:return e.TwentyFirstCentury;case 81:return e.Sonic;case 82:return e.WelcomeBoard;case 83:return e.Firework;case 84:return e.LobbyScreenDoor;case 85:return e.MainRagolTeleporterBattleInNextArea;case 86:return e.LabTeleporterDoor;case 87:return e.Pioneer2InvisibleTouchplate;case 128:return e.ForestDoor;case 129:return e.ForestSwitch;case 130:return e.LaserFence;case 131:return e.LaserSquareFence;case 132:return e.ForestLaserFenceSwitch;case 133:return e.LightRays;case 134:return e.BlueButterfly;case 135:return e.Probe;case 136:return e.RandomTypeBox1;case 137:return e.ForestWeatherStation;case 138:return e.Battery;case 139:return e.ForestConsole;case 140:return e.BlackSlidingDoor;case 141:return e.RicoMessagePod;case 142:return e.EnergyBarrier;case 143:return e.ForestRisingBridge;case 144:return e.SwitchNoneDoor;case 145:return e.EnemyBoxGrey;case 146:return e.FixedTypeBox;case 147:return e.EnemyBoxBrown;case 149:return e.EmptyTypeBox;case 150:return e.LaserFenseEx;case 151:return e.LaserSquareFenceEx;case 192:return e.FloorPanel1;case 193:return e.Caves4ButtonDoor;case 194:return e.CavesNormalDoor;case 195:return e.CavesSmashingPillar;case 196:return e.CavesSign1;case 197:return e.CavesSign2;case 198:return e.CavesSign3;case 199:return e.HexagalTank;case 200:return e.BrownPlatform;case 201:return e.WarningLightObject;case 203:return e.Rainbow;case 204:return e.FloatingJelifish;case 205:return e.FloatingDragonfly;case 206:return e.CavesSwitchDoor;case 207:return e.RobotRechargeStation;case 208:return e.CavesCakeShop;case 209:return e.Caves1SmallRedRock;case 210:return e.Caves1MediumRedRock;case 211:return e.Caves1LargeRedRock;case 212:return e.Caves2SmallRock1;case 213:return e.Caves2MediumRock1;case 214:return e.Caves2LargeRock1;case 215:return e.Caves2SmallRock2;case 216:return e.Caves2MediumRock2;case 217:return e.Caves2LargeRock2;case 218:return e.Caves3SmallRock;case 219:return e.Caves3MediumRock;case 220:return e.Caves3LargeRock;case 222:return e.FloorPanel2;case 223:return e.DestructableRockCaves1;case 224:return e.DestructableRockCaves2;case 225:return e.DestructableRockCaves3;case 256:return e.MinesDoor;case 257:return e.FloorPanel3;case 258:return e.MinesSwitchDoor;case 259:return e.LargeCryoTube;case 260:return e.ComputerLikeCalus;case 261:return e.GreenScreenOpeningAndClosing;case 262:return e.FloatingRobot;case 263:return e.FloatingBlueLight;case 264:return e.SelfDestructingObject1;case 265:return e.SelfDestructingObject2;case 266:return e.SelfDestructingObject3;case 267:return e.SparkMachine;case 268:return e.MinesLargeFlashingCrate;case 304:return e.RuinsSeal;case 320:return e.RuinsTeleporter;case 321:return e.RuinsWarpSiteToSite;case 322:return e.RuinsSwitch;case 323:return e.FloorPanel4;case 324:return e.Ruins1Door;case 325:return e.Ruins3Door;case 326:return e.Ruins2Door;case 327:return e.Ruins11ButtonDoor;case 328:return e.Ruins21ButtonDoor;case 329:return e.Ruins31ButtonDoor;case 330:return e.Ruins4ButtonDoor;case 331:return e.Ruins2ButtonDoor;case 332:return e.RuinsSensor;case 333:return e.RuinsFenceSwitch;case 334:return e.RuinsLaserFence4x2;case 335:return e.RuinsLaserFence6x2;case 336:return e.RuinsLaserFence4x4;case 337:return e.RuinsLaserFence6x4;case 338:return e.RuinsPoisonBlob;case 339:return e.RuinsPilarTrap;case 340:return e.PopupTrapNoTech;case 341:return e.RuinsCrystal;case 342:return e.Monument;case 345:return e.RuinsRock1;case 346:return e.RuinsRock2;case 347:return e.RuinsRock3;case 348:return e.RuinsRock4;case 349:return e.RuinsRock5;case 350:return e.RuinsRock6;case 351:return e.RuinsRock7;case 352:return e.Poison;case 353:return e.FixedBoxTypeRuins;case 354:return e.RandomBoxTypeRuins;case 355:return e.EnemyTypeBoxYellow;case 356:return e.EnemyTypeBoxBlue;case 357:return e.EmptyTypeBoxBlue;case 358:return e.DestructableRock;case 359:return e.PopupTrapsTechs;case 368:return e.FlyingWhiteBird;case 369:return e.Tower;case 370:return e.FloatingRocks;case 371:return e.FloatingSoul;case 372:return e.Butterfly;case 384:return e.LobbyGameMenu;case 385:return e.LobbyWarpObject;case 386:return e.Lobby1EventObjectDefaultTree;case 387:return e.UnknownItem387;case 388:return e.UnknownItem388;case 389:return e.UnknownItem389;case 390:return e.LobbyEventObjectStaticPumpkin;case 391:return e.LobbyEventObject3ChristmasWindows;case 392:return e.LobbyEventObjectRedAndWhiteCurtain;case 393:return e.UnknownItem393;case 394:return e.UnknownItem394;case 395:return e.LobbyFishTank;case 396:return e.LobbyEventObjectButterflies;case 400:return e.UnknownItem400;case 401:return e.GreyWallLow;case 402:return e.SpaceshipDoor;case 403:return e.GreyWallHigh;case 416:return e.TempleNormalDoor;case 417:return e.BreakableWallWallButUnbreakable;case 418:return e.BrokenCilinderAndRubble;case 419:return e.ThreeBrokenWallPiecesOnFloor;case 420:return e.HighBrickCilinder;case 421:return e.LyingCilinder;case 422:return e.BrickConeWithFlatTop;case 423:return e.BreakableTempleWall;case 424:return e.TempleMapDetect;case 425:return e.SmallBrownBrickRisingBridge;case 426:return e.LongRisingBridgeWithPinkHighEdges;case 427:return e.FourSwitchTempleDoor;case 448:return e.FourButtonSpaceshipDoor;case 512:return e.ItemBoxCca;case 513:return e.TeleporterEp2;case 514:return e.CCADoor;case 515:return e.SpecialBoxCCA;case 516:return e.BigCCADoor;case 517:return e.BigCCADoorSwitch;case 518:return e.LittleRock;case 519:return e.Little3StoneWall;case 520:return e.Medium3StoneWall;case 521:return e.SpiderPlant;case 522:return e.CCAAreaTeleporter;case 523:return e.UnknownItem523;case 524:return e.WhiteBird;case 525:return e.OrangeBird;case 527:return e.Saw;case 528:return e.LaserDetect;case 529:return e.UnknownItem529;case 530:return e.UnknownItem530;case 531:return e.Seagull;case 544:return e.Fish;case 545:return e.SeabedDoorWithBlueEdges;case 546:return e.SeabedDoorAlwaysOpenNonTriggerable;case 547:return e.LittleCryotube;case 548:return e.WideGlassWallBreakable;case 549:return e.BlueFloatingRobot;case 550:return e.RedFloatingRobot;case 551:return e.Dolphin;case 552:return e.CaptureTrap;case 553:return e.VRLink;case 576:return e.UnknownItem576;case 640:return e.WarpInBarbaRayRoom;case 672:return e.UnknownItem672;case 688:return e.GeeNest;case 689:return e.LabComputerConsole;case 690:return e.LabComputerConsoleGreenScreen;case 691:return e.ChairYelllowPillow;case 692:return e.OrangeWallWithHoleInMiddle;case 693:return e.GreyWallWithHoleInMiddle;case 694:return e.LongTable;case 695:return e.GBAStation;case 696:return e.TalkLinkToSupport;case 697:return e.InstaWarp;case 698:return e.LabInvisibleObject;case 699:return e.LabGlassWindowDoor;case 700:return e.UnknownItem700;case 701:return e.LabCelingWarp;case 768:return e.Ep4LightSource;case 769:return e.Cacti;case 770:return e.BigBrownRock;case 771:return e.BreakableBrownRock;case 832:return e.UnknownItem832;case 833:return e.UnknownItem833;case 896:return e.PoisonPlant;case 897:return e.UnknownItem897;case 898:return e.UnknownItem898;case 899:return e.OozingDesertPlant;case 901:return e.UnknownItem901;case 902:return e.BigBlackRocks;case 903:return e.UnknownItem903;case 904:return e.UnknownItem904;case 905:return e.UnknownItem905;case 906:return e.UnknownItem906;case 907:return e.FallingRock;case 908:return e.DesertPlantHasCollision;case 909:return e.DesertFixedTypeBoxBreakableCrystals;case 910:return e.UnknownItem910;case 911:return e.BeeHive;case 912:return e.UnknownItem912;case 913:return e.Heat;case 960:return e.TopOfSaintMillionEgg;case 961:return e.UnknownItem961}}}]),e}();se.Unknown=void 0,se.PlayerSet=void 0,se.Particle=void 0,se.Teleporter=void 0,se.Warp=void 0,se.LightCollision=void 0,se.Item=void 0,se.EnvSound=void 0,se.FogCollision=void 0,se.EventCollision=void 0,se.CharaCollision=void 0,se.ElementalTrap=void 0,se.StatusTrap=void 0,se.HealTrap=void 0,se.LargeElementalTrap=void 0,se.ObjRoomID=void 0,se.Sensor=void 0,se.UnknownItem16=void 0,se.Lensflare=void 0,se.ScriptCollision=void 0,se.HealRing=void 0,se.MapCollision=void 0,se.ScriptCollisionA=void 0,se.ItemLight=void 0,se.RadarCollision=void 0,se.FogCollisionSW=void 0,se.BossTeleporter=void 0,se.ImageBoard=void 0,se.QuestWarp=void 0,se.Epilogue=void 0,se.UnknownItem29=void 0,se.UnknownItem30=void 0,se.UnknownItem31=void 0,se.BoxDetectObject=void 0,se.SymbolChatObject=void 0,se.TouchPlateObject=void 0,se.TargetableObject=void 0,se.EffectObject=void 0,se.CountDownObject=void 0,se.UnknownItem38=void 0,se.UnknownItem39=void 0,se.UnknownItem40=void 0,se.UnknownItem41=void 0,se.MenuActivation=void 0,se.TelepipeLocation=void 0,se.BGMCollision=void 0,se.MainRagolTeleporter=void 0,se.LobbyTeleporter=void 0,se.PrincipalWarp=void 0,se.ShopDoor=void 0,se.HuntersGuildDoor=void 0,se.TeleporterDoor=void 0,se.MedicalCenterDoor=void 0,se.Elevator=void 0,se.EasterEgg=void 0,se.ValentinesHeart=void 0,se.ChristmasTree=void 0,se.ChristmasWreath=void 0,se.HalloweenPumpkin=void 0,se.TwentyFirstCentury=void 0,se.Sonic=void 0,se.WelcomeBoard=void 0,se.Firework=void 0,se.LobbyScreenDoor=void 0,se.MainRagolTeleporterBattleInNextArea=void 0,se.LabTeleporterDoor=void 0,se.Pioneer2InvisibleTouchplate=void 0,se.ForestDoor=void 0,se.ForestSwitch=void 0,se.LaserFence=void 0,se.LaserSquareFence=void 0,se.ForestLaserFenceSwitch=void 0,se.LightRays=void 0,se.BlueButterfly=void 0,se.Probe=void 0,se.RandomTypeBox1=void 0,se.ForestWeatherStation=void 0,se.Battery=void 0,se.ForestConsole=void 0,se.BlackSlidingDoor=void 0,se.RicoMessagePod=void 0,se.EnergyBarrier=void 0,se.ForestRisingBridge=void 0,se.SwitchNoneDoor=void 0,se.EnemyBoxGrey=void 0,se.FixedTypeBox=void 0,se.EnemyBoxBrown=void 0,se.EmptyTypeBox=void 0,se.LaserFenseEx=void 0,se.LaserSquareFenceEx=void 0,se.FloorPanel1=void 0,se.Caves4ButtonDoor=void 0,se.CavesNormalDoor=void 0,se.CavesSmashingPillar=void 0,se.CavesSign1=void 0,se.CavesSign2=void 0,se.CavesSign3=void 0,se.HexagalTank=void 0,se.BrownPlatform=void 0,se.WarningLightObject=void 0,se.Rainbow=void 0,se.FloatingJelifish=void 0,se.FloatingDragonfly=void 0,se.CavesSwitchDoor=void 0,se.RobotRechargeStation=void 0,se.CavesCakeShop=void 0,se.Caves1SmallRedRock=void 0,se.Caves1MediumRedRock=void 0,se.Caves1LargeRedRock=void 0,se.Caves2SmallRock1=void 0,se.Caves2MediumRock1=void 0,se.Caves2LargeRock1=void 0,se.Caves2SmallRock2=void 0,se.Caves2MediumRock2=void 0,se.Caves2LargeRock2=void 0,se.Caves3SmallRock=void 0,se.Caves3MediumRock=void 0,se.Caves3LargeRock=void 0,se.FloorPanel2=void 0,se.DestructableRockCaves1=void 0,se.DestructableRockCaves2=void 0,se.DestructableRockCaves3=void 0,se.MinesDoor=void 0,se.FloorPanel3=void 0,se.MinesSwitchDoor=void 0,se.LargeCryoTube=void 0,se.ComputerLikeCalus=void 0,se.GreenScreenOpeningAndClosing=void 0,se.FloatingRobot=void 0,se.FloatingBlueLight=void 0,se.SelfDestructingObject1=void 0,se.SelfDestructingObject2=void 0,se.SelfDestructingObject3=void 0,se.SparkMachine=void 0,se.MinesLargeFlashingCrate=void 0,se.RuinsSeal=void 0,se.RuinsTeleporter=void 0,se.RuinsWarpSiteToSite=void 0,se.RuinsSwitch=void 0,se.FloorPanel4=void 0,se.Ruins1Door=void 0,se.Ruins3Door=void 0,se.Ruins2Door=void 0,se.Ruins11ButtonDoor=void 0,se.Ruins21ButtonDoor=void 0,se.Ruins31ButtonDoor=void 0,se.Ruins4ButtonDoor=void 0,se.Ruins2ButtonDoor=void 0,se.RuinsSensor=void 0,se.RuinsFenceSwitch=void 0,se.RuinsLaserFence4x2=void 0,se.RuinsLaserFence6x2=void 0,se.RuinsLaserFence4x4=void 0,se.RuinsLaserFence6x4=void 0,se.RuinsPoisonBlob=void 0,se.RuinsPilarTrap=void 0,se.PopupTrapNoTech=void 0,se.RuinsCrystal=void 0,se.Monument=void 0,se.RuinsRock1=void 0,se.RuinsRock2=void 0,se.RuinsRock3=void 0,se.RuinsRock4=void 0,se.RuinsRock5=void 0,se.RuinsRock6=void 0,se.RuinsRock7=void 0,se.Poison=void 0,se.FixedBoxTypeRuins=void 0,se.RandomBoxTypeRuins=void 0,se.EnemyTypeBoxYellow=void 0,se.EnemyTypeBoxBlue=void 0,se.EmptyTypeBoxBlue=void 0,se.DestructableRock=void 0,se.PopupTrapsTechs=void 0,se.FlyingWhiteBird=void 0,se.Tower=void 0,se.FloatingRocks=void 0,se.FloatingSoul=void 0,se.Butterfly=void 0,se.LobbyGameMenu=void 0,se.LobbyWarpObject=void 0,se.Lobby1EventObjectDefaultTree=void 0,se.UnknownItem387=void 0,se.UnknownItem388=void 0,se.UnknownItem389=void 0,se.LobbyEventObjectStaticPumpkin=void 0,se.LobbyEventObject3ChristmasWindows=void 0,se.LobbyEventObjectRedAndWhiteCurtain=void 0,se.UnknownItem393=void 0,se.UnknownItem394=void 0,se.LobbyFishTank=void 0,se.LobbyEventObjectButterflies=void 0,se.UnknownItem400=void 0,se.GreyWallLow=void 0,se.SpaceshipDoor=void 0,se.GreyWallHigh=void 0,se.TempleNormalDoor=void 0,se.BreakableWallWallButUnbreakable=void 0,se.BrokenCilinderAndRubble=void 0,se.ThreeBrokenWallPiecesOnFloor=void 0,se.HighBrickCilinder=void 0,se.LyingCilinder=void 0,se.BrickConeWithFlatTop=void 0,se.BreakableTempleWall=void 0,se.TempleMapDetect=void 0,se.SmallBrownBrickRisingBridge=void 0,se.LongRisingBridgeWithPinkHighEdges=void 0,se.FourSwitchTempleDoor=void 0,se.FourButtonSpaceshipDoor=void 0,se.ItemBoxCca=void 0,se.TeleporterEp2=void 0,se.CCADoor=void 0,se.SpecialBoxCCA=void 0,se.BigCCADoor=void 0,se.BigCCADoorSwitch=void 0,se.LittleRock=void 0,se.Little3StoneWall=void 0,se.Medium3StoneWall=void 0,se.SpiderPlant=void 0,se.CCAAreaTeleporter=void 0,se.UnknownItem523=void 0,se.WhiteBird=void 0,se.OrangeBird=void 0,se.Saw=void 0,se.LaserDetect=void 0,se.UnknownItem529=void 0,se.UnknownItem530=void 0,se.Seagull=void 0,se.Fish=void 0,se.SeabedDoorWithBlueEdges=void 0,se.SeabedDoorAlwaysOpenNonTriggerable=void 0,se.LittleCryotube=void 0,se.WideGlassWallBreakable=void 0,se.BlueFloatingRobot=void 0,se.RedFloatingRobot=void 0,se.Dolphin=void 0,se.CaptureTrap=void 0,se.VRLink=void 0,se.UnknownItem576=void 0,se.WarpInBarbaRayRoom=void 0,se.UnknownItem672=void 0,se.GeeNest=void 0,se.LabComputerConsole=void 0,se.LabComputerConsoleGreenScreen=void 0,se.ChairYelllowPillow=void 0,se.OrangeWallWithHoleInMiddle=void 0,se.GreyWallWithHoleInMiddle=void 0,se.LongTable=void 0,se.GBAStation=void 0,se.TalkLinkToSupport=void 0,se.InstaWarp=void 0,se.LabInvisibleObject=void 0,se.LabGlassWindowDoor=void 0,se.UnknownItem700=void 0,se.LabCelingWarp=void 0,se.Ep4LightSource=void 0,se.Cacti=void 0,se.BigBrownRock=void 0,se.BreakableBrownRock=void 0,se.UnknownItem832=void 0,se.UnknownItem833=void 0,se.PoisonPlant=void 0,se.UnknownItem897=void 0,se.UnknownItem898=void 0,se.OozingDesertPlant=void 0,se.UnknownItem901=void 0,se.BigBlackRocks=void 0,se.UnknownItem903=void 0,se.UnknownItem904=void 0,se.UnknownItem905=void 0,se.UnknownItem906=void 0,se.FallingRock=void 0,se.DesertPlantHasCollision=void 0,se.DesertFixedTypeBoxBreakableCrystals=void 0,se.UnknownItem910=void 0,se.BeeHive=void 0,se.UnknownItem912=void 0,se.Heat=void 0,se.TopOfSaintMillionEgg=void 0,se.UnknownItem961=void 0,function(){var e=1;se.Unknown=new se(e++,void 0,"Unknown"),se.PlayerSet=new se(e++,0,"Player Set"),se.Particle=new se(e++,1,"Particle"),se.Teleporter=new se(e++,2,"Teleporter"),se.Warp=new se(e++,3,"Warp"),se.LightCollision=new se(e++,4,"Light Collision"),se.Item=new se(e++,5,"Item"),se.EnvSound=new se(e++,6,"Env Sound"),se.FogCollision=new se(e++,7,"Fog Collision"),se.EventCollision=new se(e++,8,"Event Collision"),se.CharaCollision=new se(e++,9,"Chara Collision"),se.ElementalTrap=new se(e++,10,"Elemental Trap"),se.StatusTrap=new se(e++,11,"Status Trap"),se.HealTrap=new se(e++,12,"Heal Trap"),se.LargeElementalTrap=new se(e++,13,"Large Elemental Trap"),se.ObjRoomID=new se(e++,14,"Obj Room ID"),se.Sensor=new se(e++,15,"Sensor"),se.UnknownItem16=new se(e++,16,"Unknown Item (16)"),se.Lensflare=new se(e++,17,"Lensflare"),se.ScriptCollision=new se(e++,18,"Script Collision"),se.HealRing=new se(e++,19,"Heal Ring"),se.MapCollision=new se(e++,20,"Map Collision"),se.ScriptCollisionA=new se(e++,21,"Script Collision A"),se.ItemLight=new se(e++,22,"Item Light"),se.RadarCollision=new se(e++,23,"Radar Collision"),se.FogCollisionSW=new se(e++,24,"Fog Collision SW"),se.BossTeleporter=new se(e++,25,"Boss Teleporter"),se.ImageBoard=new se(e++,26,"Image Board"),se.QuestWarp=new se(e++,27,"Quest Warp"),se.Epilogue=new se(e++,28,"Epilogue"),se.UnknownItem29=new se(e++,29,"Unknown Item (29)"),se.UnknownItem30=new se(e++,30,"Unknown Item (30)"),se.UnknownItem31=new se(e++,31,"Unknown Item (31)"),se.BoxDetectObject=new se(e++,32,"Box Detect Object"),se.SymbolChatObject=new se(e++,33,"Symbol Chat Object"),se.TouchPlateObject=new se(e++,34,"Touch plate Object"),se.TargetableObject=new se(e++,35,"Targetable Object"),se.EffectObject=new se(e++,36,"Effect object"),se.CountDownObject=new se(e++,37,"Count Down Object"),se.UnknownItem38=new se(e++,38,"Unknown Item (38)"),se.UnknownItem39=new se(e++,39,"Unknown Item (39)"),se.UnknownItem40=new se(e++,40,"Unknown Item (40)"),se.UnknownItem41=new se(e++,41,"Unknown Item (41)"),se.MenuActivation=new se(e++,64,"Menu activation"),se.TelepipeLocation=new se(e++,65,"Telepipe Location"),se.BGMCollision=new se(e++,66,"BGM Collision"),se.MainRagolTeleporter=new se(e++,67,"Main Ragol Teleporter"),se.LobbyTeleporter=new se(e++,68,"Lobby Teleporter"),se.PrincipalWarp=new se(e++,69,"Principal warp"),se.ShopDoor=new se(e++,70,"Shop Door"),se.HuntersGuildDoor=new se(e++,71,"Hunter's Guild Door"),se.TeleporterDoor=new se(e++,72,"Teleporter Door"),se.MedicalCenterDoor=new se(e++,73,"Medical Center Door"),se.Elevator=new se(e++,74,"Elevator"),se.EasterEgg=new se(e++,75,"Easter Egg"),se.ValentinesHeart=new se(e++,76,"Valentines Heart"),se.ChristmasTree=new se(e++,77,"Christmas Tree"),se.ChristmasWreath=new se(e++,78,"Christmas Wreath"),se.HalloweenPumpkin=new se(e++,79,"Halloween Pumpkin"),se.TwentyFirstCentury=new se(e++,80,"21st Century"),se.Sonic=new se(e++,81,"Sonic"),se.WelcomeBoard=new se(e++,82,"Welcome Board"),se.Firework=new se(e++,83,"Firework"),se.LobbyScreenDoor=new se(e++,84,"Lobby Screen Door"),se.MainRagolTeleporterBattleInNextArea=new se(e++,85,"Main Ragol Teleporter (Battle in next area?)"),se.LabTeleporterDoor=new se(e++,86,"Lab Teleporter Door"),se.Pioneer2InvisibleTouchplate=new se(e++,87,"Pioneer 2 Invisible Touchplate"),se.ForestDoor=new se(e++,128,"Forest Door"),se.ForestSwitch=new se(e++,129,"Forest Switch"),se.LaserFence=new se(e++,130,"Laser Fence"),se.LaserSquareFence=new se(e++,131,"Laser Square Fence"),se.ForestLaserFenceSwitch=new se(e++,132,"Forest Laser Fence Switch"),se.LightRays=new se(e++,133,"Light rays"),se.BlueButterfly=new se(e++,134,"Blue Butterfly"),se.Probe=new se(e++,135,"Probe"),se.RandomTypeBox1=new se(e++,136,"Random Type Box 1"),se.ForestWeatherStation=new se(e++,137,"Forest Weather Station"),se.Battery=new se(e++,138,"Battery"),se.ForestConsole=new se(e++,139,"Forest Console"),se.BlackSlidingDoor=new se(e++,140,"Black Sliding Door"),se.RicoMessagePod=new se(e++,141,"Rico Message Pod"),se.EnergyBarrier=new se(e++,142,"Energy Barrier"),se.ForestRisingBridge=new se(e++,143,"Forest Rising Bridge"),se.SwitchNoneDoor=new se(e++,144,"Switch (none door)"),se.EnemyBoxGrey=new se(e++,145,"Enemy Box (Grey)"),se.FixedTypeBox=new se(e++,146,"Fixed Type Box"),se.EnemyBoxBrown=new se(e++,147,"Enemy Box (Brown)"),se.EmptyTypeBox=new se(e++,149,"Empty Type Box"),se.LaserFenseEx=new se(e++,150,"Laser Fense Ex"),se.LaserSquareFenceEx=new se(e++,151,"Laser Square Fence Ex"),se.FloorPanel1=new se(e++,192,"Floor Panel 1"),se.Caves4ButtonDoor=new se(e++,193,"Caves 4 Button door"),se.CavesNormalDoor=new se(e++,194,"Caves Normal door"),se.CavesSmashingPillar=new se(e++,195,"Caves Smashing Pillar"),se.CavesSign1=new se(e++,196,"Caves Sign 1"),se.CavesSign2=new se(e++,197,"Caves Sign 2"),se.CavesSign3=new se(e++,198,"Caves Sign 3"),se.HexagalTank=new se(e++,199,"Hexagal Tank"),se.BrownPlatform=new se(e++,200,"Brown Platform"),se.WarningLightObject=new se(e++,201,"Warning Light Object"),se.Rainbow=new se(e++,203,"Rainbow"),se.FloatingJelifish=new se(e++,204,"Floating Jelifish"),se.FloatingDragonfly=new se(e++,205,"Floating Dragonfly"),se.CavesSwitchDoor=new se(e++,206,"Caves Switch Door"),se.RobotRechargeStation=new se(e++,207,"Robot Recharge Station"),se.CavesCakeShop=new se(e++,208,"Caves Cake Shop"),se.Caves1SmallRedRock=new se(e++,209,"Caves 1 Small Red Rock"),se.Caves1MediumRedRock=new se(e++,210,"Caves 1 Medium Red Rock"),se.Caves1LargeRedRock=new se(e++,211,"Caves 1 Large Red Rock"),se.Caves2SmallRock1=new se(e++,212,"Caves 2 Small Rock 1"),se.Caves2MediumRock1=new se(e++,213,"Caves 2 Medium Rock 1"),se.Caves2LargeRock1=new se(e++,214,"Caves 2 Large Rock 1"),se.Caves2SmallRock2=new se(e++,215,"Caves 2 Small Rock 2"),se.Caves2MediumRock2=new se(e++,216,"Caves 2 Medium Rock 2"),se.Caves2LargeRock2=new se(e++,217,"Caves 2 Large Rock 2"),se.Caves3SmallRock=new se(e++,218,"Caves 3 Small Rock"),se.Caves3MediumRock=new se(e++,219,"Caves 3 Medium Rock"),se.Caves3LargeRock=new se(e++,220,"Caves 3 Large Rock"),se.FloorPanel2=new se(e++,222,"Floor Panel 2"),se.DestructableRockCaves1=new se(e++,223,"Destructable Rock (Caves 1)"),se.DestructableRockCaves2=new se(e++,224,"Destructable Rock (Caves 2)"),se.DestructableRockCaves3=new se(e++,225,"Destructable Rock (Caves 3)"),se.MinesDoor=new se(e++,256,"Mines Door"),se.FloorPanel3=new se(e++,257,"Floor Panel 3"),se.MinesSwitchDoor=new se(e++,258,"Mines Switch Door"),se.LargeCryoTube=new se(e++,259,"Large Cryo-Tube"),se.ComputerLikeCalus=new se(e++,260,"Computer (like calus)"),se.GreenScreenOpeningAndClosing=new se(e++,261,"Green Screen opening and closing"),se.FloatingRobot=new se(e++,262,"Floating Robot"),se.FloatingBlueLight=new se(e++,263,"Floating Blue Light"),se.SelfDestructingObject1=new se(e++,264,"Self Destructing Object 1"),se.SelfDestructingObject2=new se(e++,265,"Self Destructing Object 2"),se.SelfDestructingObject3=new se(e++,266,"Self Destructing Object 3"),se.SparkMachine=new se(e++,267,"Spark Machine"),se.MinesLargeFlashingCrate=new se(e++,268,"Mines Large Flashing Crate"),se.RuinsSeal=new se(e++,304,"Ruins Seal"),se.RuinsTeleporter=new se(e++,320,"Ruins Teleporter"),se.RuinsWarpSiteToSite=new se(e++,321,"Ruins Warp (Site to site)"),se.RuinsSwitch=new se(e++,322,"Ruins Switch"),se.FloorPanel4=new se(e++,323,"Floor Panel 4"),se.Ruins1Door=new se(e++,324,"Ruins 1 Door"),se.Ruins3Door=new se(e++,325,"Ruins 3 Door"),se.Ruins2Door=new se(e++,326,"Ruins 2 Door"),se.Ruins11ButtonDoor=new se(e++,327,"Ruins 1-1 Button Door"),se.Ruins21ButtonDoor=new se(e++,328,"Ruins 2-1 Button Door"),se.Ruins31ButtonDoor=new se(e++,329,"Ruins 3-1 Button Door"),se.Ruins4ButtonDoor=new se(e++,330,"Ruins 4-Button Door"),se.Ruins2ButtonDoor=new se(e++,331,"Ruins 2-Button Door"),se.RuinsSensor=new se(e++,332,"Ruins Sensor"),se.RuinsFenceSwitch=new se(e++,333,"Ruins Fence Switch"),se.RuinsLaserFence4x2=new se(e++,334,"Ruins Laser Fence 4x2"),se.RuinsLaserFence6x2=new se(e++,335,"Ruins Laser Fence 6x2"),se.RuinsLaserFence4x4=new se(e++,336,"Ruins Laser Fence 4x4"),se.RuinsLaserFence6x4=new se(e++,337,"Ruins Laser Fence 6x4"),se.RuinsPoisonBlob=new se(e++,338,"Ruins poison Blob"),se.RuinsPilarTrap=new se(e++,339,"Ruins Pilar Trap"),se.PopupTrapNoTech=new se(e++,340,"Popup Trap (No Tech)"),se.RuinsCrystal=new se(e++,341,"Ruins Crystal"),se.Monument=new se(e++,342,"Monument"),se.RuinsRock1=new se(e++,345,"Ruins Rock 1"),se.RuinsRock2=new se(e++,346,"Ruins Rock 2"),se.RuinsRock3=new se(e++,347,"Ruins Rock 3"),se.RuinsRock4=new se(e++,348,"Ruins Rock 4"),se.RuinsRock5=new se(e++,349,"Ruins Rock 5"),se.RuinsRock6=new se(e++,350,"Ruins Rock 6"),se.RuinsRock7=new se(e++,351,"Ruins Rock 7"),se.Poison=new se(e++,352,"Poison"),se.FixedBoxTypeRuins=new se(e++,353,"Fixed Box Type (Ruins)"),se.RandomBoxTypeRuins=new se(e++,354,"Random Box Type (Ruins)"),se.EnemyTypeBoxYellow=new se(e++,355,"Enemy Type Box (Yellow)"),se.EnemyTypeBoxBlue=new se(e++,356,"Enemy Type Box (Blue)"),se.EmptyTypeBoxBlue=new se(e++,357,"Empty Type Box (Blue)"),se.DestructableRock=new se(e++,358,"Destructable Rock"),se.PopupTrapsTechs=new se(e++,359,"Popup Traps (techs)"),se.FlyingWhiteBird=new se(e++,368,"Flying White Bird"),se.Tower=new se(e++,369,"Tower"),se.FloatingRocks=new se(e++,370,"Floating Rocks"),se.FloatingSoul=new se(e++,371,"Floating Soul"),se.Butterfly=new se(e++,372,"Butterfly"),se.LobbyGameMenu=new se(e++,384,"Lobby Game menu"),se.LobbyWarpObject=new se(e++,385,"Lobby Warp Object"),se.Lobby1EventObjectDefaultTree=new se(e++,386,"Lobby 1 Event Object (Default Tree)"),se.UnknownItem387=new se(e++,387,"Unknown Item (387)"),se.UnknownItem388=new se(e++,388,"Unknown Item (388)"),se.UnknownItem389=new se(e++,389,"Unknown Item (389)"),se.LobbyEventObjectStaticPumpkin=new se(e++,390,"Lobby Event Object (Static Pumpkin)"),se.LobbyEventObject3ChristmasWindows=new se(e++,391,"Lobby Event Object (3 Christmas Windows)"),se.LobbyEventObjectRedAndWhiteCurtain=new se(e++,392,"Lobby Event Object (Red and White Curtain)"),se.UnknownItem393=new se(e++,393,"Unknown Item (393)"),se.UnknownItem394=new se(e++,394,"Unknown Item (394)"),se.LobbyFishTank=new se(e++,395,"Lobby Fish Tank"),se.LobbyEventObjectButterflies=new se(e++,396,"Lobby Event Object (Butterflies)"),se.UnknownItem400=new se(e++,400,"Unknown Item (400)"),se.GreyWallLow=new se(e++,401,"grey wall low"),se.SpaceshipDoor=new se(e++,402,"Spaceship Door"),se.GreyWallHigh=new se(e++,403,"grey wall high"),se.TempleNormalDoor=new se(e++,416,"Temple Normal Door"),se.BreakableWallWallButUnbreakable=new se(e++,417,'"breakable wall wall, but unbreakable"'),se.BrokenCilinderAndRubble=new se(e++,418,"Broken cilinder and rubble"),se.ThreeBrokenWallPiecesOnFloor=new se(e++,419,"3 broken wall pieces on floor"),se.HighBrickCilinder=new se(e++,420,"high brick cilinder"),se.LyingCilinder=new se(e++,421,"lying cilinder"),se.BrickConeWithFlatTop=new se(e++,422,"brick cone with flat top"),se.BreakableTempleWall=new se(e++,423,"breakable temple wall"),se.TempleMapDetect=new se(e++,424,"Temple Map Detect"),se.SmallBrownBrickRisingBridge=new se(e++,425,"small brown brick rising bridge"),se.LongRisingBridgeWithPinkHighEdges=new se(e++,426,"long rising bridge (with pink high edges)"),se.FourSwitchTempleDoor=new se(e++,427,"4 switch temple door"),se.FourButtonSpaceshipDoor=new se(e++,448,"4 button spaceship door"),se.ItemBoxCca=new se(e++,512,"item box cca"),se.TeleporterEp2=new se(e++,513,"Teleporter (Ep 2)"),se.CCADoor=new se(e++,514,"CCA Door"),se.SpecialBoxCCA=new se(e++,515,"Special Box CCA"),se.BigCCADoor=new se(e++,516,"Big CCA Door"),se.BigCCADoorSwitch=new se(e++,517,"Big CCA Door Switch"),se.LittleRock=new se(e++,518,"Little Rock"),se.Little3StoneWall=new se(e++,519,"Little 3 Stone Wall"),se.Medium3StoneWall=new se(e++,520,"Medium 3 stone wall"),se.SpiderPlant=new se(e++,521,"Spider Plant"),se.CCAAreaTeleporter=new se(e++,522,"CCA Area Teleporter"),se.UnknownItem523=new se(e++,523,"Unknown Item (523)"),se.WhiteBird=new se(e++,524,"White Bird"),se.OrangeBird=new se(e++,525,"Orange Bird"),se.Saw=new se(e++,527,"Saw"),se.LaserDetect=new se(e++,528,"Laser Detect"),se.UnknownItem529=new se(e++,529,"Unknown Item (529)"),se.UnknownItem530=new se(e++,530,"Unknown Item (530)"),se.Seagull=new se(e++,531,"Seagull"),se.Fish=new se(e++,544,"Fish"),se.SeabedDoorWithBlueEdges=new se(e++,545,"Seabed Door (with blue edges)"),se.SeabedDoorAlwaysOpenNonTriggerable=new se(e++,546,"Seabed door (always open, non-triggerable)"),se.LittleCryotube=new se(e++,547,"Little Cryotube"),se.WideGlassWallBreakable=new se(e++,548,"Wide Glass Wall (breakable)"),se.BlueFloatingRobot=new se(e++,549,"Blue floating robot"),se.RedFloatingRobot=new se(e++,550,"Red floating robot"),se.Dolphin=new se(e++,551,"Dolphin"),se.CaptureTrap=new se(e++,552,"Capture Trap"),se.VRLink=new se(e++,553,"VR link"),se.UnknownItem576=new se(e++,576,"Unknown Item (576)"),se.WarpInBarbaRayRoom=new se(e++,640,"Warp in Barba Ray Room"),se.UnknownItem672=new se(e++,672,"Unknown Item (672)"),se.GeeNest=new se(e++,688,"Gee Nest"),se.LabComputerConsole=new se(e++,689,"Lab Computer Console"),se.LabComputerConsoleGreenScreen=new se(e++,690,"Lab Computer Console (Green Screen)"),se.ChairYelllowPillow=new se(e++,691,"Chair, Yelllow Pillow"),se.OrangeWallWithHoleInMiddle=new se(e++,692,"orange wall with hole in middle"),se.GreyWallWithHoleInMiddle=new se(e++,693,"grey wall with hole in middle"),se.LongTable=new se(e++,694,"long table"),se.GBAStation=new se(e++,695,"GBA Station"),se.TalkLinkToSupport=new se(e++,696,"Talk (link to support)"),se.InstaWarp=new se(e++,697,"insta-warp"),se.LabInvisibleObject=new se(e++,698,"Lab Invisible Object"),se.LabGlassWindowDoor=new se(e++,699,"Lab Glass window Door"),se.UnknownItem700=new se(e++,700,"Unknown Item (700)"),se.LabCelingWarp=new se(e++,701,"Lab Celing Warp"),se.Ep4LightSource=new se(e++,768,"Ep4 Light Source"),se.Cacti=new se(e++,769,"cacti"),se.BigBrownRock=new se(e++,770,"Big Brown Rock"),se.BreakableBrownRock=new se(e++,771,"Breakable Brown Rock"),se.UnknownItem832=new se(e++,832,"Unknown Item (832)"),se.UnknownItem833=new se(e++,833,"Unknown Item (833)"),se.PoisonPlant=new se(e++,896,"Poison Plant"),se.UnknownItem897=new se(e++,897,"Unknown Item (897)"),se.UnknownItem898=new se(e++,898,"Unknown Item (898)"),se.OozingDesertPlant=new se(e++,899,"Oozing Desert Plant"),se.UnknownItem901=new se(e++,901,"Unknown Item (901)"),se.BigBlackRocks=new se(e++,902,"big black rocks"),se.UnknownItem903=new se(e++,903,"Unknown Item (903)"),se.UnknownItem904=new se(e++,904,"Unknown Item (904)"),se.UnknownItem905=new se(e++,905,"Unknown Item (905)"),se.UnknownItem906=new se(e++,906,"Unknown Item (906)"),se.FallingRock=new se(e++,907,"Falling Rock"),se.DesertPlantHasCollision=new se(e++,908,"Desert Plant (has collision)"),se.DesertFixedTypeBoxBreakableCrystals=new se(e++,909,"Desert Fixed Type Box (Breakable Crystals)"),se.UnknownItem910=new se(e++,910,"Unknown Item (910)"),se.BeeHive=new se(e++,911,"Bee Hive"),se.UnknownItem912=new se(e++,912,"Unknown Item (912)"),se.Heat=new se(e++,913,"Heat"),se.TopOfSaintMillionEgg=new se(e++,960,"Top of saint million egg"),se.UnknownItem961=new se(e++,961,"Unknown Item (961)")}();var le,ue=1/512,ce=.1;!function(e){e.Ephinea="Ephinea"}(le||(le={}));var de;R(le);!function(e){e[e.I=1]="I",e[e.II=2]="II",e[e.IV=4]="IV"}(de||(de={}));var pe;R(de);function he(e){if(!de[e])throw new Error("Invalid episode ".concat(e,"."))}!function(e){e[e.Viridia=0]="Viridia",e[e.Greenill=1]="Greenill",e[e.Skyly=2]="Skyly",e[e.Bluefull=3]="Bluefull",e[e.Purplenum=4]="Purplenum",e[e.Pinkal=5]="Pinkal",e[e.Redria=6]="Redria",e[e.Oran=7]="Oran",e[e.Yellowboze=8]="Yellowboze",e[e.Whitill=9]="Whitill"}(pe||(pe={}));var _e,me=R(pe);!function(e){e[e.Normal=0]="Normal",e[e.Hard=1]="Hard",e[e.VHard=2]="VHard",e[e.Ultimate=3]="Ultimate"}(_e||(_e={}));var fe,ve,we,be,ye,ke,ge=R(_e),Re=function e(t,n,r){if(Object(d.a)(this,e),this.id=void 0,this.position=void 0,this.y_axis_rotation=void 0,this.sin_y_axis_rotation=void 0,this.cos_y_axis_rotation=void 0,!Number.isInteger(t)||t<-1)throw new Error("Expected id to be an integer greater than or equal to -1, got ".concat(t,"."));if(!n)throw new Error("position is required.");if("number"!==typeof r)throw new Error("y_axis_rotation is required.");this.id=t,this.position=n,this.y_axis_rotation=r,this.sin_y_axis_rotation=Math.sin(this.y_axis_rotation),this.cos_y_axis_rotation=Math.cos(this.y_axis_rotation)},je=(z=function e(t,n,r,a,i,o,s,l,u,c){if(Object(d.a)(this,e),Object(w.a)(this,"id",P,this),Object(w.a)(this,"name",G,this),Object(w.a)(this,"short_description",T,this),Object(w.a)(this,"long_description",A,this),Object(w.a)(this,"episode",W,this),Object(w.a)(this,"area_variants",U,this),Object(w.a)(this,"objects",N,this),Object(w.a)(this,"npcs",H,this),this.dat_unknowns=void 0,this.bin_data=void 0,null!=t&&(!Number.isInteger(t)||t<0))throw new Error("id should be undefined or a non-negative integer.");if(he(i),!s||!(s instanceof Array))throw new Error("objs is required.");if(!l||!(l instanceof Array))throw new Error("npcs is required.");this.id=t,this.name=n,this.short_description=r,this.long_description=a,this.episode=i,this.area_variants=o,this.objects=s,this.npcs=l,this.dat_unknowns=u,this.bin_data=c},P=Object(b.a)(z.prototype,"id",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),G=Object(b.a)(z.prototype,"name",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),T=Object(b.a)(z.prototype,"short_description",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),A=Object(b.a)(z.prototype,"long_description",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),W=Object(b.a)(z.prototype,"episode",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),U=Object(b.a)(z.prototype,"area_variants",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),N=Object(b.a)(z.prototype,"objects",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),H=Object(b.a)(z.prototype,"npcs",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),z),Oe=(q=function(){function e(t,n,r,a){if(Object(d.a)(this,e),Object(w.a)(this,"area_id",V,this),this._section_id=void 0,Object(w.a)(this,"section",Z,this),Object(w.a)(this,"position",Y,this),Object(w.a)(this,"rotation",K,this),Object(w.a)(this,"object_3d",Q,this),Object.getPrototypeOf(this)===Object.getPrototypeOf(e))throw new Error("Abstract class should not be instantiated directly.");if(!Number.isInteger(t)||t<0)throw new Error("Expected area_id to be a non-negative integer, got ".concat(t,"."));if(!Number.isInteger(n)||n<0)throw new Error("Expected section_id to be a non-negative integer, got ".concat(n,"."));if(!r)throw new Error("position is required.");if(!a)throw new Error("rotation is required.");this.area_id=t,this._section_id=n,this.position=r,this.rotation=a}return Object(p.a)(e,[{key:"section_id",get:function(){return this.section?this.section.id:this._section_id}},{key:"section_position",get:function(){var e=this.position,t=e.x,n=e.y,r=e.z;if(this.section){var a=t-this.section.position.x,i=n-this.section.position.y,o=r-this.section.position.z,s=-this.section.sin_y_axis_rotation,l=this.section.cos_y_axis_rotation;t=l*a+s*o,n=i,r=-s*a+l*o}return new g(t,n,r)},set:function(e){var t=e.x,n=e.y,r=e.z;if(this.section){var a=-this.section.sin_y_axis_rotation,i=this.section.cos_y_axis_rotation,o=a*t+i*r,s=i*t-a*r+this.section.position.x,l=n+this.section.position.y,u=o+this.section.position.z;this.position=new g(s,l,u)}}}]),e}(),V=Object(b.a)(q.prototype,"area_id",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Object(b.a)(q.prototype,"section_id",[y.f],Object.getOwnPropertyDescriptor(q.prototype,"section_id"),q.prototype),Z=Object(b.a)(q.prototype,"section",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Y=Object(b.a)(q.prototype,"position",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),K=Object(b.a)(q.prototype,"rotation",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Object(b.a)(q.prototype,"section_position",[y.f],Object.getOwnPropertyDescriptor(q.prototype,"section_position"),q.prototype),Q=Object(b.a)(q.prototype,"object_3d",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),q),Se=(X=function(e){function t(e,n,r,a,i,o){var s;if(Object(d.a)(this,t),s=Object(h.a)(this,Object(_.a)(t).call(this,e,n,r,a)),Object(w.a)(s,"type",J,Object(v.a)(s)),s.dat=void 0,!i)throw new Error("type is required.");return s.type=i,s.dat=o,s}return Object(m.a)(t,e),t}(Oe),J=Object(b.a)(X.prototype,"type",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),X),xe=($=function(e){function t(e,n,r,a,i,o){var s;if(Object(d.a)(this,t),s=Object(h.a)(this,Object(_.a)(t).call(this,e,n,r,a)),Object(w.a)(s,"type",ee,Object(v.a)(s)),s.dat=void 0,!i)throw new Error("type is required.");return s.type=i,s.dat=o,s}return Object(m.a)(t,e),t}(Oe),ee=Object(b.a)($.prototype,"type",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$),De=function e(t,n,r,a){if(Object(d.a)(this,e),this.id=void 0,this.name=void 0,this.order=void 0,this.area_variants=void 0,!Number.isInteger(t)||t<0)throw new Error("Expected id to be a non-negative integer, got ".concat(t,"."));if(!n)throw new Error("name is required.");if(!a)throw new Error("area_variants is required.");this.id=t,this.name=n,this.order=r,this.area_variants=a},Ee=(te=function e(t,n){if(Object(d.a)(this,e),this.id=t,this.area=n,Object(w.a)(this,"sections",ne,this),!Number.isInteger(t)||t<0)throw new Error("Expected id to be a non-negative integer, got ".concat(t,"."))},ne=Object(b.a)(te.prototype,"sections",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),te),Ce=function e(t,n,r,a,i,o){Object(d.a)(this,e),this.difficulty=t,this.section_id=n,this.npc_type=r,this.item_type=a,this.anything_rate=i,this.rare_rate=o,this.rate=void 0,this.rate=i*o},Le=(re=function(){function e(t,n,r,a){if(Object(d.a)(this,e),this.id=void 0,this.name=void 0,this.episode=void 0,this.quest=void 0,this.enemy_counts=void 0,this.default_time=void 0,Object(w.a)(this,"user_time",ae,this),!t)throw new Error("id is required.");if(a<=0)throw new Error("default_time must be greater than zero.");if(!n)throw new Error("name is required.");if(!r)throw new Error("quest is required.");this.id=t,this.name=n,this.episode=r.episode,this.quest=r,this.enemy_counts=r.enemy_counts,this.default_time=a}return Object(p.a)(e,[{key:"time",get:function(){return null!=this.user_time?this.user_time:this.default_time}}]),e}(),ae=Object(b.a)(re.prototype,"user_time",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Object(b.a)(re.prototype,"time",[y.f],Object.getOwnPropertyDescriptor(re.prototype,"time"),re.prototype),re),Be=function e(t,n,r,a){if(Object(d.a)(this,e),this.id=t,this.name=n,this.episode=r,this.enemy_counts=a,!t)throw new Error("id is required.");if(!n)throw new Error("name is required.");if(!a)throw new Error("enemyCounts is required.")},Me=function e(t,n,r,a){Object(d.a)(this,e),this.name=t,this.head_style_count=n,this.hair_styles_count=r,this.hair_styles_with_accessory=a},Fe=function e(t,n){Object(d.a)(this,e),this.id=t,this.name=n},Ie=(n(256),n(112),n(51)),ze=n(14),Pe=n.n(ze),Ge=n(22),Te=n(106);!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Nominal=2]="Nominal",e[e.Error=3]="Error",e[e.Reloading=4]="Reloading"}(ke||(ke={}));var Ae,We,Ue,Ne,He,qe,Ve,Ze,Ye,Ke,Qe,Xe,Je,$e,et,tt=(fe=function(){function e(t,n){Object(d.a)(this,e),Object(w.a)(this,"_value",ve,this),Object(w.a)(this,"_promise",we,this),Object(w.a)(this,"_state",be,this),this._load=void 0,Object(w.a)(this,"_error",ye,this),this._value=t,this._load=n}return Object(p.a)(e,[{key:"load",value:function(){return this.load_value()}},{key:"load_value",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(){return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.is_loading){e.next=2;break}return e.abrupt("return",this._promise);case 2:if(this._state=ke.Initializing,e.prev=3,!this._load){e.next=9;break}return this._promise=this._load(),e.next=8,this._promise;case 8:this._value=e.sent;case 9:return this._state=ke.Nominal,this._error=void 0,e.abrupt("return",this._value);case 14:throw e.prev=14,e.t0=e.catch(3),this._state=ke.Error,this._error=e.t0,e.t0;case 19:case"end":return e.stop()}},e,this,[[3,14]])}));return function(){return e.apply(this,arguments)}}()},{key:"value",get:function(){var e=this;return this._state===ke.Uninitialized&&Object(Te.defer)(function(){return e.load_value()}),this._value},set:function(e){this._value=e}},{key:"promise",get:function(){return this._state===ke.Uninitialized?this.load_value():this._promise}},{key:"state",get:function(){return this._state}},{key:"is_initialized",get:function(){return this._state!==ke.Uninitialized}},{key:"is_loading",get:function(){switch(this._state){case ke.Initializing:case ke.Reloading:return!0;default:return!1}}},{key:"error",get:function(){return this._error}}]),e}(),ve=Object(b.a)(fe.prototype,"_value",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),we=Object(b.a)(fe.prototype,"_promise",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return new Promise(function(t){return t(e._value)})}}),be=Object(b.a)(fe.prototype,"_state",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return ke.Uninitialized}}),ye=Object(b.a)(fe.prototype,"_error",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Object(b.a)(fe.prototype,"value",[y.f],Object.getOwnPropertyDescriptor(fe.prototype,"value"),fe.prototype),Object(b.a)(fe.prototype,"state",[y.f],Object.getOwnPropertyDescriptor(fe.prototype,"state"),fe.prototype),Object(b.a)(fe.prototype,"is_initialized",[y.f],Object.getOwnPropertyDescriptor(fe.prototype,"is_initialized"),fe.prototype),Object(b.a)(fe.prototype,"is_loading",[y.f],Object.getOwnPropertyDescriptor(fe.prototype,"is_loading"),fe.prototype),Object(b.a)(fe.prototype,"error",[y.f],Object.getOwnPropertyDescriptor(fe.prototype,"error"),fe.prototype),fe),nt=new(Ae=function e(){Object(d.a)(this,e),Object(w.a)(this,"current_server",We,this)},We=Object(b.a)(Ae.prototype,"current_server",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return le.Ephinea}}),Ae),rt=(Ue=function(e){function t(e){return Object(d.a)(this,t),Object(h.a)(this,Object(_.a)(t).call(this,le,e))}return Object(m.a)(t,e),Object(p.a)(t,[{key:"current",get:function(){return this.get(nt.current_server)}}]),t}(D),Object(b.a)(Ue.prototype,"current",[y.f],Object.getOwnPropertyDescriptor(Ue.prototype,"current"),Ue.prototype),Ue),at=(Ne=function(){function e(){var t=this;Object(d.a)(this,e),this.id_to_item_type=[],Object(w.a)(this,"item_types",He,this),this.load=function(){var e=Object(Ge.a)(Pe.a.mark(function e(n){var r,a,i,o,s,l,u,c,d,p;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("".concat("","/itemTypes.").concat(le[n].toLowerCase(),".json"));case 2:return r=e.sent,e.next=5,r.json();case 5:a=e.sent,i=new Array,o=!0,s=!1,l=void 0,e.prev=10,u=a[Symbol.iterator]();case 12:if(o=(c=u.next()).done){e.next=34;break}d=c.value,p=void 0,e.t0=d.class,e.next="weapon"===e.t0?18:"armor"===e.t0?20:"shield"===e.t0?22:"unit"===e.t0?24:"tool"===e.t0?26:28;break;case 18:return p=new E(d.id,d.name,d.minAtp,d.maxAtp,d.ata,d.maxGrind,d.requiredAtp),e.abrupt("break",29);case 20:return p=new C(d.id,d.name,d.atp,d.ata,d.minEvp,d.maxEvp,d.minDfp,d.maxDfp,d.mst,d.hp,d.lck),e.abrupt("break",29);case 22:return p=new L(d.id,d.name,d.atp,d.ata,d.minEvp,d.maxEvp,d.minDfp,d.maxDfp,d.mst,d.hp,d.lck),e.abrupt("break",29);case 24:return p=new B(d.id,d.name),e.abrupt("break",29);case 26:return p=new M(d.id,d.name),e.abrupt("break",29);case 28:return e.abrupt("continue",31);case 29:t.id_to_item_type[p.id]=p,i.push(p);case 31:o=!0,e.next=12;break;case 34:e.next=40;break;case 36:e.prev=36,e.t1=e.catch(10),s=!0,l=e.t1;case 40:e.prev=40,e.prev=41,o||null==u.return||u.return();case 43:if(e.prev=43,!s){e.next=46;break}throw l;case 46:return e.finish(43);case 47:return e.finish(40);case 48:return t.item_types=i,e.abrupt("return",t);case 50:case"end":return e.stop()}},e,null,[[10,36,40,48],[41,,43,47]])}));return function(t){return e.apply(this,arguments)}}()}return Object(p.a)(e,[{key:"get_by_id",value:function(e){return this.id_to_item_type[e]}}]),e}(),He=Object(b.a)(Ne.prototype,"item_types",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Ne),it=new rt(function(e){var t=new at;return new tt(t,function(){return t.load(e)})}),ot=(qe=function(){function e(t,n){Object(d.a)(this,e),this.store=void 0,this.item=void 0,this.store=t,this.item=n}return Object(p.a)(e,[{key:"shifta_atp",get:function(){return this.item.type.min_atp===this.item.type.max_atp?0:this.item.type.max_atp*this.store.shifta_factor}},{key:"min_atp",get:function(){return this.item.type.min_atp+this.item.grind_atp}},{key:"max_atp",get:function(){return this.item.type.max_atp+this.item.grind_atp+this.shifta_atp}},{key:"final_min_atp",get:function(){return this.min_atp+this.store.armor_atp+this.store.shield_atp+this.store.base_atp+this.store.base_shifta_atp}},{key:"final_max_atp",get:function(){return this.max_atp+this.store.armor_atp+this.store.shield_atp+this.store.base_atp+this.store.base_shifta_atp}},{key:"min_normal_damage",get:function(){return(this.final_min_atp-this.store.enemy_dfp)*(.2*.9)}},{key:"max_normal_damage",get:function(){return(this.final_max_atp-this.store.enemy_dfp)*(.2*.9)}},{key:"avg_normal_damage",get:function(){return(this.min_normal_damage+this.max_normal_damage)/2}},{key:"min_heavy_damage",get:function(){return.3402*(this.final_min_atp-this.store.enemy_dfp)}},{key:"max_heavy_damage",get:function(){return.3402*(this.final_max_atp-this.store.enemy_dfp)}},{key:"avg_heavy_damage",get:function(){return(this.min_heavy_damage+this.max_heavy_damage)/2}}]),e}(),Object(b.a)(qe.prototype,"shifta_atp",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"shifta_atp"),qe.prototype),Object(b.a)(qe.prototype,"min_atp",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"min_atp"),qe.prototype),Object(b.a)(qe.prototype,"max_atp",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"max_atp"),qe.prototype),Object(b.a)(qe.prototype,"final_min_atp",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"final_min_atp"),qe.prototype),Object(b.a)(qe.prototype,"final_max_atp",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"final_max_atp"),qe.prototype),Object(b.a)(qe.prototype,"min_normal_damage",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"min_normal_damage"),qe.prototype),Object(b.a)(qe.prototype,"max_normal_damage",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"max_normal_damage"),qe.prototype),Object(b.a)(qe.prototype,"avg_normal_damage",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"avg_normal_damage"),qe.prototype),Object(b.a)(qe.prototype,"min_heavy_damage",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"min_heavy_damage"),qe.prototype),Object(b.a)(qe.prototype,"max_heavy_damage",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"max_heavy_damage"),qe.prototype),Object(b.a)(qe.prototype,"avg_heavy_damage",[y.f],Object.getOwnPropertyDescriptor(qe.prototype,"avg_heavy_damage"),qe.prototype),qe),st=new(Ve=function(){function e(){var t=this;Object(d.a)(this,e),Object(w.a)(this,"char_atp",Ze,this),Object(w.a)(this,"mag_pow",Ye,this),Object(w.a)(this,"shifta_lvl",Ke,this),Object(w.a)(this,"weapons",Qe,this),this.add_weapon=function(e){t.weapons.push(new ot(t,new F(e)))},Object(w.a)(this,"armor_type",Xe,this),Object(w.a)(this,"shield_type",Je,this),Object(w.a)(this,"enemy_dfp",$e,this)}return Object(p.a)(e,[{key:"weapon_types",get:function(){return it.current.value.item_types.filter(function(e){return e instanceof E})}},{key:"armor_types",get:function(){return it.current.value.item_types.filter(function(e){return e instanceof C})}},{key:"shield_types",get:function(){return it.current.value.item_types.filter(function(e){return e instanceof L})}},{key:"armor_atp",get:function(){return this.armor_type?this.armor_type.atp:0}},{key:"shield_atp",get:function(){return this.shield_type?this.shield_type.atp:0}},{key:"base_atp",get:function(){return this.char_atp+2*this.mag_pow}},{key:"shifta_factor",get:function(){return this.shifta_lvl?.013*(this.shifta_lvl-1)+.1:0}},{key:"base_shifta_atp",get:function(){return this.base_atp*this.shifta_factor}}]),e}(),Object(b.a)(Ve.prototype,"weapon_types",[y.f],Object.getOwnPropertyDescriptor(Ve.prototype,"weapon_types"),Ve.prototype),Object(b.a)(Ve.prototype,"armor_types",[y.f],Object.getOwnPropertyDescriptor(Ve.prototype,"armor_types"),Ve.prototype),Object(b.a)(Ve.prototype,"shield_types",[y.f],Object.getOwnPropertyDescriptor(Ve.prototype,"shield_types"),Ve.prototype),Ze=Object(b.a)(Ve.prototype,"char_atp",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ye=Object(b.a)(Ve.prototype,"mag_pow",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Object(b.a)(Ve.prototype,"armor_atp",[y.f],Object.getOwnPropertyDescriptor(Ve.prototype,"armor_atp"),Ve.prototype),Object(b.a)(Ve.prototype,"shield_atp",[y.f],Object.getOwnPropertyDescriptor(Ve.prototype,"shield_atp"),Ve.prototype),Ke=Object(b.a)(Ve.prototype,"shifta_lvl",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Object(b.a)(Ve.prototype,"base_atp",[y.f],Object.getOwnPropertyDescriptor(Ve.prototype,"base_atp"),Ve.prototype),Object(b.a)(Ve.prototype,"shifta_factor",[y.f],Object.getOwnPropertyDescriptor(Ve.prototype,"shifta_factor"),Ve.prototype),Object(b.a)(Ve.prototype,"base_shifta_atp",[y.f],Object.getOwnPropertyDescriptor(Ve.prototype,"base_shifta_atp"),Ve.prototype),Qe=Object(b.a)(Ve.prototype,"weapons",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return y.m.array()}}),Xe=Object(b.a)(Ve.prototype,"armor_type",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Je=Object(b.a)(Ve.prototype,"shield_type",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$e=Object(b.a)(Ve.prototype,"enemy_dfp",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ve),lt=n(219),ut=n.n(lt),ct=(n(329),function(e){function t(){return Object(d.a)(this,t),Object(h.a)(this,Object(_.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return a.a.createElement(ut.a,Object.assign({className:"BigSelect"},this.props))}}]),t}(r.PureComponent)),dt=Object(f.a)(et=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).add_weapon=function(e){if(e){var t=it.current.value.get_by_id(e.value);st.add_weapon(t)}},n.armor_changed=function(e){if(e){var t=it.current.value.get_by_id(e.value);st.armor_type=t}else st.armor_type=void 0},n.shield_changed=function(e){if(e){var t=it.current.value.get_by_id(e.value);st.shield_type=t}else st.shield_type=void 0},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return a.a.createElement("section",null,a.a.createElement("section",null,a.a.createElement("div",null,"Weapons:"),a.a.createElement(ct,{placeholder:"Add a weapon",value:void 0,options:st.weapon_types.map(function(e){return{label:e.name,value:e.id}}),onChange:this.add_weapon}),a.a.createElement("table",null,a.a.createElement("thead",null,a.a.createElement("tr",null,a.a.createElement("td",null,"Weapon"),a.a.createElement("td",null,"Min. ATP"),a.a.createElement("td",null,"Max. ATP"),a.a.createElement("td",null,"Grind"),a.a.createElement("td",null,"Grind ATP"),a.a.createElement("td",null,"Shifta ATP"),a.a.createElement("td",null,"Final Min. ATP"),a.a.createElement("td",null,"Final Max. ATP"),a.a.createElement("td",null,"Min. Normal Damage"),a.a.createElement("td",null,"Max. Normal Damage"),a.a.createElement("td",null,"Avg. Normal Damage"),a.a.createElement("td",null,"Min. Heavy Damage"),a.a.createElement("td",null,"Max. Heavy Damage"),a.a.createElement("td",null,"Avg. Heavy Damage"))),a.a.createElement("tbody",null,st.weapons.map(function(e,t){return a.a.createElement("tr",{key:t},a.a.createElement("td",null,e.item.type.name),a.a.createElement("td",null,e.item.type.min_atp),a.a.createElement("td",null,e.item.type.max_atp),a.a.createElement("td",null,a.a.createElement(Ie.a,{size:"small",value:e.item.grind,min:0,max:e.item.type.max_grind,step:1,onChange:function(t){return e.item.grind=t||0}})),a.a.createElement("td",null,e.item.grind_atp),a.a.createElement("td",null,e.shifta_atp.toFixed(1)),a.a.createElement("td",null,e.final_min_atp.toFixed(1)),a.a.createElement("td",null,e.final_max_atp.toFixed(1)),a.a.createElement("td",null,e.min_normal_damage.toFixed(1)),a.a.createElement("td",null,e.max_normal_damage.toFixed(1)),a.a.createElement("td",null,e.avg_normal_damage.toFixed(1)),a.a.createElement("td",null,e.min_heavy_damage.toFixed(1)),a.a.createElement("td",null,e.max_heavy_damage.toFixed(1)),a.a.createElement("td",null,e.avg_heavy_damage.toFixed(1)))}))),a.a.createElement("div",null,"Character ATP:"),a.a.createElement(Ie.a,{value:st.char_atp,min:0,step:1,onChange:function(e){return st.char_atp=e||0}}),a.a.createElement("div",null,"MAG POW:"),a.a.createElement(Ie.a,{value:st.mag_pow,min:0,max:200,step:1,onChange:function(e){return st.mag_pow=e||0}}),a.a.createElement("div",null,"Armor:"),a.a.createElement(ct,{placeholder:"Choose an armor",value:st.armor_type&&st.armor_type.id,options:st.armor_types.map(function(e){return{label:e.name,value:e.id}}),onChange:this.armor_changed}),a.a.createElement("span",null,"Armor ATP: ",st.armor_atp),a.a.createElement("div",null,"Shield:"),a.a.createElement(ct,{placeholder:"Choose a shield",value:st.shield_type&&st.shield_type.id,options:st.shield_types.map(function(e){return{label:e.name,value:e.id}}),onChange:this.shield_changed}),a.a.createElement("span",null,"Shield ATP: ",st.shield_atp),a.a.createElement("div",null,"Shifta level:"),a.a.createElement(Ie.a,{value:st.shifta_lvl,min:0,max:30,step:1,onChange:function(e){return st.shifta_lvl=e||0}}),a.a.createElement("div",null,"Shifta factor:"),a.a.createElement("div",null,st.shifta_factor.toFixed(3)),a.a.createElement("div",null,"Base shifta ATP:"),a.a.createElement("div",null,st.base_shifta_atp.toFixed(2))))}}]),t}(r.Component))||et,pt=(n(333),n(240)),ht=(n(335),function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).state={has_error:!1},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return this.state.has_error?a.a.createElement("div",{className:"ErrorBoundary-error"},a.a.createElement("div",null,a.a.createElement(pt.a,{type:"error",message:"Something went wrong."}))):this.props.children}}],[{key:"getDerivedStateFromError",value:function(){return{has_error:!0}}}]),t}(r.Component));function _t(e){var t=function(){return a.a.createElement(ht,null,a.a.createElement(e,null))};return t.displayName="".concat(e.displayName,"ErrorBoundary"),t}n(191);var mt,ft,vt,wt,bt,yt,kt,gt,Rt,jt,Ot,St=n(79),xt=(n(337),n(338),n(224)),Dt=(n(85),n(34)),Et=n(42),Ct=n(38),Lt=n(30),Bt=n(223),Mt=n.n(Bt),Ft=l.a.get("stores/HuntMethodStore"),It=new(mt=function(){function e(){var t=this;Object(d.a)(this,e),Object(w.a)(this,"methods",ft,this),this.storage_disposer=void 0,this.load_from_local_storage=function(e,n){try{var r=localStorage.getItem("HuntMethodStore.methodUserTimes.".concat(le[n]));if(r){var a=JSON.parse(r),i=!0,o=!1,s=void 0;try{for(var l,u=e[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value;c.user_time=a[c.id]}}catch(d){o=!0,s=d}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}t.storage_disposer&&t.storage_disposer(),t.storage_disposer=Object(y.e)(function(){return t.store_in_local_storage(e,n)})}catch(p){Ft.error(p)}},this.store_in_local_storage=function(e,t){try{var n={},r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;void 0!=l.user_time&&(n[l.id]=l.user_time)}}catch(u){a=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}localStorage.setItem("HuntMethodStore.methodUserTimes.".concat(le[t]),JSON.stringify(n))}catch(c){Ft.error(c)}}}return Object(p.a)(e,[{key:"load_hunt_methods",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t){var n,r,a,i,o,s,l,u,c,d,p,h,_,m,f,v,w,b;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("".concat("","/quests.").concat(le[t].toLowerCase(),".json"));case 2:return n=e.sent,e.next=5,n.json();case 5:r=e.sent,a=new Array,i=!0,o=!1,s=void 0,e.prev=10,l=r[Symbol.iterator]();case 12:if(i=(u=l.next()).done){e.next=25;break}for(c=u.value,d=0,p=new Map,h=0,_=Object.entries(c.enemyCounts);h<_.length;h++)m=_[h],f=Object(Lt.a)(m,2),v=f[0],w=f[1],(b=I.by_code(v))?(p.set(b,w),d+=w):Ft.error("No NpcType found for code ".concat(v,"."));e.t0=c.id,e.next=31===e.t0?20:34===e.t0?20:1305===e.t0?20:1306===e.t0?20:1307===e.t0?20:313===e.t0?20:314===e.t0?20:21;break;case 20:return e.abrupt("continue",22);case 21:a.push(new Le("q".concat(c.id),c.name,new Be(c.id,c.name,c.episode,p),/^\d-\d.*/.test(c.name)?.75:d>400?.75:.5));case 22:i=!0,e.next=12;break;case 25:e.next=31;break;case 27:e.prev=27,e.t1=e.catch(10),o=!0,s=e.t1;case 31:e.prev=31,e.prev=32,i||null==l.return||l.return();case 34:if(e.prev=34,!o){e.next=37;break}throw s;case 37:return e.finish(34);case 38:return e.finish(31);case 39:return this.load_from_local_storage(a,t),e.abrupt("return",a);case 41:case"end":return e.stop()}},e,this,[[10,27,31,39],[32,,34,38]])}));return function(t){return e.apply(this,arguments)}}()}]),e}(),ft=Object(b.a)(mt.prototype,"methods",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){var e=this;return new rt(function(t){return new tt([],function(){return e.load_hunt_methods(t)})})}}),mt),zt=l.a.get("stores/ItemDropStore"),Pt=function(){function e(){Object(d.a)(this,e),this.table=new Array(ge.length*me.length*ie.length),this.item_type_to_drops=[]}return Object(p.a)(e,[{key:"get_drop",value:function(e,t,n){return this.table[e*me.length*ie.length+t*ie.length+n.id]}},{key:"set_drop",value:function(e,t,n,r){this.table[e*me.length*ie.length+t*ie.length+n.id]=r;var a=this.item_type_to_drops[r.item_type.id];a||(a=[],this.item_type_to_drops[r.item_type.id]=a),a.push(r)}},{key:"get_drops_for_item_type",value:function(e){return this.item_type_to_drops[e]||[]}}]),e}(),Gt=(vt=y.m.ref,wt=function e(){Object(d.a)(this,e),Object(w.a)(this,"enemy_drops",bt,this)},bt=Object(b.a)(wt.prototype,"enemy_drops",[vt],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Pt}}),wt),Tt=new rt(function(e){var t=new Gt;return new tt(t,function(){return function(e,t){return At.apply(this,arguments)}(t,e)})});function At(){return(At=Object(Ge.a)(Pe.a.mark(function e(t,n){var r,a,i,o,s,l,u,c,d,p,h,_,m,f;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,it.current.promise;case 2:return r=e.sent,e.next=5,fetch("".concat("","/enemyDrops.").concat(le[n].toLowerCase(),".json"));case 5:return a=e.sent,e.next=8,a.json();case 8:i=e.sent,o=new Pt,s=!0,l=!1,u=void 0,e.prev=13,c=i[Symbol.iterator]();case 15:if(s=(d=c.next()).done){e.next=34;break}if(p=d.value,h=I.by_code(p.enemy)){e.next=21;break}return zt.warn("Couldn't determine NpcType of episode ".concat(p.episode," ").concat(p.enemy,".")),e.abrupt("continue",31);case 21:if(_=_e[p.difficulty],m=r.get_by_id(p.itemTypeId)){e.next=26;break}return zt.warn("Couldn't find item kind ".concat(p.itemTypeId,".")),e.abrupt("continue",31);case 26:if(null!=(f=pe[p.sectionId])){e.next=30;break}return zt.warn("Couldn't find section ID ".concat(p.sectionId,".")),e.abrupt("continue",31);case 30:o.set_drop(_,f,h,new Ce(_,f,h,m,p.dropRate,p.rareRate));case 31:s=!0,e.next=15;break;case 34:e.next=40;break;case 36:e.prev=36,e.t0=e.catch(13),l=!0,u=e.t0;case 40:e.prev=40,e.prev=41,s||null==c.return||c.return();case 43:if(e.prev=43,!l){e.next=46;break}throw u;case 46:return e.finish(43);case 47:return e.finish(40);case 48:return t.enemy_drops=o,e.abrupt("return",t);case 50:case"end":return e.stop()}},e,null,[[13,36,40,48],[41,,43,47]])}))).apply(this,arguments)}var Wt,Ut,Nt=l.a.get("stores/HuntOptimizerStore"),Ht=(yt=function e(t,n){Object(d.a)(this,e),Object(w.a)(this,"item_type",kt,this),Object(w.a)(this,"amount",gt,this),this.item_type=t,this.amount=n},kt=Object(b.a)(yt.prototype,"item_type",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),gt=Object(b.a)(yt.prototype,"amount",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yt),qt=function e(t,n){Object(d.a)(this,e),this.wanted_items=void 0,this.optimal_methods=void 0,this.wanted_items=t,this.optimal_methods=n},Vt=function e(t,n,r,a,i,o,s){Object(d.a)(this,e),this.difficulty=void 0,this.section_ids=void 0,this.method_name=void 0,this.method_episode=void 0,this.method_time=void 0,this.runs=void 0,this.total_time=void 0,this.item_counts=void 0,this.difficulty=t,this.section_ids=n,this.method_name=r,this.method_episode=a,this.method_time=i,this.runs=o,this.total_time=o*i,this.item_counts=s},Zt=new(Rt=function(){function e(){var t=this;Object(d.a)(this,e),Object(w.a)(this,"wanted_items",jt,this),Object(w.a)(this,"result",Ot,this),this.optimize=Object(Ge.a)(Pe.a.mark(function e(){var n,r,a,i,o,s,l,u,c,d,p,h,_,m,f,v,w,b,y,k,g,R,j,O,S,x,D,E,C,L,B,M,F,z,P,G,T,A,W,U,N,H,q,V,Z,Y,K,Q,X,J,$,ee,te,ne,re,ae,ie,oe,se,le,de,pe,he,_e,fe,ve,we,be,ye,ke,Re,je,Oe,Se,xe,De,Ee,Ce,Le,Be,Me,Fe,Ie,ze,Ge,Te,Ae,We,Ue,Ne,He,qe,Ve,Ze,Ye,Ke,Qe,Xe,Je,$e,et,tt,nt,rt,at;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.wanted_items.length){e.next=3;break}return t.result=void 0,e.abrupt("return");case 3:return n=new Set(t.wanted_items.filter(function(e){return e.amount>0}).map(function(e){return e.item_type})),e.next=6,It.methods.current.promise;case 6:return r=e.sent,e.next=9,Tt.current.promise;case 9:for(a=e.sent.enemy_drops,i={},o=!0,s=!1,l=void 0,e.prev=14,u=t.wanted_items[Symbol.iterator]();!(o=(c=u.next()).done);o=!0)d=c.value,i[d.item_type.name]={min:d.amount};e.next=22;break;case 18:e.prev=18,e.t0=e.catch(14),s=!0,l=e.t0;case 22:e.prev=22,e.prev=23,o||null==u.return||u.return();case 25:if(e.prev=25,!s){e.next=28;break}throw l;case 28:return e.finish(25);case 29:return e.finish(22);case 30:p={},h=new Map,_=!0,m=!1,f=void 0,e.prev=35,v=r[Symbol.iterator]();case 37:if(_=(w=v.next()).done){e.next=144;break}for(b=w.value,y=new Map,k=!0,g=!1,R=void 0,e.prev=43,j=b.enemy_counts.entries()[Symbol.iterator]();!(k=(O=j.next()).done);k=!0)S=O.value,x=Object(Lt.a)(S,2),D=x[0],E=x[1],C=y.get(D)||0,null==D.rare_type?y.set(D,C+E):(L=void 0,B=void 0,D.rare_type===I.Kondrieu?(L=1-ce,B=ce):(L=1-ue,B=ue),y.set(D,C+E*L),y.set(D.rare_type,(y.get(D.rare_type)||0)+E*B));e.next=51;break;case 47:e.prev=47,e.t1=e.catch(43),g=!0,R=e.t1;case 51:e.prev=51,e.prev=52,k||null==j.return||j.return();case 54:if(e.prev=54,!g){e.next=57;break}throw R;case 57:return e.finish(54);case 58:return e.finish(51);case 59:M=[y],(F=y.get(I.PanArms))&&((z=new Map(y)).delete(I.PanArms),z.set(I.Migium,F),z.set(I.Hidoom,F),M.push(z)),(P=y.get(I.PanArms2))&&((G=new Map(y)).delete(I.PanArms2),G.set(I.Migium2,P),G.set(I.Hidoom2,P),M.push(G)),T=0;case 65:if(!(T<M.length)){e.next=141;break}A=M[T],W=1===T,U=!0,N=!1,H=void 0,e.prev=71,q=ge[Symbol.iterator]();case 73:if(U=(V=q.next()).done){e.next=124;break}Z=V.value,Y=!0,K=!1,Q=void 0,e.prev=78,X=me[Symbol.iterator]();case 80:if(Y=(J=X.next()).done){e.next=107;break}for($=J.value,ee={time:b.time},te=!1,ne=!0,re=!1,ae=void 0,e.prev=87,ie=A.entries()[Symbol.iterator]();!(ne=(oe=ie.next()).done);ne=!0)se=oe.value,le=Object(Lt.a)(se,2),de=le[0],pe=le[1],(he=a.get_drop(Z,$,de))&&n.has(he.item_type)&&(_e=ee[he.item_type.name]||0,ee[he.item_type.name]=_e+pe*he.rate,te=!0);e.next=95;break;case 91:e.prev=91,e.t2=e.catch(87),re=!0,ae=e.t2;case 95:e.prev=95,e.prev=96,ne||null==ie.return||ie.return();case 98:if(e.prev=98,!re){e.next=101;break}throw ae;case 101:return e.finish(98);case 102:return e.finish(95);case 103:te&&(fe=t.full_method_name(Z,$,b,W),p[fe]=ee,h.set(fe,{method:b,difficulty:Z,section_id:$,split_pan_arms:W}));case 104:Y=!0,e.next=80;break;case 107:e.next=113;break;case 109:e.prev=109,e.t3=e.catch(78),K=!0,Q=e.t3;case 113:e.prev=113,e.prev=114,Y||null==X.return||X.return();case 116:if(e.prev=116,!K){e.next=119;break}throw Q;case 119:return e.finish(116);case 120:return e.finish(113);case 121:U=!0,e.next=73;break;case 124:e.next=130;break;case 126:e.prev=126,e.t4=e.catch(71),N=!0,H=e.t4;case 130:e.prev=130,e.prev=131,U||null==q.return||q.return();case 133:if(e.prev=133,!N){e.next=136;break}throw H;case 136:return e.finish(133);case 137:return e.finish(130);case 138:T++,e.next=65;break;case 141:_=!0,e.next=37;break;case 144:e.next=150;break;case 146:e.prev=146,e.t5=e.catch(35),m=!0,f=e.t5;case 150:e.prev=150,e.prev=151,_||null==v.return||v.return();case 153:if(e.prev=153,!m){e.next=156;break}throw f;case 156:return e.finish(153);case 157:return e.finish(150);case 158:if((ve=Mt.a.Solve({optimize:"time",opType:"min",constraints:i,variables:p})).feasible){e.next=162;break}return t.result=void 0,e.abrupt("return");case 162:we=[],be=0,ye=Object.entries(ve);case 164:if(!(be<ye.length)){e.next=257;break}if(ke=ye[be],Re=Object(Lt.a)(ke,2),je=Re[0],Oe=Re[1],!(Se=h.get(je))){e.next=254;break}xe=Se.method,De=Se.difficulty,Ee=Se.section_id,Ce=Se.split_pan_arms,Le=Oe,Be=p[je],Me=new Map,Fe=0,Ie=Object.entries(Be);case 176:if(!(Fe<Ie.length)){e.next=211;break}ze=Ie[Fe],Ge=Object(Lt.a)(ze,2),Te=Ge[0],Ae=Ge[1],We=!0,Ue=!1,Ne=void 0,e.prev=184,He=n[Symbol.iterator]();case 186:if(We=(qe=He.next()).done){e.next=194;break}if(Ve=qe.value,Te!==Ve.name){e.next=191;break}return Me.set(Ve,Le*Ae),e.abrupt("break",194);case 191:We=!0,e.next=186;break;case 194:e.next=200;break;case 196:e.prev=196,e.t6=e.catch(184),Ue=!0,Ne=e.t6;case 200:e.prev=200,e.prev=201,We||null==He.return||He.return();case 203:if(e.prev=203,!Ue){e.next=206;break}throw Ne;case 206:return e.finish(203);case 207:return e.finish(200);case 208:Fe++,e.next=176;break;case 211:Ze=[],Ye=!0,Ke=!1,Qe=void 0,e.prev=215,Xe=me[Symbol.iterator]();case 217:if(Ye=(Je=Xe.next()).done){e.next=239;break}if($e=Je.value,et=!0,$e===Ee){e.next=235;break}if(tt=p[t.full_method_name(De,$e,xe,Ce)]){e.next=226;break}et=!1,e.next=235;break;case 226:nt=0,rt=Object.keys(Be);case 227:if(!(nt<rt.length)){e.next=235;break}if(at=rt[nt],Be[at]===tt[at]){e.next=232;break}return et=!1,e.abrupt("break",235);case 232:nt++,e.next=227;break;case 235:et&&Ze.push($e);case 236:Ye=!0,e.next=217;break;case 239:e.next=245;break;case 241:e.prev=241,e.t7=e.catch(215),Ke=!0,Qe=e.t7;case 245:e.prev=245,e.prev=246,Ye||null==Xe.return||Xe.return();case 248:if(e.prev=248,!Ke){e.next=251;break}throw Qe;case 251:return e.finish(248);case 252:return e.finish(245);case 253:we.push(new Vt(De,Ze,xe.name+(Ce?" (Split Pan Arms)":""),xe.episode,xe.time,Le,Me));case 254:be++,e.next=164;break;case 257:t.result=new qt(Object(Ct.a)(n),we);case 258:case"end":return e.stop()}},e,null,[[14,18,22,30],[23,,25,29],[35,146,150,158],[43,47,51,59],[52,,54,58],[71,126,130,138],[78,109,113,121],[87,91,95,103],[96,,98,102],[114,,116,120],[131,,133,137],[151,,153,157],[184,196,200,208],[201,,203,207],[215,241,245,253],[246,,248,252]])})),this.initialize=Object(Ge.a)(Pe.a.mark(function e(){return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.load_from_local_storage();case 3:Object(y.e)(t.store_in_local_storage),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),Nt.error(e.t0);case 9:case"end":return e.stop()}},e,null,[[0,6]])})),this.load_from_local_storage=Object(Ge.a)(Pe.a.mark(function e(){var n,r,a,i,o,s,l,u,c,d,p,h,_,m;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=localStorage.getItem("HuntOptimizerStore.wantedItems.".concat(le[nt.current_server])))){e.next=27;break}return e.next=4,it.current.promise;case 4:for(r=e.sent,a=JSON.parse(n),i=[],o=!0,s=!1,l=void 0,e.prev=10,u=a[Symbol.iterator]();!(o=(c=u.next()).done);o=!0)d=c.value,p=d.itemTypeId,h=d.itemKindId,_=d.amount,(m=void 0!=p?r.get_by_id(p):r.get_by_id(h))&&i.push(new Ht(m,_));e.next=18;break;case 14:e.prev=14,e.t0=e.catch(10),s=!0,l=e.t0;case 18:e.prev=18,e.prev=19,o||null==u.return||u.return();case 21:if(e.prev=21,!s){e.next=24;break}throw l;case 24:return e.finish(21);case 25:return e.finish(18);case 26:t.wanted_items.replace(i);case 27:case"end":return e.stop()}},e,null,[[10,14,18,26],[19,,21,25]])})),this.store_in_local_storage=function(){try{localStorage.setItem("HuntOptimizerStore.wantedItems.".concat(le[nt.current_server]),JSON.stringify(t.wanted_items.map(function(e){var t=e.item_type,n=e.amount;return{itemTypeId:t.id,amount:n}})))}catch(e){Nt.error(e)}},this.initialize()}return Object(p.a)(e,[{key:"huntable_item_types",get:function(){var e=Tt.current.value;return it.current.value.item_types.filter(function(t){return e.enemy_drops.get_drops_for_item_type(t.id).length})}}]),Object(p.a)(e,[{key:"full_method_name",value:function(e,t,n,r){var a="".concat(e,"\t").concat(t,"\t").concat(n.id);return r&&(a+="\tspa"),a}}]),e}(),Object(b.a)(Rt.prototype,"huntable_item_types",[y.f],Object.getOwnPropertyDescriptor(Rt.prototype,"huntable_item_types"),Rt.prototype),jt=Object(b.a)(Rt.prototype,"wanted_items",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return y.m.array()}}),Ot=Object(b.a)(Rt.prototype,"result",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Rt),Yt=(n(364),Object(f.a)(Wt=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(i)))).state={help_visible:!1},n.add_wanted=function(e){if(e&&!Zt.wanted_items.find(function(t){return t.item_type.id===e.value})){var t=it.current.value.get_by_id(e.value);Zt.wanted_items.push(new Ht(t,1))}},n.remove_wanted=function(e){return function(){var t=Zt.wanted_items.findIndex(function(t){return t===e});-1!==t&&Zt.wanted_items.splice(t,1)}},n.table_remove_cell_renderer=function(e){var t=e.rowData;return a.a.createElement(Dt.a,{type:"link",icon:"delete",onClick:n.remove_wanted(t)})},n.no_rows_renderer=function(){return a.a.createElement("div",{className:"ho-WantedItemsComponent-no-rows"},a.a.createElement("p",null,'Add some items with the above drop down and click "Optimize" to see the result on the right.'))},n.on_help_visible_change=function(e){n.setState({helpVisible:e})},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e=this;return Zt.wanted_items.slice(0,0),a.a.createElement("section",{className:"ho-WantedItemsComponent"},a.a.createElement("h3",null,"Wanted Items",a.a.createElement(xt.a,{content:a.a.createElement(Kt,null),trigger:"click",visible:this.state.help_visible,onVisibleChange:this.on_help_visible_change},a.a.createElement(Dt.a,{icon:"info-circle",type:"link"}))),a.a.createElement("div",{className:"ho-WantedItemsComponent-top-bar"},a.a.createElement(ct,{placeholder:"Add an item",value:void 0,style:{width:200},options:Zt.huntable_item_types.map(function(e){return{label:e.name,value:e.id}}),onChange:this.add_wanted}),a.a.createElement(Dt.a,{onClick:Zt.optimize,style:{marginLeft:10}},"Optimize")),a.a.createElement("div",{className:"ho-WantedItemsComponent-table"},a.a.createElement(Et.a,null,function(t){var n=t.width,r=t.height;return a.a.createElement(Et.e,{width:n,height:r,headerHeight:30,rowHeight:30,rowCount:Zt.wanted_items.length,rowGetter:function(e){var t=e.index;return Zt.wanted_items[t]},noRowsRenderer:e.no_rows_renderer},a.a.createElement(Et.b,{label:"Amount",dataKey:"amount",width:70,cellRenderer:function(e){var t=e.rowData;return a.a.createElement(Qt,{wantedItem:t})}}),a.a.createElement(Et.b,{label:"Item",dataKey:"item",width:150,flexGrow:1,cellDataGetter:function(e){return e.rowData.item_type.name}}),a.a.createElement(Et.b,{dataKey:"remove",width:30,cellRenderer:e.table_remove_cell_renderer}))})))}}]),t}(r.Component))||Wt);function Kt(){return a.a.createElement("div",{className:"ho-WantedItemsComponent-help"},a.a.createElement("p",null,'Add some items with the drop down and click "Optimize" to see the optimal combination of hunt methods on the right.'),a.a.createElement("p",null,'At the moment a method is simply a quest run-through. Partial quest run-throughs are coming. View the list of methods on the "Methods" tab. Each method takes a certain amount of time, which affects the optimization result. Make sure the times are correct for you.'),a.a.createElement("p",null,"Only enemy drops are considered. Box drops are coming."),a.a.createElement("p",null,"The optimal result is calculated using linear optimization. The optimizer takes rare enemies and the fact that pan arms can be split in two into account."))}var Qt=Object(f.a)(Ut=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).wanted_amount_changed=function(e){null!=e&&e>=0&&(n.props.wantedItem.amount=e)},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e=this.props.wantedItem;return a.a.createElement(Ie.a,{min:0,max:10,value:e.amount,onChange:this.wanted_amount_changed,size:"small",style:{width:"100%"}})}}]),t}(r.Component))||Ut,Xt=(n(368),function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(i)))).sort_columns=new Array,n.column_width=function(e){var t=e.index;return n.props.columns[t].width},n.cell_renderer=function(e){var t,r,i,o=e.columnIndex,s=e.rowIndex,l=e.style,u=n.props.columns[o],c=["DataTable-cell"];if(o===n.props.columns.length-1&&c.push("last-in-row"),0===s){if(t=i=u.name,u.sortable){c.push("sortable");var d=n.sort_columns[0];d&&d.column===u&&(r=d.direction===Et.d.ASC?a.a.createElement("svg",{className:"DataTable-sort-indictator",width:"18",height:"18",viewBox:"0 0 24 24"},a.a.createElement("path",{d:"M7 14l5-5 5 5z"}),a.a.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})):a.a.createElement("svg",{className:"DataTable-sort-indictator",width:"18",height:"18",viewBox:"0 0 24 24"},a.a.createElement("path",{d:"M7 10l5 5 5-5z"}),a.a.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})))}}else if(u.class_name&&c.push(u.class_name),n.props.footer&&s===1+n.props.row_count)c.push("footer-cell"),t=null==u.footer_value?"":u.footer_value,i=null==u.footer_tooltip?"":u.footer_tooltip;else{var p=n.props.record({index:s-1});t=u.cell_renderer(p),u.tooltip&&(i=u.tooltip(p))}"string"!==typeof t&&c.push("custom");var h=0===s&&u.sortable?function(){return n.header_clicked(u)}:void 0;return a.a.createElement("div",{className:c.join(" "),key:"".concat(o,", ").concat(s),style:l,title:i,onClick:h},"string"===typeof t?a.a.createElement("span",{className:"DataTable-cell-text"},t):t,r)},n.header_clicked=function(e){var t=n.sort_columns.findIndex(function(t){return t.column===e}),r=-1===t?void 0:n.sort_columns.splice(t,1)[0],a=0===t&&r&&r.direction===Et.d.ASC?Et.d.DESC:Et.d.ASC;n.sort_columns.unshift({column:e,direction:a}),n.sort_columns.splice(10),n.props.sort&&n.props.sort(n.sort_columns)},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return a.a.createElement("div",{className:"DataTable",style:{width:this.props.width,height:this.props.height}},a.a.createElement(Et.c,{width:this.props.width,height:this.props.height,rowHeight:26,rowCount:this.props.row_count+1+(this.props.footer?1:0),fixedRowCount:1,overscanRowCount:this.props.overscan_row_count,columnWidth:this.column_width,columnCount:this.props.columns.length,fixedColumnCount:this.props.fixed_column_count,overscanColumnCount:this.props.overscan_column_count,cellRenderer:this.cell_renderer,classNameTopLeftGrid:"DataTable-header",classNameTopRightGrid:"DataTable-header",updateTigger:this.props.update_trigger}))}}]),t}(r.Component));function Jt(e){var t=e.section_id,n=e.size,r=void 0===n?28:n,i=e.title;return a.a.createElement("div",{title:i,style:{display:"inline-block",width:r,height:r,backgroundImage:"url(".concat("","/images/sectionids/").concat(pe[t],".png)"),backgroundSize:r}})}n(369);var $t,en,tn=Object(f.a)((en=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).record=function(e){var t=e.index;return Zt.result.optimal_methods[t]},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e=this;this.update_trigger;var t=Zt.result;return a.a.createElement("section",{className:"ho-OptimizationResultComponent"},a.a.createElement("h3",null,"Optimization Result"),a.a.createElement("div",{className:"ho-OptimizationResultComponent-table"},a.a.createElement(Et.a,null,function(n){var r=n.width,i=n.height;return a.a.createElement(Xt,{width:r,height:i,row_count:t?t.optimal_methods.length:0,columns:e.columns,fixed_column_count:4,record:e.record,footer:null!=t,update_trigger:e.update_trigger})})))}},{key:"columns",get:function(){var e=Zt.result,t=e?e.optimal_methods:[],n=0,r=0,i=!0,o=!1,s=void 0;try{for(var l,u=t[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value;n+=c.runs,r+=c.total_time}}catch(w){o=!0,s=w}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}var d=[{name:"Difficulty",width:75,cell_renderer:function(e){return _e[e.difficulty]},footer_value:"Totals:"},{name:"Method",width:200,cell_renderer:function(e){return e.method_name},tooltip:function(e){return e.method_name}},{name:"Ep.",width:34,cell_renderer:function(e){return de[e.method_episode]}},{name:"Section ID",width:80,cell_renderer:function(e){return a.a.createElement("div",{className:"ho-OptimizationResultComponent-sid-col"},e.section_ids.map(function(e){return a.a.createElement(Jt,{section_id:e,key:e,size:20})}))},tooltip:function(e){return e.section_ids.map(function(e){return pe[e]}).join(", ")}},{name:"Time/Run",width:80,cell_renderer:function(e){return function(e){var t=Math.floor(e),n=Math.round(60*(e-t));return"".concat(t.toString().padStart(2,"0"),":").concat(n.toString().padStart(2,"0"))}(e.method_time)},class_name:"number"},{name:"Runs",width:60,cell_renderer:function(e){return e.runs.toFixed(1)},tooltip:function(e){return e.runs.toString()},footer_value:n.toFixed(1),footer_tooltip:n.toString(),class_name:"number"},{name:"Total Hours",width:90,cell_renderer:function(e){return e.total_time.toFixed(1)},tooltip:function(e){return e.total_time.toString()},footer_value:r.toFixed(1),footer_tooltip:r.toString(),class_name:"number"}];if(e){var p=!0,h=!1,_=void 0;try{for(var m,f=function(){var e=m.value,n=0,r=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){n+=o.value.item_counts.get(e)||0}}catch(w){a=!0,i=w}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}d.push({name:e.name,width:80,cell_renderer:function(t){var n=t.item_counts.get(e);return n?n.toFixed(2):""},tooltip:function(t){var n=t.item_counts.get(e);return n?n.toString():""},class_name:"number",footer_value:n.toFixed(2),footer_tooltip:n.toString()})},v=e.wanted_items[Symbol.iterator]();!(p=(m=v.next()).done);p=!0)f()}catch(w){h=!0,_=w}finally{try{p||null==v.return||v.return()}finally{if(h)throw _}}}return d}},{key:"update_trigger",get:function(){return Zt.result}}]),t}(r.Component),Object(b.a)(en.prototype,"columns",[y.f],Object.getOwnPropertyDescriptor(en.prototype,"columns"),en.prototype),Object(b.a)(en.prototype,"update_trigger",[y.f],Object.getOwnPropertyDescriptor(en.prototype,"update_trigger"),en.prototype),$t=en))||$t;n(370);function nn(){return a.a.createElement("section",{className:"ho-OptimizerComponent"},a.a.createElement(Yt,null),a.a.createElement(tn,null))}n(371);var rn,an,on,sn,ln=n(239),un=n(54),cn=n.n(un),dn=(n(373),Object(f.a)((on=an=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).record=function(e){var t=e.index;return It.methods.current.value[t]},n.sort=function(e){var t=It.methods.current.value.slice();t.sort(function(t,n){var r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value,u=l.column,c=l.direction,d=0;if("name"===u.key)d=t.name.localeCompare(n.name);else if("episode"===u.key)d=t.episode-n.episode;else if("time"===u.key)d=t.time-n.time;else if(u.key){var p=I.by_code(u.key);p&&(d=(t.enemy_counts.get(p)||0)-(n.enemy_counts.get(p)||0))}if(0!==d)return c===Et.d.ASC?d:-d}}catch(h){a=!0,i=h}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return 0}),It.methods.current.value=t},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e=this,n=It.methods.current.value;return a.a.createElement("section",{className:"ho-MethodsComponent"},a.a.createElement(Et.a,null,function(r){var i=r.width,o=r.height;return a.a.createElement(Xt,{width:i,height:o,row_count:n.length,columns:t.columns,fixed_column_count:3,record:e.record,sort:e.sort,update_trigger:It.methods.current.value})}))}}]),t}(r.Component),an.columns=function(){var e=[{key:"name",name:"Method",width:250,cell_renderer:function(e){return e.name},sortable:!0},{key:"episode",name:"Ep.",width:34,cell_renderer:function(e){return de[e.episode]},sortable:!0},{key:"time",name:"Time",width:50,cell_renderer:function(e){return a.a.createElement(pn,{method:e})},class_name:"integrated",sortable:!0}],t=!0,n=!1,r=void 0;try{for(var i,o=function(){var t=i.value;e.push({key:t.code,name:t.name,width:75,cell_renderer:function(e){var n=e.enemy_counts.get(t);return null==n?"":n.toString()},class_name:"number",sortable:!0})},s=oe[Symbol.iterator]();!(t=(i=s.next()).done);t=!0)o()}catch(l){n=!0,r=l}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}return e}(),rn=on))||rn),pn=Object(f.a)(sn=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).change=function(e){n.props.method.user_time=e.hour()+e.minute()/60},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e=this.props.method.time,t=Math.floor(e),n=Math.round(60*(e-t));return a.a.createElement(ln.a,{className:"ho-MethodsComponent-timepicker",value:cn()({hour:t,minute:n}),format:"HH:mm",size:"small",allowClear:!1,suffixIcon:a.a.createElement("span",null),onChange:this.change})}}]),t}(a.a.Component))||sn,hn=St.a.TabPane;n(380);var _n,mn=n(237),fn=(n(382),n(166)),vn=(n(385),n(238)),wn=(n(387),n(15)),bn=(n(161),n(91));!function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(_n||(_n={}));var yn=n(80),kn=new yn.TextDecoder("ascii"),gn=new yn.TextDecoder("utf-16be"),Rn=new yn.TextDecoder("utf-16le"),jn=new yn.TextEncoder("ascii"),On=new yn.TextEncoder("utf-16be"),Sn=new yn.TextEncoder("utf-16le"),xn=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.byteLength;Object(d.a)(this,e),this._position=void 0,this.little_endian=void 0,this.buffer=void 0,this.dv=void 0,this.utf16_decoder=gn,this.utf16_encoder=On,this.buffer=t,this.dv=new DataView(t,r,a),this.endianness=n,this._position=0}return Object(p.a)(e,[{key:"offset",get:function(){return this.dv.byteOffset}},{key:"size",get:function(){return this.dv.byteLength},set:function(e){this.dv=new DataView(this.buffer,this.offset,e)}},{key:"position",get:function(){return this._position}},{key:"endianness",get:function(){return this.little_endian?_n.Little:_n.Big},set:function(e){this.little_endian=e===_n.Little,this.utf16_decoder=this.little_endian?Rn:gn,this.utf16_encoder=this.little_endian?Sn:On}},{key:"bytes_left",get:function(){return this.size-this.position}}]),Object(p.a)(e,[{key:"seek",value:function(e){return this.seek_start(this.position+e)}},{key:"seek_start",value:function(e){if(e<0||e>this.size)throw new Error("Offset ".concat(e," is out of bounds."));return this._position=e,this}},{key:"seek_end",value:function(e){if(e<0||e>this.size)throw new Error("Offset ".concat(e," is out of bounds."));return this._position=this.size-e,this}},{key:"u8",value:function(){return this.u8_at(this._position++)}},{key:"u8_at",value:function(e){return this.dv.getUint8(e)}},{key:"u16",value:function(){var e=this.u16_at(this.position);return this._position+=2,e}},{key:"u16_at",value:function(e){return this.dv.getUint16(e,this.little_endian)}},{key:"u32",value:function(){var e=this.u32_at(this.position);return this._position+=4,e}},{key:"u32_at",value:function(e){return this.dv.getUint32(e,this.little_endian)}},{key:"i8",value:function(){return this.i8_at(this._position++)}},{key:"i8_at",value:function(e){return this.dv.getInt8(e)}},{key:"i16",value:function(){var e=this.i16_at(this.position);return this._position+=2,e}},{key:"i16_at",value:function(e){return this.dv.getInt16(e,this.little_endian)}},{key:"i32",value:function(){var e=this.i32_at(this.position);return this._position+=4,e}},{key:"i32_at",value:function(e){return this.dv.getInt32(e,this.little_endian)}},{key:"f32",value:function(){var e=this.f32_at(this.position);return this._position+=4,e}},{key:"f32_at",value:function(e){return this.dv.getFloat32(e,this.little_endian)}},{key:"u8_array",value:function(e){for(var t=[],n=0;n<e;++n)t.push(this.dv.getUint8(this._position++));return t}},{key:"u16_array",value:function(e){for(var t=[],n=0;n<e;++n)t.push(this.dv.getUint16(this.position,this.little_endian)),this._position+=2;return t}},{key:"u32_array",value:function(e){for(var t=[],n=0;n<e;++n)t.push(this.dv.getUint32(this.position,this.little_endian)),this._position+=4;return t}},{key:"vec2_f32",value:function(){return new k(this.f32(),this.f32())}},{key:"vec3_f32",value:function(){return new g(this.f32(),this.f32(),this.f32())}},{key:"take",value:function(t){var n=this.offset+this.position,r=new e(this.buffer,this.endianness,n,t);return this._position+=t,r}},{key:"string_ascii",value:function(e,t,n){var r=t?this.index_of_u8(0,e)-this.position:e,a=new DataView(this.buffer,this.offset+this.position,r),i=kn.decode(a);return this._position+=n?e:Math.min(r+1,e),i}},{key:"string_utf16",value:function(e,t,n){var r=t?this.index_of_u16(0,e)-this.position:2*Math.floor(e/2),a=new DataView(this.buffer,this.offset+this.position,r),i=this.utf16_decoder.decode(a);return this._position+=n?e:Math.min(r+2,e),i}},{key:"array_buffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.size-this.position,t=this.buffer.slice(this.offset+this.position,this.offset+this.position+e);return this._position+=e,t}},{key:"copy_to_uint8_array",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size-this.position;return e.set(new Uint8Array(this.buffer,this.offset+this.position,t)),this._position+=t,this}},{key:"index_of_u8",value:function(e,t){for(var n=Math.min(this.position+t,this.size),r=this.position;r<n;++r)if(this.dv.getUint8(r)===e)return r;return this.position+t}},{key:"index_of_u16",value:function(e,t){for(var n=Math.min(this.position+t,this.size),r=this.position;r<n;r+=2)if(this.dv.getUint16(r,this.little_endian)===e)return r;return this.position+t}}]),e}();function Dn(e,t){e.seek_end(32);var n=e.u32(),r=e.u32();e.seek(8);var a=e.u32();return e.seek_start(n),{data_offset:a,index:t?function(e,t){var n=e.u16_array(t),r=[],a=0,i=!0,o=!1,s=void 0;try{for(var l,u=n[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value;a+=4*c,e.seek_start(a-4);var d=e.u32(),p=e.u32();r.push({offset:p,size:d})}}catch(h){o=!0,s=h}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}return r}(e,r):[]}}function En(e){var t=Dn(e,!1).data_offset;e.seek_start(t);var n=e.u32();e.seek_start(n);for(var r={meshes:[]};e.bytes_left;){var a=e.position,i=e.u32();if(0===i)break;var o={vertices:[],triangles:[]};r.meshes.push(o),e.seek_start(i);var s=e.u32(),l=e.u32(),u=e.u32(),c=e.u32();e.seek_start(l);for(var d=0;d<s;d++){var p=e.f32(),h=e.f32(),_=e.f32();o.vertices.push(new g(p,h,_))}e.seek_start(c);for(var m=0;m<u;m++){var f=e.u16(),v=e.u16(),w=e.u16(),b=e.u16(),y=e.f32(),k=e.f32(),R=e.f32();e.seek(16),o.triangles.push({indices:[f,v,w],flags:b,normal:new g(y,k,R)})}e.seek_start(a+24)}return r}function Cn(e){for(var t=[];e.bytes_left;){var n=e.u32(),r=e.u32();if(r>e.bytes_left)break;t.push({type:n,data:e.take(r)})}return t}var Ln,Bn=n(242),Mn=l.a.get("data_formats/parsing/ninja/njcm");function Fn(e,t){var n=e.u32(),r=e.u32(),a=e.vec3_f32(),i=e.f32(),o=[],s=[];if(n){e.seek_start(n);var l=!0,u=!1,c=void 0;try{for(var d,p=In(e,t,!0)[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var h=d.value;if(h.type===Ln.Vertex){var _=!0,m=!1,f=void 0;try{for(var v,w=h.vertices[Symbol.iterator]();!(_=(v=w.next()).done);_=!0){var b=v.value;o[b.index]={position:b.position,normal:b.normal,bone_weight:b.bone_weight,bone_weight_status:b.bone_weight_status,calc_continue:b.calc_continue}}}catch(B){m=!0,f=B}finally{try{_||null==w.return||w.return()}finally{if(m)throw f}}}}}catch(B){u=!0,c=B}finally{try{l||null==p.return||p.return()}finally{if(u)throw c}}}if(r){var y;e.seek_start(r);var k=!0,g=!1,R=void 0;try{for(var j,O=In(e,t,!1)[Symbol.iterator]();!(k=(j=O.next()).done);k=!0){var S=j.value;if(S.type===Ln.Tiny)y=S.texture_id;else if(S.type===Ln.Strip){var x=!0,D=!1,E=void 0;try{for(var C,L=S.triangle_strips[Symbol.iterator]();!(x=(C=L.next()).done);x=!0){C.value.texture_id=y}}catch(B){D=!0,E=B}finally{try{x||null==L.return||L.return()}finally{if(D)throw E}}s.push.apply(s,Object(Ct.a)(S.triangle_strips))}}}catch(B){g=!0,R=B}finally{try{k||null==O.return||O.return()}finally{if(g)throw R}}}return{type:"njcm",vertices:o,meshes:s,collision_sphere_center:a,collision_sphere_radius:i}}function In(e,t,n){for(var r=[],a=!0;a;){var i=e.u8(),o=e.u8(),s=e.position,l=0;if(0===i)r.push({type:Ln.Null,type_id:i});else if(1<=i&&i<=3)r.push({type:Ln.Bits,type_id:i});else if(4===i){var u=o,c=e.position;r.push({type:Ln.CachePolygonList,type_id:i,cache_index:u,offset:c}),t[u]=c,a=!1}else if(5===i){var d=o,p=t[d];null!=p&&(e.seek_start(p),r.push.apply(r,Object(Ct.a)(In(e,t,n)))),r.push({type:Ln.DrawPolygonList,type_id:i,cache_index:d})}else if(8<=i&&i<=9){l=2;var h=e.u16();r.push({type:Ln.Tiny,type_id:i,flip_u:0!==(128&i),flip_v:0!==(64&i),clamp_u:0!==(32&i),clamp_v:0!==(16&i),mipmap_d_adjust:15&i,filter_mode:h>>>14,super_sample:0!==(64&h),texture_id:8191&h})}else 17<=i&&i<=31?(l=2+2*e.u16(),r.push({type:Ln.Material,type_id:i})):32<=i&&i<=50?(l=2+4*e.u16(),r.push({type:Ln.Vertex,type_id:i,vertices:zn(e,i,o)})):56<=i&&i<=58?(l=2+2*e.u16(),r.push({type:Ln.Volume,type_id:i})):64<=i&&i<=75?(l=2+2*e.u16(),r.push({type:Ln.Strip,type_id:i,triangle_strips:Pn(e,i,o)})):255===i?(l=n?2:0,r.push({type:Ln.End,type_id:i}),a=!1):(l=2+2*e.u16(),r.push({type:Ln.Unknown,type_id:i}),Mn.warn("Unknown chunk type ".concat(i," at offset ").concat(s,".")));e.seek_start(s+l)}return r}function zn(e,t,n){if(t<32||t>50)return Mn.warn("Unknown vertex chunk type ".concat(t,".")),[];for(var r=3&n,a=0!==(128&n),i=e.u16(),o=e.u16(),s=[],l=0;l<o;++l){var u={index:i+l,position:e.vec3_f32(),bone_weight:1,bone_weight_status:r,calc_continue:a};if(32===t)e.seek(4);else if(33===t)e.seek(4),u.normal=e.vec3_f32(),e.seek(4);else if(35<=t&&t<=40)37===t?(u.index=i+e.u16(),u.bone_weight=e.u16()/255):e.seek(4);else if(41<=t&&t<=47)u.normal=e.vec3_f32(),t>=42&&(44===t?(u.index=i+e.u16(),u.bone_weight=e.u16()/255):e.seek(4));else if(48<=t&&t<=50){var c=e.u32();u.normal=new g((c>>20&1023)/1023,(c>>10&1023)/1023,(1023&c)/1023),t>=49&&e.seek(4)}s.push(u)}return s}function Pn(e,t,n){var r={ignore_light:0!==(1&n),ignore_specular:0!==(2&n),ignore_ambient:0!==(4&n),use_alpha:0!==(8&n),double_side:0!==(16&n),flat_shading:0!==(32&n),environment_mapping:0!==(64&n)},a=e.u16(),i=a>>>14,o=16383&a,s=!1,l=!1,u=!1,c=!1;switch(t){case 64:break;case 65:case 66:s=!0;break;case 67:u=!0;break;case 68:case 69:s=!0,u=!0;break;case 70:l=!0;break;case 71:case 72:s=!0,l=!0;break;case 73:break;case 74:case 75:c=!0;break;default:throw new Error("Unexpected chunk type ID: ".concat(t,"."))}for(var d=[],p=0;p<o;++p){for(var h=e.i16(),_=h<1,m=Math.abs(h),f=[],v=0;v<m;++v){var w={index:e.u16()};f.push(w),s&&(w.tex_coords=new k(e.u16()/255,e.u16()/255)),l&&e.seek(4),u&&(w.normal=new g(e.u16()/255,e.u16()/255,e.u16()/255)),c&&e.seek(8),v>=2&&e.seek(2*i)}d.push(Object(Bn.a)({},r,{clockwise_winding:_,has_tex_coords:s,has_normal:u,vertices:f}))}return d}!function(e){e[e.Unknown=0]="Unknown",e[e.Null=1]="Null",e[e.Bits=2]="Bits",e[e.CachePolygonList=3]="CachePolygonList",e[e.DrawPolygonList=4]="DrawPolygonList",e[e.Tiny=5]="Tiny",e[e.Material=6]="Material",e[e.Vertex=7]="Vertex",e[e.Volume=8]="Volume",e[e.Strip=9]="Strip",e[e.End=10]="End"}(Ln||(Ln={}));var Gn=l.a.get("data_formats/parsing/ninja/xj");function Tn(e){e.seek(4);var t,n,r=e.u32(),a=e.u32(),i=e.u32(),o=e.u32(),s=e.u32(),l=e.u32(),u={type:"xj",vertices:[],meshes:[],collision_sphere_position:e.vec3_f32(),collision_sphere_radius:e.f32()};if(a>=1){a>1&&Gn.warn("Vertex info count of ".concat(a," was larger than expected.")),e.seek_start(r);var c=e.u16();e.seek(2);for(var d=e.u32(),p=e.u32(),h=e.u32(),_=0;_<h;++_){e.seek_start(d+_*p);var m=e.vec3_f32(),f=void 0,v=void 0;switch(c){case 3:f=e.vec3_f32(),v=e.vec2_f32();break;case 4:break;case 5:e.seek(4),v=e.vec2_f32();break;case 6:f=e.vec3_f32();break;case 7:f=e.vec3_f32(),v=e.vec2_f32();break;default:Gn.warn("Unknown vertex type ".concat(c," with size ").concat(p,"."))}u.vertices.push({position:m,normal:f,uv:v})}}i&&(t=u.meshes).push.apply(t,Object(Ct.a)(An(e,i,o)));s&&(n=u.meshes).push.apply(n,Object(Ct.a)(An(e,s,l)));return u}function An(e,t,n){for(var r=[],a=0;a<n;++a){e.seek_start(t+20*a);var i=e.u32(),o=e.u32(),s=e.u32(),l=e.u32(),u=Wn(e,i,o);e.seek_start(s);var c=e.u16_array(l);r.push({material_properties:u,indices:c})}return r}function Wn(e,t,n){for(var r={},a=0;a<n;++a){switch(e.seek_start(t+16*a),e.u32()){case 2:r.alpha_src=e.u32(),r.alpha_dst=e.u32();break;case 3:r.texture_id=e.u32();break;case 5:var i=e.u32();r.diffuse_r=(255&i)/255,r.diffuse_g=(i>>>8&255)/255,r.diffuse_b=(i>>>16&255)/255,r.diffuse_a=(i>>>24&255)/255}}return r}var Un=2*Math.PI/65535,Nn=1296255566;var Hn=function(){function e(t,n,r,a,i,o){Object(d.a)(this,e),this.evaluation_flags=void 0,this.model=void 0,this.position=void 0,this.rotation=void 0,this.scale=void 0,this.children=void 0,this.bone_cache=new Map,this._bone_count=-1,this.evaluation_flags=t,this.model=n,this.position=r,this.rotation=a,this.scale=i,this.children=o}return Object(p.a)(e,[{key:"bone_count",value:function(){if(-1===this._bone_count){var e=[0];this.get_bone_internal(this,1/0,e),this._bone_count=e[0]}return this._bone_count}},{key:"get_bone",value:function(e){var t=this.bone_cache.get(e);return void 0===t&&(t=this.get_bone_internal(this,e,[0]),this.bone_cache.set(e,t||null)),t||void 0}},{key:"get_bone_internal",value:function(e,t,n){if(!e.evaluation_flags.skip){var r=n[0]++;if(this.bone_cache.set(r,e),r===t)return e}if(!e.evaluation_flags.break_child_trace){var a=!0,i=!1,o=void 0;try{for(var s,l=e.children[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var u=s.value,c=this.get_bone_internal(u,t,n);if(c)return c}}catch(d){i=!0,o=d}finally{try{a||null==l.return||l.return()}finally{if(i)throw o}}}}}]),e}();function qn(e){return Zn(e,Fn,[])}function Vn(e){return Zn(e,Tn,void 0)}function Zn(e,t,n){return Cn(e).filter(function(e){return e.type===Nn}).flatMap(function(e){return function e(t,n,r){var a=t.u32();var i=0!==(1&a);var o=0!==(2&a);var s=0!==(4&a);var l=0!==(8&a);var u=0!==(16&a);var c=0!==(32&a);var d=0!==(64&a);var p=0!==(128&a);var h=t.u32();var _=t.f32();var m=t.f32();var f=t.f32();var v=t.i32()*Un;var w=t.i32()*Un;var b=t.i32()*Un;var y=t.f32();var k=t.f32();var R=t.f32();var j=t.u32();var O=t.u32();var S;var x;var D;h&&(t.seek_start(h),S=n(t,r));j?(t.seek_start(j),x=e(t,n,r)):x=[];O?(t.seek_start(O),D=e(t,n,r)):D=[];var E=new Hn({no_translate:i,no_rotate:o,no_scale:s,hidden:l,break_child_trace:u,zxy_rotation_order:c,skip:d,shape_skip:p},S,new g(_,m,f),new g(v,w,b),new g(y,k,R),x);return[E].concat(Object(Ct.a)(D))}(e.data,t,n)})}function Yn(e,t,n){for(var r=[],a=0;a<n;a++){e.seek_start(t+16*a);var i=e.u32();e.seek(8),4&e.u32()&&(i=e.seek_start(i).u32()),e.seek_start(i+4);var o=e.u32();o>0&&(e.seek_start(o),r.push(Tn(e)))}return r}var Kn=n(4);function Qn(e){return new Kn.Vector3(e.x,e.y,e.z)}var Xn=new Kn.Vector3(0,1,0),Jn=new k(0,0);function $n(e,t,n,r,a,i,o){var s=n.length/3,l=(new Kn.Matrix3).getNormalMatrix(t),u=!0,c=!1,d=void 0;try{for(var p,h=e.vertices[Symbol.iterator]();!(u=(p=h.next()).done);u=!0){var _=p.value,m=_.position,f=_.normal,v=_.uv,w=Qn(m).applyMatrix4(t);n.push(w.x,w.y,w.z);var b=(f?Qn(f):Xn).applyMatrix3(l);r.push(b.x,b.y,b.z);var y=v||Jn;a.push(y.x,y.y)}}catch(U){c=!0,d=U}finally{try{u||null==h.return||h.return()}finally{if(c)throw d}}var k=0,g=!0,R=!1,j=void 0;try{for(var O,S=e.meshes[Symbol.iterator]();!(g=(O=S.next()).done);g=!0){for(var x=O.value,D=i.length,E=!0,C=2;C<x.indices.length;++C){var L=s+x.indices[C-2],B=s+x.indices[C-1],M=s+x.indices[C],F=new Kn.Vector3(n[3*L],n[3*L+1],n[3*L+2]),I=new Kn.Vector3(n[3*B],n[3*B+1],n[3*B+2]),z=new Kn.Vector3(n[3*M],n[3*M+1],n[3*M+2]),P=new Kn.Vector3(r[3*L],r[3*L+1],r[3*L+2]),G=new Kn.Vector3(r[3*L],r[3*L+1],r[3*L+2]),T=new Kn.Vector3(r[3*L],r[3*L+1],r[3*L+2]),A=I.clone().sub(F).cross(z.clone().sub(F));E&&A.negate(),(A.dot(P)<0?1:0)+(A.dot(G)<0?1:0)+(A.dot(T)<0?1:0)>=2&&(E=!E),E?(i.push(B),i.push(L),i.push(M)):(i.push(L),i.push(B),i.push(M)),E=!E}var W=o[o.length-1];null!=x.material_properties.texture_id&&(k=x.material_properties.texture_id+1),W&&W.material_index===k?W.count+=i.length-D:o.push({start:D,count:i.length-D,material_index:k})}}catch(U){R=!0,j=U}finally{try{g||null==S.return||S.return()}finally{if(R)throw j}}}var er,tr=[new Kn.MeshBasicMaterial({color:8437968,transparent:!0,opacity:.25,visible:!1}),new Kn.MeshLambertMaterial({color:10526880,side:Kn.DoubleSide}),new Kn.MeshLambertMaterial({color:5288048,side:Kn.DoubleSide}),new Kn.MeshLambertMaterial({color:6307968,side:Kn.DoubleSide})],nr=[new Kn.MeshBasicMaterial({color:9490656,wireframe:!0,transparent:!0,opacity:.3,visible:!1}),new Kn.MeshBasicMaterial({color:13684944,wireframe:!0}),new Kn.MeshBasicMaterial({color:8446112,wireframe:!0}),new Kn.MeshBasicMaterial({color:9466032,wireframe:!0})];function rr(e){var t=new Kn.Group,n=!0,r=!1,a=void 0;try{for(var i,o=e.meshes[Symbol.iterator]();!(n=(i=o.next()).done);n=!0){var s=i.value,l=new Kn.Geometry,u=!0,c=!1,d=void 0;try{for(var p,h=s.vertices[Symbol.iterator]();!(u=(p=h.next()).done);u=!0){var _=p.value,m=_.x,f=_.y,v=_.z;l.vertices.push(new Kn.Vector3(m,f,v))}}catch(C){c=!0,d=C}finally{try{u||null==h.return||h.return()}finally{if(c)throw d}}var w=!0,b=!1,y=void 0;try{for(var k,g=s.triangles[Symbol.iterator]();!(w=(k=g.next()).done);w=!0){var R=k.value,j=R.indices,O=R.flags,S=R.normal,x=64&O?3:16&O?2:1&O?1:0;l.faces.push(new Kn.Face3(j[0],j[1],j[2],new Kn.Vector3(S.x,S.y,S.z),void 0,x))}}catch(C){b=!0,y=C}finally{try{w||null==g.return||g.return()}finally{if(b)throw y}}var D=new Kn.Mesh(l,tr);D.renderOrder=1,t.add(D);var E=new Kn.Mesh(l,nr);E.renderOrder=2,t.add(E)}}catch(C){r=!0,a=C}finally{try{n||null==o.return||o.return()}finally{if(r)throw a}}return t}function ar(e,t,n){return _r(e,t,n,"collision")}function ir(e,t){return or.apply(this,arguments)}function or(){return(or=Object(Ge.a)(Pe.a.mark(function e(t,n){var r,a;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=mr(t,n),e.next=3,wr(r);case 3:return a=e.sent,e.abrupt("return",{url:r,data:a});case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function sr(e,t){return lr.apply(this,arguments)}function lr(){return(lr=Object(Ge.a)(Pe.a.mark(function e(t,n){var r,a;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=fr(t,n),e.next=3,wr(r);case 3:return a=e.sent,e.abrupt("return",{url:r,data:a});case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ur(e,t,n){return cr.apply(this,arguments)}function cr(){return(cr=Object(Ge.a)(Pe.a.mark(function e(t,n,r){return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wr(vr(t,n,r));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function dr(e){return pr.apply(this,arguments)}function pr(){return(pr=Object(Ge.a)(Pe.a.mark(function e(t){return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wr("/player/animation/animation_".concat(t.toString().padStart(3,"0"),".njm"));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}!function(e){e[e.Geometry=0]="Geometry",e[e.Texture=1]="Texture"}(er||(er={}));var hr=[[["city00_00",1],["forest01",1],["forest02",1],["cave01_",6],["cave02_",5],["cave03_",6],["machine01_",6],["machine02_",6],["ancient01_",5],["ancient02_",5],["ancient03_",5],["boss01",1],["boss02",1],["boss03",1],["darkfalz00",1]],[["labo00_00",1],["ruins01_",3],["ruins02_",3],["space01_",3],["space02_",3],["jungle01_00",1],["jungle02_00",1],["jungle03_00",1],["jungle04_",3],["jungle05_00",1],["seabed01_",3],["seabed02_",3],["boss05",1],["boss06",1],["boss07",1],["boss08",1],["jungle06_00",1],["jungle07_",5]],[],[["city02_00",1],["wilds01_00",1],["wilds01_01",1],["wilds01_02",1],["wilds01_03",1],["crater01_00",1],["desert01_",3],["desert02_",3],["desert03_",3],["boss09_00",1]]];function _r(e,t,n,r){try{return wr(function(e,t,n){var r=hr[e-1];if(0<=t&&t<r.length){var a=Object(Lt.a)(r[t],2),i=a[0],o=a[1];if(0<=n&&n<o){var s;if(1===o)s="";else for(s=String(n);s.length<2;)s="0"+s;return"/maps/map_".concat(i).concat(s)}throw new Error("Unknown variant ".concat(n," of area ").concat(t," in episode ").concat(e,"."))}throw new Error("Unknown episode ".concat(e," area ").concat(t,"."))}(e,t,n)+("render"===r?"n.rel":"c.rel"))}catch(a){return Promise.reject(a)}}function mr(e,t){switch(e){case I.Dubswitch:return"/npcs/".concat(e.code,".").concat(t===er.Geometry?"xj":"xvm");case I.Hildebear2:return mr(I.Hildebear,t);case I.Hildeblue2:return mr(I.Hildeblue,t);case I.RagRappy2:return mr(I.RagRappy,t);case I.Monest2:return mr(I.Monest,t);case I.PoisonLily2:return mr(I.PoisonLily,t);case I.NarLily2:return mr(I.NarLily,t);case I.GrassAssassin2:return mr(I.GrassAssassin,t);case I.Dimenian2:return mr(I.Dimenian,t);case I.LaDimenian2:return mr(I.LaDimenian,t);case I.SoDimenian2:return mr(I.SoDimenian,t);case I.DarkBelra2:return mr(I.DarkBelra,t);case I.SavageWolf2:return mr(I.SavageWolf,t);case I.BarbarousWolf2:return mr(I.BarbarousWolf,t);case I.PanArms2:return mr(I.PanArms,t);case I.Dubchic2:return mr(I.Dubchic,t);case I.Gilchic2:return mr(I.Gilchic,t);case I.Garanz2:return mr(I.Garanz,t);case I.Dubswitch2:return mr(I.Dubswitch,t);case I.Delsaber2:return mr(I.Delsaber,t);case I.ChaosSorcerer2:return mr(I.ChaosSorcerer,t);default:return"/npcs/".concat(e.code,".").concat(t===er.Geometry?"nj":"xvm")}}function fr(e,t){if(t!==er.Geometry)return"/objects/".concat(e.pso_id,".xvm");switch(e){case se.EasterEgg:case se.ChristmasTree:case se.ChristmasWreath:case se.TwentyFirstCentury:case se.Sonic:case se.WelcomeBoard:case se.FloatingJelifish:case se.RuinsSeal:case se.Dolphin:case se.Cacti:case se.BigBrownRock:case se.PoisonPlant:case se.BigBlackRocks:case se.FallingRock:case se.DesertFixedTypeBoxBreakableCrystals:case se.BeeHive:return"/objects/".concat(e.pso_id,".nj");default:return"/objects/".concat(e.pso_id,".xj")}}function vr(e,t,n){return"/player/".concat(e).concat(t).concat(null==n?"":n,".nj")}function wr(e){return fetch(""+e).then(function(e){return e.arrayBuffer()})}function br(e,t,n,r){var a,i=new De(e,t,n,[]),o=Array(r).fill(null).map(function(e,t){return new Ee(t,i)});return(a=i.area_variants).splice.apply(a,[0,0].concat(Object(Ct.a)(o))),i}var yr=new Map,kr=new Map,gr=new Map,Rr=new(function(){function e(){Object(d.a)(this,e),this.areas=void 0,this.areas=[];var t=0;this.areas[1]=[br(0,"Pioneer II",t++,1),br(1,"Forest 1",t++,1),br(2,"Forest 2",t++,1),br(11,"Under the Dome",t++,1),br(3,"Cave 1",t++,6),br(4,"Cave 2",t++,5),br(5,"Cave 3",t++,6),br(12,"Underground Channel",t++,1),br(6,"Mine 1",t++,6),br(7,"Mine 2",t++,6),br(13,"Monitor Room",t++,1),br(8,"Ruins 1",t++,5),br(9,"Ruins 2",t++,5),br(10,"Ruins 3",t++,5),br(14,"Dark Falz",t++,1),br(15,"BA Ruins",t++,3),br(16,"BA Spaceship",t++,3),br(17,"Lobby",t++,15)],t=0,this.areas[2]=[br(0,"Lab",t++,1),br(1,"VR Temple Alpha",t++,3),br(2,"VR Temple Beta",t++,3),br(14,"VR Temple Final",t++,1),br(3,"VR Spaceship Alpha",t++,3),br(4,"VR Spaceship Beta",t++,3),br(15,"VR Spaceship Final",t++,1),br(5,"Central Control Area",t++,1),br(6,"Jungle Area East",t++,1),br(7,"Jungle Area North",t++,1),br(8,"Mountain Area",t++,3),br(9,"Seaside Area",t++,1),br(12,"Cliffs of Gal Da Val",t++,1),br(10,"Seabed Upper Levels",t++,3),br(11,"Seabed Lower Levels",t++,3),br(13,"Test Subject Disposal Area",t++,1),br(16,"Seaside Area at Night",t++,1),br(17,"Control Tower",t++,5)],t=0,this.areas[4]=[br(0,"Pioneer II (Ep. IV)",t++,1),br(1,"Crater Route 1",t++,1),br(2,"Crater Route 2",t++,1),br(3,"Crater Route 3",t++,1),br(4,"Crater Route 4",t++,1),br(5,"Crater Interior",t++,1),br(6,"Subterranean Desert 1",t++,3),br(7,"Subterranean Desert 2",t++,3),br(8,"Subterranean Desert 3",t++,3),br(9,"Meteor Impact Site",t++,1)]}return Object(p.a)(e,[{key:"get_variant",value:function(e,t,n){if(1!==e&&2!==e&&4!==e)throw new Error("Expected episode to be 1, 2 or 4, got ".concat(e,"."));var r=this.areas[e].find(function(e){return e.id===t});if(!r)throw new Error("Area id ".concat(t," for episode ").concat(e," is invalid."));var a=r.area_variants[n];if(!a)throw new Error("Area variant id ".concat(n," for area ").concat(t," of episode ").concat(e," is invalid."));return a}},{key:"get_area_sections",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t,n,r){var a,i;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(t,"-").concat(n,"-").concat(r),(i=yr.get(a))||(this.load_area_sections_and_render_geometry(t,n,r),i=yr.get(a)),e.abrupt("return",i);case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"get_area_render_geometry",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t,n,r){var a,i;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a="".concat(t,"-").concat(n,"-").concat(r),(i=kr.get(a))||(this.load_area_sections_and_render_geometry(t,n,r),i=kr.get(a)),e.abrupt("return",i);case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"get_area_collision_geometry",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t,n,r){var a,i;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a=gr.get("".concat(t,"-").concat(n,"-").concat(r)))){e.next=5;break}return e.abrupt("return",a);case 5:return i=ar(t,n,r).then(function(e){return rr(En(new xn(e,_n.Little)))}),gr.set("".concat(n,"-").concat(r),i),e.abrupt("return",i);case 8:case"end":return e.stop()}},e)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"load_area_sections_and_render_geometry",value:function(e,t,n){var r=function(e,t,n){return _r(e,t,n,"render")}(e,t,n).then(function(e){return function(e){var t=[],n=new Kn.Group,r=!0,a=!1,i=void 0;try{for(var o,s=e.sections[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value,u=[],c=[],d=[],p=!0,h=!1,_=void 0;try{for(var m,f=l.models[Symbol.iterator]();!(p=(m=f.next()).done);p=!0)$n(m.value,new Kn.Matrix4,u,c,[],d,[])}catch(y){h=!0,_=y}finally{try{p||null==f.return||f.return()}finally{if(h)throw _}}var v=new Kn.BufferGeometry;v.addAttribute("position",new Kn.Float32BufferAttribute(u,3)),v.addAttribute("normal",new Kn.Float32BufferAttribute(c,3)),v.setIndex(new Kn.Uint16BufferAttribute(d,1));var w=new Kn.Mesh(v,new Kn.MeshLambertMaterial({color:4500223,transparent:!0,opacity:.75,side:Kn.DoubleSide}));w.position.set(l.position.x,l.position.y,l.position.z),w.rotation.set(l.rotation.x,l.rotation.y,l.rotation.z),n.add(w);var b=new Re(l.id,l.position,l.rotation.y);w.userData.section=b,t.push(b)}}catch(y){a=!0,i=y}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return[t,n]}(function(e){var t=[];e.seek_end(16);var n=Dn(e,!1).data_offset;e.seek_start(n),e.seek(8);var r=e.u32();e.seek(4);for(var a=e.u32(),i=0;i<r;i++){e.seek_start(a+52*i);var o=e.i32(),s=e.vec3_f32(),l=new g(e.u32()*Un,e.u32()*Un,e.u32()*Un);e.seek(4);var u=e.u32();e.seek(4);var c=e.u32(),d=Yn(e,u,c);t.push({id:o,position:s,rotation:l,models:d})}return{sections:t}}(new xn(e,_n.Little)))});yr.set("".concat(e,"-").concat(t,"-").concat(n),r.then(function(e){return Object(Lt.a)(e,1)[0]})),kr.set("".concat(e,"-").concat(t,"-").concat(n),r.then(function(e){return Object(Lt.a)(e,2)[1]}))}}]),e}()),jr=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.size;if(Object(d.a)(this,e),this._offset=void 0,this._size=void 0,this._position=void 0,this.little_endian=void 0,this.buffer=void 0,this.utf16_decoder=gn,this.utf16_encoder=On,r<0||r>t.size)throw new Error("Offset ".concat(r," is out of bounds."));if(a<0||r+a>t.size)throw new Error("Size ".concat(a," is out of bounds."));this.buffer=t,this.endianness=n,this._offset=r,this._size=a,this._position=0}return Object(p.a)(e,[{key:"offset",get:function(){return this._offset}},{key:"size",get:function(){return this._size}},{key:"position",get:function(){return this._position}},{key:"endianness",get:function(){return this.little_endian?_n.Little:_n.Big},set:function(e){this.little_endian=e===_n.Little,this.utf16_decoder=this.little_endian?Rn:gn,this.utf16_encoder=this.little_endian?Sn:On}},{key:"bytes_left",get:function(){return this.size-this.position}},{key:"dv",get:function(){return this.buffer.view}}]),Object(p.a)(e,[{key:"seek",value:function(e){return this.seek_start(this.position+e)}},{key:"seek_start",value:function(e){if(e<0||e>this.size)throw new Error("Offset ".concat(e," is out of bounds."));return this._position=e,this}},{key:"seek_end",value:function(e){if(e<0||e>this.size)throw new Error("Offset ".concat(e," is out of bounds."));return this._position=this.size-e,this}},{key:"u8",value:function(){return this.u8_at(this._position++)}},{key:"u8_at",value:function(e){return this.check_offset(e,1),this.dv.getUint8(this.offset+e)}},{key:"u16",value:function(){var e=this.u16_at(this.position);return this._position+=2,e}},{key:"u16_at",value:function(e){return this.check_offset(e,2),this.dv.getUint16(this.offset+e,this.little_endian)}},{key:"u32",value:function(){var e=this.u32_at(this.position);return this._position+=4,e}},{key:"u32_at",value:function(e){return this.check_offset(e,4),this.dv.getUint32(this.offset+e,this.little_endian)}},{key:"i8",value:function(){return this.i8_at(this._position++)}},{key:"i8_at",value:function(e){return this.check_offset(e,1),this.dv.getInt8(this.offset+e)}},{key:"i16",value:function(){var e=this.i16_at(this.position);return this._position+=2,e}},{key:"i16_at",value:function(e){return this.check_offset(e,2),this.dv.getInt16(this.offset+e,this.little_endian)}},{key:"i32",value:function(){var e=this.i32_at(this.position);return this._position+=4,e}},{key:"i32_at",value:function(e){return this.check_offset(e,4),this.dv.getInt32(this.offset+e,this.little_endian)}},{key:"f32",value:function(){var e=this.f32_at(this.position);return this._position+=4,e}},{key:"f32_at",value:function(e){return this.check_offset(e,4),this.dv.getFloat32(this.offset+e,this.little_endian)}},{key:"u8_array",value:function(e){this.check_size("n",e,e);for(var t=[],n=0;n<e;++n)t.push(this.dv.getUint8(this.offset+this._position++));return t}},{key:"u16_array",value:function(e){this.check_size("n",e,2*e);for(var t=[],n=0;n<e;++n)t.push(this.dv.getUint16(this.offset+this.position,this.little_endian)),this._position+=2;return t}},{key:"u32_array",value:function(e){this.check_size("n",e,4*e);for(var t=[],n=0;n<e;++n)t.push(this.dv.getUint32(this.offset+this.position,this.little_endian)),this._position+=4;return t}},{key:"vec2_f32",value:function(){return new k(this.f32(),this.f32())}},{key:"vec3_f32",value:function(){return new g(this.f32(),this.f32(),this.f32())}},{key:"take",value:function(t){this.check_size("size",t,t);var n=this.offset+this.position,r=new e(this.buffer,this.endianness,n,t);return this._position+=t,r}},{key:"string_ascii",value:function(e,t,n){this.check_size("max_byte_length",e,e);var r=t?this.index_of_u8(0,e)-this.position:e,a=this.buffer.sub_view(this.offset+this.position,r),i=kn.decode(a);return this._position+=n?e:Math.min(r+1,e),i}},{key:"string_utf16",value:function(e,t,n){this.check_size("max_byte_length",e,e);var r=t?this.index_of_u16(0,e)-this.position:2*Math.floor(e/2),a=this.buffer.sub_view(this.offset+this.position,r),i=this.utf16_decoder.decode(a);return this._position+=n?e:Math.min(r+2,e),i}},{key:"array_buffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.size-this.position;this.check_size("size",e,e);var t=this.buffer.backing_buffer.slice(this.offset+this.position,this.offset+this.position+e);return this._position+=e,t}},{key:"copy_to_uint8_array",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size-this.position;return this.check_size("size",t,t),e.set(new Uint8Array(this.buffer.backing_buffer,this.offset+this.position,t)),this._position+=t,this}},{key:"check_size",value:function(e,t,n){if(n<0||n>this.size-this.position)throw new Error("".concat(e," ").concat(t," is out of bounds."))}},{key:"check_offset",value:function(e,t){if(e<0||e+t>this.size)throw new Error("Offset ".concat(e," is out of bounds."))}},{key:"index_of_u8",value:function(e,t){for(var n=Math.min(this.position+t,this.size),r=this.position;r<n;++r)if(this.dv.getUint8(r)===e)return r;return this.position+t}},{key:"index_of_u16",value:function(e,t){for(var n=Math.min(this.position+t,this.size),r=this.position;r<n;r+=2)if(this.dv.getUint16(r,this.little_endian)===e)return r;return this.position+t}}]),e}(),Or=function(e){function t(){return Object(d.a)(this,t),Object(h.a)(this,Object(_.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(p.a)(t,[{key:"write_u8",value:function(e){return this.ensure_size(1),this.dv.setUint8(this._position++,e),this}},{key:"write_u16",value:function(e){return this.ensure_size(2),this.dv.setUint16(this.position,e,this.little_endian),this._position+=2,this}},{key:"write_u32",value:function(e){return this.ensure_size(4),this.dv.setUint32(this.position,e,this.little_endian),this._position+=4,this}},{key:"write_i32",value:function(e){return this.ensure_size(4),this.dv.setInt32(this.position,e,this.little_endian),this._position+=4,this}},{key:"write_f32",value:function(e){return this.ensure_size(4),this.dv.setFloat32(this.position,e,this.little_endian),this._position+=4,this}},{key:"write_u8_array",value:function(e){return this.ensure_size(e.length),new Uint8Array(this.buffer.backing_buffer,this.offset+this.position).set(new Uint8Array(e)),this._position+=e.length,this}},{key:"write_cursor",value:function(e){var t=e.size-e.position;return this.ensure_size(t),e.copy_to_uint8_array(new Uint8Array(this.buffer.backing_buffer,this.offset+this.position,t),t),this._position+=t,this}},{key:"write_string_ascii",value:function(e,t){this.ensure_size(t);var n=0,r=!0,a=!1,i=void 0;try{for(var o,s=jn.encode(e)[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;n<t&&(this.write_u8(l),++n)}}catch(u){a=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}for(;n<t;)this.write_u8(0),++n;return this}},{key:"ensure_size",value:function(e){var t=this.position+e-this._size;t>0&&(this._size+=t,this.buffer.size<this.offset+this._size&&(this.buffer.size=this.offset+this._size))}},{key:"size",get:function(){return this._size},set:function(e){e>this._size?this.ensure_size(e-this._size):this._size=e}}]),t}(jr),Sr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8192;Object(d.a)(this,e),this._size=0,this._buffer=void 0,this._data_view=void 0,this._buffer=new ArrayBuffer(t),this._data_view=new DataView(this._buffer)}return Object(p.a)(e,[{key:"size",get:function(){return this._size},set:function(e){if(e<0)throw new Error("Size should be non-negative.");this.ensure_capacity(e),this._size=e}},{key:"capacity",get:function(){return this._buffer.byteLength}},{key:"backing_buffer",get:function(){return this._buffer}},{key:"view",get:function(){return this._data_view}}]),Object(p.a)(e,[{key:"sub_view",value:function(e,t){return new DataView(this._buffer,e,t)}},{key:"ensure_capacity",value:function(e){if(e>this.capacity){var t=this.capacity||e;do{t*=2}while(t<e);var n=new ArrayBuffer(t);new Uint8Array(n).set(new Uint8Array(this._buffer,0,this.size)),this._buffer=n,this._data_view=new DataView(this._buffer)}}}]),e}();function xr(e){var t=new Lr(e),n=new Br;if(t.src.size<=3)for(;t.src.bytes_left;)t.set_bit(1),t.copy_literal();else{for(n.put(n.hash(t.src),0),t.src.seek(1),n.put(n.hash(t.src),1),t.src.seek(-1),t.set_bit(1),t.copy_literal(),t.set_bit(1),t.copy_literal();t.src.bytes_left>1;){var r=t.find_longest_match(n,!1),a=Object(Lt.a)(r,2),i=a[0],o=a[1];if(o>0){t.src.seek(1);var s=t.find_longest_match(n,!0),l=Object(Lt.a)(s,2),u=l[0],c=l[1];if(t.src.seek(-1),c>o){var d=!0;if(o>=2&&o<=5&&u<i&&i>=-256&&u<-256&&c-o<3&&(d=!1),d){t.set_bit(1),t.copy_literal();continue}}if(o>=2&&o<=5&&i>=-256){t.set_bit(0),t.set_bit(0),t.set_bit(o-2&2),t.set_bit(o-2&1),t.write_literal(255&i),t.add_intermediates(n,o);continue}if(o>=3&&o<=9){t.set_bit(0),t.set_bit(1),t.write_literal((31&i)<<3|o-2&7),t.write_literal(i>>5),t.add_intermediates(n,o);continue}if(o>9){o>256&&(o=256),t.set_bit(0),t.set_bit(1),t.write_literal((31&i)<<3),t.write_literal(i>>5),t.write_literal(o-1),t.add_intermediates(n,o);continue}}t.set_bit(1),t.copy_literal()}t.src.bytes_left&&(t.set_bit(1),t.copy_literal())}return t.write_eof(),t.dst.seek_start(0)}var Dr=8192,Er=Dr-1,Cr=256,Lr=function(){function e(t){Object(d.a)(this,e),this.src=void 0,this.dst=void 0,this.flags=void 0,this.flag_bits_left=void 0,this.flag_offset=void 0,this.src=t,this.dst=new Or(new Sr(t.size),t.endianness),this.flags=0,this.flag_bits_left=0,this.flag_offset=0}return Object(p.a)(e,[{key:"set_bit",value:function(e){if(!this.flag_bits_left--){var t=this.dst.position;this.dst.seek_start(this.flag_offset).write_u8(this.flags).seek_start(t).write_u8(0),this.flag_offset=t,this.flag_bits_left=7}this.flags>>>=1,e&&(this.flags|=128)}},{key:"copy_literal",value:function(){this.dst.write_u8(this.src.u8())}},{key:"write_literal",value:function(e){this.dst.write_u8(e)}},{key:"write_final_flags",value:function(){this.flags>>>=this.flag_bits_left;var e=this.dst.position;this.dst.seek_start(this.flag_offset).write_u8(this.flags).seek_start(e)}},{key:"write_eof",value:function(){this.set_bit(0),this.set_bit(1),this.write_final_flags(),this.write_literal(0),this.write_literal(0)}},{key:"match_length",value:function(e){for(var t=0,n=this.src.position,r=this.src.size;n<r&&this.src.u8_at(n)===this.src.u8_at(e);)++t,++n,++e;return t}},{key:"find_longest_match",value:function(e,t){if(!this.src.bytes_left)return[0,0];var n=e.hash(this.src),r=e.get(n);if(null===r)return t||e.put(n,this.src.position),[0,0];if(this.src.position-r>Dr)return e.hash_to_offset[n]=null,t||e.put(n,this.src.position),[0,0];for(var a=0,i=0;null!=r;){var o=this.match_length(r);(o>a||o>=256)&&(a=o,i=r);var s=e.prev(r);null!==s&&this.src.position-s>Dr&&(e.set_prev(r,null),s=null),r=s}return t||e.put(n,this.src.position),[a>0?i-this.src.position:0,a]}},{key:"add_intermediates",value:function(e,t){this.src.seek(1);for(var n=1;n<t;++n){var r=e.hash(this.src);e.put(r,this.src.position),this.src.seek(1)}}}]),e}(),Br=function(){function e(){Object(d.a)(this,e),this.hash_to_offset=new Array(Cr).fill(null),this.masked_offset_to_prev=new Array(Dr).fill(null)}return Object(p.a)(e,[{key:"hash",value:function(e){var t=e.u8();return e.bytes_left&&(t^=e.u8(),e.seek(-1)),e.seek(-1),t}},{key:"get",value:function(e){return this.hash_to_offset[e]}},{key:"put",value:function(e,t){this.set_prev(t,this.hash_to_offset[e]),this.hash_to_offset[e]=t}},{key:"prev",value:function(e){return this.masked_offset_to_prev[e&Er]}},{key:"set_prev",value:function(e,t){this.masked_offset_to_prev[e&Er]=t}}]),e}(),Mr=l.a.get("data_formats/compression/prs/decompress");function Fr(e){for(var t=new Ir(e);;)if(1===t.read_flag_bit())t.copy_u8();else{var n=void 0,r=void 0;if(0===t.read_flag_bit())n=t.read_flag_bit()<<1,n|=t.read_flag_bit(),n+=2,r=t.read_u8()-256;else{if(0===(r=t.read_u16()))break;n=7&r,r>>>=3,0===n?(n=t.read_u8(),n+=1):n+=2,r-=8192}t.offset_copy(r,n)}return t.dst.seek_start(0)}var Ir=function(){function e(t){Object(d.a)(this,e),this.src=void 0,this.dst=void 0,this.flags=void 0,this.flag_bits_left=void 0,this.src=t,this.dst=new Or(new Sr(Math.floor(1.5*t.size)),t.endianness),this.flags=0,this.flag_bits_left=0}return Object(p.a)(e,[{key:"read_flag_bit",value:function(){0===this.flag_bits_left&&(this.flags=this.read_u8(),this.flag_bits_left=8);var e=1&this.flags;return this.flags>>>=1,this.flag_bits_left-=1,e}},{key:"copy_u8",value:function(){this.dst.write_u8(this.read_u8())}},{key:"read_u8",value:function(){return this.src.u8()}},{key:"read_u16",value:function(){return this.src.u16()}},{key:"offset_copy",value:function(e,t){(e<-8192||e>0)&&Mr.error("offset was ".concat(e,", should be between -8192 and 0.")),(t<1||t>256)&&Mr.error("length was ".concat(t,", should be between 1 and 256."));var n=Math.min(-e,t);this.dst.seek(e);var r=this.dst.take(n);this.dst.seek(-e-n);for(var a=0;a<Math.floor(t/n);++a)this.dst.write_cursor(r),r.seek_start(0);this.dst.write_cursor(r.take(t%n))}}]),e}(),zr=l.a.get("data_formats/parsing/quest/bin");function Pr(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.u32(),r=e.u32(),a=e.u32();e.seek(4);var i=e.u32(),o=e.u32(),s=e.string_utf16(64,!0,!0),l=e.string_utf16(256,!0,!0),u=e.string_utf16(576,!0,!0);a!==e.size&&zr.warn("Value ".concat(a," in bin size field does not match actual size ").concat(e.size,"."));var c=Math.floor((e.size-r)/4);e.seek_start(r);for(var d=[],p=0;p<c;++p)d.push(e.i32());return{quest_id:i,language:o,quest_name:s,short_description:l,long_description:u,function_offsets:d,instructions:function(e,t){var n=[];try{for(;e.bytes_left;){var r=e.u8(),a=void 0,i=void 0,o=void 0;switch(r){case 248:a=e.u8(),i=2,o=Ar;break;case 249:a=e.u8(),i=2,o=Wr;break;default:a=r,i=1,o=Tr}var s=Object(Lt.a)(o[a],3),l=s[1],u=s[2];if(null==u){var c=r;248!==r&&249!==r||(c=c<<8|a),zr.warn("Parameters unknown for opcode 0x".concat(c.toString(16).toUpperCase(),", assuming 0.")),n.push({opcode:a,mnemonic:l,args:[],size:i})}else try{var d=Gr(e,u);n.push({opcode:a,mnemonic:l,args:d.args,size:i+d.size})}catch(p){n.push({opcode:a,mnemonic:l,args:[],size:i})}}}catch(p){if(!t)throw p;zr.error("Couldn't fully parse object code.",p)}return n}(e.seek_start(n).take(r-n),t),data:e.seek_start(0).array_buffer()}}function Gr(e,t){var n,r=e.position,a=[];e:for(var i=0;i<t.length;++i)switch(t.charAt(i)){case"p":break;case"a":break e;case"B":a.push(e.u8());break;case"W":a.push(e.u16());break;case"L":a.push(e.u32());break;case"I":a.push(e.i32());break;case"f":case"F":a.push(e.f32());break;case"R":case"r":e.seek(1);break;case"b":a.push(e.u8());break;case"w":a.push(e.u16());break;case"l":a.push(e.u32());break;case"i":a.push(e.i32());break;case"j":case"J":n=2*e.u8(),e.seek(n);break;case"t":case"T":n=e.u8(),e.seek(n);break;case"s":case"S":for(;e.u16(););break;default:throw new Error("Unknown mask part ".concat(t.charAt(i),"."))}return{args:a,size:e.position-r}}var Tr=[[0,"nop",""],[1,"ret",""],[2,"sync",""],[3,"exit","aL"],[4,"thread","W"],[5,"va_start",""],[6,"va_end",""],[7,"va_call","W"],[8,"let","RR"],[9,"leti","RI"],[10,"unknown",null],[11,"unknown",null],[12,"unknown",null],[13,"unknown",null],[14,"unknown",null],[15,"unknown",null],[16,"set","R"],[17,"clear","R"],[18,"rev","R"],[19,"gset","w"],[20,"gclear","w"],[21,"grev","w"],[22,"glet","w"],[23,"gget","wR"],[24,"add","RR"],[25,"addi","RI"],[26,"sub","RR"],[27,"subi","RI"],[28,"mul","RR"],[29,"muli","RI"],[30,"div","RR"],[31,"divi","RI"],[32,"and","RR"],[33,"andi","RI"],[34,"or","RR"],[35,"ori","RI"],[36,"xor","RR"],[37,"xori","RI"],[38,"mod","RR"],[39,"modi","RI"],[40,"jmp","W"],[41,"call","W"],[42,"jmp_on","Wt"],[43,"jmp_off","Wt"],[44,"jmp_=","RRW"],[45,"jmpi_=","RIW"],[46,"jmp_!=","RRW"],[47,"jmpi_!=","RIW"],[48,"ujmp_>","RRW"],[49,"ujmpi_>","RLW"],[50,"jmp_>","RRW"],[51,"jmpi_>","RIW"],[52,"ujmp_<","RRW"],[53,"ujmpi_<","RLW"],[54,"jmp_<","RRW"],[55,"jmpi_<","RIW"],[56,"ujmp_>=","RRW"],[57,"ujmpi_>=","RLW"],[58,"jmp_>=","RRW"],[59,"jmpi_>=","RIW"],[60,"ujmp_<=","RRW"],[61,"ujmpi_<=","RLW"],[62,"jmp_<=","RRW"],[63,"jmpi_<=","RIW"],[64,"switch_jmp","Rj"],[65,"switch_call","Rj"],[66,"stack_push","R"],[67,"stack_pop","R"],[68,"stack_pushm","RL"],[69,"stack_popm","RL"],[70,"unknown",null],[71,"unknown",null],[72,"arg_pushr","pR"],[73,"arg_pushl","pI"],[74,"arg_pushb","pB"],[75,"arg_pushw","pW"],[76,"unknown",null],[77,"unknown",null],[78,"arg_pushs","ps"],[79,"unknown4F","RR"],[80,"message","aLs"],[81,"list","aRs"],[82,"fadein",""],[83,"fadeout",""],[84,"se","aL"],[85,"bgm","aL"],[86,"unknown",null],[87,"unknown",null],[88,"enable","aL"],[89,"disable","aL"],[90,"window_msg","as"],[91,"add_msg","as"],[92,"mesend",""],[93,"gettime","R"],[94,"winend",""],[95,"unknown",null],[96,"npc_crt_V3","R"],[97,"npc_stop","aR"],[98,"npc_play","aL"],[99,"npc_kill","aR"],[100,"npc_nont",""],[101,"npc_talk",""],[102,"npc_crp_V3","R"],[103,"unknown",null],[104,"create_pipe","aL"],[105,"p_hpstat_V3","aRL"],[106,"p_dead_V3","aRL"],[107,"p_disablewarp",""],[108,"p_enablewarp",""],[109,"p_move_V3","R"],[110,"p_look","aL"],[111,"unknown",null],[112,"p_action_disable",""],[113,"p_action_enable",""],[114,"disable_movement1","aR"],[115,"enable_movement1","aR"],[116,"p_noncol",""],[117,"p_col",""],[118,"p_setpos","aRR"],[119,"p_return_guild",""],[120,"p_talk_guild","aL"],[121,"npc_talk_pl_V3","R"],[122,"npc_talk_kill","aL"],[123,"npc_crtpk_V3","R"],[124,"npc_crppk_V3","R"],[125,"npc_crptalk_v3","R"],[126,"p_look_at_V1","aLL"],[127,"npc_crp_id_V3","R"],[128,"cam_quake",""],[129,"cam_adj",""],[130,"cam_zmin",""],[131,"cam_zmout",""],[132,"cam_pan_V3","R"],[133,"game_lev_super",""],[134,"game_lev_reset",""],[135,"pos_pipe_V3","R"],[136,"if_zone_clear","RR"],[137,"chk_ene_num","R"],[138,"unhide_obj","R"],[139,"unhide_ene","R"],[140,"at_coords_call","R"],[141,"at_coords_talk","R"],[142,"col_npcin","R"],[143,"col_npcinr","R"],[144,"switch_on","aL"],[145,"switch_off","aL"],[146,"playbgm_epi","aL"],[147,"set_mainwarp","aL"],[148,"set_obj_param","RR"],[149,"set_floor_handler","aLW"],[150,"clr_floor_handler","aL"],[151,"col_plinaw","R"],[152,"hud_hide",""],[153,"hud_show",""],[154,"cine_enable",""],[155,"cine_disable",""],[156,"unknown",null],[157,"unknown",null],[158,"unknown",null],[159,"unknown",null],[160,"unknown",null],[161,"set_qt_failure","W"],[162,"set_qt_success","W"],[163,"clr_qt_failure",""],[164,"clr_qt_success",""],[165,"set_qt_cancel","W"],[166,"clr_qt_cancel",""],[167,"unknown",null],[168,"pl_walk_V3","R"],[169,"unknown",null],[170,"unknown",null],[171,"unknown",null],[172,"unknown",null],[173,"unknown",null],[174,"unknown",null],[175,"unknown",null],[176,"pl_add_meseta","aLL"],[177,"thread_stg","W"],[178,"del_obj_param","R"],[179,"item_create","RR"],[180,"item_create2","RR"],[181,"item_delete","RR"],[182,"item_delete2","RR"],[183,"item_check","RR"],[184,"setevt","aL"],[185,"get_difflvl","R"],[186,"set_qt_exit","W"],[187,"clr_qt_exit",""],[188,"unknown",null],[189,"unknown",null],[190,"unknown",null],[191,"unknown",null],[192,"particle_V3","R"],[193,"npc_text","aLs"],[194,"npc_chkwarp",""],[195,"pl_pkoff",""],[196,"map_designate","R"],[197,"masterkey_on",""],[198,"masterkey_off",""],[199,"window_time",""],[200,"winend_time",""],[201,"winset_time","R"],[202,"getmtime","R"],[203,"set_quest_board_handler","aLWs"],[204,"clear_quest_board_handler","aL"],[205,"particle_id_V3","R"],[206,"npc_crptalk_id_V3","R"],[207,"npc_lang_clean",""],[208,"pl_pkon",""],[209,"pl_chk_item2","RR"],[210,"enable_mainmenu",""],[211,"disable_mainmenu",""],[212,"start_battlebgm",""],[213,"end_battlebgm",""],[214,"disp_msg_qb","as"],[215,"close_msg_qb",""],[216,"set_eventflag_v3","aLL"],[217,"sync_leti",null],[218,"set_returnhunter",""],[219,"set_returncity",""],[220,"load_pvr",""],[221,"load_midi",""],[222,"unknown",null],[223,"npc_param_V3","aRL"],[224,"pad_dragon",""],[225,"clear_mainwarp","aL"],[226,"pcam_param_V3","R"],[227,"start_setevt_v3","aRL"],[228,"warp_on",""],[229,"warp_off",""],[230,"get_slotnumber","R"],[231,"get_servernumber","R"],[232,"set_eventflag2","aLR"],[233,"res","RR"],[234,"unknownEA","RL"],[235,"enable_bgmctrl","aL"],[236,"sw_send","R"],[237,"create_bgmctrl",""],[238,"pl_add_meseta2","aL"],[239,"sync_register","aRL"],[240,"send_regwork",null],[241,"leti_fixed_camera_V3","R"],[242,"default_camera_pos1",""],[243,"unknown",null],[244,"unknown",null],[245,"unknown",null],[246,"unknown",null],[247,"unknown",null],[248,"unknownF8","R"],[249,"unknown",null],[250,"get_gc_number","R"],[251,"unknownFB","W"],[252,"unknown",null],[253,"unknown",null],[254,"unknown",null],[255,"unknownFF",""]],Ar=[[0,"unknown",null],[1,"set_chat_callback?","aRs"],[2,"unknown",null],[3,"unknown",null],[4,"unknown",null],[5,"unknown",null],[6,"unknown",null],[7,"unknown",null],[8,"get_difficulty_level2","R"],[9,"get_number_of_player1","R"],[10,"get_coord_of_player","RR"],[11,"unknownF80B",""],[12,"unknownF80C",""],[13,"map_designate_ex","R"],[14,"unknownF80E","aL"],[15,"unknownF80F","aL"],[16,"ba_initial_floor","aL"],[17,"set_ba_rules",""],[18,"unknownF812","aL"],[19,"unknownF813","aL"],[20,"unknownF814","aL"],[21,"unknownF815","aL"],[22,"unknownF816","aL"],[23,"unknownF817","aL"],[24,"unknownF818","aL"],[25,"unknownF819","aL"],[26,"unknownF81A","aL"],[27,"unknownF81B","aL"],[28,"ba_disp_msg","as"],[29,"death_lvl_up","aL"],[30,"death_tech_lvl_up","aL"],[31,"unknown",null],[32,"cmode_stage","aL"],[33,"unknown",null],[34,"unknown",null],[35,"unknownF823","aL"],[36,"unknownF824","aL"],[37,"exp_multiplication","R"],[38,"exp_division?","R"],[39,"get_user_is_dead?","R"],[40,"go_floor","RR"],[41,"unknown",null],[42,"unknown",null],[43,"unlock_door2","aLL"],[44,"lock_door2","aLL"],[45,"if_switch_not_pressed","R"],[46,"if_switch_pressed","R"],[47,"unknownF82F","aLL"],[48,"control_dragon","R"],[49,"release_dragon",""],[50,"unknown",null],[51,"unknown",null],[52,"unknown",null],[53,"unknown",null],[54,"unknown",null],[55,"unknown",null],[56,"shrink","R"],[57,"unshrink","R"],[58,"unknown",null],[59,"unknown",null],[60,"display_clock2?","R"],[61,"unknownF83D","aL"],[62,"delete_area_title?","aL"],[63,"unknown",null],[64,"load_npc_data",""],[65,"get_npc_data","W"],[66,"unknown",null],[67,"unknown",null],[68,"unknown",null],[69,"unknown",null],[70,"unknown",null],[71,"unknown",null],[72,"give_damage_score","R"],[73,"take_damage_score","R"],[74,"unk_score_F84A","R"],[75,"unk_score_F84B","R"],[76,"kill_score","R"],[77,"death_score","R"],[78,"unk_score_F84E","R"],[79,"enemy_death_score","R"],[80,"meseta_score","R"],[81,"unknownF851","R"],[82,"unknownF852","aL"],[83,"reverse_warps",""],[84,"unreverse_warps",""],[85,"set_ult_map",""],[86,"unset_ult_map",""],[87,"set_area_title","as"],[88,"unknownF858",""],[89,"unknown",null],[90,"equip_item","R"],[91,"unequip_item","aLL"],[92,"unknown",null],[93,"unknown",null],[94,"unknownF85E","aL"],[95,"unknownF85F","aL"],[96,"unknownF860",""],[97,"unknownF861","aL"],[98,"unknown",null],[99,"unknown",null],[100,"cmode_rank","aLs"],[101,"award_item_name?",""],[102,"award_item_select?",""],[103,"award_item_give_to?","R"],[104,"unknownF868","RR"],[105,"unknownF869","RR"],[106,"item_create_cmode","RR"],[107,"unknownF86B","R"],[108,"award_item_ok?","R"],[109,"unknownF86D",""],[110,"unknownF86E",""],[111,"ba_set_lives","aL"],[112,"ba_set_tech_lvl","aL"],[113,"ba_set_lvl","aL"],[114,"ba_set_time_limit","aL"],[115,"boss_is_dead?","R"],[116,"unknown",null],[117,"unknown",null],[118,"unknown",null],[119,"enable_techs","R"],[120,"disable_techs","R"],[121,"get_gender","RR"],[122,"get_chara_class","RR"],[123,"take_slot_meseta","RR"],[124,"unknown",null],[125,"unknown",null],[126,"unknown",null],[127,"read_guildcard_flag","RR"],[128,"unknownF880","R"],[129,"get_pl_name?","R"],[130,"unknown",null],[131,"unknownF883","RR"],[132,"unknown",null],[133,"unknown",null],[134,"unknown",null],[135,"unknown",null],[136,"ba_close_msg",""],[137,"unknown",null],[138,"get_player_status","RR"],[139,"send_mail","aRs"],[140,"online_check","R"],[141,"chl_set_timerecord?","R"],[142,"chl_get_timerecord?","R"],[143,"unknownF88F","R"],[144,"unknownF890",""],[145,"load_enemy_data","aL"],[146,"get_physical_data","W"],[147,"get_attack_data","W"],[148,"get_resist_data","W"],[149,"get_movement_data","W"],[150,"unknown",null],[151,"unknown",null],[152,"shift_left","RR"],[153,"shift_right","RR"],[154,"get_random","RR"],[155,"reset_map",""],[156,"disp_chl_retry_menu","R"],[157,"chl_reverser?",""],[158,"unknownF89E","aL"],[159,"unknownF89F","R"],[160,"unknownF8A0",""],[161,"unknownF8A1",""],[162,"unknown",null],[163,"unknown",null],[164,"unknown",null],[165,"unknown",null],[166,"unknown",null],[167,"unknown",null],[168,"unknownF8A8","aL"],[169,"unknownF8A9","R"],[170,"unknown",null],[171,"unknown",null],[172,"unknown",null],[173,"get_number_of_player2","R"],[174,"unknown",null],[175,"unknown",null],[176,"unknown",null],[177,"unknown",null],[178,"unknown",null],[179,"unknown",null],[180,"unknown",null],[181,"unknown",null],[182,"unknown",null],[183,"unknown",null],[184,"unknownF8B8",""],[185,"chl_recovery?",""],[186,"unknown",null],[187,"unknown",null],[188,"set_episode","L"],[189,"unknown",null],[190,"unknown",null],[191,"unknown",null],[192,"file_dl_req","aLs"],[193,"get_dl_status","R"],[194,"gba_unknown4?",""],[195,"get_gba_state?","R"],[196,"unknownF8C4","R"],[197,"unknownF8C5","R"],[198,"QEXIT",""],[199,"use_animation","RR"],[200,"stop_animation","R"],[201,"run_to_coord","RR"],[202,"set_slot_invincible","RR"],[203,"unknownF8CB","R"],[204,"set_slot_poison","R"],[205,"set_slot_paralyze","R"],[206,"set_slot_shock","R"],[207,"set_slot_freeze","R"],[208,"set_slot_slow","R"],[209,"set_slot_confuse","R"],[210,"set_slot_shifta","R"],[211,"set_slot_deband","R"],[212,"set_slot_jellen","R"],[213,"set_slot_zalure","R"],[214,"fleti_fixed_camera","aR"],[215,"fleti_locked_camera","aLR"],[216,"default_camera_pos2",""],[217,"set_motion_blur",""],[218,"set_screen_b&w",""],[219,"unknownF8DB","aLLLLRW"],[220,"NPC_action_string","RRW"],[221,"get_pad_cond","RR"],[222,"get_button_cond","RR"],[223,"freeze_enemies",""],[224,"unfreeze_enemies",""],[225,"freeze_everything",""],[226,"unfreeze_everything",""],[227,"restore_hp","R"],[228,"restore_tp","R"],[229,"close_chat_bubble","R"],[230,"unknownF8E6","RR"],[231,"unknownF8E7","RR"],[232,"unknownF8E8","RR"],[233,"unknownF8E9","RR"],[234,"unknownF8EA","RR"],[235,"unknownF8EB","RR"],[236,"unknownF8EC","RR"],[237,"animation_check","RR"],[238,"call_image_data","aLW"],[239,"unknownF8EF",""],[240,"turn_off_bgm_p2",""],[241,"turn_on_bgm_p2",""],[242,"load_unk_data","aLLLLRW"],[243,"particle2","aRLf"],[244,"unknown",null],[245,"unknown",null],[246,"unknown",null],[247,"unknown",null],[248,"unknown",null],[249,"unknown",null],[250,"unknown",null],[251,"unknown",null],[252,"unknown",null],[253,"unknown",null],[254,"unknown",null],[255,"unknown",null]],Wr=[[0,"unknown",null],[1,"dec2float","RR"],[2,"float2dec","RR"],[3,"flet","RR"],[4,"fleti","RF"],[5,"unknown",null],[6,"unknown",null],[7,"unknown",null],[8,"fadd","RR"],[9,"faddi","RF"],[10,"fsub","RR"],[11,"fsubi","RF"],[12,"fmul","RR"],[13,"fmuli","RF"],[14,"fdiv","RR"],[15,"fdivi","RF"],[16,"get_unknown_count?","aLR"],[17,"get_stackable_item_count","RR"],[18,"freeze_and_hide_equip",""],[19,"thaw_and_show_equip",""],[20,"set_paletteX_callback","aRW"],[21,"activate_paletteX","aR"],[22,"enable_paletteX","aR"],[23,"restore_paletteX","aL"],[24,"disable_paletteX","aL"],[25,"get_paletteX_activated","aLR"],[26,"get_unknown_paletteX_status?","aLR"],[27,"disable_movement2","aR"],[28,"enable_movement2","aR"],[29,"get_time_played","R"],[30,"get_guildcard_total","R"],[31,"get_slot_meseta","R"],[32,"get_player_level","aLR"],[33,"get_Section_ID","aLR"],[34,"get_player_hp","aRR"],[35,"get_floor_number","aRR"],[36,"get_coord_player_detect","RR"],[37,"read_global_flag","abR"],[38,"write_global_flag","abR"],[39,"unknownF927","RR"],[40,"floor_player_detect","R"],[41,"read_disk_file?","as"],[42,"open_pack_select",""],[43,"item_select","R"],[44,"get_item_id","R"],[45,"color_change","aRRRRR"],[46,"send_statistic?","aLLLLLLLL"],[47,"unknownF92F","aLL"],[48,"chat_box","aLLLLLs"],[49,"chat_bubble","aLs"],[50,"unknown",null],[51,"unknownF933","R"],[52,"scroll_text","aLLLLLfRs"],[53,"gba_unknown1",""],[54,"gba_unknown2",""],[55,"gba_unknown3",""],[56,"add_damage_to?","aLL"],[57,"item_delete2","aL"],[58,"get_item_info","aLR"],[59,"item_packing1","aL"],[60,"item_packing2","aLL"],[61,"get_lang_setting?","aR"],[62,"prepare_statistic?","aLWW"],[63,"keyword_detect",""],[64,"Keyword","aRLs"],[65,"get_guildcard_num","aLR"],[66,"unknown",null],[67,"unknown",null],[68,"get_wrap_status","aLR"],[69,"initial_floor","aL"],[70,"sin","aRL"],[71,"cos","aRL"],[72,"unknown",null],[73,"unknown",null],[74,"boss_is_dead2?","R"],[75,"unknownF94B","R"],[76,"unknownF94C","R"],[77,"is_there_cardbattle","R"],[78,"unknown",null],[79,"unknown",null],[80,"BB_p2_menu","aL"],[81,"BB_Map_Designate","BWBB"],[82,"BB_get_number_in_pack","R"],[83,"BB_swap_item","aLLLLLLWW"],[84,"BB_check_wrap","aRR"],[85,"BB_exchange_PD_item","aRRRWW"],[86,"BB_exchange_PD_srank","aRRRRRWW"],[87,"BB_exchange_PD_special","aRRRRRLWW"],[88,"BB_exchange_PD_percent","aRRRRRLWW"],[89,"unknownF959","aL"],[90,"unknown",null],[91,"unknown",null],[92,"BB_exchange_SLT","aLRWW"],[93,"BB_exchange_PC",""],[94,"BB_box_create_BP","aLff"],[95,"BB_exchange_PT","aRRLWW"],[96,"unknownF960","aL"],[97,"unknownF961",""],[98,"unknown",null],[99,"unknown",null],[100,"unknown",null],[101,"unknown",null],[102,"unknown",null],[103,"unknown",null],[104,"unknown",null],[105,"unknown",null],[106,"unknown",null],[107,"unknown",null],[108,"unknown",null],[109,"unknown",null],[110,"unknown",null],[111,"unknown",null],[112,"unknown",null],[113,"unknown",null],[114,"unknown",null],[115,"unknown",null],[116,"unknown",null],[117,"unknown",null],[118,"unknown",null],[119,"unknown",null],[120,"unknown",null],[121,"unknown",null],[122,"unknown",null],[123,"unknown",null],[124,"unknown",null],[125,"unknown",null],[126,"unknown",null],[127,"unknown",null],[128,"unknown",null],[129,"unknown",null],[130,"unknown",null],[131,"unknown",null],[132,"unknown",null],[133,"unknown",null],[134,"unknown",null],[135,"unknown",null],[136,"unknown",null],[137,"unknown",null],[138,"unknown",null],[139,"unknown",null],[140,"unknown",null],[141,"unknown",null],[142,"unknown",null],[143,"unknown",null],[144,"unknown",null],[145,"unknown",null],[146,"unknown",null],[147,"unknown",null],[148,"unknown",null],[149,"unknown",null],[150,"unknown",null],[151,"unknown",null],[152,"unknown",null],[153,"unknown",null],[154,"unknown",null],[155,"unknown",null],[156,"unknown",null],[157,"unknown",null],[158,"unknown",null],[159,"unknown",null],[160,"unknown",null],[161,"unknown",null],[162,"unknown",null],[163,"unknown",null],[164,"unknown",null],[165,"unknown",null],[166,"unknown",null],[167,"unknown",null],[168,"unknown",null],[169,"unknown",null],[170,"unknown",null],[171,"unknown",null],[172,"unknown",null],[173,"unknown",null],[174,"unknown",null],[175,"unknown",null],[176,"unknown",null],[177,"unknown",null],[178,"unknown",null],[179,"unknown",null],[180,"unknown",null],[181,"unknown",null],[182,"unknown",null],[183,"unknown",null],[184,"unknown",null],[185,"unknown",null],[186,"unknown",null],[187,"unknown",null],[188,"unknown",null],[189,"unknown",null],[190,"unknown",null],[191,"unknown",null],[192,"unknown",null],[193,"unknown",null],[194,"unknown",null],[195,"unknown",null],[196,"unknown",null],[197,"unknown",null],[198,"unknown",null],[199,"unknown",null],[200,"unknown",null],[201,"unknown",null],[202,"unknown",null],[203,"unknown",null],[204,"unknown",null],[205,"unknown",null],[206,"unknown",null],[207,"unknown",null],[208,"unknown",null],[209,"unknown",null],[210,"unknown",null],[211,"unknown",null],[212,"unknown",null],[213,"unknown",null],[214,"unknown",null],[215,"unknown",null],[216,"unknown",null],[217,"unknown",null],[218,"unknown",null],[219,"unknown",null],[220,"unknown",null],[221,"unknown",null],[222,"unknown",null],[223,"unknown",null],[224,"unknown",null],[225,"unknown",null],[226,"unknown",null],[227,"unknown",null],[228,"unknown",null],[229,"unknown",null],[230,"unknown",null],[231,"unknown",null],[232,"unknown",null],[233,"unknown",null],[234,"unknown",null],[235,"unknown",null],[236,"unknown",null],[237,"unknown",null],[238,"unknown",null],[239,"unknown",null],[240,"unknown",null],[241,"unknown",null],[242,"unknown",null],[243,"unknown",null],[244,"unknown",null],[245,"unknown",null],[246,"unknown",null],[247,"unknown",null],[248,"unknown",null],[249,"unknown",null],[250,"unknown",null],[251,"unknown",null],[252,"unknown",null],[253,"unknown",null],[254,"unknown",null],[255,"unknown",null]],Ur=l.a.get("data_formats/parsing/quest/dat"),Nr=68,Hr=72;var qr=function(e){function t(){return Object(d.a)(this,t),Object(h.a)(this,Object(_.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(p.a)(t,[{key:"write_u8",value:function(e){return this.dv.setUint8(this._position++,e),this}},{key:"write_u16",value:function(e){return this.dv.setUint16(this.position,e,this.little_endian),this._position+=2,this}},{key:"write_u32",value:function(e){return this.dv.setUint32(this.position,e,this.little_endian),this._position+=4,this}},{key:"write_i32",value:function(e){return this.dv.setInt32(this.position,e,this.little_endian),this._position+=4,this}},{key:"write_f32",value:function(e){return this.dv.setFloat32(this.position,e,this.little_endian),this._position+=4,this}},{key:"write_u8_array",value:function(e){return new Uint8Array(this.buffer,this.offset+this.position).set(new Uint8Array(e)),this._position+=e.length,this}},{key:"write_cursor",value:function(e){var t=e.size-e.position;return e.copy_to_uint8_array(new Uint8Array(this.buffer,this.offset+this.position,t),t),this._position+=t,this}},{key:"write_string_ascii",value:function(e,t){var n=0,r=!0,a=!1,i=void 0;try{for(var o,s=jn.encode(e)[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;n<t&&(this.write_u8(l),++n)}}catch(u){a=!0,i=u}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}for(;n<t;)this.write_u8(0),++n;return this}}]),t}(xn),Vr=l.a.get("data_formats/parsing/quest/qst");function Zr(e){var t="PC",n=e.u8();e.seek(1);var r=e.u8();if(68===n?t="Dreamcast/GameCube":88===n?68===r&&(t="Blue Burst"):166===n&&(t="Dreamcast download"),"Blue Burst"===t){e.seek_start(0);var a=function(e){for(var t=[],n=0;n<2;++n){e.seek(4);var r=e.u16();e.seek(38);var a=e.string_ascii(16,!0,!0),i=e.u32(),o=e.string_ascii(24,!0,!0);t.push({quest_id:r,file_name:a,file_name_2:o,size:i})}return t}(e),i=function(e,t){var n=new Map;for(;e.bytes_left>=1056;){var r=e.position,a=e.seek(4).u8(),i=e.seek(3).string_ascii(16,!0,!0),o=n.get(i);if(!o){var s=t.get(i);n.set(i,o={name:i,expected_size:s,cursor:new Or(new Sr(s||10240),_n.Little),chunk_nos:new Set})}o.chunk_nos.has(a)?Vr.warn("File chunk number ".concat(a," of file ").concat(i," was already encountered, overwriting previous chunk.")):o.chunk_nos.add(a);var l=e.seek(1024).u32();e.seek(-1028),l>1024&&(Vr.warn("Data segment size of ".concat(l," is larger than expected maximum size, reading just 1024 bytes.")),l=1024);var u=e.take(l),c=1024*a;if(o.cursor.size=Math.max(c+l,o.cursor.size),o.cursor.seek_start(c).write_cursor(u),e.seek(1032-u.size),e.position!==r+1056)throw new Error("Read ".concat(e.position-r," file chunk message bytes instead of expected 1056."))}e.bytes_left&&Vr.warn("".concat(e.bytes_left," Bytes left in file."));var d=!0,p=!1,h=void 0;try{for(var _,m=n.values()[Symbol.iterator]();!(d=(_=m.next()).done);d=!0){var f=_.value;f.cursor.seek_start(0),f.chunk_nos=new Set(Array.from(f.chunk_nos.values()).sort(function(e,t){return e-t})),null!=f.expected_size&&f.cursor.size!==f.expected_size&&Vr.warn("File ".concat(f.name," has an actual size of ").concat(f.cursor.size," instead of the expected size ").concat(f.expected_size,"."));for(var v=Math.max(f.cursor.size,f.expected_size||0),w=0;w<Math.ceil(v/1024);++w)f.chunk_nos.has(w)||Vr.warn("File ".concat(f.name," is missing chunk ").concat(w,"."))}}catch(S){p=!0,h=S}finally{try{d||null==m.return||m.return()}finally{if(p)throw h}}var b=[],y=!0,k=!1,g=void 0;try{for(var R,j=n.values()[Symbol.iterator]();!(y=(R=j.next()).done);y=!0){var O=R.value;b.push({name:O.name,data:O.cursor.seek_start(0).array_buffer()})}}catch(S){k=!0,g=S}finally{try{y||null==j.return||j.return()}finally{if(k)throw g}}return b}(e,new Map(a.map(function(e){return[e.file_name,e.size]}))),o=!0,s=!1,l=void 0;try{for(var u,c=function(){var e=u.value,t=a.find(function(t){return t.file_name===e.name});t&&(e.id=t.quest_id,e.name_2=t.file_name_2)},d=i[Symbol.iterator]();!(o=(u=d.next()).done);o=!0)c()}catch(p){s=!0,l=p}finally{try{o||null==d.return||d.return()}finally{if(s)throw l}}return{version:t,files:i}}Vr.error("Can't parse ".concat(t," QST files."))}function Yr(e){var t=e.files,n=t.map(function(e){return 88+1056*Math.ceil(e.data.byteLength/1024)}).reduce(function(e,t){return e+t}),r=new ArrayBuffer(n),a=new qr(r,_n.Little);if(function(e,t){var n=!0,r=!1,a=void 0;try{for(var i,o=t[Symbol.iterator]();!(n=(i=o.next()).done);n=!0){var s=i.value;if(s.name.length>16)throw Error("File ".concat(s.name," has a name longer than 16 characters."));e.write_u16(88),e.write_u16(68),e.write_u16(s.id||0);for(var l=0;l<38;++l)e.write_u8(0);e.write_string_ascii(s.name,16),e.write_u32(s.data.byteLength);var u=void 0;if(null==s.name_2){var c=s.name.lastIndexOf(".");u=-1===c?s.name+"_j":s.name.slice(0,c)+"_j"+s.name.slice(c)}else u=s.name_2;if(u.length>24)throw Error("File ".concat(s.name," has a file_name_2 length (").concat(u,") longer than 24 characters."));e.write_string_ascii(u,24)}}catch(d){r=!0,a=d}finally{try{n||null==o.return||o.return()}finally{if(r)throw a}}}(a,t),function(e,t){var n=t.map(function(e){return{no:0,data:new xn(e.data,_n.Little),name:e.name}});for(;n.length;)for(var r=0;r<n.length;)Kr(e,n[r].data,n[r].no++,n[r].name)?++r:n.splice(r,1)}(a,t),a.size!==n)throw new Error("Expected a final file size of ".concat(n,", but got ").concat(a.size,"."));return r}function Kr(e,t,n,r){e.write_u8_array([28,4,19,0]),e.write_u8(n),e.write_u8_array([0,0,0]),e.write_string_ascii(r,16);var a=Math.min(1024,t.bytes_left);e.write_cursor(t.take(a));for(var i=a;i<1024;++i)e.write_u8(0);return e.write_u32(a),e.write_u32(0),t.bytes_left>0}var Qr=l.a.get("data_formats/parsing/quest");function Xr(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Zr(e);if(n){var r,a,i=!0,o=!1,s=void 0;try{for(var l,u=n.files[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value,d=c.name.trim().toLowerCase();d.endsWith(".dat")?r=c:d.endsWith(".bin")&&(a=c)}}catch(v){o=!0,s=v}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}if(r){if(a){var p=function(e){for(var t=[],n=[],r=[];e.bytes_left;){var a=e.u32(),i=e.u32(),o=e.u32(),s=e.u32();if(0===a)break;if(s!==i-16)throw Error("Malformed DAT file. Expected an entities size of ".concat(i-16,", got ").concat(s,"."));if(1===a){for(var l=Math.floor(s/Nr),u=e.position,c=0;c<l;++c){var d=e.u16(),p=e.u8_array(10),h=e.u16(),_=e.u8_array(2),m=e.f32(),f=e.f32(),v=e.f32(),w=e.i32()/65535*2*Math.PI,b=e.i32()/65535*2*Math.PI,y=e.i32()/65535*2*Math.PI,k=e.u8_array(28);t.push({type_id:d,section_id:h,position:new g(m,f,v),rotation:new g(w,b,y),area_id:o,unknown:[p,_,k]})}var R=e.position-u;R!==s&&(Ur.warn("Read ".concat(R," bytes instead of expected ").concat(s," for entity type ").concat(a," (Object).")),e.seek(s-R))}else if(2===a){for(var j=Math.floor(s/Hr),O=e.position,S=0;S<j;++S){var x=e.u16(),D=e.u8_array(10),E=e.u16(),C=e.u8_array(6),L=e.f32(),B=e.f32(),M=e.f32(),F=e.i32()/65535*2*Math.PI,I=e.i32()/65535*2*Math.PI,z=e.i32()/65535*2*Math.PI,P=e.u8_array(4),G=e.f32(),T=e.u8_array(12),A=e.u32(),W=e.u8_array(4);n.push({type_id:x,section_id:E,position:new g(L,B,M),rotation:new g(F,I,z),skin:A,area_id:o,flags:G,unknown:[D,C,P,T,W]})}var U=e.position-O;U!==s&&(Ur.warn("Read ".concat(U," bytes instead of expected ").concat(s," for entity type ").concat(a," (NPC).")),e.seek(s-U))}else r.push({entity_type:a,total_size:i,area_id:o,entities_size:s,data:e.u8_array(s)})}return{objs:t,npcs:n,unknowns:r}}(Fr(new xn(r.data,_n.Little))),h=Pr(Fr(new xn(a.data,_n.Little)),t),_=1,m=[];if(h.function_offsets.length){var f=function(e,t){var n=0,r=!1,a=[],i=!0,o=!1,s=void 0;try{for(var l,u=e[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value;if(n===t&&(r=!0),r&&(a.push(c),1===c.opcode))break;n+=c.size}}catch(v){o=!0,s=v}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}return r?a:void 0}(h.instructions,h.function_offsets[0]);f?m=function(e,t,n,r){var a=new Map,i=!0,o=!1,s=void 0;try{for(var l,u=e.npcs[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value;a.set(c.area_id,0)}}catch(v){o=!0,s=v}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}var d=!0,p=!1,h=void 0;try{for(var _,m=e.objs[Symbol.iterator]();!(d=(_=m.next()).done);d=!0){var f=_.value;a.set(f.area_id,0)}}catch(v){p=!0,h=v}finally{try{d||null==m.return||m.return()}finally{if(p)throw h}}var w=n.filter(function(e){return"BB_Map_Designate"===e.mnemonic}),b=!0,y=!1,k=void 0;try{for(var g,R=w[Symbol.iterator]();!(b=(g=R.next()).done);b=!0){var j=g.value,O=j.args[0],S=j.args[2];a.set(O,S)}}catch(v){y=!0,k=v}finally{try{b||null==R.return||R.return()}finally{if(y)throw k}}var x=new Array,D=!0,E=!1,C=void 0;try{for(var L,B=a.entries()[Symbol.iterator]();!(D=(L=B.next()).done);D=!0){var M=L.value,F=Object(Lt.a)(M,2),I=F[0],z=F[1];try{x.push(Rr.get_variant(t,I,z))}catch(P){if(!r)throw P;Qr.error("Unknown area variant.",P)}}}catch(v){E=!0,C=v}finally{try{D||null==B.return||B.return()}finally{if(E)throw C}}return x.sort(function(e,t){return e.area.order-t.area.order||e.id-t.id})}(p,_=function(e){var t=e.find(function(e){return"set_episode"===e.mnemonic});if(!t)return Qr.debug("Function 0 has no set_episode instruction."),1;switch(t.args[0]){default:case 0:return 1;case 1:return 2;case 2:return 4}}(f),f,t):Qr.warn("Function 0 offset ".concat(h.function_offsets[0]," is invalid."))}else Qr.warn("File contains no functions.");return new je(r.id,h.quest_name,h.short_description,h.long_description,_,m,p.objs.map(function(e){var t=e.position,n=t.x,r=t.y,a=t.z,i=e.rotation;return new Se(e.area_id,e.section_id,new g(n,r,a),new g(i.x,i.y,i.z),se.from_pso_id(e.type_id),e)}),function(e,t){return t.map(function(t){var n=t.position,r=n.x,a=n.y,i=n.z,o=t.rotation;return new xe(t.area_id,t.section_id,new g(r,a,i),new g(o.x,o.y,o.z),function(e,t){var n=t.type_id,r=t.flags,a=t.skin,i=t.area_id,o=Math.abs(r-1)>1e-5;switch("".concat(n,", ").concat(a%3,", ").concat(e)){case"".concat(68,", 0, 1"):return I.Booma;case"".concat(68,", 1, 1"):return I.Gobooma;case"".concat(68,", 2, 1"):return I.Gigobooma;case"".concat(99,", 0, 1"):return I.EvilShark;case"".concat(99,", 1, 1"):return I.PalShark;case"".concat(99,", 2, 1"):return I.GuilShark;case"".concat(166,", 0, 1"):return I.Dimenian;case"".concat(166,", 0, 2"):return I.Dimenian2;case"".concat(166,", 1, 1"):return I.LaDimenian;case"".concat(166,", 1, 2"):return I.LaDimenian2;case"".concat(166,", 2, 1"):return I.SoDimenian;case"".concat(166,", 2, 2"):return I.SoDimenian2;case"".concat(214,", 0, 2"):return I.Mericarol;case"".concat(214,", 1, 2"):return I.Mericus;case"".concat(214,", 2, 2"):return I.Merikle;case"".concat(277,", 0, 4"):return I.Boota;case"".concat(277,", 1, 4"):return I.ZeBoota;case"".concat(277,", 2, 4"):return I.BaBoota;case"".concat(279,", 0, 4"):return I.Goran;case"".concat(279,", 1, 4"):return I.PyroGoran;case"".concat(279,", 2, 4"):return I.GoranDetonator}switch("".concat(n,", ").concat(a%2,", ").concat(e)){case"".concat(64,", 0, 1"):return I.Hildebear;case"".concat(64,", 0, 2"):return I.Hildebear2;case"".concat(64,", 1, 1"):return I.Hildeblue;case"".concat(64,", 1, 2"):return I.Hildeblue2;case"".concat(65,", 0, 1"):return I.RagRappy;case"".concat(65,", 0, 2"):return I.RagRappy2;case"".concat(65,", 0, 4"):return I.SandRappy;case"".concat(65,", 1, 1"):return I.AlRappy;case"".concat(65,", 1, 2"):return I.LoveRappy;case"".concat(65,", 1, 4"):return I.DelRappy;case"".concat(128,", 0, 1"):return I.Dubchic;case"".concat(128,", 0, 2"):return I.Dubchic2;case"".concat(128,", 1, 1"):return I.Gilchic;case"".concat(128,", 1, 2"):return I.Gilchic2;case"".concat(212,", 0, 2"):return I.SinowBerill;case"".concat(212,", 1, 2"):return I.SinowSpigell;case"".concat(213,", 0, 2"):return I.Merillia;case"".concat(213,", 1, 2"):return I.Meriltas;case"".concat(215,", 0, 2"):return I.UlGibbon;case"".concat(215,", 1, 2"):return I.ZolGibbon;case"".concat(221,", 0, 2"):return I.Dolmolm;case"".concat(221,", 1, 2"):return I.Dolmdarl;case"".concat(224,", 0, 2"):return i>15?I.Epsilon:I.SinowZoa;case"".concat(224,", 1, 2"):return i>15?I.Epsilon:I.SinowZele;case"".concat(274,", 0, 4"):return I.MerissaA;case"".concat(274,", 1, 4"):return I.MerissaAA;case"".concat(276,", 0, 4"):return I.Zu;case"".concat(276,", 1, 4"):return I.Pazuzu;case"".concat(278,", 0, 4"):return I.Dorphon;case"".concat(278,", 1, 4"):return I.DorphonEclair;case"".concat(281,", 0, 4"):return o?I.SaintMilion:I.Kondrieu;case"".concat(281,", 1, 4"):return o?I.Shambertin:I.Kondrieu}switch("".concat(n,", ").concat(e)){case"".concat(66,", 1"):return I.Monest;case"".concat(66,", 2"):return I.Monest2;case"".concat(67,", 1"):return o?I.SavageWolf:I.BarbarousWolf;case"".concat(67,", 2"):return o?I.SavageWolf2:I.BarbarousWolf2;case"".concat(96,", 1"):return I.GrassAssassin;case"".concat(96,", 2"):return I.GrassAssassin2;case"".concat(97,", 1"):return i>15?I.DelLily:o?I.PoisonLily:I.NarLily;case"".concat(97,", 2"):return i>15?I.DelLily:o?I.PoisonLily2:I.NarLily2;case"".concat(98,", 1"):return I.NanoDragon;case"".concat(100,", 1"):return o?I.PofuillySlime:I.PouillySlime;case"".concat(101,", 1"):return I.PanArms;case"".concat(101,", 2"):return I.PanArms2;case"".concat(129,", 1"):return I.Garanz;case"".concat(129,", 2"):return I.Garanz2;case"".concat(130,", 1"):return o?I.SinowBeat:I.SinowGold;case"".concat(131,", 1"):return I.Canadine;case"".concat(132,", 1"):return I.Canane;case"".concat(133,", 1"):return I.Dubswitch;case"".concat(133,", 2"):return I.Dubswitch2;case"".concat(160,", 1"):return I.Delsaber;case"".concat(160,", 2"):return I.Delsaber2;case"".concat(161,", 1"):return I.ChaosSorcerer;case"".concat(161,", 2"):return I.ChaosSorcerer2;case"".concat(162,", 1"):return I.DarkGunner;case"".concat(164,", 1"):return I.ChaosBringer;case"".concat(165,", 1"):return I.DarkBelra;case"".concat(165,", 2"):return I.DarkBelra2;case"".concat(167,", 1"):return I.Bulclaw;case"".concat(168,", 1"):return I.Claw;case"".concat(192,", 1"):return I.Dragon;case"".concat(192,", 2"):return I.GalGryphon;case"".concat(193,", 1"):return I.DeRolLe;case"".concat(197,", 1"):return I.VolOpt;case"".concat(200,", 1"):return I.DarkFalz;case"".concat(202,", 2"):return I.OlgaFlow;case"".concat(203,", 2"):return I.BarbaRay;case"".concat(204,", 2"):return I.GolDragon;case"".concat(216,", 2"):return I.Gibbles;case"".concat(217,", 2"):return I.Gee;case"".concat(218,", 2"):return I.GiGue;case"".concat(219,", 2"):return I.Deldepth;case"".concat(220,", 2"):return I.Delbiter;case"".concat(222,", 2"):return I.Morfos;case"".concat(223,", 2"):return I.Recobox;case"".concat(225,", 2"):return I.IllGill;case"".concat(272,", 4"):return I.Astark;case"".concat(273,", 4"):return o?I.SatelliteLizard:I.Yowie;case"".concat(275,", 4"):return I.Girtablulu}switch(n){case 4:return I.FemaleFat;case 5:return I.FemaleMacho;case 7:return I.FemaleTall;case 10:return I.MaleDwarf;case 11:return I.MaleFat;case 12:return I.MaleMacho;case 13:return I.MaleOld;case 25:return I.BlueSoldier;case 26:return I.RedSoldier;case 27:return I.Principal;case 28:return I.Tekker;case 29:return I.GuildLady;case 30:return I.Scientist;case 31:return I.Nurse;case 32:return I.Irene;case 241:return I.ItemShop;case 254:return I.Nurse2}return I.Unknown}(e,t),t)})}(_,p.npcs),p.unknowns,h.data)}Qr.error("File contains no BIN file.")}else Qr.error("File contains no DAT file.")}}function Jr(e,t){var n,r,a=function(e){var t=e.objs,n=e.npcs,r=e.unknowns,a=new Sr(t.length*(16+Nr)+n.length*(16+Hr)+r.reduce(function(e,t){return e+t.total_size},0)),i=new Or(a,_n.Little),o=Object(Te.groupBy)(t,function(e){return e.area_id}),s=Object.keys(o).map(function(e){return parseInt(e,10)}).sort(function(e,t){return e-t}),l=!0,u=!1,c=void 0;try{for(var d,p=s[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var h=d.value,_=o[h],m=_.length*Nr;i.write_u32(1),i.write_u32(m+16),i.write_u32(h),i.write_u32(m);var f=!0,v=!1,w=void 0;try{for(var b,y=_[Symbol.iterator]();!(f=(b=y.next()).done);f=!0){var k=b.value;i.write_u16(k.type_id),i.write_u8_array(k.unknown[0]),i.write_u16(k.section_id),i.write_u8_array(k.unknown[1]),i.write_f32(k.position.x),i.write_f32(k.position.y),i.write_f32(k.position.z),i.write_i32(Math.round(k.rotation.x/(2*Math.PI)*65535)),i.write_i32(Math.round(k.rotation.y/(2*Math.PI)*65535)),i.write_i32(Math.round(k.rotation.z/(2*Math.PI)*65535)),i.write_u8_array(k.unknown[2])}}catch(H){v=!0,w=H}finally{try{f||null==y.return||y.return()}finally{if(v)throw w}}}}catch(H){u=!0,c=H}finally{try{l||null==p.return||p.return()}finally{if(u)throw c}}var g=Object(Te.groupBy)(n,function(e){return e.area_id}),R=Object.keys(g).map(function(e){return parseInt(e,10)}).sort(function(e,t){return e-t}),j=!0,O=!1,S=void 0;try{for(var x,D=R[Symbol.iterator]();!(j=(x=D.next()).done);j=!0){var E=x.value,C=g[E],L=C.length*Hr;i.write_u32(2),i.write_u32(L+16),i.write_u32(E),i.write_u32(L);var B=!0,M=!1,F=void 0;try{for(var I,z=C[Symbol.iterator]();!(B=(I=z.next()).done);B=!0){var P=I.value;i.write_u16(P.type_id),i.write_u8_array(P.unknown[0]),i.write_u16(P.section_id),i.write_u8_array(P.unknown[1]),i.write_f32(P.position.x),i.write_f32(P.position.y),i.write_f32(P.position.z),i.write_i32(Math.round(P.rotation.x/(2*Math.PI)*65535)),i.write_i32(Math.round(P.rotation.y/(2*Math.PI)*65535)),i.write_i32(Math.round(P.rotation.z/(2*Math.PI)*65535)),i.write_u8_array(P.unknown[2]),i.write_f32(P.flags),i.write_u8_array(P.unknown[3]),i.write_u32(P.skin),i.write_u8_array(P.unknown[4])}}catch(H){M=!0,F=H}finally{try{B||null==z.return||z.return()}finally{if(M)throw F}}}}catch(H){O=!0,S=H}finally{try{j||null==D.return||D.return()}finally{if(O)throw S}}var G=!0,T=!1,A=void 0;try{for(var W,U=r[Symbol.iterator]();!(G=(W=U.next()).done);G=!0){var N=W.value;i.write_u32(N.entity_type),i.write_u32(N.total_size),i.write_u32(N.area_id),i.write_u32(N.entities_size),i.write_u8_array(N.data)}}catch(H){T=!0,A=H}finally{try{G||null==U.return||U.return()}finally{if(T)throw A}}return i.write_u32(0),i.write_u32(0),i.write_u32(0),i.write_u32(0),a}({objs:(r=e.objects,r.map(function(e){return{type_id:e.type.pso_id,section_id:e.section_id,position:e.section_position,rotation:e.rotation,area_id:e.area_id,unknown:e.dat.unknown}})),npcs:(n=e.npcs,n.map(function(e){var t=function(e){switch(e){default:throw new Error("Unexpected type ".concat(e.code,"."));case I.Unknown:return;case I.FemaleFat:return{type_id:4,skin:0,regular:!0};case I.FemaleMacho:return{type_id:5,skin:0,regular:!0};case I.FemaleTall:return{type_id:7,skin:0,regular:!0};case I.MaleDwarf:return{type_id:10,skin:0,regular:!0};case I.MaleFat:return{type_id:11,skin:0,regular:!0};case I.MaleMacho:return{type_id:12,skin:0,regular:!0};case I.MaleOld:return{type_id:13,skin:0,regular:!0};case I.BlueSoldier:return{type_id:25,skin:0,regular:!0};case I.RedSoldier:return{type_id:26,skin:0,regular:!0};case I.Principal:return{type_id:27,skin:0,regular:!0};case I.Tekker:return{type_id:28,skin:0,regular:!0};case I.GuildLady:return{type_id:29,skin:0,regular:!0};case I.Scientist:return{type_id:30,skin:0,regular:!0};case I.Nurse:return{type_id:31,skin:0,regular:!0};case I.Irene:return{type_id:32,skin:0,regular:!0};case I.ItemShop:return{type_id:241,skin:0,regular:!0};case I.Nurse2:return{type_id:254,skin:0,regular:!0};case I.Hildebear:return{type_id:64,skin:0,regular:!0};case I.Hildeblue:return{type_id:64,skin:1,regular:!0};case I.RagRappy:return{type_id:65,skin:0,regular:!0};case I.AlRappy:return{type_id:65,skin:1,regular:!0};case I.Monest:return{type_id:66,skin:0,regular:!0};case I.SavageWolf:return{type_id:67,skin:0,regular:!0};case I.BarbarousWolf:return{type_id:67,skin:0,regular:!1};case I.Booma:return{type_id:68,skin:0,regular:!0};case I.Gobooma:return{type_id:68,skin:1,regular:!0};case I.Gigobooma:return{type_id:68,skin:2,regular:!0};case I.Dragon:return{type_id:192,skin:0,regular:!0};case I.GrassAssassin:return{type_id:96,skin:0,regular:!0};case I.PoisonLily:return{type_id:97,skin:0,regular:!0};case I.NarLily:return{type_id:97,skin:1,regular:!0};case I.NanoDragon:return{type_id:98,skin:0,regular:!0};case I.EvilShark:return{type_id:99,skin:0,regular:!0};case I.PalShark:return{type_id:99,skin:1,regular:!0};case I.GuilShark:return{type_id:99,skin:2,regular:!0};case I.PofuillySlime:return{type_id:100,skin:0,regular:!0};case I.PouillySlime:return{type_id:100,skin:0,regular:!1};case I.PanArms:return{type_id:101,skin:0,regular:!0};case I.DeRolLe:return{type_id:193,skin:0,regular:!0};case I.Dubchic:return{type_id:128,skin:0,regular:!0};case I.Gilchic:return{type_id:128,skin:1,regular:!0};case I.Garanz:return{type_id:129,skin:0,regular:!0};case I.SinowBeat:return{type_id:130,skin:0,regular:!0};case I.SinowGold:return{type_id:130,skin:0,regular:!1};case I.Canadine:return{type_id:131,skin:0,regular:!0};case I.Canane:return{type_id:132,skin:0,regular:!0};case I.Dubswitch:return{type_id:133,skin:0,regular:!0};case I.VolOpt:return{type_id:197,skin:0,regular:!0};case I.Delsaber:return{type_id:160,skin:0,regular:!0};case I.ChaosSorcerer:return{type_id:161,skin:0,regular:!0};case I.DarkGunner:return{type_id:162,skin:0,regular:!0};case I.ChaosBringer:return{type_id:164,skin:0,regular:!0};case I.DarkBelra:return{type_id:165,skin:0,regular:!0};case I.Dimenian:return{type_id:166,skin:0,regular:!0};case I.LaDimenian:return{type_id:166,skin:1,regular:!0};case I.SoDimenian:return{type_id:166,skin:2,regular:!0};case I.Bulclaw:return{type_id:167,skin:0,regular:!0};case I.Claw:return{type_id:168,skin:0,regular:!0};case I.DarkFalz:return{type_id:200,skin:0,regular:!0};case I.Hildebear2:return{type_id:64,skin:0,regular:!0};case I.Hildeblue2:return{type_id:64,skin:1,regular:!0};case I.RagRappy2:return{type_id:65,skin:0,regular:!0};case I.LoveRappy:return{type_id:65,skin:1,regular:!0};case I.Monest2:return{type_id:66,skin:0,regular:!0};case I.PoisonLily2:return{type_id:97,skin:0,regular:!0};case I.NarLily2:return{type_id:97,skin:1,regular:!0};case I.GrassAssassin2:return{type_id:96,skin:0,regular:!0};case I.Dimenian2:return{type_id:166,skin:0,regular:!0};case I.LaDimenian2:return{type_id:166,skin:1,regular:!0};case I.SoDimenian2:return{type_id:166,skin:2,regular:!0};case I.DarkBelra2:return{type_id:165,skin:0,regular:!0};case I.BarbaRay:return{type_id:203,skin:0,regular:!0};case I.SavageWolf2:return{type_id:67,skin:0,regular:!0};case I.BarbarousWolf2:return{type_id:67,skin:0,regular:!1};case I.PanArms2:return{type_id:101,skin:0,regular:!0};case I.Dubchic2:return{type_id:128,skin:0,regular:!0};case I.Gilchic2:return{type_id:128,skin:1,regular:!0};case I.Garanz2:return{type_id:129,skin:0,regular:!0};case I.Dubswitch2:return{type_id:133,skin:0,regular:!0};case I.Delsaber2:return{type_id:160,skin:0,regular:!0};case I.ChaosSorcerer2:return{type_id:161,skin:0,regular:!0};case I.GolDragon:return{type_id:204,skin:0,regular:!0};case I.SinowBerill:return{type_id:212,skin:0,regular:!0};case I.SinowSpigell:return{type_id:212,skin:1,regular:!0};case I.Merillia:return{type_id:213,skin:0,regular:!0};case I.Meriltas:return{type_id:213,skin:1,regular:!0};case I.Mericarol:return{type_id:214,skin:0,regular:!0};case I.Mericus:return{type_id:214,skin:1,regular:!0};case I.Merikle:return{type_id:214,skin:2,regular:!0};case I.UlGibbon:return{type_id:215,skin:0,regular:!0};case I.ZolGibbon:return{type_id:215,skin:1,regular:!0};case I.Gibbles:return{type_id:216,skin:0,regular:!0};case I.Gee:return{type_id:217,skin:0,regular:!0};case I.GiGue:return{type_id:218,skin:0,regular:!0};case I.GalGryphon:return{type_id:192,skin:0,regular:!0};case I.Deldepth:return{type_id:219,skin:0,regular:!0};case I.Delbiter:return{type_id:220,skin:0,regular:!0};case I.Dolmolm:return{type_id:221,skin:0,regular:!0};case I.Dolmdarl:return{type_id:221,skin:1,regular:!0};case I.Morfos:return{type_id:222,skin:0,regular:!0};case I.Recobox:return{type_id:223,skin:0,regular:!0};case I.Epsilon:case I.SinowZoa:return{type_id:224,skin:0,regular:!0};case I.SinowZele:return{type_id:224,skin:1,regular:!0};case I.IllGill:return{type_id:225,skin:0,regular:!0};case I.DelLily:return{type_id:97,skin:0,regular:!0};case I.OlgaFlow:return{type_id:202,skin:0,regular:!0};case I.SandRappy:return{type_id:65,skin:0,regular:!0};case I.DelRappy:return{type_id:65,skin:1,regular:!0};case I.Astark:return{type_id:272,skin:0,regular:!0};case I.SatelliteLizard:return{type_id:273,skin:0,regular:!0};case I.Yowie:return{type_id:273,skin:0,regular:!1};case I.MerissaA:return{type_id:274,skin:0,regular:!0};case I.MerissaAA:return{type_id:274,skin:1,regular:!0};case I.Girtablulu:return{type_id:275,skin:0,regular:!0};case I.Zu:return{type_id:276,skin:0,regular:!0};case I.Pazuzu:return{type_id:276,skin:1,regular:!0};case I.Boota:return{type_id:277,skin:0,regular:!0};case I.ZeBoota:return{type_id:277,skin:1,regular:!0};case I.BaBoota:return{type_id:277,skin:2,regular:!0};case I.Dorphon:return{type_id:278,skin:0,regular:!0};case I.DorphonEclair:return{type_id:278,skin:1,regular:!0};case I.Goran:return{type_id:279,skin:0,regular:!0};case I.PyroGoran:return{type_id:279,skin:1,regular:!0};case I.GoranDetonator:return{type_id:279,skin:2,regular:!0};case I.SaintMilion:return{type_id:281,skin:0,regular:!0};case I.Shambertin:return{type_id:281,skin:1,regular:!0};case I.Kondrieu:return{type_id:281,skin:0,regular:!1}}}(e.type),n=e.dat.flags;return t&&(n=-8388609&e.dat.flags|(t.regular?0:8388608)),{type_id:t?t.type_id:e.dat.type_id,section_id:e.section_id,position:e.section_position,rotation:e.rotation,flags:n,skin:t?t.skin:e.dat.skin,area_id:e.area_id,unknown:e.dat.unknown}})),unknowns:e.dat_unknowns}),i={data:e.bin_data}.data,o=t.lastIndexOf("."),s=-1===o?t:t.slice(0,o);return Yr({files:[{name:s+".dat",id:e.id,data:xr(new jr(a,_n.Little)).array_buffer()},{name:s+".bin",id:e.id,data:xr(new xn(i,_n.Little)).array_buffer()}]})}var $r=16776960,ea=16711680;function ta(e,t,n){return ra(e,t,n,$r,"Object")}function na(e,t,n){return ra(e,t,n,ea,"NPC")}function ra(e,t,n,r,a){var i=t.groups.reduce(function(e,t){return Math.max(e,t.materialIndex||0)},0),o=[new Kn.MeshBasicMaterial({color:r,side:Kn.DoubleSide})];o.push.apply(o,Object(Ct.a)(n.map(function(e){return new Kn.MeshLambertMaterial({map:e,side:Kn.DoubleSide,alphaTest:.5})})));for(var s=o.length-1;s<i;++s)o.push(new Kn.MeshLambertMaterial({color:r,side:Kn.DoubleSide}));var l=new Kn.Mesh(t,o);l.name=a,l.userData.entity=e;var u=e.position,c=u.x,d=u.y,p=u.z;l.position.set(c,d,p);var h=e.rotation;return l.rotation.set(h.x,h.y,h.z),l}var aa=new Kn.MeshBasicMaterial({color:65280,side:Kn.DoubleSide}),ia=new Kn.MeshBasicMaterial({color:16711935,side:Kn.DoubleSide}),oa=new Kn.MeshLambertMaterial({skinning:!0,color:16711935,side:Kn.DoubleSide}),sa=new Kn.Vector3(0,1,0),la=new Kn.Vector3(0,0,0),ua=new Kn.Quaternion(0,0,0,1),ca=new Kn.Vector3(1,1,1);function da(e){return new ha([]).create_buffer_geometry(e)}var pa=function(){function e(){Object(d.a)(this,e),this.vertices_stack=[]}return Object(p.a)(e,[{key:"put",value:function(e){this.vertices_stack.push(e)}},{key:"get",value:function(e){for(var t=[],n=this.vertices_stack.length-1;n>=0;n--){var r=this.vertices_stack[n][e];r&&t.push(r)}return t}}]),e}(),ha=function(){function e(t){Object(d.a)(this,e),this.materials=void 0,this.vertices=new pa,this.bone_id=0,this.bones=[],this.positions=[],this.normals=[],this.uvs=[],this.indices=[],this.bone_indices=[],this.bone_weights=[],this.groups=[],this.materials=[aa].concat(Object(Ct.a)(t))}return Object(p.a)(e,[{key:"create_buffer_geometry",value:function(e){this.object_to_geometry(e,void 0,new Kn.Matrix4);var t=new Kn.BufferGeometry;t.addAttribute("position",new Kn.Float32BufferAttribute(this.positions,3)),t.addAttribute("normal",new Kn.Float32BufferAttribute(this.normals,3)),t.addAttribute("uv",new Kn.Float32BufferAttribute(this.uvs,2)),t.setIndex(new Kn.Uint16BufferAttribute(this.indices,1));var n=!0,r=!1,a=void 0;try{for(var i,o=this.groups[Symbol.iterator]();!(n=(i=o.next()).done);n=!0){var s=i.value;t.addGroup(s.start,s.count,s.material_index)}}catch(l){r=!0,a=l}finally{try{n||null==o.return||o.return()}finally{if(r)throw a}}return t.computeBoundingSphere(),t.computeBoundingBox(),t}},{key:"create_mesh",value:function(e){for(var t=this.create_buffer_geometry(e),n=this.groups.reduce(function(e,t){return Math.max(e,t.material_index)},0),r=this.materials.length-1;r<n;++r)this.materials.push(ia);return new Kn.Mesh(t,this.materials)}},{key:"create_skinned_mesh",value:function(e){var t=this.create_buffer_geometry(e);t.addAttribute("skinIndex",new Kn.Uint16BufferAttribute(this.bone_indices,4)),t.addAttribute("skinWeight",new Kn.Float32BufferAttribute(this.bone_weights,4));for(var n=this.groups.reduce(function(e,t){return Math.max(e,t.material_index)},0),r=this.materials.length-1;r<n;++r)this.materials.push(oa);var a=new Kn.SkinnedMesh(t,this.materials);return a.add(this.bones[0]),a.bind(new Kn.Skeleton(this.bones)),a}},{key:"object_to_geometry",value:function(e,t,n){var r,a=e.evaluation_flags,i=a.no_translate,o=a.no_rotate,s=a.no_scale,l=a.hidden,u=a.break_child_trace,c=a.zxy_rotation_order,d=a.skip,p=e.position,h=e.rotation,_=e.scale,m=new Kn.Euler(h.x,h.y,h.z,c?"ZXY":"ZYX"),f=(new Kn.Matrix4).compose(i?la:Qn(p),o?ua:(new Kn.Quaternion).setFromEuler(m),s?ca:Qn(_)).premultiply(n);if(d?r=t:((r=new Kn.Bone).name=this.bone_id.toString(),r.position.set(p.x,p.y,p.z),r.setRotationFromEuler(m),r.scale.set(_.x,_.y,_.z),this.bones.push(r),t&&t.add(r)),e.model&&!l&&this.model_to_geometry(e.model,f),this.bone_id++,!u){var v=!0,w=!1,b=void 0;try{for(var y,k=e.children[Symbol.iterator]();!(v=(y=k.next()).done);v=!0){var g=y.value;this.object_to_geometry(g,r,f)}}catch(R){w=!0,b=R}finally{try{v||null==k.return||k.return()}finally{if(w)throw b}}}}},{key:"model_to_geometry",value:function(e,t){!function(e){return"njcm"===e.type}(e)?$n(e,t,this.positions,this.normals,this.uvs,this.indices,this.groups):this.njcm_model_to_geometry(e,t)}},{key:"njcm_model_to_geometry",value:function(e,t){var n=this,r=(new Kn.Matrix3).getNormalMatrix(t),a=e.vertices.map(function(e){var a=Qn(e.position),i=e.normal?Qn(e.normal):sa;return a.applyMatrix4(t),i.applyMatrix3(r),{bone_id:n.bone_id,position:a,normal:i,bone_weight:e.bone_weight,bone_weight_status:e.bone_weight_status,calc_continue:e.calc_continue}});this.vertices.put(a);var i=!0,o=!1,s=void 0;try{for(var l,u=e.meshes[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){for(var c=l.value,d=this.indices.length,p=0;p<c.vertices.length;++p){var h=c.vertices[p],_=this.vertices.get(h.index);if(_.length){var m,f,v=_[0],w=v.normal||h.normal||sa,b=this.positions.length/3;this.positions.push(v.position.x,v.position.y,v.position.z),this.normals.push(w.x,w.y,w.z),c.has_tex_coords?this.uvs.push(h.tex_coords.x,h.tex_coords.y):this.uvs.push(0,0),p>=2&&(p%2===(c.clockwise_winding?1:0)?(this.indices.push(b-2),this.indices.push(b-1),this.indices.push(b)):(this.indices.push(b-2),this.indices.push(b),this.indices.push(b-1)));for(var y=[0,0,0,0],k=[0,0,0,0],g=_.length-1;g>=0;g--){var R=_[g];y[R.bone_weight_status]=R.bone_id,k[R.bone_weight_status]=R.bone_weight}(m=this.bone_indices).push.apply(m,y),(f=this.bone_weights).push.apply(f,k)}}var j=this.groups[this.groups.length-1],O=null==c.texture_id?0:c.texture_id+1;j&&j.material_index===O?j.count+=this.indices.length-d:this.groups.push({start:d,count:this.indices.length-d,material_index:O})}}catch(S){o=!0,s=S}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}}]),e}(),_a=l.a.get("data_formats/parsing/ninja/texture"),ma=1213027928,fa=1414682200;function va(e){var t=Cn(e),n=t.find(function(e){return e.type===ma}),r=n&&function(e){return{texture_count:e.u16()}}(n.data),a=t.filter(function(e){return e.type===fa}).map(function(e){return function(e){var t=e.u32(),n=e.u32(),r=e.u32(),a=e.u16(),i=e.u16(),o=e.u32();e.seek(36);var s=e.array_buffer(o);return{id:r,format:[t,n],width:a,height:i,size:o,data:s}}(e.data)});return r?r.texture_count!==a.length&&_a.warn("Found ".concat(a.length," textures instead of ").concat(r.texture_count," as defined in the header.")):_a.warn("No header found."),{textures:a}}function wa(e){return e.textures.map(ba)}function ba(e){var t,n;switch(e.format[1]){case 6:t=Kn.RGBA_S3TC_DXT1_Format,n=e.width*e.height/2;break;case 7:t=Kn.RGBA_S3TC_DXT3_Format,n=e.width*e.height;break;default:throw new Error("Format ".concat(e.format.join(", ")," not supported."))}var r=new Kn.CompressedTexture([{data:new Uint8Array(e.data,0,n),width:e.width,height:e.height}],e.width,e.height,t);return r.minFilter=Kn.LinearFilter,r.wrapS=Kn.MirroredRepeatWrapping,r.wrapT=Kn.MirroredRepeatWrapping,r.needsUpdate=!0,r}var ya=l.a.get("stores/EntityStore"),ka=new Kn.CylinderBufferGeometry(3,3,20);ka.translate(0,10,0);var ga=new Promise(function(e){return e(ka)}),Ra=[],ja=new Promise(function(e){return e(Ra)}),Oa=new Map;Oa.set(I.Unknown,ga);var Sa=new Map;Sa.set(I.Unknown,ja);for(var xa=new Map,Da=new Map,Ea=0,Ca=[se.Unknown,se.PlayerSet,se.FogCollision,se.EventCollision,se.ObjRoomID,se.ScriptCollision,se.ItemLight,se.FogCollisionSW,se.MenuActivation,se.BoxDetectObject,se.SymbolChatObject,se.TouchPlateObject,se.TargetableObject,se.EffectObject,se.CountDownObject,se.TelepipeLocation,se.Pioneer2InvisibleTouchplate,se.TempleMapDetect,se.LabInvisibleObject];Ea<Ca.length;Ea++){var La=Ca[Ea];xa.set(La,ga),Da.set(La,ja)}var Ba,Ma,Fa,Ia,za=new(function(){function e(){Object(d.a)(this,e)}return Object(p.a)(e,[{key:"get_npc_geometry",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t){var n;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Oa.get(t))){e.next=5;break}return e.abrupt("return",n);case 5:return n=ir(t,er.Geometry).then(function(e){var t=e.url,n=e.data,r=new xn(n,_n.Little),a=t.endsWith(".nj")?qn(r):Vn(r);return a.length?da(a[0]):(ya.warn("Could not parse ".concat(t,".")),ka)}).catch(function(e){return ya.warn("Could load geometry file for ".concat(t.code,"."),e),ka}),Oa.set(t,n),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},{key:"get_npc_tex",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t){var n;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Sa.get(t))){e.next=5;break}return e.abrupt("return",n);case 5:return n=ir(t,er.Texture).then(function(e){var t=e.data;return wa(va(new xn(t,_n.Little)))}).catch(function(e){return ya.warn("Could load texture file for ".concat(t.code,"."),e),Ra}),Sa.set(t,n),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},{key:"get_object_geometry",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t){var n;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=xa.get(t))){e.next=5;break}return e.abrupt("return",n);case 5:return n=sr(t,er.Geometry).then(function(e){var n=e.url,r=e.data,a=new xn(r,_n.Little),i=n.endsWith(".nj")?qn(a):Vn(a);return i.length?da(i[0]):(ya.warn("Could not parse ".concat(n," for ").concat(t.name,".")),ka)}).catch(function(e){return ya.warn("Could load geometry file for ".concat(t.name,"."),e),ka}),xa.set(t,n),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},{key:"get_object_tex",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t){var n;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Da.get(t))){e.next=5;break}return e.abrupt("return",n);case 5:return n=sr(t,er.Texture).then(function(e){var t=e.data;return wa(va(new xn(t,_n.Little)))}).catch(function(e){return ya.warn("Could load texture file for ".concat(t.name,"."),e),Ra}),Da.set(t,n),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()}]),e}());function Pa(e){return Ga.apply(this,arguments)}function Ga(){return(Ga=Object(Ge.a)(Pe.a.mark(function e(t){return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=new FileReader;r.addEventListener("loadend",function(){r.result instanceof ArrayBuffer?e(r.result):n(new Error("Couldn't read file."))}),r.readAsArrayBuffer(t)}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Ta,Aa,Wa=l.a.get("stores/QuestEditorStore"),Ua=new(Ba=function(){function e(){var t=this;Object(d.a)(this,e),Object(w.a)(this,"current_quest",Ma,this),Object(w.a)(this,"current_area",Fa,this),Object(w.a)(this,"selected_entity",Ia,this),this.set_quest=Object(y.d)("set_quest",function(e){t.reset_quest_state(),t.current_quest=e,e&&e.area_variants.length&&(t.current_area=e.area_variants[0].area)}),this.set_selected_entity=function(e){t.selected_entity=e},this.set_current_area_id=Object(y.d)("set_current_area_id",function(e){if(t.selected_entity=void 0,null==e)t.current_area=void 0;else if(t.current_quest){var n=t.current_quest.area_variants.find(function(t){return t.area.id===e});t.current_area=n&&n.area}}),this.load_file=function(){var e=Object(Ge.a)(Pe.a.mark(function e(n){var r,a,i,o,s,l,u,c;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pa(n);case 3:if(r=e.sent,a=Xr(new xn(r,_n.Little)),t.set_quest(a),!a){e.next=34;break}i=!0,o=!1,s=void 0,e.prev=10,l=Pe.a.mark(function e(){var n,r,i,o,s,l,u,d,p,h,_,m,f,v,w,b,y,k;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.value,e.next=3,Rr.get_area_sections(a.episode,n.area.id,n.id);case 3:r=e.sent,n.sections=r,i=!0,o=!1,s=void 0,e.prev=8,l=a.objects.filter(function(e){return e.area_id===n.area.id})[Symbol.iterator]();case 10:if(i=(u=l.next()).done){e.next=29;break}return d=u.value,e.prev=12,e.next=15,za.get_object_geometry(d.type);case 15:return p=e.sent,e.next=18,za.get_object_tex(d.type);case 18:h=e.sent,t.set_section_on_visible_quest_entity(d,r),d.object_3d=ta(d,p,h),e.next=26;break;case 23:e.prev=23,e.t0=e.catch(12),Wa.error(e.t0);case 26:i=!0,e.next=10;break;case 29:e.next=35;break;case 31:e.prev=31,e.t1=e.catch(8),o=!0,s=e.t1;case 35:e.prev=35,e.prev=36,i||null==l.return||l.return();case 38:if(e.prev=38,!o){e.next=41;break}throw s;case 41:return e.finish(38);case 42:return e.finish(35);case 43:_=!0,m=!1,f=void 0,e.prev=46,v=a.npcs.filter(function(e){return e.area_id===n.area.id})[Symbol.iterator]();case 48:if(_=(w=v.next()).done){e.next=67;break}return b=w.value,e.prev=50,e.next=53,za.get_npc_geometry(b.type);case 53:return y=e.sent,e.next=56,za.get_npc_tex(b.type);case 56:k=e.sent,t.set_section_on_visible_quest_entity(b,r),b.object_3d=na(b,y,k),e.next=64;break;case 61:e.prev=61,e.t2=e.catch(50),Wa.error(e.t2);case 64:_=!0,e.next=48;break;case 67:e.next=73;break;case 69:e.prev=69,e.t3=e.catch(46),m=!0,f=e.t3;case 73:e.prev=73,e.prev=74,_||null==v.return||v.return();case 76:if(e.prev=76,!m){e.next=79;break}throw f;case 79:return e.finish(76);case 80:return e.finish(73);case 81:case"end":return e.stop()}},e,null,[[8,31,35,43],[12,23],[36,,38,42],[46,69,73,81],[50,61],[74,,76,80]])}),u=a.area_variants[Symbol.iterator]();case 13:if(i=(c=u.next()).done){e.next=18;break}return e.delegateYield(l(),"t0",15);case 15:i=!0,e.next=13;break;case 18:e.next=24;break;case 20:e.prev=20,e.t1=e.catch(10),o=!0,s=e.t1;case 24:e.prev=24,e.prev=25,i||null==u.return||u.return();case 27:if(e.prev=27,!o){e.next=30;break}throw s;case 30:return e.finish(27);case 31:return e.finish(24);case 32:e.next=35;break;case 34:Wa.error("Couldn't parse quest file.");case 35:e.next=40;break;case 37:e.prev=37,e.t2=e.catch(0),Wa.error("Couldn't read file.",e.t2);case 40:case"end":return e.stop()}},e,null,[[0,37],[10,20,24,32],[25,,27,31]])}));return function(t){return e.apply(this,arguments)}}(),this.set_section_on_visible_quest_entity=function(){var e=Object(Ge.a)(Pe.a.mark(function e(t,n){var r,a,i,o,s,l,u,c,d,p,h;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=t.position,a=r.x,i=r.y,o=r.z,(s=n.find(function(e){return e.id===t.section_id}))?(l=s.position,u=l.x,c=l.y,d=l.z,p=s.cos_y_axis_rotation*a+s.sin_y_axis_rotation*o,h=-s.sin_y_axis_rotation*a+s.cos_y_axis_rotation*o,a=p+u,i+=c,o=h+d):Wa.warn("Section ".concat(t.section_id," not found.")),Object(y.n)(function(){t.section=s,t.position=new g(a,i,o)});case 4:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),this.save_current_quest_to_file=function(e){if(t.current_quest){var n=Jr(t.current_quest,e);e.endsWith(".qst")||(e+=".qst");var r=document.createElement("a");r.href=URL.createObjectURL(new Blob([n],{type:"application/octet-stream"})),r.download=e,document.body.appendChild(r),r.click(),URL.revokeObjectURL(r.href),document.body.removeChild(r)}}}return Object(p.a)(e,[{key:"reset_quest_state",value:function(){this.current_quest=void 0,this.current_area=void 0,this.selected_entity=void 0}}]),e}(),Ma=Object(b.a)(Ba.prototype,"current_quest",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Fa=Object(b.a)(Ba.prototype,"current_area",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ia=Object(b.a)(Ba.prototype,"selected_entity",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ba),Na=(n(393),Object(f.a)(Ta=function(e){function t(){return Object(d.a)(this,t),Object(h.a)(this,Object(_.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e=this.props.entity;if(e){var t=e.section?e.section.id:e.section_id,n=null;return e instanceof Se?n=a.a.createElement("tr",null,a.a.createElement("td",null,"Object: "),a.a.createElement("td",{colSpan:2},e.type.name)):e instanceof xe&&(n=a.a.createElement("tr",null,a.a.createElement("td",null,"NPC: "),a.a.createElement("td",null,e.type.name))),a.a.createElement("div",{className:"EntityInfoComponent-container"},a.a.createElement("table",{className:"EntityInfoComponent-table"},a.a.createElement("tbody",null,n,a.a.createElement("tr",null,a.a.createElement("td",null,"Section: "),a.a.createElement("td",null,t)),a.a.createElement("tr",null,a.a.createElement("td",{colSpan:2},"World position: ")),a.a.createElement("tr",null,a.a.createElement("td",{colSpan:2},a.a.createElement("table",null,a.a.createElement("tbody",null,a.a.createElement(Ha,{entity:e,position_type:"position",coord:"x"}),a.a.createElement(Ha,{entity:e,position_type:"position",coord:"y"}),a.a.createElement(Ha,{entity:e,position_type:"position",coord:"z"}))))),a.a.createElement("tr",null,a.a.createElement("td",{colSpan:2},"Section position: ")),a.a.createElement("tr",null,a.a.createElement("td",{colSpan:2},a.a.createElement("table",null,a.a.createElement("tbody",null,a.a.createElement(Ha,{entity:e,position_type:"section_position",coord:"x"}),a.a.createElement(Ha,{entity:e,position_type:"section_position",coord:"y"}),a.a.createElement(Ha,{entity:e,position_type:"section_position",coord:"z"}))))))))}return a.a.createElement("div",{className:"EntityInfoComponent-container"})}}]),t}(r.Component))||Ta),Ha=Object(f.a)(Aa=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).changed=function(e){if(null!=e){var t=n.props.entity,r=n.props.position_type,a=t[r].clone();a[n.props.coord]=e,t[r]=a}},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e=this.props.entity[this.props.position_type][this.props.coord];return a.a.createElement("tr",null,a.a.createElement("td",null,this.props.coord.toUpperCase(),": "),a.a.createElement("td",null,a.a.createElement(Ie.a,{value:e,size:"small",precision:3,className:"EntityInfoComponent-coord",onChange:this.changed})))}}]),t}(r.Component))||Aa;n(394),n(395);function qa(e){var t=e.quest;if(t){var n=4===t.episode?"IV":2===t.episode?"II":"I",r=new Map,i=!0,o=!1,s=void 0;try{for(var l,u=t.npcs[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value,d=r.get(c.type)||0;r.set(c.type,d+1)}}catch(_){o=!0,s=_}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}var p=8*(r.get(I.Canane)||0),h=Object(Ct.a)(r).sort(function(e,t){return e[0].id-t[0].id}).map(function(e){var t=Object(Lt.a)(e,2),n=t[0],r=t[1],i=n===I.Canadine?p:0;return a.a.createElement("tr",{key:n.id},a.a.createElement("td",null,n.name,":"),a.a.createElement("td",null,r+i))});return a.a.createElement("div",{className:"qe-QuestInfoComponent"},a.a.createElement("table",null,a.a.createElement("tbody",null,a.a.createElement("tr",null,a.a.createElement("th",null,"Name:"),a.a.createElement("td",null,t.name)),a.a.createElement("tr",null,a.a.createElement("th",null,"Episode:"),a.a.createElement("td",null,n)),a.a.createElement("tr",null,a.a.createElement("td",{colSpan:2},a.a.createElement("pre",null,t.short_description))),a.a.createElement("tr",null,a.a.createElement("td",{colSpan:2},a.a.createElement("pre",null,t.long_description))))),a.a.createElement("div",{className:"qe-QuestInfoComponent-npc-counts-container"},a.a.createElement("table",null,a.a.createElement("thead",null,a.a.createElement("tr",null,a.a.createElement("th",{colSpan:2},"NPC Counts"))),a.a.createElement("tbody",null,h))))}return a.a.createElement("div",{className:"qe-QuestInfoComponent"})}n(396);var Va,Za=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).modifyDom=function(e){e&&(n.props.renderer.set_size(e.clientWidth,e.clientHeight),e.appendChild(n.props.renderer.dom_element))},n.onResize=function(){var e=n.props.renderer.dom_element.parentNode;n.props.renderer.set_size(e.clientWidth,e.clientHeight)},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e="RendererComponent";return this.props.className&&(e+=" "+this.props.className),a.a.createElement("div",{className:e,ref:this.modifyDom})}},{key:"componentDidMount",value:function(){window.addEventListener("resize",this.onResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onResize),this.props.on_will_unmount&&this.props.on_will_unmount()}},{key:"shouldComponentUpdate",value:function(){return!1}}]),t}(r.Component),Ya=n(77),Ka=n(228),Qa=n.n(Ka)()(Kn),Xa=function(){function e(t){var n=this;Object(d.a)(this,e),this.camera=void 0,this.controls=void 0,this.scene=new Kn.Scene,this.light_holder=new Kn.Group,this.renderer=new Kn.WebGLRenderer({antialias:!0}),this.render_scheduled=!1,this.light=new Kn.HemisphereLight(16777215,5263440,1.2),this.schedule_render=function(){n.render_scheduled||(n.render_scheduled=!0,requestAnimationFrame(n.call_render))},this.call_render=function(){n.render_scheduled=!1,n.render()},this.renderer.setPixelRatio(window.devicePixelRatio),this.camera=t,this.controls=new Qa(this.camera,this.renderer.domElement),this.controls.mouseButtons.ORBIT=Kn.MOUSE.RIGHT,this.controls.mouseButtons.PAN=Kn.MOUSE.LEFT,this.controls.addEventListener("change",this.schedule_render),this.scene.background=new Kn.Color(1383457),this.light_holder.add(this.light),this.scene.add(this.light_holder)}return Object(p.a)(e,[{key:"set_size",value:function(e,t){this.renderer.setSize(e,t),this.schedule_render()}},{key:"render",value:function(){this.renderer.render(this.scene,this.camera)}},{key:"reset_camera",value:function(e,t){this.controls.reset(),this.camera.position.copy(e),this.camera.lookAt(t)}},{key:"pointer_pos_to_device_coords",value:function(e){var t=new Kn.Vector2;return this.renderer.getSize(t),t.width=e.offsetX/t.width*2-1,t.height=e.offsetY/t.height*-2+1,t}},{key:"dom_element",get:function(){return this.renderer.domElement}}]),e}();var Ja,$a,ei,ti,ni=function(e){function t(){var e;return Object(d.a)(this,t),(e=Object(h.a)(this,Object(_.a)(t).call(this,new Kn.PerspectiveCamera(60,1,10,1e4)))).raycaster=new Kn.Raycaster,e.quest=void 0,e.area=void 0,e.entity_reaction_disposers=[],e.collision_geometry=new Kn.Object3D,e.render_geometry=new Kn.Object3D,e.obj_geometry=new Kn.Object3D,e.npc_geometry=new Kn.Object3D,e.hovered_data=void 0,e.selected_data=void 0,e.on_mouse_down=function(t){var n=e.selected_data,r=e.pick_entity(e.pointer_pos_to_device_coords(t));if(e.hovered_data&&(!r||r.object!==e.hovered_data.object)){var a=e.get_color(e.hovered_data.entity,"hover"),i=!0,o=!1,s=void 0;try{for(var l,u=e.hovered_data.object.material[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){l.value.color.set(a)}}catch(R){o=!0,s=R}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}if(e.selected_data&&(!r||r.object!==e.selected_data.object)){var c=e.get_color(e.selected_data.entity,"normal"),d=!0,p=!1,h=void 0;try{for(var _,m=e.selected_data.object.material[Symbol.iterator]();!(d=(_=m.next()).done);d=!0){var f=_.value;f.map?f.color.set(16777215):f.color.set(c)}}catch(R){p=!0,h=R}finally{try{d||null==m.return||m.return()}finally{if(p)throw h}}e.selected_data.manipulating=!1}if(r){var v=e.get_color(r.entity,"selected"),w=!0,b=!1,y=void 0;try{for(var k,g=r.object.material[Symbol.iterator]();!(w=(k=g.next()).done);w=!0){k.value.color.set(v)}}catch(R){b=!0,y=R}finally{try{w||null==g.return||g.return()}finally{if(b)throw y}}r.manipulating=!0,e.hovered_data=r,e.selected_data=r,e.controls.enabled=!1}else e.hovered_data=void 0,e.selected_data=void 0,e.controls.enabled=!0;(n&&r?n.object!==r.object:n!==r)&&(Ua.set_selected_entity(r&&r.entity),e.schedule_render())},e.on_mouse_up=function(){e.selected_data&&(e.selected_data.manipulating=!1,e.controls.enabled=!0,e.schedule_render())},e.on_mouse_move=function(t){var n=e.pointer_pos_to_device_coords(t);if(e.selected_data&&e.selected_data.manipulating){if(1===t.buttons){var r=e.selected_data;if(t.shiftKey){e.raycaster.setFromCamera(n,e.camera);var a=e.raycaster.ray,i=e.camera.getWorldDirection(new Kn.Vector3).negate(),o=(new Kn.Plane).setFromNormalAndCoplanarPoint(new Kn.Vector3(i.x,0,i.z).normalize(),r.object.position.sub(r.grab_offset)),s=new Kn.Vector3;if(a.intersectPlane(o,s)){var l=s.y+r.grab_offset.y,u=l-r.entity.position.y;r.drag_y+=u,r.drag_adjust.y-=u,r.entity.position=new g(r.entity.position.x,l,r.entity.position.z)}}else{var c=e.pick_terrain(n,r),d=c.intersection,p=c.section;if(d)Object(y.n)(function(){r.entity.position=new g(d.point.x,d.point.y+r.drag_y,d.point.z),r.entity.section=p});else{e.raycaster.setFromCamera(n,e.camera);var h=e.raycaster.ray,_=new Kn.Plane(new Kn.Vector3(0,1,0),-r.entity.position.y+r.grab_offset.y),m=new Kn.Vector3;h.intersectPlane(_,m)&&(r.entity.position=new g(m.x+r.grab_offset.x,r.entity.position.y,m.z+r.grab_offset.z))}}}e.schedule_render()}else{var f=e.hovered_data,v=e.pick_entity(n);if(f&&(!v||v.object!==f.object)){if(!e.selected_data||f.object!==e.selected_data.object){var w=e.get_color(f.entity,"normal"),b=!0,k=!1,R=void 0;try{for(var j,O=f.object.material[Symbol.iterator]();!(b=(j=O.next()).done);b=!0){var S=j.value;S.map?S.color.set(16777215):S.color.set(w)}}catch(M){k=!0,R=M}finally{try{b||null==O.return||O.return()}finally{if(k)throw R}}}e.hovered_data=void 0,e.schedule_render()}if(v&&(!f||v.object!==f.object)){if(!e.selected_data||v.object!==e.selected_data.object){var x=e.get_color(v.entity,"hover"),D=!0,E=!1,C=void 0;try{for(var L,B=v.object.material[Symbol.iterator]();!(D=(L=B.next()).done);D=!0){L.value.color.set(x)}}catch(M){E=!0,C=M}finally{try{D||null==B.return||B.return()}finally{if(E)throw C}}}e.hovered_data=v,e.schedule_render()}}},e.dom_element.addEventListener("mousedown",e.on_mouse_down),e.dom_element.addEventListener("mouseup",e.on_mouse_up),e.dom_element.addEventListener("mousemove",e.on_mouse_move),e.scene.add(e.obj_geometry),e.scene.add(e.npc_geometry),Object(y.e)(function(){e.set_quest_and_area(Ua.current_quest,Ua.current_area)}),e}return Object(m.a)(t,e),Object(p.a)(t,[{key:"set_quest_and_area",value:function(e,t){this.area=t,this.quest=e,this.update_geometry()}},{key:"set_size",value:function(e,n){this.camera.aspect=e/n,this.camera.updateProjectionMatrix(),Object(Ya.a)(Object(_.a)(t.prototype),"set_size",this).call(this,e,n)}},{key:"update_geometry",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(){var t,n,r,a,i,o,s,l,u,c,d,p,h,_,m,f,v,w;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.dispose_entity_reactions(),this.scene.remove(this.obj_geometry),this.scene.remove(this.npc_geometry),this.obj_geometry=new Kn.Object3D,this.npc_geometry=new Kn.Object3D,this.scene.add(this.obj_geometry),this.scene.add(this.npc_geometry),this.scene.remove(this.collision_geometry),!this.quest||!this.area){e.next=62;break}for(t=!0,n=!1,r=void 0,e.prev=12,a=this.quest.objects[Symbol.iterator]();!(t=(i=a.next()).done);t=!0)o=i.value,this.update_entity_geometry(o,this.obj_geometry);e.next=20;break;case 16:e.prev=16,e.t0=e.catch(12),n=!0,r=e.t0;case 20:e.prev=20,e.prev=21,t||null==a.return||a.return();case 23:if(e.prev=23,!n){e.next=26;break}throw r;case 26:return e.finish(23);case 27:return e.finish(20);case 28:for(s=!0,l=!1,u=void 0,e.prev=31,c=this.quest.npcs[Symbol.iterator]();!(s=(d=c.next()).done);s=!0)p=d.value,this.update_entity_geometry(p,this.npc_geometry);e.next=39;break;case 35:e.prev=35,e.t1=e.catch(31),l=!0,u=e.t1;case 39:e.prev=39,e.prev=40,s||null==c.return||c.return();case 42:if(e.prev=42,!l){e.next=45;break}throw u;case 45:return e.finish(42);case 46:return e.finish(39);case 47:return h=this.quest.episode,_=this.area.id,m=this.quest.area_variants.find(function(e){return e.area.id===_}),f=m&&m.id||0,e.next=53,Rr.get_area_collision_geometry(h,_,f);case 53:return v=e.sent,this.scene.remove(this.collision_geometry),this.reset_camera(new Kn.Vector3(0,800,700),new Kn.Vector3(0,0,0)),this.collision_geometry=v,this.scene.add(v),e.next=60,Rr.get_area_render_geometry(h,_,f);case 60:w=e.sent,this.render_geometry=w;case 62:case"end":return e.stop()}},e,this,[[12,16,20,28],[21,,23,27],[31,35,39,47],[40,,42,46]])}));return function(){return e.apply(this,arguments)}}()},{key:"update_entity_geometry",value:function(e,t){var n=this;this.area&&e.area_id===this.area.id&&this.entity_reaction_disposers.push(Object(y.r)(function(){return void 0!=e.object_3d},function(){var r=e.object_3d;t.add(r),n.entity_reaction_disposers.push(Object(y.e)(function(){var t=e.position,a=t.x,i=t.y,o=t.z;r.position.set(a,i,o);var s=e.rotation;r.rotation.set(s.x,s.y,s.z),n.schedule_render()})),n.schedule_render()}))}},{key:"dispose_entity_reactions",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,a=this.entity_reaction_disposers[Symbol.iterator]();!(e=(r=a.next()).done);e=!0){(0,r.value)()}}catch(i){t=!0,n=i}finally{try{e||null==a.return||a.return()}finally{if(t)throw n}}}},{key:"pick_entity",value:function(e){this.raycaster.setFromCamera(e,this.camera);var t=this.raycaster.intersectObjects(this.obj_geometry.children),n=Object(Lt.a)(t,1)[0],r=this.raycaster.intersectObjects(this.npc_geometry.children),a=Object(Lt.a)(r,1)[0];if(n||a){var i=(n?n.distance:1/0)<(a?a.distance:1/0)?n:a,o=i.object.userData.entity,s=i.object.position.clone().sub(i.point),l=s.clone(),u=0;this.raycaster.set(i.object.position,new Kn.Vector3(0,-1,0));var c=this.raycaster.intersectObjects(this.collision_geometry.children,!0),d=Object(Lt.a)(c,1)[0];return d&&(l.sub(new Kn.Vector3(0,d.distance,0)),u+=d.distance),{object:i.object,entity:o,grab_offset:s,drag_adjust:l,drag_y:u,manipulating:!1}}}},{key:"pick_terrain",value:function(e,t){this.raycaster.setFromCamera(e,this.camera),this.raycaster.ray.origin.add(t.drag_adjust);var n=this.raycaster.intersectObjects(this.collision_geometry.children,!0),r=!0,a=!1,i=void 0;try{for(var o,s=n[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;if(l.face.normal.y>.75){this.raycaster.set(l.point.clone().setY(1e3),new Kn.Vector3(0,-1,0));var u=this.raycaster.intersectObjects(this.render_geometry.children,!0).filter(function(e){return e.object.userData.section.id>=0});return{intersection:l,section:u[0]&&u[0].object.userData.section}}}}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return{}}},{key:"get_color",value:function(e,t){var n=e instanceof xe;switch(t){default:case"normal":return n?ea:$r;case"hover":return n?16727903:16768831;case"selected":return n?16711764:16755200}}}]),t}(Xa),ri=Object(f.a)(Ja=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).state={save_dialog_open:!1,save_dialog_filename:"Untitled"},n.save_as_clicked=function(e){var t=e?e.endsWith(".qst")?e.slice(0,-4):e:n.state.save_dialog_filename;n.setState({save_dialog_open:!0,save_dialog_filename:t})},n.save_dialog_filename_changed=function(e){n.setState({save_dialog_filename:e})},n.save_dialog_affirmed=function(){Ua.save_current_quest_to_file(n.state.save_dialog_filename),n.setState({save_dialog_open:!1})},n.save_dialog_cancelled=function(){n.setState({save_dialog_open:!1})},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e=Ua.current_quest;return a.a.createElement("div",{className:"qe-QuestEditorComponent"},a.a.createElement(ai,{onSaveAsClicked:this.save_as_clicked}),a.a.createElement("div",{className:"qe-QuestEditorComponent-main"},a.a.createElement(qa,{quest:e}),a.a.createElement(Za,{renderer:(Va||(Va=new ni),Va)}),a.a.createElement(Na,{entity:Ua.selected_entity})),a.a.createElement(ii,{is_open:this.state.save_dialog_open,filename:this.state.save_dialog_filename,on_filename_change:this.save_dialog_filename_changed,on_ok:this.save_dialog_affirmed,on_cancel:this.save_dialog_cancelled}))}}]),t}(r.Component))||Ja,ai=Object(f.a)($a=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).state={filename:void 0},n.set_filename=function(e){e.file.originFileObj&&(n.setState({filename:e.file.name}),Ua.load_file(e.file.originFileObj))},n.save_as_clicked=function(){n.props.onSaveAsClicked(n.state.filename)},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e=Ua.current_quest,t=e&&Array.from(e.area_variants).map(function(e){return e.area}),n=Ua.current_area,r=n&&n.id;return a.a.createElement("div",{className:"qe-QuestEditorComponent-toolbar"},a.a.createElement(bn.a,{accept:".qst",showUploadList:!1,onChange:this.set_filename,customRequest:function(){return!1}},a.a.createElement(Dt.a,{icon:"file"},this.state.filename||"Open file...")),t&&a.a.createElement(u.a,{onChange:Ua.set_current_area_id,value:r,style:{width:200}},t.map(function(e){return a.a.createElement(u.a.Option,{key:e.id,value:e.id},e.name)})),e&&a.a.createElement(Dt.a,{icon:"save",onClick:this.save_as_clicked},"Save as..."))}}]),t}(r.Component))||$a,ii=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).name_changed=function(e){n.props.on_filename_change(e.currentTarget.value)},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return a.a.createElement(mn.a,{title:a.a.createElement(a.a.Fragment,null,a.a.createElement(wn.a,{type:"save"})," Save as..."),visible:this.props.is_open,onOk:this.props.on_ok,onCancel:this.props.on_cancel},a.a.createElement(fn.a,{layout:"vertical"},a.a.createElement(fn.a.Item,{label:"Name"},a.a.createElement(vn.a,{autoFocus:!0,maxLength:12,value:this.props.filename,onChange:this.name_changed}))))}}]),t}(a.a.Component),oi=(n(524),n(235)),si=1296321870;function li(e,t){return e.u32()===si?function(e,t){var n=e.u32();return ui(e.take(n),t)}(e,t):(e.seek_start(0),function(e,t){e.seek_end(16);var n=e.u32();e.seek_start(n);var r=e.u32();return e.seek_start(r),function(e,t){e.seek(4);var n=e.u32();return e.seek_start(n),ui(e,t)}(e,t)}(e,t))}function ui(e,t){for(var n=e.u32(),r=e.u32(),a=e.u16(),i=e.u16(),o=(192&i)>>6,s=15&i,l=[],u=0;u<t;u++){e.seek_start(n),n=n+=8*s;var c={tracks:[]};l.push(c);for(var d=[],p=[],h=0;h<s;h++)d.push(e.u32());for(var _=0;_<s;_++){var m=e.u32();p.push(m)}if(1&a){e.seek_start(d.shift());var f=p.shift();f&&c.tracks.push({type:ti.Position,keyframes:ci(e,f)})}if(2&a){e.seek_start(d.shift());var v=p.shift();v&&c.tracks.push({type:ti.Rotation,keyframes:di(e,v,r)})}if(4&a){e.seek_start(d.shift());var w=p.shift();w&&c.tracks.push({type:ti.Scale,keyframes:ci(e,w)})}}return{motion_data:l,frame_count:r,type:a,interpolation:o,element_count:s}}function ci(e,t){for(var n=[],r=0;r<t;++r)n.push({frame:e.u32(),value:new g(e.f32(),e.f32(),e.f32())});return n}function di(e,t,n){for(var r=[],a=e.position,i=0;i<t;++i)r.push({frame:e.u16(),value:new g(e.u16()*Un,e.u16()*Un,e.u16()*Un)});for(var o=-1,s=0,l=r;s<l.length;s++){var u=l[s].frame;if(u<o||u>=n)return e.seek_start(a),pi(e,t);o=u}return r}function pi(e,t){for(var n=[],r=0;r<t;++r)n.push({frame:e.u32(),value:new g(e.i32()*Un,e.i32()*Un,e.i32()*Un)});return n}!function(e){e[e.Linear=0]="Linear",e[e.Spline=1]="Spline",e[e.UserFunction=2]="UserFunction"}(ei||(ei={})),function(e){e[e.Position=0]="Position",e[e.Rotation=1]="Rotation",e[e.Scale=2]="Scale"}(ti||(ti={}));var hi,_i,mi,fi,vi,wi,bi,yi,ki,gi,Ri,ji,Oi,Si,xi,Di,Ei=30;function Ci(e,t){var n=t.interpolation===ei.Spline?Kn.InterpolateSmooth:Kn.InterpolateLinear,r=[];return t.motion_data.forEach(function(t,a){var i=e.get_bone(a);i&&t.tracks.forEach(function(e){var t=e.type,o=e.keyframes,s=[],l=[],u=!0,c=!1,d=void 0;try{for(var p,h=o[Symbol.iterator]();!(u=(p=h.next()).done);u=!0){var _=p.value;if(s.push(_.frame/Ei),t===ti.Rotation){var m=i.evaluation_flags.zxy_rotation_order?"ZXY":"ZYX",f=(new Kn.Quaternion).setFromEuler(new Kn.Euler(_.value.x,_.value.y,_.value.z,m));l.push(f.x,f.y,f.z,f.w)}else l.push(_.value.x,_.value.y,_.value.z)}}catch(w){c=!0,d=w}finally{try{u||null==h.return||h.return()}finally{if(c)throw d}}if(t===ti.Rotation)r.push(new Kn.QuaternionKeyframeTrack(".bones[".concat(a,"].quaternion"),s,l,n));else{var v=t===ti.Position?".bones[".concat(a,"].position"):".bones[".concat(a,"].scale");r.push(new Kn.VectorKeyframeTrack(v,s,l,n))}})}),new Kn.AnimationClip("Animation",(t.frame_count-1)/Ei,r).optimize()}var Li,Bi,Mi=l.a.get("stores/ModelViewerStore"),Fi=new Map,Ii=new Map,zi=new(hi=y.m.ref,_i=y.m.ref,mi=y.m.ref,fi=y.m.ref,vi=y.m.ref,wi=function(){function e(){var t=this;Object(d.a)(this,e),this.models=[new Me("HUmar",1,10,new Set([6])),new Me("HUnewearl",1,10,new Set),new Me("HUcast",5,0,new Set),new Me("HUcaseal",5,0,new Set),new Me("RAmar",1,10,new Set([0,1,2,3,4,5,6,7,8,9])),new Me("RAmarl",1,10,new Set([0,1,2,3,4,5,6,7,8,9])),new Me("RAcast",5,0,new Set),new Me("RAcaseal",5,0,new Set),new Me("FOmar",1,10,new Set([0,1,2,3,4,5,6,7,8,9])),new Me("FOmarl",1,10,new Set([0,1,2,3,4,5,6,7,8,9])),new Me("FOnewm",1,10,new Set([0,1,2,3,4,5,6,7,8,9])),new Me("FOnewearl",1,10,new Set([0,1,2,3,4,5,6,7,8,9]))],this.animations=new Array(572).fill(void 0).map(function(e,t){return new Fe(t,"Animation ".concat(t+1))}),this.clock=new Kn.Clock,Object(w.a)(this,"current_player_model",bi,this),Object(w.a)(this,"current_model",yi,this),Object(w.a)(this,"current_bone_count",ki,this),Object(w.a)(this,"current_obj3d",gi,this),Object(w.a)(this,"animation",Ri,this),Object(w.a)(this,"animation_playing",ji,this),Object(w.a)(this,"animation_frame_rate",Oi,this),Object(w.a)(this,"animation_frame",Si,this),Object(w.a)(this,"animation_frame_count",xi,this),this.has_skeleton=!1,Object(w.a)(this,"show_skeleton",Di,this),this.set_animation_frame_rate=Object(y.d)("set_animation_frame_rate",function(e){t.animation&&(t.animation.mixer.timeScale=e/Ei,t.animation_frame_rate=e)}),this.set_animation_frame=Object(y.d)("set_animation_frame",function(e){if(t.animation){var n=t.animation_frame_count;e>n&&(e=1),e<1&&(e=n),t.animation.action.time=(e-1)/Ei,t.animation_frame=e}}),this.load_model=function(){var e=Object(Ge.a)(Pe.a.mark(function e(n){var r;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.get_player_ninja_object(n);case 2:r=e.sent,t.set_model(r,!0,n),t.current_bone_count=64;case 5:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),this.load_animation=function(){var e=Object(Ge.a)(Pe.a.mark(function e(n){var r;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.get_nj_motion(n);case 2:r=e.sent,t.current_model&&t.set_animation(Ci(t.current_model,r),n);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),this.load_file=function(){var e=Object(Ge.a)(Pe.a.mark(function e(n){var r,a,i,o,s,l;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pa(n);case 3:r=e.sent,a=new xn(r,_n.Little),n.name.endsWith(".nj")?(i=qn(a)[0],t.set_model(i,!0)):n.name.endsWith(".xj")?(o=Vn(a)[0],t.set_model(o,!1)):n.name.endsWith(".njm")?t.current_model&&(s=li(a,t.current_bone_count),t.set_animation(Ci(t.current_model,s))):n.name.endsWith(".xvm")?t.current_model&&(l=va(a),t.set_textures(wa(l))):Mi.error('Unknown file extension in filename "'.concat(n.name,'".')),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),Mi.error("Couldn't read file.",e.t0);case 11:case"end":return e.stop()}},e,null,[[0,8]])}));return function(t){return e.apply(this,arguments)}}(),this.pause_animation=Object(y.d)("pause_animation",function(){t.animation&&(t.animation.action.paused=!0,t.animation_playing=!1,t.clock.stop())}),this.toggle_animation_playing=Object(y.d)("toggle_animation_playing",function(){t.animation&&(t.animation.action.paused=!t.animation.action.paused,t.animation_playing=!t.animation.action.paused,t.animation_playing?t.clock.start():t.clock.stop())}),this.update_animation_frame=Object(y.d)("update_animation_frame",function(){if(t.animation&&t.animation_playing){var e=t.animation.action.time;t.animation_frame=Math.round(e*Ei)+1}}),this.set_animation=Object(y.d)("set_animation",function(e,n){var r;t.current_obj3d&&t.current_obj3d instanceof Kn.SkinnedMesh&&(t.animation?(t.animation.mixer.stopAllAction(),r=t.animation.mixer):r=new Kn.AnimationMixer(t.current_obj3d),t.animation={player_animation:n,mixer:r,clip:e,action:r.clipAction(e)},t.clock.start(),t.animation.action.play(),t.animation_playing=!0,t.animation_frame_count=Math.round(Ei*e.duration)+1)}),this.set_model=Object(y.d)("set_model",function(e,n,r){t.current_obj3d&&t.animation&&(t.animation.mixer.stopAllAction(),t.animation.mixer.uncacheRoot(t.current_obj3d),t.animation=void 0),t.current_player_model=r,t.current_model=e,t.current_bone_count=e.bone_count(),t.has_skeleton=n,t.set_obj3d()}),this.set_textures=Object(y.d)("set_textures",function(e){t.set_obj3d(e)}),this.set_obj3d=function(e){if(t.current_model){var n,r=new Kn.Vector3,a=e&&e.map(function(e){return new Kn.MeshLambertMaterial({skinning:t.has_skeleton,map:e,side:Kn.DoubleSide,alphaTest:.5})});(n=t.has_skeleton?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new ha(t).create_skinned_mesh(e)}(t.current_model,a):function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new ha(t).create_mesh(e)}(t.current_model,a)).geometry.boundingBox.getSize(r),n.translateY(-r.y/2),t.current_obj3d=n}}}return Object(p.a)(e,[{key:"add_to_bone",value:function(e,t,n){var r=e.get_bone(n);r&&(r.evaluation_flags.hidden=!1,r.evaluation_flags.break_child_trace=!1,r.children.push(t))}},{key:"get_player_ninja_object",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t){var n;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Fi.get(t.name))){e.next=5;break}return e.abrupt("return",n);case 5:return n=this.get_all_assets(t),Fi.set(t.name,n),e.abrupt("return",n);case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"get_all_assets",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t){var n,r,a,i,o,s,l,u;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ur(t.name,"Body");case 2:if(n=e.sent,r=qn(new xn(n,_n.Little))[0]){e.next=6;break}throw new Error("Couldn't parse body for player class ".concat(t.name,"."));case 6:return e.next=8,ur(t.name,"Head",0);case 8:if(a=e.sent,(i=qn(new xn(a,_n.Little))[0])&&this.add_to_bone(r,i,59),!(t.hair_styles_count>0)){e.next=23;break}return e.next=14,ur(t.name,"Hair",0);case 14:if(o=e.sent,(s=qn(new xn(o,_n.Little))[0])&&this.add_to_bone(r,s,59),!t.hair_styles_with_accessory.has(0)){e.next=23;break}return e.next=20,ur(t.name,"Accessory",0);case 20:l=e.sent,(u=qn(new xn(l,_n.Little))[0])&&this.add_to_bone(r,u,59);case 23:return e.abrupt("return",r);case 24:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"get_nj_motion",value:function(){var e=Object(Ge.a)(Pe.a.mark(function e(t){var n,r=this;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Ii.get(t.id))){e.next=5;break}return e.abrupt("return",n);case 5:return n=dr(t.id).then(function(e){return li(new xn(e,_n.Little),r.current_bone_count)}),Ii.set(t.id,n),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),bi=Object(b.a)(wi.prototype,"current_player_model",[hi],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yi=Object(b.a)(wi.prototype,"current_model",[_i],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ki=Object(b.a)(wi.prototype,"current_bone_count",[mi],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),gi=Object(b.a)(wi.prototype,"current_obj3d",[fi],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ri=Object(b.a)(wi.prototype,"animation",[vi],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ji=Object(b.a)(wi.prototype,"animation_playing",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Oi=Object(b.a)(wi.prototype,"animation_frame_rate",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Ei}}),Si=Object(b.a)(wi.prototype,"animation_frame",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),xi=Object(b.a)(wi.prototype,"animation_frame_count",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Di=Object(b.a)(wi.prototype,"show_skeleton",[y.m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),wi),Pi=(n(526),Object(f.a)(Li=function(e){function t(){return Object(d.a)(this,t),Object(h.a)(this,Object(_.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return a.a.createElement("section",{className:"v-m-AnimationSelectionComponent"},a.a.createElement("ul",null,zi.animations.map(function(e){var t=zi.animation&&zi.animation.player_animation&&zi.animation.player_animation.id===e.id;return a.a.createElement("li",{key:e.id,className:t?"selected":void 0,onClick:function(){return zi.load_animation(e)}},e.name)})))}}]),t}(r.Component))||Li),Gi=(n(539),n(132)),Ti=(n(530),function(e){function t(){return Object(d.a)(this,t),Object(h.a)(this,Object(_.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return a.a.createElement("section",{className:"v-m-ModelSelectionComponent"},a.a.createElement(Gi.a,{itemLayout:"horizontal",dataSource:zi.models,size:"small",renderItem:function(e){var t=zi.current_player_model===e;return a.a.createElement(Gi.a.Item,{onClick:function(){return zi.load_model(e)}},a.a.createElement(Gi.a.Item.Meta,{title:a.a.createElement("span",{className:"v-m-ModelSelectionComponent-model"+(t?" selected":"")},e.name)}))}}))}}]),t}(r.Component));n(531);var Ai,Wi,Ui,Ni,Hi,qi,Vi=function(e){function t(){var e;return Object(d.a)(this,t),(e=Object(h.a)(this,Object(_.a)(t).call(this,new Kn.PerspectiveCamera(75,1,1,200)))).model=void 0,e.skeleton_helper=void 0,Object(y.e)(function(){e.set_model(zi.current_obj3d);var t=zi.show_skeleton;e.skeleton_helper&&(e.skeleton_helper.visible=t,e.schedule_render()),zi.animation&&e.schedule_render(),zi.animation_playing||(zi.animation_frame,e.schedule_render())}),e}return Object(m.a)(t,e),Object(p.a)(t,[{key:"set_size",value:function(e,n){this.camera.aspect=e/n,this.camera.updateProjectionMatrix(),Object(Ya.a)(Object(_.a)(t.prototype),"set_size",this).call(this,e,n)}},{key:"render",value:function(){zi.animation&&(zi.animation.mixer.update(zi.clock.getDelta()),zi.update_animation_frame()),this.light_holder.quaternion.copy(this.camera.quaternion),Object(Ya.a)(Object(_.a)(t.prototype),"render",this).call(this),zi.animation&&!zi.animation.action.paused&&this.schedule_render()}},{key:"set_model",value:function(e){this.model!==e&&(this.model&&(this.scene.remove(this.model),this.scene.remove(this.skeleton_helper),this.skeleton_helper=void 0),e&&(this.scene.add(e),this.skeleton_helper=new Kn.SkeletonHelper(e),this.skeleton_helper.visible=zi.show_skeleton,this.skeleton_helper.material.linewidth=3,this.scene.add(this.skeleton_helper),this.reset_camera(new Kn.Vector3(0,10,20),new Kn.Vector3(0,0,0))),this.model=e,this.schedule_render())}}]),t}(Xa),Zi=Object(f.a)(Ai=function(e){function t(){return Object(d.a)(this,t),Object(h.a)(this,Object(_.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(p.a)(t,[{key:"componentDidMount",value:function(){zi.current_model||zi.load_model(zi.models[5])}},{key:"render",value:function(){return a.a.createElement("div",{className:"v-m-ModelViewerComponent"},a.a.createElement(Yi,null),a.a.createElement("div",{className:"v-m-ModelViewerComponent-main"},a.a.createElement(Ti,null),a.a.createElement(Pi,null),a.a.createElement(Za,{renderer:(Bi||(Bi=new Vi),Bi),on_will_unmount:zi.pause_animation})))}}]),t}(r.Component))||Ai,Yi=Object(f.a)(Wi=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).state={filename:void 0},n.load_file=function(e){e.file.originFileObj&&(n.setState({filename:e.file.name}),zi.load_file(e.file.originFileObj))},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return a.a.createElement("div",{className:"v-m-ModelViewerComponent-toolbar"},a.a.createElement(bn.a,{accept:".nj, .njm, .xj, .xvm",showUploadList:!1,onChange:this.load_file,customRequest:function(){return!1}},a.a.createElement(Dt.a,{icon:"file"},this.state.filename||"Open file...")),zi.animation&&a.a.createElement(a.a.Fragment,null,a.a.createElement(Dt.a,{icon:zi.animation_playing?"pause":"caret-right",onClick:zi.toggle_animation_playing},zi.animation_playing?"Pause animation":"Play animation"),a.a.createElement("div",{className:"group"},a.a.createElement("span",null,"Frame rate:"),a.a.createElement(Ie.a,{value:zi.animation_frame_rate,onChange:function(e){return zi.set_animation_frame_rate(e||0)},min:1,step:1})),a.a.createElement("div",{className:"group"},a.a.createElement("span",null,"Frame:"),a.a.createElement(Ie.a,{value:zi.animation_frame,onChange:function(e){return zi.set_animation_frame(e||0)},step:1}),a.a.createElement("span",null,"/ ",zi.animation_frame_count))),a.a.createElement("div",{className:"group"},a.a.createElement("span",null,"Show skeleton:"),a.a.createElement(oi.a,{checked:zi.show_skeleton,onChange:function(e){return zi.show_skeleton=e}})))}}]),t}(r.Component))||Wi,Ki=(n(533),l.a.get("stores/TextureViewerStore")),Qi=new(Ui=y.m.ref,Ni=function e(){var t=this;Object(d.a)(this,e),Object(w.a)(this,"current_xvm",Hi,this),this.load_file=function(){var e=Object(Ge.a)(Pe.a.mark(function e(n){var r;return Pe.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pa(n);case 3:r=e.sent,t.current_xvm=va(new xn(r,_n.Little)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),Ki.error("Couldn't read file.",e.t0);case 10:case"end":return e.stop()}},e,null,[[0,7]])}));return function(t){return e.apply(this,arguments)}}()},Hi=Object(b.a)(Ni.prototype,"current_xvm",[Ui],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ni),Xi=l.a.get("rendering/TextureRenderer");var Ji,$i,eo=function(e){function t(){var e;return Object(d.a)(this,t),(e=Object(h.a)(this,Object(_.a)(t).call(this,new Kn.OrthographicCamera(-400,400,300,-300,1,10)))).quad_meshes=[],e.render_textures=function(t){var n=10*(t.textures.length-1),r=0,a=!0,i=!1,o=void 0;try{for(var s,l=t.textures[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var u=s.value;n+=u.width,r=Math.max(r,u.height)}}catch(y){i=!0,o=y}finally{try{a||null==l.return||l.return()}finally{if(i)throw o}}var c=-Math.floor(n/2),d=-Math.floor(r/2),p=!0,h=!1,_=void 0;try{for(var m,f=t.textures[Symbol.iterator]();!(p=(m=f.next()).done);p=!0){var v=m.value,w=void 0;try{w=ba(v)}catch(k){Xi.warn("Couldn't convert XVM texture.",k)}var b=new Kn.Mesh(e.create_quad(c,d+Math.floor((r-v.height)/2),v.width,v.height),w?new Kn.MeshBasicMaterial({map:w,transparent:!0}):new Kn.MeshBasicMaterial({color:16711935}));e.quad_meshes.push(b),e.scene.add(b),c+=10+v.width}}catch(y){h=!0,_=y}finally{try{p||null==f.return||f.return()}finally{if(h)throw _}}},e.controls.enableRotate=!1,Object(y.e)(function(){var t;(t=e.scene).remove.apply(t,Object(Ct.a)(e.quad_meshes));var n=Qi.current_xvm;n&&e.render_textures(n),e.reset_camera(new Kn.Vector3(0,0,5),new Kn.Vector3),e.schedule_render()}),e}return Object(m.a)(t,e),Object(p.a)(t,[{key:"set_size",value:function(e,n){this.camera.left=-Math.floor(e/2),this.camera.right=Math.ceil(e/2),this.camera.top=Math.floor(n/2),this.camera.bottom=-Math.ceil(n/2),this.camera.updateProjectionMatrix(),Object(Ya.a)(Object(_.a)(t.prototype),"set_size",this).call(this,e,n)}},{key:"create_quad",value:function(e,t,n,r){var a=new Kn.PlaneGeometry(n,r,1,1);return a.faceVertexUvs=[[[new Kn.Vector2(0,0),new Kn.Vector2(0,1),new Kn.Vector2(1,0)],[new Kn.Vector2(0,1),new Kn.Vector2(1,1),new Kn.Vector2(1,0)]]],a.translate(e+n/2,t+r/2,-5),a}}]),t}(Xa),to=(n(534),function(e){function t(){return Object(d.a)(this,t),Object(h.a)(this,Object(_.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return a.a.createElement("section",{className:"v-t-TextureViewerComponent"},a.a.createElement(no,null),a.a.createElement(Za,{renderer:(qi||(qi=new eo),qi),className:"v-t-TextureViewerComponent-renderer"}))}}]),t}(r.Component)),no=Object(f.a)(Ji=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).state={filename:void 0},n.load_file=function(e){e.file.originFileObj&&(n.setState({filename:e.file.name}),Qi.load_file(e.file.originFileObj))},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return a.a.createElement("div",{className:"v-t-TextureViewerComponent-toolbar"},a.a.createElement(bn.a,{accept:".xvm",showUploadList:!1,onChange:this.load_file,customRequest:function(){return!1}},a.a.createElement(Dt.a,{icon:"file"},this.state.filename||"Open file...")))}}]),t}(r.Component))||Ji,ro=_t(function(e){function t(){return Object(d.a)(this,t),Object(h.a)(this,Object(_.a)(t).apply(this,arguments))}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){return a.a.createElement("section",{className:"v-ViewerComponent"},a.a.createElement(St.a,{type:"card"},a.a.createElement(St.a.TabPane,{tab:"Models",key:"models"},a.a.createElement(Zi,null)),a.a.createElement(St.a.TabPane,{tab:"Textures",key:"textures"},a.a.createElement(to,null))))}}]),t}(r.Component)),ao=_t(ri),io=_t(function(){return a.a.createElement("section",{className:"ho-HuntOptimizerComponent"},a.a.createElement(St.a,{type:"card"},a.a.createElement(hn,{tab:"Optimize",key:"optimize"},a.a.createElement(nn,null)),a.a.createElement(hn,{tab:"Methods",key:"methods"},a.a.createElement(dn,null))))}),oo=_t(dt),so=Object(f.a)($i=function(e){function t(){var e,n;Object(d.a)(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(n=Object(h.a)(this,(e=Object(_.a)(t)).call.apply(e,[this].concat(a)))).state={tool:n.init_tool()},n.menu_clicked=function(e){n.setState({tool:e.key})},n}return Object(m.a)(t,e),Object(p.a)(t,[{key:"render",value:function(){var e;switch(this.state.tool){case"viewer":e=a.a.createElement(ro,null);break;case"quest_editor":e=a.a.createElement(ao,null);break;case"hunt_optimizer":e=a.a.createElement(io,null);break;case"dps_calc":e=a.a.createElement(oo,null)}return a.a.createElement("div",{className:"ApplicationComponent"},a.a.createElement("div",{className:"ApplicationComponent-navbar"},a.a.createElement("h1",{className:"ApplicationComponent-heading"},"Phantasmal World"),a.a.createElement(c.b,{className:"ApplicationComponent-heading-menu",onClick:this.menu_clicked,selectedKeys:[this.state.tool],mode:"horizontal"},a.a.createElement(c.b.Item,{key:"viewer"},"Viewer",a.a.createElement("sup",{className:"ApplicationComponent-beta"},"(Beta)")),a.a.createElement(c.b.Item,{key:"quest_editor"},"Quest Editor",a.a.createElement("sup",{className:"ApplicationComponent-beta"},"(Beta)")),a.a.createElement(c.b.Item,{key:"hunt_optimizer"},"Hunt Optimizer")),a.a.createElement("div",{className:"ApplicationComponent-server-select"},a.a.createElement("span",null,"Server:"),a.a.createElement(u.a,{defaultValue:le.Ephinea,style:{width:120}},a.a.createElement(u.a.Option,{value:le.Ephinea},le.Ephinea)))),a.a.createElement("div",{className:"ApplicationComponent-main"},e))}},{key:"init_tool",value:function(){var e=window.location.search.slice(1).split("&").find(function(e){return e.startsWith("tool=")});return e?e.slice(5):"viewer"}}]),t}(a.a.Component))||$i;n(535),n(536),n(537);l.a.useDefaults({defaultLevel:l.a[Object({NODE_ENV:"production",PUBLIC_URL:""}).REACT_APP_LOG_LEVEL||"OFF"]}),o.a.render(a.a.createElement(so,null),document.getElementById("phantasmal-world-root"))}},[[245,1,2]]]);
//# sourceMappingURL=main.840f3b07.chunk.js.map