Application.js 1.4 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261
  1. function arrayUnique(a) {
  2. for (var i = 0; i < a.length; ++i) {
  3. for (var j = i + 1; j < a.length; ++j) {
  4. if (a[i] === a[j])
  5. a.splice(j--, 1);
  6. }
  7. }
  8. return a;
  9. }
  10. function arrayUniqueNewArray(a) {
  11. a = a.slice();
  12. arrayUnique(a);
  13. return a;
  14. }
  15. function arrayShuffle(a) {
  16. for (let i = 0; i < a.length; i++) {
  17. let pos = Math.floor(Math.random() * (a.length - i)) + i;
  18. let temp = a[i];
  19. a[i] = a[pos];
  20. a[pos] = temp;
  21. }
  22. }
  23. function arrayShuffleNewArray(a) {
  24. let nA = a.slice();
  25. arrayShuffle(nA);
  26. return nA;
  27. }
  28. class StoredVariable {
  29. constructor(options) {
  30. this.id = options.id;
  31. this.value = options.value;
  32. this.defValue = this.value;
  33. StoredVariable.registerVariable(this);
  34. }
  35. reset() {
  36. this.value = this.defValue;
  37. }
  38. updateFromObject(obj) {
  39. this.value = obj;
  40. }
  41. exportAsObject() {
  42. return this.value;
  43. }
  44. static registerVariable(variable) {
  45. if (StoredVariable.storedVariables[variable.id] == undefined) {
  46. StoredVariable.storedVariables[variable.id] = variable;
  47. }
  48. else {
  49. console.warn("[StoredVariable] " + variable.id + " already defined. Ignoring:", variable);
  50. }
  51. }
  52. static getVariable(id) {
  53. return StoredVariable.storedVariables[id];
  54. }
  55. static getVariables() {
  56. let list = [];
  57. for (let key in StoredVariable.storedVariables) {
  58. list.push(StoredVariable.storedVariables[key]);
  59. }
  60. return list;
  61. }
  62. static exportAsObject() {
  63. let list = {};
  64. for (let key in StoredVariable.storedVariables) {
  65. list[key] = StoredVariable.storedVariables[key].value;
  66. }
  67. return list;
  68. }
  69. static updateFromObject(obj) {
  70. for (let key in StoredVariable.storedVariables) {
  71. if (obj[key] != undefined) {
  72. StoredVariable.storedVariables[key].updateFromObject(obj[key]);
  73. }
  74. else {
  75. StoredVariable.storedVariables[key].reset();
  76. }
  77. }
  78. }
  79. }
  80. StoredVariable.storedVariables = {};
  81. class RulebookRunner {
  82. constructor(rulebook, noun) {
  83. this.rulesToExecute = [];
  84. this.ruleRunner = -1;
  85. this.rulebook = rulebook;
  86. this.noun = noun;
  87. }
  88. addRulebooks(...rulebooks) {
  89. rulebooks = arrayUniqueNewArray(rulebooks);
  90. rulebooks.forEach((rulebook) => {
  91. this.addRules(...rulebook.rules);
  92. });
  93. }
  94. addRules(...rules) {
  95. if (this.ruleRunner < 0) {
  96. this.rulesToExecute.push(...rules);
  97. }
  98. }
  99. skipRule(rule) {
  100. if (this.ruleRunner >= 0) {
  101. let index = this.rulesToExecute.indexOf(rule);
  102. if (index > this.ruleRunner) {
  103. this.rulesToExecute.splice(index, 1);
  104. console.debug("[Rulebook]" + this.rulebook.name + ", skipping Rule " + rule.name + " due to request.");
  105. }
  106. else {
  107. console.warn("[Rulebook]" + this.rulebook.name + ": uname to skip Rule" + rule.name + " due to it being too late to stop it.");
  108. }
  109. }
  110. }
  111. async execute() {
  112. arrayUnique(this.rulesToExecute).sort(function (a, b) {
  113. return a.compareTo(b);
  114. });
  115. for (this.ruleRunner = 0; this.ruleRunner < this.rulesToExecute.length; this.ruleRunner++) {
  116. this.rule = this.rulesToExecute[this.ruleRunner];
  117. let result = await this.rule.execute(this);
  118. if (result != undefined) {
  119. return result;
  120. }
  121. }
  122. }
  123. }
  124. class Rulebook {
  125. constructor(name) {
  126. this.rules = [];
  127. this.name = name;
  128. }
  129. static getStack() {
  130. let stack = [];
  131. Rulebook.rulebookStack.forEach((rl) => {
  132. if (rl instanceof Object && rl.name != undefined) {
  133. stack.push(rl.name);
  134. }
  135. else if (typeof rl == "string") {
  136. stack.push(rl);
  137. }
  138. else if (rl instanceof Object && rl.id != undefined) {
  139. stack.push(rl.id);
  140. }
  141. else {
  142. stack.push("Undefined");
  143. }
  144. });
  145. return stack;
  146. }
  147. static getIndentation() {
  148. return " ".repeat(Rulebook.indentantionSpaces).repeat(Rulebook.rulebookStack.length);
  149. }
  150. static increaseIndentation(rulebook) {
  151. Rulebook.rulebookStack.push(rulebook);
  152. }
  153. static decreaseIndentation() {
  154. Rulebook.rulebookStack.pop();
  155. }
  156. static isRunning(r) {
  157. return Rulebook.rulebookStack.indexOf(r) != -1;
  158. }
  159. isRunning() {
  160. return Rulebook.isRunning(this);
  161. }
  162. async execute(options, ...rulebooks) {
  163. options = options == undefined ? {} : options;
  164. let runner = new RulebookRunner(this, options.noun);
  165. runner.addRulebooks(this, ...rulebooks);
  166. var names = [];
  167. for (let i = 0; i < rulebooks.length; i++) {
  168. if (rulebooks[i] === this)
  169. continue;
  170. names.push(rulebooks[i].name);
  171. }
  172. console.debug(Rulebook.getIndentation() + "[RULEBOOK] " + this.name + (names.length > 0 ? (" merged with " + names.join(", ")) : ""));
  173. Rulebook.increaseIndentation(this);
  174. let result = await runner.execute();
  175. Rulebook.decreaseIndentation();
  176. return result;
  177. }
  178. createAndAddRule(r) {
  179. let rule = new Rule(r);
  180. this.addRule(rule);
  181. return rule;
  182. }
  183. addRule(r) {
  184. this.rules.push(r);
  185. }
  186. sortRules() {
  187. this.rules.sort(function (a, b) {
  188. return a.compareTo(b);
  189. });
  190. }
  191. }
  192. Rulebook.indentantionSpaces = 2;
  193. Rulebook.rulebookStack = [];
  194. var Settings;
  195. (function (Settings) {
  196. var debug = console.debug;
  197. var debugEmpty = () => { };
  198. Settings.hardDebug = false;
  199. Settings.sayTurnTime = true;
  200. function setDebug(isDebug) {
  201. if (isDebug) {
  202. console.debug = debug;
  203. }
  204. else {
  205. console.debug = debugEmpty;
  206. }
  207. }
  208. Settings.setDebug = setDebug;
  209. function isDebug() {
  210. return console.debug == debug;
  211. }
  212. Settings.isDebug = isDebug;
  213. function setHardDebug(isHardDebug) {
  214. Settings.hardDebug = isHardDebug;
  215. }
  216. Settings.setHardDebug = setHardDebug;
  217. })(Settings || (Settings = {}));
  218. class Rule {
  219. constructor(options) {
  220. this._priority = 0;
  221. this.firstPriority = 0;
  222. this.priority = options.priority != undefined ? options.priority : Rule.PRIORITY_MEDIUM;
  223. this.firstPriority = options.firstPriority != undefined ? options.firstPriority : Rule.PRIORITY_MEDIUM;
  224. this.name = options.name;
  225. this.code = options.code;
  226. this.createdWhere = (new Error());
  227. this.conditions = options.conditions != undefined ? options.conditions : () => { return true; };
  228. }
  229. async execute(rulebook) {
  230. if (!this.conditions(rulebook)) {
  231. return;
  232. }
  233. console.debug(Rulebook.getIndentation() + "[RULE] " + this.name);
  234. Settings.hardDebug && console.debug(this.name, this.createdWhere);
  235. Rulebook.increaseIndentation(this);
  236. rulebook.rule = this;
  237. let result = this.code(rulebook);
  238. if (result instanceof Promise) {
  239. result = await result;
  240. }
  241. if (result != undefined) {
  242. console.debug(Rulebook.getIndentation() + "Result:", result);
  243. }
  244. Rulebook.decreaseIndentation();
  245. return result;
  246. }
  247. get priority() {
  248. return this._priority;
  249. }
  250. set priority(value) {
  251. this._priority = value;
  252. }
  253. compareTo(b) {
  254. var a = this;
  255. if (b.firstPriority < a.firstPriority)
  256. return -1;
  257. if (a.firstPriority < b.firstPriority)
  258. return 1;
  259. if (b.priority < a.priority)
  260. return -1;
  261. if (a.priority < b.priority)
  262. return 1;
  263. return 0;
  264. }
  265. }
  266. Rule.PRIORITY_HIGHEST = 20;
  267. Rule.PRIORITY_HIGH = 15;
  268. Rule.PRIORITY_MEDIUM = 10;
  269. Rule.PRIORITY_LOW = 5;
  270. Rule.PRIORITY_LOWEST = 0;
  271. var TurnSequence;
  272. (function (TurnSequence) {
  273. TurnSequence.rulebook = new Rulebook("Turn Sequence");
  274. TurnSequence.playerActions = [];
  275. TurnSequence.lastTurnTime = 0;
  276. async function execute(action) {
  277. if (TurnSequence.playerActions.push(action) == 1) {
  278. let t0 = performance.now();
  279. console.debug(Rulebook.getIndentation() + " Player Action: " + (action ? action.getCommandText() : "none"));
  280. await TurnSequence.rulebook.execute({
  281. noun: action
  282. });
  283. TurnSequence.playerActions = [];
  284. let t1 = performance.now();
  285. TurnSequence.lastTurnTime = t1 - t0;
  286. console.debug("Total: " + (t1 - t0) + " milliseconds.");
  287. if (Settings.sayTurnTime) {
  288. Elements.CurrentTurnHandler.printAsContent(new Say(new SayBold("Time taken for turn: "), (t1 - t0), " milliseconds."));
  289. }
  290. }
  291. }
  292. TurnSequence.execute = execute;
  293. TurnSequence.PrepareElementsRule = new Rule({
  294. firstPriority: Rule.PRIORITY_HIGHEST,
  295. priority: Rule.PRIORITY_MEDIUM,
  296. name: "Begin Turn (Elements Side)",
  297. code: function (runner) {
  298. Elements.CurrentTurnHandler.startTurn(runner.noun);
  299. }
  300. });
  301. TurnSequence.rulebook.addRule(TurnSequence.PrepareElementsRule);
  302. TurnSequence.PlayerActionRule = new Rule({
  303. firstPriority: Rule.PRIORITY_HIGH,
  304. priority: Rule.PRIORITY_MEDIUM,
  305. name: "Do Player Action",
  306. code: async (rulebook) => {
  307. let playerAction = rulebook.noun;
  308. if (playerAction != undefined) {
  309. let promise = playerAction.execute();
  310. await promise;
  311. Elements.CurrentTurnHandler.printAsContent(playerAction.say);
  312. if (playerAction.requiresTurn) {
  313. WorldState.incrementPlayerTurn();
  314. }
  315. }
  316. }
  317. });
  318. TurnSequence.rulebook.addRule(TurnSequence.PlayerActionRule);
  319. TurnSequence.RunEveryTurnRulesRule = new Rule({
  320. firstPriority: Rule.PRIORITY_MEDIUM,
  321. priority: Rule.PRIORITY_MEDIUM,
  322. name: "Run Every Turn Rules",
  323. code: async function () {
  324. while (WorldState.isTurnWaiting()) {
  325. await EveryTurn.EveryTurn.execute({});
  326. }
  327. }
  328. });
  329. TurnSequence.rulebook.addRule(TurnSequence.RunEveryTurnRulesRule);
  330. TurnSequence.RemoveTurnFromElementsRule = new Rule({
  331. firstPriority: Rule.PRIORITY_LOWEST,
  332. priority: Rule.PRIORITY_MEDIUM,
  333. name: "End Turn (Elements/Controls Side)",
  334. code: async function (rulebook) {
  335. Elements.CurrentTurnHandler.endTurn();
  336. Controls.KeyHandler.reset();
  337. await Elements.HyperlinkHandler.hyperlinkCommonActions();
  338. await Elements.RoomHandler.updateRoom();
  339. await Elements.RememberedHandler.updateMap();
  340. let playerAction = rulebook.noun;
  341. if (playerAction) {
  342. await Elements.HyperlinkHandler.hyperlinkObject(playerAction.getNoun(0));
  343. }
  344. else {
  345. await Elements.HyperlinkHandler.hyperlinkObject();
  346. }
  347. await Elements.InventoryHandler.updateInventory();
  348. await Elements.AppearanceHandler.updateAppearance();
  349. }
  350. });
  351. TurnSequence.rulebook.addRule(TurnSequence.RemoveTurnFromElementsRule);
  352. })(TurnSequence || (TurnSequence = {}));
  353. var Version;
  354. (function (Version) {
  355. Version.currentVersion = [0, 1, 0];
  356. function compareVersion(v1, v2) {
  357. if (v1[0] < v2[0])
  358. return -1;
  359. else if (v1[0] > v2[0])
  360. return 1;
  361. if (v1[1] < v2[1])
  362. return -1;
  363. else if (v1[1] > v2[1])
  364. return 1;
  365. if (v1[2] < v2[2])
  366. return -1;
  367. else if (v1[2] > v2[2])
  368. return 1;
  369. return 0;
  370. }
  371. Version.compareVersion = compareVersion;
  372. function getCurrentVersion() {
  373. let v = Version.currentVersion;
  374. return v[0] + "." + v[1] + "." + v[2];
  375. }
  376. Version.getCurrentVersion = getCurrentVersion;
  377. document.title = document.title + " [" + getCurrentVersion() + "] ";
  378. })(Version || (Version = {}));
  379. var Controls;
  380. (function (Controls) {
  381. var Memory;
  382. (function (Memory) {
  383. let versionSet = false;
  384. let settingsVersion = Version.currentVersion;
  385. let versionId = "Version";
  386. let memoryPrefix = "obelisk_";
  387. let memories = {};
  388. function getValue(id, defValue) {
  389. let storage = localStorage.getItem(memoryPrefix + id);
  390. return storage == undefined ? defValue : JSON.parse(storage);
  391. }
  392. Memory.getValue = getValue;
  393. function setValue(id, value) {
  394. localStorage.setItem(memoryPrefix + id, JSON.stringify(value));
  395. if (!versionSet) {
  396. versionSet = true;
  397. settingsVersion = getValue(versionId, Version.currentVersion);
  398. setValue(versionId, Version.currentVersion);
  399. }
  400. if (settingsVersion == undefined) { }
  401. }
  402. Memory.setValue = setValue;
  403. function registerMemory(mem) {
  404. if (memories[mem.getId()] != undefined) {
  405. console.error("[Controls.Memory] Memory already registered on id " + mem.getId(), "Old:", memories[mem.getId()], "New:", mem);
  406. }
  407. else {
  408. memories[mem.getId()] = mem;
  409. mem.setValueFromLocalStorageDoNotInvoke(getValue(mem.getId(), mem.getValue()));
  410. let updateF = () => {
  411. Controls.Memory.setValue(mem.getId(), mem.getValue());
  412. };
  413. mem.addListener(updateF);
  414. updateF();
  415. }
  416. }
  417. Memory.registerMemory = registerMemory;
  418. })(Memory = Controls.Memory || (Controls.Memory = {}));
  419. })(Controls || (Controls = {}));
  420. class StoredMemory {
  421. constructor(id, value) {
  422. this.listeners = [];
  423. this.id = id;
  424. this.value = value;
  425. Controls.Memory.registerMemory(this);
  426. }
  427. setValueFromLocalStorageDoNotInvoke(value) {
  428. this.value = value;
  429. }
  430. storeValue(value) {
  431. if (JSON.stringify(value) !== JSON.stringify(this.value)) {
  432. this.value = value;
  433. this.triggerListeners();
  434. }
  435. }
  436. getValue() {
  437. return this.value;
  438. }
  439. getId() {
  440. return this.id;
  441. }
  442. addListener(listener) {
  443. this.listeners.push(listener);
  444. }
  445. triggerListeners() {
  446. for (var i = 0; i < this.listeners.length; i++) {
  447. this.listeners[i](this);
  448. }
  449. }
  450. }
  451. var SaveHandler;
  452. (function (SaveHandler) {
  453. let saveName = "Obelisk_Save";
  454. let saveExtension = "obsav";
  455. let storagePrefix = "save_";
  456. let saveSlot = 0;
  457. let errors = [];
  458. let erasing = false;
  459. let virgin = new StoredMemory("First time saving", true);
  460. SaveHandler.AfterLoad = new Rulebook("After loading");
  461. async function readFile() {
  462. let element = document.createElement("input");
  463. element.type = "file";
  464. element.accept = "." + saveExtension;
  465. let promise = new Promise((resolve, reject) => {
  466. element.onchange = () => {
  467. if (element.files.length == 0) {
  468. resolve(undefined);
  469. }
  470. else {
  471. var fr = new FileReader();
  472. fr.onload = (ev) => {
  473. resolve(ev.target['result']);
  474. };
  475. fr.readAsText(element.files[0]);
  476. }
  477. };
  478. });
  479. element.click();
  480. return promise;
  481. }
  482. SaveHandler.readFile = readFile;
  483. function download(filename, text) {
  484. var element = document.createElement('a');
  485. element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
  486. element.setAttribute('download', filename);
  487. element.style.display = 'none';
  488. document.body.appendChild(element);
  489. element.click();
  490. document.body.removeChild(element);
  491. }
  492. function loadSave() {
  493. let input = document.createElement("input");
  494. input.type = "file";
  495. input.accept = "." + saveExtension;
  496. document.body.appendChild(input);
  497. input.addEventListener("change", () => {
  498. let reader = new FileReader();
  499. reader.onload = () => {
  500. let text = reader.result;
  501. SaveHandler.loadGame(JSON.parse(text));
  502. };
  503. reader.readAsText(input.files[0]);
  504. });
  505. input.click();
  506. document.body.removeChild(input);
  507. }
  508. SaveHandler.loadSave = loadSave;
  509. function getItem(thing) {
  510. let item;
  511. if (thing.Unique) {
  512. item = Thing.getUnique(thing.Name);
  513. }
  514. else {
  515. let items = Thing.getNonUnique(thing.Name);
  516. if (items.length > 0) {
  517. item = items[0];
  518. }
  519. if (item == undefined) {
  520. let error = thing.Name + " no longer exists.";
  521. console.error("[SaveHandler] " + error);
  522. errors.push(error);
  523. return undefined;
  524. }
  525. else {
  526. item = item.clone(true);
  527. }
  528. }
  529. item.setChanges(thing.Changes);
  530. return item;
  531. }
  532. function loadGame(saveStruc) {
  533. let player = WorldState.player;
  534. StoredVariable.updateFromObject(saveStruc.Variables);
  535. WorldState.setCurrentTurn(saveStruc.Rounds);
  536. Thing.WearRelation.getRight(player).forEach((thing) => {
  537. Thing.WearRelation.unsetRight(thing);
  538. });
  539. Thing.WieldRelation.getRight(player).forEach((thing) => {
  540. Thing.WieldRelation.unsetRight(thing);
  541. });
  542. Thing.CarryRelation.getRight(player).forEach((thing) => {
  543. Thing.CarryRelation.unsetRight(thing);
  544. });
  545. saveStruc.Wielded.forEach((thing) => {
  546. let item = getItem(thing);
  547. if (item != undefined)
  548. WorldState.player.setWielded(item);
  549. });
  550. saveStruc.Worn.forEach((thing) => {
  551. let item = getItem(thing);
  552. if (item != undefined)
  553. WorldState.player.setWorn(item);
  554. });
  555. saveStruc.Carried.forEach((thing) => {
  556. let item = getItem(thing);
  557. if (item != undefined)
  558. WorldState.player.setCarried(item);
  559. });
  560. let savedPlayer = saveStruc.Player;
  561. player.setName(savedPlayer.Name);
  562. player.setChanges(savedPlayer.PlayerChanges);
  563. savedPlayer.Parts.forEach((part) => {
  564. let bpList = player.getPartsByName(part.Name);
  565. if (bpList != undefined) {
  566. bpList[0].setChanges(part.Changes);
  567. }
  568. });
  569. saveStruc.UniqueThings.forEach((savedThing) => {
  570. let thing = Thing.getUnique(savedThing.Name);
  571. if (thing != undefined) {
  572. thing.setChanges(savedThing.Changes);
  573. }
  574. });
  575. }
  576. SaveHandler.loadGame = loadGame;
  577. function exportPlayer() {
  578. return {
  579. Name: WorldState.player.getName(),
  580. PlayerChanges: WorldState.player.getChanges(),
  581. Parts: exportThings(WorldState.player.getParts())
  582. };
  583. }
  584. function exportThings(arr, changedOnly) {
  585. let obj = [];
  586. for (let i = 0; i < arr.length; i++) {
  587. let thing = arr[i];
  588. let savedThing = {
  589. Unique: thing.isUnique(),
  590. Name: thing.getName(),
  591. Changes: thing.getChanges()
  592. };
  593. if (!changedOnly || Object.keys(savedThing.Changes).length > 0) {
  594. obj.push(savedThing);
  595. }
  596. }
  597. return obj;
  598. }
  599. SaveHandler.exportThings = exportThings;
  600. function getSaveStructure() {
  601. let variables = StoredVariable.getVariables();
  602. let savedVariables = {};
  603. for (let i = 0; i < variables.length; i++) {
  604. savedVariables[variables[i].id] = variables[i].exportAsObject();
  605. }
  606. let wielded = Thing.WieldRelation.getRight(WorldState.player);
  607. let worn = Thing.WearRelation.getRight(WorldState.player);
  608. let carried = Thing.CarryRelation.getRight(WorldState.player);
  609. let saveStruc = {
  610. Variables: savedVariables,
  611. UniqueThings: exportThings(Thing.getUniques()),
  612. Wielded: exportThings(wielded),
  613. Worn: exportThings(worn),
  614. Carried: exportThings(carried),
  615. Player: exportPlayer(),
  616. Rounds: WorldState.getCurrentTurn(),
  617. Date: new Date().toLocaleString()
  618. };
  619. console.debug("[SaveHandler] Created Save Structure", saveStruc);
  620. return saveStruc;
  621. }
  622. SaveHandler.getSaveStructure = getSaveStructure;
  623. function setSlot(slotN) {
  624. saveSlot = slotN;
  625. }
  626. SaveHandler.setSlot = setSlot;
  627. function saveToStorage() {
  628. Controls.Memory.setValue(storagePrefix + saveSlot, getSaveStructure());
  629. }
  630. SaveHandler.saveToStorage = saveToStorage;
  631. async function loadFromStorage() {
  632. if (!erasing) {
  633. let saveStruct = (Controls.Memory.getValue(storagePrefix + saveSlot, undefined));
  634. if (saveStruct != undefined) {
  635. loadGame(saveStruct);
  636. return await SaveHandler.AfterLoad.execute({ noun: saveStruct });
  637. }
  638. }
  639. await CharacterCreation.rulebook.execute({});
  640. }
  641. SaveHandler.loadFromStorage = loadFromStorage;
  642. async function loadFromFile() {
  643. PlayBegins.LOAD_FAILED = false;
  644. let promise = readFile();
  645. let finishedAny;
  646. let realPromise = new Promise((resolve) => {
  647. finishedAny = resolve;
  648. });
  649. let say = new Say("No save file was loaded.", Say.PARAGRAPH_BREAK, Say.CENTERED, new SayBold("Press any key to return."));
  650. let sayElements = await Elements.CurrentTurnHandler.getSayElementsAsContent(say);
  651. Elements.CurrentTurnHandler.print(...sayElements);
  652. let nextKey = Controls.KeyHandler.getNextKey();
  653. promise.then((file) => {
  654. Controls.KeyHandler.stopGivingNextKey(nextKey);
  655. Elements.CurrentTurnHandler.unprint(...sayElements);
  656. loadGame(getFromFile(file));
  657. finishedAny();
  658. });
  659. nextKey.then((keyCode) => {
  660. PlayBegins.LOAD_FAILED = true;
  661. finishedAny();
  662. });
  663. await realPromise;
  664. }
  665. SaveHandler.loadFromFile = loadFromFile;
  666. function getSayForSlot(slotNumber) {
  667. let saveStruct = (Controls.Memory.getValue(storagePrefix + slotNumber, undefined));
  668. if (saveStruct == undefined) {
  669. return new Say("New Game");
  670. }
  671. else {
  672. let erasingText = erasing ? "(ERASE) - " : "";
  673. return new Say(erasingText, saveStruct.Player.Name + " - Turns: " + saveStruct.Rounds + " - Last Played: " + saveStruct.Date);
  674. }
  675. }
  676. SaveHandler.getSayForSlot = getSayForSlot;
  677. function getFromFile(saveText) {
  678. return JSON.parse(decodeURIComponent(atob(saveText)));
  679. }
  680. SaveHandler.getFromFile = getFromFile;
  681. function saveToFile() {
  682. download(saveName + "." + saveExtension, btoa(unescape(encodeURIComponent((JSON.stringify(getSaveStructure()))))));
  683. }
  684. SaveHandler.saveToFile = saveToFile;
  685. function isErasing() {
  686. return erasing;
  687. }
  688. SaveHandler.isErasing = isErasing;
  689. function toggleErasing() {
  690. erasing = !erasing;
  691. }
  692. SaveHandler.toggleErasing = toggleErasing;
  693. function isVirgin() {
  694. let was = virgin.getValue();
  695. virgin.storeValue(false);
  696. return was;
  697. }
  698. SaveHandler.isVirgin = isVirgin;
  699. })(SaveHandler || (SaveHandler = {}));
  700. TurnSequence.rulebook.createAndAddRule({
  701. name: "Save game to Storage",
  702. priority: Rule.PRIORITY_LOWEST,
  703. firstPriority: Rule.PRIORITY_LOWEST,
  704. code: () => {
  705. SaveHandler.saveToStorage();
  706. }
  707. });
  708. class CharacterOrigin {
  709. constructor(id) {
  710. this.confirmPicked = () => { };
  711. this.id = id;
  712. CharacterOrigin.storeOrigin(this);
  713. }
  714. static storeOrigin(origin) {
  715. CharacterOrigin.origins[origin.id] = origin;
  716. }
  717. static getOrigin(id) {
  718. return CharacterOrigin.origins[id];
  719. }
  720. static getOrigins() {
  721. let origins = [];
  722. for (let id in CharacterOrigin.origins) {
  723. origins.push(CharacterOrigin.origins[id]);
  724. }
  725. origins.sort((a, b) => {
  726. let na = a.name.toUpperCase();
  727. let nb = b.name.toUpperCase();
  728. if (na < nb)
  729. return -1;
  730. if (na > nb)
  731. return 1;
  732. return 0;
  733. });
  734. return origins;
  735. }
  736. }
  737. CharacterOrigin.origins = {};
  738. var CharacterCreation;
  739. (function (CharacterCreation) {
  740. CharacterCreation.ChampionOrigin = new CharacterOrigin("Champion");
  741. CharacterCreation.ChampionOrigin.name = "Champion";
  742. CharacterCreation.ChampionOrigin.description = "You were born in the small village of Southwood in the post-Tower world. Chosen by the village elder, you were trained relentlessly as soon as you became able to walk. Your mission: get to the Tower and find a way to destroy it. Unbeknownst to you, this is little more than a sacrifice ritual and you are just it's latest victim. The village doesn't actually expect you to succeed, you are merely a gift to the Tower, so that it will not destroy Southwood.";
  743. CharacterCreation.ChampionOrigin.bonusStats = "This origin grants a +1 Bonus to every attribute, but you will be stuck with some perks gained through your training.";
  744. CharacterCreation.ChampionOrigin.confirmPicked = () => {
  745. let player = WorldState.player;
  746. function increaseStat(attr) {
  747. player.setStat(attr, player.getStat(attr) + 1);
  748. }
  749. increaseStat(Attributes.Strength);
  750. increaseStat(Attributes.Charm);
  751. increaseStat(Attributes.Agility);
  752. increaseStat(Attributes.Intelligence);
  753. };
  754. })(CharacterCreation || (CharacterCreation = {}));
  755. var CharacterCreation;
  756. (function (CharacterCreation) {
  757. CharacterCreation.PlayerOrigin = new StoredVariable({ id: "Player Origin", value: CharacterCreation.ChampionOrigin.id });
  758. function getOrigin() {
  759. return CharacterOrigin.getOrigin(CharacterCreation.PlayerOrigin.value);
  760. }
  761. CharacterCreation.getOrigin = getOrigin;
  762. CharacterCreation.rulebook = new Rulebook("Character Creation");
  763. })(CharacterCreation || (CharacterCreation = {}));
  764. class Perk extends StoredVariable {
  765. constructor(id) {
  766. super({
  767. id: "Perk_" + id,
  768. value: false
  769. });
  770. this.forcedStatus = () => { return undefined; };
  771. this.description = "Undefined";
  772. this.confirmPicked = () => { };
  773. this.name = id;
  774. Perk.storePerk(this);
  775. }
  776. isEnabled(valueOnly) {
  777. if (valueOnly != true) {
  778. let forced = this.forcedStatus(this);
  779. if (forced != undefined) {
  780. return forced;
  781. }
  782. }
  783. return this.value;
  784. }
  785. isForced() {
  786. return this.forcedStatus(this) != undefined;
  787. }
  788. getDescription() {
  789. if (typeof this.description == "function") {
  790. return this.description(this);
  791. }
  792. else {
  793. return this.description;
  794. }
  795. }
  796. static storePerk(perk) {
  797. Perk.perks[perk.id] = perk;
  798. }
  799. static getPerk(id) {
  800. return Perk.perks[id];
  801. }
  802. static getPerks() {
  803. let perks = [];
  804. for (let id in Perk.perks) {
  805. perks.push(Perk.perks[id]);
  806. }
  807. perks.sort((a, b) => {
  808. let na = a.name.toUpperCase();
  809. let nb = b.name.toUpperCase();
  810. if (na < nb)
  811. return -1;
  812. if (na > nb)
  813. return 1;
  814. return 0;
  815. });
  816. return perks;
  817. }
  818. static updatePerks() {
  819. for (let id in Perk.perks) {
  820. let perk = Perk.perks[id];
  821. if (perk.isForced()) {
  822. perk.value = perk.forcedStatus(perk);
  823. }
  824. }
  825. }
  826. }
  827. Perk.perks = {};
  828. class OneOf {
  829. constructor(randomMode, ...poss) {
  830. this.possibilities = [];
  831. this.cyclingOrder = 0;
  832. this.randomMode = randomMode;
  833. this.possibilities = poss;
  834. if (this.randomMode == OneOf.ROTATING_RANDOM) {
  835. this.availablePossibilites = this.possibilities.slice();
  836. }
  837. }
  838. getOne() {
  839. if (this.randomMode == OneOf.PURELY_AT_RANDOM) {
  840. return this.possibilities[Math.floor(Math.random() * this.possibilities.length)];
  841. }
  842. else if (this.randomMode == OneOf.ROTATING_RANDOM) {
  843. if (this.availablePossibilites.length < 1) {
  844. this.availablePossibilites = this.possibilities.slice();
  845. }
  846. return this.availablePossibilites.splice(Math.floor(Math.random() * this.availablePossibilites.length), 1)[0];
  847. }
  848. else if (this.randomMode == OneOf.CYCLING) {
  849. var r = this.possibilities[this.cyclingOrder++];
  850. if (this.cyclingOrder > this.possibilities.length) {
  851. this.cyclingOrder = 0;
  852. }
  853. return r;
  854. }
  855. }
  856. }
  857. OneOf.PURELY_AT_RANDOM = 0;
  858. OneOf.ROTATING_RANDOM = 1;
  859. OneOf.CYCLING = 2;
  860. var MachineBegins;
  861. (function (MachineBegins) {
  862. MachineBegins.rulebook = new Rulebook("Machine Begins");
  863. function execute() {
  864. MachineBegins.rulebook.execute({});
  865. }
  866. MachineBegins.execute = execute;
  867. })(MachineBegins || (MachineBegins = {}));
  868. document.addEventListener("DOMContentLoaded", () => {
  869. MachineBegins.execute();
  870. });
  871. var Elements;
  872. (function (Elements) {
  873. Elements.animationTime = 1000;
  874. Elements.isMobile = /Mobi/i.test(navigator.userAgent);
  875. Elements.screenWidth = document.body.clientWidth;
  876. Elements.screenHeight = document.body.clientHeight;
  877. function getLinkElements(image) {
  878. if (Elements.CurrentTurnHandler == undefined)
  879. return [];
  880. if (Elements.CurrentTurnHandler.isTurn() || image) {
  881. return [Elements.CurrentTurnHandler.currentTurnTab];
  882. }
  883. else {
  884. return [Elements.HyperlinkHandler.linkedActionsTab, Elements.RoomHandler.currentRoomTab, Elements.HyperlinkHandler.commonActionsTab, Elements.CurrentTurnHandler.currentTurnTab, Elements.RoomHandler.currentRoomExits];
  885. }
  886. }
  887. Elements.getLinkElements = getLinkElements;
  888. function updateScreenSize() {
  889. Elements.screenWidth = document.body.clientWidth;
  890. Elements.screenHeight = document.body.clientHeight;
  891. }
  892. Elements.updateScreenSize = updateScreenSize;
  893. Elements.mainPage = document.getElementById("mainPage");
  894. function startTurn() {
  895. Elements.mainPage.classList.add("turn");
  896. }
  897. Elements.startTurn = startTurn;
  898. function endTurn() {
  899. Elements.mainPage.classList.remove("turn");
  900. }
  901. Elements.endTurn = endTurn;
  902. function isInTurn() {
  903. return Elements.mainPage.classList.contains("turn");
  904. }
  905. Elements.isInTurn = isInTurn;
  906. let menuOutsideofTurn = false;
  907. let menus = 0;
  908. function startMenu() {
  909. if (!isInTurn()) {
  910. menuOutsideofTurn = true;
  911. startTurn();
  912. }
  913. Elements.mainPage.classList.add("mainmenu");
  914. menus++;
  915. Elements.CurrentTurnHandler.clear();
  916. Controls.KeyHandler.reset();
  917. }
  918. Elements.startMenu = startMenu;
  919. function endMenu() {
  920. Elements.CurrentTurnHandler.clear();
  921. if (--menus == 0) {
  922. if (menuOutsideofTurn) {
  923. endTurn();
  924. }
  925. resetMenus();
  926. }
  927. }
  928. Elements.endMenu = endMenu;
  929. function resetMenus() {
  930. if (menus != 0) {
  931. console.error("A menu wasn't finished properly. Please correct the dialogue.");
  932. }
  933. menus = 0;
  934. menuOutsideofTurn = false;
  935. Elements.mainPage.classList.remove("mainmenu");
  936. }
  937. Elements.resetMenus = resetMenus;
  938. function clearMainScreen() {
  939. Elements.CurrentTurnHandler.clear();
  940. }
  941. Elements.clearMainScreen = clearMainScreen;
  942. let loadingScreen = document.getElementById("loadingScreen");
  943. function stopLoading() {
  944. document.body.removeChild(loadingScreen);
  945. }
  946. Elements.stopLoading = stopLoading;
  947. async function waitForAnyKey() {
  948. let say = new Say(Say.CENTERED, new SayBold("Press any key to continue."));
  949. let elements = await say.getHTML("p", ["content"]);
  950. Elements.CurrentTurnHandler.print(...elements);
  951. await Controls.KeyHandler.getNextKey();
  952. Elements.CurrentTurnHandler.unprint(...elements);
  953. }
  954. Elements.waitForAnyKey = waitForAnyKey;
  955. async function waitForSpaceKey() {
  956. let say = new Say(Say.CENTERED, new SayBold("Press Space to continue."));
  957. let elements = await say.getHTML("p", ["content"]);
  958. Elements.CurrentTurnHandler.print(...elements);
  959. let lastKey = "notSpace";
  960. while (lastKey != "Space" && lastKey != "Click") {
  961. lastKey = (await Controls.KeyHandler.getNextKey()).evCode;
  962. }
  963. Elements.CurrentTurnHandler.unprint(...elements);
  964. }
  965. Elements.waitForSpaceKey = waitForSpaceKey;
  966. function printObeliskLogo() {
  967. let say = new Say(Say.CENTERED, new SayImage("introLogo"), Say.LINE_BREAK, new SayItalic("The Obelisk is an adult interactive fiction game set in a post-apocalyptic world ravaged by a magical structure."));
  968. Elements.CurrentTurnHandler.printAsContent(say);
  969. }
  970. Elements.printObeliskLogo = printObeliskLogo;
  971. })(Elements || (Elements = {}));
  972. if (Elements.isMobile) {
  973. Elements.mainPage.classList.add("mobile");
  974. }
  975. window.addEventListener("resize", function () {
  976. Elements.updateScreenSize();
  977. });
  978. var MachineBegins;
  979. (function (MachineBegins) {
  980. MachineBegins.HideLoadingDivRule = MachineBegins.rulebook.createAndAddRule({
  981. name: "Hide loading div",
  982. code: runner => {
  983. Elements.stopLoading();
  984. }
  985. });
  986. })(MachineBegins || (MachineBegins = {}));
  987. var TurnSequence;
  988. (function (TurnSequence) {
  989. TurnSequence.LazilyFixMenus = TurnSequence.rulebook.createAndAddRule({
  990. name: "Fix menus that were never closed because the dev is stupid",
  991. firstPriority: Rule.PRIORITY_LOWEST,
  992. priority: Rule.PRIORITY_LOWEST,
  993. code: () => {
  994. Elements.resetMenus();
  995. }
  996. });
  997. })(TurnSequence || (TurnSequence = {}));
  998. var Controls;
  999. (function (Controls) {
  1000. var KeyHandler;
  1001. (function (KeyHandler) {
  1002. let promiseStack = [];
  1003. let promiseOriginalStack = [];
  1004. function rejectPromise(promise) {
  1005. promiseStack.splice(promiseStack.indexOf(promise), 1);
  1006. promiseOriginalStack.splice(promiseStack.indexOf(promise), 1);
  1007. }
  1008. KeyHandler.rejectPromise = rejectPromise;
  1009. function createKeyCode(ev) {
  1010. let name = ev.key.toUpperCase();
  1011. let representation = name;
  1012. let evCode = ev.code;
  1013. if (ev.shiftKey) {
  1014. name = "Shift + " + name;
  1015. evCode = "Sh" + evCode;
  1016. representation = "S" + representation;
  1017. }
  1018. if (ev.altKey) {
  1019. name = "Alt + " + name;
  1020. evCode = "Al" + evCode;
  1021. representation = "A" + representation;
  1022. }
  1023. if (ev.ctrlKey) {
  1024. name = "Control + " + name;
  1025. evCode = "Ct" + evCode;
  1026. representation = "C" + representation;
  1027. }
  1028. let keyCode = {
  1029. evCode: evCode,
  1030. name: name,
  1031. representation: representation
  1032. };
  1033. return keyCode;
  1034. }
  1035. KeyHandler.createKeyCode = createKeyCode;
  1036. window.addEventListener("mousedown", function (event) {
  1037. let keyCode = {
  1038. representation: "Click",
  1039. evCode: "Click",
  1040. name: "Click"
  1041. };
  1042. let promise = promiseStack.shift();
  1043. if (promise != undefined) {
  1044. promise(keyCode);
  1045. promiseOriginalStack.shift();
  1046. return;
  1047. }
  1048. });
  1049. window.addEventListener("keydown", function (event) {
  1050. let keyCode = createKeyCode(event);
  1051. let promise = promiseStack.shift();
  1052. if (promise != undefined) {
  1053. promise(keyCode);
  1054. promiseOriginalStack.shift();
  1055. return;
  1056. }
  1057. if (keyCode.evCode == KeyHandler.scrollKeyCode.getValue().evCode) {
  1058. Elements.CurrentTurnHandler.scrollSpace();
  1059. return;
  1060. }
  1061. else if (keyCode.evCode == KeyHandler.imageKeyCode.getValue().evCode) {
  1062. if (SayImage.imageViewer.style.display == "block") {
  1063. SayImage.imageViewer.style.display = "none";
  1064. }
  1065. else {
  1066. let images = Elements.CurrentTurnHandler.currentTurnTab.getElementsByClassName("contentImage");
  1067. if (images.length > 0) {
  1068. images[images.length - 1].click();
  1069. }
  1070. }
  1071. return;
  1072. }
  1073. let ele;
  1074. Elements.getLinkElements().some((element) => {
  1075. let keyables = element.getElementsByClassName("keyable");
  1076. for (let i = 0; i < keyables.length; i++) {
  1077. if (keyables[i].dataset['shortcutcode'] == keyCode.evCode) {
  1078. ele = keyables[i];
  1079. return true;
  1080. }
  1081. }
  1082. return false;
  1083. });
  1084. if (ele != undefined) {
  1085. ele.click();
  1086. }
  1087. });
  1088. function createKeyCodes(codes, keys, mods) {
  1089. let arr = [];
  1090. for (let mod = 0; mod < 4; mod++) {
  1091. if (mod == 0 || mods[mod] == true) {
  1092. for (let i = 0; i < codes.length; i++) {
  1093. let name = keys[i];
  1094. let representation = keys[i];
  1095. let evCode = codes[i];
  1096. if (mod == 1) {
  1097. name = "Shift + " + name;
  1098. evCode = "Sh" + evCode;
  1099. representation = "S" + representation;
  1100. }
  1101. if (mod == 2) {
  1102. name = "Alt + " + name;
  1103. evCode = "Al" + evCode;
  1104. representation = "A" + representation;
  1105. }
  1106. if (mod == 3) {
  1107. name = "Control + " + name;
  1108. evCode = "Ct" + evCode;
  1109. representation = "C" + representation;
  1110. }
  1111. let keyCode = {
  1112. evCode: evCode,
  1113. representation: representation,
  1114. name: name
  1115. };
  1116. arr.push(keyCode);
  1117. }
  1118. }
  1119. }
  1120. return arr;
  1121. }
  1122. KeyHandler.createKeyCodes = createKeyCodes;
  1123. KeyHandler.scrollKeyCode = new StoredMemory("scrollKeyCode", {
  1124. evCode: "Space",
  1125. representation: "Space"
  1126. });
  1127. KeyHandler.imageKeyCode = new StoredMemory("imageKeyCode", {
  1128. evCode: "KeyI",
  1129. representation: "I"
  1130. });
  1131. KeyHandler.keyCodes1 = new StoredMemory("keyCodesRoom", createKeyCodes(["Digit1", "Digit2", "Digit3", "Digit4", "Digit5"], ["1", "2", "3", "4", "5"], [true, true, true, true]));
  1132. KeyHandler.keyCodes2 = new StoredMemory("keyCodesActions", createKeyCodes(["KeyQ", "KeyW", "KeyE", "KeyR", "KeyT"], ["Q", "W", "E", "R", "T"], [true, true, true, true]));
  1133. KeyHandler.keyCodes3 = new StoredMemory("keyCodesGlobal", createKeyCodes(["KeyF", "KeyV", "KeyG", "KeyB"], ["F", "V", "G", "B"], [true, true, true, true]));
  1134. KeyHandler.keyCodeNorth = new StoredMemory("keyCodeNorth", {
  1135. evCode: "KeyS",
  1136. representation: "S"
  1137. });
  1138. KeyHandler.keyCodeEast = new StoredMemory("keyCodeEast", {
  1139. evCode: "KeyC",
  1140. representation: "C"
  1141. });
  1142. KeyHandler.keyCodeSouth = new StoredMemory("keyCodeSouth", {
  1143. evCode: "KeyX",
  1144. representation: "X"
  1145. });
  1146. KeyHandler.keyCodeWest = new StoredMemory("keyCodeWest", {
  1147. evCode: "KeyZ",
  1148. representation: "Z"
  1149. });
  1150. KeyHandler.keyCodeUp = new StoredMemory("keyCodeUp", {
  1151. evCode: "KeyA",
  1152. representation: "A"
  1153. });
  1154. KeyHandler.keyCodeDown = new StoredMemory("keyCodeDown", {
  1155. evCode: "KeyD",
  1156. representation: "D"
  1157. });
  1158. var directionCodeByIndex = [KeyHandler.keyCodeNorth, undefined, KeyHandler.keyCodeEast, undefined,
  1159. KeyHandler.keyCodeSouth, undefined, KeyHandler.keyCodeWest, undefined, KeyHandler.keyCodeUp, KeyHandler.keyCodeDown];
  1160. function getDirectionCode(direction) {
  1161. return getDirectionCodeByIndex(Room.DIRECTIONS.indexOf(direction));
  1162. }
  1163. KeyHandler.getDirectionCode = getDirectionCode;
  1164. function getDirectionCodeByIndex(index) {
  1165. return directionCodeByIndex[index].getValue();
  1166. }
  1167. KeyHandler.getDirectionCodeByIndex = getDirectionCodeByIndex;
  1168. KeyHandler.available1 = [];
  1169. KeyHandler.available2 = [];
  1170. KeyHandler.available3 = [];
  1171. function reset() {
  1172. KeyHandler.available1 = KeyHandler.keyCodes1.getValue().slice();
  1173. KeyHandler.available2 = KeyHandler.keyCodes2.getValue().slice();
  1174. KeyHandler.available3 = KeyHandler.keyCodes3.getValue().slice();
  1175. }
  1176. KeyHandler.reset = reset;
  1177. let showKeys = new StoredMemory("ShowKeys", !Elements.isMobile);
  1178. function applyCode(element, code) {
  1179. if (code == undefined) {
  1180. delete (element.dataset['shortcut']);
  1181. delete (element.dataset['shortcutcode']);
  1182. element.classList.remove("keyable");
  1183. }
  1184. else {
  1185. element.dataset['shortcutcode'] = code.evCode;
  1186. if (showKeys.getValue()) {
  1187. element.dataset['shortcut'] = code.representation;
  1188. }
  1189. element.classList.add("keyable");
  1190. }
  1191. }
  1192. KeyHandler.applyCode = applyCode;
  1193. function getFirstKeyCode() {
  1194. let chosen = KeyHandler.available1.length > 0 ? KeyHandler.available1 :
  1195. KeyHandler.available2.length > 0 ? KeyHandler.available2 :
  1196. KeyHandler.available3.length > 0 ? KeyHandler.available3 : undefined;
  1197. if (chosen != undefined) {
  1198. return chosen.shift();
  1199. }
  1200. return undefined;
  1201. }
  1202. KeyHandler.getFirstKeyCode = getFirstKeyCode;
  1203. function getSecondKeyCode() {
  1204. let chosen = KeyHandler.available2.length > 0 ? KeyHandler.available2 :
  1205. KeyHandler.available3.length > 0 ? KeyHandler.available3 : undefined;
  1206. if (chosen != undefined) {
  1207. return chosen.splice(0, 1)[0];
  1208. }
  1209. return undefined;
  1210. }
  1211. KeyHandler.getSecondKeyCode = getSecondKeyCode;
  1212. function getThirdKeyCode() {
  1213. let chosen = KeyHandler.available3.length > 0 ? KeyHandler.available3 : undefined;
  1214. if (chosen != undefined) {
  1215. return chosen.splice(0, 1)[0];
  1216. }
  1217. return undefined;
  1218. }
  1219. KeyHandler.getThirdKeyCode = getThirdKeyCode;
  1220. function getNextKey(timeout) {
  1221. let timeoutNumber;
  1222. let promise = (new Promise((resolve, reject) => {
  1223. promiseStack.push(resolve);
  1224. if (timeout != undefined) {
  1225. timeoutNumber = setTimeout(() => {
  1226. KeyHandler.rejectPromise(resolve);
  1227. reject();
  1228. }, timeout * 1000);
  1229. }
  1230. }));
  1231. promise.then(() => {
  1232. clearTimeout(timeoutNumber);
  1233. });
  1234. return promise;
  1235. }
  1236. KeyHandler.getNextKey = getNextKey;
  1237. function stopGivingNextKey(originalPromise) {
  1238. let index = promiseOriginalStack.indexOf(originalPromise);
  1239. if (index != -1) {
  1240. rejectPromise(promiseStack[index]);
  1241. }
  1242. }
  1243. KeyHandler.stopGivingNextKey = stopGivingNextKey;
  1244. })(KeyHandler = Controls.KeyHandler || (Controls.KeyHandler = {}));
  1245. })(Controls || (Controls = {}));
  1246. class SayImage {
  1247. constructor(imgName) {
  1248. this.imgName = imgName;
  1249. if (!SayImage.loadTimeCheck && SayImage.imageNames.indexOf(this) == -1) {
  1250. SayImage.imageNames.push(this);
  1251. }
  1252. }
  1253. isImageDefined() {
  1254. try {
  1255. for (var i = 0; i < document.styleSheets.length; i++) {
  1256. var rules = document.styleSheets[i]['rules'] || document.styleSheets[i]['cssRules'];
  1257. for (var x in rules) {
  1258. if (typeof rules[x].selectorText == 'string' && rules[x].selectorText == "." + this.imgName) {
  1259. return true;
  1260. }
  1261. }
  1262. }
  1263. return false;
  1264. }
  1265. catch (e) {
  1266. console.warn("Can't check for undefined images.");
  1267. return true;
  1268. }
  1269. }
  1270. getImageElement() {
  1271. let img = document.createElement("div");
  1272. if (this.isImageDefined()) {
  1273. img.classList.add(this.imgName);
  1274. img.classList.add("contentImage");
  1275. }
  1276. else {
  1277. img.classList.add("error");
  1278. img.appendChild(document.createTextNode("Image \"" + this.imgName + "\" not found."));
  1279. }
  1280. img.addEventListener("click", () => {
  1281. SayImage.showInViewer(this);
  1282. });
  1283. Controls.KeyHandler.applyCode(img, Controls.KeyHandler.imageKeyCode.getValue());
  1284. return img;
  1285. }
  1286. getPrintedElement() {
  1287. return [this.getImageElement()];
  1288. }
  1289. static doLoadTimeCheck() {
  1290. for (let i = 0; i < SayImage.imageNames.length; i++) {
  1291. let image = SayImage.imageNames[i];
  1292. if (!image.isImageDefined()) {
  1293. if (Settings.hardDebug) {
  1294. Elements.CurrentTurnHandler.printAsError("Image \"" + image.imgName + "\" was not found.");
  1295. }
  1296. console.error("Image \"" + image.imgName + "\" was not found.");
  1297. }
  1298. }
  1299. SayImage.loadTimeCheck = true;
  1300. }
  1301. static showInViewer(image) {
  1302. if (!(SayImage.imageViewer.style.display == 'block')) {
  1303. SayImage.imageViewer.addEventListener("click", () => {
  1304. SayImage.imageViewer.style.display = "none";
  1305. });
  1306. SayImage.imageViewer.className = image.imgName;
  1307. SayImage.imageViewer.style.display = "block";
  1308. }
  1309. else {
  1310. SayImage.imageViewer.style.display = "none";
  1311. }
  1312. }
  1313. }
  1314. SayImage.imageNames = [];
  1315. SayImage.loadTimeCheck = false;
  1316. SayImage.imageViewer = document.getElementById("imageViewer");
  1317. var MachineBegins;
  1318. (function (MachineBegins) {
  1319. MachineBegins.ImageLoadTimeCheck = MachineBegins.rulebook.createAndAddRule({
  1320. firstPriority: Rule.PRIORITY_HIGHEST,
  1321. name: "Check for undefined images",
  1322. code: () => {
  1323. try {
  1324. SayImage.doLoadTimeCheck();
  1325. }
  1326. catch (e) {
  1327. console.warn("Can't check for undefined images.");
  1328. }
  1329. }
  1330. });
  1331. })(MachineBegins || (MachineBegins = {}));
  1332. class SayableObject {
  1333. }
  1334. class Say {
  1335. constructor(...objs) {
  1336. this.sequence = [];
  1337. this.skipbreaks = false;
  1338. this.centered = false;
  1339. this.add(...objs);
  1340. }
  1341. add(...objs) {
  1342. this.sequence.push(...objs);
  1343. }
  1344. remove(...objs) {
  1345. for (let i = 0; i < objs.length; i++) {
  1346. let index = this.sequence.indexOf(objs[i]);
  1347. if (index >= 0) {
  1348. this.sequence.splice(index, 1);
  1349. }
  1350. }
  1351. }
  1352. isEmpty() {
  1353. return this.sequence.length < 1;
  1354. }
  1355. async getTextOf(index, seq) {
  1356. let elements = await this.getElementFor(index, seq);
  1357. let div = document.createElement("div");
  1358. for (let i = 0; i < elements.length; i++) {
  1359. if (typeof elements[i] != "number") {
  1360. div.appendChild(elements[i]);
  1361. }
  1362. }
  1363. return div.innerText;
  1364. }
  1365. doLineBreak() {
  1366. if (this.currentParagraph.length > 0 && !this.skipbreaks) {
  1367. let br = document.createElement("br");
  1368. br.classList.add("linebreak");
  1369. let ti = document.createElement("span");
  1370. ti.classList.add("textIndenter");
  1371. this.currentParagraph.push(br, ti);
  1372. }
  1373. }
  1374. doParagraphBreak() {
  1375. if (this.currentParagraph.length > 0 && !this.skipbreaks) {
  1376. this.paragraphs.push(this.currentParagraph);
  1377. this.currentParagraph = [];
  1378. }
  1379. }
  1380. async getParagraphs() {
  1381. this.paragraphs = [];
  1382. this.currentParagraph = [];
  1383. this.skipbreaks = false;
  1384. for (this.sequenceRunner = 0; this.sequenceRunner < this.sequence.length; this.sequenceRunner++) {
  1385. let seq = this.sequence[this.sequenceRunner];
  1386. if (seq instanceof OneOf) {
  1387. seq = seq.getOne();
  1388. }
  1389. if (seq == Say.CENTERED) {
  1390. this.setCentered(true);
  1391. }
  1392. else if (seq == Say.b) {
  1393. let boldObjects = [];
  1394. for (let i = this.sequenceRunner + 1; i < this.sequence.length; i++) {
  1395. let candidate = this.sequenceRunner[i];
  1396. if (candidate == Say.b) {
  1397. this.sequence.splice(i, 1);
  1398. break;
  1399. }
  1400. else {
  1401. boldObjects.push(this.sequence.splice(i, 1));
  1402. }
  1403. }
  1404. if (boldObjects.length > 0) {
  1405. let bold = new SayBold(...boldObjects);
  1406. this.sequence.splice(this.sequenceRunner + 1, 0, bold);
  1407. }
  1408. }
  1409. else if (seq == Say.COCK) {
  1410. if (HumanoidPenis != undefined) {
  1411. let cock = HumanoidPenis.getSynonym();
  1412. this.currentParagraph.push(document.createTextNode(cock));
  1413. }
  1414. }
  1415. else if (seq == Say.PUSSY) {
  1416. if (HumanoidVagina != undefined) {
  1417. let vagina = HumanoidVagina.getSynonym();
  1418. this.currentParagraph.push(document.createTextNode(vagina));
  1419. }
  1420. }
  1421. else if (seq == Say.LINE_BREAK) {
  1422. this.doLineBreak();
  1423. }
  1424. else if (seq == Say.PARAGRAPH_BREAK) {
  1425. this.doParagraphBreak();
  1426. }
  1427. else if (seq == Say.RUN_PARAGRAPH) {
  1428. this.skipbreaks = true;
  1429. }
  1430. else if (seq == Say.RUN_PARAGRAPH_OFF) {
  1431. this.skipbreaks = false;
  1432. }
  1433. else if (typeof seq == "function") {
  1434. let fObj = seq(this);
  1435. if (Array.isArray(fObj)) {
  1436. for (let k = fObj.length - 1; k >= 0; k--) {
  1437. this.sequence.splice(this.sequenceRunner + 1, 0, fObj[k]);
  1438. }
  1439. }
  1440. else if (fObj != undefined) {
  1441. this.sequence.splice(this.sequenceRunner + 1, 0, fObj);
  1442. }
  1443. this.sequence.splice(this.sequenceRunner, 1);
  1444. this.sequenceRunner--;
  1445. }
  1446. else if (seq.constructor == this.constructor) {
  1447. for (let k = seq.sequence.length - 1; k >= 0; k--) {
  1448. this.sequence.splice(this.sequenceRunner + 1, 0, seq.sequence[k]);
  1449. }
  1450. this.sequence.splice(this.sequenceRunner, 1);
  1451. this.sequenceRunner--;
  1452. }
  1453. else if (seq != undefined) {
  1454. let elements = await this.getElementFor(this.sequenceRunner, seq);
  1455. for (let i = 0; i < elements.length; i++) {
  1456. if (elements[i] === Say.DO_LINE_BREAK) {
  1457. this.doLineBreak();
  1458. }
  1459. else if (elements[i] === Say.DO_PARAGRAPH_BREAK) {
  1460. this.doParagraphBreak();
  1461. }
  1462. else {
  1463. this.currentParagraph.push(elements[i]);
  1464. }
  1465. }
  1466. }
  1467. }
  1468. if (this.currentParagraph.length > 0) {
  1469. this.paragraphs.push(this.currentParagraph);
  1470. }
  1471. return this.paragraphs;
  1472. }
  1473. async getElementFor(index, obj) {
  1474. if (obj instanceof Promise) {
  1475. obj = await obj;
  1476. }
  1477. if (typeof obj == "string" || obj instanceof String) {
  1478. return [document.createTextNode(obj)];
  1479. }
  1480. else if (typeof obj == "number" || obj instanceof Number) {
  1481. return [document.createTextNode((parseFloat(obj.toFixed(2)) / 1).toString())];
  1482. }
  1483. else if (typeof obj == "function") {
  1484. let elements = await this.getElementFor(-1, obj(this));
  1485. return elements;
  1486. }
  1487. else if (obj instanceof SayImage) {
  1488. return [obj.getImageElement()];
  1489. }
  1490. else if (obj instanceof SayLeftRight) {
  1491. return (await obj.getPureElements());
  1492. }
  1493. else if (obj instanceof Say) {
  1494. let elements = await obj.getPureElements(this);
  1495. return elements;
  1496. }
  1497. else if (this.isProperElement(obj)) {
  1498. return [obj];
  1499. }
  1500. else if (obj instanceof Object) {
  1501. let elements = await this.printName(obj);
  1502. return elements;
  1503. }
  1504. }
  1505. async getPureElements(say) {
  1506. let paragraphs = await this.getParagraphs();
  1507. return paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
  1508. }
  1509. setCentered(bool) {
  1510. this.centered = bool;
  1511. }
  1512. async getHTML(tagName, classList, singleParagraph) {
  1513. let paragraphs = await this.getParagraphs();
  1514. if (singleParagraph == true && paragraphs.length > 1) {
  1515. paragraphs = [Array.prototype.concat.apply([], paragraphs)];
  1516. }
  1517. let elements = [];
  1518. for (let i = 0, paragraph = paragraphs[i]; paragraph != undefined; paragraph = paragraphs[++i]) {
  1519. let parent = document.createElement(tagName);
  1520. if (classList.length > 0) {
  1521. parent.classList.add(...classList);
  1522. }
  1523. for (let k = 0, ele = paragraph[k]; ele != undefined; ele = paragraph[++k]) {
  1524. parent.appendChild(ele);
  1525. }
  1526. elements.push(parent);
  1527. if (this.centered) {
  1528. parent.classList.add("centered");
  1529. }
  1530. }
  1531. return elements;
  1532. }
  1533. getHTMLContent() {
  1534. return this.getHTML("p", ["content"]);
  1535. }
  1536. isProperElement(o) {
  1537. return (typeof Node === "object" ? o instanceof Node :
  1538. o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string") || (typeof HTMLElement === "object" ? o instanceof HTMLElement :
  1539. o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string");
  1540. }
  1541. async printName(thing) {
  1542. this.currentNoun = thing;
  1543. this.currentNounElements = [];
  1544. let before = Say.beforePrinting.execute({ noun: this });
  1545. await before;
  1546. let print = Say.printing.execute({ noun: this });
  1547. await print;
  1548. let after = Say.afterPrinting.execute({ noun: this });
  1549. await after;
  1550. return this.currentNounElements;
  1551. }
  1552. static hisHersIts(target, startOfSentence) {
  1553. return new SayHisHersIts(target);
  1554. }
  1555. }
  1556. Say.LINE_BREAK = new SayableObject();
  1557. Say.PARAGRAPH_BREAK = new SayableObject();
  1558. Say.RUN_PARAGRAPH = new SayableObject();
  1559. Say.RUN_PARAGRAPH_OFF = new SayableObject();
  1560. Say.CENTERED = new SayableObject();
  1561. Say.b = new SayableObject();
  1562. Say.DO_PARAGRAPH_BREAK = new SayableObject();
  1563. Say.DO_LINE_BREAK = new SayableObject();
  1564. Say.COCK = new SayableObject();
  1565. Say.PUSSY = new SayableObject();
  1566. Say.beforePrinting = new Rulebook("Before printing the name of something");
  1567. Say.printing = new Rulebook("Printing the name of something");
  1568. Say.afterPrinting = new Rulebook("After printing the name of something");
  1569. Say.printing.addRule(new Rule({
  1570. name: "Printing the name of a Printable Element",
  1571. firstPriority: Rule.PRIORITY_LOW,
  1572. code: (rulebook) => {
  1573. let say = rulebook.noun;
  1574. if (say.currentNoun.getPrintedElement) {
  1575. say.currentNounElements.push(...say.currentNoun.getPrintedElement());
  1576. return true;
  1577. }
  1578. }
  1579. }));
  1580. Say.printing.addRule(new Rule({
  1581. name: "Printing the name of a Printable",
  1582. firstPriority: Rule.PRIORITY_LOW,
  1583. code: (rulebook) => {
  1584. let say = rulebook.noun;
  1585. if (say.currentNoun.getPrintedName) {
  1586. let thingEle = document.createTextNode(say.currentNoun.getPrintedName());
  1587. say.currentNounElements.push(thingEle);
  1588. return true;
  1589. }
  1590. }
  1591. }));
  1592. Say.printing.addRule(new Rule({
  1593. name: "Printing the name of an unknown object",
  1594. firstPriority: Rule.PRIORITY_LOWEST,
  1595. priority: Rule.PRIORITY_LOWEST,
  1596. code: (rulebook) => {
  1597. let say = rulebook.noun;
  1598. if (say.currentNoun.getPrintedName) {
  1599. say.currentNounElements.push((document.createTextNode(say.currentNoun.toString())));
  1600. return true;
  1601. }
  1602. }
  1603. }));
  1604. var CharacterCreation;
  1605. (function (CharacterCreation) {
  1606. CharacterCreation.FalselyAccused = new CharacterOrigin("Falsely Accused");
  1607. CharacterCreation.FalselyAccused.name = "Falsely Accused";
  1608. CharacterCreation.FalselyAccused.description = new Say("You made some allegations against a powerful man in your village. Whether those were true or not didn't matter, he was most displeased with your actions and did all he could to end your life as you knew it. Just as you were about to be executed for your inexistent crimes, the man asked for mercy. You thought he wasn't willing to go this far with his lies, only to have your hopes crushed when you noticed a smirk in his evil face.\n", Say.PARAGRAPH_BREAK, "The man claimed he wanted to forgive you, but would need proof of your regret. You received an alternative sentence: go to the Tower and find a way to destroy it. Surely an impossible task. Surely just another death sentence... or worse. But it's not like you have a choice in the matter.");
  1609. CharacterCreation.FalselyAccused.bonusStats = "This origin confers no bonuses, but you have complete freedom with your perks.";
  1610. })(CharacterCreation || (CharacterCreation = {}));
  1611. var CharacterCreation;
  1612. (function (CharacterCreation) {
  1613. CharacterCreation.HornyVirgin = new Perk("Horny Virgin");
  1614. CharacterCreation.HornyVirgin.description = new Say("Whichever life you led up to this point never allowed you to explore your sexuality. As a result, you're both virgin AND extremely horny. This perk makes it so that the World Depravity around the Tower is initially higher and rises faster, however you are not as affected by this rising Depravity around you.", Say.PARAGRAPH_BREAK, "This perk is mandatory for Champions and is not compatible with most sex-related perks.");
  1615. CharacterCreation.HornyVirgin.forcedStatus = (hornyVirgin) => {
  1616. if (CharacterCreation.getOrigin() == CharacterCreation.ChampionOrigin) {
  1617. return true;
  1618. }
  1619. else if (CharacterCreation.Slut.isEnabled(true)) {
  1620. return false;
  1621. }
  1622. };
  1623. CharacterCreation.Slut = new Perk("Unredeemable Slut");
  1624. CharacterCreation.Slut.description = new Say("Simply put: you really like sex. Your Depravity starts off higher and rises even faster, also affecting World Depravity. However, you level up sex-related Skills faster.", Say.PARAGRAPH_BREAK, "This perk is not compatible with ", CharacterCreation.HornyVirgin.name, ".");
  1625. CharacterCreation.Slut.forcedStatus = () => {
  1626. if (CharacterCreation.HornyVirgin.isEnabled(true)) {
  1627. return false;
  1628. }
  1629. };
  1630. CharacterCreation.SensitiveHoles = new Perk("Sensitive Holes");
  1631. CharacterCreation.SensitiveHoles.description = "You are very sensitive to any kind of receptive penetration. You have a harder time escaping grapples while being penetrated and an easier time orgasming from it, but getting aroused faster also means you take less damage from it.";
  1632. })(CharacterCreation || (CharacterCreation = {}));
  1633. var ContentHandler;
  1634. (function (ContentHandler) {
  1635. let contentHash = {};
  1636. let contentArray = [];
  1637. function registerContentType(type) {
  1638. if (contentHash[type.getId()] != undefined) {
  1639. console.error("[ContentHandler} Can't register the content.", type, "Old:", contentHash[type.getId()]);
  1640. return;
  1641. }
  1642. else {
  1643. contentHash[type.getId()] = type;
  1644. contentArray.push(type);
  1645. }
  1646. }
  1647. ContentHandler.registerContentType = registerContentType;
  1648. function getContentTypes() {
  1649. return contentArray.slice();
  1650. }
  1651. ContentHandler.getContentTypes = getContentTypes;
  1652. })(ContentHandler || (ContentHandler = {}));
  1653. class ContentType extends StoredMemory {
  1654. constructor(options) {
  1655. super(ContentType.memoryPrefix + options.id, options.defaultValue);
  1656. this.valueDescription = () => { return new Say(JSON.stringify(this.getValue())); };
  1657. this.changeable = true;
  1658. this.description = options.description instanceof Say ? options.description : new Say(options.description);
  1659. this.valueDescription = options.currentValueDescription == undefined ? this.valueDescription : options.currentValueDescription;
  1660. if (options.changeable == false) {
  1661. this.storeValue(options.defaultValue);
  1662. this.changeable = false;
  1663. }
  1664. ContentHandler.registerContentType(this);
  1665. }
  1666. getDescription() {
  1667. return this.description;
  1668. }
  1669. getValueDescription() {
  1670. let desc = this.valueDescription(this);
  1671. if (desc instanceof Say) {
  1672. return desc;
  1673. }
  1674. else {
  1675. return new Say(desc);
  1676. }
  1677. }
  1678. toggle() {
  1679. if (this.changeable) {
  1680. this.storeValue(!this.getValue());
  1681. }
  1682. }
  1683. isAllowed() {
  1684. return this.getValue();
  1685. }
  1686. }
  1687. ContentType.memoryPrefix = "ct_";
  1688. ContentType.MM = new ContentType({
  1689. changeable: false,
  1690. description: "Homosexual (M/M) sexual events",
  1691. id: "MM",
  1692. defaultValue: true
  1693. });
  1694. ContentType.FF = new ContentType({
  1695. changeable: false,
  1696. description: "Homosexual (F/F) sexual events",
  1697. id: "FF",
  1698. defaultValue: true
  1699. });
  1700. ContentType.MF = new ContentType({
  1701. changeable: false,
  1702. description: "Heterosexual (M/F) sexual events",
  1703. id: "MF",
  1704. defaultValue: true
  1705. });
  1706. ContentType.Beast = new ContentType({
  1707. changeable: true,
  1708. description: "Sexual events with either monsters or magical beasts. MM/MF/FF take precedence over this one if blocked. Sufficiently human creatures do not get counted into this.",
  1709. id: "Beast",
  1710. defaultValue: true
  1711. });
  1712. ContentType.Scat = new ContentType({
  1713. changeable: false,
  1714. description: "Scatologic sexual events",
  1715. id: "Scat",
  1716. defaultValue: false
  1717. });
  1718. ContentType.Pee = new ContentType({
  1719. changeable: false,
  1720. description: "Sexual events with urine",
  1721. id: "Urophilia",
  1722. defaultValue: false
  1723. });
  1724. var Elements;
  1725. (function (Elements) {
  1726. var CurrentTurnHandler;
  1727. (function (CurrentTurnHandler) {
  1728. CurrentTurnHandler.currentTurnTab = document.getElementById("currentTurnTab");
  1729. CurrentTurnHandler.currentTurn = document.getElementById("currentTurn");
  1730. CurrentTurnHandler.turnHr = document.createElement("p");
  1731. CurrentTurnHandler.lastReadOffset = CurrentTurnHandler.currentTurnTab.clientHeight / 2;
  1732. CurrentTurnHandler.turnHr.classList.add("turnStart");
  1733. CurrentTurnHandler.turnHr.appendChild(document.createTextNode("Start of Turn"));
  1734. function startTurn(action) {
  1735. let oldContent = CurrentTurnHandler.currentTurnTab.getElementsByClassName("content");
  1736. for (let i = 0; i < oldContent.length; i++) {
  1737. oldContent[i].classList.add("contentOld");
  1738. oldContent[i].classList.remove("content");
  1739. }
  1740. CurrentTurnHandler.currentTurnTab.appendChild(CurrentTurnHandler.turnHr);
  1741. Elements.startTurn();
  1742. scrollToNewTurn();
  1743. }
  1744. CurrentTurnHandler.startTurn = startTurn;
  1745. function isTurn() {
  1746. return Elements.isInTurn();
  1747. }
  1748. CurrentTurnHandler.isTurn = isTurn;
  1749. function endTurn() {
  1750. Elements.endTurn();
  1751. }
  1752. CurrentTurnHandler.endTurn = endTurn;
  1753. function getSayElementsAsContent(say) {
  1754. return say.getHTML("p", ["content"]);
  1755. }
  1756. CurrentTurnHandler.getSayElementsAsContent = getSayElementsAsContent;
  1757. function printAsContent(say) {
  1758. let node = getMarker();
  1759. getSayElementsAsContent(say).then(value => {
  1760. insertBefore(value, node);
  1761. unprint(node);
  1762. });
  1763. }
  1764. CurrentTurnHandler.printAsContent = printAsContent;
  1765. function simplePrint(...sayValues) {
  1766. printAsContent(new Say(...sayValues));
  1767. }
  1768. CurrentTurnHandler.simplePrint = simplePrint;
  1769. function printAsError(msg) {
  1770. if (msg instanceof Say) {
  1771. msg.getHTML("div", ["error"], true).then(value => {
  1772. print(...value);
  1773. });
  1774. }
  1775. else {
  1776. let div = document.createElement("div");
  1777. div.classList.add("error");
  1778. div.appendChild(document.createTextNode(msg));
  1779. print(div);
  1780. }
  1781. }
  1782. CurrentTurnHandler.printAsError = printAsError;
  1783. function clear() {
  1784. while (CurrentTurnHandler.currentTurnTab.firstChild != undefined) {
  1785. CurrentTurnHandler.currentTurnTab.removeChild(CurrentTurnHandler.currentTurnTab.firstChild);
  1786. }
  1787. Controls.KeyHandler.reset();
  1788. }
  1789. CurrentTurnHandler.clear = clear;
  1790. function print(...elements) {
  1791. if (elements.length > 0) {
  1792. elements.forEach((element) => {
  1793. CurrentTurnHandler.currentTurnTab.appendChild(element);
  1794. });
  1795. scrollTo(CurrentTurnHandler.lastReadOffset);
  1796. }
  1797. }
  1798. CurrentTurnHandler.print = print;
  1799. function getMarker() {
  1800. let node = document.createTextNode("");
  1801. CurrentTurnHandler.currentTurnTab.appendChild(node);
  1802. return node;
  1803. }
  1804. CurrentTurnHandler.getMarker = getMarker;
  1805. function insertBefore(newChilds, oldChild) {
  1806. newChilds.forEach((newChild) => {
  1807. CurrentTurnHandler.currentTurnTab.insertBefore(newChild, oldChild);
  1808. });
  1809. scrollTo(CurrentTurnHandler.lastReadOffset);
  1810. }
  1811. CurrentTurnHandler.insertBefore = insertBefore;
  1812. function unprint(...elements) {
  1813. elements.forEach((element) => {
  1814. if (element.parentElement == CurrentTurnHandler.currentTurnTab) {
  1815. CurrentTurnHandler.currentTurnTab.removeChild(element);
  1816. }
  1817. });
  1818. }
  1819. CurrentTurnHandler.unprint = unprint;
  1820. function scrollToNewTurn() {
  1821. let target = CurrentTurnHandler.turnHr.offsetTop + CurrentTurnHandler.turnHr.offsetHeight;
  1822. CurrentTurnHandler.lastReadOffset = target;
  1823. if (target < CurrentTurnHandler.currentTurn.scrollTop) {
  1824. return;
  1825. }
  1826. scrollTo(target);
  1827. }
  1828. CurrentTurnHandler.scrollToNewTurn = scrollToNewTurn;
  1829. function scrollToBottom() {
  1830. scrollTo(CurrentTurnHandler.currentTurn.scrollHeight - CurrentTurnHandler.currentTurn.clientHeight);
  1831. }
  1832. CurrentTurnHandler.scrollToBottom = scrollToBottom;
  1833. function scrollSpace() {
  1834. scrollTo(CurrentTurnHandler.currentTurn.scrollTop + (CurrentTurnHandler.currentTurn.clientHeight / 2));
  1835. }
  1836. CurrentTurnHandler.scrollSpace = scrollSpace;
  1837. CurrentTurnHandler.currentTurn.addEventListener("scroll", () => {
  1838. let currentRead = CurrentTurnHandler.currentTurn.scrollTop + CurrentTurnHandler.currentTurn.clientHeight;
  1839. if (currentRead > CurrentTurnHandler.lastReadOffset) {
  1840. CurrentTurnHandler.lastReadOffset = currentRead;
  1841. }
  1842. });
  1843. var startOffset;
  1844. var targetOffset;
  1845. var startTime;
  1846. var finishTime;
  1847. var totalTime;
  1848. var animationRequest;
  1849. function scrollTo(offset) {
  1850. if (offset <= CurrentTurnHandler.lastReadOffset) {
  1851. startOffset = CurrentTurnHandler.currentTurn.scrollTop;
  1852. targetOffset = offset;
  1853. startTime = new Date().getTime();
  1854. finishTime = startTime + Elements.animationTime;
  1855. totalTime = finishTime - startTime;
  1856. startScrolling();
  1857. }
  1858. }
  1859. CurrentTurnHandler.scrollTo = scrollTo;
  1860. function startScrolling() {
  1861. if (animationRequest == undefined) {
  1862. animationRequest = requestAnimationFrame(CurrentTurnHandler.updateFrame);
  1863. }
  1864. }
  1865. CurrentTurnHandler.startScrolling = startScrolling;
  1866. CurrentTurnHandler.updateFrame = () => {
  1867. animationRequest = undefined;
  1868. let movingOffset = (targetOffset - startOffset);
  1869. let timePassed = new Date().getTime() - startTime;
  1870. let idealOffset = movingOffset * (timePassed / totalTime);
  1871. let maxScroll = CurrentTurnHandler.currentTurn.scrollHeight - CurrentTurnHandler.currentTurn.clientHeight;
  1872. CurrentTurnHandler.currentTurn.scrollTop = startOffset + idealOffset;
  1873. if (CurrentTurnHandler.currentTurn.scrollTop < targetOffset && CurrentTurnHandler.currentTurn.scrollTop < maxScroll) {
  1874. startScrolling();
  1875. }
  1876. };
  1877. })(CurrentTurnHandler = Elements.CurrentTurnHandler || (Elements.CurrentTurnHandler = {}));
  1878. })(Elements || (Elements = {}));
  1879. var Controls;
  1880. (function (Controls) {
  1881. var Links;
  1882. (function (Links) {
  1883. function makeCustomLink(element, options) {
  1884. if (options.mouseover != undefined && options.mouseout != undefined) {
  1885. element.addEventListener("mouseover", options.mouseover);
  1886. element.addEventListener("mouseout", options.mouseout);
  1887. }
  1888. element.addEventListener("click", options.click);
  1889. }
  1890. Links.makeCustomLink = makeCustomLink;
  1891. function makeLink(element, action) {
  1892. makeCustomLink(element, {
  1893. mouseover: () => { Elements.HyperlinkHandler.hoverAction(action); },
  1894. mouseout: () => { Elements.HyperlinkHandler.unhoverAction(); },
  1895. click: (e) => {
  1896. TurnSequence.execute(action);
  1897. Elements.HyperlinkHandler.unhoverAction();
  1898. e.stopPropagation();
  1899. e.preventDefault();
  1900. }
  1901. });
  1902. }
  1903. Links.makeLink = makeLink;
  1904. })(Links = Controls.Links || (Controls.Links = {}));
  1905. })(Controls || (Controls = {}));
  1906. class RoomNode {
  1907. constructor(room) {
  1908. this.mainDiv = document.createElement("div");
  1909. this.room = room;
  1910. this.mainDiv.classList.add("mapRoom");
  1911. if (room != undefined) {
  1912. this.mainDiv.classList.add("linked", room.getBackgroundClass());
  1913. Room.DIRECTIONS.forEach((direction) => {
  1914. if (room.connections[direction] != undefined) {
  1915. let directionDiv = document.createElement("div");
  1916. directionDiv.classList.add("mapRoomConnection" + DirectionNames[Direction[direction]]);
  1917. this.mainDiv.appendChild(directionDiv);
  1918. }
  1919. });
  1920. Controls.Links.makeLink(this.mainDiv, new ActionGo(WorldState.player, room));
  1921. }
  1922. }
  1923. async createRoomNameFloater() {
  1924. if (this.room != undefined) {
  1925. let roomName = document.createElement("div");
  1926. let sayName = new Say(this.room);
  1927. await sayName.getPureElements().then(value => {
  1928. value.forEach(element => {
  1929. roomName.appendChild(element);
  1930. });
  1931. Elements.HoverInfo.makeHoverable(this.mainDiv, value);
  1932. });
  1933. }
  1934. }
  1935. async update() {
  1936. if (this.room != undefined) {
  1937. if (WorldState.player.getRoom() == this.room) {
  1938. this.mainDiv.classList.add("current");
  1939. }
  1940. else {
  1941. this.mainDiv.classList.remove("current");
  1942. }
  1943. let isRemembered = await WorldState.isRoomRemembered(this.room);
  1944. if (!isRemembered) {
  1945. this.mainDiv.classList.add("unknown");
  1946. }
  1947. else {
  1948. this.mainDiv.classList.remove("unknown");
  1949. }
  1950. }
  1951. }
  1952. getElement() {
  1953. return this.mainDiv;
  1954. }
  1955. }
  1956. class SayAn extends Say {
  1957. constructor(autoUppercase) {
  1958. super();
  1959. this.node = document.createTextNode("a ");
  1960. this.uppercase = true;
  1961. if (autoUppercase != undefined) {
  1962. this.uppercase = autoUppercase;
  1963. }
  1964. }
  1965. async getPureElements(say) {
  1966. let next = say.sequence[say.sequenceRunner + 1];
  1967. if (next == undefined || (next instanceof Thing && next.properlyNamed)) {
  1968. this.node.nodeValue = "";
  1969. }
  1970. else {
  1971. let aan = AvsAn.query((await say.getTextOf(say.sequenceRunner + 1, next)).trim());
  1972. if (aan.prefix != "") {
  1973. this.node.nodeValue = aan.article + " ";
  1974. }
  1975. if (this.uppercase && say.currentParagraph.length == 0) {
  1976. this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase()
  1977. + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1);
  1978. }
  1979. this.node.nodeValue = this.node.nodeValue + " ";
  1980. }
  1981. return [this.node];
  1982. }
  1983. }
  1984. var AvsAn = (function () {
  1985. var dict = "p3ezz;4wrlg;2h;#2rg;22;2;a;7;;if;z;;&4h;1c;1;N;6;;*yp;6a;4;a2;q;;e1;q;;i1;h;;o;7;;/op;5n;9;a3;i;;e5;h;;h;;1;o5;;;i;r;;l;;1;/;6;;n;;1;o6;;;o1;a;;r;;1;e7;;;s;;1;/2;j;;09pa;y3;1;8e;10;;17qoq;qmm;2;12hp;7nw;a;0o4;45;1;0n;2w;;15r;1n;2;8;7;;9;5;;28s;x;;34q;z;1;7;5;;45n;n;;598;w;;65k;u;;74j;y;;850;y;;93x;g;;81ux;hgk;a;0zb;el;a;0p;4h;;11;16;;21;10;;32;15;;4;18;;54;v;;6;12;;7;s;;8;v;;9;17;;11k;bq;1; v;2;;229;f3;2; 1a;3;;–5;;;31x;jc;1; 12;2;;41w;kq;2; z;4;;–5;;;559;sp;5; 2k;1;;,h;;;h7;;;kd;;;m6;;;62p;rm;2; 1b;5;;k5;;;72n;y6;2; 14;;;–5;;;82r;192;2; 19;4;;,5;;;93i;1ig;2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e7q;36;;ig;;;t33j;1ai;2;m;r;;ta;16b;;v3c;c;;w3e;d;1;a;7;;x;;b; 23;hw;;';6;;,1;c;;.2;a;;8o;47;;b5;f;;k;13;;l1;8;;md;x;1;a7;;;t;c;;y4y;e;1; ;a;;y6atn;ca;1;l1;c;;{6s;r;1;a;7;;|58;m;1;a1;b;;£6cs;8l;1;82b;6o;;À;9;;Áa;o;;Ä3;c;;Å2;k;;Æ4;k;;Éf;2q;;Ò;c;;Ó1;1d;;Öa;16;;Ü4;v;;à7;v;;á5;l;;æ1;m;;è;6;;é4c;bg;1;t3h;29;3;a4;1n;;o;a;;u1;b;;í;5;;ö2;e;;üd;r;1; 7;;;Ā1;b;;ā3;s;;ī;5;;İ4;o;;Ō3;o;;ō;2m;;œ;8;;Ω2;e;;α1c;c1;;ε5;1s;;ω7;1x;;ϵ;8;;е;5;;–3a;1k;2;e;a;;i;9;;ℓ;d;;";
  1986. var root = {};
  1987. function fill(prefix, node, dict) {
  1988. var a = dict.split(';', 3), n = a.map(function (x) { return parseInt(x, 36) || 0; });
  1989. node.data = {
  1990. aCount: n[0],
  1991. anCount: n[1],
  1992. prefix: prefix,
  1993. article: n[0] >= n[1] ? "a" : "an"
  1994. };
  1995. dict = dict.substr(1 + a.join(';').length);
  1996. for (var i = 0; i < n[2]; i++)
  1997. dict = fill(prefix + dict[0], node[dict[0]] = {}, dict.substr(1));
  1998. return dict;
  1999. }
  2000. fill("", root, dict);
  2001. return {
  2002. raw: root,
  2003. query: function (word) {
  2004. var node = root, sI = 0, result, c;
  2005. do {
  2006. c = word[sI++];
  2007. } while ('"‘’“”$\'-('.indexOf(c) >= 0);
  2008. while (1) {
  2009. result = node.data || result;
  2010. node = node[c];
  2011. if (!node)
  2012. return result;
  2013. c = word[sI++] || " ";
  2014. }
  2015. }
  2016. };
  2017. })();
  2018. class SayBold extends Say {
  2019. async getPureElements() {
  2020. let paragraphs = await this.getParagraphs();
  2021. let elements = paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
  2022. let b = document.createElement("b");
  2023. elements.forEach((element) => {
  2024. b.appendChild(element);
  2025. });
  2026. return [b];
  2027. }
  2028. }
  2029. class SayHeSheIt extends Say {
  2030. constructor(target, autoUppercase) {
  2031. super();
  2032. this.node = document.createTextNode("a ");
  2033. this.uppercase = true;
  2034. this.target = target;
  2035. if (autoUppercase != undefined) {
  2036. this.uppercase = autoUppercase;
  2037. }
  2038. }
  2039. async getPureElements(say) {
  2040. let next = this.target;
  2041. if (next == undefined) {
  2042. this.node.nodeValue = "";
  2043. }
  2044. else {
  2045. if (next instanceof Humanoid) {
  2046. let gender = next.getGenderValue();
  2047. if (gender.genderValueCorrected > 65) {
  2048. this.node.nodeValue = "she ";
  2049. }
  2050. else if (gender.genderValueCorrected < 35) {
  2051. this.node.nodeValue = "he ";
  2052. }
  2053. else {
  2054. if (gender.hasPenisBulge || gender.hasPenis) {
  2055. this.node.nodeValue = "he ";
  2056. }
  2057. else if (gender.hasVagina || gender.hasTits) {
  2058. this.node.nodeValue = "she ";
  2059. }
  2060. else {
  2061. this.node.nodeValue = "they ";
  2062. }
  2063. }
  2064. }
  2065. else {
  2066. this.node.nodeValue = "it ";
  2067. }
  2068. if (this.uppercase && say.currentParagraph.length == 0) {
  2069. this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase()
  2070. + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1);
  2071. }
  2072. }
  2073. return [this.node];
  2074. }
  2075. }
  2076. class SayHimHerIt extends Say {
  2077. constructor(target, autoUppercase) {
  2078. super();
  2079. this.node = document.createTextNode("a ");
  2080. this.uppercase = true;
  2081. this.target = target;
  2082. if (autoUppercase != undefined) {
  2083. this.uppercase = autoUppercase;
  2084. }
  2085. }
  2086. async getPureElements(say) {
  2087. let next = this.target;
  2088. if (next == undefined) {
  2089. this.node.nodeValue = "";
  2090. }
  2091. else {
  2092. if (next instanceof Humanoid) {
  2093. let gender = next.getGenderValue();
  2094. if (gender.genderValueCorrected > 65) {
  2095. this.node.nodeValue = "her ";
  2096. }
  2097. else if (gender.genderValueCorrected < 35) {
  2098. this.node.nodeValue = "him ";
  2099. }
  2100. else {
  2101. if (gender.hasPenisBulge || gender.hasPenis) {
  2102. this.node.nodeValue = "him ";
  2103. }
  2104. else if (gender.hasVagina || gender.hasTits) {
  2105. this.node.nodeValue = "her ";
  2106. }
  2107. else {
  2108. this.node.nodeValue = "them ";
  2109. }
  2110. }
  2111. }
  2112. else {
  2113. this.node.nodeValue = "it ";
  2114. }
  2115. if (this.uppercase && say.currentParagraph.length == 0) {
  2116. this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase()
  2117. + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1);
  2118. }
  2119. }
  2120. return [this.node];
  2121. }
  2122. }
  2123. class SayHisHersIts extends Say {
  2124. constructor(target, autoUppercase) {
  2125. super();
  2126. this.node = document.createTextNode("a ");
  2127. this.uppercase = true;
  2128. this.target = target;
  2129. if (autoUppercase != undefined) {
  2130. this.uppercase = autoUppercase;
  2131. }
  2132. }
  2133. async getPureElements(say) {
  2134. let next = this.target;
  2135. if (next == undefined) {
  2136. this.node.nodeValue = "";
  2137. }
  2138. else {
  2139. if (next instanceof Humanoid) {
  2140. let gender = next.getGenderValue();
  2141. if (gender.genderValueCorrected > 65) {
  2142. this.node.nodeValue = "hers ";
  2143. }
  2144. else if (gender.genderValueCorrected < 35) {
  2145. this.node.nodeValue = "his ";
  2146. }
  2147. else {
  2148. if (gender.hasPenisBulge || gender.hasPenis) {
  2149. this.node.nodeValue = "his ";
  2150. }
  2151. else if (gender.hasVagina || gender.hasTits) {
  2152. this.node.nodeValue = "hers ";
  2153. }
  2154. else {
  2155. this.node.nodeValue = "their ";
  2156. }
  2157. }
  2158. }
  2159. else {
  2160. this.node.nodeValue = "its ";
  2161. }
  2162. if (this.uppercase && say.currentParagraph.length == 0) {
  2163. this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase()
  2164. + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1);
  2165. }
  2166. }
  2167. return [this.node];
  2168. }
  2169. }
  2170. class SayIf extends Say {
  2171. constructor(condition, ...objs) {
  2172. super(...objs);
  2173. this.condition = condition != undefined ? condition : () => { return true; };
  2174. }
  2175. async getPureElements() {
  2176. if (this.condition()) {
  2177. let paragraphs = await this.getParagraphs();
  2178. return paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
  2179. }
  2180. return [];
  2181. }
  2182. }
  2183. class SayItalic extends Say {
  2184. async getPureElements() {
  2185. let paragraphs = await this.getParagraphs();
  2186. let elements = paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
  2187. let b = document.createElement("i");
  2188. elements.forEach((element) => {
  2189. b.appendChild(element);
  2190. });
  2191. return [b];
  2192. }
  2193. }
  2194. class SayLeftRight extends Say {
  2195. constructor() {
  2196. super();
  2197. this.left = new Say();
  2198. this.right = new Say();
  2199. }
  2200. addLeft(...objs) {
  2201. this.left.add(...objs);
  2202. }
  2203. addRight(...objs) {
  2204. this.right.add(...objs);
  2205. }
  2206. async getPureElements() {
  2207. if (this.left.sequence.length == 0) {
  2208. return await this.right.getPureElements();
  2209. }
  2210. else if (this.right.sequence.length == 0) {
  2211. return await this.left.getPureElements();
  2212. }
  2213. let mainDiv = document.createElement("div");
  2214. mainDiv.classList.add("horFlex");
  2215. let left = document.createElement("div");
  2216. left.classList.add("horFlexColumn");
  2217. mainDiv.appendChild(left);
  2218. let right = document.createElement("div");
  2219. right.classList.add("horFlexColumn");
  2220. mainDiv.appendChild(right);
  2221. await this.left.getPureElements().then(value => {
  2222. value.forEach(element => {
  2223. left.appendChild(element);
  2224. });
  2225. });
  2226. await this.right.getPureElements().then(value => {
  2227. value.forEach(element => {
  2228. right.appendChild(element);
  2229. });
  2230. });
  2231. return [mainDiv];
  2232. }
  2233. }
  2234. class SayLink extends Say {
  2235. setAction(action) {
  2236. this.linkedAction = action;
  2237. }
  2238. async getPureElements() {
  2239. let paragraphs = await this.getParagraphs();
  2240. let elements = paragraphs.length == 1 ? paragraphs[0] : Array.prototype.concat.apply([], paragraphs);
  2241. let b = document.createElement("b");
  2242. b.classList.add("textLink");
  2243. elements.forEach((element) => {
  2244. b.appendChild(element);
  2245. });
  2246. Controls.Links.makeLink(b, this.linkedAction);
  2247. return [b];
  2248. }
  2249. }
  2250. class SayThe extends Say {
  2251. constructor(autoUppercase, alwaysPrint) {
  2252. super();
  2253. this.node = document.createTextNode("");
  2254. this.uppercase = true;
  2255. this.alwaysPrint = false;
  2256. if (autoUppercase != undefined) {
  2257. this.uppercase = autoUppercase;
  2258. }
  2259. if (alwaysPrint) {
  2260. this.alwaysPrint = alwaysPrint;
  2261. }
  2262. }
  2263. async getPureElements(say) {
  2264. let next = say.sequence[say.sequenceRunner + 1];
  2265. if (this.alwaysPrint) {
  2266. this.node.nodeValue = "the ";
  2267. }
  2268. else if (next == undefined) {
  2269. this.node.nodeValue = "";
  2270. }
  2271. else {
  2272. if (next instanceof Thing) {
  2273. if (!next.properlyNamed) {
  2274. this.node.nodeValue = "the ";
  2275. }
  2276. else {
  2277. this.node.nodeValue = "";
  2278. }
  2279. }
  2280. else {
  2281. this.node.nodeValue = "";
  2282. }
  2283. }
  2284. if (this.node.nodeValue != "") {
  2285. if (this.uppercase && say.currentParagraph.length == 0) {
  2286. this.node.nodeValue = this.node.nodeValue.charAt(0).toUpperCase()
  2287. + this.node.nodeValue.substr(1, this.node.nodeValue.length - 1);
  2288. }
  2289. }
  2290. return [this.node];
  2291. }
  2292. }
  2293. var Elements;
  2294. (function (Elements) {
  2295. var AppearanceHandler;
  2296. (function (AppearanceHandler) {
  2297. var target = document.getElementById("appearanceTarget");
  2298. function empty() {
  2299. while (target.firstChild) {
  2300. target.removeChild(target.firstChild);
  2301. }
  2302. }
  2303. async function print(say) {
  2304. await say.getHTML("p", ["appearanceDescription"]).then(value => {
  2305. for (let i = 0; i < value.length; i++) {
  2306. target.appendChild(value[i]);
  2307. }
  2308. });
  2309. }
  2310. AppearanceHandler.print = print;
  2311. async function updateAppearance() {
  2312. empty();
  2313. let player = WorldState.player;
  2314. let playerGender = player.getGenderValue();
  2315. let playerSluttiness = player.getSluttiness();
  2316. let you = new SayLink("You");
  2317. you.setAction(new ActionExamine(WorldState.player, WorldState.player));
  2318. let presentation = new Say(you, " are presenting as ", new SayAn(), player.getShortestDescription(), ".");
  2319. if (playerSluttiness.naked) {
  2320. presentation.add(" You are naked.");
  2321. }
  2322. else if (playerSluttiness.halfNaked) {
  2323. presentation.add(" You are almost naked.");
  2324. }
  2325. let tits = Thing.PartRelation.getRightTypeOne(player, HumanoidBreasts);
  2326. let penis = Thing.PartRelation.getRightTypeOne(player, HumanoidPenis);
  2327. let bulges = player.getBulges();
  2328. if (bulges.breasts > 0 || playerGender.genderValueCorrected > 60) {
  2329. let realTits = tits.getSizeText();
  2330. let fakeTits = HumanoidBreasts.getSizeText(bulges.breasts);
  2331. presentation.add(" You have " + realTits + " breasts");
  2332. if (bulges.breasts != tits.getSize() && realTits != fakeTits) {
  2333. presentation.add(", padded to appear as " + fakeTits + " through your clothing.");
  2334. }
  2335. else {
  2336. if (!tits.isUncovered()) {
  2337. presentation.add(", safely covered.");
  2338. }
  2339. else {
  2340. presentation.add(".");
  2341. }
  2342. }
  2343. }
  2344. if (penis == undefined) {
  2345. presentation.add(" You have ", new SayAn(), HumanoidPenis.getSizeText(bulges.crotch) + " crotch bulge visible through your clothing.");
  2346. }
  2347. else {
  2348. let realDick = penis.getSizeText();
  2349. let fakeDick = HumanoidPenis.getSizeText(bulges.crotch);
  2350. presentation.add(" You have ", new SayAn(), realDick + " dick");
  2351. if (penis.getActualSize() != bulges.crotch && realDick != fakeDick) {
  2352. presentation.add(", which looks like it is " + fakeDick + " due to your clothing.");
  2353. }
  2354. else {
  2355. if (!penis.isUncovered()) {
  2356. presentation.add(", which is covered.");
  2357. }
  2358. else {
  2359. presentation.add(".");
  2360. }
  2361. }
  2362. }
  2363. await print(presentation);
  2364. }
  2365. AppearanceHandler.updateAppearance = updateAppearance;
  2366. })(AppearanceHandler = Elements.AppearanceHandler || (Elements.AppearanceHandler = {}));
  2367. })(Elements || (Elements = {}));
  2368. function updateFontSize() {
  2369. var minWidth = Elements.isMobile ? 800 : 1280;
  2370. var proportion = Elements.isMobile ? 17 : 14.5;
  2371. var width = document.body.clientWidth < minWidth ? minWidth : document.body.clientWidth;
  2372. document.documentElement.style["font-size"] = (width * proportion / 1280) + "px";
  2373. }
  2374. updateFontSize();
  2375. window.addEventListener("resize", updateFontSize);
  2376. function toggleFullScreen() {
  2377. var doc = window.document;
  2378. var docEl = doc.documentElement;
  2379. var requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen || docEl.webkitRequestFullScreen || docEl.msRequestFullscreen;
  2380. var cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen;
  2381. if (!doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {
  2382. requestFullScreen.call(docEl);
  2383. }
  2384. else {
  2385. cancelFullScreen.call(doc);
  2386. }
  2387. }
  2388. var Elements;
  2389. (function (Elements) {
  2390. var HoverInfo;
  2391. (function (HoverInfo) {
  2392. var hoverbox = document.getElementById("hoverInfo");
  2393. var contentTarget = document.getElementById("hoverContent");
  2394. var width = 0;
  2395. var height = 0;
  2396. function empty() {
  2397. while (contentTarget.firstChild != undefined) {
  2398. contentTarget.removeChild(contentTarget.firstChild);
  2399. }
  2400. }
  2401. function makeHoverable(element, contents) {
  2402. element.addEventListener("mouseenter", (e) => {
  2403. Elements.HoverInfo.hoverStart(e, contents);
  2404. });
  2405. element.addEventListener("mousemove", (e) => {
  2406. Elements.HoverInfo.hoverMove(e);
  2407. });
  2408. element.addEventListener("mouseout", (e) => {
  2409. Elements.HoverInfo.hoverEnd();
  2410. });
  2411. }
  2412. HoverInfo.makeHoverable = makeHoverable;
  2413. function hoverStart(e, contents) {
  2414. empty();
  2415. for (let i = 0; i < contents.length; i++) {
  2416. contentTarget.appendChild(contents[i]);
  2417. }
  2418. hoverbox.style.display = "block";
  2419. hoverbox.style.left = "0px";
  2420. hoverbox.style.top = "0px";
  2421. width = hoverbox.offsetWidth;
  2422. height = hoverbox.offsetHeight;
  2423. hoverMove(e);
  2424. }
  2425. HoverInfo.hoverStart = hoverStart;
  2426. function hoverMove(e) {
  2427. let left = e.clientX - (width / 2);
  2428. let top = e.clientY - (height) - 6;
  2429. if (top < 0) {
  2430. top = e.clientY + 6;
  2431. }
  2432. if (left < width) {
  2433. left = width;
  2434. }
  2435. if (left + width > Elements.screenWidth) {
  2436. left = Elements.screenWidth - width;
  2437. }
  2438. hoverbox.style.left = Math.round(left) + "px";
  2439. hoverbox.style.top = Math.round(top) + "px";
  2440. }
  2441. HoverInfo.hoverMove = hoverMove;
  2442. function hoverEnd() {
  2443. hoverbox.style.display = "none";
  2444. }
  2445. HoverInfo.hoverEnd = hoverEnd;
  2446. })(HoverInfo = Elements.HoverInfo || (Elements.HoverInfo = {}));
  2447. })(Elements || (Elements = {}));
  2448. var Elements;
  2449. (function (Elements) {
  2450. var HyperlinkHandler;
  2451. (function (HyperlinkHandler) {
  2452. HyperlinkHandler.linkedActionsTab = document.getElementById("linkActions");
  2453. HyperlinkHandler.commonActionsTab = document.getElementById("commonActionsTab");
  2454. var currentCommand = document.createTextNode("");
  2455. document.getElementById("currentCommand").appendChild(currentCommand);
  2456. var currentActionTarget = document.createTextNode("");
  2457. document.getElementById("linkTarget").appendChild(currentActionTarget);
  2458. var commonActions = [];
  2459. var availableActions = [];
  2460. function resetCommonActions() {
  2461. commonActions.splice(0, commonActions.length);
  2462. while (HyperlinkHandler.commonActionsTab.firstChild) {
  2463. HyperlinkHandler.commonActionsTab.removeChild(HyperlinkHandler.commonActionsTab.firstChild);
  2464. }
  2465. }
  2466. HyperlinkHandler.resetCommonActions = resetCommonActions;
  2467. function addCommonAction(name, action) {
  2468. commonActions.push([name, action]);
  2469. }
  2470. HyperlinkHandler.addCommonAction = addCommonAction;
  2471. function resetAvailableActions() {
  2472. availableActions = [];
  2473. currentActionTarget.nodeValue = "";
  2474. while (HyperlinkHandler.linkedActionsTab.firstChild) {
  2475. HyperlinkHandler.linkedActionsTab.removeChild(HyperlinkHandler.linkedActionsTab.firstChild);
  2476. }
  2477. }
  2478. function addAvailableAction(name, action) {
  2479. availableActions.push([name, action]);
  2480. }
  2481. HyperlinkHandler.addAvailableAction = addAvailableAction;
  2482. function hoverAction(action) {
  2483. currentCommand.nodeValue = action.getCommandText().toLowerCase();
  2484. }
  2485. HyperlinkHandler.hoverAction = hoverAction;
  2486. function unhoverAction() {
  2487. currentCommand.nodeValue = "";
  2488. }
  2489. HyperlinkHandler.unhoverAction = unhoverAction;
  2490. async function hyperlinkObject(thing) {
  2491. resetAvailableActions();
  2492. if (thing instanceof Thing && thing != WorldState.player) {
  2493. await HyperlinkHandler.HyperlinkingRulebook.execute({ noun: thing });
  2494. currentActionTarget.nodeValue = thing.getPrintedName() + ": ";
  2495. for (let i = 0, value = availableActions[i]; value != undefined; value = availableActions[++i]) {
  2496. let link = createLink(value);
  2497. link.classList.add("columnLink");
  2498. Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getSecondKeyCode());
  2499. HyperlinkHandler.linkedActionsTab.appendChild(link);
  2500. }
  2501. }
  2502. }
  2503. HyperlinkHandler.hyperlinkObject = hyperlinkObject;
  2504. function createLink(value) {
  2505. let link = document.createElement("a");
  2506. link.appendChild(document.createTextNode(value[0]));
  2507. Controls.Links.makeLink(link, value[1]);
  2508. return link;
  2509. }
  2510. async function hyperlinkCommonActions() {
  2511. resetCommonActions();
  2512. await HyperlinkHandler.CommonActionsRulebook.execute({});
  2513. for (let i = 0, value = commonActions[i]; value != undefined; value = commonActions[++i]) {
  2514. let link = createLink(value);
  2515. link.classList.add("lineLink");
  2516. Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getThirdKeyCode());
  2517. HyperlinkHandler.commonActionsTab.appendChild(link);
  2518. }
  2519. }
  2520. HyperlinkHandler.hyperlinkCommonActions = hyperlinkCommonActions;
  2521. HyperlinkHandler.HyperlinkingRulebook = new Rulebook("Hyperlinking something");
  2522. HyperlinkHandler.CommonActionsRulebook = new Rulebook("Common Actions Rulebook");
  2523. })(HyperlinkHandler = Elements.HyperlinkHandler || (Elements.HyperlinkHandler = {}));
  2524. })(Elements || (Elements = {}));
  2525. class Action {
  2526. constructor(actor, ...nouns) {
  2527. this.extraChecks = [];
  2528. this.extraCarries = [];
  2529. this.nouns = [];
  2530. this.say = new Say();
  2531. this.actingAgressively = false;
  2532. this.actingSubmissively = false;
  2533. this.requiresTurn = true;
  2534. this.requiresNoun = true;
  2535. this.requiresVisibility = true;
  2536. this.actor = actor;
  2537. nouns.forEach((value, index, array) => {
  2538. this.setNoun(index, value);
  2539. });
  2540. }
  2541. async execute() {
  2542. this.say = new Say();
  2543. let checkRulebooks = [];
  2544. let carryRulebooks = [];
  2545. let cClass = this.constructor;
  2546. while (cClass != Action) {
  2547. if (cClass.check != undefined) {
  2548. checkRulebooks.push(cClass.check);
  2549. }
  2550. if (cClass.carry != undefined) {
  2551. carryRulebooks.push(cClass.carry);
  2552. }
  2553. cClass = Object.getPrototypeOf(cClass);
  2554. }
  2555. let result = await Action.check.execute({
  2556. noun: this
  2557. }, ...checkRulebooks);
  2558. if (result == false) {
  2559. return;
  2560. }
  2561. else if (result instanceof Action) {
  2562. console.debug(Rulebook.getIndentation() + "[ACTION] Instead of...");
  2563. await result.execute();
  2564. this.say.add(result.say);
  2565. this.nouns = result.nouns;
  2566. return;
  2567. }
  2568. await Action.carry.execute({
  2569. noun: this
  2570. }, ...carryRulebooks);
  2571. return this.say;
  2572. }
  2573. get actor() {
  2574. return this._actor;
  2575. }
  2576. set actor(value) {
  2577. this._actor = value;
  2578. }
  2579. getNoun(n) {
  2580. if (this.nouns.length > n) {
  2581. return this.nouns[n];
  2582. }
  2583. return undefined;
  2584. }
  2585. setNoun(n, noun) {
  2586. while (this.nouns.length < n) {
  2587. this.nouns.push(undefined);
  2588. }
  2589. this.nouns[n] = noun;
  2590. }
  2591. getCommandText() {
  2592. return "do";
  2593. }
  2594. stop() {
  2595. this.requiresTurn = false;
  2596. }
  2597. }
  2598. Action.check = new Rulebook("Check any Action");
  2599. Action.carry = new Rulebook("Carry out any Action");
  2600. Action.check.addRule(new Rule({
  2601. name: "Check any Action - Requires Noun",
  2602. firstPriority: Rule.PRIORITY_HIGHEST,
  2603. code: (rulebook) => {
  2604. let action = rulebook.noun;
  2605. if (action.getNoun(0) == undefined) {
  2606. return false;
  2607. }
  2608. },
  2609. conditions: runner => {
  2610. return runner.noun.requiresNoun;
  2611. }
  2612. }));
  2613. Action.check.addRule(new Rule({
  2614. name: "Check any Action - Requires Visibility",
  2615. code: (rulebook) => {
  2616. let action = rulebook.noun;
  2617. let actor = action.actor;
  2618. if (!action.getNoun(0).isVisibleTo(actor)) {
  2619. return false;
  2620. }
  2621. },
  2622. conditions: runner => {
  2623. return runner.noun.requiresVisibility;
  2624. }
  2625. }));
  2626. class ActionExamine extends Action {
  2627. constructor() {
  2628. super(...arguments);
  2629. this.requiresTurn = false;
  2630. }
  2631. getCommandText() {
  2632. if (this.getNoun(0) == WorldState.player) {
  2633. return "examine myself";
  2634. }
  2635. return "examine " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
  2636. }
  2637. }
  2638. ActionExamine.check = new Rulebook("Check Examining");
  2639. ActionExamine.carry = new Rulebook("Carry out Examining");
  2640. ActionExamine.PrintDescriptionOfExaminedThingRule = ActionExamine.carry.createAndAddRule({
  2641. name: "Examine - Print Description of Examined Thing",
  2642. code: (rulebook) => {
  2643. let action = rulebook.noun;
  2644. let noun = action.getNoun(0);
  2645. if (noun instanceof Thing && noun.image != undefined) {
  2646. action.say.add(noun.image, Say.PARAGRAPH_BREAK);
  2647. }
  2648. action.say.add(action.getNoun(0).getPrintedDescription());
  2649. }
  2650. });
  2651. Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
  2652. name: "Look at me!",
  2653. firstPriority: Rule.PRIORITY_LOWEST,
  2654. priority: Rule.PRIORITY_HIGH,
  2655. code: (rulebook) => {
  2656. Elements.HyperlinkHandler.addCommonAction("Inspect", new ActionExamine(WorldState.player, WorldState.player));
  2657. }
  2658. }));
  2659. class RelationHandler {
  2660. constructor(...relations) {
  2661. relations.forEach(relation => {
  2662. relation.setHandler(this);
  2663. });
  2664. this.relations = relations;
  2665. }
  2666. addRelation(relation) {
  2667. this.relations.push(relation);
  2668. relation.setHandler(this);
  2669. }
  2670. }
  2671. class Relation {
  2672. setHandler(handler) {
  2673. this.handler = handler;
  2674. }
  2675. hasHandler() {
  2676. return this.handler != undefined;
  2677. }
  2678. static createString(obj1, obj2) {
  2679. if (obj1 instanceof Object && obj2 instanceof Object) {
  2680. let id1 = Relation.getId(obj1);
  2681. let id2 = Relation.getId(obj2);
  2682. return id1 < id2 ?
  2683. (id1 + ";" + id2) :
  2684. (id2 + ";" + id1);
  2685. }
  2686. }
  2687. static getId(obj) {
  2688. if (obj[Relation.objectIdField] == undefined) {
  2689. obj[Relation.objectIdField] = Relation.objectCount++;
  2690. }
  2691. return obj[Relation.objectIdField];
  2692. }
  2693. }
  2694. Relation.objectCount = 0;
  2695. Relation.objectIdField = "_RELATIONINTERNALID";
  2696. class RelationHandlerStrictOneToMany extends RelationHandler {
  2697. setRelation(relation, left, right, value) {
  2698. let parents = this.getAllLeft(left);
  2699. if (parents.indexOf(right) != -1) {
  2700. console.warn("[Relation] Attempt to create a circular relation:", this, left, right);
  2701. return false;
  2702. }
  2703. this.unsetRight(right);
  2704. return true;
  2705. }
  2706. unset(thing) {
  2707. this.unsetLeft(thing);
  2708. this.unsetRight(thing);
  2709. }
  2710. unsetLeft(left) {
  2711. this.relations.forEach(relation => {
  2712. relation.unsetLeft(left);
  2713. });
  2714. }
  2715. unsetRight(right) {
  2716. this.relations.forEach(relation => {
  2717. relation.unsetRight(right);
  2718. });
  2719. }
  2720. getLeft(right) {
  2721. let result;
  2722. for (let i = 0; i < this.relations.length; i++) {
  2723. result = this.relations[i].getLeft(right);
  2724. if (result != undefined) {
  2725. return result;
  2726. }
  2727. }
  2728. }
  2729. getAllLeft(right) {
  2730. let newParent = this.getLeft(right);
  2731. let parents = [];
  2732. while (newParent != undefined) {
  2733. parents.push(newParent);
  2734. newParent = this.getLeft(newParent);
  2735. }
  2736. return parents;
  2737. }
  2738. getAllLeftType(right, type) {
  2739. return this.getAllLeft(right).filter(left => {
  2740. return left instanceof type;
  2741. });
  2742. }
  2743. getLastLeft(right) {
  2744. let parent = this.getLeft(right);
  2745. let newParent = this.getLeft(parent);
  2746. while (newParent != undefined) {
  2747. parent = newParent;
  2748. newParent = this.getLeft(parent);
  2749. }
  2750. return parent;
  2751. }
  2752. getAllRight(left) {
  2753. let rights = [];
  2754. this.relations.forEach(relation => {
  2755. rights.push(...relation.getRight(left));
  2756. });
  2757. arrayUnique(rights);
  2758. return rights;
  2759. }
  2760. getAllRightTypes(left, rightType) {
  2761. return this.getAllRight(left).filter(right => {
  2762. return right instanceof rightType;
  2763. });
  2764. }
  2765. }
  2766. class RelationOneToMany extends Relation {
  2767. constructor() {
  2768. super(...arguments);
  2769. this.valuesHash = {};
  2770. this.oneMap = new Map();
  2771. this.manyMap = new Map();
  2772. }
  2773. getValue(left, right) {
  2774. return this.valuesHash[Relation.createString(left, right)];
  2775. }
  2776. setValue(left, right, value) {
  2777. if (this.manyMap.get(right) == left) {
  2778. let string = Relation.createString(left, right);
  2779. if (string != undefined) {
  2780. this.valuesHash[string] = value;
  2781. }
  2782. }
  2783. }
  2784. setRelation(left, right, value) {
  2785. let proceed;
  2786. if (this.handler != undefined) {
  2787. proceed = this.handler.setRelation(this, left, right, value);
  2788. }
  2789. if (proceed) {
  2790. this.unsetRight(left);
  2791. this.unsetLeft(right);
  2792. this.unsetRight(right);
  2793. let string = Relation.createString(left, right);
  2794. if (string != undefined) {
  2795. this.valuesHash[string] = value;
  2796. }
  2797. this.manyMap.set(right, left);
  2798. if (this.oneMap.get(left) == undefined) {
  2799. this.oneMap.set(left, [right]);
  2800. }
  2801. else {
  2802. this.oneMap.get(left).push(right);
  2803. }
  2804. }
  2805. }
  2806. getLeft(right) {
  2807. return this.manyMap.get(right);
  2808. }
  2809. getAnyLeft() {
  2810. let left = [];
  2811. this.oneMap.forEach((value, key) => {
  2812. left.push(key);
  2813. });
  2814. arrayUnique(left);
  2815. return left;
  2816. }
  2817. getAnyRight() {
  2818. let rights = [];
  2819. this.oneMap.forEach((value) => {
  2820. rights.push(...value);
  2821. });
  2822. arrayUnique(rights);
  2823. return rights;
  2824. }
  2825. getAnyRightType(type) {
  2826. return this.getAnyRight().filter(value => {
  2827. return value instanceof type;
  2828. });
  2829. }
  2830. isRight(left, needle) {
  2831. let right = this.oneMap.get(left);
  2832. if (right != undefined) {
  2833. return right.indexOf(needle) != -1;
  2834. }
  2835. return false;
  2836. }
  2837. getRight(left) {
  2838. let right = this.oneMap.get(left);
  2839. if (right != undefined) {
  2840. return [].concat(...right);
  2841. }
  2842. return [];
  2843. }
  2844. getRightType(left, type) {
  2845. return this.getRight(left).filter(right => {
  2846. return right instanceof type;
  2847. });
  2848. }
  2849. getRightTypeOne(left, type) {
  2850. let rights = this.getRightType(left, type);
  2851. if (rights.length > 0) {
  2852. return rights[0];
  2853. }
  2854. }
  2855. getRelationValue(left, right) {
  2856. return this.valuesHash[Relation.createString(left, right)];
  2857. }
  2858. unsetRight(right) {
  2859. let left = this.manyMap.get(right);
  2860. if (left != undefined) {
  2861. let allRight = this.oneMap.get(left);
  2862. allRight.splice(allRight.indexOf(right), 1);
  2863. this.manyMap.delete(right);
  2864. if (allRight.length == 0) {
  2865. this.oneMap.delete(left);
  2866. }
  2867. let string = Relation.createString(left, right);
  2868. if (string != undefined) {
  2869. delete (this.valuesHash[string]);
  2870. }
  2871. }
  2872. }
  2873. unsetLeft(left) {
  2874. let allRight = this.oneMap.get(left);
  2875. if (allRight != undefined) {
  2876. allRight.forEach((right) => {
  2877. this.manyMap.delete(right);
  2878. let string = Relation.createString(left, right);
  2879. if (string != undefined) {
  2880. delete (this.valuesHash[string]);
  2881. }
  2882. });
  2883. this.oneMap.delete(left);
  2884. }
  2885. }
  2886. }
  2887. class Thing {
  2888. constructor(options) {
  2889. this.properlyNamed = false;
  2890. this.scenery = false;
  2891. this.fixedInPlace = false;
  2892. this.animated = false;
  2893. this.visible = true;
  2894. this.unique = false;
  2895. this.shiny = false;
  2896. this.setAlterations = [];
  2897. this.getAlterations = [];
  2898. this.clone = function () {
  2899. throw new Error("Non-unique Objects can't be cloned.");
  2900. };
  2901. options = options == undefined ? {} : options;
  2902. if (options.properName != undefined) {
  2903. this.name = options.properName;
  2904. this.properlyNamed = true;
  2905. }
  2906. else if (options.name != undefined) {
  2907. this.name = options.name;
  2908. }
  2909. else {
  2910. this.name = this.constructor.name;
  2911. }
  2912. if (options.description != undefined) {
  2913. if (options.description instanceof Say) {
  2914. this.description = options.description;
  2915. }
  2916. else {
  2917. this.description = new Say(options.description);
  2918. }
  2919. }
  2920. if (options.unique) {
  2921. Thing.storeUnique(this);
  2922. this.unique = true;
  2923. }
  2924. else {
  2925. Thing.storeNonUnique(this);
  2926. this.cloneOptions = options;
  2927. this.clone = (includeChanges) => {
  2928. let cons = eval(this.constructor.name);
  2929. let newThing = new cons(this.cloneOptions);
  2930. if (includeChanges == undefined || includeChanges) {
  2931. newThing.setChanges(this.getChanges());
  2932. }
  2933. return newThing;
  2934. };
  2935. }
  2936. if (options.image != undefined) {
  2937. if (options.image instanceof SayImage) {
  2938. this.image = options.image;
  2939. }
  2940. else {
  2941. this.image = new SayImage(options.image);
  2942. }
  2943. }
  2944. this.shiny = options.shiny == true;
  2945. this.addGetAlterations((thing) => {
  2946. function getClosestRoom(currentRoom, rooms) {
  2947. if (currentRoom instanceof RoomRandom && rooms.length > 0) {
  2948. rooms.sort((a, b) => {
  2949. if (!(a instanceof RoomRandom))
  2950. return -1;
  2951. if (!(b instanceof RoomRandom))
  2952. return 1;
  2953. let da = a.getDistanceTo(currentRoom);
  2954. let db = b.getDistanceTo(currentRoom);
  2955. return da - db;
  2956. });
  2957. return {
  2958. Location: rooms[0].getName()
  2959. };
  2960. }
  2961. }
  2962. if (Thing.EnclosedRelation.getLeft(thing) == thing.getRoom() && thing.getRoom() != undefined) {
  2963. if (thing.getRoom().fodder) {
  2964. if (thing.isPlayer()) {
  2965. let rooms = WorldState.getRememberedRoomsAsRooms();
  2966. let currentRoom = thing.getRoom();
  2967. return getClosestRoom(currentRoom, rooms);
  2968. }
  2969. else {
  2970. let rooms = thing.getRoom().getConnectedRooms();
  2971. let currentRoom = thing.getRoom();
  2972. let foundRoom = getClosestRoom(currentRoom, rooms);
  2973. if (foundRoom != undefined) {
  2974. return foundRoom;
  2975. }
  2976. else {
  2977. rooms = Region.InRelation.getLeft(thing.getRoom()).getRooms();
  2978. return getClosestRoom(currentRoom, rooms);
  2979. }
  2980. }
  2981. }
  2982. else {
  2983. return {
  2984. Location: thing.getRoom().getName()
  2985. };
  2986. }
  2987. }
  2988. });
  2989. this.addSetAlterations((thing, changes) => {
  2990. if (changes.Location != undefined) {
  2991. let room = Room.getRoom(changes.Location);
  2992. if (room != undefined) {
  2993. room.place(thing);
  2994. }
  2995. else {
  2996. console.error("Unable to place ", thing, " at room ", changes.Location);
  2997. }
  2998. }
  2999. });
  3000. }
  3001. addGetAlterations(newGet) {
  3002. this.getAlterations.push(newGet);
  3003. }
  3004. addSetAlterations(newSet) {
  3005. this.setAlterations.push(newSet);
  3006. }
  3007. getChanges() {
  3008. let changes = {};
  3009. for (let i = 0; i < this.getAlterations.length; i++) {
  3010. let change = this.getAlterations[i](this);
  3011. for (let key in change) {
  3012. changes[key] = change[key];
  3013. }
  3014. }
  3015. return changes;
  3016. }
  3017. setChanges(simpleAlterationObject) {
  3018. for (let i = 0; i < this.setAlterations.length; i++) {
  3019. this.setAlterations[i](this, simpleAlterationObject);
  3020. }
  3021. }
  3022. getShiny() {
  3023. return this.shiny;
  3024. }
  3025. setName(name) {
  3026. this.name = name;
  3027. }
  3028. getName() {
  3029. return this.name;
  3030. }
  3031. static storeNonUnique(thing) {
  3032. if (Thing.things[thing.name] == undefined) {
  3033. Thing.things[thing.name] = [thing];
  3034. }
  3035. else {
  3036. Thing.things[thing.name].push(thing);
  3037. }
  3038. }
  3039. static getNonUnique(name) {
  3040. return Thing.things[name] == undefined ? [] : Thing.things[name];
  3041. }
  3042. static getOneThing(name) {
  3043. let thing = Thing.getUnique(name);
  3044. if (thing == undefined) {
  3045. let things = Thing.getNonUnique(name);
  3046. if (things.length > 0) {
  3047. thing = things[0];
  3048. }
  3049. }
  3050. return thing;
  3051. }
  3052. static storeUnique(unique) {
  3053. if (Thing.uniqueThings[unique.name] != undefined) {
  3054. console.warn(unique.name, Thing.uniqueThings[unique.name], new Error("Unique Thing Already Exists"));
  3055. }
  3056. else {
  3057. Thing.uniqueThings[unique.name] = unique;
  3058. }
  3059. }
  3060. static getUnique(name) {
  3061. return Thing.uniqueThings[name];
  3062. }
  3063. static getUniques() {
  3064. let things = [];
  3065. for (let name in Thing.uniqueThings) {
  3066. things.push(Thing.uniqueThings[name]);
  3067. }
  3068. return things;
  3069. }
  3070. getPrintedName() {
  3071. return this.name;
  3072. }
  3073. getPrintedDescription() {
  3074. if (this.description == undefined) {
  3075. return new Say("You see nothing special about ", new SayThe(), this, ".");
  3076. }
  3077. else {
  3078. return this.description;
  3079. }
  3080. }
  3081. getPartOne() {
  3082. return Thing.PartRelation.getLeft(this);
  3083. }
  3084. getCarryOne() {
  3085. return Thing.CarryRelation.getLeft(this);
  3086. }
  3087. getWieldOne() {
  3088. return Thing.WieldRelation.getLeft(this);
  3089. }
  3090. getWearOne() {
  3091. return Thing.WearRelation.getLeft(this);
  3092. }
  3093. getEnclosedOne() {
  3094. return Thing.EnclosedRelation.getLeft(this);
  3095. }
  3096. removeParts(partType) {
  3097. let parts = this.getParts(partType);
  3098. for (let i = 0; i < parts.length; i++) {
  3099. Thing.PartRelation.unsetRight(parts[i]);
  3100. }
  3101. }
  3102. getParts(partType) {
  3103. if (partType != undefined) {
  3104. return Thing.PartRelation.getRightType(this, partType);
  3105. }
  3106. return Thing.PartRelation.getRight(this);
  3107. }
  3108. getPartsByName(name) {
  3109. let parts = this.getParts();
  3110. return parts.filter((part) => {
  3111. return (part.getName() == name);
  3112. });
  3113. }
  3114. getPart(partType) {
  3115. if (partType != undefined) {
  3116. return Thing.PartRelation.getRightTypeOne(this, partType);
  3117. }
  3118. return Thing.PartRelation.getRight(this);
  3119. }
  3120. getHighestEnclosedOne() {
  3121. return Thing.EnclosedRelation.getLastLeft(this);
  3122. }
  3123. getHighestEnclosedOneNotRoom() {
  3124. let parent = Thing.EnclosedRelation.getLeft(this);
  3125. if (parent != undefined) {
  3126. let newParent = Thing.EnclosedRelation.getLeft(parent);
  3127. while (newParent != undefined) {
  3128. parent = newParent;
  3129. newParent = Thing.EnclosedRelation.getLeft(parent);
  3130. }
  3131. return parent;
  3132. }
  3133. return this;
  3134. }
  3135. getRoom() {
  3136. var partOf = Thing.EnclosedRelation.getLeft(this);
  3137. if (partOf instanceof Room) {
  3138. return partOf;
  3139. }
  3140. else if (partOf instanceof Thing) {
  3141. return partOf.getRoom();
  3142. }
  3143. }
  3144. removeFromRoom() {
  3145. this.getRoom().remove(this);
  3146. }
  3147. isVisibleTo(thing) {
  3148. return (this.getRoom() == thing.getRoom() && this.visible);
  3149. }
  3150. isPlayer() {
  3151. return false;
  3152. }
  3153. addParts(...parts) {
  3154. parts.forEach(part => {
  3155. Thing.PartRelation.setRelation(this, part);
  3156. });
  3157. }
  3158. isUnique() {
  3159. return this.unique;
  3160. }
  3161. setCarried(thing) {
  3162. Thing.CarryRelation.setRelation(this, thing);
  3163. }
  3164. setWorn(thing) {
  3165. Thing.WearRelation.setRelation(this, thing);
  3166. }
  3167. setWielded(thing) {
  3168. Thing.WieldRelation.setRelation(this, thing);
  3169. }
  3170. unsetCarried(thing) {
  3171. if (Thing.EnclosedRelation.getAllRight(this).indexOf(thing) != -1) {
  3172. Thing.EnclosedRelation.unsetRight(thing);
  3173. this.getRoom().place(thing);
  3174. }
  3175. }
  3176. destroy() {
  3177. let relatedRight = Thing.EnclosedRelation.getAllRight(this);
  3178. relatedRight.push(this);
  3179. relatedRight.forEach(related => {
  3180. Thing.EnclosedRelation.unset(related);
  3181. });
  3182. }
  3183. }
  3184. Thing.uniqueThings = {};
  3185. Thing.things = {};
  3186. Thing.InsideRoomRelation = new RelationOneToMany();
  3187. Thing.PartRelation = new RelationOneToMany();
  3188. Thing.CarryRelation = new RelationOneToMany();
  3189. Thing.WieldRelation = new RelationOneToMany();
  3190. Thing.WearRelation = new RelationOneToMany();
  3191. Thing.EnclosedRelation = new RelationHandlerStrictOneToMany(Thing.InsideRoomRelation, Thing.PartRelation, Thing.CarryRelation, Thing.WieldRelation, Thing.WearRelation);
  3192. class ActionTake extends Action {
  3193. getCommandText() {
  3194. return "take " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
  3195. }
  3196. }
  3197. ActionTake.check = new Rulebook("Check Taking");
  3198. ActionTake.carry = new Rulebook("Carry out Taking");
  3199. ActionTake.defaultCarryTakingRule = new Rule({
  3200. name: "Taking - Add the thing to your inventory",
  3201. code: (rulebook) => {
  3202. let action = rulebook.noun;
  3203. let actor = action.actor;
  3204. let thing = action.getNoun(0);
  3205. if (thing.getEnclosedOne() != undefined) {
  3206. Thing.EnclosedRelation.unsetRight(thing);
  3207. }
  3208. else {
  3209. thing.removeFromRoom();
  3210. }
  3211. Thing.CarryRelation.setRelation(actor, action.getNoun(0));
  3212. if (actor == WorldState.player) {
  3213. action.say.add(new SayBold(action.getNoun(0).getPrintedName() + ": "), "Taken.");
  3214. }
  3215. else {
  3216. action.say.add(new SayThe(), actor, " takes ", new SayThe(undefined, true), action.getNoun(0), ".");
  3217. }
  3218. }
  3219. });
  3220. ActionTake.check.addRule(new Rule({
  3221. name: "Check Taking - Who has it, really?",
  3222. priority: Rule.PRIORITY_HIGHEST,
  3223. code: (rulebook) => {
  3224. let action = rulebook.noun;
  3225. let actor = action.actor;
  3226. let thing = action.getNoun(0);
  3227. let owner = thing.getEnclosedOne();
  3228. if (owner == actor) {
  3229. if (owner == WorldState.player) {
  3230. action.say.add("You already have it.");
  3231. }
  3232. return false;
  3233. }
  3234. }
  3235. }));
  3236. ActionTake.check.addRule(new Rule({
  3237. name: "Check Taking - Donut steal",
  3238. code: (rulebook) => {
  3239. let action = rulebook.noun;
  3240. let actor = action.actor;
  3241. let thing = action.getNoun(0);
  3242. let owner = thing.getEnclosedOne();
  3243. if (owner != undefined && owner.animated) {
  3244. if (actor == WorldState.player) {
  3245. action.say.add(owner.getPrintedName() + " wouldn't like that.");
  3246. }
  3247. return false;
  3248. }
  3249. }
  3250. }));
  3251. ActionTake.check.addRule(new Rule({
  3252. name: "Check Taking - Can't take fixed in place",
  3253. code: (rulebook) => {
  3254. let action = rulebook.noun;
  3255. let actor = action.actor;
  3256. let thing = action.getNoun(0);
  3257. if (thing.fixedInPlace) {
  3258. if (actor == WorldState.player) {
  3259. action.say.add("You can't take that.");
  3260. }
  3261. return false;
  3262. }
  3263. }
  3264. }));
  3265. ActionTake.carry.addRule(ActionTake.defaultCarryTakingRule);
  3266. Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
  3267. name: "Hyperlink - Take",
  3268. firstPriority: Rule.PRIORITY_HIGHEST,
  3269. code: (rulebook) => {
  3270. let thing = rulebook.noun;
  3271. if (!thing.animated && !thing.fixedInPlace && thing.getRoom() == WorldState.player.getRoom() && thing.getEnclosedOne() instanceof Room) {
  3272. Elements.HyperlinkHandler.addAvailableAction("Take", new ActionTake(WorldState.player, thing));
  3273. }
  3274. }
  3275. }));
  3276. class ActionGo extends Action {
  3277. constructor(actor, ...nouns) {
  3278. super(actor, ...nouns);
  3279. this.originalTarget = nouns[0];
  3280. this.requiresNoun = false;
  3281. this.requiresVisibility = false;
  3282. }
  3283. getCommandText() {
  3284. let name;
  3285. if (typeof this.originalTarget == "number") {
  3286. name = DirectionNames[Direction[this.originalTarget]];
  3287. }
  3288. else if (this.originalTarget instanceof Room) {
  3289. name = "to " + this.originalTarget.getPrintedName();
  3290. }
  3291. return "go " + name;
  3292. }
  3293. }
  3294. ActionGo.check = new Rulebook("Check Going");
  3295. ActionGo.carry = new Rulebook("Carry out Going");
  3296. ActionGo.ruleCheckRestoreOriginalNoun = ActionGo.check.createAndAddRule({
  3297. firstPriority: Rule.PRIORITY_HIGHEST,
  3298. priority: Rule.PRIORITY_HIGHEST,
  3299. name: "Check Going - Restore original noun",
  3300. code: (rulebook) => {
  3301. let action = rulebook.noun;
  3302. action.setNoun(0, action.originalTarget);
  3303. }
  3304. });
  3305. ActionGo.ruleCheckIsthereactor = ActionGo.check.createAndAddRule({
  3306. firstPriority: Rule.PRIORITY_HIGHEST,
  3307. priority: Rule.PRIORITY_HIGHEST,
  3308. name: "Check Going - Is there an actor?",
  3309. code: (rulebook) => {
  3310. let action = rulebook.noun;
  3311. if (action.actor == undefined) {
  3312. return false;
  3313. }
  3314. }
  3315. });
  3316. ActionGo.ruleCheckConvertRoomToDirection = ActionGo.check.createAndAddRule({
  3317. firstPriority: Rule.PRIORITY_HIGHEST,
  3318. priority: Rule.PRIORITY_HIGH,
  3319. name: "Change Room to Direction",
  3320. code: (rulebook) => {
  3321. let action = rulebook.noun;
  3322. if (action.getNoun(0) instanceof RoomRandom) {
  3323. let actor = action.actor;
  3324. let cRoom = actor.getRoom();
  3325. if (cRoom instanceof RoomRandom) {
  3326. let dRoom = action.getNoun(0);
  3327. if (cRoom == dRoom) {
  3328. if (actor.isPlayer()) {
  3329. action.say.add("You are already there!");
  3330. }
  3331. return false;
  3332. }
  3333. let code;
  3334. if (actor == WorldState.player) {
  3335. code = (room) => {
  3336. return WorldState.isRoomRemembered(room);
  3337. };
  3338. }
  3339. let direction = cRoom.getAStarBestDirectionTo(dRoom, code);
  3340. if (direction == undefined) {
  3341. if (actor.isPlayer()) {
  3342. action.say.add("You don't remember how to get there.");
  3343. }
  3344. return false;
  3345. }
  3346. else {
  3347. action.setNoun(0, direction);
  3348. }
  3349. }
  3350. }
  3351. }
  3352. });
  3353. ActionGo.ruleCheckIstheredirectionandroom = ActionGo.check.createAndAddRule({
  3354. name: "Check Going - is there a direction? Does it lead anywhere?",
  3355. code: (rulebook) => {
  3356. let action = rulebook.noun;
  3357. let cRoom = action.actor.getRoom();
  3358. if (cRoom == undefined) {
  3359. return false;
  3360. }
  3361. let direction = action.getNoun(0);
  3362. if (direction == undefined) {
  3363. return false;
  3364. }
  3365. let nextRoom = cRoom.connections[direction];
  3366. if (nextRoom == undefined) {
  3367. return false;
  3368. }
  3369. action.roomGoneFrom = action.actor.getRoom();
  3370. action.roomGoneTo = nextRoom;
  3371. }
  3372. });
  3373. ActionGo.ruleCarryMove = ActionGo.carry.createAndAddRule({
  3374. name: "Going - Move Actor to Next Room",
  3375. code: (rulebook) => {
  3376. let action = rulebook.noun;
  3377. let roomGoneFrom = action.actor.getRoom();
  3378. let direction = action.getNoun(0);
  3379. let roomGoneInto = roomGoneFrom.connections[direction];
  3380. roomGoneInto.place(action.actor);
  3381. let actor = action.actor;
  3382. if (actor == WorldState.player) {
  3383. action.say.add("You go " + DirectionNames[Direction[direction]].toLowerCase() + ".");
  3384. }
  3385. else {
  3386. if (roomGoneFrom == WorldState.player.getRoom()) {
  3387. action.say.add(new SayThe(), actor, " goes " + DirectionNames[Direction[direction]].toLowerCase() + ".");
  3388. }
  3389. else {
  3390. let oppositeName = DirectionNames[OppositeDirection[direction]];
  3391. action.say.add(new SayThe(), actor, " arrives from the " + oppositeName.toLowerCase() + ".");
  3392. }
  3393. }
  3394. }
  3395. });
  3396. ActionGo.ruleCarryRememberRooms = ActionGo.carry.createAndAddRule({
  3397. name: "Going - Remember the involved rooms",
  3398. code: (rulebook) => {
  3399. let action = rulebook.noun;
  3400. let actor = action.actor;
  3401. let roomGoneInto = action.actor.getRoom();
  3402. let direction = action.getNoun(0);
  3403. let roomGoneFrom = roomGoneInto.connections[OppositeDirection[Direction[direction]]];
  3404. if (actor.isPlayer()) {
  3405. WorldState.rememberRoom(roomGoneFrom, roomGoneInto);
  3406. }
  3407. }
  3408. });
  3409. var Elements;
  3410. (function (Elements) {
  3411. var RoomHandler;
  3412. (function (RoomHandler) {
  3413. RoomHandler.currentRoomTab = document.getElementById("currentRoomTab");
  3414. RoomHandler.currentRoomDescription = document.getElementById("roomDescription");
  3415. RoomHandler.currentRoomExits = document.getElementById("roomExits");
  3416. RoomHandler.currentRoomName = document.createTextNode("");
  3417. document.getElementById("roomName").appendChild(RoomHandler.currentRoomName);
  3418. function linkObjects() {
  3419. let objs = RoomHandler.currentRoomTab.getElementsByClassName("roomObject");
  3420. for (let i = 0; i < objs.length; i++) {
  3421. let linkKeyCode = Controls.KeyHandler.getFirstKeyCode();
  3422. Controls.KeyHandler.applyCode(objs[i], linkKeyCode);
  3423. }
  3424. }
  3425. RoomHandler.linkObjects = linkObjects;
  3426. function emptyRoom() {
  3427. while (RoomHandler.currentRoomDescription.firstChild) {
  3428. RoomHandler.currentRoomDescription.removeChild(RoomHandler.currentRoomDescription.firstChild);
  3429. }
  3430. while (RoomHandler.currentRoomExits.firstChild) {
  3431. RoomHandler.currentRoomExits.removeChild(RoomHandler.currentRoomExits.firstChild);
  3432. }
  3433. RoomHandler.currentRoomName.nodeValue = "";
  3434. }
  3435. RoomHandler.emptyRoom = emptyRoom;
  3436. async function updateRoom() {
  3437. emptyRoom();
  3438. let room = WorldState.player.getRoom();
  3439. if (room != undefined) {
  3440. RoomHandler.currentRoomName.nodeValue = room.getPrintedName();
  3441. let description = room.description.getHTML("p", ["roomDescription"]);
  3442. await description.then(value => {
  3443. for (let i = 0, p = value[i]; p != undefined; p = value[++i]) {
  3444. RoomHandler.currentRoomDescription.appendChild(p);
  3445. }
  3446. });
  3447. let things = room.getContainedAndVisible();
  3448. if (things.length > 0) {
  3449. let thingList = document.createElement("p");
  3450. thingList.classList.add("roomDescription");
  3451. await RoomHandler.PrintingVisibleThingsRulebook.execute({
  3452. noun: {
  3453. things: things,
  3454. container: thingList
  3455. }
  3456. });
  3457. RoomHandler.currentRoomDescription.appendChild(thingList);
  3458. }
  3459. for (let index = 0, value = room.connections[index]; index < room.connections.length; value = room.connections[++index]) {
  3460. if (value != undefined) {
  3461. let p = document.createElement("p");
  3462. p.classList.add("roomExit");
  3463. let link = document.createElement("a");
  3464. link.classList.add("roomDirection");
  3465. link.appendChild(document.createTextNode(DirectionNames[Direction[index]]));
  3466. Controls.Links.makeLink(link, new ActionGo(WorldState.player, index));
  3467. Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getDirectionCodeByIndex(index));
  3468. p.appendChild(link);
  3469. let directionResult = ": ";
  3470. if (WorldState.isRoomRemembered(value)) {
  3471. directionResult += value.getPrintedName();
  3472. }
  3473. else {
  3474. directionResult += "A new place";
  3475. }
  3476. p.appendChild(document.createTextNode(directionResult));
  3477. RoomHandler.currentRoomExits.appendChild(p);
  3478. }
  3479. }
  3480. }
  3481. }
  3482. RoomHandler.updateRoom = updateRoom;
  3483. RoomHandler.PrintingVisibleThingsRulebook = new Rulebook("Printing the name of visible things in a room");
  3484. RoomHandler.PrintIntroToVisibleThingsRule = new Rule({
  3485. name: "Print \"You can see\" text",
  3486. firstPriority: Rule.PRIORITY_HIGH,
  3487. code: (rulebook) => {
  3488. let noun = rulebook.noun;
  3489. noun.container.appendChild(document.createTextNode("You can see "));
  3490. }
  3491. });
  3492. RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintIntroToVisibleThingsRule);
  3493. RoomHandler.PrintVisibleThingsRule = new Rule({
  3494. name: "Print all visible things",
  3495. code: async (rulebook) => {
  3496. let noun = rulebook.noun;
  3497. for (let i = 0; i < noun.things.length; i++) {
  3498. let value = noun.things[i];
  3499. let link = document.createElement("a");
  3500. link.classList.add("roomObject");
  3501. let say;
  3502. if (value instanceof Thing && value.unique) {
  3503. say = new Say(new SayThe(false), value);
  3504. }
  3505. else {
  3506. say = new Say(new SayAn(false), value);
  3507. }
  3508. await say.getPureElements().then(value2 => {
  3509. for (let i = 0, element = value2[i]; element != undefined; element = value2[++i]) {
  3510. link.appendChild(element);
  3511. }
  3512. });
  3513. Controls.Links.makeLink(link, new ActionExamine(WorldState.player, value));
  3514. Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getFirstKeyCode());
  3515. noun.container.appendChild(link);
  3516. if ((i + 1) < noun.things.length) {
  3517. noun.container.appendChild(document.createTextNode(", "));
  3518. }
  3519. }
  3520. }
  3521. });
  3522. RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintVisibleThingsRule);
  3523. RoomHandler.PrintOutroToVisibleThingsRule = new Rule({
  3524. name: "Print \"... here\" text",
  3525. firstPriority: Rule.PRIORITY_LOW,
  3526. code: (rulebook) => {
  3527. let noun = rulebook.noun;
  3528. noun.container.appendChild(document.createTextNode(" here."));
  3529. }
  3530. });
  3531. RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintOutroToVisibleThingsRule);
  3532. })(RoomHandler = Elements.RoomHandler || (Elements.RoomHandler = {}));
  3533. })(Elements || (Elements = {}));
  3534. class CoinPouch extends Thing {
  3535. constructor(options) {
  3536. super(options);
  3537. this.coins = 0;
  3538. this.addGetAlterations((purse) => {
  3539. return {
  3540. coins: purse.getCoins()
  3541. };
  3542. });
  3543. this.addSetAlterations((purse, changeObj) => {
  3544. purse.coins = (changeObj.coins);
  3545. });
  3546. }
  3547. addCoins(coins) {
  3548. this.coins += coins;
  3549. }
  3550. removeCoins(coins) {
  3551. this.coins -= coins;
  3552. }
  3553. getCoins() {
  3554. return this.coins;
  3555. }
  3556. getShiny() {
  3557. return this.coins > 0;
  3558. }
  3559. }
  3560. CoinPouch.carryOutTakingCoinPouches = new Rule({
  3561. name: "Carry out taking coin pouches",
  3562. firstPriority: ActionTake.defaultCarryTakingRule.firstPriority,
  3563. priority: ActionTake.defaultCarryTakingRule.priority + 1,
  3564. code: async (rulebook) => {
  3565. let action = rulebook.noun;
  3566. let actor = action.actor;
  3567. let thing = action.getNoun(0);
  3568. let actorPouches = Thing.CarryRelation.getRightType(actor, CoinPouch);
  3569. if (actorPouches.length > 0) {
  3570. let thingCoins = thing.getCoins();
  3571. if (thingCoins > 0) {
  3572. rulebook.skipRule(ActionTake.defaultCarryTakingRule);
  3573. actorPouches[0].addCoins(thingCoins);
  3574. thing.removeCoins(thing.getCoins());
  3575. if (actor == WorldState.player) {
  3576. action.say.add("You empty ", new SayThe(), thing, " into your ", actorPouches[0], ". Your ", actorPouches[0], " now has " + actorPouches[0].getCoins().toString() + " coins.");
  3577. }
  3578. else {
  3579. action.say.add(new SayThe(), actor, " empties ", new SayThe(), thing, " into ", Say.hisHersIts(actor), actorPouches[0], ".");
  3580. }
  3581. }
  3582. else {
  3583. let myCoins = actorPouches[0].getCoins();
  3584. actorPouches[0].removeCoins(myCoins);
  3585. thing.addCoins(myCoins);
  3586. if (actor == WorldState.player) {
  3587. action.say.add("You empty your ", actorPouches[0], " into ", new SayThe(), thing, ".", Say.PARAGRAPH_BREAK);
  3588. }
  3589. let drop = new ActionDrop(actor, actorPouches[0]);
  3590. await drop.execute();
  3591. if (Thing.EnclosedRelation.getLeft(actorPouches[0]) == actor) {
  3592. if (actor == WorldState.player) {
  3593. action.say.add("You can't get rid of your ", actorPouches[0], "!");
  3594. }
  3595. return false;
  3596. }
  3597. }
  3598. }
  3599. },
  3600. conditions: (rulebook) => {
  3601. return (rulebook.noun.getNoun(0) instanceof CoinPouch);
  3602. }
  3603. });
  3604. ActionTake.carry.addRule(CoinPouch.carryOutTakingCoinPouches);
  3605. Say.afterPrinting.addRule(new Rule({
  3606. name: "Include contents of Coin Pouch while Printing Visible Things in a Room",
  3607. code: (rulebook) => {
  3608. let say = rulebook.noun;
  3609. let pouch = say.currentNoun;
  3610. say.currentNounElements.push(document.createTextNode(" with " + pouch.getCoins().toString() + " coins"));
  3611. },
  3612. conditions: (rulebook) => {
  3613. return Elements.RoomHandler.PrintingVisibleThingsRulebook.isRunning()
  3614. && rulebook.noun.currentNoun instanceof CoinPouch
  3615. && rulebook.noun.currentNoun.getCoins() > 0;
  3616. }
  3617. }));
  3618. ActionExamine.carry.addRule(new Rule({
  3619. name: "Print description of coins in Coin Pouch",
  3620. firstPriority: ActionExamine.PrintDescriptionOfExaminedThingRule.firstPriority,
  3621. priority: ActionExamine.PrintDescriptionOfExaminedThingRule.priority - 1,
  3622. code: (rulebook) => {
  3623. let action = rulebook.noun;
  3624. let thing = action.getNoun(0);
  3625. if (thing.getCoins() > 0) {
  3626. action.say.add(" There are " + thing.getCoins().toString() + " coins in it.");
  3627. }
  3628. else {
  3629. action.say.add(" There are no coins in it.");
  3630. }
  3631. },
  3632. conditions: (rulebook) => {
  3633. return (rulebook.noun.getNoun(0) instanceof CoinPouch);
  3634. }
  3635. }));
  3636. var Elements;
  3637. (function (Elements) {
  3638. var InventoryHandler;
  3639. (function (InventoryHandler) {
  3640. var container = document.getElementById("inventoryTarget");
  3641. function empty() {
  3642. while (container.firstChild) {
  3643. container.removeChild(container.firstChild);
  3644. }
  3645. }
  3646. function printHeader(header) {
  3647. let p = document.createElement("p");
  3648. p.classList.add("inventoryHeader");
  3649. p.appendChild(document.createTextNode(header + ":"));
  3650. container.appendChild(p);
  3651. }
  3652. let currentRow;
  3653. InventoryHandler.LinkingThing = new Rulebook("Inventory - Links for a Thing");
  3654. function printThingLink(shortcut, action) {
  3655. let nameLink = document.createElement("div");
  3656. nameLink.classList.add("inventoryLink");
  3657. nameLink.appendChild(document.createTextNode(shortcut));
  3658. currentRow.appendChild(nameLink);
  3659. Controls.Links.makeLink(nameLink, action);
  3660. }
  3661. InventoryHandler.printThingLink = printThingLink;
  3662. async function printThing(thing) {
  3663. currentRow = document.createElement("div");
  3664. currentRow.classList.add("inventoryRow");
  3665. let nameLink = document.createElement("div");
  3666. nameLink.classList.add("inventoryLink", "name");
  3667. nameLink.appendChild(document.createTextNode(thing.getPrintedName()));
  3668. currentRow.appendChild(nameLink);
  3669. Controls.Links.makeLink(nameLink, new ActionExamine(WorldState.player, thing));
  3670. await InventoryHandler.LinkingThing.execute({ noun: thing });
  3671. container.appendChild(currentRow);
  3672. }
  3673. function thingSort(a, b) {
  3674. let na = a.getPrintedName().toLowerCase();
  3675. let nb = b.getPrintedName().toLowerCase();
  3676. if (na < nb)
  3677. return -1;
  3678. if (na > nb)
  3679. return 1;
  3680. return 0;
  3681. }
  3682. InventoryHandler.thingSort = thingSort;
  3683. async function updateInventory() {
  3684. let player = WorldState.player;
  3685. empty();
  3686. let wielded = Thing.WieldRelation.getRight(player).sort(thingSort);
  3687. let worn = Thing.WearRelation.getRight(player).sort(thingSort);
  3688. let carried = Thing.CarryRelation.getRight(player).sort(thingSort);
  3689. if (wielded.length > 0) {
  3690. printHeader("Wielded");
  3691. for (let i = 0; i < wielded.length; i++) {
  3692. await printThing(wielded[i]);
  3693. }
  3694. }
  3695. if (worn.length > 0) {
  3696. printHeader("Worn");
  3697. for (let i = 0; i < worn.length; i++) {
  3698. await printThing(worn[i]);
  3699. }
  3700. }
  3701. if (carried.length > 0) {
  3702. printHeader("Carried");
  3703. for (let i = 0; i < carried.length; i++) {
  3704. await printThing(carried[i]);
  3705. }
  3706. }
  3707. let pouch = Thing.CarryRelation.getRightType(WorldState.player, CoinPouch);
  3708. if (pouch.length > 0) {
  3709. let p = document.createElement("p");
  3710. p.classList.add("inventoryGold");
  3711. let s;
  3712. if (pouch[0].getCoins() > 0) {
  3713. s = new Say("There are " + pouch[0].getCoins().toString() + " coins in your ", pouch[0], ".");
  3714. }
  3715. else {
  3716. s = new Say("There are no coins in your ", pouch[0], ".");
  3717. }
  3718. await s.getPureElements().then(elements => {
  3719. elements.forEach(element => {
  3720. p.appendChild(element);
  3721. });
  3722. });
  3723. container.appendChild(p);
  3724. }
  3725. }
  3726. InventoryHandler.updateInventory = updateInventory;
  3727. })(InventoryHandler = Elements.InventoryHandler || (Elements.InventoryHandler = {}));
  3728. })(Elements || (Elements = {}));
  3729. class ActionRetrace extends Action {
  3730. constructor(actor, ...nouns) {
  3731. super(actor, ...nouns);
  3732. this.requiresNoun = false;
  3733. this.requiresVisibility = false;
  3734. this.requiresTurn = false;
  3735. }
  3736. getCommandText() {
  3737. let name;
  3738. if (typeof this.getNoun(0) == "number") {
  3739. name = DirectionNames[Direction[this.getNoun(0)]];
  3740. }
  3741. else if (this.getNoun(0) instanceof Room) {
  3742. name = this.getNoun(0).getPrintedName();
  3743. }
  3744. return "think about how to get to " + name;
  3745. }
  3746. }
  3747. ActionRetrace.check = new Rulebook("Check Retracing");
  3748. ActionRetrace.carry = new Rulebook("Carry out Retracing");
  3749. ActionRetrace.check.addRule(new Rule({
  3750. firstPriority: Rule.PRIORITY_HIGHEST,
  3751. priority: Rule.PRIORITY_HIGH,
  3752. name: "Change Room to Direction",
  3753. code: (rulebook) => {
  3754. let action = rulebook.noun;
  3755. if (action.getNoun(0) instanceof Room) {
  3756. let actor = action.actor;
  3757. let cRoom = actor.getRoom();
  3758. if (cRoom == undefined) {
  3759. return false;
  3760. }
  3761. let dRoom = action.getNoun(0);
  3762. if (cRoom == dRoom) {
  3763. if (actor.isPlayer()) {
  3764. action.say.add("You are already there!");
  3765. }
  3766. return false;
  3767. }
  3768. let code;
  3769. if (actor == WorldState.player) {
  3770. code = (room) => {
  3771. return WorldState.isRoomRemembered(room);
  3772. };
  3773. }
  3774. let direction = cRoom.bestDirectionTo(dRoom, code);
  3775. if (direction == undefined) {
  3776. if (actor.isPlayer()) {
  3777. action.say.add("You don't remember how to get there.");
  3778. }
  3779. return false;
  3780. }
  3781. else {
  3782. action.setNoun(0, direction);
  3783. }
  3784. }
  3785. }
  3786. }));
  3787. ActionRetrace.carry.addRule(new Rule({
  3788. name: "Retracing - Find Direction",
  3789. code: (rulebook) => {
  3790. let action = rulebook.noun;
  3791. action.say.add("To get there, you should go " + DirectionNames[Direction[action.getNoun(0)]] + ".");
  3792. }
  3793. }));
  3794. var Elements;
  3795. (function (Elements) {
  3796. var RememberedHandler;
  3797. (function (RememberedHandler) {
  3798. var mapTarget = document.getElementById("mapTarget");
  3799. var lastMap;
  3800. var elements;
  3801. function empty() {
  3802. elements = {};
  3803. lastMap = undefined;
  3804. while (mapTarget.firstChild) {
  3805. mapTarget.removeChild(mapTarget.firstChild);
  3806. }
  3807. }
  3808. RememberedHandler.empty = empty;
  3809. async function updateMap() {
  3810. console.debug(Rulebook.getIndentation() + "[MAP] Creating Map");
  3811. let regions = Region.InRelation.getAllLeftType(WorldState.player.getRoom(), RegionRandom);
  3812. let biggestRegion = regions[regions.length - 1];
  3813. if (biggestRegion == undefined) {
  3814. empty();
  3815. return;
  3816. }
  3817. if (biggestRegion.map != lastMap) {
  3818. empty();
  3819. }
  3820. else {
  3821. await updateOldMap();
  3822. return;
  3823. }
  3824. let map = biggestRegion.map;
  3825. lastMap = map;
  3826. map.updateAllLimits();
  3827. for (let y = map.highestY; y >= map.lowestY; y--) {
  3828. let row = document.createElement("div");
  3829. row.classList.add("mapRow");
  3830. for (let x = map.lowestX; x <= map.highestX; x++) {
  3831. let room = map.getRoom(x, y);
  3832. let roomNode = new RoomNode(room);
  3833. await roomNode.createRoomNameFloater();
  3834. let roomDiv = roomNode.getElement();
  3835. row.appendChild(roomDiv);
  3836. elements[x.toString() + ";" + y.toString()] = roomNode;
  3837. }
  3838. mapTarget.appendChild(row);
  3839. }
  3840. await updateOldMap();
  3841. }
  3842. RememberedHandler.updateMap = updateMap;
  3843. async function updateOldMap() {
  3844. let map = lastMap;
  3845. for (let y = map.highestY; y >= map.lowestY; y--) {
  3846. for (let x = map.lowestX; x <= map.highestX; x++) {
  3847. await elements[x.toString() + ";" + y.toString()].update();
  3848. }
  3849. }
  3850. }
  3851. RememberedHandler.updateOldMap = updateOldMap;
  3852. })(RememberedHandler = Elements.RememberedHandler || (Elements.RememberedHandler = {}));
  3853. })(Elements || (Elements = {}));
  3854. var Debug;
  3855. (function (Debug) {
  3856. function knowdewae() {
  3857. let map = new MapNote({
  3858. name: "De Wae",
  3859. description: "This map shows de wae all de wae to Zimbabwe."
  3860. });
  3861. map.addRoom(...Region.RegionRoom.getAnyRightType(RoomRandom));
  3862. WorldState.player.setCarried(map);
  3863. }
  3864. Debug.knowdewae = knowdewae;
  3865. function hurt(target, amount) {
  3866. let bp;
  3867. if (target instanceof Person) {
  3868. bp = target.getPart(HumanoidTorso);
  3869. if (bp == undefined)
  3870. return;
  3871. }
  3872. else if (target instanceof Bodypart) {
  3873. bp = target;
  3874. }
  3875. bp.changeSoreness(amount);
  3876. }
  3877. Debug.hurt = hurt;
  3878. function goTo(str) {
  3879. }
  3880. Debug.goTo = goTo;
  3881. })(Debug || (Debug = {}));
  3882. class AI {
  3883. constructor(options) {
  3884. this.wanderer = true;
  3885. this.wanderChance = 50;
  3886. this.picksShinies = true;
  3887. this.extraRules = [];
  3888. this.extraCombatRules = [];
  3889. for (let key in options) {
  3890. this[key] = options[key];
  3891. }
  3892. }
  3893. async execute(actor) {
  3894. let promise;
  3895. if (promise != undefined) {
  3896. promise = AI.combatRules.execute({
  3897. noun: actor
  3898. }, ...this.extraCombatRules);
  3899. }
  3900. else {
  3901. promise = AI.rules.execute({
  3902. noun: actor
  3903. }, ...this.extraRules);
  3904. }
  3905. let result = await promise;
  3906. return result;
  3907. }
  3908. addRulesBook(...books) {
  3909. this.extraRules.push(...books);
  3910. arrayUnique(this.extraRules);
  3911. }
  3912. addCombatRulesBook(...books) {
  3913. this.extraCombatRules.push(...books);
  3914. arrayUnique(this.extraCombatRules);
  3915. }
  3916. }
  3917. AI.rules = new Rulebook("Default AI Rules");
  3918. AI.combatRules = new Rulebook("Default AI Combat Rules");
  3919. var AIRules;
  3920. (function (AIRules) {
  3921. AIRules.PRIORITY_ACTING_ON_SITUATION = 5;
  3922. AIRules.PRIORITY_ACTING_ON_PLACE = 3;
  3923. AIRules.PRIORITY_ACTING_ON_IDLE = 1;
  3924. })(AIRules || (AIRules = {}));
  3925. class PersonStat {
  3926. constructor(id, description) {
  3927. this.defaultValue = 0;
  3928. this.maxValue = 10;
  3929. this.id = id;
  3930. this.description = description == undefined ? "Not defined" : description;
  3931. }
  3932. getDescription(value) {
  3933. if (typeof this.description == "string" || this.description instanceof Say) {
  3934. return this.description;
  3935. }
  3936. else {
  3937. return this.description(value);
  3938. }
  3939. }
  3940. }
  3941. class Attribute extends PersonStat {
  3942. constructor(id, description, defValue, maxValue) {
  3943. super(id, description);
  3944. this.defaultValue = 2;
  3945. this.maxValue = 5;
  3946. if (defValue != undefined) {
  3947. this.defaultValue = defValue;
  3948. }
  3949. if (maxValue != undefined) {
  3950. this.maxValue = maxValue;
  3951. }
  3952. Attribute.Attributes[id] = this;
  3953. }
  3954. static getAttributes() {
  3955. let attributes = [];
  3956. for (let key in Attribute.Attributes) {
  3957. attributes.push(Attribute.Attributes[key]);
  3958. }
  3959. return attributes;
  3960. }
  3961. static getAttribute(id) {
  3962. return Attribute.Attributes[id];
  3963. }
  3964. }
  3965. Attribute.Attributes = {};
  3966. var Attributes;
  3967. (function (Attributes) {
  3968. Attributes.Strength = new Attribute("Strength", value => {
  3969. switch (value) {
  3970. case 5: return "Hercules' Bigger Cousin";
  3971. case 4: return ("Circus Strong" + (WorldState.player.isMale() ? "man" : "woman"));
  3972. case 3: return "Beach Bully";
  3973. case 2: return ("Average " + (WorldState.player.isMale() ? "Joe" : "Jane"));
  3974. case 1: return "Wet Noodle";
  3975. default: return "Out of bounds.";
  3976. }
  3977. });
  3978. Attributes.Agility = new Attribute("Agility", value => {
  3979. switch (value) {
  3980. case 5: return "Catlike";
  3981. case 4: return "Gymnast";
  3982. case 3: return "Accurate";
  3983. case 2: return "Common";
  3984. case 1: return "Accident-prone";
  3985. default: return "Out of bounds.";
  3986. }
  3987. });
  3988. Attributes.Intelligence = new Attribute("Intelligence", value => {
  3989. switch (value) {
  3990. case 5: return "Genius";
  3991. case 4: return "Gifted";
  3992. case 3: return "Knowledgeable";
  3993. case 2: return "Normal";
  3994. case 1: return "Door";
  3995. default: return "Out of bounds.";
  3996. }
  3997. });
  3998. Attributes.Charm = new Attribute("Charm", value => {
  3999. switch (value) {
  4000. case 5: return (WorldState.player.isMale() ? "Casanova" : "Seductress");
  4001. case 4: return "Diplomat";
  4002. case 3: return ("Cheery Sales" + (WorldState.player.isMale() ? "man" : "woman"));
  4003. case 2: return "Not even trying";
  4004. case 1: return "Unpleasant";
  4005. default: return "Out of bounds.";
  4006. }
  4007. });
  4008. Attributes.Corruption = new Attribute("Corruption", value => {
  4009. return "Not defined";
  4010. }, 0, 100);
  4011. Attributes.GenderIdentity = new Attribute("Gender Identity", value => {
  4012. if (value >= 75) {
  4013. return "You strongly feel, and act, like a woman.";
  4014. }
  4015. else if (value >= 60) {
  4016. return "You feel, and act, like a woman.";
  4017. }
  4018. else if (value >= 40) {
  4019. return "You don't feel nor act like any particular gender.";
  4020. }
  4021. else if (value >= 20) {
  4022. return "You feel, and act, like a man.";
  4023. }
  4024. else {
  4025. return "You strongly feel, and act, like a man.";
  4026. }
  4027. }, 50, 100);
  4028. Attributes.Degeneration = new Attribute("Degeneration", value => {
  4029. if (value >= 75) {
  4030. return "Sex is about the only thing on your mind, and you don't even try to hide it anymore.";
  4031. }
  4032. else if (value >= 60) {
  4033. return "Sometimes you can't hide how naughty you'd like to be.";
  4034. }
  4035. else if (value >= 40) {
  4036. return "";
  4037. }
  4038. else if (value >= 20) {
  4039. return "Your composure is prudish and calm.";
  4040. }
  4041. else {
  4042. return "You have the composure of a saint.";
  4043. }
  4044. }, 30, 100);
  4045. })(Attributes || (Attributes = {}));
  4046. class Skill extends PersonStat {
  4047. constructor(id, description) {
  4048. super(id, description);
  4049. this.defaultValue = 0;
  4050. this.maxValue = 5;
  4051. Skill.Skills[id] = this;
  4052. }
  4053. static getSkills() {
  4054. let skills = [];
  4055. for (let key in Skill.Skills) {
  4056. skills.push(Skill.Skills[key]);
  4057. }
  4058. skills.sort((a, b) => {
  4059. let na = a.id.toUpperCase();
  4060. let nb = b.id.toUpperCase();
  4061. if (na > nb)
  4062. return 1;
  4063. if (na < nb)
  4064. return -1;
  4065. return 0;
  4066. });
  4067. return skills;
  4068. }
  4069. static getSkill(id) {
  4070. return Skill.Skills[id];
  4071. }
  4072. }
  4073. Skill.Skills = {};
  4074. var Skills;
  4075. (function (Skills) {
  4076. Skills.Survival = new Skill("Survival", (value) => {
  4077. switch (value) {
  4078. case 5: return "";
  4079. case 4: return "";
  4080. case 3: return "";
  4081. case 2: return "";
  4082. case 1: return "Alert Chihuahua";
  4083. }
  4084. });
  4085. })(Skills || (Skills = {}));
  4086. class Container extends Thing {
  4087. put(...things) {
  4088. }
  4089. }
  4090. class Corpse extends Container {
  4091. }
  4092. class Person extends Thing {
  4093. constructor(options) {
  4094. super(options);
  4095. this.AI = new AI({});
  4096. this.animated = true;
  4097. this.soreness = 0;
  4098. this.lastHealthUpdate = 0;
  4099. this.stamina = 10;
  4100. this.lastStaminaUpdate = 0;
  4101. this.staminaPerTurn = 1;
  4102. this.attributeValue = {};
  4103. this.skillValue = {};
  4104. this.addGetAlterations((person) => {
  4105. if (person.isPlayer()) {
  4106. return {
  4107. Stats: this.attributeValue,
  4108. Skills: this.skillValue
  4109. };
  4110. }
  4111. });
  4112. this.addSetAlterations((person, changes) => {
  4113. if (person.isPlayer()) {
  4114. if (changes.Stats != undefined) {
  4115. for (let name in changes.Stats) {
  4116. let attr = Attribute.getAttribute(name);
  4117. if (attr != undefined) {
  4118. this.setStat(attr, changes.Stats[name]);
  4119. }
  4120. }
  4121. }
  4122. if (changes.Skills != undefined) {
  4123. for (let name in changes.Skills) {
  4124. let attr = Skill.getSkill(name);
  4125. if (attr != undefined) {
  4126. this.setSkill(attr, changes.Skills[name]);
  4127. }
  4128. }
  4129. }
  4130. }
  4131. });
  4132. }
  4133. changeHealth(n) {
  4134. let bodyparts = this.getParts(Bodypart);
  4135. for (let i = 0; i < bodyparts.length; i++) {
  4136. bodyparts[i].changeSoreness(n);
  4137. }
  4138. this.updateHealth();
  4139. }
  4140. getHealthOnScale() {
  4141. return Math.round(((this.getHealth() * 10) / (this.getStat(Attributes.Strength) * 2)));
  4142. }
  4143. getHealth(important) {
  4144. if (important === true || this.lastHealthUpdate != WorldState.getCurrentTurn()) {
  4145. this.updateHealth();
  4146. }
  4147. return this.soreness / (this.getStat(Attributes.Strength) * Person.STRENGTH_SORENESS_MULTIPLIER);
  4148. }
  4149. updateHealth() {
  4150. let health = 0;
  4151. let bodyparts = this.getParts(Bodypart);
  4152. for (let i = 0; i < bodyparts.length; i++) {
  4153. health += bodyparts[i].getWeightedSoreness();
  4154. }
  4155. this.soreness = health;
  4156. this.lastHealthUpdate = WorldState.getCurrentTurn();
  4157. }
  4158. changeStamina(n) {
  4159. this.updateStamina();
  4160. this.stamina += n;
  4161. if (this.stamina > Person.MAX_STAMINA) {
  4162. this.stamina = Person.MAX_STAMINA;
  4163. }
  4164. else if (this.stamina < 0) {
  4165. this.stamina = 0;
  4166. }
  4167. }
  4168. getStaminaOnScale() {
  4169. return Math.round(((this.stamina * 10) / Person.MAX_STAMINA));
  4170. }
  4171. updateStamina() {
  4172. var nTurns = WorldState.getCurrentTurn() - this.lastStaminaUpdate;
  4173. this.stamina += this.staminaPerTurn * nTurns;
  4174. if (this.stamina > Person.MAX_STAMINA) {
  4175. this.stamina = Person.MAX_STAMINA;
  4176. }
  4177. }
  4178. isPlayer() {
  4179. return this == WorldState.player;
  4180. }
  4181. getStat(stat) {
  4182. if (this.attributeValue[stat.id] == undefined) {
  4183. this.attributeValue[stat.id] = stat.defaultValue;
  4184. }
  4185. return this.attributeValue[stat.id];
  4186. }
  4187. setStat(stat, value) {
  4188. this.attributeValue[stat.id] = value;
  4189. }
  4190. getSkill(stat) {
  4191. if (this.skillValue[stat.id] == undefined) {
  4192. this.skillValue[stat.id] = stat.defaultValue;
  4193. }
  4194. return this.skillValue[stat.id];
  4195. }
  4196. setSkill(stat, value) {
  4197. this.skillValue[stat.id] = value;
  4198. }
  4199. die() {
  4200. let corpse = new Corpse({
  4201. name: this.name + "'s corpse",
  4202. unique: false,
  4203. description: new Say("The lifeless body of ", this, ". May ", new SayHeSheIt(this), " rest in peace.")
  4204. });
  4205. corpse.put(...Thing.CarryRelation.getRight(this));
  4206. corpse.put(...Thing.WearRelation.getRight(this));
  4207. this.getRoom().place(corpse);
  4208. OutOfPlay.removeFromPlay(this);
  4209. }
  4210. }
  4211. Person.MAX_STAMINA = 10;
  4212. Person.STRENGTH_SORENESS_MULTIPLIER = 4;
  4213. var EveryTurn;
  4214. (function (EveryTurn_1) {
  4215. EveryTurn_1.EveryTurn = new Rulebook("Every Turn");
  4216. EveryTurn_1.RunAIRule = EveryTurn_1.EveryTurn.createAndAddRule({
  4217. name: "Run NPC AI Rule",
  4218. code: async function () {
  4219. function isAIAvailable(person) {
  4220. return (person != WorldState.player
  4221. && ((person.getRoom() instanceof RoomRandom
  4222. && person.getRoom().placed)));
  4223. }
  4224. let people = Thing.InsideRoomRelation.getAnyRightType(Person).filter(isAIAvailable);
  4225. for (let i = 0; i < people.length; i++) {
  4226. let action = await people[i].AI.execute(people[i]);
  4227. let person = people[i];
  4228. let visible = people[i].isVisibleTo(WorldState.player);
  4229. if (action != undefined) {
  4230. let printValue = await action.execute();
  4231. if ((visible ||
  4232. person.isVisibleTo(WorldState.player)) && printValue != undefined) {
  4233. Elements.CurrentTurnHandler.printAsContent(printValue);
  4234. }
  4235. }
  4236. }
  4237. }
  4238. });
  4239. EveryTurn_1.incrementTurnCounterRule = EveryTurn_1.EveryTurn.createAndAddRule({
  4240. firstPriority: Rule.PRIORITY_LOWEST,
  4241. priority: Rule.PRIORITY_LOWEST,
  4242. name: "Increment Turn Counter",
  4243. code: function () {
  4244. WorldState.incrementWorldTurn();
  4245. }
  4246. });
  4247. })(EveryTurn || (EveryTurn = {}));
  4248. var Direction;
  4249. (function (Direction) {
  4250. Direction[Direction["NORTH"] = 0] = "NORTH";
  4251. Direction[Direction["NORTHEAST"] = 1] = "NORTHEAST";
  4252. Direction[Direction["EAST"] = 2] = "EAST";
  4253. Direction[Direction["SOUTHEAST"] = 3] = "SOUTHEAST";
  4254. Direction[Direction["SOUTH"] = 4] = "SOUTH";
  4255. Direction[Direction["SOUTHWEST"] = 5] = "SOUTHWEST";
  4256. Direction[Direction["WEST"] = 6] = "WEST";
  4257. Direction[Direction["NORTHWEST"] = 7] = "NORTHWEST";
  4258. Direction[Direction["UP"] = 8] = "UP";
  4259. Direction[Direction["DOWN"] = 9] = "DOWN";
  4260. })(Direction || (Direction = {}));
  4261. var DirectionNames = (() => {
  4262. let names;
  4263. (function (names) {
  4264. names["NORTH"] = "North";
  4265. names["SOUTH"] = "South";
  4266. names["EAST"] = "East";
  4267. names["WEST"] = "West";
  4268. names["SOUTHEAST"] = "Southeast";
  4269. names["NORTHWEST"] = "Northwest";
  4270. names["SOUTHWEST"] = "Southwest";
  4271. names["NORTHEAST"] = "Northeast";
  4272. names["UP"] = "Down";
  4273. names["DOWN"] = "Up";
  4274. })(names || (names = {}));
  4275. ;
  4276. let obj = {};
  4277. for (let name in names) {
  4278. obj[name] = names[name];
  4279. obj[Direction[name]] = names[name];
  4280. }
  4281. return obj;
  4282. })();
  4283. var OppositeDirection = (() => {
  4284. let obj = {};
  4285. obj[Direction.NORTH] = Direction.SOUTH;
  4286. obj[Direction.SOUTH] = Direction.NORTH;
  4287. obj[Direction.EAST] = Direction.WEST;
  4288. obj[Direction.WEST] = Direction.EAST;
  4289. obj[Direction.SOUTHEAST] = Direction.NORTHWEST;
  4290. obj[Direction.NORTHWEST] = Direction.SOUTHEAST;
  4291. obj[Direction.SOUTHWEST] = Direction.NORTHEAST;
  4292. obj[Direction.NORTHEAST] = Direction.SOUTHWEST;
  4293. obj[Direction.UP] = Direction.DOWN;
  4294. obj[Direction.DOWN] = Direction.UP;
  4295. for (let i = 0; i < Object.keys(Direction).length / 2; i++) {
  4296. obj[Direction[i]] = obj[i];
  4297. }
  4298. return obj;
  4299. })();
  4300. class Room {
  4301. constructor(id, fodder) {
  4302. this.description = new Say();
  4303. this.name = id == undefined ? "Room" : id;
  4304. this.connections = new Array(Room.DIRECTIONS.length);
  4305. this.fodder = fodder;
  4306. if (fodder != true) {
  4307. Room.addRoom(this);
  4308. }
  4309. }
  4310. getName() {
  4311. return this.name;
  4312. }
  4313. place(thing) {
  4314. Thing.InsideRoomRelation.setRelation(this, thing);
  4315. }
  4316. remove(thing) {
  4317. if (Thing.InsideRoomRelation.getLeft(thing) == this) {
  4318. Thing.InsideRoomRelation.unsetRight(thing);
  4319. }
  4320. }
  4321. getContained() {
  4322. return Thing.InsideRoomRelation.getRight(this);
  4323. }
  4324. getContainedAndVisibleTo(observer) {
  4325. let contained = this.getContained();
  4326. let result = [];
  4327. contained.forEach((value) => {
  4328. if (value.visible && value !== observer) {
  4329. result.push(value);
  4330. }
  4331. });
  4332. return result;
  4333. }
  4334. getContainedAndVisible() {
  4335. return this.getContainedAndVisibleTo(WorldState.player);
  4336. }
  4337. mapRoom(r, direction) {
  4338. let oppositeDirection = OppositeDirection[direction];
  4339. if (this.connections[direction] != undefined) {
  4340. console.warn("Replacing a connected room.", this, " connected through ", direction, " to ", this.connections[direction]);
  4341. this.connections[direction].unmapRoom(oppositeDirection);
  4342. }
  4343. this.connections[direction] = r;
  4344. if (r.connections[oppositeDirection] != undefined) {
  4345. console.warn("Replacing a connected room.", r, " connected through ", oppositeDirection, " to ", r.connections[oppositeDirection]);
  4346. r.unmapRoom(oppositeDirection);
  4347. }
  4348. r.connections[oppositeDirection] = this;
  4349. }
  4350. unmapRoom(direction) {
  4351. if (this.connections[direction] != undefined) {
  4352. let r = this.connections[direction];
  4353. this.connections[direction] = undefined;
  4354. r.unmapRoom(OppositeDirection[direction]);
  4355. }
  4356. }
  4357. getPrintedName() {
  4358. return this.name;
  4359. }
  4360. getConnectedRooms() {
  4361. let rooms = [];
  4362. this.connections.forEach(room => {
  4363. if (room != undefined) {
  4364. rooms.push(room);
  4365. }
  4366. });
  4367. return rooms;
  4368. }
  4369. bestDirectionTo(room, validityCode) {
  4370. if (validityCode == undefined)
  4371. validityCode = () => { return true; };
  4372. let maxSteps = 10;
  4373. maxSteps = maxSteps > WorldState.getMaximumRememberedRooms() ? maxSteps : WorldState.getMaximumRememberedRooms();
  4374. let recursiveBestPath = (cPath, cRoom, destination) => {
  4375. if (!validityCode(cRoom)) {
  4376. return;
  4377. }
  4378. if (cRoom == destination) {
  4379. maxSteps = maxSteps > cPath.length ? cPath.length : maxSteps;
  4380. return cPath;
  4381. }
  4382. else if (cPath.length > maxSteps) {
  4383. return undefined;
  4384. }
  4385. else {
  4386. let paths = [];
  4387. for (let index in Room.DIRECTIONS) {
  4388. let direction = Room.DIRECTIONS[index];
  4389. let nextRoom = cRoom.connections[direction];
  4390. if (nextRoom != undefined && cPath.indexOf(nextRoom) == -1 && validityCode(nextRoom)) {
  4391. let path = recursiveBestPath(cPath.concat([nextRoom]), nextRoom, destination);
  4392. if (path != undefined) {
  4393. paths.push(path);
  4394. }
  4395. }
  4396. }
  4397. let shortestIndex = 0;
  4398. paths.forEach((value, index, array) => {
  4399. if (value.length < paths[shortestIndex].length) {
  4400. shortestIndex = index;
  4401. }
  4402. });
  4403. return paths[shortestIndex];
  4404. }
  4405. };
  4406. let paths = Array(Room.DIRECTIONS.length);
  4407. let shortestIndex;
  4408. for (let index in Room.DIRECTIONS) {
  4409. let direction = Room.DIRECTIONS[index];
  4410. let nextRoom = this.connections[direction];
  4411. if (nextRoom != undefined) {
  4412. paths[direction] = recursiveBestPath([this, nextRoom], nextRoom, room);
  4413. if (paths[direction] != undefined && (shortestIndex == undefined || paths[shortestIndex].length > paths[direction].length)) {
  4414. shortestIndex = direction;
  4415. }
  4416. }
  4417. }
  4418. return shortestIndex;
  4419. }
  4420. static getDirectionXYZ(direction) {
  4421. var y = 0;
  4422. if ([Direction.NORTH, Direction.NORTHEAST, Direction.NORTHWEST].indexOf(direction) != -1) {
  4423. y = 1;
  4424. }
  4425. else if ([Direction.SOUTH, Direction.SOUTHEAST, Direction.SOUTHWEST].indexOf(direction) != -1) {
  4426. y = -1;
  4427. }
  4428. var x = 0;
  4429. if ([Direction.EAST, Direction.SOUTHEAST, Direction.NORTHEAST].indexOf(direction) != -1) {
  4430. x = 1;
  4431. }
  4432. else if ([Direction.WEST, Direction.SOUTHWEST, Direction.NORTHWEST].indexOf(direction) != -1) {
  4433. x = -1;
  4434. }
  4435. var z = direction == Direction.UP ? 1 :
  4436. direction == Direction.DOWN ? -1 :
  4437. 0;
  4438. return [x, y, z];
  4439. }
  4440. static shift(coordinates, direction) {
  4441. let coordinatesVector = Room.getDirectionXYZ(direction);
  4442. coordinates.forEach((value, index, array) => {
  4443. coordinatesVector[index] += coordinates[index];
  4444. });
  4445. return coordinatesVector;
  4446. }
  4447. static addRoom(room) {
  4448. Room.rooms[room.name] = room;
  4449. }
  4450. static getRooms() {
  4451. let rooms = [];
  4452. for (let name in Room.rooms) {
  4453. rooms.push(Room.rooms[name]);
  4454. }
  4455. return rooms;
  4456. }
  4457. static getRoom(id) {
  4458. return Room.rooms[id];
  4459. }
  4460. }
  4461. Room.DIRECTIONS = (() => {
  4462. let directions = [];
  4463. for (let i = 0; i < Object.keys(Direction).length / 2; i++) {
  4464. directions.push(i);
  4465. }
  4466. return directions;
  4467. })();
  4468. Room.rooms = {};
  4469. var OutOfPlay;
  4470. (function (OutOfPlay) {
  4471. OutOfPlay.Heaven = new Room("__Heaven__RIP__");
  4472. function removeFromPlay(thing) {
  4473. OutOfPlay.Heaven.place(thing);
  4474. }
  4475. OutOfPlay.removeFromPlay = removeFromPlay;
  4476. })(OutOfPlay || (OutOfPlay = {}));
  4477. var PlayBegins;
  4478. (function (PlayBegins) {
  4479. PlayBegins.rulebook = new Rulebook("Play Begins");
  4480. PlayBegins.LOAD_FAILED = false;
  4481. let startingRoom;
  4482. function execute() {
  4483. PlayBegins.rulebook.execute({});
  4484. }
  4485. PlayBegins.execute = execute;
  4486. function setStartingRoom(room) {
  4487. if (startingRoom != undefined) {
  4488. console.warn("[InitialRoom] Multiple requests for starting room, please check.", startingRoom, room);
  4489. }
  4490. startingRoom = room;
  4491. }
  4492. PlayBegins.setStartingRoom = setStartingRoom;
  4493. PlayBegins.PutPlayerIntoFirstRoom = PlayBegins.rulebook.createAndAddRule({
  4494. name: "Place player into initial room",
  4495. firstPriority: Rule.PRIORITY_HIGHEST,
  4496. priority: Rule.PRIORITY_MEDIUM,
  4497. code: () => {
  4498. if (WorldState.player.getRoom() != undefined) {
  4499. console.debug(Rulebook.getIndentation() + "[InitialRoom] Player already in a room.", WorldState.player.getRoom());
  4500. }
  4501. else {
  4502. startingRoom.place(WorldState.player);
  4503. }
  4504. }
  4505. });
  4506. PlayBegins.RunEmptyTurnSequenceRule = new Rule({
  4507. name: "Run Empty Turn Sequence Rule",
  4508. firstPriority: Rule.PRIORITY_LOWEST,
  4509. priority: Rule.PRIORITY_LOWEST,
  4510. code: (rulebook2) => {
  4511. TurnSequence.execute();
  4512. }
  4513. });
  4514. PlayBegins.rulebook.addRule(PlayBegins.RunEmptyTurnSequenceRule);
  4515. })(PlayBegins || (PlayBegins = {}));
  4516. var MachineBegins;
  4517. (function (MachineBegins) {
  4518. MachineBegins.RunPlayBegins = MachineBegins.rulebook.createAndAddRule({
  4519. firstPriority: Rule.PRIORITY_LOW,
  4520. name: "Run Play Begins",
  4521. code: () => {
  4522. PlayBegins.execute();
  4523. }
  4524. });
  4525. })(MachineBegins || (MachineBegins = {}));
  4526. var Tests;
  4527. (function (Tests) {
  4528. Tests.MIN_DICE = 0;
  4529. Tests.MAX_DICE = 3;
  4530. function rollDice() {
  4531. return Math.floor(Math.random() * (Tests.MAX_DICE - Tests.MIN_DICE)) + 1 + Tests.MIN_DICE;
  4532. }
  4533. Tests.rollDice = rollDice;
  4534. function test(attr, difficulty) {
  4535. return (attr + rollDice()) >= difficulty;
  4536. }
  4537. Tests.test = test;
  4538. })(Tests || (Tests = {}));
  4539. class MapNote extends Thing {
  4540. constructor() {
  4541. super(...arguments);
  4542. this.rooms = [];
  4543. this.regions = [];
  4544. }
  4545. addRoom(...rooms) {
  4546. rooms.forEach((room) => {
  4547. this.rooms.push(room);
  4548. });
  4549. }
  4550. addRegion(...regions) {
  4551. regions.forEach(region => {
  4552. this.regions.push(region);
  4553. });
  4554. }
  4555. contains(room) {
  4556. if (this.rooms.indexOf(room) != -1) {
  4557. return true;
  4558. }
  4559. else {
  4560. for (var i = 0; i < this.regions.length; i++) {
  4561. if (this.regions[i].getRooms().indexOf(room) != -1) {
  4562. return true;
  4563. }
  4564. }
  4565. }
  4566. }
  4567. }
  4568. class Bodypart extends Thing {
  4569. constructor(options) {
  4570. super(options);
  4571. this.sorenessWeight = 1;
  4572. this.soreness = 0;
  4573. this.sorenessPerTurn = 0.05;
  4574. this.lastSorenessUpdate = 0;
  4575. this.slots = [];
  4576. this.visibleSlots = [];
  4577. this.genderValue = Bodypart.GENDER_MEDIUM_ANDROGYNE;
  4578. this.genderWeight = 1;
  4579. this.sluttiness = 10;
  4580. this.sluttinessWeight = Bodypart.WEIGHT_LOWEST;
  4581. this.addGetAlterations((bp) => {
  4582. return {
  4583. Soreness: bp.soreness,
  4584. GenderValue: bp.genderValue,
  4585. Sluttiness: bp.getSluttiness()
  4586. };
  4587. });
  4588. this.addSetAlterations((bp, changes) => {
  4589. this.soreness = changes.Soreness;
  4590. this.genderValue = changes.GenderValue;
  4591. this.sluttiness = changes.Sluttiness;
  4592. });
  4593. }
  4594. updateSoreness() {
  4595. let cTurn = WorldState.getCurrentTurn();
  4596. if (cTurn > this.lastSorenessUpdate) {
  4597. if (this.soreness > 0) {
  4598. this.soreness -= (this.sorenessPerTurn * (cTurn - this.lastSorenessUpdate));
  4599. if (this.soreness < 0) {
  4600. this.soreness = 0;
  4601. }
  4602. }
  4603. this.lastSorenessUpdate = cTurn;
  4604. }
  4605. }
  4606. changeSoreness(soreness) {
  4607. this.updateSoreness();
  4608. this.soreness += soreness;
  4609. if (this.soreness < 0) {
  4610. this.soreness = 0;
  4611. }
  4612. }
  4613. getSoreness() {
  4614. this.updateSoreness();
  4615. return this.soreness;
  4616. }
  4617. getWeightedSoreness() {
  4618. return this.getSoreness() * this.sorenessWeight;
  4619. }
  4620. getSorenessWeight() {
  4621. return this.sorenessWeight;
  4622. }
  4623. getGenderWeight() {
  4624. if (this.slots.length == 0) {
  4625. return 0;
  4626. }
  4627. return this.genderWeight * (this.visibleSlots.length / this.slots.length);
  4628. }
  4629. getGenderValue() {
  4630. return this.genderValue;
  4631. }
  4632. getWeightedGenderValue() {
  4633. return this.getGenderValue() * this.getGenderWeight();
  4634. }
  4635. getSluttiness() {
  4636. return this.sluttiness;
  4637. }
  4638. getSluttinessWeight() {
  4639. if (this.slots.length == 0) {
  4640. return 0;
  4641. }
  4642. return this.sluttinessWeight * (this.visibleSlots.length / this.slots.length);
  4643. }
  4644. getWeightedSluttinessValue() {
  4645. return this.getSluttiness() * this.getSluttinessWeight();
  4646. }
  4647. updateVisibility() {
  4648. this.visibleSlots = this.slots.slice(0);
  4649. let parent = Thing.PartRelation.getLeft(this);
  4650. if (parent != undefined) {
  4651. let clothing = Thing.WearRelation.getRight(parent);
  4652. for (let i = 0; i < clothing.length; i++) {
  4653. let covering = clothing[i].getCoveringSlots();
  4654. for (let k = 0; k < covering.length; k++) {
  4655. let idx = this.visibleSlots.indexOf(covering[k]);
  4656. if (idx >= 0) {
  4657. this.visibleSlots.splice(idx, 1);
  4658. }
  4659. }
  4660. if (this.visibleSlots.length == 0)
  4661. break;
  4662. }
  4663. }
  4664. }
  4665. isUncovered() {
  4666. this.updateVisibility();
  4667. return this.visibleSlots.length == this.slots.length && this.slots.length > 0;
  4668. }
  4669. updateStatus() {
  4670. this.updateVisibility();
  4671. }
  4672. static getSoreness(thing) {
  4673. let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart);
  4674. let soreness = 0;
  4675. bodyparts.forEach((bodypart) => {
  4676. soreness += bodypart.getWeightedSoreness();
  4677. });
  4678. return soreness;
  4679. }
  4680. static getGenderValueOn(thing) {
  4681. let weight = 0;
  4682. let value = 0;
  4683. let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart);
  4684. bodyparts.forEach((bodypart) => {
  4685. weight += bodypart.getGenderWeight();
  4686. value += bodypart.getWeightedGenderValue();
  4687. });
  4688. return {
  4689. weight: weight,
  4690. value: value
  4691. };
  4692. }
  4693. static getSluttinessValueOn(thing) {
  4694. let weight = 0;
  4695. let value = 0;
  4696. let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart);
  4697. bodyparts.forEach((bodypart) => {
  4698. weight += bodypart.getSluttinessWeight();
  4699. value += bodypart.getWeightedSluttinessValue();
  4700. });
  4701. return {
  4702. weight: weight,
  4703. value: value
  4704. };
  4705. }
  4706. arrangeGenderValue(genderValue) {
  4707. this.genderValue = genderValue;
  4708. this.getPartOne().invalidateCaches();
  4709. }
  4710. increaseFemininity(amount) {
  4711. let currentGV = this.getGenderValue();
  4712. this.arrangeGenderValue(currentGV + (5 * amount));
  4713. }
  4714. increaseMasculinity(amount) {
  4715. let currentGV = this.getGenderValue();
  4716. this.arrangeGenderValue(currentGV - (5 * amount));
  4717. }
  4718. }
  4719. Bodypart.WEIGHT_LOWEST = 1;
  4720. Bodypart.WEIGHT_LOW = 3;
  4721. Bodypart.WEIGHT_MEDIUM = 5;
  4722. Bodypart.WEIGHT_HIGH = 7;
  4723. Bodypart.WEIGHT_HIGHEST = 9;
  4724. Bodypart.SLUTTINESS_LOWEST_SAINTLY = 0;
  4725. Bodypart.SLUTTINESS_LOW_PRUDE = 25;
  4726. Bodypart.SLUTTINESS_MEDIUM_AVERAGE = 50;
  4727. Bodypart.SLUTTINESS_HIGH_SLUT = 75;
  4728. Bodypart.SLUTTINESS_HIGHEST_WHORE = 100;
  4729. Bodypart.GENDER_LOWEST_MANLIEST = 0;
  4730. Bodypart.GENDER_LOW_MANLY = 25;
  4731. Bodypart.GENDER_MEDIUM_ANDROGYNE = 50;
  4732. Bodypart.GENDER_HIGH_FEMININE = 75;
  4733. Bodypart.GENDER_HIGHEST_FEMININEST = 100;
  4734. class SexStick extends Bodypart {
  4735. getWide() {
  4736. return new Measure();
  4737. }
  4738. getLong() {
  4739. return new Measure();
  4740. }
  4741. }
  4742. class SexHole extends Bodypart {
  4743. }
  4744. class Measure {
  4745. constructor(...sides) {
  4746. this.superscript = ["", "", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹"];
  4747. this.units = 1;
  4748. sides.forEach((side) => {
  4749. this.units *= side;
  4750. });
  4751. this.sides = sides.length;
  4752. }
  4753. getText() {
  4754. let meters = Math.pow(this.sides, 100);
  4755. if (this.units > meters) {
  4756. return (+(this.units / meters).toFixed(2)).toString() + "m" + this.superscript[this.sides];
  4757. }
  4758. else {
  4759. return this.units.toString() + "cm" + this.superscript[this.sides];
  4760. }
  4761. }
  4762. getNumber() {
  4763. return this.units;
  4764. }
  4765. getSides() {
  4766. return this.sides;
  4767. }
  4768. static fromInches(inches) {
  4769. return inches * 2.54;
  4770. }
  4771. static fromFeet(feet) {
  4772. return feet * 30.48;
  4773. }
  4774. }
  4775. class MeasureLiquid {
  4776. constructor(milliliters) {
  4777. this.units = milliliters;
  4778. }
  4779. getText() {
  4780. if (this.units > 1000) {
  4781. return (+(this.units / 1000).toFixed(2)).toString() + "L";
  4782. }
  4783. else {
  4784. return this.units.toString() + "mL";
  4785. }
  4786. }
  4787. static fromLiters(liters) {
  4788. return liters * 1000;
  4789. }
  4790. }
  4791. class HumanoidArms extends Bodypart {
  4792. constructor() {
  4793. super(...arguments);
  4794. this.sorenessWeight = Bodypart.WEIGHT_LOW;
  4795. this.genderWeight = Bodypart.WEIGHT_MEDIUM;
  4796. this.slots = [Humanoid.SLOT_ARMS];
  4797. }
  4798. get sluttinessWeight() {
  4799. if (this.getPartOne().isMale()) {
  4800. return Bodypart.WEIGHT_HIGHEST;
  4801. }
  4802. else {
  4803. return Bodypart.WEIGHT_MEDIUM;
  4804. }
  4805. }
  4806. set sluttinessWeight(val) { }
  4807. getSluttiness() {
  4808. if (this.getPartOne().isMale()) {
  4809. return this.getGenderValue();
  4810. }
  4811. else {
  4812. return 100 - this.getGenderValue();
  4813. }
  4814. }
  4815. getDescription() {
  4816. let humanoid = this.getPartOne();
  4817. let str = humanoid.getStat(Attributes.Strength);
  4818. if (str > 4) {
  4819. return "Your arms and legs are ridiculously huge, showing off just how strong you are.";
  4820. }
  4821. else if (str > 2) {
  4822. return "Your arms and legs are pretty big because of your muscles.";
  4823. }
  4824. else if (str == 2) {
  4825. return "";
  4826. }
  4827. else {
  4828. return "You look like you don't even lift.";
  4829. }
  4830. }
  4831. getGenderValue() {
  4832. let humanoid = this.getPartOne();
  4833. let str = humanoid.getStat(Attributes.Strength);
  4834. return 20 * str;
  4835. }
  4836. }
  4837. class HumanoidBreasts extends Bodypart {
  4838. constructor(options) {
  4839. super(options);
  4840. this.size = 0;
  4841. this.silicone = 0;
  4842. this.milk = 0;
  4843. this.sorenessWeight = Bodypart.WEIGHT_MEDIUM;
  4844. this.genderWeight = Bodypart.WEIGHT_HIGH;
  4845. this.slots = [Humanoid.SLOT_BREASTS];
  4846. this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT;
  4847. this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  4848. this.addGetAlterations((thing) => {
  4849. return {
  4850. Size: this.size,
  4851. Silicone: this.silicone,
  4852. Milk: this.milk
  4853. };
  4854. });
  4855. this.addSetAlterations((thing, changes) => {
  4856. this.size = changes.Size;
  4857. this.silicone = changes.Silicone;
  4858. this.milk = changes.Milk;
  4859. });
  4860. }
  4861. getSize() {
  4862. return this.size + this.silicone + this.milk;
  4863. }
  4864. getSizeText() {
  4865. return HumanoidBreasts.getSizeText(this.getSize());
  4866. }
  4867. static getSizeText(size) {
  4868. let names = ["flat", "AA-cup", "A-cup", "B-cup", "C-cup", "D-cup", "E-cup", "F-cup", "G-cup", "H-cup"];
  4869. if (size >= names.length) {
  4870. return "HUGE";
  4871. }
  4872. else {
  4873. return names[size];
  4874. }
  4875. }
  4876. getGenderValue() {
  4877. return HumanoidBreasts.getGenderFromSize(this.getSize());
  4878. }
  4879. getSluttiness() {
  4880. return this.getGenderValue();
  4881. }
  4882. static getGenderFromSize(size) {
  4883. if (size <= 0) {
  4884. return 20;
  4885. }
  4886. else if (size <= 3) {
  4887. return 20 * size;
  4888. }
  4889. else {
  4890. return 80;
  4891. }
  4892. }
  4893. arrangeGenderValue(gv) {
  4894. if (gv <= 20) {
  4895. this.size = 0;
  4896. this.silicone = 0;
  4897. this.milk = 0;
  4898. }
  4899. else if (gv < 80) {
  4900. this.size = Math.round(gv / 20);
  4901. }
  4902. else {
  4903. this.size = 4;
  4904. }
  4905. }
  4906. }
  4907. class HumanoidButt extends Bodypart {
  4908. constructor(options) {
  4909. super(options);
  4910. this.size = 0;
  4911. this.silicone = 0;
  4912. this.sorenessWeight = Bodypart.WEIGHT_MEDIUM;
  4913. this.genderWeight = Bodypart.WEIGHT_MEDIUM;
  4914. this.slots = [Humanoid.SLOT_BUTT];
  4915. this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT;
  4916. this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  4917. this.addGetAlterations((thing) => {
  4918. return {
  4919. Size: this.size,
  4920. Silicone: this.silicone
  4921. };
  4922. });
  4923. this.addSetAlterations((thing, changes) => {
  4924. this.size = changes.Size;
  4925. this.silicone = changes.Silicone;
  4926. });
  4927. }
  4928. getSluttiness() {
  4929. return this.getSize() * 33;
  4930. }
  4931. getSize() {
  4932. return this.size + this.silicone;
  4933. }
  4934. getSizeText() {
  4935. return HumanoidButt.getSizeText(this.getSize());
  4936. }
  4937. static getSizeText(size) {
  4938. let names = ["flat", "tiny", "round", "plump"];
  4939. if (size >= names.length) {
  4940. return "gargantuan";
  4941. }
  4942. else {
  4943. return names[size];
  4944. }
  4945. }
  4946. getGenderValue() {
  4947. return HumanoidBreasts.getGenderFromSize(this.getSize());
  4948. }
  4949. static getGenderFromSize(size) {
  4950. if (size <= 0) {
  4951. return 20;
  4952. }
  4953. else if (size <= 2) {
  4954. return 30 * size;
  4955. }
  4956. else {
  4957. return 80;
  4958. }
  4959. }
  4960. arrangeGenderValue(gv) {
  4961. if (gv <= 20) {
  4962. this.size = 0;
  4963. }
  4964. else if (gv <= 60) {
  4965. this.size = 1;
  4966. }
  4967. else {
  4968. this.size = 3;
  4969. }
  4970. }
  4971. }
  4972. class HumanoidExtremity extends Bodypart {
  4973. constructor(options) {
  4974. super(options);
  4975. this.nailsPainted = false;
  4976. this.nailColor = 0;
  4977. this.addGetAlterations((thing) => {
  4978. return {
  4979. Painted: this.nailsPainted,
  4980. Color: this.nailColor
  4981. };
  4982. });
  4983. this.addSetAlterations((thing, changes) => {
  4984. this.nailsPainted = changes.Painted;
  4985. this.nailColor = changes.Color;
  4986. });
  4987. }
  4988. static getColor(index) {
  4989. return HumanoidExtremity.nailColorNames[index];
  4990. }
  4991. getSluttiness() {
  4992. return this.getGenderValue();
  4993. }
  4994. getGenderValue() {
  4995. let nailPaintedCorrection = this.nailColor * 50;
  4996. let nailPaintedCorrectionWeight = this.nailsPainted ? 3 : 0;
  4997. let gv = this.genderValue;
  4998. let gw = this.genderWeight;
  4999. return ((gv * gw) + (nailPaintedCorrection * nailPaintedCorrectionWeight)) / (gw + nailPaintedCorrectionWeight);
  5000. }
  5001. arrangeGenderValue(gv) {
  5002. this.genderValue = gv;
  5003. this.nailsPainted = gv > 60;
  5004. if (this.nailsPainted) {
  5005. if (gv > 70) {
  5006. this.nailColor = 2;
  5007. }
  5008. else {
  5009. this.nailColor = 1;
  5010. }
  5011. }
  5012. this.getPartOne().invalidateCaches();
  5013. }
  5014. }
  5015. HumanoidExtremity.nailColorNames = ['none', 'red', 'pink'];
  5016. class HumanoidFeet extends HumanoidExtremity {
  5017. constructor() {
  5018. super(...arguments);
  5019. this.sorenessWeight = Bodypart.WEIGHT_LOW;
  5020. this.genderWeight = Bodypart.WEIGHT_LOW;
  5021. this.slots = [Humanoid.SLOT_FEET];
  5022. }
  5023. getDescription() {
  5024. let say = new Say();
  5025. if (this.genderValue > 55) {
  5026. say.add("Your feet are small and cute.");
  5027. }
  5028. else if (this.genderValue < 45) {
  5029. say.add("Your feet are big and mannish.");
  5030. }
  5031. if (this.nailsPainted) {
  5032. say.add(" Your toenails are painted " + HumanoidExtremity.getColor(this.nailColor) + ".");
  5033. }
  5034. return say;
  5035. }
  5036. }
  5037. class HumanoidHands extends HumanoidExtremity {
  5038. constructor() {
  5039. super(...arguments);
  5040. this.sorenessWeight = Bodypart.WEIGHT_LOW;
  5041. this.genderWeight = Bodypart.WEIGHT_MEDIUM;
  5042. this.slots = [Humanoid.SLOT_HANDS];
  5043. }
  5044. getDescription() {
  5045. let say = new Say();
  5046. if (this.genderValue > 55) {
  5047. say.add("Your hands are delicate and slender.");
  5048. }
  5049. else if (this.genderValue < 45) {
  5050. say.add("Your hands are rough and large.");
  5051. }
  5052. if (this.nailsPainted) {
  5053. say.add(" Your toenails are painted " + HumanoidExtremity.getColor(this.nailColor) + ".");
  5054. }
  5055. return say;
  5056. }
  5057. }
  5058. class HumanoidHead extends Bodypart {
  5059. constructor() {
  5060. super(...arguments);
  5061. this.sorenessWeight = Bodypart.WEIGHT_MEDIUM;
  5062. this.genderWeight = Bodypart.WEIGHT_LOW;
  5063. this.slots = [Humanoid.SLOT_HEADGEAR, Humanoid.SLOT_HAIR, Humanoid.SLOT_EARS, Humanoid.SLOT_FACE, Humanoid.SLOT_EYES, , Humanoid.SLOT_NOSE, Humanoid.SLOT_MOUTH];
  5064. }
  5065. }
  5066. class HumanoidPenis extends SexStick {
  5067. constructor(options) {
  5068. super(options);
  5069. this.sorenessWeight = Bodypart.WEIGHT_HIGH;
  5070. this.genderValue = 25;
  5071. this.genderWeight = Bodypart.WEIGHT_HIGHEST;
  5072. this.slots = [Humanoid.SLOT_CROTCH_FRONT];
  5073. this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT;
  5074. this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  5075. this.flaccidSize = new Measure(6);
  5076. this.flaccidWidth = new Measure(3);
  5077. this.erectSize = new Measure(15);
  5078. this.erectWidth = new Measure(6);
  5079. this.arousalMinimum = 5;
  5080. this.arousalErect = 25;
  5081. if (Math.random() >= 0.5) {
  5082. this.flaccidMult = 0.33;
  5083. }
  5084. else {
  5085. this.flaccidMult = 0.77;
  5086. }
  5087. this.addGetAlterations((thing) => {
  5088. return {
  5089. FSize: this.flaccidSize.getNumber(),
  5090. FWidth: this.flaccidWidth.getNumber(),
  5091. ESize: this.erectSize.getNumber(),
  5092. EWidth: this.erectWidth.getNumber(),
  5093. AMin: this.arousalMinimum,
  5094. AErect: this.arousalErect,
  5095. FMult: this.flaccidMult
  5096. };
  5097. });
  5098. this.addSetAlterations((thing, changes) => {
  5099. this.flaccidSize = new Measure(changes.FSize);
  5100. this.flaccidWidth = new Measure(changes.FWidth);
  5101. this.erectSize = new Measure(changes.ESize);
  5102. this.erectWidth = new Measure(changes.EWidth);
  5103. this.arousalMinimum = changes.AMin;
  5104. this.arousalErect = changes.AErect;
  5105. this.flaccidMult = changes.FMult;
  5106. });
  5107. }
  5108. getSluttiness() {
  5109. return this.getBulgeSize() * 3;
  5110. }
  5111. isGrower() {
  5112. return this.flaccidMult < 0.5;
  5113. }
  5114. getActualSize() {
  5115. let min = this.flaccidSize.getNumber();
  5116. let max = this.erectSize.getNumber();
  5117. let variableSize = (max - min);
  5118. let finalSize = min + (variableSize * this.getArousalPerc());
  5119. return finalSize;
  5120. }
  5121. isBig() {
  5122. return this.getBulgeSize() > 22;
  5123. }
  5124. getArousalPerc() {
  5125. let arousal = 0;
  5126. let numSteps = this.arousalErect - this.arousalMinimum;
  5127. let arousalPerc = (arousal - this.arousalMinimum) / numSteps;
  5128. arousalPerc = arousalPerc < 0 ? 0 :
  5129. arousalPerc > 1 ? 1 :
  5130. arousalPerc;
  5131. return arousalPerc;
  5132. }
  5133. isFlaccid() {
  5134. return this.getArousalPerc() < 0.6;
  5135. }
  5136. isErect() {
  5137. return !this.isFlaccid();
  5138. }
  5139. getActualWidth() {
  5140. let min = this.flaccidWidth.getNumber();
  5141. let max = this.erectWidth.getNumber();
  5142. let variableSize = (max - min);
  5143. let numSteps = this.arousalErect - this.arousalMinimum;
  5144. let arousal = 0;
  5145. let arousalPerc = (arousal - this.arousalMinimum) / numSteps;
  5146. arousalPerc = arousalPerc < 0 ? 0 :
  5147. arousalPerc > 1 ? 1 :
  5148. arousalPerc;
  5149. let finalSize = min + (variableSize * arousalPerc);
  5150. return finalSize;
  5151. }
  5152. getLong() {
  5153. return new Measure(this.getActualSize());
  5154. }
  5155. getWide() {
  5156. return new Measure(this.getActualWidth());
  5157. }
  5158. getBulgeSize() {
  5159. return this.getActualSize() + (3 * this.getActualWidth());
  5160. }
  5161. getSizeText() {
  5162. return HumanoidPenis.getSizeText(this.getBulgeSize());
  5163. }
  5164. static getSizeText(size) {
  5165. let sizeTable = [
  5166. [0, "nonexistent"],
  5167. [1, "tiny"],
  5168. [20, "small"],
  5169. [23, "medium"],
  5170. [27, "big"],
  5171. [32, "huge"],
  5172. [36, "monstrous"]
  5173. ];
  5174. let i;
  5175. for (i = 1; i < sizeTable.length && sizeTable[i][0] < size; i++) { }
  5176. return sizeTable[i - 1][1];
  5177. }
  5178. getGenderValue() {
  5179. let sizeTable = [
  5180. [10, 60],
  5181. [20, 45],
  5182. [23, 35],
  5183. [27, 28],
  5184. [32, 24],
  5185. [36, 18]
  5186. ];
  5187. let i;
  5188. for (i = 1; i < sizeTable.length && sizeTable[i][0] < this.getActualSize(); i++) { }
  5189. return sizeTable[i - 1][1];
  5190. }
  5191. arrangeGenderValue(gv) {
  5192. let sizeTable = [
  5193. [60, 3, 2],
  5194. [45, 10, 3],
  5195. [35, 14, 3],
  5196. [28, 17, 3],
  5197. [24, 19, 4],
  5198. [18, 22, 4.5]
  5199. ];
  5200. let i;
  5201. for (i = 1; i < sizeTable.length && sizeTable[i][0] > gv; i++) { }
  5202. this.flaccidSize = new Measure(this.flaccidMult * sizeTable[i - 1][1]);
  5203. this.flaccidWidth = new Measure(this.flaccidMult * sizeTable[i - 1][2]);
  5204. this.erectSize = new Measure(sizeTable[i - 1][1]);
  5205. this.erectWidth = new Measure(sizeTable[i - 1][2]);
  5206. this.getPartOne().invalidateCaches();
  5207. }
  5208. static getSynonym() {
  5209. let cockNames = [
  5210. "cock",
  5211. "dick"
  5212. ];
  5213. return (new OneOf(OneOf.PURELY_AT_RANDOM, ...cockNames).getOne());
  5214. }
  5215. }
  5216. class HumanoidSkin extends Bodypart {
  5217. constructor(options) {
  5218. super(options);
  5219. this.sorenessWeight = 0;
  5220. this.genderWeight = Bodypart.WEIGHT_MEDIUM;
  5221. this.slots = [
  5222. Humanoid.SLOT_FACE, Humanoid.SLOT_NECK, Humanoid.SLOT_SHOULDERS,
  5223. Humanoid.SLOT_ARMS, Humanoid.SLOT_HANDS, Humanoid.SLOT_UPPER_CHEST,
  5224. Humanoid.SLOT_MIDRIFF, Humanoid.SLOT_WAIST, Humanoid.SLOT_BACK,
  5225. Humanoid.SLOT_HIPS, Humanoid.SLOT_BUTT, Humanoid.SLOT_LEG_UPPER,
  5226. Humanoid.SLOT_LEG_LOWER
  5227. ];
  5228. this.skinSoftness = 5;
  5229. this.skinHairiness = 2;
  5230. this.addGetAlterations((thing) => {
  5231. return {
  5232. Softness: this.skinSoftness,
  5233. Hairiness: this.skinHairiness
  5234. };
  5235. });
  5236. this.addSetAlterations((thing, changes) => {
  5237. this.skinSoftness = changes.Softness;
  5238. this.skinHairiness = changes.Hairiness;
  5239. });
  5240. }
  5241. getSluttiness() {
  5242. return this.getGenderValue();
  5243. }
  5244. getDescription() {
  5245. let owner = this.getPartOne();
  5246. let green = (owner.getStat(Attributes.Corruption) > 50);
  5247. let say = new Say("Your skin is ");
  5248. if (this.skinSoftness > 7) {
  5249. say.add("perfectly smooth");
  5250. }
  5251. else if (this.skinSoftness > 4) {
  5252. say.add("smooth");
  5253. }
  5254. else {
  5255. say.add("rough");
  5256. }
  5257. say.add(" and ");
  5258. if (this.skinHairiness > 8) {
  5259. say.add("hairy, like a gorilla's");
  5260. }
  5261. else if (this.skinHairiness > 6) {
  5262. say.add("hairy");
  5263. }
  5264. else if (this.skinHairiness > 3) {
  5265. say.add("somewhat hairless");
  5266. }
  5267. else {
  5268. say.add("completely hairless");
  5269. }
  5270. say.add(".");
  5271. if (green) {
  5272. say.add(" The taint of your corruption has turned your skin green, like an orc's.");
  5273. }
  5274. return say;
  5275. }
  5276. getGenderValue() {
  5277. let softnessRank = this.skinSoftness * 100;
  5278. let hairinessRank = 1000 - (this.skinHairiness * 100);
  5279. return (softnessRank + hairinessRank) / 20;
  5280. }
  5281. arrangeGenderValue(genderValue) {
  5282. let ideal = genderValue / 10;
  5283. this.skinHairiness = 10 - Math.round(ideal);
  5284. this.skinSoftness = Math.round(ideal);
  5285. this.getPartOne().invalidateCaches();
  5286. }
  5287. }
  5288. class HumanoidTesticles extends Bodypart {
  5289. constructor(options) {
  5290. super(options);
  5291. this.size = 1;
  5292. this.sorenessWeight = Bodypart.WEIGHT_HIGH;
  5293. this.genderWeight = Bodypart.WEIGHT_HIGHEST;
  5294. this.slots = [Humanoid.SLOT_CROTCH_FRONT];
  5295. this.sluttiness = Bodypart.SLUTTINESS_MEDIUM_AVERAGE;
  5296. this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  5297. this.addGetAlterations((thing) => {
  5298. return {
  5299. Size: this.size
  5300. };
  5301. });
  5302. this.addSetAlterations((thing, changes) => {
  5303. this.size = changes.Size;
  5304. });
  5305. }
  5306. getBulgeSize() {
  5307. return this.size;
  5308. }
  5309. getGenderWeight() {
  5310. return 80;
  5311. }
  5312. }
  5313. class HumanoidVagina extends SexHole {
  5314. constructor() {
  5315. super(...arguments);
  5316. this.genderValue = 85;
  5317. this.genderWeight = Bodypart.WEIGHT_HIGHEST;
  5318. this.slots = [Humanoid.SLOT_CROTCH_FRONT];
  5319. this.sluttiness = 50;
  5320. this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  5321. }
  5322. getSluttiness() {
  5323. let slut = 100 - this.genderValue;
  5324. let obscenelyOpen = false;
  5325. slut += obscenelyOpen ? 25 : 0;
  5326. return slut;
  5327. }
  5328. getDescription() {
  5329. let say = new Say("Your ");
  5330. let hairless = this.genderValue >= 80;
  5331. let smallClit = this.genderValue >= 55;
  5332. let innie = this.genderValue > 70;
  5333. let obscenelyOpen = false;
  5334. if (hairless) {
  5335. say.add("hairless ", Say.PUSSY);
  5336. }
  5337. else {
  5338. say.add("hairy ", Say.PUSSY);
  5339. }
  5340. say.add(" ");
  5341. if (innie) {
  5342. say.add("is usually completely covered by its lips");
  5343. }
  5344. else {
  5345. say.add("has some curtains escaping its lips");
  5346. }
  5347. if (!smallClit) {
  5348. say.add(" and has an oversized clit");
  5349. }
  5350. say.add(".");
  5351. if (obscenelyOpen) {
  5352. say.add(" It is currently stretched open obscenely.");
  5353. }
  5354. return say;
  5355. }
  5356. arrangeGenderValue(gv) {
  5357. gv = (gv / 2) + 50;
  5358. this.genderValue = gv;
  5359. this.getPartOne().invalidateCaches();
  5360. return;
  5361. }
  5362. static getSynonym() {
  5363. let cockNames = [
  5364. "pussy",
  5365. "womanhood"
  5366. ];
  5367. return (new OneOf(OneOf.PURELY_AT_RANDOM, ...cockNames).getOne());
  5368. }
  5369. }
  5370. class HumanoidTorso extends Bodypart {
  5371. constructor() {
  5372. super(...arguments);
  5373. this.genderWeight = 0;
  5374. this.sluttinessWeight = 0;
  5375. }
  5376. }
  5377. class Clothing extends Thing {
  5378. constructor() {
  5379. super(...arguments);
  5380. this.slots = [];
  5381. this.transparentSlots = [];
  5382. this.layer = Clothing.LAYER_MEDIUM;
  5383. this.isVisible = false;
  5384. this.visibleOn = [];
  5385. this.breastPadding = 0;
  5386. this.maxBreastSize = -1;
  5387. this.tightBreastSize = -1;
  5388. this.looseBreastSize = 0;
  5389. this.crotchPadding = 0;
  5390. this.maxCrotchSize = -1;
  5391. this.tightCrotchSize = -1;
  5392. this.looseCrotchSize = 0;
  5393. this.buttPadding = 0;
  5394. this.maxButtSize = -1;
  5395. this.tightButtSize = -1;
  5396. this.looseButtSize = 0;
  5397. this.genderValue = 50;
  5398. this.sluttinessValue = 40;
  5399. }
  5400. updateStatus() {
  5401. this.visibleOn = [];
  5402. this.visibleOn.push(...this.slots);
  5403. let wearer = Thing.WearRelation.getLeft(this);
  5404. if (wearer == undefined)
  5405. return;
  5406. let cloths = Thing.WearRelation.getRight(wearer);
  5407. let coveredSlots = [];
  5408. for (let i = 0; i < cloths.length; i++) {
  5409. let worn = cloths[i];
  5410. if ((worn != this) && worn.layer > this.layer) {
  5411. coveredSlots.push(...worn.getCoveringSlots());
  5412. }
  5413. }
  5414. this.visibleOn = this.visibleOn.filter(visible => {
  5415. return coveredSlots.indexOf(visible) == -1;
  5416. });
  5417. this.isVisible = this.visibleOn.length > 0;
  5418. }
  5419. getCoveringSlots() {
  5420. if (this.transparentSlots.length == 0) {
  5421. return this.slots.slice(0);
  5422. }
  5423. return this.slots.filter((value, index, array) => {
  5424. return this.transparentSlots.indexOf(value) == -1;
  5425. });
  5426. }
  5427. getGenderWeight() {
  5428. return this.visibleOn.length;
  5429. }
  5430. getGenderValue() {
  5431. return this.genderValue;
  5432. }
  5433. getSluttinessWeight() {
  5434. return this.visibleOn.length;
  5435. }
  5436. getSluttinessValue() {
  5437. return this.sluttinessValue;
  5438. }
  5439. static getGenderValueOn(p) {
  5440. let weight = 0;
  5441. let value = 0;
  5442. let clothes = Thing.WearRelation.getRight(p);
  5443. for (let i = 0; i < clothes.length; i++) {
  5444. weight += clothes[i].getGenderWeight();
  5445. value += clothes[i].getGenderWeight() * clothes[i].getGenderValue();
  5446. }
  5447. return {
  5448. weight: weight,
  5449. value: value
  5450. };
  5451. }
  5452. static getSluttinessValueOn(p) {
  5453. let weight = 0;
  5454. let value = 0;
  5455. let clothes = Thing.WearRelation.getRight(p);
  5456. for (let i = 0; i < clothes.length; i++) {
  5457. weight += clothes[i].getSluttinessWeight();
  5458. value += clothes[i].getSluttinessWeight() * clothes[i].getSluttinessValue();
  5459. }
  5460. return {
  5461. weight: weight,
  5462. value: value
  5463. };
  5464. }
  5465. }
  5466. Clothing.LAYER_LOWEST = 0;
  5467. Clothing.LAYER_LOW = 5;
  5468. Clothing.LAYER_MEDIUM = 10;
  5469. Clothing.LAYER_HIGH = 15;
  5470. Clothing.LAYER_HIGHEST = 20;
  5471. class ActionRemove extends Action {
  5472. getCommandText() {
  5473. return "take off " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
  5474. }
  5475. getClothing() {
  5476. return this.getNoun(0);
  5477. }
  5478. }
  5479. ActionRemove.check = new Rulebook("Check Removing");
  5480. ActionRemove.carry = new Rulebook("Carry out Removing");
  5481. ActionRemove.checkIsWearable = ActionRemove.check.createAndAddRule({
  5482. name: "Is noun a clothing",
  5483. firstPriority: Rule.PRIORITY_HIGHEST,
  5484. code: (runner) => {
  5485. let action = runner.noun;
  5486. let noun = action.getClothing();
  5487. if (!(noun instanceof Clothing)) {
  5488. if (action.actor == WorldState.player) {
  5489. action.say.add("You can only remove Clothing.");
  5490. }
  5491. return false;
  5492. }
  5493. }
  5494. });
  5495. ActionRemove.checkIsHeld = ActionRemove.check.createAndAddRule({
  5496. name: "Is noun worn",
  5497. firstPriority: Rule.PRIORITY_HIGH,
  5498. code: async (runner) => {
  5499. let action = runner.noun;
  5500. let noun = action.getClothing();
  5501. if (!Thing.WearRelation.isRight(action.actor, noun)) {
  5502. if (action.actor == WorldState.player) {
  5503. action.say.add("You are not wearing it.");
  5504. }
  5505. return false;
  5506. }
  5507. }
  5508. });
  5509. ActionRemove.carryDefault = ActionRemove.carry.createAndAddRule({
  5510. name: "Set Clothing as Carried",
  5511. firstPriority: Rule.PRIORITY_MEDIUM,
  5512. code: (runner) => {
  5513. let action = runner.noun;
  5514. let noun = action.getClothing();
  5515. Thing.CarryRelation.setRelation(action.actor, noun);
  5516. let actor = action.actor;
  5517. let thing = action.getNoun(0);
  5518. if (actor == WorldState.player) {
  5519. action.say.add(new SayBold(thing, ": "), "Removed.");
  5520. }
  5521. else {
  5522. action.say.add(new SayThe(), actor, " takes off ", new SayThe(), thing, ".");
  5523. }
  5524. }
  5525. });
  5526. Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
  5527. name: "Hyperlink - Remove",
  5528. firstPriority: Rule.PRIORITY_HIGHEST,
  5529. code: (rulebook) => {
  5530. let thing = rulebook.noun;
  5531. if (thing instanceof Clothing && (Thing.WearRelation.isRight(WorldState.player, thing))) {
  5532. Elements.HyperlinkHandler.addAvailableAction("Remove", new ActionRemove(WorldState.player, thing));
  5533. }
  5534. }
  5535. }));
  5536. Elements.InventoryHandler.LinkingThing.addRule(new Rule({
  5537. name: "Inventory - Remove",
  5538. firstPriority: Rule.PRIORITY_LOWEST,
  5539. code: (rulebook) => {
  5540. let thing = rulebook.noun;
  5541. if (thing instanceof Clothing && (Thing.WearRelation.isRight(WorldState.player, thing))) {
  5542. Elements.InventoryHandler.printThingLink("R", new ActionRemove(WorldState.player, thing));
  5543. }
  5544. }
  5545. }));
  5546. class ActionWear extends Action {
  5547. getCommandText() {
  5548. return "wear " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
  5549. }
  5550. getClothing() {
  5551. return this.getNoun(0);
  5552. }
  5553. }
  5554. ActionWear.check = new Rulebook("Check Wearing");
  5555. ActionWear.carry = new Rulebook("Carry out Wearing");
  5556. ActionWear.checkIsWearable = ActionWear.check.createAndAddRule({
  5557. name: "Is noun a clothing",
  5558. firstPriority: Rule.PRIORITY_HIGHEST,
  5559. code: (runner) => {
  5560. let action = runner.noun;
  5561. let noun = action.getClothing();
  5562. if (!(noun instanceof Clothing)) {
  5563. if (action.actor == WorldState.player) {
  5564. action.say.add("You can only wear Clothing.");
  5565. }
  5566. return false;
  5567. }
  5568. }
  5569. });
  5570. ActionWear.checkIsHeld = ActionWear.check.createAndAddRule({
  5571. name: "Is noun held",
  5572. firstPriority: Rule.PRIORITY_HIGH,
  5573. code: async (runner) => {
  5574. let action = runner.noun;
  5575. let noun = action.getClothing();
  5576. if (!Thing.CarryRelation.isRight(action.actor, noun)) {
  5577. if (action.actor == WorldState.player) {
  5578. action.say.add("(first taking the ", noun, ")", Say.LINE_BREAK);
  5579. }
  5580. let takingAction = new ActionTake(action.actor, noun);
  5581. await takingAction.execute();
  5582. action.say.add(takingAction.say);
  5583. if (!Thing.CarryRelation.isRight(action.actor, noun)) {
  5584. return false;
  5585. }
  5586. }
  5587. }
  5588. });
  5589. ActionWear.carryDefault = ActionWear.carry.createAndAddRule({
  5590. name: "Set Clothing as Worn",
  5591. firstPriority: Rule.PRIORITY_MEDIUM,
  5592. code: (runner) => {
  5593. let action = runner.noun;
  5594. let noun = action.getClothing();
  5595. Thing.WearRelation.setRelation(action.actor, noun);
  5596. let actor = action.actor;
  5597. let thing = action.getNoun(0);
  5598. if (actor == WorldState.player) {
  5599. action.say.add(new SayBold(thing, ": "), "Worn.");
  5600. }
  5601. else {
  5602. action.say.add(new SayThe(), actor, " puts on ", new SayThe(), thing, ".");
  5603. }
  5604. }
  5605. });
  5606. Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
  5607. name: "Hyperlink - Wear",
  5608. firstPriority: Rule.PRIORITY_HIGHEST,
  5609. code: (rulebook) => {
  5610. let thing = rulebook.noun;
  5611. if (thing instanceof Clothing && !(Thing.WearRelation.isRight(WorldState.player, thing))) {
  5612. Elements.HyperlinkHandler.addAvailableAction("Wear", new ActionWear(WorldState.player, thing));
  5613. }
  5614. }
  5615. }));
  5616. Elements.InventoryHandler.LinkingThing.addRule(new Rule({
  5617. name: "Inventory - Wear",
  5618. firstPriority: Rule.PRIORITY_LOWEST,
  5619. code: (rulebook) => {
  5620. let thing = rulebook.noun;
  5621. if (thing instanceof Clothing && !(Thing.WearRelation.isRight(WorldState.player, thing))) {
  5622. Elements.InventoryHandler.printThingLink("W", new ActionWear(WorldState.player, thing));
  5623. }
  5624. }
  5625. }));
  5626. class Humanoid extends Person {
  5627. constructor(options) {
  5628. super(options);
  5629. this.breastVisibleSize = 0;
  5630. this.isBreastVisible = false;
  5631. this.isBreastTight = false;
  5632. this.isBreastLoose = false;
  5633. this.crotchVisibleSize = 0;
  5634. this.isCrotchVisible = false;
  5635. this.isCrotchTight = false;
  5636. this.buttVisibleSize = 0;
  5637. this.isButtVisible = false;
  5638. this.isButtTight = false;
  5639. this.isGenderCached = false;
  5640. this.isSluttinessCached = false;
  5641. this.uncoveredSlots = [];
  5642. this.addParts(new HumanoidSkin(), new HumanoidHead(), new HumanoidArms(), new HumanoidHands(), new HumanoidBreasts(), new HumanoidFeet(), new HumanoidTorso(), new HumanoidButt());
  5643. if (options.isMale) {
  5644. this.addMaleParts();
  5645. this.setGenderValue(25);
  5646. }
  5647. else {
  5648. this.addFemaleParts();
  5649. this.setGenderValue(75);
  5650. }
  5651. this.addGetAlterations((humanoid) => {
  5652. if (humanoid.isPlayer()) {
  5653. return {
  5654. HumanoidGender: humanoid.isMale() ? Humanoid.SEX_MALE :
  5655. humanoid.isFemale() ? Humanoid.SEX_FEMALE :
  5656. Humanoid.SEX_HERM
  5657. };
  5658. }
  5659. });
  5660. this.addSetAlterations((humanoid, changes) => {
  5661. if (humanoid.isPlayer()) {
  5662. humanoid.removeGenderedParts();
  5663. if (changes.HumanoidGender == Humanoid.SEX_MALE) {
  5664. humanoid.addMaleParts();
  5665. }
  5666. else if (changes.HumanoidGender == Humanoid.SEX_FEMALE) {
  5667. humanoid.addFemaleParts();
  5668. }
  5669. else {
  5670. humanoid.addMaleParts();
  5671. humanoid.addFemaleParts();
  5672. }
  5673. }
  5674. });
  5675. }
  5676. invalidateCaches() {
  5677. this.isGenderCached = false;
  5678. this.isSluttinessCached = false;
  5679. }
  5680. getGenderValue() {
  5681. if (!this.isSluttinessCached) {
  5682. this.updateCaches();
  5683. }
  5684. return this.cachedGenderValue;
  5685. }
  5686. getSluttiness() {
  5687. if (!this.isSluttinessCached) {
  5688. this.updateCaches();
  5689. }
  5690. return this.cachedSluttiness;
  5691. }
  5692. getBulges() {
  5693. if (!this.isGenderCached) {
  5694. this.updateCaches();
  5695. }
  5696. return this.cachedBulges;
  5697. }
  5698. updateCaches() {
  5699. this.updateClothing();
  5700. this.updateSlots();
  5701. this.updateBodyparts();
  5702. this.updateBulges();
  5703. this.updateGenderValue();
  5704. this.updateSluttiness();
  5705. }
  5706. updateSlots() {
  5707. this.uncoveredSlots = [];
  5708. for (let i = 0; i < Humanoid.SLOT_SLOT_COUNT; i++) {
  5709. this.uncoveredSlots.push(i);
  5710. }
  5711. let clothing = Thing.WearRelation.getRightType(this, Clothing);
  5712. for (let i = 0; i < clothing.length; i++) {
  5713. let covering = clothing[i].getCoveringSlots();
  5714. for (let k = 0; k < covering.length; k++) {
  5715. let idx = this.uncoveredSlots.indexOf(covering[k]);
  5716. if (idx >= 0) {
  5717. this.uncoveredSlots.splice(idx, 1);
  5718. }
  5719. }
  5720. if (this.uncoveredSlots.length == 0)
  5721. break;
  5722. }
  5723. }
  5724. updateGenderValue() {
  5725. let clothingGender = Clothing.getGenderValueOn(this);
  5726. let bodypartGender = Bodypart.getGenderValueOn(this);
  5727. let genderWeight = clothingGender.weight + bodypartGender.weight;
  5728. let genderValue = clothingGender.value + bodypartGender.value;
  5729. let correctionWeight = Bodypart.WEIGHT_HIGHEST;
  5730. let correctionValue = this.getStat(Attributes.GenderIdentity) * Bodypart.WEIGHT_HIGHEST;
  5731. let hasPenis = false;
  5732. let hasVagina = false;
  5733. if (this.isCrotchVisible) {
  5734. if (Thing.PartRelation.getRightTypeOne(this, HumanoidPenis) != undefined) {
  5735. hasPenis = true;
  5736. hasVagina = false;
  5737. correctionValue += 0 * Bodypart.WEIGHT_LOWEST;
  5738. correctionWeight += Bodypart.WEIGHT_LOWEST;
  5739. }
  5740. else if (Thing.PartRelation.getRightTypeOne(this, HumanoidVagina) != undefined) {
  5741. hasPenis = false;
  5742. hasVagina = true;
  5743. correctionValue += 100 * Bodypart.WEIGHT_LOWEST;
  5744. correctionWeight += Bodypart.WEIGHT_LOWEST;
  5745. }
  5746. }
  5747. if (this.breastVisibleSize > 0) {
  5748. correctionValue += 100 * Bodypart.WEIGHT_LOWEST;
  5749. correctionWeight += Bodypart.WEIGHT_LOWEST;
  5750. }
  5751. if (this.crotchVisibleSize > 0 && !hasVagina) {
  5752. correctionValue += 0 * Bodypart.WEIGHT_LOWEST;
  5753. correctionWeight += Bodypart.WEIGHT_LOWEST;
  5754. }
  5755. let genderValueFinal = genderValue / genderWeight;
  5756. let genderValueCorrected = (genderValue + correctionValue) / (genderWeight + correctionWeight);
  5757. this.cachedGenderValue = {
  5758. hasTits: this.breastVisibleSize > 1,
  5759. hasPenisBulge: this.crotchVisibleSize > 0 && !hasVagina,
  5760. hasPenis: hasPenis,
  5761. hasVagina: hasVagina,
  5762. genderValue: genderValueFinal,
  5763. genderValueCorrected: genderValueCorrected
  5764. };
  5765. this.isGenderCached = true;
  5766. }
  5767. isVisibleOn(slot) {
  5768. return this.uncoveredSlots.indexOf(slot) != -1;
  5769. }
  5770. updateSluttiness() {
  5771. let clothingSluttiness = Clothing.getSluttinessValueOn(this);
  5772. let bodypartSluttiness = Bodypart.getSluttinessValueOn(this);
  5773. let sluttinessWeight = clothingSluttiness.weight + bodypartSluttiness.weight;
  5774. let sluttinessValue = clothingSluttiness.value + bodypartSluttiness.value;
  5775. let correctionWeight = 0;
  5776. let correctionValue = 0;
  5777. let somewhatSlutty = [Humanoid.SLOT_MIDRIFF, Humanoid.SLOT_LEG_UPPER, Humanoid.SLOT_WAIST, Humanoid.SLOT_HIPS, Humanoid.SLOT_BACK];
  5778. for (let i = 0; i < somewhatSlutty.length; i++) {
  5779. if (this.isVisibleOn(somewhatSlutty[i])) {
  5780. correctionWeight += 1;
  5781. correctionValue += 75;
  5782. }
  5783. }
  5784. let verySlutty = [Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT];
  5785. for (let i = 0; i < verySlutty.length; i++) {
  5786. if (this.isVisibleOn(verySlutty[i])) {
  5787. correctionWeight += 3;
  5788. correctionValue += 75;
  5789. }
  5790. }
  5791. if ((this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) > 0.75) {
  5792. let extremeSlutty = [Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT];
  5793. for (let i = 0; i < extremeSlutty.length; i++) {
  5794. if (this.isVisibleOn(extremeSlutty[i])) {
  5795. correctionWeight += 5;
  5796. correctionValue += 85;
  5797. }
  5798. }
  5799. }
  5800. let halfNaked;
  5801. let naked;
  5802. if (!this.isMale()) {
  5803. halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 &&
  5804. !this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]);
  5805. naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 &&
  5806. this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]);
  5807. }
  5808. else {
  5809. if (this.hasBreasts()) {
  5810. halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 &&
  5811. !this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]);
  5812. naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 &&
  5813. this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]);
  5814. }
  5815. else {
  5816. halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 &&
  5817. !this.isVisibleOnArray([Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]);
  5818. naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 &&
  5819. this.isVisibleOnArray([Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]);
  5820. }
  5821. }
  5822. let sluttinessValueFinal = sluttinessValue / sluttinessWeight;
  5823. let sluttinessCorrected = (sluttinessValue + correctionValue) / (sluttinessWeight + correctionWeight);
  5824. this.cachedSluttiness = {
  5825. halfNaked: halfNaked,
  5826. naked: naked,
  5827. sluttiness: sluttinessValueFinal,
  5828. sluttinessCorrected: sluttinessCorrected
  5829. };
  5830. this.isSluttinessCached = true;
  5831. }
  5832. isVisibleOnArray(arr) {
  5833. for (let i = 0; i < arr.length; i++) {
  5834. if (!this.isVisibleOn(arr[i])) {
  5835. return false;
  5836. }
  5837. }
  5838. return true;
  5839. }
  5840. addMaleParts() {
  5841. if (!this.isMale() && !this.isHerm()) {
  5842. this.addParts(new HumanoidTesticles(), new HumanoidPenis());
  5843. }
  5844. this.invalidateCaches();
  5845. }
  5846. addFemaleParts() {
  5847. if (!this.isFemale() && !this.isHerm()) {
  5848. this.addParts(new HumanoidVagina());
  5849. }
  5850. this.invalidateCaches();
  5851. }
  5852. removeGenderedParts() {
  5853. this.removeParts(HumanoidVagina);
  5854. this.removeParts(HumanoidPenis);
  5855. this.removeParts(HumanoidTesticles);
  5856. this.invalidateCaches();
  5857. }
  5858. setGenderValue(value) {
  5859. let bp = this.getParts(Bodypart);
  5860. for (let i = 0; i < bp.length; i++) {
  5861. if (bp[i] instanceof HumanoidBreasts && this.isMale()) {
  5862. bp[i].arrangeGenderValue(0);
  5863. }
  5864. else {
  5865. bp[i].arrangeGenderValue(value);
  5866. }
  5867. }
  5868. }
  5869. updateBodyparts() {
  5870. let parts = Thing.PartRelation.getRightType(this, Bodypart);
  5871. for (let i = 0; i < parts.length; i++) {
  5872. parts[i].updateStatus();
  5873. }
  5874. }
  5875. updateClothing() {
  5876. let clothes = Thing.WearRelation.getRightType(this, Clothing);
  5877. for (let i = 0; i < clothes.length; i++) {
  5878. clothes[i].updateStatus();
  5879. }
  5880. }
  5881. updateBulges() {
  5882. let clothes = Thing.WearRelation.getRightType(this, Clothing).sort(function (a, b) {
  5883. return a.layer - b.layer;
  5884. });
  5885. this.isBreastVisible = true;
  5886. this.isCrotchVisible = true;
  5887. this.isButtVisible = true;
  5888. let bras = [];
  5889. let butts = [];
  5890. let junks = [];
  5891. clothes.forEach((cloth) => {
  5892. cloth.updateStatus();
  5893. if (cloth.slots.indexOf(Humanoid.SLOT_BREASTS) != -1) {
  5894. bras.push(cloth);
  5895. if (cloth.transparentSlots.indexOf(Humanoid.SLOT_BREASTS) == -1) {
  5896. this.isBreastVisible = false;
  5897. }
  5898. }
  5899. if (cloth.slots.indexOf(Humanoid.SLOT_BUTT) != -1) {
  5900. butts.push(cloth);
  5901. if (cloth.transparentSlots.indexOf(Humanoid.SLOT_BUTT) == -1) {
  5902. this.isButtVisible = false;
  5903. }
  5904. }
  5905. if (cloth.slots.indexOf(Humanoid.SLOT_CROTCH_FRONT) != -1) {
  5906. junks.push(cloth);
  5907. if (cloth.transparentSlots.indexOf(Humanoid.SLOT_CROTCH_FRONT) == -1) {
  5908. this.isCrotchVisible = false;
  5909. }
  5910. }
  5911. });
  5912. this.updateBreastSizes(bras);
  5913. this.updateCrotchSizes(junks);
  5914. this.updateButtSizes(butts);
  5915. this.cachedBulges = {
  5916. breasts: this.breastVisibleSize,
  5917. butt: this.buttVisibleSize,
  5918. crotch: this.crotchVisibleSize,
  5919. waist: 0
  5920. };
  5921. }
  5922. getTopClothOn(slot) {
  5923. return Thing.WearRelation.getRightType(this, Clothing).filter(otherCloth => {
  5924. return otherCloth.visibleOn.includes(slot);
  5925. }).sort((a, b) => {
  5926. return a.layer - b.layer;
  5927. })[0];
  5928. }
  5929. updateBreastSizes(bras) {
  5930. this.isBreastTight = false;
  5931. this.isBreastLoose = true;
  5932. let breasts = Thing.PartRelation.getRightTypeOne(this, HumanoidBreasts);
  5933. this.breastVisibleSize = breasts.getSize();
  5934. bras.forEach((bra) => {
  5935. if (bra.tightBreastSize >= 0 && this.breastVisibleSize > bra.tightBreastSize) {
  5936. this.isBreastTight = true;
  5937. }
  5938. if (bra.maxBreastSize >= 0 && this.breastVisibleSize > bra.maxBreastSize) {
  5939. this.breastVisibleSize = bra.maxBreastSize;
  5940. }
  5941. if (this.breastVisibleSize >= bra.looseBreastSize) {
  5942. this.isBreastLoose = false;
  5943. }
  5944. this.breastVisibleSize += bra.breastPadding;
  5945. if (this.breastVisibleSize < 0) {
  5946. this.breastVisibleSize = 0;
  5947. }
  5948. });
  5949. }
  5950. updateCrotchSizes(cloths) {
  5951. this.isCrotchTight = false;
  5952. this.crotchVisibleSize = 0;
  5953. let penis = Thing.PartRelation.getRightTypeOne(this, HumanoidPenis);
  5954. let testicles = Thing.PartRelation.getRightTypeOne(this, HumanoidTesticles);
  5955. this.crotchVisibleSize = 0;
  5956. if (penis != undefined) {
  5957. this.crotchVisibleSize += penis.getBulgeSize();
  5958. }
  5959. if (testicles != undefined) {
  5960. this.crotchVisibleSize += testicles.getBulgeSize();
  5961. }
  5962. this.crotchVisibleSize = Math.floor(this.crotchVisibleSize * 10) / 10;
  5963. cloths.forEach((worn) => {
  5964. if (worn.tightCrotchSize >= 0 && this.crotchVisibleSize > worn.tightCrotchSize) {
  5965. this.isCrotchTight = true;
  5966. }
  5967. if (worn.maxCrotchSize >= 0 && this.crotchVisibleSize > worn.maxCrotchSize) {
  5968. this.crotchVisibleSize = worn.maxCrotchSize;
  5969. }
  5970. this.crotchVisibleSize += worn.crotchPadding;
  5971. if (this.crotchVisibleSize < 0) {
  5972. this.crotchVisibleSize = 0;
  5973. }
  5974. });
  5975. }
  5976. updateButtSizes(cloths) {
  5977. this.isButtTight = false;
  5978. let butt = Thing.PartRelation.getRightTypeOne(this, HumanoidButt);
  5979. this.buttVisibleSize = butt == undefined ? 0 : butt.getSize();
  5980. cloths.forEach((worn) => {
  5981. if (worn.tightButtSize >= 0 && this.buttVisibleSize > worn.tightButtSize) {
  5982. this.isButtTight = true;
  5983. }
  5984. if (worn.maxButtSize >= 0 && this.buttVisibleSize > worn.maxButtSize) {
  5985. this.buttVisibleSize = worn.maxButtSize;
  5986. }
  5987. this.buttVisibleSize += worn.buttPadding;
  5988. if (this.buttVisibleSize < 0) {
  5989. this.buttVisibleSize = 0;
  5990. }
  5991. });
  5992. }
  5993. hasBreasts() {
  5994. let breasts = this.getPart(HumanoidBreasts);
  5995. if (breasts.size > 1) {
  5996. return true;
  5997. }
  5998. return false;
  5999. }
  6000. isMale() {
  6001. return this.getParts(HumanoidPenis).length > 0 && this.getParts(HumanoidVagina).length == 0;
  6002. }
  6003. isFemale() {
  6004. return this.getParts(HumanoidPenis).length == 0 && this.getParts(HumanoidVagina).length > 0;
  6005. }
  6006. isHerm() {
  6007. return this.getParts(HumanoidPenis).length > 0 && this.getParts(HumanoidVagina).length > 0;
  6008. }
  6009. getShortestDescription() {
  6010. let playerGender = this.getGenderValue();
  6011. let playerSluttiness = this.getSluttiness();
  6012. let presentation = "";
  6013. if (playerSluttiness.sluttinessCorrected > 75) {
  6014. presentation += ("slutty, ");
  6015. }
  6016. else if (playerSluttiness.sluttinessCorrected > 35) {
  6017. }
  6018. else if (playerSluttiness.sluttinessCorrected > 20) {
  6019. presentation += ("prude, ");
  6020. }
  6021. else {
  6022. presentation += ("saintly, ");
  6023. }
  6024. if (playerGender.genderValueCorrected < 40) {
  6025. presentation += ("masculine ");
  6026. }
  6027. else if (playerGender.genderValueCorrected < 60) {
  6028. presentation += ("androgynous ");
  6029. }
  6030. else {
  6031. presentation += ("feminine ");
  6032. }
  6033. if (playerGender.hasTits) {
  6034. if (playerGender.hasPenis || playerGender.hasPenisBulge) {
  6035. presentation += ("shemale");
  6036. }
  6037. else if (playerGender.hasVagina) {
  6038. presentation += ("woman");
  6039. }
  6040. }
  6041. else {
  6042. if (playerGender.hasPenis) {
  6043. if (playerGender.genderValueCorrected < 60) {
  6044. presentation += ("man");
  6045. }
  6046. else {
  6047. presentation += ("trap");
  6048. }
  6049. }
  6050. else if (playerGender.hasPenisBulge) {
  6051. if (playerGender.genderValueCorrected < 60) {
  6052. presentation += ("man");
  6053. }
  6054. else {
  6055. presentation += ("trap");
  6056. }
  6057. }
  6058. else if (playerGender.hasVagina) {
  6059. presentation += ("woman");
  6060. }
  6061. }
  6062. return presentation;
  6063. }
  6064. static getPlayerDescription() {
  6065. let say = new Say();
  6066. say.add("You are ");
  6067. let player = WorldState.player;
  6068. let male = player.getParts(HumanoidPenis).length > 0;
  6069. let female = player.getParts(HumanoidVagina).length > 0;
  6070. if (male && female) {
  6071. say.add("hermaphrodite");
  6072. }
  6073. else if (male) {
  6074. say.add("male");
  6075. }
  6076. else {
  6077. say.add("female");
  6078. }
  6079. say.add(". You are presenting as ", new SayAn(), player.getShortestDescription() + ". ");
  6080. say.add(Attributes.GenderIdentity.getDescription(player.getStat(Attributes.GenderIdentity)));
  6081. let sv = player.getSluttiness();
  6082. let bulges = player.getBulges();
  6083. let coveredPerc = 1 - (player.uncoveredSlots.length / Humanoid.SLOT_SLOT_COUNT);
  6084. say.add(" ", player.getPart(HumanoidSkin).getDescription());
  6085. if (sv.halfNaked) {
  6086. say.add(" You are almost naked. ");
  6087. }
  6088. else if (sv.naked) {
  6089. say.add(" You are naked. ");
  6090. }
  6091. else if (coveredPerc < 0.2) {
  6092. say.add("You are not showing much of it, though.");
  6093. }
  6094. say.add(Attributes.Degeneration.getDescription(player.getStat(Attributes.Degeneration)));
  6095. say.add(Say.PARAGRAPH_BREAK);
  6096. say.add(player.getPart(HumanoidArms).getDescription(), " ");
  6097. say.add(player.getPart(HumanoidHands).getDescription(), " ");
  6098. say.add(player.getPart(HumanoidFeet).getDescription(), " ");
  6099. let penis = player.getPart(HumanoidPenis);
  6100. let vagina = player.getPart(HumanoidVagina);
  6101. if (penis != undefined) {
  6102. say.add("You have a ", penis.getSizeText(), (penis.isFlaccid() ? " flaccid " : " erect "), Say.COCK, " between your legs");
  6103. if (!penis.isBig() && penis.isGrower() && penis.isFlaccid()) {
  6104. say.add(", which is okay, since you're a grower, not a shower");
  6105. }
  6106. if (penis.isUncovered()) {
  6107. let oneOf = new OneOf(OneOf.PURELY_AT_RANDOM, ...[
  6108. ", it is not covered by any clothing",
  6109. ", it is not covered by any clothes",
  6110. ", it is uncovered",
  6111. ", it is visible to all",
  6112. ", it is hanging freely"
  6113. ]);
  6114. say.add(oneOf.getOne());
  6115. }
  6116. let testicles = player.getPart(HumanoidTesticles);
  6117. if (HumanoidPenis.getSizeText(bulges.crotch) != HumanoidPenis.getSizeText(penis.getBulgeSize() + testicles.getBulgeSize())) {
  6118. say.add(", but it looks like it's actually ", HumanoidPenis.getSizeText(bulges.crotch), " due to your clothing");
  6119. }
  6120. say.add(". ");
  6121. if (testicles != undefined) {
  6122. }
  6123. }
  6124. else {
  6125. say.add(vagina.getDescription());
  6126. }
  6127. say.add(" ");
  6128. let breasts = player.getPart(HumanoidBreasts);
  6129. let butt = player.getPart(HumanoidButt);
  6130. say.add("You have ", breasts.getSizeText(), " breasts and a ", butt.getSizeText(), " butt.");
  6131. if (bulges.breasts != breasts.getSize() && bulges.butt != butt.getSize()) {
  6132. say.add(" Your clothing makes your breasts look like they're actually ", HumanoidBreasts.getSizeText(bulges.breasts), " and make your butt appear ", HumanoidButt.getSizeText(bulges.butt), ".");
  6133. }
  6134. else if (bulges.breasts != breasts.getSize()) {
  6135. say.add(" Your clothing makes your breasts look like they're actually ", HumanoidBreasts.getSizeText(bulges.breasts), ".");
  6136. }
  6137. else if (bulges.butt != butt.getSize()) {
  6138. say.add(" Your clothing makes your butt appear ", HumanoidButt.getSizeText(bulges.butt), ".");
  6139. }
  6140. say.add(Say.PARAGRAPH_BREAK);
  6141. let clothingSluttiness = Clothing.getSluttinessValueOn(player);
  6142. let bodypartSluttiness = Bodypart.getSluttinessValueOn(player);
  6143. if (clothingSluttiness.weight > 0) {
  6144. let clothingSluttinessFinal = clothingSluttiness.value / clothingSluttiness.weight;
  6145. if (clothingSluttinessFinal > 75) {
  6146. say.add("Your outfit can only be described as \"whore-ish\", it is far too nasty.");
  6147. }
  6148. else if (clothingSluttinessFinal > 60) {
  6149. say.add("Your clothing are obviously making you look a bit naughty.");
  6150. }
  6151. else if (clothingSluttinessFinal < 30 && sv.sluttinessCorrected < 30) {
  6152. say.add("Your clothing are definitely a bit prude.");
  6153. }
  6154. else if (clothingSluttinessFinal < 15 && sv.sluttinessCorrected < 30) {
  6155. say.add("Your outfit is so prude that it could be worn by a saint.");
  6156. }
  6157. }
  6158. say.add(" ");
  6159. if (bodypartSluttiness.weight > 0) {
  6160. let bodypartSluttinessFinal = bodypartSluttiness.value / bodypartSluttiness.weight;
  6161. if (bodypartSluttinessFinal > 75) {
  6162. say.add("The way your body is makes you look like you were made purely for sex");
  6163. if (coveredPerc > 0.7) {
  6164. say.add(", thankfully it's mostly covered");
  6165. }
  6166. else if (coveredPerc < 0.2) {
  6167. say.add(", and you didn't even bother covering it up");
  6168. }
  6169. say.add(".");
  6170. }
  6171. else if (bodypartSluttinessFinal > 60) {
  6172. say.add("Your body definitely has a lot of sex-appeal going on");
  6173. if (coveredPerc > 0.7) {
  6174. say.add(", although it's covered");
  6175. }
  6176. else if (coveredPerc < 0.2) {
  6177. say.add(", proudly displayed for all to see");
  6178. }
  6179. say.add(".");
  6180. }
  6181. else if (bodypartSluttinessFinal < 30) {
  6182. say.add("You have very little sex-appeal, maybe you are a kitchen table?");
  6183. if (coveredPerc > 0.7) {
  6184. say.add(" At least you covered it up.");
  6185. }
  6186. else if (coveredPerc < 0.2) {
  6187. say.add(" Maybe you could cover it up a bit.");
  6188. }
  6189. }
  6190. }
  6191. say.add(Say.PARAGRAPH_BREAK);
  6192. let stats = new SayLeftRight();
  6193. stats.addLeft(new SayBold("Strength: "), Attributes.Strength.getDescription(player.getStat(Attributes.Strength)));
  6194. stats.addLeft(Say.LINE_BREAK);
  6195. stats.addLeft(new SayBold("Agility: "), Attributes.Agility.getDescription(player.getStat(Attributes.Agility)));
  6196. stats.addLeft(Say.LINE_BREAK);
  6197. stats.addLeft(new SayBold("Charm: "), Attributes.Charm.getDescription(player.getStat(Attributes.Charm)));
  6198. stats.addLeft(Say.LINE_BREAK);
  6199. stats.addLeft(new SayBold("Intelligence: "), Attributes.Intelligence.getDescription(player.getStat(Attributes.Intelligence)));
  6200. Skill.getSkills().forEach((skill) => {
  6201. if (player.getSkill(skill) > 0) {
  6202. stats.addRight(new SayBold(skill.id + ": "), skill.getDescription(player.getSkill(skill)));
  6203. }
  6204. });
  6205. say.add(stats);
  6206. return say;
  6207. }
  6208. }
  6209. Humanoid.SEX_MALE = 0;
  6210. Humanoid.SEX_FEMALE = 1;
  6211. Humanoid.SEX_HERM = 2;
  6212. Humanoid.SLOT_HAIR = 0;
  6213. Humanoid.SLOT_HEADGEAR = 1;
  6214. Humanoid.SLOT_FACE = 2;
  6215. Humanoid.SLOT_EARS = 3;
  6216. Humanoid.SLOT_EYES = 4;
  6217. Humanoid.SLOT_NOSE = 5;
  6218. Humanoid.SLOT_MOUTH = 6;
  6219. Humanoid.SLOT_NECK = 7;
  6220. Humanoid.SLOT_SHOULDERS = 8;
  6221. Humanoid.SLOT_ARMS = 9;
  6222. Humanoid.SLOT_HANDS = 10;
  6223. Humanoid.SLOT_FINGERS = 11;
  6224. Humanoid.SLOT_FINGERNAILS = 12;
  6225. Humanoid.SLOT_UPPER_CHEST = 13;
  6226. Humanoid.SLOT_MIDRIFF = 14;
  6227. Humanoid.SLOT_WAIST = 15;
  6228. Humanoid.SLOT_BACK = 16;
  6229. Humanoid.SLOT_HIPS = 17;
  6230. Humanoid.SLOT_CROTCH_FRONT = 18;
  6231. Humanoid.SLOT_CROTCH_BACK = 19;
  6232. Humanoid.SLOT_BUTT = 20;
  6233. Humanoid.SLOT_LEG_UPPER = 21;
  6234. Humanoid.SLOT_LEG_LOWER = 22;
  6235. Humanoid.SLOT_FEET = 23;
  6236. Humanoid.SLOT_FEET_NAILS = 24;
  6237. Humanoid.SLOT_BREASTS = 25;
  6238. Humanoid.SLOT_SLOT_COUNT = 26;
  6239. Humanoid.cacheInvalidationActionRule = new Rule({
  6240. name: "Invalidate humanoid caches",
  6241. firstPriority: Rule.PRIORITY_LOWEST,
  6242. code: (runner) => {
  6243. runner.noun.actor.invalidateCaches();
  6244. },
  6245. conditions: (runner) => {
  6246. return runner.noun.actor instanceof Humanoid;
  6247. }
  6248. });
  6249. ActionWear.carry.addRule(Humanoid.cacheInvalidationActionRule);
  6250. ActionRemove.carry.addRule(Humanoid.cacheInvalidationActionRule);
  6251. var WorldState;
  6252. (function (WorldState) {
  6253. var worldTurn = 0;
  6254. var playerTurn = 0;
  6255. WorldState.player = new Humanoid({ isMale: false });
  6256. WorldState.player.description = Humanoid.getPlayerDescription;
  6257. var rememberedRooms = new StoredVariable({
  6258. id: "Remembered Rooms",
  6259. value: []
  6260. });
  6261. var rememberedFodder = [];
  6262. let rememberedRoomsForIntelligence = 2;
  6263. let rememberedRoomsForSurvival = 1;
  6264. WorldState.RememberingRoomRulebook = new Rulebook("Remembering Room something");
  6265. function isTurnWaiting() {
  6266. return worldTurn < playerTurn;
  6267. }
  6268. WorldState.isTurnWaiting = isTurnWaiting;
  6269. function incrementWorldTurn() {
  6270. worldTurn++;
  6271. }
  6272. WorldState.incrementWorldTurn = incrementWorldTurn;
  6273. function incrementPlayerTurn() {
  6274. playerTurn++;
  6275. }
  6276. WorldState.incrementPlayerTurn = incrementPlayerTurn;
  6277. function getCurrentTurn() {
  6278. return playerTurn;
  6279. }
  6280. WorldState.getCurrentTurn = getCurrentTurn;
  6281. function setCurrentTurn(turn) {
  6282. playerTurn = turn;
  6283. worldTurn = turn;
  6284. }
  6285. WorldState.setCurrentTurn = setCurrentTurn;
  6286. WorldState.RememberingRoomInList = WorldState.RememberingRoomRulebook.createAndAddRule({
  6287. name: "Is room listed in remembered rooms?",
  6288. firstPriority: Rule.PRIORITY_LOWEST,
  6289. priority: Rule.PRIORITY_LOW,
  6290. code: runner => {
  6291. if (rememberedRooms.value.indexOf(runner.noun.getName()) != -1 || rememberedFodder.indexOf(runner.noun) != -1) {
  6292. return true;
  6293. }
  6294. }
  6295. });
  6296. WorldState.RememberingRoomInMap = WorldState.RememberingRoomRulebook.createAndAddRule({
  6297. name: "Is room shown on a map?",
  6298. firstPriority: Rule.PRIORITY_LOWEST,
  6299. priority: Rule.PRIORITY_LOWEST,
  6300. code: runner => {
  6301. let maps = Thing.CarryRelation.getRightType(WorldState.player, MapNote);
  6302. for (let i = 0; i < maps.length; i++) {
  6303. if (maps[i].contains(runner.noun)) {
  6304. return true;
  6305. }
  6306. }
  6307. }
  6308. });
  6309. async function isRoomRemembered(room) {
  6310. let result = await WorldState.RememberingRoomRulebook.execute({ noun: room });
  6311. return result == true;
  6312. }
  6313. WorldState.isRoomRemembered = isRoomRemembered;
  6314. function getRememberedRooms() {
  6315. return rememberedRooms.value;
  6316. }
  6317. WorldState.getRememberedRooms = getRememberedRooms;
  6318. function getRememberedRoomsAsRooms() {
  6319. let rooms = [];
  6320. rememberedRooms.value.forEach(roomName => {
  6321. let room = Room.getRoom(roomName);
  6322. if (room != undefined)
  6323. rooms.push(room);
  6324. });
  6325. return rooms;
  6326. }
  6327. WorldState.getRememberedRoomsAsRooms = getRememberedRoomsAsRooms;
  6328. function getMaximumRememberedRooms() {
  6329. let intRooms = WorldState.player.getStat(Attributes.Intelligence) * rememberedRoomsForIntelligence;
  6330. let skillRooms = WorldState.player.getSkill(Skills.Survival) * rememberedRoomsForSurvival;
  6331. return intRooms + skillRooms;
  6332. }
  6333. WorldState.getMaximumRememberedRooms = getMaximumRememberedRooms;
  6334. function truncateRooms() {
  6335. while (rememberedRooms.value.length > getMaximumRememberedRooms()) {
  6336. rememberedRooms.value.pop();
  6337. }
  6338. }
  6339. WorldState.truncateRooms = truncateRooms;
  6340. function rememberRoom(...rooms) {
  6341. rooms.forEach((value) => {
  6342. if (value instanceof Room) {
  6343. if (value.fodder) {
  6344. if (rememberedFodder.indexOf(value) == -1) {
  6345. rememberedFodder.push(value);
  6346. }
  6347. }
  6348. else {
  6349. let idx = rememberedRooms.value.indexOf(value.getName());
  6350. if (idx != -1) {
  6351. rememberedRooms.value.splice(idx, 1);
  6352. }
  6353. rememberedRooms.value.unshift(value.getName());
  6354. }
  6355. }
  6356. });
  6357. truncateRooms();
  6358. }
  6359. WorldState.rememberRoom = rememberRoom;
  6360. function saveState() {
  6361. let things = {
  6362. carried: [],
  6363. worn: [],
  6364. wielded: []
  6365. };
  6366. return {
  6367. Things: things
  6368. };
  6369. }
  6370. WorldState.saveState = saveState;
  6371. WorldState.CorrectRememberedRoomsRule = PlayBegins.rulebook.createAndAddRule({
  6372. name: "Correct remembered rooms",
  6373. firstPriority: Rule.PRIORITY_LOWEST,
  6374. priority: Rule.PRIORITY_MEDIUM,
  6375. code: () => {
  6376. let allRooms = rememberedRooms.value;
  6377. let currentRoom = WorldState.player.getRoom();
  6378. if (allRooms.length == 0) {
  6379. rememberedRooms.value = [currentRoom.getName()];
  6380. return;
  6381. }
  6382. let newRooms = [];
  6383. function recursivelyAddRooms(room) {
  6384. if (room instanceof RoomRandom) {
  6385. if (room.fodder) {
  6386. rememberedFodder.push(room);
  6387. room.connections.forEach((newRoom) => {
  6388. recursivelyAddRooms(newRoom);
  6389. });
  6390. }
  6391. else if (allRooms.indexOf(room.getName()) != -1 && newRooms.indexOf(room.getName()) == -1) {
  6392. newRooms.push(room.getName());
  6393. room.connections.forEach((newRoom) => {
  6394. recursivelyAddRooms(newRoom);
  6395. });
  6396. }
  6397. }
  6398. }
  6399. recursivelyAddRooms(currentRoom);
  6400. rememberedRooms.value = newRooms;
  6401. }
  6402. });
  6403. })(WorldState || (WorldState = {}));
  6404. class Region {
  6405. constructor(name) {
  6406. this.name = name;
  6407. }
  6408. place(...rooms) {
  6409. rooms.forEach(room => {
  6410. if (room instanceof Room) {
  6411. Region.RegionRoom.setRelation(this, room);
  6412. }
  6413. else {
  6414. Region.RegionRegion.setRelation(this, room);
  6415. }
  6416. });
  6417. }
  6418. getRooms() {
  6419. let rooms = Region.RegionRoom.getRight(this);
  6420. Region.RegionRegion.getRight(this).forEach((region) => {
  6421. Region.RegionRoom.getRight(region).forEach((room) => {
  6422. rooms.push(room);
  6423. });
  6424. });
  6425. return rooms;
  6426. }
  6427. containsRoom(room) {
  6428. let directlyContained = Region.RegionRoom.getLeft(room) == this;
  6429. if (directlyContained) {
  6430. return true;
  6431. }
  6432. else if (Region.RegionRegion.getLeft(this) != undefined) {
  6433. return this.getRooms().indexOf(room) != -1;
  6434. }
  6435. return false;
  6436. }
  6437. contains(thing) {
  6438. let room = thing.getRoom();
  6439. if (room == undefined) {
  6440. return false;
  6441. }
  6442. else {
  6443. let regions = Region.InRelation.getAllLeft(room);
  6444. return regions.indexOf(this) != -1;
  6445. }
  6446. }
  6447. }
  6448. Region.RegionRoom = new RelationOneToMany();
  6449. Region.RegionRegion = new RelationOneToMany();
  6450. Region.InRelation = new RelationHandlerStrictOneToMany(Region.RegionRegion, Region.RegionRoom);
  6451. class Shuffler {
  6452. constructor(array, rng) {
  6453. this.position = 0;
  6454. this.rng = rng == undefined ? Math.random : rng;
  6455. this.array = array;
  6456. }
  6457. restart() {
  6458. this.position = 0;
  6459. }
  6460. getOne() {
  6461. if (this.position >= this.array.length) {
  6462. return undefined;
  6463. }
  6464. let randomIndex = Math.floor(this.rng() * (this.array.length - this.position)) + this.position;
  6465. let localCopy = this.array[this.position];
  6466. this.array[this.position] = this.array[randomIndex];
  6467. this.array[randomIndex] = localCopy;
  6468. return this.array[this.position++];
  6469. }
  6470. getShuffled() {
  6471. let array = this.array.slice(0);
  6472. var m = array.length, t, i;
  6473. while (m) {
  6474. i = Math.floor(this.rng() * m--);
  6475. t = array[m];
  6476. array[m] = array[i];
  6477. array[i] = t;
  6478. }
  6479. return array;
  6480. }
  6481. }
  6482. var AIRules;
  6483. (function (AIRules) {
  6484. AIRules.PickShiny = AI.rules.createAndAddRule({
  6485. name: "Pick Shinies",
  6486. firstPriority: AIRules.PRIORITY_ACTING_ON_PLACE,
  6487. conditions: (runner) => {
  6488. let person = runner.noun;
  6489. return person.AI.picksShinies;
  6490. },
  6491. code: (runner) => {
  6492. let person = runner.noun;
  6493. let room = person.getRoom();
  6494. let visibleThings = room.getContainedAndVisibleTo(person);
  6495. if (visibleThings.length > 0) {
  6496. for (let i = 0; i < visibleThings.length; i++) {
  6497. if (!visibleThings[i].fixedInPlace && visibleThings[i].getShiny()) {
  6498. return new ActionTake(person, visibleThings[i]);
  6499. }
  6500. }
  6501. }
  6502. }
  6503. });
  6504. })(AIRules || (AIRules = {}));
  6505. var AIRules;
  6506. (function (AIRules) {
  6507. AIRules.Wander = AI.rules.createAndAddRule({
  6508. name: "Wander",
  6509. firstPriority: AIRules.PRIORITY_ACTING_ON_IDLE,
  6510. conditions: (runner) => {
  6511. let person = runner.noun;
  6512. return person.AI.wanderer && (Math.random() * 100) > person.AI.wanderChance;
  6513. },
  6514. code: (runner) => {
  6515. let person = runner.noun;
  6516. let room = person.getRoom();
  6517. if (person.AI.wandersOn != undefined) {
  6518. if (person.AI.wandersOn.containsRoom(room)) {
  6519. let connections = room.connections.slice();
  6520. let realConnections = [];
  6521. for (let i = 0; i < connections.length; i++) {
  6522. if (connections[i] != undefined && person.AI.wandersOn.containsRoom(connections[i])) {
  6523. realConnections.push(i);
  6524. }
  6525. }
  6526. let direction = ((new Shuffler(realConnections)).getOne());
  6527. return new ActionGo(person, direction);
  6528. }
  6529. else {
  6530. let regionRooms = person.AI.wandersOn.getRooms().filter((a) => {
  6531. if (a instanceof RoomRandom && a.placed) {
  6532. return true;
  6533. }
  6534. });
  6535. regionRooms.sort((a, b) => {
  6536. let dist = a.getDistanceTo(b);
  6537. if (dist != undefined) {
  6538. return -dist;
  6539. }
  6540. else {
  6541. return 0;
  6542. }
  6543. });
  6544. let targetRoom = regionRooms.pop();
  6545. return new ActionGo(person, targetRoom);
  6546. }
  6547. }
  6548. else {
  6549. let direction = room.getConnectedDirection();
  6550. return new ActionGo(person, direction);
  6551. }
  6552. }
  6553. });
  6554. })(AIRules || (AIRules = {}));
  6555. class ActionDrop extends Action {
  6556. getCommandText() {
  6557. return "drop " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
  6558. }
  6559. }
  6560. ActionDrop.check = new Rulebook("Check Dropping");
  6561. ActionDrop.carry = new Rulebook("Carry out Dropping");
  6562. ActionDrop.check.addRule(new Rule({
  6563. name: "Check Dropping - Are you Wearing it?",
  6564. firstPriority: Rule.PRIORITY_LOWEST,
  6565. code: async (rulebook) => {
  6566. let action = rulebook.noun;
  6567. let actor = action.actor;
  6568. let thing = action.getNoun(0);
  6569. if (Thing.WearRelation.getLeft(thing) == actor || Thing.WieldRelation.getLeft(thing) == actor) {
  6570. if (action.actor == WorldState.player) {
  6571. action.say.add("(first taking off the ", thing, ")", Say.LINE_BREAK);
  6572. }
  6573. let takingAction = new ActionRemove(actor, thing);
  6574. await takingAction.execute();
  6575. action.say.add(takingAction.say);
  6576. if (Thing.WearRelation.getLeft(thing) == actor || Thing.WieldRelation.getLeft(thing) == actor) {
  6577. return false;
  6578. }
  6579. action.say.add(Say.LINE_BREAK);
  6580. }
  6581. }
  6582. }));
  6583. ActionDrop.check.addRule(new Rule({
  6584. name: "Check Dropping - Do you have it??",
  6585. firstPriority: Rule.PRIORITY_LOWEST,
  6586. code: (rulebook) => {
  6587. let action = rulebook.noun;
  6588. let actor = action.actor;
  6589. let thing = action.getNoun(0);
  6590. if (Thing.CarryRelation.getLeft(thing) != actor) {
  6591. if (actor == WorldState.player) {
  6592. action.say.add("You don't have it.");
  6593. }
  6594. return false;
  6595. }
  6596. }
  6597. }));
  6598. ActionDrop.carry.addRule(new Rule({
  6599. name: "Dropping - Place the noun on the floor",
  6600. code: (rulebook) => {
  6601. let action = rulebook.noun;
  6602. let actor = action.actor;
  6603. let thing = action.getNoun(0);
  6604. Thing.EnclosedRelation.unsetRight(thing);
  6605. actor.getRoom().place(thing);
  6606. if (actor == WorldState.player) {
  6607. action.say.add(new SayBold(action.getNoun(0).getPrintedName() + ": "), "Dropped.");
  6608. }
  6609. else {
  6610. action.say.add(new SayThe(), actor, " drops ", new SayThe(), action.getNoun(0), " on the floor.");
  6611. }
  6612. }
  6613. }));
  6614. Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
  6615. name: "Hyperlink - Drop",
  6616. firstPriority: Rule.PRIORITY_HIGHEST,
  6617. code: (rulebook) => {
  6618. let thing = rulebook.noun;
  6619. if (Thing.CarryRelation.getLeft(thing) == WorldState.player || Thing.WieldRelation.getLeft(thing) == WorldState.player || Thing.WearRelation.getLeft(thing) == WorldState.player) {
  6620. Elements.HyperlinkHandler.addAvailableAction("Drop", new ActionDrop(WorldState.player, thing));
  6621. }
  6622. }
  6623. }));
  6624. Elements.InventoryHandler.LinkingThing.addRule(new Rule({
  6625. name: "Inventory - Drop",
  6626. firstPriority: Rule.PRIORITY_LOWEST,
  6627. code: (rulebook) => {
  6628. let thing = rulebook.noun;
  6629. Elements.InventoryHandler.printThingLink("D", new ActionDrop(WorldState.player, thing));
  6630. }
  6631. }));
  6632. class ActionInventory extends Action {
  6633. constructor() {
  6634. super(...arguments);
  6635. this.requiresTurn = false;
  6636. this.requiresNoun = false;
  6637. this.requiresVisibility = false;
  6638. }
  6639. getCommandText() {
  6640. return "take inventory";
  6641. }
  6642. static async createButton(thing, resolve) {
  6643. let p = document.createElement("p");
  6644. p.classList.add("choice");
  6645. let elements = await ((new Say(thing)).getPureElements());
  6646. elements.forEach(ele => {
  6647. p.appendChild(ele);
  6648. });
  6649. p.addEventListener("click", () => {
  6650. resolve(thing);
  6651. });
  6652. Controls.KeyHandler.applyCode(p, Controls.KeyHandler.getFirstKeyCode());
  6653. return p;
  6654. }
  6655. }
  6656. ActionInventory.check = new Rulebook("Check Taking Inventory");
  6657. ActionInventory.carry = new Rulebook("Carry out Taking Inventory");
  6658. ActionInventory.checkInventoryRule = ActionInventory.check.createAndAddRule({
  6659. name: "List inventory as options",
  6660. code: async (rulebook) => {
  6661. let player = WorldState.player;
  6662. let wielded = Thing.WieldRelation.getRight(player).sort(Elements.InventoryHandler.thingSort);
  6663. let worn = Thing.WearRelation.getRight(player).sort(Elements.InventoryHandler.thingSort);
  6664. let carried = Thing.CarryRelation.getRight(player).sort(Elements.InventoryHandler.thingSort);
  6665. let buttons;
  6666. let chosenPromise = new Promise((async (resolve) => {
  6667. Controls.KeyHandler.reset();
  6668. let say = new Say();
  6669. if (wielded.length > 0) {
  6670. say.add(new SayBold("Wielded:"), Say.LINE_BREAK);
  6671. for (let i = 0; i < wielded.length; i++) {
  6672. say.add(await ActionInventory.createButton(wielded[i], resolve));
  6673. }
  6674. }
  6675. if (worn.length > 0) {
  6676. if (say.sequence.length > 0) {
  6677. say.add(Say.PARAGRAPH_BREAK);
  6678. }
  6679. say.add(new SayBold("Worn:"), Say.LINE_BREAK);
  6680. for (let i = 0; i < worn.length; i++) {
  6681. say.add(await ActionInventory.createButton(worn[i], resolve));
  6682. }
  6683. }
  6684. if (carried.length > 0) {
  6685. if (say.sequence.length > 0) {
  6686. say.add(Say.PARAGRAPH_BREAK);
  6687. }
  6688. say.add(new SayBold("Carried:"), Say.LINE_BREAK);
  6689. for (let i = 0; i < carried.length; i++) {
  6690. say.add(await ActionInventory.createButton(carried[i], resolve));
  6691. }
  6692. }
  6693. if (say.sequence.length == 0) {
  6694. return resolve(undefined);
  6695. }
  6696. buttons = await say.getHTMLContent();
  6697. Elements.CurrentTurnHandler.print(...(buttons));
  6698. }));
  6699. let chosenThing = await chosenPromise;
  6700. if (chosenThing != undefined) {
  6701. Elements.CurrentTurnHandler.unprint(...buttons);
  6702. Controls.KeyHandler.reset();
  6703. return new ActionExamine(WorldState.player, chosenThing);
  6704. }
  6705. else {
  6706. rulebook.noun.say.add("You have nothing.");
  6707. return false;
  6708. }
  6709. }
  6710. });
  6711. Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
  6712. name: "Add Take Inventory Command Rule",
  6713. firstPriority: Rule.PRIORITY_LOWEST,
  6714. priority: Rule.PRIORITY_MEDIUM,
  6715. code: (rulebook) => {
  6716. Elements.HyperlinkHandler.addCommonAction("Inventory", new ActionInventory(WorldState.player));
  6717. }
  6718. }));
  6719. class ActionSaveGame extends Action {
  6720. constructor() {
  6721. super(...arguments);
  6722. this.requiresTurn = false;
  6723. this.requiresNoun = false;
  6724. this.requiresVisibility = false;
  6725. }
  6726. getCommandText() {
  6727. return "save to file";
  6728. }
  6729. }
  6730. ActionSaveGame.check = new Rulebook("Check Saving");
  6731. ActionSaveGame.carry = new Rulebook("Carry out Saving");
  6732. ActionSaveGame.carry.addRule(new Rule({
  6733. name: "Save the game",
  6734. code: runner => {
  6735. SaveHandler.saveToFile();
  6736. runner.noun.say.add("Saved.");
  6737. }
  6738. }));
  6739. Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
  6740. name: "Add Save Command Rule",
  6741. firstPriority: Rule.PRIORITY_LOWEST,
  6742. priority: Rule.PRIORITY_LOWEST,
  6743. code: (rulebook) => {
  6744. Elements.HyperlinkHandler.addCommonAction("Save", new ActionSaveGame(WorldState.player));
  6745. }
  6746. }));
  6747. class ActionTalk extends Action {
  6748. getCommandText() {
  6749. return "talk to " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
  6750. }
  6751. }
  6752. ActionTalk.PRIORITY_SITUATION_DIALOGUE = 9;
  6753. ActionTalk.PRIORITY_POSSESSION_DIALOGUE = 7;
  6754. ActionTalk.PRIORITY_LOCATION_DIALOGUE = 5;
  6755. ActionTalk.PRIORITY_COMMON_DIALOGUE = 3;
  6756. ActionTalk.PRIORITY_GLOBAL_DIALOGUE = 1;
  6757. ActionTalk.check = new Rulebook("Check Talking");
  6758. ActionTalk.carry = new Rulebook("Carry out Talking");
  6759. ActionTalk.defaultCarryTalkingRule = ActionTalk.carry.createAndAddRule({
  6760. name: "Talking - Doesn't want to talk",
  6761. firstPriority: -1,
  6762. priority: -1,
  6763. code: (rulebook) => {
  6764. let action = rulebook.noun;
  6765. let thing = action.getNoun(0);
  6766. if (thing instanceof Person) {
  6767. action.say = new Say("It doesn't look like ", new SayHeSheIt(thing), " wants to talk.");
  6768. }
  6769. else {
  6770. action.say = new Say("How are you going to talk to that?");
  6771. }
  6772. }
  6773. });
  6774. Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
  6775. name: "Hyperlink - Talk",
  6776. firstPriority: Rule.PRIORITY_HIGHEST,
  6777. code: (rulebook) => {
  6778. let thing = rulebook.noun;
  6779. if (thing instanceof Person && thing.getRoom() == WorldState.player.getRoom()) {
  6780. Elements.HyperlinkHandler.addAvailableAction("Talk", new ActionTalk(WorldState.player, thing));
  6781. }
  6782. }
  6783. }));
  6784. class ActionWait extends Action {
  6785. constructor() {
  6786. super(...arguments);
  6787. this.requiresTurn = true;
  6788. this.requiresNoun = false;
  6789. this.requiresVisibility = false;
  6790. }
  6791. getCommandText() {
  6792. return "wait";
  6793. }
  6794. }
  6795. ActionWait.check = new Rulebook("Check Waiting");
  6796. ActionWait.carry = new Rulebook("Carry out Waiting");
  6797. ActionWait.carry.addRule(new Rule({
  6798. name: "Print waiting message",
  6799. code: runner => {
  6800. if (runner.noun.actor == WorldState.player) {
  6801. runner.noun.say.add("You wait.");
  6802. }
  6803. }
  6804. }));
  6805. Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
  6806. name: "Add Wait Command Rule",
  6807. firstPriority: Rule.PRIORITY_HIGHEST,
  6808. priority: Rule.PRIORITY_MEDIUM,
  6809. code: (rulebook) => {
  6810. Elements.HyperlinkHandler.addCommonAction("Wait", new ActionWait(WorldState.player));
  6811. }
  6812. }));
  6813. class ContentDescription {
  6814. constructor(name, group) {
  6815. this.saidCount = 0;
  6816. this.name = name;
  6817. this.group = group;
  6818. }
  6819. getScore() {
  6820. return (this.group).getScore();
  6821. }
  6822. getDescription(group) {
  6823. this.saidCount++;
  6824. if (typeof this.description == "function") {
  6825. return this.description(this, group);
  6826. }
  6827. return this.description;
  6828. }
  6829. setDescription(description) {
  6830. if (!(description instanceof Say)) {
  6831. this.description = new Say(description);
  6832. }
  6833. else {
  6834. this.description = description;
  6835. }
  6836. return this;
  6837. }
  6838. static pickDescriptions(cda, target) {
  6839. let a = cda.slice();
  6840. let groups = [];
  6841. for (let i = 0; i < a.length; i++) {
  6842. let randomIndex = Math.floor(Math.random() * (a.length - i)) + i;
  6843. let temp = a[i];
  6844. a[i] = a[randomIndex];
  6845. a[randomIndex] = temp;
  6846. }
  6847. a.sort((a, b) => {
  6848. let scoreA = a.getScore() / (a.saidCount + 1);
  6849. let scoreB = b.getScore() / (b.saidCount + 1);
  6850. if (scoreA != scoreB)
  6851. return scoreB - scoreA;
  6852. return 0;
  6853. });
  6854. a.forEach(description => {
  6855. groups.push(description.group);
  6856. });
  6857. let matches = target.matchAgainst(groups);
  6858. if (matches != undefined) {
  6859. let result = [];
  6860. matches.forEach(i => {
  6861. result.push(a[i].getDescription(target));
  6862. result.push(new Say(" "));
  6863. });
  6864. return result;
  6865. }
  6866. else {
  6867. console.warn("No description available for", target);
  6868. return [new Say("Warning: No description available for the current situation. Please report so it can be corrected.")];
  6869. }
  6870. }
  6871. }
  6872. class ContentDifferential {
  6873. constructor(...nouns) {
  6874. this.nouns = [];
  6875. this.score = 0;
  6876. this.addNoun(...nouns);
  6877. }
  6878. addNoun(...nouns) {
  6879. nouns.forEach(noun => {
  6880. this.nouns.push(noun);
  6881. });
  6882. this.score = this.getScore();
  6883. return this;
  6884. }
  6885. getNouns() {
  6886. return this.nouns;
  6887. }
  6888. replaceNouns(...nouns) {
  6889. this.nouns = nouns;
  6890. return this;
  6891. }
  6892. isMatch(cd, allowPartial = false) {
  6893. let check = this.getUnmatched(cd);
  6894. if ((allowPartial || check.unmatched.length == 0) && check.matching.length == 0) {
  6895. return true;
  6896. }
  6897. else if (check.matching.length == 0) {
  6898. for (let i = 0; i < check.unmatched.length; i++) {
  6899. if (!(check.unmatched[i] instanceof ContentMarker)) {
  6900. return false;
  6901. }
  6902. else {
  6903. if (check.unmatched[i].isImportant()) {
  6904. return false;
  6905. }
  6906. }
  6907. }
  6908. return true;
  6909. }
  6910. return false;
  6911. }
  6912. getUnmatched(cd) {
  6913. let unmatched = cd.nouns.slice();
  6914. let matching = this.nouns.slice();
  6915. for (let i = matching.length - 1; i >= 0; i--) {
  6916. for (let k = unmatched.length - 1; k >= 0; k--) {
  6917. if (ContentDifferential.compareNouns(matching[i], unmatched[k])) {
  6918. unmatched.splice(k, 1);
  6919. matching.splice(i, 1);
  6920. break;
  6921. }
  6922. }
  6923. }
  6924. return {
  6925. matching: matching,
  6926. unmatched: unmatched
  6927. };
  6928. }
  6929. getScore() {
  6930. let highest = 0;
  6931. let count = this.nouns.length;
  6932. this.nouns.forEach((noun) => {
  6933. let level = ContentDifferential.getNounLevel(noun);
  6934. if (highest < level) {
  6935. highest = level;
  6936. }
  6937. });
  6938. return highest + (count / 100);
  6939. }
  6940. static getNounLevel(noun) {
  6941. if (noun == undefined || noun == null) {
  6942. return 0;
  6943. }
  6944. else if (typeof noun == "function") {
  6945. if (noun.prototype instanceof Thing) {
  6946. let specifity = 2;
  6947. let parentClass = Object.getPrototypeOf(noun);
  6948. while (parentClass != Thing) {
  6949. specifity += 0.1;
  6950. parentClass = Object.getPrototypeOf(parentClass);
  6951. }
  6952. return specifity;
  6953. }
  6954. else {
  6955. return 2.5;
  6956. }
  6957. }
  6958. else if (noun instanceof Thing) {
  6959. return 4;
  6960. }
  6961. else if (noun instanceof ContentDifferential) {
  6962. return 1;
  6963. }
  6964. else {
  6965. return 0.5;
  6966. }
  6967. }
  6968. static compareNouns(a, b) {
  6969. if (a == undefined || a == null) {
  6970. return true;
  6971. }
  6972. if (typeof a == "function") {
  6973. return b == a || b instanceof a || (typeof b == "function" && b.prototype instanceof a);
  6974. }
  6975. else if (a instanceof Thing) {
  6976. return b == a;
  6977. }
  6978. return a === b;
  6979. }
  6980. static isMatch(matchFrom, matchAgainst) {
  6981. let unmatched = matchAgainst.slice();
  6982. let matching = matchFrom.slice();
  6983. for (let i = matching.length - 1; i >= 0; i--) {
  6984. for (let k = unmatched.length - 1; k >= 0; k--) {
  6985. if (matching[i].isMatch(unmatched[k])) {
  6986. unmatched.splice(k, 1);
  6987. matching.splice(i, 1);
  6988. break;
  6989. }
  6990. }
  6991. }
  6992. if (unmatched.length == 0 && matching.length == 0) {
  6993. return true;
  6994. }
  6995. else if (unmatched.length == 0) {
  6996. for (let i = 0; i < matching.length; i++) {
  6997. let nouns = matching[i].getNouns();
  6998. for (let k = 0; k < nouns.length; k++) {
  6999. if (!(nouns[k] instanceof ContentMarker)) {
  7000. return false;
  7001. }
  7002. else {
  7003. if (nouns[k].isImportant()) {
  7004. return false;
  7005. }
  7006. }
  7007. }
  7008. }
  7009. return true;
  7010. }
  7011. return false;
  7012. }
  7013. }
  7014. var ContentGroupMatch;
  7015. (function (ContentGroupMatch) {
  7016. ContentGroupMatch[ContentGroupMatch["NO_MATCH"] = 0] = "NO_MATCH";
  7017. ContentGroupMatch[ContentGroupMatch["PARTIAL_MATCH"] = 1] = "PARTIAL_MATCH";
  7018. ContentGroupMatch[ContentGroupMatch["PERFECT_MATCH"] = 2] = "PERFECT_MATCH";
  7019. })(ContentGroupMatch || (ContentGroupMatch = {}));
  7020. class ContentGroup {
  7021. constructor(...units) {
  7022. this.units = [];
  7023. units.forEach(unit => {
  7024. this.addUnit(unit);
  7025. });
  7026. }
  7027. addUnit(unit) {
  7028. this.units.push(unit);
  7029. return this;
  7030. }
  7031. reset() {
  7032. this.matching = this.units.slice();
  7033. }
  7034. isMatching() {
  7035. return this.matching.length;
  7036. }
  7037. setMatching(matching) {
  7038. this.matching = matching;
  7039. }
  7040. isMatch(cg) {
  7041. let unmatched = cg.matching.slice();
  7042. let matching = this.units.slice();
  7043. for (let i = matching.length - 1; i >= 0; i--) {
  7044. for (let k = unmatched.length - 1; k >= 0; k--) {
  7045. if (matching[i].isMatch(unmatched[k])) {
  7046. unmatched.splice(k, 1);
  7047. matching.splice(i, 1);
  7048. break;
  7049. }
  7050. }
  7051. }
  7052. return {
  7053. type: matching.length > 0 ? ContentGroupMatch.NO_MATCH :
  7054. unmatched.length == 0 ? ContentGroupMatch.PERFECT_MATCH :
  7055. ContentGroupMatch.PARTIAL_MATCH,
  7056. unmatched: unmatched
  7057. };
  7058. }
  7059. getScore() {
  7060. let score = 0;
  7061. this.units.forEach(unit => {
  7062. score += unit.getScore();
  7063. });
  7064. return Math.floor((score / this.units.length) * 10) + this.units.length;
  7065. }
  7066. matchAgainst(a) {
  7067. let matches = [];
  7068. this.reset();
  7069. for (let i = 0; i < a.length; i++) {
  7070. let match = a[i].isMatch(this);
  7071. if (match.type != ContentGroupMatch.NO_MATCH) {
  7072. matches.push(i);
  7073. this.setMatching(match.unmatched);
  7074. }
  7075. if (!this.isMatching()) {
  7076. return matches;
  7077. }
  7078. }
  7079. return undefined;
  7080. }
  7081. }
  7082. class ContentMarker {
  7083. constructor(name, important) {
  7084. this.important = false;
  7085. this.name = name;
  7086. this.important = important == true;
  7087. }
  7088. isImportant() {
  7089. return this.important;
  7090. }
  7091. }
  7092. class ContentUnit {
  7093. constructor() {
  7094. this.categories = [];
  7095. }
  7096. addCategory(...nouns) {
  7097. this.categories.push(new ContentDifferential(...nouns));
  7098. }
  7099. isMatch(cu) {
  7100. return ContentDifferential.isMatch(this.categories, cu.categories);
  7101. }
  7102. getScore() {
  7103. let score = 0;
  7104. this.categories.forEach(diff => {
  7105. score += diff.score;
  7106. });
  7107. return score / this.categories.length;
  7108. }
  7109. matchAgainst(a) {
  7110. for (let i = 0; i < a.length; i++) {
  7111. if (a[i].isMatch(this)) {
  7112. return [i];
  7113. }
  7114. }
  7115. }
  7116. }
  7117. class CombatHit extends ContentMarker {
  7118. }
  7119. CombatHit.FULL_DODGE = new CombatHit("Full Dodge", true);
  7120. CombatHit.PARTIAL_DODGE = new CombatHit("Partial Dodge", true);
  7121. CombatHit.FULL_HIT = new CombatHit("Full Hit", true);
  7122. class CombatDamage extends ContentMarker {
  7123. }
  7124. CombatDamage.LOW_DAMAGE = new CombatDamage("Low Damage");
  7125. CombatDamage.MEDIUM_DAMAGE = new CombatDamage("Medium Damage");
  7126. CombatDamage.HIGH_DAMAGE = new CombatDamage("High Damage");
  7127. class CombatResult extends ContentMarker {
  7128. }
  7129. CombatResult.KNOCKED = new CombatResult("Target was knocked down by the attack", true);
  7130. CombatResult.KNOCKED_OFF = new CombatResult("Target was knocked off by the attack, becoming unconscious", true);
  7131. CombatResult.KILLED = new CombatResult("Target was killed by this attack", true);
  7132. class CombatUnit extends ContentUnit {
  7133. constructor() {
  7134. super();
  7135. this.actor = new ContentDifferential(Person);
  7136. this.target = new ContentDifferential(Person);
  7137. this.weapon = new ContentDifferential(Thing);
  7138. this.markers = new ContentDifferential();
  7139. }
  7140. setActor(it) {
  7141. this.actor = new ContentDifferential(it);
  7142. return this;
  7143. }
  7144. setTarget(it) {
  7145. this.target = new ContentDifferential(it);
  7146. return this;
  7147. }
  7148. setWeapon(it) {
  7149. this.weapon = new ContentDifferential(it);
  7150. return this;
  7151. }
  7152. addMarker(marker) {
  7153. this.markers.addNoun(marker);
  7154. return this;
  7155. }
  7156. getScore() {
  7157. return this.actor.getScore() + this.target.getScore() + this.weapon.getScore() + this.markers.getScore();
  7158. }
  7159. isMatch(cu) {
  7160. if (cu instanceof CombatUnit) {
  7161. return this.actor.isMatch(cu.actor) && this.target.isMatch(cu.target) &&
  7162. this.weapon.isMatch(cu.weapon) && this.markers.isMatch(cu.markers);
  7163. }
  7164. return false;
  7165. }
  7166. }
  7167. class FuckingDescription extends ContentDescription {
  7168. constructor(name) {
  7169. super(name, new ContentGroup());
  7170. FuckingDescription.DESCRIPTIONS.push(this);
  7171. }
  7172. addUnit() {
  7173. let unit = new FuckingUnit();
  7174. this.group.addUnit(unit);
  7175. return unit;
  7176. }
  7177. }
  7178. FuckingDescription.DESCRIPTIONS = [];
  7179. class FuckingStyle extends ContentMarker {
  7180. }
  7181. FuckingStyle.GENTLE = new FuckingStyle("Gentle");
  7182. FuckingStyle.ROUGH = new FuckingStyle("Rough");
  7183. class FuckingState extends ContentMarker {
  7184. }
  7185. FuckingState.PENETRATING = new FuckingState("Penetration Start", true);
  7186. FuckingState.NORMAL = new FuckingState("Normal fucking", true);
  7187. FuckingState.SPEEDING_UP = new FuckingState("Speeding up", true);
  7188. FuckingState.CUM_START = new FuckingState("Started Cumming", true);
  7189. FuckingState.CUMMING = new FuckingState("Cumming", true);
  7190. FuckingState.CUM_END = new FuckingState("Finished Cumming", true);
  7191. class FuckingUnit extends ContentUnit {
  7192. constructor() {
  7193. super();
  7194. this.fucker = new ContentDifferential(Person);
  7195. this.fucked = new ContentDifferential(Person);
  7196. this.hole = new ContentDifferential(SexHole);
  7197. this.stick = new ContentDifferential(SexStick);
  7198. this.markers = new ContentDifferential();
  7199. }
  7200. setFucker(it) {
  7201. this.fucker = new ContentDifferential(it);
  7202. return this;
  7203. }
  7204. setFucked(it) {
  7205. this.fucked = new ContentDifferential(it);
  7206. return this;
  7207. }
  7208. setHole(it) {
  7209. this.hole = new ContentDifferential(it);
  7210. return this;
  7211. }
  7212. setStick(it) {
  7213. this.stick = new ContentDifferential(it);
  7214. return this;
  7215. }
  7216. addMarker(marker) {
  7217. this.markers.addNoun(marker);
  7218. return this;
  7219. }
  7220. getScore() {
  7221. return this.fucker.getScore() + this.fucked.getScore() + this.hole.getScore() + this.stick.getScore() + this.markers.getScore();
  7222. }
  7223. isMatch(fu) {
  7224. if (fu instanceof FuckingUnit) {
  7225. return this.fucker.isMatch(fu.fucker) && this.fucked.isMatch(fu.fucked) &&
  7226. this.hole.isMatch(fu.hole) && this.stick.isMatch(fu.stick) && this.markers.isMatch(fu.markers);
  7227. }
  7228. return false;
  7229. }
  7230. }
  7231. class BranchingOption {
  7232. constructor(say, appearCondition) {
  7233. this.previouslyPicked = false;
  7234. this.say = say;
  7235. this.appearCondition = appearCondition;
  7236. }
  7237. }
  7238. class BranchingDialogue {
  7239. constructor(...options) {
  7240. this.options = [];
  7241. this.addOptions(...options);
  7242. }
  7243. addOptions(...options) {
  7244. this.options.push(...options);
  7245. arrayUnique(this.options);
  7246. }
  7247. async getChosenOption() {
  7248. let validOptions = [];
  7249. for (let i = 0, value = this.options[i]; value != undefined; value = this.options[++i]) {
  7250. if (value.appearCondition == undefined || (typeof value.appearCondition == "function" && value.appearCondition()) || value.appearCondition) {
  7251. validOptions.push(value);
  7252. }
  7253. }
  7254. let choiceButtons = [];
  7255. for (let i = 0; i < validOptions.length; i++) {
  7256. let value = validOptions[i];
  7257. let classes = ["choice"];
  7258. if (value.previouslyPicked) {
  7259. classes.push("picked");
  7260. }
  7261. choiceButtons.push((await value.say.getHTML("p", classes))[0]);
  7262. }
  7263. let PlayerInput = new Promise((resolve, reject) => {
  7264. this.resolve = resolve;
  7265. });
  7266. Controls.KeyHandler.reset();
  7267. for (let index = 0, value = choiceButtons[index]; value != undefined; value = choiceButtons[++index]) {
  7268. Controls.KeyHandler.applyCode(value, Controls.KeyHandler.getFirstKeyCode());
  7269. value.addEventListener("click", (e) => {
  7270. validOptions[index].previouslyPicked = true;
  7271. this.resolve(validOptions[index]);
  7272. e.preventDefault();
  7273. });
  7274. }
  7275. await Elements.CurrentTurnHandler.print(...choiceButtons);
  7276. let choice = await PlayerInput;
  7277. await Elements.CurrentTurnHandler.unprint(...choiceButtons);
  7278. return choice;
  7279. }
  7280. }
  7281. var NodeType;
  7282. (function (NodeType) {
  7283. NodeType[NodeType["Node"] = 0] = "Node";
  7284. NodeType[NodeType["Tree"] = 1] = "Tree";
  7285. NodeType[NodeType["Text"] = 2] = "Text";
  7286. NodeType[NodeType["Set"] = 3] = "Set";
  7287. NodeType[NodeType["Choice"] = 4] = "Choice";
  7288. NodeType[NodeType["Branch"] = 5] = "Branch";
  7289. })(NodeType || (NodeType = {}));
  7290. class DialogueNode {
  7291. constructor(id) {
  7292. this.type = NodeType.Node;
  7293. this.id = id;
  7294. }
  7295. setName(name) {
  7296. this.name = name;
  7297. }
  7298. setNext(next) {
  7299. this.next = next;
  7300. }
  7301. getNext() {
  7302. return this.next;
  7303. }
  7304. setChoices(choices) {
  7305. this.choices = choices;
  7306. }
  7307. hasChoices() {
  7308. return this.choices != undefined && this.choices.length > 0;
  7309. }
  7310. }
  7311. class DialogueBranch extends DialogueNode {
  7312. constructor() {
  7313. super(...arguments);
  7314. this.type = NodeType.Branch;
  7315. this.variable = () => { return false; };
  7316. this.branchIds = [];
  7317. this.branchConditions = [];
  7318. }
  7319. setVariable(varFunc) {
  7320. this.variable = varFunc;
  7321. }
  7322. addBranch(targetid, valueFunc) {
  7323. this.branchIds.push(targetid);
  7324. this.branchConditions.push(valueFunc);
  7325. }
  7326. getNext() {
  7327. let variable = this.variable();
  7328. for (let i = 0; i < this.branchIds.length; i++) {
  7329. let comparing = this.branchConditions[i]();
  7330. if (comparing == variable) {
  7331. return this.branchIds[i];
  7332. }
  7333. }
  7334. return this.next;
  7335. }
  7336. }
  7337. class DialogueText extends DialogueNode {
  7338. constructor() {
  7339. super(...arguments);
  7340. this.type = NodeType.Text;
  7341. }
  7342. setSay(sayCreator) {
  7343. this.sayCreator = sayCreator;
  7344. }
  7345. getSay() {
  7346. return this.sayCreator();
  7347. }
  7348. }
  7349. class DialogueChoice extends DialogueText {
  7350. constructor() {
  7351. super(...arguments);
  7352. this.type = NodeType.Choice;
  7353. this.conditions = () => { return true; };
  7354. }
  7355. isAvailable() {
  7356. return this.conditions();
  7357. }
  7358. setConditions(conditions) {
  7359. this.conditions = conditions;
  7360. }
  7361. }
  7362. class DialogueNodeTree extends DialogueNode {
  7363. constructor() {
  7364. super(...arguments);
  7365. this.type = NodeType.Tree;
  7366. }
  7367. setTree(treeFinder) {
  7368. this.tree = treeFinder;
  7369. }
  7370. }
  7371. class DialogueSet extends DialogueNode {
  7372. constructor() {
  7373. super(...arguments);
  7374. this.type = NodeType.Set;
  7375. }
  7376. setFunction(code) {
  7377. this.code = code;
  7378. }
  7379. run() {
  7380. return this.code();
  7381. }
  7382. }
  7383. class DialogueTree {
  7384. constructor(id) {
  7385. this.nodes = {};
  7386. this.startNode = undefined;
  7387. this.repeatChoices = true;
  7388. this.id = id;
  7389. }
  7390. addNode(node) {
  7391. this.nodes[node.id] = node;
  7392. if (node.type == NodeType.Node) {
  7393. this.nodes[node.name] = node;
  7394. }
  7395. }
  7396. addStartNode(node) {
  7397. this.addNode(node);
  7398. this.startNode = node;
  7399. }
  7400. getNode(id) {
  7401. return this.nodes[id];
  7402. }
  7403. getNext(node) {
  7404. let next = node.getNext();
  7405. if (next != undefined) {
  7406. return this.getNode(next);
  7407. }
  7408. }
  7409. setRepeatChoices(doIt) {
  7410. this.repeatChoices = doIt;
  7411. }
  7412. async execute(startId) {
  7413. console.debug(Rulebook.getIndentation() + "[DialogueTree] Running " + this.id);
  7414. Rulebook.increaseIndentation(this);
  7415. let node;
  7416. if (startId == undefined) {
  7417. node = this.startNode;
  7418. }
  7419. else {
  7420. node = this.getNode(startId);
  7421. }
  7422. if (node == undefined) {
  7423. Elements.CurrentTurnHandler.printAsError("Unable to start dialogue " + this.id + ": A starting node could not be found.");
  7424. return;
  7425. }
  7426. let previousNode;
  7427. while (node != undefined) {
  7428. let nextNode = await this.processNode(node, previousNode);
  7429. previousNode = node;
  7430. node = nextNode;
  7431. }
  7432. Rulebook.decreaseIndentation();
  7433. }
  7434. async processNode(node, previousNode) {
  7435. console.debug(Rulebook.getIndentation() + "[" + node.type + "] " + node.id);
  7436. Rulebook.increaseIndentation(node);
  7437. let doChoices = node.hasChoices();
  7438. if (node.type == NodeType.Tree) {
  7439. await node.tree().execute();
  7440. }
  7441. else if (node.type == NodeType.Text) {
  7442. let say = node.getSay();
  7443. Elements.CurrentTurnHandler.printAsContent(say);
  7444. }
  7445. else if (node.type == NodeType.Set) {
  7446. let runningSet = node.run();
  7447. if (runningSet instanceof Promise) {
  7448. await runningSet;
  7449. }
  7450. }
  7451. if (doChoices) {
  7452. let branchingDialogue = new BranchingDialogue();
  7453. let choices = node.choices;
  7454. let options = [];
  7455. for (let i = 0; i < choices.length; i++) {
  7456. let choice = this.getNode(choices[i]);
  7457. let branchingOption = new BranchingOption(choice.getSay(), choice.isAvailable());
  7458. options.push(branchingOption);
  7459. branchingDialogue.addOptions(branchingOption);
  7460. }
  7461. let chosenOption = await branchingDialogue.getChosenOption();
  7462. let chosenNodeId = choices[options.indexOf(chosenOption)];
  7463. let chosenNode = this.getNode(chosenNodeId);
  7464. if (this.repeatChoices) {
  7465. let say = new Say(new SayBold(" > ", chosenNode.getSay()));
  7466. this.lastPrintedChoice = await Elements.CurrentTurnHandler.getSayElementsAsContent(say);
  7467. await Elements.CurrentTurnHandler.print(...this.lastPrintedChoice);
  7468. }
  7469. console.debug(Rulebook.getIndentation() + "[Choice] Picked " + chosenNodeId);
  7470. console.debug(Rulebook.getIndentation() + "[Choice] Going to " + chosenNode.getNext());
  7471. Rulebook.increaseIndentation(chosenNodeId);
  7472. Rulebook.decreaseIndentation();
  7473. Rulebook.decreaseIndentation();
  7474. return this.getNext(chosenNode);
  7475. }
  7476. else {
  7477. Rulebook.decreaseIndentation();
  7478. return this.getNext(node);
  7479. }
  7480. }
  7481. unprintLastChoice() {
  7482. Elements.CurrentTurnHandler.unprint(...this.lastPrintedChoice);
  7483. }
  7484. }
  7485. var DialogueTrees;
  7486. (function (DialogueTrees) {
  7487. function findUnusedTrees() {
  7488. let allCode = document.getElementById("appCode").innerHTML;
  7489. let useCount = {};
  7490. let unused = [];
  7491. for (let dialogueName in DialogueTrees) {
  7492. if (dialogueName != "findUnusedTrees") {
  7493. let count = occurrences(allCode, "DialogueTrees." + dialogueName, false) - 1;
  7494. if (count > 0) {
  7495. useCount[dialogueName] = count;
  7496. }
  7497. else {
  7498. unused.push(dialogueName);
  7499. }
  7500. }
  7501. }
  7502. for (let dialogueName in useCount) {
  7503. let times = useCount[dialogueName];
  7504. console.debug("[DialogueUsage] " + dialogueName + " is referenced " + times + (times > 1 ? " times." : " time."));
  7505. }
  7506. for (let i = 0; i < unused.length; i++) {
  7507. console.error("[DialogueUsage] " + unused[i] + " is never referenced and will not appear in-game.");
  7508. }
  7509. }
  7510. DialogueTrees.findUnusedTrees = findUnusedTrees;
  7511. function occurrences(string, subString, allowOverlapping) {
  7512. string += "";
  7513. subString += "";
  7514. if (subString.length <= 0)
  7515. return (string.length + 1);
  7516. var n = 0, pos = 0, step = allowOverlapping ? 1 : subString.length;
  7517. while (true) {
  7518. pos = string.indexOf(subString, pos);
  7519. if (pos >= 0) {
  7520. ++n;
  7521. pos += step;
  7522. }
  7523. else
  7524. break;
  7525. }
  7526. return n;
  7527. }
  7528. })(DialogueTrees || (DialogueTrees = {}));
  7529. class RoomRandom extends Room {
  7530. constructor(id, fodder) {
  7531. super(id, fodder);
  7532. this.connectableOn = [Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST];
  7533. this.randomizable = true;
  7534. this.placed = false;
  7535. this.appearChance = 75;
  7536. this.extraConnectionChance = 75;
  7537. this.backgroundImage = "tomato";
  7538. }
  7539. getBackgroundClass() {
  7540. if (this.isImageDefined()) {
  7541. return this.backgroundImage;
  7542. }
  7543. return "tomato";
  7544. }
  7545. isImageDefined() {
  7546. try {
  7547. for (var i = 0; i < document.styleSheets.length; i++) {
  7548. var rules = document.styleSheets[i]['rules'] || document.styleSheets[i]['cssRules'];
  7549. for (var x in rules) {
  7550. if (typeof rules[x].selectorText == 'string' && rules[x].selectorText == "." + this.backgroundImage) {
  7551. return true;
  7552. }
  7553. }
  7554. }
  7555. return false;
  7556. }
  7557. catch (e) {
  7558. console.warn("Unable to read image");
  7559. return true;
  7560. }
  7561. }
  7562. isConnectableOn(oppositeDirection) {
  7563. return this.connectableOn.indexOf(oppositeDirection) != -1;
  7564. }
  7565. getAnyDirection(options) {
  7566. let directionShuffler = new Shuffler(this.connectableOn);
  7567. for (let direction = directionShuffler.getOne(); direction != undefined; direction = directionShuffler.getOne()) {
  7568. let oppositeDirection = OppositeDirection[Direction[direction]];
  7569. let otherCoordinates = options.map.getCoordinates(options.otherRoom);
  7570. let wouldbeCoordinates = Room.shift(otherCoordinates, oppositeDirection);
  7571. let trickyOptions = {
  7572. otherRoom: options.otherRoom,
  7573. otherRoomDirection: oppositeDirection,
  7574. trickyRoomDirection: direction,
  7575. map: options.map,
  7576. region: options.region,
  7577. x: wouldbeCoordinates[0],
  7578. y: wouldbeCoordinates[1]
  7579. };
  7580. if (this.isPlaceable(trickyOptions)) {
  7581. return trickyOptions;
  7582. }
  7583. }
  7584. }
  7585. isPlaceable(options) {
  7586. if (!this.isConnectableOn(options.trickyRoomDirection) || !options.map.isFree(options.x, options.y)) {
  7587. return false;
  7588. }
  7589. if (options.otherRoom == undefined || !options.otherRoom.isConnectableOn(options.otherRoomDirection)) {
  7590. return false;
  7591. }
  7592. if (this.trickyCode != undefined) {
  7593. return this.trickyCode(options);
  7594. }
  7595. return true;
  7596. }
  7597. getDistanceTo(room) {
  7598. let myCoordinates = this.lastMap.getCoordinates(this);
  7599. let otherCoordinates = this.lastMap.getCoordinates(room);
  7600. if (myCoordinates != undefined && otherCoordinates != undefined) {
  7601. let c1 = myCoordinates;
  7602. let c2 = otherCoordinates;
  7603. return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]);
  7604. }
  7605. }
  7606. findPathTo(pathEnd, validRoom) {
  7607. validRoom = validRoom == undefined ? () => { return true; } : validRoom;
  7608. let map = this.lastMap;
  7609. let endPosition = map.getCoordinates(pathEnd);
  7610. let open = [];
  7611. let distance = (c1, c2) => {
  7612. return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]);
  7613. };
  7614. let neighbors = (room, x, y) => {
  7615. let neighs = [];
  7616. for (let direction = 0; direction < room.connections.length; direction++) {
  7617. let otherRoom = room.connections[direction];
  7618. if (otherRoom != undefined && open.indexOf(otherRoom) == -1 && validRoom(otherRoom)) {
  7619. let dirCoordinates = Room.shift([x, y], direction);
  7620. let dir = [otherRoom, dirCoordinates, distance(endPosition, dirCoordinates)];
  7621. neighs.push(dir);
  7622. }
  7623. }
  7624. return neighs.sort((a, b) => { return a[2] - b[2]; });
  7625. };
  7626. let shortestPath = {
  7627. length: map.getRoomCount()
  7628. };
  7629. let noPath = shortestPath;
  7630. let cPath = [];
  7631. let findPath = (myArray) => {
  7632. let room = myArray[0];
  7633. cPath.push(myArray);
  7634. if (room == pathEnd) {
  7635. if (shortestPath.length >= cPath.length) {
  7636. shortestPath = cPath.slice(0);
  7637. }
  7638. }
  7639. else if (shortestPath.length > (cPath.length)) {
  7640. open.push(room);
  7641. let otherRooms = neighbors(room, myArray[1][0], myArray[1][1]);
  7642. for (let i = 0; i < otherRooms.length; i++) {
  7643. if ((cPath.length + 1) < shortestPath.length) {
  7644. findPath(otherRooms[i]);
  7645. }
  7646. }
  7647. open.pop();
  7648. }
  7649. cPath.pop();
  7650. };
  7651. findPath([this, map.getCoordinates(this)]);
  7652. return shortestPath != noPath ? shortestPath : undefined;
  7653. }
  7654. getBestDirectionTo(otherRoom, validRoom) {
  7655. let path = this.findPathTo(otherRoom, validRoom);
  7656. if (path != undefined) {
  7657. if (path.length == 1) {
  7658. return undefined;
  7659. }
  7660. return this.connections.indexOf(path[1][0]);
  7661. }
  7662. }
  7663. getAStarPathTo(otherRoom, validRoom) {
  7664. validRoom = validRoom != undefined ? validRoom : () => { return true; };
  7665. let distance = (c1, c2) => {
  7666. return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]);
  7667. };
  7668. let isVisited = (room) => {
  7669. return visited.indexOf(room) != -1;
  7670. };
  7671. let getNeighbors = (node) => {
  7672. let neighbors = [];
  7673. for (let direction = 0; direction < node.room.connections.length; direction++) {
  7674. if (node.room.connections[direction] != undefined && !isVisited(node.room.connections[direction]) && validRoom(node.room.connections[direction])) {
  7675. let coordinates = Room.shift(node.coordinates, direction);
  7676. neighbors.push({
  7677. room: node.room.connections[direction],
  7678. coordinates: coordinates,
  7679. distance: distance(coordinates, endNode.coordinates)
  7680. });
  7681. visited.push(node.room.connections[direction]);
  7682. }
  7683. }
  7684. return neighbors;
  7685. };
  7686. let getClosestPath = () => {
  7687. let shortest = 0;
  7688. for (let i = 1; i < open.length; i++) {
  7689. let lastPoint = open[i][open[i].length - 1];
  7690. if (lastPoint.distance < open[shortest][open[shortest].length - 1].distance) {
  7691. shortest = i;
  7692. }
  7693. }
  7694. return shortest;
  7695. };
  7696. let endNode = { room: otherRoom, coordinates: this.lastMap.getCoordinates(otherRoom), distance: 0 };
  7697. let startCoordinates = this.lastMap.getCoordinates(this);
  7698. let startNode = { room: this, coordinates: startCoordinates, distance: distance(startCoordinates, endNode.coordinates) };
  7699. let open = [[startNode]];
  7700. let closed = [];
  7701. let shortestPath = this.lastMap.getRoomCount();
  7702. let shortestIndex;
  7703. let myPath;
  7704. let closest = 0;
  7705. let visited = [this];
  7706. while (open.length > 0) {
  7707. myPath = open.splice(closest, 1)[0];
  7708. if (myPath[myPath.length - 1].distance == 0) {
  7709. let push = closed.push(myPath);
  7710. if (myPath.length < shortestPath) {
  7711. shortestPath = myPath.length;
  7712. shortestIndex = push - 1;
  7713. }
  7714. break;
  7715. }
  7716. else {
  7717. let neighbors = getNeighbors(myPath[myPath.length - 1]);
  7718. for (let i = 0; i < neighbors.length; i++) {
  7719. open.push(myPath.concat([neighbors[i]]));
  7720. }
  7721. }
  7722. for (let i = open.length - 1; i >= 0; i--) {
  7723. if (open[i].length >= shortestPath) {
  7724. open.splice(i, 1);
  7725. }
  7726. }
  7727. closest = getClosestPath();
  7728. }
  7729. return closed[shortestIndex];
  7730. }
  7731. getAStarBestDirectionTo(otherRoom, validRoom) {
  7732. let path = this.getAStarPathTo(otherRoom, validRoom);
  7733. if (path != undefined) {
  7734. if (path.length == 1) {
  7735. return undefined;
  7736. }
  7737. return this.connections.indexOf(path[1].room);
  7738. }
  7739. }
  7740. getConnectedDirection() {
  7741. let shuffler = new Shuffler(Room.DIRECTIONS);
  7742. for (let direction = shuffler.getOne(); direction != undefined; direction = shuffler.getOne()) {
  7743. if (this.connections[direction] != undefined) {
  7744. return direction;
  7745. }
  7746. }
  7747. }
  7748. static getActive(type) {
  7749. }
  7750. }
  7751. class RoomRandomMap {
  7752. constructor() {
  7753. this.positionTable = {};
  7754. this.roomMap = new Map();
  7755. this.lowestX = 0;
  7756. this.lowestY = 0;
  7757. this.highestX = 0;
  7758. this.highestY = 0;
  7759. this.limitsInvalid = false;
  7760. }
  7761. emptyCache() {
  7762. this.availableConnections = [];
  7763. Room.DIRECTIONS.forEach(() => {
  7764. this.availableConnections.push([]);
  7765. });
  7766. this.rooms = 0;
  7767. }
  7768. getAvailableConnections() {
  7769. return this.availableConnections.reduce((previousValue, currentValue, currentIndex, array) => {
  7770. return previousValue + (currentValue.length);
  7771. }, 0);
  7772. }
  7773. removeFromCache(coordinatesToRemove, direction) {
  7774. let directionArray = this.availableConnections[direction];
  7775. for (let k = 0, coordinates = directionArray[k]; coordinates != undefined; coordinates = directionArray[++k]) {
  7776. if (coordinates.x == coordinatesToRemove.x && coordinates.y == coordinatesToRemove.y) {
  7777. directionArray.splice(k, 1);
  7778. return;
  7779. }
  7780. }
  7781. }
  7782. addToCache(coordinatesToAdd, direction) {
  7783. let directionArray = this.availableConnections[direction];
  7784. for (let k = 0, coordinates = directionArray[k]; coordinates != undefined; coordinates = directionArray[++k]) {
  7785. if (coordinates.x == coordinatesToAdd.x && coordinates.y == coordinatesToAdd.y) {
  7786. return;
  7787. }
  7788. }
  7789. directionArray.push(coordinatesToAdd);
  7790. }
  7791. getAnyFromCache(direction) {
  7792. let array = this.availableConnections[direction];
  7793. if (array.length > 0) {
  7794. let randomIndex = Math.floor(Math.random() * (array.length));
  7795. let randomCoordinates = array[randomIndex];
  7796. if (randomCoordinates != undefined) {
  7797. return this.getRoom(randomCoordinates.x, randomCoordinates.y);
  7798. }
  7799. }
  7800. }
  7801. isFree(x, y) {
  7802. return (this.positionTable[x] == undefined || this.positionTable[x][y] === undefined);
  7803. }
  7804. block(x, y) {
  7805. if (this.isFree(x, y)) {
  7806. if (this.positionTable[x] == undefined) {
  7807. this.positionTable[x] = {};
  7808. }
  7809. this.positionTable[x][y] = null;
  7810. this.updateCacheOnPosition(x, y);
  7811. this.updateLimits(x, y);
  7812. }
  7813. }
  7814. updateAllLimits() {
  7815. this.highestX = 0;
  7816. this.highestY = 0;
  7817. this.lowestX = 0;
  7818. this.lowestY = 0;
  7819. for (let x in this.positionTable) {
  7820. for (let y in this.positionTable[x]) {
  7821. if (this.positionTable[x][y] != undefined && this.positionTable[x][y] != null) {
  7822. this.updateLimits(parseInt(x), parseInt(y));
  7823. }
  7824. }
  7825. }
  7826. this.limitsInvalid = false;
  7827. }
  7828. updateLimits(x, y) {
  7829. if (x > this.highestX)
  7830. this.highestX = x;
  7831. if (y > this.highestY)
  7832. this.highestY = y;
  7833. if (y < this.lowestY)
  7834. this.lowestY = y;
  7835. if (x < this.lowestX)
  7836. this.lowestX = x;
  7837. }
  7838. map(room, x, y) {
  7839. if (this.positionTable[x] == undefined) {
  7840. this.positionTable[x] = {};
  7841. }
  7842. this.positionTable[x][y] = room;
  7843. this.roomMap.set(room, [x, y]);
  7844. this.updateCacheOnPosition(x, y);
  7845. this.updateLimits(x, y);
  7846. room.placed = true;
  7847. room.lastMap = this;
  7848. this.rooms++;
  7849. }
  7850. unmap(x, y) {
  7851. if (this.positionTable[x] != undefined && this.positionTable[x][y] != undefined) {
  7852. this.roomMap.delete(this.positionTable[x][y]);
  7853. delete (this.positionTable[x][y]);
  7854. this.rooms--;
  7855. this.updateCacheOnPosition(x, y);
  7856. this.limitsInvalid = true;
  7857. }
  7858. }
  7859. updateCacheOnPosition(x, y) {
  7860. let coordinates = [x, y, 0];
  7861. let coordinatesMap = { x: x, y: y };
  7862. let coordinatesBlocked = !this.isFree(x, y);
  7863. let coordinatesRoom = this.getRoom(x, y);
  7864. Room.DIRECTIONS.forEach(direction => {
  7865. let oppositeDirection = OppositeDirection[Direction[direction]];
  7866. let shifted = Room.shift(coordinates, direction);
  7867. let shiftedMap = { x: shifted[0], y: shifted[1] };
  7868. let shiftedBlocked = !this.isFree(shifted[0], shifted[1]);
  7869. let shiftedRoom = this.getRoom(shifted[0], shifted[1]);
  7870. if (coordinatesRoom != undefined) {
  7871. if (shiftedBlocked) {
  7872. this.removeFromCache(coordinatesMap, direction);
  7873. }
  7874. else if (coordinatesRoom.isConnectableOn(direction)) {
  7875. this.addToCache(coordinatesMap, direction);
  7876. }
  7877. }
  7878. else {
  7879. this.removeFromCache(coordinatesMap, direction);
  7880. }
  7881. if (shiftedRoom != undefined) {
  7882. if (coordinatesBlocked) {
  7883. this.removeFromCache(shiftedMap, oppositeDirection);
  7884. }
  7885. else if (shiftedRoom.isConnectableOn(oppositeDirection)) {
  7886. this.addToCache(shiftedMap, oppositeDirection);
  7887. }
  7888. }
  7889. else {
  7890. this.removeFromCache(shiftedMap, oppositeDirection);
  7891. }
  7892. });
  7893. }
  7894. getRoom(x, y) {
  7895. if (this.positionTable[x] != undefined) {
  7896. if (this.positionTable[x][y] != null) {
  7897. return this.positionTable[x][y];
  7898. }
  7899. }
  7900. return undefined;
  7901. }
  7902. getCoordinates(room) {
  7903. return this.roomMap.get(room);
  7904. }
  7905. getRoomCount() {
  7906. return this.roomMap.size;
  7907. }
  7908. getWidth() {
  7909. return this.highestX - this.lowestX;
  7910. }
  7911. getHeight() {
  7912. return this.highestY - this.lowestY;
  7913. }
  7914. getPreferredGrowth() {
  7915. let ratio = this.getHeight() / this.getWidth();
  7916. let idealRatio = 2.5;
  7917. let difference = Math.abs(ratio - idealRatio);
  7918. if (difference < 0.5) {
  7919. return RoomRandomMap.PREFERRED_GROWTH_ANY;
  7920. }
  7921. else {
  7922. if (ratio < idealRatio) {
  7923. return RoomRandomMap.PREFERRED_GROWTH_VERTICAL;
  7924. }
  7925. else {
  7926. return RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL;
  7927. }
  7928. }
  7929. }
  7930. static isDirectionPreferred(direction, growth) {
  7931. if (growth == RoomRandomMap.PREFERRED_GROWTH_ANY) {
  7932. return true;
  7933. }
  7934. else if (direction == Direction.NORTH || direction == Direction.SOUTH) {
  7935. return growth == RoomRandomMap.PREFERRED_GROWTH_VERTICAL;
  7936. }
  7937. else {
  7938. return growth == RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL;
  7939. }
  7940. }
  7941. }
  7942. RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL = 0;
  7943. RoomRandomMap.PREFERRED_GROWTH_VERTICAL = 1;
  7944. RoomRandomMap.PREFERRED_GROWTH_ANY = 2;
  7945. class ShufflerDirection extends Shuffler {
  7946. constructor(array, preferredGrowth, rng) {
  7947. super(array, rng);
  7948. this.runner = 0;
  7949. this.preferredGrowth = preferredGrowth;
  7950. let goodDirections = [];
  7951. let badDirections = [];
  7952. for (let direction = this.getOne(); direction != undefined; direction = this.getOne()) {
  7953. if (RoomRandomMap.isDirectionPreferred(direction, this.preferredGrowth)) {
  7954. goodDirections.push(direction);
  7955. }
  7956. else {
  7957. badDirections.push(direction);
  7958. }
  7959. }
  7960. this.directionsArray = goodDirections.concat(badDirections);
  7961. }
  7962. getDirection() {
  7963. return this.directionsArray[this.runner++];
  7964. }
  7965. }
  7966. class RoomRandomFodder extends RoomRandom {
  7967. constructor(id) {
  7968. super(id, true);
  7969. }
  7970. }
  7971. class RegionRandom extends Region {
  7972. constructor(name, map) {
  7973. super(name);
  7974. this.randomized = false;
  7975. this.fodderRoomClass = RoomRandomFodder;
  7976. this.placedRooms = [];
  7977. this.map = map == undefined ? new RoomRandomMap() : map;
  7978. }
  7979. async randomize() {
  7980. if (!this.randomized) {
  7981. await RegionRandom.rulebookRandomizeRegion.execute({
  7982. noun: this
  7983. });
  7984. }
  7985. }
  7986. }
  7987. RegionRandom.rng = () => { return Math.random(); };
  7988. RegionRandom.rulebookRandomizeRegion = new Rulebook("Randomizing Random Region something");
  7989. RegionRandom.rulebookPlaceRoom = new Rulebook("Placing Random Room something");
  7990. RegionRandom.rulebookBeforePlaceRoom = new Rulebook("Before placing Random Room something");
  7991. RegionRandom.rulebookAfterPlaceRoom = new Rulebook("After placing Random Room something");
  7992. RegionRandom.ruleFirstRandomizeRegion = RegionRandom.rulebookRandomizeRegion.createAndAddRule({
  7993. name: "Empty map cache to start randomizing region",
  7994. firstPriority: Rule.PRIORITY_HIGHEST,
  7995. code: runner => {
  7996. let region = runner.noun;
  7997. region.map.emptyCache();
  7998. }
  7999. });
  8000. RegionRandom.ruleBasicRandomizeRegion = RegionRandom.rulebookRandomizeRegion.createAndAddRule({
  8001. name: "Randomize all unplaced, randomizable rooms in region something",
  8002. code: async (runner) => {
  8003. let region = runner.noun;
  8004. let roomShuffler = new Shuffler(Region.InRelation.getAllRightTypes(region, RoomRandom).filter((room) => {
  8005. return room.randomizable && !room.placed &&
  8006. (room == WorldState.player.getRoom() || (RegionRandom.rng() * 100) <= room.appearChance);
  8007. }), RegionRandom.rng);
  8008. for (let room = roomShuffler.getOne(); room != undefined; room = roomShuffler.getOne()) {
  8009. while (region.map.rooms > 0 && region.map.getAvailableConnections() < 4) {
  8010. let fodder = new region.fodderRoomClass();
  8011. let options = {
  8012. map: region.map,
  8013. room: fodder,
  8014. region: region
  8015. };
  8016. region.place(fodder);
  8017. await RegionRandom.rulebookBeforePlaceRoom.execute({ noun: options });
  8018. await RegionRandom.rulebookPlaceRoom.execute({ noun: options });
  8019. await RegionRandom.rulebookAfterPlaceRoom.execute({ noun: options });
  8020. }
  8021. let options = {
  8022. map: region.map,
  8023. room: room,
  8024. region: region
  8025. };
  8026. await RegionRandom.rulebookBeforePlaceRoom.execute({ noun: options });
  8027. await RegionRandom.rulebookPlaceRoom.execute({ noun: options });
  8028. await RegionRandom.rulebookAfterPlaceRoom.execute({ noun: options });
  8029. if (!room.placed) {
  8030. Elements.CurrentTurnHandler.printAsError(new Say("Was unable to place room ", room, ". Game might be unplayable."));
  8031. }
  8032. }
  8033. }
  8034. });
  8035. RegionRandom.ruleAddExtraConnections = RegionRandom.rulebookRandomizeRegion.createAndAddRule({
  8036. firstPriority: Rule.PRIORITY_LOWEST,
  8037. name: "Add extra connections to rooms in region",
  8038. code: runner => {
  8039. let region = runner.noun;
  8040. let placedRooms = Region.InRelation.getAllRightTypes(region, RoomRandom).filter((room) => {
  8041. return room.randomizable && room.placed;
  8042. });
  8043. placedRooms.forEach((room) => {
  8044. let myCoordinates = region.map.getCoordinates(room);
  8045. let directionShuffler = new Shuffler(room.connectableOn.slice(0), RegionRandom.rng);
  8046. for (let direction = directionShuffler.getOne(); direction != undefined && (RegionRandom.rng() * 100) <= room.extraConnectionChance; direction = directionShuffler.getOne()) {
  8047. if (room.connections[direction] == undefined) {
  8048. let otherCoordinates = Room.shift(myCoordinates, direction);
  8049. let otherRoom = region.map.getRoom(otherCoordinates[0], otherCoordinates[1]);
  8050. if (otherRoom != undefined && otherRoom.randomizable
  8051. && otherRoom.isConnectableOn(OppositeDirection[Direction[direction]])
  8052. && (RegionRandom.rng() * 100) <= otherRoom.extraConnectionChance) {
  8053. room.mapRoom(otherRoom, direction);
  8054. }
  8055. }
  8056. }
  8057. });
  8058. }
  8059. });
  8060. RegionRandom.rulePlaceFirstRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({
  8061. name: "Placing First room something",
  8062. firstPriority: Rule.PRIORITY_HIGHEST,
  8063. code: runner => {
  8064. let placingOptions = runner.noun;
  8065. if (placingOptions.map.isFree(0, 0)) {
  8066. placingOptions.map.map(placingOptions.room, 0, 0);
  8067. return true;
  8068. }
  8069. },
  8070. conditions: runner => {
  8071. return runner.noun.map.rooms == 0;
  8072. }
  8073. });
  8074. RegionRandom.rulePlaceNonTrickyRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({
  8075. name: "Placing non-tricky room something",
  8076. firstPriority: Rule.PRIORITY_HIGH,
  8077. code: runner => {
  8078. let placingOptions = runner.noun;
  8079. let preferredGrowthDirection = placingOptions.map.getPreferredGrowth();
  8080. let directionShuffler = new ShufflerDirection(placingOptions.room.connectableOn, preferredGrowthDirection);
  8081. for (let direction = directionShuffler.getDirection(); direction != undefined; direction = directionShuffler.getDirection()) {
  8082. let oppositeDirection = OppositeDirection[Direction[direction]];
  8083. let connectableRoom = placingOptions.map.getAnyFromCache(oppositeDirection);
  8084. if (connectableRoom != undefined) {
  8085. let otherCoordinates = placingOptions.map.getCoordinates(connectableRoom);
  8086. let myCoordinates = Room.shift(otherCoordinates, oppositeDirection);
  8087. placingOptions.room.mapRoom(connectableRoom, direction);
  8088. placingOptions.map.map(placingOptions.room, myCoordinates[0], myCoordinates[1]);
  8089. return true;
  8090. }
  8091. }
  8092. },
  8093. conditions: runner => {
  8094. return runner.noun.room.trickyCode == undefined;
  8095. }
  8096. });
  8097. RegionRandom.rulePlaceTrickyRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({
  8098. name: "Placing tricky room something",
  8099. code: runner => {
  8100. let placingOptions = runner.noun;
  8101. let placedRooms = placingOptions.region.getRooms().filter((room) => {
  8102. return room instanceof RoomRandom && room.placed;
  8103. });
  8104. if (placedRooms.length == 0) {
  8105. Elements.CurrentTurnHandler.printAsError("Unable to place room " + placingOptions.room.getPrintedName() + ": There are no rooms to connect to!");
  8106. return false;
  8107. }
  8108. let roomShuffler = new Shuffler(placedRooms, RegionRandom.rng);
  8109. for (let connectableRoom = roomShuffler.getOne(); connectableRoom != undefined; connectableRoom = roomShuffler.getOne()) {
  8110. let trickier = {
  8111. region: placingOptions.region,
  8112. map: placingOptions.map,
  8113. otherRoom: connectableRoom
  8114. };
  8115. let tricky = placingOptions.room.getAnyDirection(trickier);
  8116. if (tricky != undefined) {
  8117. placingOptions.room.mapRoom(connectableRoom, tricky.trickyRoomDirection);
  8118. placingOptions.map.map(placingOptions.room, tricky.x, tricky.y);
  8119. return true;
  8120. }
  8121. }
  8122. let connectableThroughFodder = (fodderStep, connectingRoom) => {
  8123. let trickier = {
  8124. region: placingOptions.region,
  8125. map: placingOptions.map,
  8126. otherRoom: connectingRoom
  8127. };
  8128. if (fodderStep == 0) {
  8129. return placingOptions.room.getAnyDirection(trickier);
  8130. }
  8131. else {
  8132. let newFodder = new (placingOptions.region.fodderRoomClass)();
  8133. let preferredGrowthDirection = placingOptions.map.getPreferredGrowth();
  8134. let directionShuffler = new ShufflerDirection(placingOptions.room.connectableOn, preferredGrowthDirection);
  8135. for (let direction = directionShuffler.getDirection(); direction != undefined; direction = directionShuffler.getDirection()) {
  8136. let oppositeDirection = OppositeDirection[Direction[direction]];
  8137. let otherCoordinates = placingOptions.map.getCoordinates(connectingRoom);
  8138. let wouldbeCoordinates = Room.shift(otherCoordinates, oppositeDirection);
  8139. let fodderTricky = {
  8140. otherRoom: connectingRoom,
  8141. otherRoomDirection: oppositeDirection,
  8142. trickyRoomDirection: direction,
  8143. map: placingOptions.map,
  8144. region: placingOptions.region,
  8145. x: wouldbeCoordinates[0],
  8146. y: wouldbeCoordinates[1]
  8147. };
  8148. if (newFodder.isPlaceable(fodderTricky)) {
  8149. newFodder.mapRoom(connectingRoom, fodderTricky.trickyRoomDirection);
  8150. placingOptions.map.map(newFodder, fodderTricky.x, fodderTricky.y);
  8151. let nextTricky = connectableThroughFodder(fodderStep - 1, newFodder);
  8152. if (nextTricky != undefined) {
  8153. placingOptions.region.place(newFodder);
  8154. return nextTricky;
  8155. }
  8156. else {
  8157. newFodder.unmapRoom(fodderTricky.trickyRoomDirection);
  8158. placingOptions.map.unmap(fodderTricky.x, fodderTricky.y);
  8159. }
  8160. }
  8161. }
  8162. }
  8163. };
  8164. for (let fodderLevel = 1; fodderLevel < 10; fodderLevel++) {
  8165. roomShuffler.restart();
  8166. for (let connectableRoom = roomShuffler.getOne(); connectableRoom != undefined; connectableRoom = roomShuffler.getOne()) {
  8167. let tricky = connectableThroughFodder(fodderLevel, connectableRoom);
  8168. if (tricky != undefined) {
  8169. placingOptions.room.mapRoom(tricky.otherRoom, tricky.trickyRoomDirection);
  8170. placingOptions.map.map(placingOptions.room, tricky.x, tricky.y);
  8171. return true;
  8172. }
  8173. }
  8174. }
  8175. Elements.CurrentTurnHandler.printAsError("Unable to place room " + placingOptions.room.getPrintedName() + ": All attempts failed");
  8176. return false;
  8177. }
  8178. });
  8179. class SavedEvent extends StoredVariable {
  8180. constructor(options) {
  8181. super(options);
  8182. this.description = options.description;
  8183. this.getValueDescription = options.valueDescription;
  8184. }
  8185. getDescription() {
  8186. return this.description;
  8187. }
  8188. }
  8189. let EVENT_ORC_CHIEF_KILLED = new SavedEvent({
  8190. id: "EVENT_ORC_CHIEF_KILLED",
  8191. description: "Describer whether the orc chief is alive or dead.",
  8192. value: false,
  8193. valueDescription: (value) => {
  8194. if (EVENT_ORC_CHIEF_KILLED.value) {
  8195. return "The orc chief has been killed.";
  8196. }
  8197. else {
  8198. return "The orc chief is alive.";
  8199. }
  8200. }
  8201. });
  8202. class Dice {
  8203. constructor(testString) {
  8204. this.range = [0, 0, 1, 1];
  8205. this.minResult = 0;
  8206. this.testString = testString;
  8207. }
  8208. roll(stat) {
  8209. let rng = this.range.slice();
  8210. if (stat >= 10) {
  8211. rng.push(2, 1);
  8212. }
  8213. else if (stat >= 7) {
  8214. rng.push(1, 1);
  8215. }
  8216. else if (stat >= 4) {
  8217. rng.push(1);
  8218. }
  8219. let results = [];
  8220. for (let i = 0; i < stat; i++) {
  8221. let index = Math.floor(Math.random() * (rng.length));
  8222. results.push(rng[index]);
  8223. }
  8224. return results;
  8225. }
  8226. static sum(a, b) {
  8227. return a + b;
  8228. }
  8229. getSay(results) {
  8230. let finalResult = results.reduce(Dice.sum);
  8231. return new Say(new SayBold("[", this.testString, "] "), " = [", results.join("] ["), "]", results.length == 1 ? "" :
  8232. (" = " + finalResult));
  8233. }
  8234. static testAgainstRoll(player, enemy) {
  8235. let playerDice = new Dice(player.name);
  8236. let playerResult = playerDice.roll(player.value);
  8237. let enemyDice = new Dice(enemy.name);
  8238. let enemyResult = enemyDice.roll(enemy.value);
  8239. return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum);
  8240. }
  8241. static testAgainstDifficulty(player, difficulty) {
  8242. let playerDice = new Dice(player.name);
  8243. let playerResult = playerDice.roll(player.value);
  8244. return playerResult.reduce(Dice.sum) - difficulty;
  8245. }
  8246. }
  8247. class DiceCommon extends Dice {
  8248. constructor() {
  8249. super(...arguments);
  8250. this.range = [-1, 0, 0, 0, 1, 1, 1];
  8251. this.minResult = -1;
  8252. }
  8253. static testAgainstRoll(player, enemy) {
  8254. let playerDice = new DiceCommon(player.name);
  8255. let playerResult = playerDice.roll(player.value);
  8256. let enemyDice = new DiceCommon(enemy.name);
  8257. let enemyResult = enemyDice.roll(enemy.value);
  8258. return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum);
  8259. }
  8260. static testAgainstDifficulty(player, difficulty) {
  8261. let playerDice = new DiceCommon(player.name);
  8262. let playerResult = playerDice.roll(player.value);
  8263. return playerResult.reduce(Dice.sum) - difficulty;
  8264. }
  8265. }
  8266. class DiceDangerous extends Dice {
  8267. constructor() {
  8268. super(...arguments);
  8269. this.range = [-2, -1, 0, 0, 0, 0, 1, 1, 1, 1];
  8270. this.minResult = -2;
  8271. }
  8272. static testAgainstRoll(player, enemy) {
  8273. let playerDice = new DiceDangerous(player.name);
  8274. let playerResult = playerDice.roll(player.value);
  8275. let enemyDice = new DiceDangerous(enemy.name);
  8276. let enemyResult = enemyDice.roll(enemy.value);
  8277. return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum);
  8278. }
  8279. static testAgainstDifficulty(player, difficulty) {
  8280. let playerDice = new DiceDangerous(player.name);
  8281. let playerResult = playerDice.roll(player.value);
  8282. return playerResult.reduce(Dice.sum) - difficulty;
  8283. }
  8284. }
  8285. class Liquid extends Thing {
  8286. constructor(options) {
  8287. super(options);
  8288. options = options == undefined ? {} : options;
  8289. if (options.taste != undefined) {
  8290. this.taste = options.taste;
  8291. }
  8292. else {
  8293. this.taste = new OneOf(OneOf.ROTATING_RANDOM, "It goes easily through your throat with no particular taste.", "You taste nothing as it softly slides through your tongue.");
  8294. }
  8295. }
  8296. static async mix(container) {
  8297. let result = await Liquid.rulebookMixing.execute({ noun: container });
  8298. if (result != undefined) {
  8299. let finalQuantity = result.quantityMultiplier != undefined ?
  8300. (result.quantityMultiplier * container.liquidContents.length)
  8301. :
  8302. (container.liquidContents.length);
  8303. container.liquidContents = new Array(finalQuantity);
  8304. for (let i = 0; i < finalQuantity; i++) {
  8305. container.liquidContents[i] = result.result;
  8306. }
  8307. }
  8308. }
  8309. static getMixtures() {
  8310. if (Liquid.sortedMixtures) {
  8311. return Liquid.mixtures;
  8312. }
  8313. Liquid.mixtures.sort((a, b) => {
  8314. if (b.firstPriority < a.firstPriority)
  8315. return -1;
  8316. if (a.firstPriority < b.firstPriority)
  8317. return 1;
  8318. if (b.priority < a.priority)
  8319. return -1;
  8320. if (a.priority < b.priority)
  8321. return 1;
  8322. return 0;
  8323. });
  8324. Liquid.sortedMixtures = true;
  8325. return Liquid.mixtures;
  8326. }
  8327. static addMixture(mixture) {
  8328. Liquid.mixtures.push(mixture);
  8329. Liquid.sortedMixtures = false;
  8330. }
  8331. }
  8332. Liquid.rulebookMixing = new Rulebook("Mixing the liquid contents of something");
  8333. Liquid.mixtures = [];
  8334. Liquid.sortedMixtures = false;
  8335. Liquid.ruleDefaultMixing = Liquid.rulebookMixing.createAndAddRule({
  8336. name: "Mixing through Mixtures",
  8337. code: runner => {
  8338. if (runner.noun.liquidContents.length == 0) {
  8339. return;
  8340. }
  8341. let mixture;
  8342. for (let i = 0; i < Liquid.mixtures.length; i++) {
  8343. mixture = Liquid.mixtures[i];
  8344. let proportions = [];
  8345. let mixtureIterator = mixture.quantities.entries();
  8346. for (let mixtureLiquid = mixtureIterator.next(); !mixtureLiquid.done; mixtureLiquid = mixtureIterator.next()) {
  8347. let mixtureType = mixtureLiquid.value[0];
  8348. let mixtureQuantity = mixtureLiquid.value[1];
  8349. let matchedQuantity = 0;
  8350. runner.noun.liquidContents.forEach((liquidType) => {
  8351. try {
  8352. if (liquidType == mixtureType ||
  8353. (typeof mixtureType == "function" &&
  8354. (liquidType instanceof mixtureType || mixtureType(liquidType)))) {
  8355. matchedQuantity++;
  8356. }
  8357. }
  8358. catch (e) { }
  8359. });
  8360. proportions.push(matchedQuantity / mixtureQuantity);
  8361. }
  8362. if (proportions.every(function (element, index, array) {
  8363. return element === array[0];
  8364. })) {
  8365. return mixture;
  8366. }
  8367. }
  8368. }
  8369. });
  8370. class Scenery extends Thing {
  8371. constructor() {
  8372. super(...arguments);
  8373. this.fixedInPlace = true;
  8374. this.scenery = true;
  8375. }
  8376. }
  8377. class OrcDebugger extends Humanoid {
  8378. constructor() {
  8379. super({
  8380. isMale: true,
  8381. name: (() => {
  8382. let nameMod = OrcDebugger.nameModifier.getOne();
  8383. if (nameMod == undefined) {
  8384. nameMod = (OrcDebugger.counter++).toString();
  8385. }
  8386. return nameMod + " Orc";
  8387. })(),
  8388. unique: true,
  8389. description: "This is one extremely ugly fellow."
  8390. });
  8391. this.AI.wanderer = true;
  8392. this.AI.picksShinies = true;
  8393. }
  8394. }
  8395. OrcDebugger.nameModifier = new Shuffler([
  8396. "Ugly", "Muscular", "Veiny", "Angry", "Sad", "Smart", "Agile", "Short", "Bulging", "Intense", "Smouldering"
  8397. ]);
  8398. OrcDebugger.counter = 1;
  8399. ActionTalk.carry.createAndAddRule({
  8400. name: "Talking to the orc",
  8401. firstPriority: ActionTalk.PRIORITY_GLOBAL_DIALOGUE,
  8402. priority: ActionTalk.PRIORITY_COMMON_DIALOGUE,
  8403. conditions: (runner) => {
  8404. return runner.noun.getNoun(0) instanceof OrcDebugger;
  8405. },
  8406. code: (runner) => {
  8407. let orc = runner.noun.getNoun(0);
  8408. let result = Dice.testAgainstRoll({ name: "Charm + 2", value: WorldState.player.getStat(Attributes.Charm) + 2 }, { name: "Orc's wits + 2", value: orc.getStat(Attributes.Intelligence) + 2 });
  8409. if (result > 0) {
  8410. Elements.CurrentTurnHandler.printAsContent(new Say("You win!"));
  8411. }
  8412. else {
  8413. Elements.CurrentTurnHandler.printAsContent(new Say("You lose."));
  8414. }
  8415. return true;
  8416. }
  8417. });
  8418. class Semen extends Liquid {
  8419. constructor(cummer, options) {
  8420. super(options);
  8421. this.cummer = cummer;
  8422. }
  8423. }
  8424. var rooma = new RoomRandom("Room A");
  8425. rooma.description = new Say("You are inside a box of metal painted blue. Your head almost touches the ceiling, making the room look smaller than it really is.", Say.LINE_BREAK, new SayIf(() => {
  8426. return Thing.InsideRoomRelation.getLeft(vase) == rooma || Thing.InsideRoomRelation.getLeft(urn) == rooma;
  8427. }, " Still, there are some things thrown about."));
  8428. PlayBegins.setStartingRoom(rooma);
  8429. let paddedBra = new Clothing({ name: "Padded Bra", unique: true });
  8430. paddedBra.breastPadding = 3;
  8431. paddedBra.slots = [Humanoid.SLOT_BREASTS];
  8432. let paddedUnderwear = new Clothing({ name: "Padded Underwear", unique: true });
  8433. paddedUnderwear.crotchPadding = 15;
  8434. paddedUnderwear.slots = [Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_CROTCH_FRONT];
  8435. let player = WorldState.player;
  8436. WorldState.player = player;
  8437. var vase = new Thing({ name: "Vase" });
  8438. vase.description = new Say("This is an ornamental vase that'd look very nice on your lap. Why? Who knows.");
  8439. rooma.place(vase);
  8440. let mapOfTest = new MapNote({ name: "Map of this Region",
  8441. description: "This is a simple map showing all the rooms here.", unique: true });
  8442. rooma.place(mapOfTest);
  8443. let urn = new Thing({ unique: true, name: "Urn of Dreams", image: "image001" });
  8444. urn.description = new Say("This appears to be a simple, black urn containing the ashes of your dreams.");
  8445. rooma.place(urn);
  8446. var roomb = new RoomRandom("Room B");
  8447. roomb.place(vase);
  8448. let frillyPouch = new CoinPouch({
  8449. name: "Frilly Pouch",
  8450. description: new Say("This is a very gay little pink pouch full of little hearts.")
  8451. });
  8452. frillyPouch.addCoins(502);
  8453. rooma.place(frillyPouch);
  8454. let bigSack = new CoinPouch({ name: "Big Sack" });
  8455. bigSack.addCoins(100);
  8456. rooma.place(bigSack);
  8457. let region = new RegionRandom("Test Region");
  8458. region.place(rooma, roomb);
  8459. for (let i = 1; i < 6; i++) {
  8460. let room = new RoomRandom("Room " + i.toString());
  8461. region.place(room);
  8462. if (Math.random() > 0.5) {
  8463. }
  8464. }
  8465. mapOfTest.addRegion(region);
  8466. let southestRoom = new RoomRandom("Southest Room");
  8467. region.place(southestRoom);
  8468. southestRoom.appearChance = 100;
  8469. southestRoom.backgroundImage = "bloo";
  8470. southestRoom.trickyCode = (options) => {
  8471. let myCoordinates = [options.x, options.y];
  8472. for (let i = 0; i < Room.DIRECTIONS.length; i++) {
  8473. let direction = Room.DIRECTIONS[i];
  8474. if (direction != Direction.NORTH) {
  8475. let coordinates = Room.shift(myCoordinates, direction);
  8476. if (!options.map.isFree(coordinates[0], coordinates[1])) {
  8477. return false;
  8478. }
  8479. coordinates = Room.shift(coordinates, direction);
  8480. if (!options.map.isFree(coordinates[0], coordinates[1])) {
  8481. return false;
  8482. }
  8483. }
  8484. }
  8485. return true;
  8486. };
  8487. RegionRandom.rulebookAfterPlaceRoom.addRule(new Rule({
  8488. name: "After placing the southest room",
  8489. code: runner => {
  8490. let options = runner.noun;
  8491. let myCoordinates = options.map.getCoordinates(options.room);
  8492. if (myCoordinates != undefined) {
  8493. for (let i = 0; i < Room.DIRECTIONS.length; i++) {
  8494. let direction = Room.DIRECTIONS[i];
  8495. if (direction != Direction.NORTH) {
  8496. let coordinates = Room.shift(myCoordinates, direction);
  8497. options.map.block(coordinates[0], coordinates[1]);
  8498. coordinates = Room.shift(coordinates, direction);
  8499. options.map.block(coordinates[0], coordinates[1]);
  8500. }
  8501. }
  8502. }
  8503. },
  8504. conditions: runner => {
  8505. return runner.noun.room == southestRoom;
  8506. }
  8507. }));
  8508. Thing.CarryRelation.setRelation(WorldState.player, mapOfTest);
  8509. PlayBegins.rulebook.addRule(new Rule({
  8510. name: "randomize region",
  8511. firstPriority: Rule.PRIORITY_HIGHEST,
  8512. code: async (runner) => {
  8513. await region.randomize();
  8514. }
  8515. }));
  8516. RegionRandom.rulebookRandomizeRegion.addRule(new Rule({
  8517. name: "Add room A and B to region",
  8518. firstPriority: Rule.PRIORITY_HIGHEST,
  8519. code: async (runner) => {
  8520. await RegionRandom.rulebookPlaceRoom.execute({
  8521. noun: {
  8522. map: region.map,
  8523. room: rooma,
  8524. region: region
  8525. }
  8526. }).then();
  8527. await RegionRandom.rulebookPlaceRoom.execute({
  8528. noun: {
  8529. map: region.map,
  8530. room: roomb,
  8531. region: region
  8532. }
  8533. }).then();
  8534. },
  8535. conditions: runner => {
  8536. return runner.noun == region;
  8537. }
  8538. }));
  8539. function getPath(rooma, roomb) {
  8540. console.debug("The best path from " + rooma.getPrintedName() + " to " + roomb.getPrintedName() + " is:");
  8541. let t0, dir, t1;
  8542. t0 = performance.now();
  8543. dir = rooma.bestDirectionTo(roomb);
  8544. t1 = performance.now();
  8545. if (dir != undefined) {
  8546. console.debug(DirectionNames[Direction[dir]]);
  8547. }
  8548. else {
  8549. console.debug("There is no path.");
  8550. }
  8551. console.debug("Call to doSomething took " + (t1 - t0) + " milliseconds.");
  8552. }
  8553. let wanderRegion = new RegionRandom("OrcableRegion");
  8554. wanderRegion.place(rooma, roomb);
  8555. region.place(wanderRegion);
  8556. let rooms = region.getRooms();
  8557. let shuffler = new Shuffler(rooms);
  8558. for (let i = 0; i < 0; i++) {
  8559. AI.rules.createAndAddRule({
  8560. name: "Pick Shinies",
  8561. firstPriority: AIRules.PRIORITY_ACTING_ON_PLACE,
  8562. conditions: (runner) => {
  8563. let person = runner.noun;
  8564. return person.AI.picksShinies;
  8565. },
  8566. code: (runner) => {
  8567. let person = runner.noun;
  8568. let room = person.getRoom();
  8569. let visibleThings = room.getContainedAndVisibleTo(person);
  8570. if (visibleThings.length > 0) {
  8571. for (let i = 0; i < visibleThings.length; i++) {
  8572. if (!visibleThings[i].fixedInPlace && visibleThings[i].getShiny()) {
  8573. return new ActionTake(person, visibleThings[i]);
  8574. }
  8575. }
  8576. }
  8577. }
  8578. });
  8579. }
  8580. let randomOrc;
  8581. let randomOrc2;
  8582. for (let i = 0; i < 10; i++) {
  8583. let orc = new OrcDebugger();
  8584. randomOrc = orc;
  8585. if (randomOrc2 == undefined) {
  8586. randomOrc2 = orc;
  8587. }
  8588. orc.AI.wanderer = true;
  8589. orc.AI.picksShinies = true;
  8590. orc.AI.wandersOn = wanderRegion;
  8591. let room = new Shuffler(region.getRooms()).getOne();
  8592. room.place(orc);
  8593. }
  8594. var fTarget = new ContentGroup();
  8595. fTarget.addUnit(new FuckingUnit()
  8596. .setFucked(WorldState.player)
  8597. .setFucker(randomOrc)
  8598. .setHole(WorldState.player.getPart(HumanoidVagina))
  8599. .setStick(randomOrc.getPart(HumanoidPenis))
  8600. .addMarker(FuckingState.CUM_START));
  8601. (new FuckingDescription("Specific Orc in Vagina"))
  8602. .setDescription(new Say("Specific Orc in Vagina"))
  8603. .addUnit()
  8604. .setFucker(randomOrc)
  8605. .setHole(WorldState.player.getPart(HumanoidVagina))
  8606. .setStick(randomOrc.getPart(HumanoidPenis));
  8607. (new FuckingDescription("Specific Orc Starts Cumming in Vagina"))
  8608. .setDescription(new Say("Specific Orc Starts Cumming in Vagina"))
  8609. .addUnit()
  8610. .setFucker(randomOrc)
  8611. .setHole(WorldState.player.getPart(HumanoidVagina))
  8612. .addMarker(FuckingState.CUM_START)
  8613. .setStick(randomOrc.getPart(HumanoidPenis));
  8614. var DialogueTrees;
  8615. (function (DialogueTrees) {
  8616. DialogueTrees.CreationIntro = (function () {
  8617. let tree = new DialogueTree("CreationIntro");
  8618. let node;
  8619. let text;
  8620. let set;
  8621. node = new DialogueNode("ae981322-9151-49c8-a889-94455db7c262");
  8622. node.setNext("81582dea-ba27-4baa-8df2-a77fbb5ed9ef");
  8623. tree.addStartNode(node);
  8624. text = new DialogueText("f72bf099-bae2-49df-9433-c9c3ec6a020d");
  8625. text.setSay(() => { return new Say("As you approach the Obelisk, many dreams and nightmares will become reality as it attempts to dissuade you from getting too close, with the intensity increasing the closer you get to your objective.", Say.PARAGRAPH_BREAK, "Ultimately, the Obelisk wishes you no harm, for it is better to have you around as a protector than as a dead enemy, so the Obelisk will attempt to give you exactly what you want deep in your heart, trying to make you completely satisfied so that you no longer wish for the Obelisk's destruction or become unable to continue your quest. Of course, what your heart wants is not necessarily what you think it wants.", Say.PARAGRAPH_BREAK, "Orcs, the most common creature to come out of the Obelisk, are nothing more than humans warped by their own desire for unbridled violence. What will the Obelisk do to you?", Say.PARAGRAPH_BREAK, "On the following screens, you will define who you will be in this story. Please confirm carefully, as there is no turning back."); });
  8626. text.setNext("66d4b27a-ff40-4a8e-a749-2b5e8237695a");
  8627. tree.addNode(text);
  8628. set = new DialogueSet("81582dea-ba27-4baa-8df2-a77fbb5ed9ef");
  8629. set.setFunction(() => { Elements.startMenu(); });
  8630. set.setNext("f72bf099-bae2-49df-9433-c9c3ec6a020d");
  8631. tree.addNode(set);
  8632. set = new DialogueSet("0b4fec87-a2b0-4e3b-81ed-a4150f94fc10");
  8633. set.setFunction(() => { Elements.endMenu(); });
  8634. tree.addNode(set);
  8635. set = new DialogueSet("66d4b27a-ff40-4a8e-a749-2b5e8237695a");
  8636. set.setFunction(() => { return Elements.waitForAnyKey(); });
  8637. set.setNext("0b4fec87-a2b0-4e3b-81ed-a4150f94fc10");
  8638. tree.addNode(set);
  8639. return tree;
  8640. })();
  8641. })(DialogueTrees || (DialogueTrees = {}));
  8642. var CharacterCreation;
  8643. (function (CharacterCreation) {
  8644. CharacterCreation.CreationIntro = CharacterCreation.rulebook.createAndAddRule({
  8645. name: "Show small Intro",
  8646. firstPriority: Rule.PRIORITY_HIGHEST,
  8647. priority: Rule.PRIORITY_HIGHEST,
  8648. code: async () => {
  8649. await DialogueTrees.CreationIntro.execute();
  8650. }
  8651. });
  8652. })(CharacterCreation || (CharacterCreation = {}));
  8653. var CharacterCreation;
  8654. (function (CharacterCreation) {
  8655. let ccDiv = document.createElement("div");
  8656. ccDiv.id = "characterCreation";
  8657. let rightSide = document.createElement("div");
  8658. rightSide.id = "ccRight";
  8659. let leftSide = document.createElement("div");
  8660. leftSide.id = "ccLeft";
  8661. ccDiv.appendChild(leftSide);
  8662. ccDiv.appendChild(rightSide);
  8663. let resolver;
  8664. async function printTable() {
  8665. printOrigin();
  8666. while (leftSide.firstChild)
  8667. leftSide.removeChild(leftSide.firstChild);
  8668. await (new Say(new SayBold("Character Origin:")).getHTMLContent().then(eles => {
  8669. eles.forEach(ele => {
  8670. leftSide.appendChild(ele);
  8671. });
  8672. }));
  8673. let origins = CharacterOrigin.getOrigins();
  8674. for (let i = 0; i < origins.length; i++) {
  8675. let origin = origins[i];
  8676. let say = new Say(origin.name);
  8677. if (origin.id == CharacterCreation.PlayerOrigin.value) {
  8678. say.add(" - SELECTED");
  8679. }
  8680. await (say).getHTML("p", ["choice"]).then(elementArray => {
  8681. Controls.Links.makeCustomLink(elementArray[0], {
  8682. mouseover: () => {
  8683. printOrigin(origin);
  8684. },
  8685. mouseout: () => {
  8686. printOrigin();
  8687. },
  8688. click: () => {
  8689. CharacterCreation.PlayerOrigin.value = origin.id;
  8690. reset();
  8691. }
  8692. });
  8693. Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
  8694. leftSide.appendChild(elementArray[0]);
  8695. });
  8696. }
  8697. }
  8698. function printConfirm() {
  8699. (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => {
  8700. elementArray[0].addEventListener("click", () => {
  8701. resolver();
  8702. });
  8703. Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
  8704. Elements.CurrentTurnHandler.print(elementArray[0]);
  8705. });
  8706. }
  8707. function printOrigin(origin) {
  8708. if (origin == undefined) {
  8709. origin = CharacterOrigin.getOrigin(CharacterCreation.PlayerOrigin.value);
  8710. }
  8711. let say = new Say(origin.description);
  8712. if (origin.bonusStats != undefined) {
  8713. say.add(Say.PARAGRAPH_BREAK, origin.bonusStats);
  8714. }
  8715. say.getHTMLContent().then((eles => {
  8716. while (rightSide.firstChild)
  8717. rightSide.removeChild(rightSide.firstChild);
  8718. for (let i = 0; i < eles.length; i++) {
  8719. rightSide.appendChild(eles[i]);
  8720. }
  8721. }));
  8722. }
  8723. function reset() {
  8724. Elements.CurrentTurnHandler.clear();
  8725. Elements.CurrentTurnHandler.print(ccDiv);
  8726. printTable();
  8727. Elements.CurrentTurnHandler.print(document.createElement("br"));
  8728. Elements.CurrentTurnHandler.print(document.createElement("br"));
  8729. printConfirm();
  8730. }
  8731. CharacterCreation.CCOrigin = CharacterCreation.rulebook.createAndAddRule({
  8732. name: "Character Creation - Origin",
  8733. firstPriority: Rule.PRIORITY_MEDIUM,
  8734. priority: Rule.PRIORITY_HIGH,
  8735. code: async () => {
  8736. Elements.startMenu();
  8737. let promise = new Promise(resolve => {
  8738. resolver = resolve;
  8739. });
  8740. reset();
  8741. await promise;
  8742. CharacterCreation.getOrigin().confirmPicked();
  8743. Elements.endMenu();
  8744. }
  8745. });
  8746. })(CharacterCreation || (CharacterCreation = {}));
  8747. var CharacterCreation;
  8748. (function (CharacterCreation) {
  8749. let ccDiv = document.createElement("div");
  8750. ccDiv.id = "characterCreation";
  8751. let rightSide = document.createElement("div");
  8752. rightSide.id = "ccRight";
  8753. let leftSide = document.createElement("div");
  8754. leftSide.id = "ccLeft";
  8755. ccDiv.appendChild(leftSide);
  8756. ccDiv.appendChild(rightSide);
  8757. let resolver;
  8758. async function printTable() {
  8759. while (leftSide.firstChild)
  8760. leftSide.removeChild(leftSide.firstChild);
  8761. await (new Say(new SayBold("Perks (Choose any):")).getHTMLContent().then(eles => {
  8762. eles.forEach(ele => {
  8763. leftSide.appendChild(ele);
  8764. });
  8765. }));
  8766. let perks = Perk.getPerks();
  8767. for (let i = 0; i < perks.length; i++) {
  8768. let perk = perks[i];
  8769. let say = new Say(perk.name);
  8770. if (perk.isEnabled()) {
  8771. if (perk.isForced()) {
  8772. say.add(" (Mandatory)");
  8773. }
  8774. else {
  8775. say.add(" - Selected");
  8776. }
  8777. }
  8778. else if (perk.isForced()) {
  8779. say.add(" (Forbidden)");
  8780. }
  8781. await (say).getHTML("p", ["choice"]).then(elementArray => {
  8782. Controls.Links.makeCustomLink(elementArray[0], {
  8783. mouseover: () => {
  8784. printPerk(perk);
  8785. },
  8786. mouseout: () => {
  8787. emptyPerk();
  8788. },
  8789. click: () => {
  8790. if (!perk.isForced()) {
  8791. perk.value = !perk.value;
  8792. }
  8793. reset();
  8794. }
  8795. });
  8796. Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
  8797. leftSide.appendChild(elementArray[0]);
  8798. });
  8799. }
  8800. }
  8801. function printConfirm() {
  8802. (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => {
  8803. elementArray[0].addEventListener("click", () => {
  8804. resolver();
  8805. });
  8806. Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
  8807. Elements.CurrentTurnHandler.print(elementArray[0]);
  8808. });
  8809. }
  8810. function emptyPerk() {
  8811. while (rightSide.firstChild)
  8812. rightSide.removeChild(rightSide.firstChild);
  8813. }
  8814. function printPerk(perk) {
  8815. let say = new Say(perk.description);
  8816. say.getHTMLContent().then((eles => {
  8817. emptyPerk();
  8818. for (let i = 0; i < eles.length; i++) {
  8819. rightSide.appendChild(eles[i]);
  8820. }
  8821. }));
  8822. }
  8823. function reset() {
  8824. Perk.updatePerks();
  8825. Elements.CurrentTurnHandler.clear();
  8826. Elements.CurrentTurnHandler.print(ccDiv);
  8827. printTable();
  8828. Elements.CurrentTurnHandler.print(document.createElement("br"));
  8829. Elements.CurrentTurnHandler.print(document.createElement("br"));
  8830. printConfirm();
  8831. }
  8832. CharacterCreation.CCPerk = CharacterCreation.rulebook.createAndAddRule({
  8833. name: "Character Creation - Origin",
  8834. firstPriority: Rule.PRIORITY_LOW,
  8835. priority: Rule.PRIORITY_HIGH,
  8836. code: async () => {
  8837. Elements.startMenu();
  8838. let promise = new Promise(resolve => {
  8839. resolver = resolve;
  8840. });
  8841. reset();
  8842. await promise;
  8843. let perks = Perk.getPerks();
  8844. perks.forEach(perk => {
  8845. if (perk.isEnabled()) {
  8846. perk.confirmPicked();
  8847. }
  8848. });
  8849. Elements.endMenu();
  8850. }
  8851. });
  8852. })(CharacterCreation || (CharacterCreation = {}));
  8853. var CharacterCreation;
  8854. (function (CharacterCreation) {
  8855. function createRange(options) {
  8856. let valueNode = document.createTextNode(String(options.value));
  8857. let div = document.createElement("div");
  8858. div.classList.add("ccOption");
  8859. if (options.topLabel != undefined) {
  8860. let topLabel = document.createElement("div");
  8861. topLabel.classList.add("ccOptionTopLabel");
  8862. topLabel.appendChild(document.createTextNode(options.topLabel + ":"));
  8863. div.appendChild(topLabel);
  8864. }
  8865. let label = document.createElement("div");
  8866. if (options.showValue != false) {
  8867. label.classList.add("rangeValue");
  8868. if (options.label != undefined) {
  8869. let b = document.createElement("b");
  8870. b.appendChild(document.createTextNode(options.label + ": "));
  8871. label.appendChild(b);
  8872. }
  8873. label.appendChild(valueNode);
  8874. }
  8875. let input = document.createElement("input");
  8876. input.classList.add("ccRange");
  8877. input.type = "range";
  8878. input.min = options.minValue.toString();
  8879. input.max = options.maxValue.toString();
  8880. input.step = options.step.toString();
  8881. input.value = options.value.toString();
  8882. let onChange = () => {
  8883. valueNode.nodeValue = input.value;
  8884. options.onChange(Number(input.value), valueNode, input);
  8885. };
  8886. input.addEventListener("change", onChange);
  8887. let leftButton = document.createElement("a");
  8888. leftButton.classList.add("ccButton");
  8889. leftButton.addEventListener("click", () => {
  8890. input.value = String(Number(input.value) - options.step);
  8891. onChange();
  8892. });
  8893. Controls.KeyHandler.applyCode(leftButton, Controls.KeyHandler.getFirstKeyCode());
  8894. if (options.leftLabel != undefined) {
  8895. leftButton.appendChild(document.createTextNode(options.leftLabel));
  8896. }
  8897. let rightButton = document.createElement("a");
  8898. rightButton.classList.add("ccButton");
  8899. rightButton.addEventListener("click", () => {
  8900. input.value = String(Number(input.value) + options.step);
  8901. onChange();
  8902. });
  8903. Controls.KeyHandler.applyCode(rightButton, Controls.KeyHandler.getFirstKeyCode());
  8904. ;
  8905. if (options.rightLabel != undefined) {
  8906. rightButton.appendChild(document.createTextNode(options.rightLabel));
  8907. }
  8908. div.appendChild(leftButton);
  8909. div.appendChild(input);
  8910. div.appendChild(rightButton);
  8911. div.appendChild(label);
  8912. onChange();
  8913. return div;
  8914. }
  8915. CharacterCreation.CCSexStats = CharacterCreation.rulebook.createAndAddRule({
  8916. name: "Character Creation - Sex and Stats",
  8917. firstPriority: Rule.PRIORITY_HIGH,
  8918. priority: Rule.PRIORITY_HIGH,
  8919. code: () => {
  8920. Elements.startMenu();
  8921. let ccDiv = document.createElement("div");
  8922. ccDiv.id = "characterCreation";
  8923. let ccLeft = document.createElement("div");
  8924. ccLeft.id = "ccLeft";
  8925. ccDiv.appendChild(ccLeft);
  8926. let ccRight = document.createElement("div");
  8927. ccRight.id = "ccRight";
  8928. ccDiv.appendChild(ccRight);
  8929. let onChange = () => {
  8930. (new Say(WorldState.player.description)).getHTMLContent().then((value => {
  8931. while (ccRight.firstChild)
  8932. ccRight.removeChild(ccRight.firstChild);
  8933. value.forEach(val => {
  8934. ccRight.appendChild(val);
  8935. });
  8936. }));
  8937. };
  8938. ccLeft.appendChild(createRange({
  8939. minValue: 0, maxValue: 1, step: 1, value: 0, leftLabel: "Male", rightLabel: "Female", topLabel: "Sex",
  8940. onChange: (value, labelValue, input) => {
  8941. labelValue.nodeValue = (value == 0 ? "Male" : "Female");
  8942. WorldState.player.removeGenderedParts();
  8943. if (value == 0) {
  8944. WorldState.player.addMaleParts();
  8945. }
  8946. else {
  8947. WorldState.player.addFemaleParts();
  8948. }
  8949. let otherInputs = ccDiv.getElementsByTagName("input");
  8950. for (let i = 0; i < otherInputs.length; i++) {
  8951. let otherInput = otherInputs[i];
  8952. if (otherInput != input) {
  8953. otherInput.dispatchEvent(new Event("change"));
  8954. }
  8955. }
  8956. onChange();
  8957. }
  8958. }));
  8959. ccLeft.appendChild(createRange({
  8960. minValue: 0, maxValue: 4, step: 1, value: 2, leftLabel: "Masculine", rightLabel: "Feminine", topLabel: "Gender",
  8961. onChange: (value, labelValue) => {
  8962. let names = ["Masculine", "Somewhat masculine", "Androgynous", "Somewhat feminine", "Feminine"];
  8963. labelValue.nodeValue = names[value];
  8964. let player = WorldState.player;
  8965. let intendedValue;
  8966. if (player.isMale()) {
  8967. let values = [10, 25, 50, 55, 60];
  8968. intendedValue = values[value];
  8969. }
  8970. else {
  8971. let values = [35, 40, 50, 65, 75];
  8972. intendedValue = values[value];
  8973. }
  8974. WorldState.player.setGenderValue(intendedValue);
  8975. WorldState.player.setStat(Attributes.GenderIdentity, intendedValue);
  8976. onChange();
  8977. }
  8978. }));
  8979. let statsHeader = document.createElement("div");
  8980. ccLeft.appendChild(statsHeader);
  8981. statsHeader.classList.add("ccHeader");
  8982. statsHeader.appendChild(document.createTextNode("Stats ("));
  8983. let maxStats = 12;
  8984. let statsRemaining = document.createTextNode("4 points remaining");
  8985. statsHeader.appendChild(statsRemaining);
  8986. statsHeader.appendChild(document.createTextNode(")"));
  8987. let setStat = (attr, value, input) => {
  8988. player.setStat(attr, value);
  8989. let remaining = maxStats
  8990. - player.getStat(Attributes.Strength)
  8991. - player.getStat(Attributes.Agility)
  8992. - player.getStat(Attributes.Intelligence)
  8993. - player.getStat(Attributes.Charm);
  8994. if (remaining < 0) {
  8995. value += remaining;
  8996. remaining = 0;
  8997. input.value = value.toString();
  8998. input.dispatchEvent(new Event("change"));
  8999. return;
  9000. }
  9001. statsRemaining.nodeValue = (remaining == 0 ? "Done" :
  9002. remaining > 1 ? remaining.toString() + " points remaining" :
  9003. remaining.toString() + " point remaining");
  9004. };
  9005. ccLeft.appendChild(createRange({
  9006. minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Strength",
  9007. onChange: (value, labelValue, input) => {
  9008. setStat(Attributes.Strength, value, input);
  9009. onChange();
  9010. }
  9011. }));
  9012. ccLeft.appendChild(createRange({
  9013. minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Agility",
  9014. onChange: (value, labelValue, input) => {
  9015. setStat(Attributes.Agility, value, input);
  9016. onChange();
  9017. }
  9018. }));
  9019. ccLeft.appendChild(createRange({
  9020. minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Charm",
  9021. onChange: (value, labelValue, input) => {
  9022. setStat(Attributes.Charm, value, input);
  9023. onChange();
  9024. }
  9025. }));
  9026. ccLeft.appendChild(createRange({
  9027. minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Intelligence",
  9028. onChange: (value, labelValue, input) => {
  9029. setStat(Attributes.Intelligence, value, input);
  9030. onChange();
  9031. }
  9032. }));
  9033. let creationDone = new Promise((resolve) => {
  9034. (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => {
  9035. elementArray[0].addEventListener("click", () => {
  9036. Elements.endMenu();
  9037. resolve();
  9038. });
  9039. Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
  9040. Elements.CurrentTurnHandler.print(elementArray[0]);
  9041. });
  9042. });
  9043. Elements.CurrentTurnHandler.print(ccDiv);
  9044. return creationDone;
  9045. }
  9046. });
  9047. })(CharacterCreation || (CharacterCreation = {}));
  9048. var PlayBegins;
  9049. (function (PlayBegins) {
  9050. PlayBegins.LOAD_FAILED = false;
  9051. PlayBegins.CONTINUE_FAILED = false;
  9052. PlayBegins.IntroMenuRule = PlayBegins.rulebook.createAndAddRule({
  9053. name: "Intro Menu Rule",
  9054. firstPriority: Rule.PRIORITY_HIGHEST,
  9055. priority: Rule.PRIORITY_HIGHEST,
  9056. code: async (runner) => {
  9057. await DialogueTrees.IntroMenu.execute();
  9058. }
  9059. });
  9060. })(PlayBegins || (PlayBegins = {}));
  9061. var DialogueTrees;
  9062. (function (DialogueTrees) {
  9063. DialogueTrees.IntroMenu = (function () {
  9064. let tree = new DialogueTree("IntroMenu");
  9065. let node;
  9066. let choice;
  9067. let text;
  9068. let branch;
  9069. let set;
  9070. node = new DialogueNode("b018bb28-4efc-493b-ac37-31634c4e6406");
  9071. node.setNext("f448e718-9d24-4191-9913-ccc36d97c4c0");
  9072. tree.addStartNode(node);
  9073. choice = new DialogueChoice("3b8c8bcb-0ac8-40dc-9f62-4abbde0d0f7f");
  9074. choice.setSay(() => { return new Say("Start Game"); });
  9075. choice.setNext("719e71dd-9989-4015-93af-9fb7096002c1");
  9076. tree.addNode(choice);
  9077. choice = new DialogueChoice("53710087-4002-41b7-b089-cadabedbcafd");
  9078. choice.setSay(() => { return new Say("Load from file"); });
  9079. choice.setNext("f25f6525-dad6-45d7-a391-246c1b02b569");
  9080. tree.addNode(choice);
  9081. choice = new DialogueChoice("b4593a36-ca83-4afc-b01b-e71344ca6e1f");
  9082. choice.setSay(() => { return new Say("Settings"); });
  9083. choice.setNext("d4a379b5-06c9-4fca-a25c-b1a31b6bf93d");
  9084. tree.addNode(choice);
  9085. choice = new DialogueChoice("4c5032a5-5509-4a00-b8c7-788e7ddbf17d");
  9086. choice.setSay(() => { return new Say("About"); });
  9087. choice.setNext("6b3f385b-8283-4635-9c73-e2303d77642d");
  9088. tree.addNode(choice);
  9089. node = new DialogueNode("674841a6-3752-4c81-977d-19e111536203");
  9090. node.setName("2");
  9091. node.setChoices(["3b8c8bcb-0ac8-40dc-9f62-4abbde0d0f7f", "53710087-4002-41b7-b089-cadabedbcafd", "4c5032a5-5509-4a00-b8c7-788e7ddbf17d", "b4593a36-ca83-4afc-b01b-e71344ca6e1f", "a55f46fa-98a9-4dff-9f1c-4f88c18ce8dd"]);
  9092. tree.addNode(node);
  9093. text = new DialogueText("bc32e411-3c54-4747-ad79-506fc5a9d6c9");
  9094. text.setSay(() => { return new Say(Say.CENTERED, new SayImage("introLogo"), Say.LINE_BREAK, new SayItalic("The Obelisk is an adult interactive fiction game set in a post-apocalyptic world ravaged by a magical structure.")); });
  9095. text.setNext("36da9ea6-909c-4c0c-94d1-a17fef44452d");
  9096. tree.addNode(text);
  9097. text = new DialogueText("36da9ea6-909c-4c0c-94d1-a17fef44452d");
  9098. text.setSay(() => { return new Say("A sleek, black obelisk appeared, monsters pouring from it, threatening the world. Many tried to reach the obelisk, only to return changed - monstrous. Civilization was unable to cope with the creatures and humanity soon returned to its old, tribal ways, humans becoming rarer with each passing day. Centuries have passed and technology is now scarce, with people leading simpler lives in small settlements.", Say.PARAGRAPH_BREAK, "You were born in the ashes of the old world, living in isolation as you and your fellow men attempt to stay safe from the evils of The Obelisk. ", Say.PARAGRAPH_BREAK, "Now, fate has decided you must go, reach The Obelisk and destroy it. Will you succeed in stopping it, or will you lose yourself to all the changes it will bring to you?"); });
  9099. text.setNext("674841a6-3752-4c81-977d-19e111536203");
  9100. tree.addNode(text);
  9101. node = new DialogueNode("9f11871f-eebd-4b9a-b3db-ed9be8cf78e7");
  9102. node.setName("1");
  9103. node.setNext("9eeb2100-917d-41fd-b756-6d3b80e92463");
  9104. tree.addNode(node);
  9105. branch = new DialogueBranch("5d1dfb86-abd9-4ad6-bf07-8ced5476e401");
  9106. branch.setVariable(() => { return PlayBegins.LOAD_FAILED; });
  9107. branch.addBranch("415dc32a-1549-429d-9ac4-8cd1b4c92c14", () => { return true; });
  9108. branch.setNext("f82fc177-b4bd-4f06-b7ab-216259e056a5");
  9109. tree.addNode(branch);
  9110. set = new DialogueSet("f82fc177-b4bd-4f06-b7ab-216259e056a5");
  9111. set.setFunction(() => { Elements.endMenu(); });
  9112. tree.addNode(set);
  9113. set = new DialogueSet("9eeb2100-917d-41fd-b756-6d3b80e92463");
  9114. set.setFunction(() => { Elements.clearMainScreen(); });
  9115. set.setNext("bc32e411-3c54-4747-ad79-506fc5a9d6c9");
  9116. tree.addNode(set);
  9117. node = new DialogueNode("415dc32a-1549-429d-9ac4-8cd1b4c92c14");
  9118. node.setNext("1");
  9119. tree.addNode(node);
  9120. set = new DialogueSet("f448e718-9d24-4191-9913-ccc36d97c4c0");
  9121. set.setFunction(() => { Elements.startMenu(); tree.setRepeatChoices(false); });
  9122. set.setNext("9f11871f-eebd-4b9a-b3db-ed9be8cf78e7");
  9123. tree.addNode(set);
  9124. choice = new DialogueChoice("ef9253b9-5c24-46cc-8e2d-5562a1544f07");
  9125. choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(0)); });
  9126. choice.setNext("9594cf06-6062-4952-b378-6aedaafe2951");
  9127. tree.addNode(choice);
  9128. choice = new DialogueChoice("82c512c6-0115-4d72-a413-5728a623f04b");
  9129. choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(1)); });
  9130. choice.setNext("fe95cfb3-b9f5-4b12-83aa-94d26e5bcac0");
  9131. tree.addNode(choice);
  9132. choice = new DialogueChoice("7315835a-4d95-4377-828c-8a4ca7e49f87");
  9133. choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(2)); });
  9134. choice.setNext("dc884974-7bb2-436f-b3a4-cdf8550bd494");
  9135. tree.addNode(choice);
  9136. choice = new DialogueChoice("50afd6f8-87ce-49bf-b689-4819bc5dc8e7");
  9137. choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(3)); });
  9138. choice.setNext("62f5ea88-c6f0-4469-87f2-ea3b37638509");
  9139. tree.addNode(choice);
  9140. choice = new DialogueChoice("d79e9955-f81e-4ac9-8246-a02b0bd49dae");
  9141. choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(4)); });
  9142. choice.setNext("ee4ecd8b-59e2-43a6-8150-8a835d6eeae1");
  9143. tree.addNode(choice);
  9144. node = new DialogueNode("719e71dd-9989-4015-93af-9fb7096002c1");
  9145. node.setName("SlotChoices");
  9146. node.setChoices(["ef9253b9-5c24-46cc-8e2d-5562a1544f07", "82c512c6-0115-4d72-a413-5728a623f04b", "7315835a-4d95-4377-828c-8a4ca7e49f87", "50afd6f8-87ce-49bf-b689-4819bc5dc8e7", "d79e9955-f81e-4ac9-8246-a02b0bd49dae", "9483a087-04d0-48dd-884f-946930771b95", "defe0f4c-4452-40f3-aff1-ba076263fcbc"]);
  9147. tree.addNode(node);
  9148. set = new DialogueSet("9594cf06-6062-4952-b378-6aedaafe2951");
  9149. set.setFunction(() => { SaveHandler.setSlot(0); });
  9150. set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9151. tree.addNode(set);
  9152. set = new DialogueSet("fe95cfb3-b9f5-4b12-83aa-94d26e5bcac0");
  9153. set.setFunction(() => { SaveHandler.setSlot(1); });
  9154. set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9155. tree.addNode(set);
  9156. set = new DialogueSet("dc884974-7bb2-436f-b3a4-cdf8550bd494");
  9157. set.setFunction(() => { SaveHandler.setSlot(2); });
  9158. set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9159. tree.addNode(set);
  9160. set = new DialogueSet("62f5ea88-c6f0-4469-87f2-ea3b37638509");
  9161. set.setFunction(() => { SaveHandler.setSlot(3); });
  9162. set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9163. tree.addNode(set);
  9164. set = new DialogueSet("ee4ecd8b-59e2-43a6-8150-8a835d6eeae1");
  9165. set.setFunction(() => { SaveHandler.setSlot(4); });
  9166. set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9167. tree.addNode(set);
  9168. set = new DialogueSet("f25f6525-dad6-45d7-a391-246c1b02b569");
  9169. set.setFunction(() => { return SaveHandler.loadFromFile(); });
  9170. set.setNext("5d1dfb86-abd9-4ad6-bf07-8ced5476e401");
  9171. tree.addNode(set);
  9172. choice = new DialogueChoice("9483a087-04d0-48dd-884f-946930771b95");
  9173. choice.setSay(() => { return new Say("Erase a save"); });
  9174. choice.setConditions(() => { return !SaveHandler.isErasing(); });
  9175. choice.setNext("ee65c84a-021f-44d3-aa34-50235f438c96");
  9176. tree.addNode(choice);
  9177. choice = new DialogueChoice("defe0f4c-4452-40f3-aff1-ba076263fcbc");
  9178. choice.setSay(() => { return new Say("Don't erase my saves!"); });
  9179. choice.setConditions(() => { return SaveHandler.isErasing(); });
  9180. choice.setNext("ee65c84a-021f-44d3-aa34-50235f438c96");
  9181. tree.addNode(choice);
  9182. set = new DialogueSet("ee65c84a-021f-44d3-aa34-50235f438c96");
  9183. set.setFunction(() => { SaveHandler.toggleErasing(); });
  9184. set.setNext("6f15f7d6-4944-4b93-9d47-7046e8ae1f15");
  9185. tree.addNode(set);
  9186. node = new DialogueNode("6f15f7d6-4944-4b93-9d47-7046e8ae1f15");
  9187. node.setNext("SlotChoices");
  9188. tree.addNode(node);
  9189. set = new DialogueSet("915492f1-8fa7-4ddc-9dc0-6b0340f738c8");
  9190. set.setFunction(() => { return SaveHandler.loadFromStorage(); });
  9191. set.setNext("f82fc177-b4bd-4f06-b7ab-216259e056a5");
  9192. tree.addNode(set);
  9193. node = new DialogueNode("d4a379b5-06c9-4fca-a25c-b1a31b6bf93d");
  9194. node.setNext("Settings");
  9195. tree.addNode(node);
  9196. node = new DialogueNode("6b3f385b-8283-4635-9c73-e2303d77642d");
  9197. node.setNext("About");
  9198. tree.addNode(node);
  9199. node = new DialogueNode("b75c038c-654c-4c62-8f49-2f4518f52cff");
  9200. node.setName("Settings");
  9201. node.setNext("d33456b8-72b6-4214-90b3-3eba2442b287");
  9202. tree.addNode(node);
  9203. text = new DialogueText("d33456b8-72b6-4214-90b3-3eba2442b287");
  9204. text.setSay(() => { return new Say("Not implemented."); });
  9205. text.setNext("bc24b446-d6a2-4284-93fb-67ad3598fcd1");
  9206. tree.addNode(text);
  9207. set = new DialogueSet("bc24b446-d6a2-4284-93fb-67ad3598fcd1");
  9208. set.setFunction(() => { return Elements.waitForAnyKey(); });
  9209. set.setNext("81f9d62b-907e-48ae-84fe-78c7cecc4fe3");
  9210. tree.addNode(set);
  9211. node = new DialogueNode("81f9d62b-907e-48ae-84fe-78c7cecc4fe3");
  9212. node.setNext("1");
  9213. tree.addNode(node);
  9214. node = new DialogueNode("c342e112-5c73-4c82-8882-47ca3a71c914");
  9215. node.setName("About");
  9216. node.setNext("d33456b8-72b6-4214-90b3-3eba2442b287");
  9217. tree.addNode(node);
  9218. choice = new DialogueChoice("a55f46fa-98a9-4dff-9f1c-4f88c18ce8dd");
  9219. choice.setSay(() => { return new Say("Note about content (Spoiler Alert)"); });
  9220. choice.setNext("7c2060aa-66ce-4dbb-88d2-0c8f190e0a6c");
  9221. tree.addNode(choice);
  9222. text = new DialogueText("59a3cb30-d4ba-4b46-8157-b900fc7022dd");
  9223. text.setSay(() => { return new Say(Say.CENTERED, new SayImage("introLogo"), Say.LINE_BREAK, new SayItalic("The Obelisk is an adult interactive fiction game set in a post-apocalyptic world ravaged by a magical structure.")); });
  9224. text.setNext("1b8bdc9d-a4bf-40aa-a382-f7813c158840");
  9225. tree.addNode(text);
  9226. set = new DialogueSet("c27829b7-7199-4b1e-9334-536258546cfc");
  9227. set.setFunction(() => { return Elements.waitForAnyKey(); });
  9228. set.setNext("42401145-9154-40c3-a9d3-4f83df97b89e");
  9229. tree.addNode(set);
  9230. node = new DialogueNode("42401145-9154-40c3-a9d3-4f83df97b89e");
  9231. node.setNext("1");
  9232. tree.addNode(node);
  9233. set = new DialogueSet("7c2060aa-66ce-4dbb-88d2-0c8f190e0a6c");
  9234. set.setFunction(() => { Elements.clearMainScreen(); });
  9235. set.setNext("59a3cb30-d4ba-4b46-8157-b900fc7022dd");
  9236. tree.addNode(set);
  9237. text = new DialogueText("1b8bdc9d-a4bf-40aa-a382-f7813c158840");
  9238. text.setSay(() => { return new Say("In this story, the Obelisk will attempt to give the player exactly what the player wants, but that's not always what the player thinks they want. This is a pornographic game first and a roleplaying game second, which means that it is assumed that the player character wants sex - even if they don't act like it.", Say.PARAGRAPH_BREAK, "Therefore, this game will \"fit\" for players who go in with that mentality, but it ", new SayBold("will"), " look differently for players with a different point of view for their characters. While roleplaying is encouraged, that is not how the game was written, so if you're playing it that way, it's just your choice.", Say.PARAGRAPH_BREAK, "There is no sex without explicit consent from the NPCs: implicit consent is only used for the player character, because that's part of the story. It is possible to remove the player's consent, thereby having no unwanted sex scenes occur, by setting up the content options, which will disable content without explicit consent (i.e. disabling M/M Sex Scenes means this kind of thing will only happen if you actively ask an NPC for it).", Say.PARAGRAPH_BREAK, "While the content options are there to tailor your experience, the game is made with \"all content is available\" in mind, which might result in a playthrough that's not much fun if you disable too many things. Still, that's your choice. Game on."); });
  9239. text.setNext("c27829b7-7199-4b1e-9334-536258546cfc");
  9240. tree.addNode(text);
  9241. branch = new DialogueBranch("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9242. branch.setVariable(() => { return SaveHandler.isVirgin(); });
  9243. branch.addBranch("d0dcd7c6-26ae-41d0-99a6-e0cae17ae381", () => { return true; });
  9244. branch.setNext("915492f1-8fa7-4ddc-9dc0-6b0340f738c8");
  9245. tree.addNode(branch);
  9246. text = new DialogueText("b8ee6702-8d38-4bd7-9b24-df8c901a50d4");
  9247. text.setSay(() => { return new Say(new SayBold("A note on saves: "), "The selected slot will be saved to browser storage, so it will be deleted if the browser ever decides to delete it. The game will write to that save slot every turn, so you don't need to worry about that. Alternatively, you can manually save in-game, which will save to a file."); });
  9248. text.setNext("50876e13-23b9-43c0-b6b1-a89b1683d5e7");
  9249. tree.addNode(text);
  9250. set = new DialogueSet("50876e13-23b9-43c0-b6b1-a89b1683d5e7");
  9251. set.setFunction(() => { return Elements.waitForAnyKey(); });
  9252. set.setNext("915492f1-8fa7-4ddc-9dc0-6b0340f738c8");
  9253. tree.addNode(set);
  9254. set = new DialogueSet("d0dcd7c6-26ae-41d0-99a6-e0cae17ae381");
  9255. set.setFunction(() => { Elements.clearMainScreen(); });
  9256. set.setNext("b8ee6702-8d38-4bd7-9b24-df8c901a50d4");
  9257. tree.addNode(set);
  9258. return tree;
  9259. })();
  9260. })(DialogueTrees || (DialogueTrees = {}));
  9261. //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwbGljYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9hcHAvRnVuY3Rpb25zLnRzIiwiLi4vYXBwL1dvcmxkL0NsYXNzZXMvU2F2ZS9TdG9yZWRWYXJpYWJsZS50cyIsIi4uL2FwcC9Xb3JsZC9DbGFzc2VzL1J1bGVib29rLnRzIiwiLi4vYXBwL1dvcmxkL1NldHRpbmdzLnRzIiwiLi4vYXBwL1dvcmxkL0NsYXNzZXMvUnVsZS50cyIsIi4uL2FwcC9Xb3JsZC9UdXJuU2VxdWVuY2UudHMiLCIuLi9hcHAvVmVyc2lvbi50cyIsIi4uL2FwcC9Db250cm9scy9Nb2R1bGVzL01lbW9yeS50cyIsIi4uL2FwcC9Db250cm9scy9DbGFzc2VzL1N0b3JlZE1lbW9yeS50cyIsIi4uL2FwcC9TYXZlSGFuZGxlci50cyIsIi4uL2FwcC9DaGFyYWN0ZXJDcmVhdGlvbi9DaGFyYWN0ZXJPcmlnaW4udHMiLCIuLi9hcHAvQ2hhcmFjdGVyQ3JlYXRpb24vT3JpZ2lucy9DaGFtcGlvbk9yaWdpbi50cyIsIi4uL2FwcC9DaGFyYWN0ZXJDcmVhdGlvbi9DaGFyYWN0ZXJDcmVhdGlvbi50cyIsIi4uL2FwcC9DaGFyYWN0ZXJDcmVhdGlvbi9QZXJrLnRzIiwiLi4vYXBwL0VsZW1lbnRzL0NsYXNzZXMvU2F5L09uZU9mLnRzIiwiLi4vYXBwL0NvbnRyb2xzL0NvbnRyb2xzLnRzIiwiLi4vYXBwL1dvcmxkL01hY2hpbmVCZWdpbnMudHMiLCIuLi9hcHAvRWxlbWVudHMvRWx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xuICAgICAgICAgICAgbGV0IHJlc3VsdCA9IGF3YWl0IHRoaXMucnVsZS5leGVjdXRlKHRoaXMpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHJlc3VsdCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuXHJcbmNsYXNzIFJ1bGVib29rPFQ+IHtcclxuICAgIHB1YmxpYyBydWxlcyA6IEFycmF5PFJ1bGU+ID0gW107XHJcbiAgICBwdWJsaWMgbmFtZSA6IHN0cmluZztcclxuICAgIHByaXZhdGUgc3RhdGljIGluZGVudGFudGlvblNwYWNlcyA9IDI7XHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVib29rU3RhY2sgOiBBcnJheTxhbnk+ID0gW107XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRTdGFjayAoKSB7XHJcbiAgICAgICAgbGV0IHN0YWNrID0gW107XHJcbiAgICAgICAgUnVsZWJvb2sucnVsZWJvb2tTdGFjay5mb3JFYWNoKChybCkgPT4ge1xyXG4gICAgICAgICAgICBpZiAocmwgaW5zdGFuY2VvZiBPYmplY3QgJiYgcmwubmFtZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHN0YWNrLnB1c2gocmwubmFtZSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHJsID09IFwic3RyaW5nXCIpIHtcclxuICAgICAgICAgICAgICAgIHN0YWNrLnB1c2gocmwpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJsIGluc3RhbmNlb2YgT2JqZWN0ICYmIHJsLmlkICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgc3RhY2sucHVzaChybC5pZCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzdGFjay5wdXNoKFwiVW5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ZWNyZWFzZUluZGVudGF0aW9uKCk7XHJcblxyXG4gICAgICAgIHJldHVybiByZXN1bHQ7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0IHByaW9yaXR5KCk6IG51bWJlciB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuX3ByaW9yaXR5O1xyXG4gICAgfVxyXG5cclxuICAgIHNldCBwcmlvcml0eSh2YWx1ZTogbnVtYmVyKSB7XHJcbiAgICAgICAgdGhpcy5fcHJpb3JpdHkgPSB2YWx1ZTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgY29tcGFyZVRvIChiIDogUnVsZSkge1xyXG4gICAgICAgIHZhciBhID0gdGhpcztcclxuICAgICAgICAvLyBIaWdoZXIgcHJpb3JpdHkgZ29lcyBmaXJzdCBhcyB0aGlzIGlzIGEgcm9sbGluZyBhcnJheVxyXG4gICAgICAgIGlmIChiLmZpcnN0UHJpb3JpdHkgPCBhLmZpcnN0UHJpb3JpdHkpIHJldHVybiAtMTtcclxuICAgICAgICBpZiAoYS5maXJzdFByaW9yaXR5IDwgYi5maXJzdFByaW9yaXR5KSByZXR1cm4gMTtcclxuICAgICAgICBpZiAoYi5wcmlvcml0eSA8IGEucHJpb3JpdHkpIHJldHVybiAtMTtcclxuICAgICAgICBpZiAoYS5wcmlvcml0eSA8IGIucHJpb3JpdHkpIHJldHVybiAxO1xyXG4gICAgICAgIHJldHVybiAwO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgUFJJT1JJVFlfSElHSEVTVCA6IG51bWJlciA9IDIwO1xyXG4gICAgcHVibGljIHN0YXRpYyBQUklPUklUWV9ISUdIIDogbnVtYmVyID0gMTU7XHJcbiAgICBwdWJsaWMgc3RhdGljIFBSSU9SSVRZX01FRElVTSA6IG51bWJlciA9IDEwO1xyXG4gICAgcHVibGljIHN0YXRpYyBQUklPUklUWV9MT1cgOiBudW1iZXIgPSA1O1xyXG4gICAgcHVibGljIHN0YXRpYyBQUklPUkl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WYgKHBsYXllckFjdGlvbiAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCBwcm9taXNlID0gcGxheWVyQWN0aW9uLmV4ZWN1dGUoKTtcclxuXHJcbiAgICAgICAgICAgICAgICBhd2FpdCBwcm9taXNlO1xyXG5cclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzQ29udGVudChwbGF5ZXJBY3Rpb24uc2F5KTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAocGxheWVyQWN0aW9uLnJlcXVpcmVzVHVybikge1xyXG4gICAgICAgICAgICAgICAgICAgIFdvcmxkU3RhdGUuaW5jcmVtZW50UGxheWVyVHVybigpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbiAgICBydWxlYm9vay5hZGRSdWxlKFBsYXllckFjdGlvblJ1bGUpO1xyXG5cclxuICAgIC8qKlxyXG4gICAgICogVGhpcyBpcyB0aGUgUnVuIEV2ZXJ5IFR1cm4gUnVsZXMuXHJcbiAgICAgKiBAdHlwZSB7UnVsZX1cclxuICAgICAqL1xyXG4gICAgZXhwb3J0IHZhciBSdW5FdmVyeVR1cm5SdWxlc1J1bGUgPSBuZXcgUnVsZSh7XHJcbiAgICAgICAgZmlyc3RQcmlvcml0eTogUnVsZS5QUklPUklUWV9NRURJVU0sXHJcbiAgICAgICAgcHJpb3JpdHk6IFJ1bGUuUFJJT1JJVFlfTUVESVVNLFxyXG4gICAgICAgIG5hbWU6IFwiUnVuIEV2ZXJ5IFR1cm4gUnVsZXNcIixcclxuICAgICAgICBjb2RlOiBhc3luYyBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHdoaWxlIChXb3JsZFN0YXRlLmlzVHVybldhaXRpbmcoKSkge1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgRXZlcnlUdXJuLkV2ZXJ5VHVybi5le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wiZmlsZVwiO1xyXG4gICAgICAgIGVsZW1lbnQuYWNjZXB0ID0gXCIuXCIgKyBzYXZlRXh0ZW5zaW9uO1xyXG5cclxuICAgICAgICBsZXQgcHJvbWlzZSA6IFByb21pc2U8c3RyaW5nPiA9IG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICAgICAgZWxlbWVudC5vbmNoYW5nZSA9ICgpID0+IHtcclxuICAgICAgICAgICAgICAgIGlmIChlbGVtZW50LmZpbGVzLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSh1bmRlZmluZWQpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZnIgPSBuZXcgRmlsZVJlYWRlcigpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBmci5vbmxvYWQgPSAoZXYpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShldi50YXJnZXRbJ3Jlc3VsdCddKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGZyLnJlYWRBc1RleHQoZWxlbWVudC5maWxlc1swXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgZWxlbWVudC5jbGljaygpO1xyXG4gICAgICAgIHJldHVybiBwcm9taXNlO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGRvd25sb2FkKGZpbGVuYW1lLCB0ZXh0KSB7XHJcbiAgICAgICAgdmFyIGVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdhJyk7XHJcbiAgICAgICAgZWxlbWVudC5zZXRBdHRyaWJ1dGUoJ2hyZWYnLCAnZGF0YTp0ZXh0L3BsYWluO2NoYXJzZXQ9dXRmLTgsJyArIGVuY29kZVVSSUN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kR2FtZSg8U2F2ZVN0cnVjdHVyZT4gSlNPTi5wYXJzZSg8c3RyaW5nPiB0ZXh0KSk7XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHJlYWRlci5yZWFkQXNUZXh0KGlucHV0LmZpbGVzWzBdKTtcclxuICAgICAgICB9KTtcclxuICAgICAgICBpbnB1dC5jbGljaygpO1xyXG4gICAgICAgIGRvY3VtZW50LmJvZHkucmVtb3ZlQ2hpbGQoaW5wdXQpO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGdldEl0ZW0gKHRoaW5nIDogU2F2ZWRUaGluZykgOiBUaGluZyB7XHJcbiAgICAgICAgbGV0IGl0ZW0gOiBUaGluZztcclxuICAgICAgICBpZiAodGhpbmcuVW5pcXVlKSB7XHJcbiAgICAgICAgICAgIGl0ZW0gPSBUaGluZy5nZXRVbmlxdWUodGhpbmcuTmFtZSk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgbGV0IGl0ZW1zID0gVGhpbmcuZ2V0Tm9uVW5pcXVlKHRoaW5nLk5hbWUpO1xyXG4gICAgICAgICAgICBpZiAoaXRlbXMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgaXRlbSA9IGl0ZW1zWzBdO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChpdGVtID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgbGV0IGVycm9yID0gdGhpbmcuTmFtZSArIFwiIG5vIGxvbmdlciBleGlzdHMuXCI7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiW1NhdmVIYW5kbGVyXSBcIiArIGVycm9yKTtcclxuICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKGVycm9yKVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGl0ZW0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BTYXZlZFBsYXllciB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgTmFtZSA6IFdvcmxkU3RhdGUucGxheWVyLmdldE5hbWUoKSxcclxuICAgICAgICAgICAgUGxheWVyQ2hhbmdlcyA6IFdvcmxkU3RhdGUucGxheWVyLmdldENoYW5nZXMoKSxcclxuICAgICAgICAgICAgUGFydHMgOiBleHBvcnRUaGluZ3MoV29ybGRTdGF0ZS5wbGF5ZXIuZ2V0UGFydHMoKSlcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIGV4cG9ydFRoaW5ncyAoYXJyIDogQXJyYXk8VGhpbmc+LCBjaGFuZ2VkT25seT8gOiBib29sZWFuKSA6IEFycmF5PFNhdmVkVGhpbmc+IHtcclxuICAgICAgICBsZXQgb2JqID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gPFRoaW5nPiBhcnJbaV07XHJcbiAgICAgICAgICAgIGxldCBzYXZlZFRoaW5nID0ge1xyXG4gICAgICAgICAgICAgICAgVW5pcXVlIDogdGhpbmcuaXNVbmlxdWUoKSxcclxuICAgICAgICAgICAgICAgIE5hbWUgOiB0aGluZy5nZXROYW1lKCksXHJcbiAgICAgICAgICAgICAgICBDaGFuZ2VzIDogdGhpbmcuZ2V0Q2hhbmdlcygpXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIGlmICghY2hhbmdlZE9ubHkgfHwgT2JqZWN0LmtleXMoc2F2ZWRUaGluZy5DaGFuZ2VzKS5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBvYmoucHVzaChzYXZlZFRoaW5nKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gb2JqO1xyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydC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dWJsaWMgaXNFbmFibGVkICh2YWx1ZU9ubHk/IDogYm9vbGVhbikgOiBib29sZWFuIHtcclxuICAgICAgICBpZiAodmFsdWVPbmx5ICE9IHRydWUpIHtcclxuICAgICAgICAgICAgbGV0IGZvcmNlZCA9IHRoaXMuZm9yY2VkU3RhdHVzKHRoaXMpO1xyXG4gICAgICAgICAgICBpZiAoZm9yY2VkICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIDxib29sZWFuPiBmb3JjZWQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHRoaXMudmFsdWU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzRm9yY2VkICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5mb3JjZWRTdGF0dXModGhpcykgIT0gdW5kZWZpbmVkO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXREZXNjcmlwdGlvbiAoKSB7XHJcbiAgICAgICAgaWYgKHR5cGVvZiB0aGlzLmRlc2NyaXB0aW9uID09IFwiZnVuY3Rpb25cIikge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kZXNjcmlwdGlvbih0aGlzKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kZXNjcmlwdGlvbjtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBwZXJrcyA6IHtbaWQgOiBzdHJpbmddIDogUGVya30gPSB7fTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHN0b3JlUGVyayAocGVyayA6IFBlcmspIHtcclxuICAgICAgICBQZXJrLnBlcmtzW3BlcmsuaWRdID0gcGVyaztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldFBlcmsgKGlkIDogc3RyaW5nKSB7XHJcbiAgICAgICAgcmV0dXJuIFBlcmsucGVya3NbaWRdO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgZ2V0UGVya3MgKCkgOiBBcnJheTxQZXJrPiB7XHJcbiAgICAgICAgbGV0IHBlcmtzID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgaWQgaW4gUGVyay5wZXJrcykge1xyXG4gICAgICAgICAgICBwZXJrcy5wdXNoKFBlcmsucGVya3NbaWRdKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcGVya3Muc29ydCgoYSA6IFBlcmssIGIgOiBQZXJrKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBuYSA9IGEubmFtZS50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgICAgICBsZXQgbmIgPSBiLm5hbWUudG9VcHBlckNhc2UoKTtcclxuICAgICAgICAgICAgaWYgKG5hIDwgbmIpIHJldHVybiAtMTtcclxuICAgICAgICAgICAgaWYgKG5hID4gbmIpIHJldHVybiAxO1xyXG4gICAgICAgICAgICByZXR1cm4gMDtcclxuICAgICAgICB9KTtcclxuICAgICAgICByZXR1cm4gcGVya3M7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyB1cGRhdGVQZXJrcygpIHtcclxuICAgICAgICBmb3IgKGxldCBpZCBpbiBQZXJrLnBlcmtzKSB7XHJcbiAgICAgICAgICAgIGxldCBwZXJrID0gUGVyay5wZXJrc1tpZF07XHJcbiAgICAgICAgICAgIGlmIChwZXJrLmlzRm9yY2VkKCkpIHtcclxuICAgICAgICAgICAgICAgIHBlcmsudmFsdWUgPSA8Ym9vbGVhbj4gcGVyay5mb3JjZWRTdGF0dXMocGVyayk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn0iLCIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi4vU2F5LnRzXCIgLz5cclxuY2xhc3MgT25lT2Yge1xyXG4gICAgcHJpdmF0ZSBwb3NzaWJpbGl0aWVzID0gW107XHJcbiAgICBwcml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nZS5jbGFzc0xpc3QucmVtb3ZlKFwidHVyblwiKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIEFyZSB3ZSBjdXJyZW50bHkgaW4gYSB0dXJuP1xyXG4gICAgICogQHJldHVybnMge2Jvb2xlYW59XHJcbiAgICAgKi9cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBpc0luVHVybiAoKSB7XHJcbiAgICAgICAgcmV0dXJuIG1haW5QYWdlLmNsYXNzTGlzdC5jb250YWlucyhcInR1cm5cIik7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIGxldCBtZW51T3V0c2lkZW9mVHVybiA9IGZhbHNlO1xyXG4gICAgbGV0IG1lbnVzID0gMDtcclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gc3RhcnRNZW51ICgpIHtcclxuICAgICAgICBpZiAoIWlzSW5UdXJuKCkpIHtcclxuICAgICAgICAgICAgbWVudU91dHNpZGVvZlR1cm4gPSB0cnVlO1xyXG4gICAgICAgICAgICBzdGFydFR1cm4oKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgbWFpblBhZ2UuY2xhc3NMaXN0LmFkZChcIm1haW5tZW51XCIpO1xyXG4gICAgICAgIG1lbnVzKys7XHJcbiAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLmNsZWFyKCk7XHJcbiAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5yZXNldCgpO1xyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBlbmRNZW51ICgpIHtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIuY2xlYXIoKTtcclxuICAgICAgICBpZiAoLS1tZW51cyA9PSAwKSB7XHJcbiAgICAgICAgICAgIGlmIChtZW51T3V0c2lkZW9mVHVybikge1xyXG4gICAgICAgICAgICAgICAgZW5kVHVybigpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJlc2V0TWVudXMoK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gICAgICBwcm9taXNlT3JpZ2luYWxTdGFjay5zcGxpY2UocHJvbWlzZVN0YWNrLmluZGV4T2YocHJvbWlzZSksIDEpO1xyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBjcmVhdGVLZXlDb2RlIChldiA6IEtleWJvYXJkRXZlbnQpIHtcclxuICAgICAgICBsZXQgbmFtZSA9IGV2LmtleS50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgIGxldCByZXByZXNlbnRhdGlvbiA9IG5hbWU7XHJcbiAgICAgICAgbGV0IGV2Q29kZSA9IGV2LmNvZGU7XHJcbiAgICAgICAgaWYgKGV2LnNoaWZ0S2V5KSB7XHJcbiAgICAgICAgICAgIG5hbWUgPSBcIlNoaWZ0ICsgXCIgKyBuYW1lO1xyXG4gICAgICAgICAgICBldkNvZGUgPSBcIlNoXCIgKyBldkNvZGU7XHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uID0gXCJTXCIgKyByZXByZXNlbnRhdGlvbjtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGV2LmFsdEtleSkge1xyXG4gICAgICAgICAgICBuYW1lID0gXCJBbHQgKyBcIiArIG5hbWU7XHJcbiAgICAgICAgICAgIGV2Q29kZSA9IFwiQWxcIiArIGV2Q29kZTtcclxuICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gPSBcIkFcIiArIHJlcHJlc2VudGF0aW9uO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoZXYuY3RybEtleSkge1xyXG4gICAgICAgICAgICBuYW1lID0gXCJDb250cm9sICsgXCIgKyBuYW1lO1xyXG4gICAgICAgICAgICBldkNvZGUgPSBcIkN0XCIgKyBldkNvZGU7XHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uID0gXCJDXCIgKyByZXByZXNlbnRhdGlvbjtcclxuICAgICAgICB9XHJcbiAgICAgICAgbGV0IGtleUNvZGUgOiBLZXlDb2RlID0gIHtcclxuICAgICAgICAgICAgZXZDb2RlIDogZXZDb2RlLFxyXG4gICAgICAgICAgICBuYW1lIDogbmFtZSxcclxuICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gOiByZXByZXNlbnRhdGlvblxyXG4gICAgICAgIH07XHJcbiAgICAgICAgcmV0dXJuIGtleUNvZGU7XHJcbiAgICB9XHJcblxyXG4gICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoXCJtb3VzZWRvd25cIiwgZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgbGV0IGtleUNvZGUgOiBLZXlDb2RlID0ge1xyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiQ2xpY2tcIixcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJDbGlja1wiLFxyXG4gICAgICAgICAgICBuYW1lIDogXCJDbGlja1wiXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IHByb21pc2UgPSBwcm9taXNlU3RhY2suc2hpZnQoKTtcclxuICAgICAgICBpZiAocHJvbWlzZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgcHJvbWlzZShrZXlDb2RlKTtcclxuICAgICAgICAgICAgcHJvbWlzZU9yaWdpbmFsU3RhY2suc2hpZnQoKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKFwia2V5ZG93blwiLCBmdW5jdGlvbiAoZXZlbnQpIHtcclxuICAgICAgICAvL2V2ZW50LnByZXZlbnREZWZhdWx0KCk7IFRoaXMgZnVja3MgdXAgYnJvd3NlciBjb250cm9sLiBMZXQncyBqdXN0IGFzc3VtZSB0aGF0IHRoaXMgaXMgYWx3YXlzIGdvaW5nIHRvIGJlIHRoZSBsYXN0IHRoaW5nIHRvIGNhdGNoIGEga2V5LlxyXG4gICAgICAgIGxldCBrZXlDb2RlID0gY3JlYXRlS2V5Q29kZShldmVudCk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ICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGxldCBlbGU7XHJcblxyXG4gICAgICAgIEVsZW1lbnRzLmdldExpbmtFbGVtZW50cygpLnNvbWUoKGVsZW1lbnQgOiBIVE1MRWxlbWVudCkgPT4ge1xyXG4gICAgICAgICAgICBsZXQga2V5YWJsZXMgPSBlbGVtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoXCJrZXlhYmxlXCIpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGtleWFibGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoKDxIVE1MRWxlbWVudD4ga2V5YWJsZXNbaV0pLmRhdGFzZXRbJ3Nob3J0Y3V0Y29kZSddID09IGtleUNvZGUuZXZDb2RlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZWxlID0ga2V5YWJsZXNbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBpZiAoZWxlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBlbGUuY2xpY2soKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gY3JlYXRlS2V5Q29kZXMgKGNvZGVzIDogQXJyYXk8c3RyaW5nPiwga2V5cyA6IEFycmF5PHN0cmluZz4sIG1vZHM/IDogQXJyYXk8Ym9vbGVhbj4pIHtcclxuICAgICAgICBsZXQgYXJyID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgbW9kID0gMDsgbW9kIDwgNDsgbW9kKyspIHtcclxuICAgICAgICAgICAgaWYgKG1vZCA9PSAwIHx8IG1vZHNbbW9kXSA9PSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvZGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBrZXlzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXByZXNlbnRhdGlvbiA9IGtleXNbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGV2Q29kZSA9IGNvZGVzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2QgPT0gMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gXCJTaGlmdCArIFwiICsgbmFtZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZDb2RlID0gXCJTaFwiICsgZXZDb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXByZXNlbnRhdGlvbiA9IFwiU1wiICsgcmVwcmVzZW50YXRpb247XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2QgPT0gMikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gXCJBbHQgKyBcIiArIG5hbWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2Q29kZSA9IFwiQWxcIiArIGV2Q29kZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gPSBcIkFcIiArIHJlcHJlc2VudGF0aW9uO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAobW9kID09IDMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSA9IFwiQ29udHJvbCArIFwiICsgbmFtZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZDb2RlID0gXCJDdFwiICsgZXZDb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXByZXNlbnRhdGlvbiA9IFwiQ1wiICsgcmVwcmVzZW50YXRpb247XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBrZXlDb2RlOiBLZXlDb2RlID0ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBldkNvZGU6IGV2Q29kZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVwcmVzZW50YXRpb246IHJlcHJlc2VudGF0aW9uLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lIDogbmFtZVxyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgYXJyLnB1c2goa2V5Q29kZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGFycjtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgdmFyIHNjcm9sbEtleUNvZGUgPSBuZXcgU3RvcmVkTWVtb3J5KFwic2Nyb2xsS2V5Q29kZVwiLCA8S2V5Q29kZT4ge1xyXG4gICAgICAgIGV2Q29kZSA6IFwiU3BhY2VcIixcclxuICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiU3BhY2VcIlxyXG4gICAgfSk7XHJcblxyXG4gICAgZXhwb3J0IHZhciBpbWFnZUtleUNvZGUgPSBuZXcgU3RvcmVkTWVtb3J5KFwiaW1hZ2VLZXlDb2RlXCIsIDxLZXlDb2RlPiB7XHJcbiAgICAgICAgZXZDb2RlIDogXCJLZXlJXCIsXHJcbiAgICAgICAgcmVwcmVzZW50YXRpb24gOiBcIklcIlxyXG4gICAgfSk7XHJcblxyXG4gICAgZXhwb3J0IHZhciBrZXlDb2RlczEgPSBuZXcgU3RvcmVkTWVtb3J5KFxyXG4gICAgICAgIFwia2V5Q29kZXNSb29tXCIsXHJcbiAgICAgICAgY3JlYXRlS2V5Q29kZXMoIFtcIkRpZ2l0MVwiLCBcIkRpZ2l0MlwiLCBcIkRpZ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S2V5U1wiLFxyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiU1wiXHJcbiAgICAgICAgfVxyXG4gICAgKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIGtleUNvZGVFYXN0ID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVFYXN0XCIsXHJcbiAgICAgICAgPEtleUNvZGU+IHtcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJLZXlDXCIsXHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uIDogXCJDXCJcclxuICAgICAgICB9XHJcbiAgICApO1xyXG5cclxuICAgIGV4cG9ydCB2YXIga2V5Q29kZVNvdXRoID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVTb3V0aFwiLFxyXG4gICAgICAgIDxLZXlDb2RlPiB7XHJcbiAgICAgICAgICAgIGV2Q29kZSA6IFwiS2V5WFwiLFxyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiWFwiXHJcbiAgICAgICAgfVxyXG4gICAgKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIGtleUNvZGVXZXN0ID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVXZXN0XCIsXHJcbiAgICAgICAgPEtleUNvZGU+IHtcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJLZXlaXCIsXHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uIDogXCJaXCJcclxuICAgICAgICB9XHJcbiAgICApO1xyXG5cclxuICAgIGV4cG9ydCB2YXIga2V5Q29kZVVwID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVVcFwiLFxyXG4gICAgICAgIDxLZXlDb2RlPiB7XHJcbiAgICAgICAgICAgIGV2Q29kZSA6IFwiS2V5QVwiLFxyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiQVwiXHJcbiAgICAgICAgfVxy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wID8gYXZhaWxhYmxlMyA6IHVuZGVmaW5lZDtcclxuICAgICAgICBpZiAoY2hvc2VuICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gY2hvc2VuLnNwbGljZSgwLCAxKVswXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJldHVybnMgYSBwcm9taXNlIG9mIGEga2V5IHByZXNzLlxyXG4gICAgICogSWYgYWZ0ZXIgdGltZW91dCBzZWNvbmRzIGEga2V5IHdhcyBub3QgcHJlc3NlZCwgdGhlIHByb21pc2UgZmFpbHMuXHJcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gdGltZW91dFxyXG4gICAgICovXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gZ2V0TmV4dEtleSAodGltZW91dD8gOiBudW1iZXIpIDogUHJvbWlzZTxLZXlDb2RlPiB7XHJcbiAgICAgICAgbGV0IHRpbWVvdXROdW1iZXI7XHJcbiAgICAgICAgbGV0IHByb21pc2UgPSA8UHJvbWlzZTxLZXlDb2RlPj4gKG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICAgICAgcHJvbWlzZVN0YWNrLnB1c2gocmVzb2x2ZSk7XHJcblxyXG4gICAgICAgICAgICBpZiAodGltZW91dCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRpbWVvdXROdW1iZXIgPSBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBLZXlIYW5kbGVyLnJlamVjdFByb21pc2UocmVzb2x2ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KCk7XHJcbiAgICAgICAgICAgICAgICB9LCB0aW1lb3V0ICogMTAwMCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgIHByb21pc2UudGhl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bWUgOiBzdHJpbmc7XHJcblxyXG4gICAgcHJpdmF0ZSBpc0ltYWdlRGVmaW5lZCAoKSB7XHJcbiAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgZm9yKHZhciBpID0gMDsgaSA8IGRvY3VtZW50LnN0eWxlU2hlZXRzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgcnVsZXMgPSBkb2N1bWVudC5zdHlsZVNoZWV0c1tpXVsncnVsZXMnXSB8fCBkb2N1bWVudC5zdHlsZVNoZWV0c1tpXVsnY3NzUnVsZXMnXTtcclxuICAgICAgICAgICAgICAgIGZvcih2YXIgeCBpbiBydWxlcykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBydWxlc1t4XS5zZWxlY3RvclRleHQgPT0gJ3N0cmluZycgJiYgcnVsZXNbeF0uc2VsZWN0b3JUZXh0ID09IFwiLlwiICsgdGhpcy5pbWdOYW1lKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICBjb25zb2xlLndhcm4oXCJDYW4ndCBjaGVjayBmb3IgdW5kZWZpbmVkIGltYWdlcy5cIik7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgY29uc3RydWN0b3IgKGltZ05hbWUgOiBzdHJpbmcpIHtcclxuICAgICAgICB0aGlzLmltZ05hbWUgPSBpbWdOYW1lO1xyXG5cclxuICAgICAgICBpZiAoIVNheUltYWdlLmxvYWRUaW1lQ2hlY2sgJiYgU2F5SW1hZ2UuaW1hZ2VOYW1lcy5pbmRleE9mKHRoaXMpID09IC0x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XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBkb0xvYWRUaW1lQ2hlY2soKSB7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBTYXlJbWFnZS5pbWFnZU5hbWVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGxldCBpbWFnZSA9IFNheUltYWdlLmltYWdlTmFtZXNbaV07XHJcbiAgICAgICAgICAgIGlmICghaW1hZ2UuaXNJbWFnZURlZmluZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKFNldHRpbmdzLmhhcmREZWJ1Zykge1xyXG4gICAgICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzRXJyb3IoXCJJbWFnZSBcXFwiXCIgKyBpbWFnZS5pbWdOYW1lICsgXCJcXFwiIHdhcyBub3QgZm91bmQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcIkltYWdlIFxcXCJcIiArIGltYWdlLmltZ05hbWUgKyBcIlxcXCIgd2FzIG5vdCBmb3VuZC5cIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgU2F5SW1hZ2UubG9hZFRpbWVDaGVjayA9IHRydWU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBzaG93SW5WaWV3ZXIgKGltYWdlIDogU2F5SW1hZ2UpIHtcclxuICAgICAgICBpZiAoIShTYXlJbWFnZS5pbWFnZVZpZXdlci5zdHlsZS5kaXNwbGF5ID09ICdibG9jaycpKSB7XHJcbiAgICAgICAgICAgIFNheUltYWdlLmltYWdlVmlld2VyLmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBTYXlJbWFnZS5pbWFnZVZpZXdlci5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XHJcbiAgICAgICA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107XHJcbiAgICAgICAgdGhpcy5jdXJyZW50UGFyYWdyYXBoID0gW107XHJcbiAgICAgICAgdGhpcy5za2lwYnJlYWtzID0gZmFsc2U7XHJcblxyXG4gICAgICAgIGZvciAodGhpcy5zZXF1ZW5jZVJ1bm5lciA9IDA7IHRoaXMuc2VxdWVuY2VSdW5uZXIgPCB0aGlzLnNlcXVlbmNlLmxlbmd0aDsgdGhpcy5zZXF1ZW5jZVJ1bm5lcisrKSB7XHJcbiAgICAgICAgICAgIGxldCBzZXEgPSB0aGlzLnNlcXVlbmNlW3RoaXMuc2VxdWVuY2VSdW5uZXJdO1xyXG4gICAgICAgICAgICBpZiAoc2VxIGluc3RhbmNlb2YgT25lT2YpIHtcclxuICAgICAgICAgICAgICAgIHNlcSA9IHNlcS5nZXRPbmUoKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKHNlcSA9PSBTYXkuQ0VOVEVSRUQpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0Q2VudGVyZWQodHJ1ZSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VxID09IFNheS5iKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgYm9sZE9iamVjdHMgPSBbXTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSB0aGlzLnNlcXVlbmNlUnVubmVyICsgMTsgaSA8IHRoaXMuc2VxdWVuY2UubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgY2FuZGlkYXRlID0gdGhpcy5zZXF1ZW5jZVJ1bm5lcltpXTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY2FuZGlkYXRlID09IFNheS5iKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBib2xkT2JqZWN0cy5wdXNoKHRoaXMuc2VxdWVuY2Uuc3BsaWNlKGksIDEpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoYm9sZE9iamVjdHMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBib2xkID0gbmV3IFNheUJvbGQoLi4uYm9sZE9iamVjdHMpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKHRoaXMuc2VxdWVuY2VSdW5uZXIgKyAxLCAwLCBib2xkKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEgPT0gU2F5LkNPQ0spIHtcclxuICAgICAgICAgICAgICAgIGlmIChIdW1hbm9pZFBlbmlzICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2NrID0gSHVtYW5vaWRQZW5pcy5nZXRTeW5vbnltKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50UGFyYWdyYXBoLnB1c2goZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoY29jaykpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gIGVsc2UgaWYgKHNlcSA9PSBTYXkuUFVTU1kpIHtcclxuICAgICAgICAgICAgICAgIGlmIChIdW1hbm9pZFZhZ2luYSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgdmFnaW5hID0gSHVtYW5vaWRWYWdpbmEuZ2V0U3lub255bSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFBhcmFncmFwaC5wdXNoKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHZhZ2luYSkpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VxID09IFNheS5MSU5FX0JSRUFLKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmRvTGluZUJyZWFrKCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VxID09IFNheS5QQVJBR1JBUEhfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuZG9QYXJhZ3JhcGhCcmVhaygpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNlcSA9PSBTYXkuUlVOX1BBUkFHUkFQSCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5za2lwYnJlYWtzID0gdHJ1ZTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEgPT0gU2F5LlJVTl9QQVJBR1JBUEhfT0ZGKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnNraXBicmVha3MgPSBmYWxzZTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2Ygc2VxID09IFwiZnVuY3Rpb25cIikge1xyXG4gICAgICAgICAgICAgICAgbGV0IGZPYmogPSAoPChzOiBTYXkpID0+IGFueT4gc2VxKSh0aGlzKTtcclxuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZPYmopKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgayA9IGZPYmoubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZS5zcGxpY2UodGhpcy5zZXF1ZW5jZVJ1bm5lciArIDEsIDAsIGZPYmpba10pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZk9iaiAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlcXVlbmNlLnNwbGljZSh0aGlzLnNlcXVlbmNlUnVubmVyICsgMSwgMCwgZk9iaik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB0aGlzLnNlcXVlbmNlLnNwbGljZSh0aGlzLnNlcXVlbmNlUnVubmVyLCAxKTtcclxuICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2VSdW5uZXItLTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEuY29uc3RydWN0b3IgPT0gdGhpcy5jb25zdHJ1Y3Rvcikge1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgayA9ICg8U2F5PiBzZXEpLnNlcXVlbmNlLmxlbmd0aCAtIDE7IGsgPj0gMDsgay0tKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZS5zcGxpY2UodGhpcy5zZXF1ZW5jZVJ1bm5lciArIDEsIDAsICg8U2F5PiBzZXEpLnNlcXVlbmNlW2tdKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKHRoaXMuc2VxdWVuY2VSdW5uZXIsIDEpO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZVJ1bm5lci0tO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNlcSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCBlbGVtZW50cyA9IGF3YWl0IHRoaXMuZ2V0RWxlbWVudEZvcih0aGlzLnNlcXVlbmNlUnVubmVyLCBzZXEpO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbGVtZW50cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50c1tpXSA9PT0gU2F5LkRPX0xJTkVfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kb0xpbmVCcmVhaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZWxlbWVudHNbaV0gPT09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DAsIGVsZSA9IHBhcmFncmFwaFtrXTsgZWxlIT0gdW5kZWZpbmVkOyBlbGUgPSBwYXJhZ3JhcGhbKytrXSkge1xyXG4gICAgICAgICAgICAgICAgcGFyZW50LmFwcGVuZENoaWxkKGVsZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxlbWVudHMucHVzaChwYXJlbnQpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHRoaXMuY2VudGVyZWQpIHtcclxuICAgICAgICAgICAgICAgIHBhcmVudC5jbGFzc0xpc3QuYWRkKFwiY2VudGVyZWRcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBlbGVtZW50cztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0SFRNTENvbnRlbnQgKCkgOiBQcm9taXNlPEFycmF5PEhUTUxFbGVtZW50Pj4ge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmdldEhUTUwoXCJwXCIsIFtcImNvbnRlbnRcIl0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBpc1Byb3BlckVsZW1lbnQgKG8pIDogYm9vbGVhbiB7XHJcbiAgICAgICAgcmV0dXJuIChcclxuICAgICAgICAgICAgdHlwZW9mIE5vZGUgPT09IFwib2JqZWN0XCIgPyBvIGluc3RhbmNlb2YgTm9kZSA6XHJcbiAgICAgICAgICAgICAgICBvICYmIHR5cGVvZiBvID09PSBcIm9iamVjdFwiICYmIHR5cGVvZiBvLm5vZGVUeXBlID09PSBcIm51bWJlclwiICYmIHR5cGVvZiBvLm5vZGVOYW1lPT09XCJzdHJpbmdcIlxyXG4gICAgICAgICkgfHwgKFxyXG4gICAgICAgICAgICB0eXBlb2YgSFRNTEVsZW1lbnQgPT09IFwib2JqZWN0XCIgPyBvIGluc3RhbmNlb2YgSFRNTEVsZW1lbnQgOiAvL0RPTTJcclxuICAgICAgICAgICAgICAgIG8gJiYgdHlwZW9mIG8gPT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gICAgIHJldHVybiBFbGVtZW50cy5pc0luVHVybigpO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogUmVtb3ZlcyB0aGUgYmx1ciBlZmZlY3QgYXJvdW5kIHRoZSB0dXJuIHBhbmVsXHJcbiAgICAgKi9cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBlbmRUdXJuICgpIHtcclxuICAgICAgICBFbGVtZW50cy5lbmRUdXJuKCk7XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIGdldFNheUVsZW1lbnRzQXNDb250ZW50IChzYXkgOiBTYXkpIDogUHJvbWlzZTxBcnJheTxIVE1MRWxlbWVudD4+IHtcclxuICAgICAgICByZXR1cm4gc2F5LmdldEhUTUwoXCJwXCIsIFtcImNvbnRlbnRcIl0pO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogUHJpbnRzIGdpdmVuIFNheSBkaXJlY3RseVxyXG4gICAgICogQHBhcmFtIHNheVxyXG4gICAgICovXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gcHJpbnRBc0NvbnRlbnQgKHNheSA6IFNheSkge1xyXG4gICAgICAgIGxldCBub2RlID0gZ2V0TWFya2VyKCk7XHJcbiAgICAgICAgZ2V0U2F5RWxlbWVudHNBc0NvbnRlbnQoc2F5KS50aGVuKHZhbHVlID0+IHtcclxuICAgICAgICAgICAgaW5zZXJ0QmVmb3JlKHZhbHVlLCBub2RlKTtcclxuICAgICAgICAgICAgdW5wcmludChub2RlKTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIENyZWF0ZXMgYSBzYXkgZm9yIHNheVZhbHVlcyBhbmQgdGhlbiBwcmludHMgaXQgYXMgY29udGVudC5cclxuICAgICAqIEBwYXJhbSBzYXlWYWx1ZXNcclxuICAgICAqL1xyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHNpbXBsZVByaW50ICguLi5zYXlWYWx1ZXMgOiBBcnJheTxhbnk+KSB7XHJcbiAgICAgICAgcHJpbnRBc0NvbnRlbnQobmV3IFNheSguLi5zYXlWYWx1ZXMpKTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gcHJpbnRBc0Vycm9yIChtc2cgOiBTYXkgfCBzdHJpbmcpIHtcclxuICAgICAgICBpZiAobXNnIGluc3RhbmNlb2YgU2F5KSB7XHJcbiAgICAgICAgICAgIG1zZy5nZXRIVE1MKFwiZGl2XCIsIFtcImVycm9yXCJdLCB0cnVlKS50aGVuKHZhbHVlID0+IHtcclxuICAgICAgICAgICAgICAgIHByaW50KC4uLnZhbHVlKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgbGV0IGRpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XHJcbiAgICAgICAgICAgIGRpdi5jbGFzc0xpc3QuYWRkKFwiZXJyb3JcIik7XHJcbiAgICAgICAgICAgIGRpdi5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShtc2cpKTtcclxuICAgICAgICAgICAgcHJpbnQoZGl2KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIGNsZWFyICgpIHtcclxuICAgICAgICB3aGlsZSAoY3VycmVudFR1cm5UYWIuZmlyc3RDaGlsZCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgY3VycmVudFR1cm5UYWIucmVtb3ZlQ2hpbGQoY3VycmVudFR1cm5UYWIuZmlyc3RDaGlsZCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIENvbnRyb2xzLktleUhhbmRsZXIucmVzZXQoKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIEluY2x1ZGVzIHRoZSBnaXZlbiBlbGVtZW50cyBhcyBjb250ZW50LlxyXG4gICAgICogVGhp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XJlY3Rpb25bZGlyZWN0aW9uXV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubWFpbkRpdi5hcHBlbmRDaGlsZChkaXJlY3Rpb25EaXYpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIENvbnRyb2xzLkxpbmtzLm1ha2VMaW5rKHRoaXMubWFpbkRpdiwgbmV3IEFjdGlvbkdvKFdvcmxkU3RhdGUucGxheWVyLCByb29tKSk7XHJcblxyXG4gICAgICAgICAgICAvLyBBU1NVTUUgVEhJUyBJUyBOT1QgVVBEQVRFRFxyXG4gICAgICAgICAgICAvL3RoaXMudXBkYXRlKCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBjcmVhdGVSb29tTmFtZUZsb2F0ZXIgKCkge1xyXG4gICAgICAgIGlmICh0aGlzLnJvb20gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGxldCByb29tTmFtZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XHJcblxyXG4gICAgICAgICAgICBsZXQgc2F5TmFtZSA9IG5ldyBTYXkodGhpcy5yb29tKTtcclxuICAgICAgICAgICAgYXdhaXQgc2F5TmFtZS5nZXRQdXJlRWxlbWVudHMoKS50aGVuKHZhbHVlID0+IHtcclxuICAgICAgICAgICAgICAgIHZhbHVlLmZvckVhY2goZWxlbWVudCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcm9vbU5hbWUuYXBwZW5kQ2hpbGQoZWxlbWVudCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICBFbGVtZW50cy5Ib3ZlckluZm8ubWFrZUhvdmVyYWJsZSh0aGlzLm1haW5EaXYsIHZhbHVlKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyB1cGRhdGUgKCkge1xyXG4gICAgICAgIGlmICh0aGlzLnJvb20gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGlmIChXb3JsZFN0YXRlLnBsYXllci5nZXRSb29tKCkgPT0gdGhpcy5yb29tKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LmFkZChcImN1cnJlbnRcIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LnJlbW92ZShcImN1cnJlbnRcIik7XHJcbiAgICAgICAgICAgIH1cclxuXHJcblxyXG4gICAgICAgICAgICBsZXQgaXNSZW1lbWJlcmVkID0gYXdhaXQgV29ybGRTdGF0ZS5pc1Jvb21SZW1lbWJlcmVkKHRoaXMucm9vbSk7XHJcbiAgICAgICAgICAgIGlmICghaXNSZW1lbWJlcmVkKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LmFkZChcInVua25vd25cIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LnJlbW92ZShcInVua25vd25cIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEVsZW1lbnQgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLm1haW5EaXY7XHJcbiAgICB9XHJcbn0iLCJjbGFzcyBTYXlBbiBleHRlbmRzIFNheSB7XHJcbiAgICBwcml2YXRlIG5vZGUgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShcImEgXCIpO1xyXG4gICAgcHJpdmF0ZSB1cHBlcmNhc2UgPSB0cnVlO1xyXG5cclxuICAgIHB1YmxpYyBjb25zdHJ1Y3RvciAoYXV0b1VwcGVyY2FzZT8gOiB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WN1bGFybHkgZm9yIGFjcm9ueW1zIVxyXG4gICAgICAgIC8vcmV0dXJuczoge1xyXG4gICAgICAgIC8vICAgcHJlZml4OiBcImVcIiwgLy90aGUgcHJlZml4IHN1ZmZpY2llbnQgdG8gZGV0ZXJtaW5lIHRoZSBhcnRpY2xlXHJcbiAgICAgICAgLy8gICBhQ291bnQ6IDk2ODIsIC8vdGhlIG51bWJlciBvZiB0aW1lcyBcImFcIiB3YXMgc2VlbiBmb3IgdGhpcyBwcmVmaXhcclxuICAgICAgICAvLyAgIGFuQ291bnQ6IDEwMjgyNDYsIC8vdGhlIG51bWJlciBvZiB0aW1lcyBcImFuXCIgd2FzIHNlZW4gZm9yIHRoaXMgcHJlZml4XHJcbiAgICAgICAgLy8gICBhcnRpY2xlOiBcImFuXCIsIC8vdGhlIG1vc3QgY29tbW9uIGFydGljbGVcclxuICAgICAgICAvL31cclxuICAgICAgICBxdWVyeTogZnVuY3Rpb24gKHdvcmQpIHtcclxuXHJcbiAgICAgICAgICAgIHZhciBub2RlIDogYW55ID0gcm9vdCwgc0kgPSAwLCByZXN1bHQsIGM7XHJcbiAgICAgICAgICAgIGRvIHtcclxuICAgICAgICAgICAgICAgIGMgPSB3b3JkW3NJKytdO1xyXG4gICAgICAgICAgICB9IHdoaWxlICgnXCLigJjigJnigJzigJ0kXFwnLSgnLmluZGV4T2YoYykgPj0gMCk7Ly9hbHNvIHRlcm1pbmF0ZXMgb24gZW5kLW9mLXN0cmluZyBcInVuZGVmaW5lZFwiLlxyXG5cclxuICAgICAgICAgICAgd2hpbGUgKDEpIHtcclxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IG5vZGUuZGF0YSB8fCByZXN1bHQ7XHJcbiAgICAgICAgICAgICAgICBub2RlID0gbm9kZVtjXTtcclxuICAgICAgICAgICAgICAgIGlmICghbm9kZSkgcmV0dXJuIHJlc3VsdDtcclxuICAgICAgICAgICAgICAgIGMgPSB3b3JkW3NJKytdIHx8IFwiIFwiO1xyXG4gICA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gICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJoZSBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwic2hlIFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcInRoZXkgXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogSWYgd2UgZXZlciBoYXZlIGdlbmRlcmVkIG5vbi1odW1hbm9pZHMsIHRoZXkgbXVzdCBiZSBhZGRlZCBoZXJlLlxyXG4gICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaXQgXCI7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh0aGlzLnVwcGVyY2FzZSAmJiBzYXkuY3VycmVudFBhcmFncmFwaC5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IHRoaXMubm9kZS5ub2RlVmFsdWUuY2hhckF0KDApLnRvVXBwZXJDYXNlKClcclxuICAgICAgICAgICAgICAgICAgICArIHRoaXMubm9kZS5ub2RlVmFsdWUuc3Vic3RyKDEsIHRoaXMubm9kZS5ub2RlVmFsdWUubGVuZ3RoIC0gMSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIFt0aGlzLm5vZGVdO1xyXG4gICAgfVxyXG59IiwiY2xhc3MgU2F5SGltSGVySXQgZXh0ZW5kcyBT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kZXIuZ2VuZGVyVmFsdWVDb3JyZWN0ZWQgPCAzNSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpbSBcIjtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBwZXJzb24gaXMgYW5kcm9neW5vdXMuLi5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2VuZGVyLmhhc1BlbmlzQnVsZ2UgfHwgZ2VuZGVyLmhhc1BlbmlzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpbSBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGVyIFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcInRoZW0gXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogSWYgd2UgZXZlciBoYXZlIGdlbmRlcmVkIG5vbi1odW1hbm9pZHMsIHRoZXkgbXVzdCBiZSBhZGRlZCBoZXJlLlxyXG4gICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaXQgXCI7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh0aGlzLnVwcGVyY2FzZSAmJiBzYXkuY3VycmVudFBhcmFncmFwaC5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgdG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1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChuZXh0IGluc3RhbmNlb2YgSHVtYW5vaWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCBnZW5kZXIgPSBuZXh0LmdldEdlbmRlclZhbHVlKCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoZ2VuZGVyLmdlbmRlclZhbHVlQ29ycmVjdGVkID4gNjUpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJoZXJzIFwiO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChnZW5kZXIuZ2VuZGVyVmFsdWVDb3JyZWN0ZWQgPCAzNSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpcyBcIjtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBwZXJzb24gaXMgYW5kcm9neW5vdXMuLi5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2VuZGVyLmhhc1BlbmlzQnVsZ2UgfHwgZ2VuZGVyLmhhc1BlbmlzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpcyBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGVycyBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJ0aGVpciBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZ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wZXJseU5hbWVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwidGhlIFwiO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJcIjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcIlwiO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmICh0aGlzLm5vZGUubm9kZVZhbHVlICE9IFwiXCIpIHtcclxuICAgICAgICAgICAgaWYgKHRoaXMudXBwZXJjYXNlICYmIHNheS5jdXJyZW50UGFyYWdyYXBoLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gdGhpcy5ub2RlLm5vZGVWYWx1ZS5jaGFyQXQoMCkudG9VcHBlckNhc2UoKVxyXG4gICAgICAgICAgICAgICAgICAgICsgdGhpcy5ub2RlLm5vZGVWYWx1ZS5zdWJzdHIoMSwgdGhpcy5ub2RlLm5vZGVWYWx1ZS5sZW5ndGggLSAxKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gW3RoaXMubm9kZV07XHJcbiAgICB9XHJcbn0iLCIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi4vRWxlbWVudHMudHNcIiAvPlxyXG5tb2R1bGUgRWxlbWVudHMuQXBwZWFyYW5jZUhhbmRsZXIge1xyXG4gICAgdmFyIHRhcmdldCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiYXBwZWFyYW5jZVRhcmdldFwiKTtcclxuXHJcbiAgICBmdW5jdGlvbiBlbXB0eSAoKSB7XHJcbiAgICAgICAgd2hpbGUgKHRhcmdldC5maXJ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gICAgICAgICAgICAgICBwcmVzZW50YXRpb24uYWRkKFwiLCB3aGljaCBsb29rcyBsaWtlIGl0IGlzIFwiICsgZmFrZURpY2sgKyBcIiBkdWUgdG8geW91ciBjbG90aGluZy5cIilcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGlmICghcGVuaXMuaXNVbmNvdmVyZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbi5hZGQoXCIsIHdoaWNoIGlzIGNvdmVyZWQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24uYWRkKFwiLlwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gaWYgKHBlbmlzID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgIC8vICAgICBpZiAoYnVsZ2VzLmNyb3RjaCA+IDApIHtcclxuICAgICAgICAvLyAgICAgICAgIHByZXNlbnRhdGlvbi5hZGQoU2F5LlBBUkFHUkFQSF9CUkVBSywgXCJZb3UgaGF2ZSBcIiwgbmV3IFNheUFuKCksIEh1bWFub2lkUGVuaXMuZ2V0U2l6ZVRleHQoYnVsZ2VzLmNyb3RjaCkgKyBcIiBidWxnZSB2aXNpYmxlIG9uIHlvdXIgY3JvdGNoLlwiKTtcclxuICAgICAgICAvLyAgICAgfVxyXG4gICAgICAgIC8vIH0gZWxzZSB7XHJcbiAgICAgICAgLy8gICAgIHByZXNlbnRhdGlvbi5hZGQoU2F5LlBBUkFHUkFQSF9CUkVBSyxcclxuICAgICAgICAvLyAgICAgICAgIG5ldyBTYXlCb2xkKFwiRGljazogXCIpLFxyXG4gICAgICAgIC8vICAgICAgICAgcGVuaXMuZ2V0U2l6ZVRleHQoKSxcclxuICAgICAgICAvLyAgICAgICAgIFwiIChWaXNpYmxlIGFzIFwiLFxyXG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aW9uLmNoZWNrLmV4ZWN1dGUoe1xyXG4gICAgICAgICAgICBub3VuIDogdGhpc1xyXG4gICAgICAgIH0sIC4uLmNoZWNrUnVsZWJvb2tzKTtcclxuXHJcbiAgICAgICAgLy8gVGhlcmUgYXJlIG5vdyBtdWx0aXBsZSByZXN1bHRzISBBIGZhbHNlIHJlc3VsdCBtZWFucyBhIGZhaWwgQ2hlY2shIEJ1dCBpdCBjYW4gYWxzbyByZXR1cm4gYSBuZXcgYWN0aW9uIVxyXG4gICAgICAgIGlmIChyZXN1bHQgPT0gZmFsc2UpIHtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH0gZWxzZSBpZihyZXN1bHQgaW5zdGFuY2VvZiBBY3Rpb24pIHtcclxuICAgICAgICAgICAgY29uc29sZS5kZWJ1ZyhSdWxlYm9vay5nZXRJbmRlbnRhdGlvbigpICsgXCJbQUNUSU9OXSBJbnN0ZWFkIG9mLi4uXCIpO1xyXG4gICAgICAgICAgICBhd2FpdCByZXN1bHQuZXhlY3V0ZSgpO1xyXG4gICAgICAgICAgICB0aGlzLnNheS5hZGQocmVzdWx0LnNheSk7XHJcbiAgICAgICAgICAgIHRoaXMubm91bnMgPSByZXN1bHQubm91bnM7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8qKlxyXG4gICAgICAgICAqIENhcnJ5IE91dFxyXG4gICAgICAgICAqL1xyXG4gICAgICAgIGF3YWl0IEFjdGlvbi5jYXJyeS5leGVjdXRlKHtcclxuICAgICAgICAgICAgbm91biA6IHRoaXNcclxuICAgICAgICB9LCAuLi5jYXJyeVJ1bGVib29rcyk7XHJcblxyXG4gICAgICAgIHJldHVybiB0aGlzLnNheTtcclxuICAgIH1cclxuXHJcbiAgICBnZXQgYWN0b3IoKTogVGhpbmcge1xyXG4gICAgICAgIHJldHVybiB0aGlzLl9hY3RvcjtcclxuICAgIH1cclxuXHJcbiAgICBzZXQgYWN0b3IodmFsdWU6IFRoaW5nKSB7XHJcbiAgICAgICAgdGhpcy5fYWN0b3IgPSB2YWx1ZTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0Tm91biAobiA6IG51bWJlcikgOiBhbnkge1xyXG4gICAgICAgIGlmICh0aGlzLm5vdW5zLmxlbmd0aCA+IG4pIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMubm91bnNbbl07XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHNldE5vdW4gKG4gOiBudW1iZXIsIG5vdW4gOiBhbnkpIHtcclxuICAgICAgICB3aGlsZSAodGhpcy5ub3Vucy5sZW5ndGggPCBuKSB7XHJcbiAgICAgICAgICAgIHRoaXMubm91bnMucHVzaCh1bmRlZmluZWQpO1xyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLm5vdW5zW25dID0gbm91bjtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIE5lZWRzIHRvIHJldHVybiBhIHN0cmluZyBleHBsYWluaW5nIHdoYXQgdGhlIHBsYXllciB3aWxsIGRvIGlmIGhlIGRvZXMgdGhpcyBhY3Rpb24uXHJcbiAgICAgKiBGb3IgaW5zdGFuY2UsIEFjdGlvblRha2luZyBzaG91bGQgcmV0dXJuIHNvbWV0aGluZyBsaWtlIHJldHVybiBcInRha2UgXCIgKyB0aGlzLm5vdW5zWzBdLmdldE5hbWUoKSxcclxuICAgICAqICAgd2hpY2ggd291bGQgcmVhZCBhcyBcInRha2UgdGhpbmdcIi5cclxuICAgICAqICAgcmVtZW1iZXIgdGhhdCB0aGluZ3MgaW1wbGVtZW50IFBSSU5UQUJMRSBpbnRlcmZhY2UsIHNvIHlvdSBjYW4gZ2V0IHRoZWlyIG5hbWVzLlxyXG4gICAgICogQHJldHVybnMge3N0cmluZ31cclxuICAgICAqL1xyXG4gICAgcHVibGljIGdldENvbW1hbmRUZ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1xyXG4gICAgICAgICAgICAgICAgdGhpcy52YWx1ZXNIYXNoW3N0cmluZ10gPSB2YWx1ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGlzLm1hbnlNYXAuc2V0KHJpZ2h0LCBsZWZ0KTtcclxuICAgICAgICAgICAgaWYgKHRoaXMub25lTWFwLmdldChsZWZ0KSA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMub25lTWFwLnNldChsZWZ0LCBbcmlnaHRdKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMub25lTWFwLmdldChsZWZ0KS5wdXNoKHJpZ2h0KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0TGVmdCAocmlnaHQgOiBhbnkpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5tYW55TWFwLmdldChyaWdodCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEFueUxlZnQgKCkge1xyXG4gICAgICAgIGxldCBsZWZ0ID0gW107XHJcbiAgICAgICAgdGhpcy5vbmVNYXAuZm9yRWFjaCgodmFsdWUsIGtleSkgPT4ge1xyXG4gICAgICAgICAgICBsZWZ0LnB1c2goa2V5KTtcclxuICAgICAgICB9KTtcclxuICAgICAgICBhcnJheVVuaXF1ZShsZWZ0KTtcclxuICAgICAgICByZXR1cm4gbGVmdDtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0QW55UmlnaHQgKCkge1xyXG4gICAgICAgIGxldCByaWdodHMgPSBbXTtcclxuICAgICAgICB0aGlzLm9uZU1hcC5mb3JFYWNoKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICByaWdodHMucHVzaCguLi52YWx1ZSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgYXJyYXlVbmlxdWUocmlnaHRzKTtcclxuICAgICAgICByZXR1cm4g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lxdWUodGhpcyk7XHJcbiAgICAgICAgICAgIHRoaXMudW5pcXVlID0gdHJ1ZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBUaGluZy5zdG9yZU5vblVuaXF1ZSh0aGlzKTtcclxuICAgICAgICAgICAgdGhpcy5jbG9uZU9wdGlvbnMgPSBvcHRpb25zO1xyXG4gICAgICAgICAgICB0aGlzLmNsb25lID0gKGluY2x1ZGVDaGFuZ2VzPyA6IGJvb2xlYW4pID0+IHtcclxuICAgICAgICAgICAgICAgIGxldCBjb25zID0gPGFueT4gZXZhbCgoPGFueT4gdGhpcy5jb25zdHJ1Y3RvcikubmFtZSk7XHJcbiAgICAgICAgICAgICAgICBsZXQgbmV3VGhpbmcgPSA8VGhpbmc+IG5ldyBjb25zKHRoaXMuY2xvbmVPcHRpb25zKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoaW5jbHVkZUNoYW5nZXMgPT0gdW5kZWZpbmVkIHx8IGluY2x1ZGVDaGFuZ2VzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmV3VGhpbmcuc2V0Q2hhbmdlcyh0aGlzLmdldENoYW5nZXMoKSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ld1RoaW5nO1xyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKG9wdGlvbnMuaW1hZ2UgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGlmIChvcHRpb25zLmltYWdlIGluc3RhbmNlb2YgU2F5SW1hZ2UpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuaW1hZ2UgPSBvcHRpb25zLmltYWdlO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5pbWFnZSA9IG5ldyBTYXlJbWFnZShvcHRpb25zLmltYWdlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgdGhpcy5zaGlueSA9IG9wdGlvbnMuc2hpbnkgPT0gdHJ1ZTtcclxuXHJcbiAgICAgICAgdGhpcy5hZGRHZXRBbHRlcmF0aW9ucygodGhpbmcgOiBUaGluZykgPT4ge1xyXG4gICAgICAgICAgICBmdW5jdGlvbiBnZXRDbG9zZXN0Um9vbSAoY3VycmVudFJvb20gOiBSb29tUmFuZG9tLCByb29tcyA6IEFycmF5PFJvb21SYW5kb20+KSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoY3VycmVudFJvb20gaW5zdGFuY2VvZiBSb29tUmFuZG9tICYmIHJvb21zLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICByb29tcy5zb3J0KChhIDogUm9vbVJhbmRvbSwgYiA6IFJvb21SYW5kb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEoYSBpbnN0YW5jZW9mIFJvb21SYW5kb20pKSByZXR1cm4gLTE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghKGIgaW5zdGFuY2VvZiBSb29tUmFuZG9tKSkgcmV0dXJuIDE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYSA9IGEuZ2V0RGlzdGFuY2VUbyg8Um9vbVJhbmRvbT4gY3VycmVudFJvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGIgPSBiLmdldERpc3RhbmNlVG8oPFJvb21SYW5kb20+IGN1cnJlbnRSb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRhIC0gZGI7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgTG9jYXRpb24gOiByb29tc1swXS5nZXROYW1lKClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmIChUaGluZy5FbmNsb3NlZFJlbGF0aW9uLmdldExlZnQodGhpbmcpID09IHRoaW5nLmdldFJvb20oKSAmJiB0aGluZy5nZXRSb29tKCkgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAodGhpbmcuZ2V0Um9vbSgpLmZvZGRlcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGluZy5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHB1dCBhdCBjbG9zZXN0IHJlbWVtYmVyZWQgcm9vbVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcm9vbXMgPSBXb3JsZFN0YXRlLmdldFJlbWVtYmVyZWRSb29tc0FzUm9vbXMoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGN1cnJlbnRSb29tID0gdGhpbmcuZ2V0Um9vbSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0Q2xvc2VzdFJvb20oPFJvb21SYW5kb20+IGN1cnJlbnRSb29tLCA8QXJyYXk8Um9vbVJhbmRvbT4+IHJvb21zKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwdXQgYXQgY2xvc2VzdCByb29tXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByb29tcyA9IHRoaW5nLmdldFJvb20oKS5nZXRDb25uZWN0ZWRSb29tcygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY3VycmVudFJvb20gPSB0aGluZy5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmb3VuZFJvb20gPSBnZXRDbG9zZXN0Um9vbSg8Um9vbVJhbmRvbT4gY3VycmVudFJvb20sIDxBcnJheTxSb29tUmFuZG9tPj4gcm9vbXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZm91bmRSb29tICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZvdW5kUm9vbTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvb21zID0gKDxSZWdpb24+IFJlZ2lvbi5JblJlbGF0aW9uLmdldExlZnQodGhpbmcuZ2V0Um9vbSgpKSkuZ2V0Um9vbXMoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRDbG9zZXN0Um9vbSg8Um9vbVJhbmRvbT4gY3VycmVudFJvb20sIDxBcnJheTxSb29tUmFuZG9tPj4gcm9vbXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBMb2NhdGlvbjogdGhpbmcuZ2V0Um9vbSgpLmdldE5hbWUoKVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmFkZFNldEFsdGVyYXRpb25zKCh0aGluZyA6IFRoaW5nLCBjaGFuZ2VzKSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChjaGFuZ2VzLkxvY2F0aW9uICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHJvb20gPSBSb29tLmdldFJvb20oY2hhbmdlcy5Mb2NhdGlvbik7XHJcbiAgICAgICAgICAgICAgICBpZiAocm9vbSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICByb29tLnBsYWNlKHRoaW5nKTtcclxuICAgICAgICAgICAgICAgIH0gZ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XMgcGxheWVyLlxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXROYW1lICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5uYW1lO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgc3RvcmVOb25VbmlxdWUgKHRoaW5nIDogVGhpbmcpIHtcclxuICAgICAgICBpZiAoVGhpbmcudGhpbmdzW3RoaW5nLm5hbWVdID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBUaGluZy50aGluZ3NbdGhpbmcubmFtZV0gPSBbdGhpbmddO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIFRoaW5nLnRoaW5nc1t0aGluZy5uYW1lXS5wdXNoKHRoaW5nKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXROb25VbmlxdWUgKG5hbWUgOiBzdHJpbmcpIDogQXJyYXk8VGhpbmc+IHtcclxuICAgICAgICByZXR1cm4gVGhpbmcudGhpbmdzW25hbWVdID09IHVuZGVmaW5lZCA/IFtdIDogVGhpbmcudGhpbmdzW25hbWVdO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgZ2V0T25lVGhpbmcgKG5hbWUgOiBzdHJpbmcpIHtcclxuICAgICAgICBsZXQgdGhpbmcgOiBUaGluZyA9IFRoaW5nLmdldFVuaXF1ZShuYW1lKTtcclxuICAgICAgICBpZiAodGhpbmcgPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGxldCB0aGluZ3MgPSBUaGluZy5nZXROb25VbmlxdWUobmFtZSk7XHJcbiAgICAgICAgICAgIGlmICh0aGluZ3MubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgdGhpbmcgPSB0aGluZ3NbMF07XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHRoaW5nO1xyXG4gICAgfVx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biAgICAgICAgICAgIGxldCBvd25lciA9IDxUaGluZz4gdGhpbmcuZ2V0RW5jbG9zZWRPbmUoKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChvd25lciA9PSBhY3Rvcil7XHJcbiAgICAgICAgICAgICAgICBpZiAob3duZXIgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBhbHJlYWR5IGhhdmUgaXQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSlcclxuKTtcclxuXHJcbkFjdGlvblRha2UuY2hlY2suYWRkUnVsZShcclxuICAgIG5ldyBSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJDaGVjayBUYWtpbmcgLSBEb251dCBzdGVhbFwiLFxyXG4gICAgICAgIGNvZGUgOiAocnVsZWJvb2sgOiBSdWxlYm9va1J1bm5lcjxBY3Rpb25UYWtlPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgYWN0aW9uID0gPEFjdGlvbkdvPiBydWxlYm9vay5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgYWN0b3IgPSBhY3Rpb24uYWN0b3I7XHJcbiAgICAgICAgICAgIGxldCB0aGluZyA9ICg8VGhpbmc+YWN0aW9uLmdldE5vdW4oMCkpO1xyXG4gICAgICAgICAgICBsZXQgb3duZXIgPSA8VGhpbmc+IHRoaW5nLmdldEVuY2xvc2VkT25lKCk7XHJcblxyXG4gICAgICAgICAgICBpZiAob3duZXIgIT0gdW5kZWZpbmVkICYmIG93bmVyLmFuaW1hdGVkKXtcclxuICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKG93bmVyLmdldFByaW50ZWROYW1lKCkgKyBcIiB3b3VsZG4ndCBsaWtlIHRoYXQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSlcclxuKTtcclxuXHJcbkFjdGlvblRha2UuY2hlY2suYWRkUnVsZShcclxuICAgIG5ldyBSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJDaGVjayBUYWtpbmcgLSBDYW4ndCB0YWtlIGZpeGVkIGluIHBsYWNlXCIsXHJcbiAgICAgICAgY29kZSA6IChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPEFjdGlvblRha2U+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uR28+IHJ1bGVib29rLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBhY3RvciA9IGFjdGlvbi5hY3RvcjtcclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gKDxUaGluZz5hY3Rpb24uZ2V0Tm91bigwKSk7XHJcblxyXG4gICAgICAgICAgICBpZiAodGhpbmcuZml4ZWRJblBsYWNlKXtcclxuICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGNhbid0IHRha2UgdGhhdC5cIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KVxyXG4pO1xyXG5cclxuQWN0aW9uVGFrZS5jYXJyeS5hZGRSdWxlKFxyXG4gICAgQWN0aW9uVGFrZS5kZWZhdWx0Q2FycnlUYWtpbmdSdWxlXHJcbik7XHJcblxyXG5FbGVtZW50cy5IeXBlcmxpbmtIYW5kbGVyLkh5cGVybGlua2luZ1J1bGVib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biAgICAgICAgICAgICAgICBsZXQgY1Jvb20gPSBhY3Rvci5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoY1Jvb20gaW5zdGFuY2VvZiBSb29tUmFuZG9tKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRSb29tID0gYWN0aW9uLmdldE5vdW4oMCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjUm9vbSA9PSBkUm9vbSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0b3IuaXNQbGF5ZXIoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgYXJlIGFscmVhZHkgdGhlcmUhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2RlO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29kZSA9IChyb29tOiBSb29tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gV29ybGRTdGF0ZS5pc1Jvb21SZW1lbWJlcmVkKHJvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aW9uID0gY1Jvb20uZ2V0QVN0YXJCZXN0RGlyZWN0aW9uVG8oZFJvb20sIGNvZGUpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChkaXJlY3Rpb24gPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhY3Rvci5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBkb24ndCByZW1lbWJlciBob3cgdG8gZ2V0IHRoZXJlLlwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNldE5vdW4oMCwgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVDaGVja0lzdGhlcmVkaXJlY3Rpb25hbmRyb29tID0gQWN0aW9uR28uY2hlY2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiQ2hlY2sgR29pbmcgLSBpcyB0aGVyZSBhIGRpcmVjdGlvbj8gRG9lcyBpdCBsZWFkIGFueXdoZXJlP1wiLFxyXG4gICAgICAgIGNvZGUgOiAocnVsZWJvb2spID0+IHtcclxuICAgICAgICAgICAgbGV0IGFjdGlvbiA9IDxBY3Rpb25Hbz4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgbGV0IGNSb29tID0gYWN0aW9uLmFjdG9yLmdldFJvb20oKTtcclxuICAgICAgICAgICAgaWYgKGNSb29tID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOyAvLyBSdWxlIGZhaWxzLCBhY3RvciBpcyBvdXQgb2Ygd29ybGRcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBsZXQgZGlyZWN0aW9uID0gYWN0aW9uLmdldE5vdW4oMCk7XHJcbiAgICAgICAgICAgIGlmIChkaXJlY3Rpb24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cbiAgICAgICAgICAgIHJvb21Hb25lSW50by5wbGFjZShhY3Rpb24uYWN0b3IpO1xyXG5cclxuICAgICAgICAgICAgbGV0IGFjdG9yID0gYWN0aW9uLmFjdG9yO1xyXG4gICAgICAgICAgICBpZiAoYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGdvIFwiICsgRGlyZWN0aW9uTmFtZXNbRGlyZWN0aW9uW2RpcmVjdGlvbl1dLnRvTG93ZXJDYXNlKCkgKyBcIi5cIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBpZiAocm9vbUdvbmVGcm9tID09IFdvcmxkU3RhdGUucGxheWVyLmdldFJvb20oKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKG5ldyBTYXlUaGUoKSwgYWN0b3IsIFwiIGdvZXMgXCIgKyBEaXJlY3Rpb25OYW1lc1tEaXJlY3Rpb25bZGlyZWN0aW9uXV0udG9Mb3dlckNhc2UoKSArIFwiLlwiKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9wcG9zaXRlTmFtZSA9IERpcmVjdGlvbk5hbWVzW1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBPcHBvc2l0ZURpcmVjdGlvbltkaXJlY3Rpb25dXHJcbiAgICAgICAgICAgICAgICAgICAgXTtcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChuZXcgU2F5VGhlKCksIGFjdG9yLCBcIiBhcnJpdmVzIGZyb20gdGhlIFwiICsgb3Bwb3NpdGVOYW1lLnRvTG93ZXJDYXNlKCkgKyBcIi5cIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWM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9uLmFwcGVuZENoaWxkKHApO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIGxldCB0aGluZ3MgPSByb29tLmdldENvbnRhaW5lZEFuZFZpc2libGUoKTtcclxuICAgICAgICAgICAgaWYgKHRoaW5ncy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgdGhpbmdMaXN0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcInBcIik7XHJcbiAgICAgICAgICAgICAgICB0aGluZ0xpc3QuY2xhc3NMaXN0LmFkZChcInJvb21EZXNjcmlwdGlvblwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICBhd2FpdCBQcmludGluZ1Zpc2libGVUaGluZ3NSdWxlYm9vay5leGVjdXRlKHtcclxuICAgICAgICAgICAgICAgICAgICBub3VuIDogPFZpc2libGVUaGluZ3NPcHRpb25zPiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaW5ncyA6IHRoaW5ncyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyIDogdGhpbmdMaXN0XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgY3VycmVudFJvb21EZXNjcmlwdGlvbi5hcHBlbmRDaGlsZCh0aGluZ0xpc3QpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDAsIHZhbHVlID0gcm9vbS5jb25uZWN0aW9uc1tpbmRleF07IGluZGV4IDwgcm9vbS5jb25uZWN0aW9ucy5sZW5ndGg7IHZhbHVlID0gcm9vbS5jb25uZWN0aW9uc1srK2luZGV4XSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBwID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcInBcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgcC5jbGFzc0xpc3QuYWRkKFwicm9vbUV4aXRcIik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBsaW5rID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImFcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgbGluay5jbGFzc0xpc3QuYWRkKFwicm9vbURpcmVjdGlvblwiKTtcclxuICAgICAgICAgICAgICAgICAgICBsaW5rLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKERpcmVjdGlvbk5hbWVzW0RpcmVjdGlvbltpbmRleF1dKSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIENvbnRyb2xzLkxpbmtzLm1ha2VMaW5rKGxpbmssIG5ldyBBY3Rpb25HbyhXb3JsZFN0YXRlLnBsYXllciwgaW5kZXgpKTtcclxuICAgICAgICAgICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShsaW5rLCBDb250cm9scy5LZXlIYW5kbGVyLmdldERpcmVjdGlvbkNvZGVCeUluZGV4KGluZGV4KSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHAuYXBwZW5kQ2hpbGQobGluayk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkaXJlY3Rpb25SZXN1bHQgPSBcIjogXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKFdvcmxkU3RhdGUuaXNSb29tUmVtZW1iZXJlZCh2YWx1ZSkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlyZWN0aW9uUmVzdWx0ICs9IHZhbHVlLmdldFByaW50ZWROYW1lKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlyZWN0aW9uUmVzdWx0ICs9IFwiQSBuZXcgcGxhY2VcIjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJ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XHJcbiAgICAgICAgICAgIG5vdW4uY29udGFpbmVyLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKFwiWW91IGNhbiBzZWUgXCIpKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuICAgIFByaW50aW5nVmlzaWJsZVRoaW5nc1J1bGVib29rLmFkZFJ1bGUoUHJpbnRJbnRyb1RvVmlzaWJsZVRoaW5nc1J1bGUpO1xyXG5cclxuICAgIGV4cG9ydCB2YXIgUHJpbnRWaXNpYmxlVGhpbmdzUnVsZSA9IG5ldyBSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJQcmludCBhbGwgdmlzaWJsZSB0aGluZ3NcIixcclxuICAgICAgICBjb2RlIDogYXN5bmMgKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8VmlzaWJsZVRoaW5nc09wdGlvbnM+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBub3VuID0gPFZpc2libGVUaGluZ3NPcHRpb25zPiBydWxlYm9vay5ub3VuO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG5vdW4udGhpbmdzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBub3VuLnRoaW5nc1tpXTtcclxuICAgICAgICAgICAgICAgIGxldCBsaW5rID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImFcIik7XHJcbiAgICAgICAgICAgICAgICBsaW5rLmNsYXNzTGlzdC5hZGQoXCJyb29tT2JqZWN0XCIpO1xyXG5cclxuICAgICAgICAgICAgICAgIGxldCBzYXkgOiBTYXlcclxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSBpbnN0YW5jZW9mIFRoaW5nICYmIHZhbHVlLnVuaXF1ZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheSA9IG5ldyBTYXkobmV3IFNheVRoZShmYWxzZSksIHZhbHVlKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5ID0gbmV3IFNheShuZXcgU2F5QW4oZmFsc2UpLCB2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBzYXkuZ2V0UHVyZUVsZW1lbnRzKCkudGhlbih2YWx1ZTIgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwLCBlbGVtZW50ID0gdmFsdWUyW2ldOyBlbGVtZW50ICE9IHVuZGVmaW5lZDsgZWxlbWVudCA9IHZhbHVlMlsrK2ldKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsuYXBwZW5kQ2hpbGQoZWxlbWVudCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuTGlua3MubWFrZUxpbmsobGluaywgbmV3IEFjdGlvbkV4YW1pbmUoV29ybGRTdGF0ZS5wbGF5ZXIsIHZhbHVlKSk7XHJcbiAgICAgICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShsaW5rLCBDb250cm9scy5LZXlIYW5kbGVyLmdldEZpcnN0S2V5Q29kZSgpKTtcclxuXHJcbiAgICAgICAgICAgICAgICBub3VuLmNvbnRhaW5lci5hcHBlbmRDaGlsZChsaW5rKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoKGkgKyAxKSA8IG5vdW4udGhpbmdzLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIG5vdW4uY29udGFpbmVyLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKFwiLCBcIikpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbiAgICBQcmludGluZ1Zpc2libGVUaGluZ3NSdWxlYm9vay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gICB0aGlzLmNvaW5zICs9IGNvaW5zO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyByZW1vdmVDb2lucyAoY29pbnMgOiBudW1iZXIpIHtcclxuICAgICAgICB0aGlzLmNvaW5zIC09IGNvaW5zO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRDb2lucyAoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuY29pbnM7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNoaW55ICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5jb2lucyA+IDA7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGNvbnN0cnVjdG9yIChvcHRpb25zIDogVGhpbmdPcHRpb25zKSB7XHJcbiAgICAgICAgc3VwZXIob3B0aW9ucyk7XHJcblxyXG4gICAgICAgIHRoaXMuYWRkR2V0QWx0ZXJhdGlvbnMoKHB1cnNlKSA9PiB7XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBjb2lucyA6IHB1cnNlLmdldENvaW5zKClcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy5hZGRTZXRBbHRlcmF0aW9ucygocHVyc2UsIGNoYW5nZU9iaikgPT4ge1xyXG4gICAgICAgICAgICBwdXJzZS5jb2lucyA9IChjaGFuZ2VPYmouY29pbnMpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgY2FycnlPdXRUYWtpbmdDb2luUG91Y2hlcyA9IG5ldyBSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJDYXJyeSBvdXQgdGFraW5nIGNvaW4gcG91Y2hlc1wiLFxyXG4gICAgICAgIGZpcnN0UHJpb3JpdHkgOiBBY3Rpb25UYWtlLmRlZmF1bHRDYXJyeVRha2luZ1J1bGUuZmlyc3RQcmlvcml0eSxcclxuICAgICAgICBwcmlvcml0eSA6IEFjdGlvblRha2UuZGVmYXVsdENhcnJ5VGFraW5nUnVsZS5wcmlvcml0eSArIDEsXHJcbiAgICAgICAgY29kZSA6IGFzeW5jIChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPEFjdGlvblRha2U+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uVGFrZT4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgbGV0IGFjdG9yID0gYWN0aW9uLmFjdG9yO1xyXG4gICAgICAgICAgICBsZXQgdGhpbmcgPSAoPENvaW5Qb3VjaD5hY3Rpb24uZ2V0Tm91bigwKSk7XHJcbiAgICAgICAgICAgIGxldCBhY3RvclBvdWNoZXMgPSBUaGluZy5DYXJyeVJlbGF0aW9uLmdldFJpZ2h0VHlwZShhY3RvciwgQ29pblBvdWNoKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChhY3RvclBvdWNoZXMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHRoaW5nQ29pbnMgPSB0aGluZy5nZXRDb2lucygpO1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaW5nQ29pbnMgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcnVsZWJvb2suc2tpcFJ1bGUoQWN0aW9uVGFrZS5kZWZhdWx0Q2FycnlUYWtpbmdSdWxlKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgKDxDb2luUG91Y2g+IGFjdG9yUG91Y2hlc1swXSkuYWRkQ29pbnModGhpbmdDb2lucyk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpbmcucmVtb3ZlQ29pbnModGhpbmcuZ2V0Q29pbnMoKSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBlbXB0eSBcIiwgbmV3IFNheVRoZSgpLCB0aGluZywgXCIgaW50byB5b3VyIFwiLCBhY3RvclBvdWNoZXNbMF0sIFwiLiBZb3VyIFwiLCBhY3RvclBvdWNoZXNbMF0sIFwiIG5vdyBoYXMgXCIgKyBhY3RvclBvdWNoZXNbMF0uZ2V0Q29pbnMoKS50b1N0cmluZygpICsgXCIgY29pbnMuXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKG5ldyBTYXlUaGUoKSwgYWN0b3IsIFwiIGVtcHRpZXMgXCIsIG5ldyBTYXlUaGUoKSwgdGhpbmcsIFwiIGludG8gXCIsIFNheS5oaXNIZXJzSXRzKGFjdG9yKSwgYWN0b3JQb3VjaGVzWzBdLCBcIi5cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBnaXZlIHRoZW0gdGhlIG9sJyBzd2l0Y2hhcm9vXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG15Q29pbnMgPSBhY3RvclBvdWNoZXNbMF0uZ2V0Q29pbnMoKTtcclxuICAgICAgICAgICAgICAgICAgICBhY3RvclBvdWNoZXNbMF0ucmVtb3ZlQ29pbnMobXlDb2lucyk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpbmcuYWRkQ29pbnMobXlDb2lucyk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGVtcHR5IHlvdXIgXCIsIGFjdG9yUG91Y2hlc1swXSwgXCIgaW50byBcIiwgbmV3IFNheVRoZSgpLCB0aGluZywgXCIuXCIsIFNheS5QQVJBR1JBUEhfQlJFQUspO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBsZXQgZHJvcCA9IG5ldyBBY3Rpb25Ecm9wKGFjdG9yLCBhY3RvclBvdWNoZXNbMF0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IGRyb3AuZXhlY3V0ZSgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoVGhpbmcuRW5jbG9zZWRSZWxhdGlvbi5nZXRMZWZ0KGFjdG9yUG91Y2hlc1swXSkgPT0gYWN0b3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBjYW4ndCBnZXQgcmlkIG9mIHlvdXIgXCIsIGFjdG9yUG91Y2hlc1swXSwgXCIhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGNvbmRpdGlvbnMgOiAocnVsZWJvb2sgOiBSdWxlYm9va1J1bm5lcjxBY3Rpb25UYWtlPikgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4gKCg8QWN0aW9uVGFrZT4gcnVsZWJvb2subm91bikuZ2V0Tm91bigwKSBpbnN0YW5jZW9mIENvaW5Qb3VjaCk7XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbn1cclxuXHJcbkFjdGlvblRha2UuY2FycnkuYWRkUnVsZShDb2luUG91Y2guY2FycnlPdXRUYWtpbmdDb2luUG91Y2hlcyk7XHJcblxyXG5TYXkuYWZ0ZXJQcmludGluZy5hZGRSdWxlKG5ldyBSdWxlKFxyXG4gICAge1xyXG4gICAgICAgIG5hbWUgOiBcIkluY2x1Z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cblxyXG4gICAgICAgIGlmICh3aWVsZGVkLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgcHJpbnRIZWFkZXIoXCJXaWVsZGVkXCIpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHdpZWxkZWQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHByaW50VGhpbmcod2llbGRlZFtpXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmICh3b3JuLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgcHJpbnRIZWFkZXIoXCJXb3JuXCIpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHdvcm4ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHByaW50VGhpbmcod29ybltpXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChjYXJyaWVkLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgcHJpbnRIZWFkZXIoXCJDYXJyaWVkXCIpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNhcnJpZWQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHByaW50VGhpbmcoY2FycmllZFtpXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGxldCBwb3VjaCA9IDxBcnJheTxDb2luUG91Y2g+PiBUaGluZy5DYXJyeVJlbGF0aW9uLmdldFJpZ2h0VHlwZShXb3JsZFN0YXRlLnBsYXllciwgQ29pblBvdWNoKTtcclxuICAgICAgICBpZiAocG91Y2gubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICBsZXQgcCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJwXCIpO1xyXG4gICAgICAgICAgICBwLmNsYXN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clxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBsZXQgZFJvb20gPSBhY3Rpb24uZ2V0Tm91bigwKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChjUm9vbSA9PSBkUm9vbSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGFjdG9yLmlzUGxheWVyKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBhcmUgYWxyZWFkeSB0aGVyZSFcIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGxldCBjb2RlO1xyXG5cclxuICAgICAgICAgICAgaWYgKGFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICBjb2RlID0gKHJvb20gOiBSb29tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFdvcmxkU3RhdGUuaXNSb29tUmVtZW1iZXJlZChyb29tKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IGNSb29tLmJlc3REaXJlY3Rpb25UbyhkUm9vbSwgY29kZSk7XHJcbiAgICAgICAgICAgIGlmIChkaXJlY3Rpb24gPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0b3IuaXNQbGF5ZXIoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGRvbid0IHJlbWVtYmVyIGhvdyB0byBnZXQgdGhlcmUuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgYWN0aW9uLnNldE5vdW4oMCw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ICAgcHVibGljIHdhbmRlckNoYW5jZSA9IDUwO1xyXG4gICAgcHVibGljIHBpY2tzU2hpbmllcyA9IHRydWU7XHJcblxyXG4gICAgcHVibGljIGNvbnN0cnVjdG9yIChvcHRpb25zIDogQUlPcHRpb25zKSB7XHJcbiAgICAgICAgZm9yIChsZXQga2V5IGluIG9wdGlvbnMpIHtcclxuICAgICAgICAgICAgdGhpc1trZXldID0gb3B0aW9uc1trZXldO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIEV4ZWN1dGluZyBhbiBBSSByZXR1cm5zIGFuIEFjdGlvbi4gRE9FU04nVCBleGVjdXRlIHRoZSBhY3Rpb24sIGp1c3QgZmluZHMgaXQhXHJcbiAgICAgKiBAcmV0dXJucyB7UHJvbWlzZTxBY3Rpb24+fVxyXG4gICAgICovXHJcbiAgICBwdWJsaWMgYXN5bmMgZXhlY3V0ZSAoYWN0b3IgOiBUaGluZykgOiBQcm9taXNlPEFjdGlvbj4ge1xyXG4gICAgICAgIGxldCBwcm9taXNlIDogUHJvbWlzZTxBY3Rpb24+O1xyXG4gICAgICAgIC8vIFRPRE86IGlmIGFjdG9yLmlzSW5Db21iYXQoKTtcclxuICAgICAgICBpZiAocHJvbWlzZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgcHJvbWlzZSA9IEFJLmNvbWJhdFJ1bGVzLmV4ZWN1dGUoe1xyXG4gICAgICAgICAgICAgICAgbm91biA6IGFjdG9yXHJcbiAgICAgICAgICAgIH0sIC4uLnRoaXMuZXh0cmFDb21iYXRSdWxlcyk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgcHJvbWlzZSA9IEFJLnJ1bGVzLmV4ZWN1dGUoe1xyXG4gICAgICAgICAgICAgICAgbm91biA6IGFjdG9yXHJcbiAgICAgICAgICAgIH0sIC4uLnRoaXMuZXh0cmFSdWxlcyk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICA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ICAgZXhwb3J0IGxldCBBZ2lsaXR5ID0gbmV3IEF0dHJpYnV0ZShcclxuICAgICAgICBcIkFnaWxpdHlcIixcclxuICAgICAgICB2YWx1ZSA9PiB7XHJcbiAgICAgICAgICAgIHN3aXRjaCAodmFsdWUpIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogcmV0dXJuIFwiQ2F0bGlrZVwiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiByZXR1cm4gXCJHeW1uYXN0XCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDM6IHJldHVybiBcIkFjY3VyYXRlXCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDI6IHJldHVybiBcIkNvbW1vblwiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAxOiByZXR1cm4gXCJBY2NpZGVudC1wcm9uZVwiO1xyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDogcmV0dXJuIFwiT3V0IG9mIGJvdW5kcy5cIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICk7XHJcblxyXG4gICAgZXhwb3J0IGxldCBJbnRlbGxpZ2VuY2UgPSBuZXcgQXR0cmlidXRlKFxyXG4gICAgICAgIFwiSW50ZWxsaWdlbmNlXCIsXHJcbiAgICAgICAgdmFsdWUgPT4ge1xyXG4gICAgICAgICAgICBzd2l0Y2ggKHZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDU6IHJldHVybiBcIkdlbml1c1wiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiByZXR1cm4gXCJHaWZ0ZWRcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMzogcmV0dXJuIFwiS25vd2xlZGdlYWJsZVwiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAyOiByZXR1cm4gXCJOb3JtYWxcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMTogcmV0dXJuIFwiRG9vclwiO1xyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDogcmV0dXJuIFwiT3V0IG9mIGJvdW5kcy5cIjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICk7XHJcblxyXG4gICAgZXhwb3J0IGxldCBDaGFybSA9IG5ldyBBdHRyaWJ1dGUoXHJcbiAgICAgICAgXCJDaGFybVwiLFxyXG4gICAgICAgIHZhbHVlID0+IHtcclxuICAgICAgICAgICAgc3dpdGNoICh2YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgY2FzZSA1OiByZXR1cm4gKCg8SHVtYW5vaWQ+IFdvcmxkU3RhdGUucGxheWVyKS5pc01hbGUoKSA/IFwiQ2FzYW5vdmFcIiA6IFwiU2VkdWN0cmVzc1wiKTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNDogcmV0dXJuIFwiRGlwbG9tYXRcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMzogcmV0dXJuIChcIkNoZWVyeSBTYWxlc1wiICsgKCg8SHVtYW5vaWQ+IFdvcmxkU3RhdGUucGxheWVyKS5pc01hbGUoKSA/IFwibWFuXCIgOiBcIndvbWFuXCIpKTtcclxuICAgICAgICAgICAgICAgIGNhc2UgMjogcmV0dXJuIFwiTm90IGV2ZW4gdHJ5aW5nXCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDE6IHJldHVybiBcIlVucGxlYXNhbnRcIjtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJldHVybiBcIk91dCBvZiBib3VuZHMuXCI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICApO1xyXG5cclxuICAgIGV4cG9ydCBsZXQgQ29ycnVwdGlvbiA9IG5ldyBBdHRyaWJ1dGUoXHJcbiAgICAgICAgXCJDb3JydXB0aW9uXCIsXHJcbiAgICAgICAgdmFsdWUgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4gXCJOb3QgZGVmaW5lZFwiXHJcbiAgICAgICAgfSxcclxuICAgICAgICAwLCAxMDBcclxuICAgICk7XHJcblxyXG5cclxuICAgIGV4cG9ydCBsZXQgR2VuZGVySWRlbnRpdHkgPSBuZXcgQXR0cmlidXRlKFxyXG4gICAgICAgIFwiR2VuZGVyIElkZW50aXR5XCIsXHJcbiAgICAgICAgdmFsdWUgPT4ge1xyXG4gICAgICAgICAgICBpZiAodmFsdWUgPj0gNzUpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBcIllvdSBzdHJvbmdseSBmZWVsLCBhbmQgYWN0LCBsaWtlIGEgd29tYW4uXCI7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodmFsdWUgPj0gNjApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBcIllvdSBmZWVsLCBhbmQgYWN0LCBsaWtlIGEgd29tYW4uXCI7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodmFsdWUgPj0gNDApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBcIllvdSBkb24ndCBmZWVsIG5vciBhY3QgbGlrZSBhbnkgcGFydGljdWxhciBnZW5kZXIuXCI7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodmFsdWUgPj0gMjApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBcIllvdSBmZWVsLCBhbmQgYWN0LCBsaWtlIGEgbWFuLlwiO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiWW91IHN0cm9uZ2x5IGZlZWwsIGFuZCBhY3QsIGxpa2UgYSBtYW4uXCI7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIDUwLCAxMDBcclxuICAgICk7XHJcblxyXG5cclxuICAgIGV4cG9ydCBsZXQgRGVnZW5lcmF0aW9uID0gbmV3IEF0dHJpYnV0ZShcclxuICAgICAgICBcIkRlZ2VuZXJhdGlvblwiLFxyXG4gICAgICAgIHZhbHVlID0+IHtcclxuICAgICAgICAgICAgaWYgKHZhbHVlID49IDc1KSB7XHJcbiAgICAgICAgIC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bWF4VmFsdWUgOiBudW1iZXIgPSA1O1xyXG5cclxuICAgIHB1YmxpYyBjb25zdHJ1Y3RvciAoaWQgOiBzdHJpbmcsIGRlc2NyaXB0aW9uPyA6IHN0cmluZyB8IFNheSB8ICgodmFsdWUgOiBudW1iZXIpID0+IHN0cmluZyB8IFNheSkpIHtcclxuICAgICAgICBzdXBlcihpZCwgZGVzY3JpcHRpb24pO1xyXG4gICAgICAgIFNraWxsLlNraWxsc1tpZF0gPSB0aGlzO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgc3RhdGljIFNraWxscyA6IHtbaWQgOiBzdHJpbmddIDogU2tpbGx9ID0ge307XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRTa2lsbHMgKCkge1xyXG4gICAgICAgIGxldCBza2lsbHMgPSBbXTtcclxuICAgICAgICBmb3IgKGxldCBrZXkgaW4gU2tpbGwuU2tpbGxzKSB7XHJcbiAgICAgICAgICAgIHNraWxscy5wdXNoKFNraWxsLlNraWxsc1trZXldKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgc2tpbGxzLnNvcnQoKGEgOiBTa2lsbCwgYiA6IFNraWxsKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBuYSA9IGEuaWQudG9VcHBlckNhc2UoKTtcclxuICAgICAgICAgICAgbGV0IG5iID0gYi5pZC50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgICAgICBpZiAobmEgPiBuYikgcmV0dXJuIDE7XHJcbiAgICAgICAgICAgIGlmIChuYSA8IG5iKSByZXR1cm4gLTE7XHJcbiAgICAgICAgICAgIHJldHVybiAwO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIHJldHVybiBza2lsbHM7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRTa2lsbCAoaWQgOiBzdHJpbmcpIHtcclxuICAgICAgICByZXR1cm4gU2tpbGwuU2tpbGxzW2lkXTtcclxuICAgIH1cclxufVxyXG5cclxubW9k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AgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoY2hhbmdlcy5Ta2lsbHMgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgbmFtZSBpbiBjaGFuZ2VzLlNraWxscykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXR0ciA9IFNraWxsLmdldFNraWxsKG5hbWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXR0ciAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0U2tpbGwoYXR0ciwgY2hhbmdlcy5Ta2lsbHNbbmFtZV0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGNoYW5nZUhlYWx0aCAobiA6IG51bWJlcikge1xyXG4gICAgICAgIGxldCBib2R5cGFydHMgPSA8QXJyYXk8Qm9keXBhcnQ+PiB0aGlzLmdldFBhcnRzKEJvZHlwYXJ0KTtcclxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGJvZHlwYXJ0cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBib2R5cGFydHNbaV0uY2hhbmdlU29yZW5lc3Mobik7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMudXBkYXRlSGVhbHRoKCk7XHJcbiAgICB9XHJcblxyXG4gICAgLyoqXHJcbiAgICAgKiBSZXR1cm5zIGhlYWx0aCBhcyBhIG51bWJlciBmcm9tIDAgdG8gMTAuXHJcbiAgICAgKi9cclxuICAgIHB1YmxpYyBnZXRIZWFsdGhPblNjYWxlIC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4gVGhpbmcuSW5zaWRlUm9vbVJlbGF0aW9uLmdldEFueVJpZ2h0VHlwZShQZXJzb24pLmZpbHRlcihpc0FJQXZhaWxhYmxlKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwZW9wbGUubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBhY3Rpb24gPSBhd2FpdCBwZW9wbGVbaV0uQUkuZXhlY3V0ZShwZW9wbGVbaV0pO1xyXG4gICAgICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHBlb3BsZVtpXTtcclxuICAgICAgICAgICAgICAgIGxldCB2aXNpYmxlID0gcGVvcGxlW2ldLmlzVmlzaWJsZVRvKFdvcmxkU3RhdGUucGxheWVyKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0aW9uICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBwcmludFZhbHVlOiBTYXkgPSBhd2FpdCBhY3Rpb24uZXhlY3V0ZSgpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIChcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpc2libGUgfHxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBlcnNvbi5pc1Zpc2libGVUbyhXb3JsZFN0YXRlLnBsYXllcilcclxuICAgICAgICAgICAgICAgICAgICAgICAgKSAmJiBwcmludFZhbHVlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnRBc0NvbnRlbnQocHJpbnRWYWx1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgZXhwb3J0IHZhciBpbmNyZW1lbn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iB7XHJcbiAgICAgICAgICAgIC8vIElnbm9yZSBcImJhZFwiIHJvb21zXHJcbiAgICAgICAgICAgIGlmICghdmFsaWRpdHlDb2RlKGNSb29tKSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vIFByZXZlbnQgdGhlIGNvZGUgZnJvbSBzdHJheWluZyB0b28gZmFyXHJcbiAgICAgICAgICAgIGlmIChjUm9vbSA9PSBkZXN0aW5hdGlvbikge1xyXG4gICAgICAgICAgICAgICAgbWF4U3RlcHMgPSBtYXhTdGVwcyA+IGNQYXRoLmxlbmd0aCA/IGNQYXRoLmxlbmd0aCA6IG1heFN0ZXBzOyAvLyBTdG9wIGNvbnNpZGVyaW5nIHdvcnNlIHJvdXRlc1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNQYXRoO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNQYXRoLmxlbmd0aCA+IG1heFN0ZXBzKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgbGV0IHBhdGhzID0gW107XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpbmRleCBpbiBSb29tLkRJUkVDVElPTlMpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aW9uID0gUm9vbS5ESVJFQ1RJT05TW2luZGV4XTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbmV4dFJvb20gPSBjUm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChuZXh0Um9vbSAhPSB1bmRlZmluZWQgJiYgY1BhdGguaW5kZXhPZihuZXh0Um9vbSkgPT0gLTEgJiYgdmFsaWRpdHlDb2RlKG5leHRSb29tKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGF0aCA9IHJlY3Vyc2l2ZUJlc3RQYXRoKGNQYXRoLmNvbmNhdChbbmV4dFJvb21dKSwgbmV4dFJvb20sIGRlc3RpbmF0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBhdGggIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXRocy5wdXNoKHBhdGgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbGV0IHNob3J0ZXN0SW5kZXggPSAwO1xyXG4gICAgICAgICAgICAgICAgcGF0aHMuZm9yRWFjaCgodmFsdWUsIGluZGV4LCBhcnJheSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPCBwYXRoc1tzaG9ydGVzdEluZGV4XS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvcnRlc3RJbmRleCA9IGluZGV4O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhdGhzW3Nob3J0ZXN0SW5kZXhdO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IHBhdGhzID0gQXJyYXkoUm9vbS5ESVJFQ1RJT05TLmxlbmd0aCk7XHJcbiAgICAgICAgbGV0IHNob3J0ZXN0SW5kZXg7XHJcbiAgICAgICAgZm9yIChsZXQgaW5kZXggaW4gUm9vbS5ESVJFQ1RJT05TKSB7XHJcbiAgICAgICAgICAgIGxldCBkaXJlY3Rpb24gPSBSb29tLkRJUkVDVElPTlNbaW5kZXhdO1xyXG4gICAgICAgICAgICBsZXQgbmV4dFJvb20gPSB0aGlzLmNvbm5lY3Rpb25zW2RpcmVjdGlvbl07XHJcbiA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gdGhlIG1hcCBhcmUgYWx3YXlzIHJlbWVtYmVyZWQuXHJcbiAqL1xyXG5jbGFzcyBNYXBOb3RlIGV4dGVuZHMgVGhpbmcge1xyXG4gICAgcHVibGljIHJvb21zIDogQXJyYXk8Um9vbT4gPSBbXTtcclxuICAgIHB1YmxpYyByZWdpb25zIDogQXJyYXk8UmVnaW9uPiA9IFtdO1xyXG5cclxuICAgIHB1YmxpYyBhZGRSb29tICguLi5yb29tcyA6IEFycmF5PFJvb20+KSB7XHJcbiAgICAgICAgcm9vbXMuZm9yRWFjaCgocm9vbSkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnJvb21zLnB1c2gocm9vbSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFkZFJlZ2lvbiAoLi4ucmVnaW9ucyA6IEFycmF5PFJlZ2lvbj4pIHtcclxuICAgICAgICByZWdpb25zLmZvckVhY2gocmVnaW9uID0+IHtcclxuICAgICAgICAgICAgdGhpcy5yZWdpb25zLnB1c2gocmVnaW9uKTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgY29udGFpbnMgKHJvb20gOiBSb29tKSB7XHJcbiAgICAgICAgaWYodGhpcy5yb29tcy5pbmRleE9mKHJvb20pICE9IC0xKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5yZWdpb25zLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5yZWdpb25zW2ldLmdldFJvb21zKCkuaW5kZXhPZihyb29tKSAhPSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59IiwiLy8vID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2h0ZWRTbHV0dGluZXNzVmFsdWUgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmdldFNsdXR0aW5lc3MoKSAqIHRoaXMuZ2V0U2x1dHRpbmVzc1dlaWdodCgpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyB1cGRhdGVWaXNpYmlsaXR5ICgpIHtcclxuICAgICAgICB0aGlzLnZpc2libGVTbG90cyA9IHRoaXMuc2xvdHMuc2xpY2UoMCk7XHJcbiAgICAgICAgbGV0IHBhcmVudCA9IFRoaW5nLlBhcnRSZWxhdGlvbi5nZXRMZWZ0KHRoaXMpO1xyXG4gICAgICAgIGlmIChwYXJlbnQgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGxldCBjbG90aGluZyA9IDxBcnJheTxDbG90aGluZz4+VGhpbmcuV2VhclJlbGF0aW9uLmdldFJpZ2h0KHBhcmVudCk7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY2xvdGhpbmcubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBjb3ZlcmluZyA9IGNsb3RoaW5nW2ldLmdldENvdmVyaW5nU2xvdHMoKTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGsgPSAwOyBrIDwgY292ZXJpbmcubGVuZ3RoOyBrKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgaWR4ID0gdGhpcy52aXNpYmxlU2xvdHMuaW5kZXhPZihjb3ZlcmluZ1trXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlkeCA+PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudmlzaWJsZVNsb3RzLnNwbGljZShpZHgsIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy52aXNpYmxlU2xvdHMubGVuZ3RoID09IDApIGJyZWFrO1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VJR0hUX0hJR0g7XHJcbiAgICBwdWJsaWMgc2xvdHMgOiBBcnJheTxudW1iZXI+ID0gW0h1bWFub2lkLlNMT1RfQlJFQVNUU107XHJcbiAgICBwdWJsaWMgc2x1dHRpbmVzcyA9IEJvZHlwYXJ0LlNMVVRUSU5FU1NfSElHSF9TTFVUO1xyXG4gICAgcHVibGljIHNsdXR0aW5lc3NXZWlnaHQgPSBCb2R5cGFydC5XRUlHSFRfTUVESVVNO1xyXG5cclxuICAgIHB1YmxpYyBjb25zdHJ1Y3RvciAob3B0aW9ucz8gOiBUaGluZ09wdGlvbnMpIHtcclxuICAgICAgICBzdXBlcihvcHRpb25zKTtcclxuICAgICAgICB0aGlzLmFkZEdldEFsdGVyYXRpb25zKCh0aGluZykgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgU2l6ZSA6IHRoaXMuc2l6ZSxcclxuICAgICAgICAgICAgICAgIFNpbGljb25lIDogdGhpcy5zaWxpY29uZSxcclxuICAgICAgICAgICAgICAgIE1pbGsgOiB0aGlzLm1pbGtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmFkZFNldEFsdGVyYXRpb25zKCh0aGluZywgY2hhbmdlcykgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnNpemUgPSBjaGFuZ2VzLlNpemU7XHJcbiAgICAgICAgICAgIHRoaXMuc2lsaWNvbmUgPSBjaGFuZ2VzLlNpbGljb25lO1xyXG4gICAgICAgICAgICB0aGlzLm1pbGsgPSBjaGFuZ2VzLk1pbGs7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNpemUgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnNpemUgKyB0aGlzLnNpbGljb25lICsgdGhpcy5taWxrO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRTaXplVGV4dCAoKSB7XHJcbiA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ZXJlY3RXaWR0aCA9IG5ldyBNZWFzdXJlKDYpO1xyXG5cclxuICAgIHByaXZhdGUgYXJvdXNhbE1pbmltdW0gOiBudW1iZXIgPSA1O1xyXG4gICAgcHJpdmF0ZSBhcm91c2FsRXJlY3QgOiBudW1iZXIgPSAyNTtcclxuICAgIHByaXZhdGUgZmxhY2NpZE11bHQgOiBudW1iZXI7XHJcblxyXG4gICAgcHVibGljIGdldFNsdXR0aW5lc3MgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmdldEJ1bGdlU2l6ZSgpICogMztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgaXNHcm93ZXIgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmZsYWNjaWRNdWx0IDwgMC41O1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBjb25zdHJ1Y3RvciAob3B0aW9ucz8gOiBUaGluZ09wdGlvbnMpIHtcclxuICAgICAgICBzdXBlcihvcHRpb25zKTtcclxuICAgICAgICBpZiAoTWF0aC5yYW5kb20oKSA+PSAwLjUpIHtcclxuICAgICAgICAgICAgLy8gZ3Jvd2VyP1xyXG4gICAgICAgICAgICB0aGlzLmZsYWNjaWRNdWx0ID0gMC4zMztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAvLyBzaG93ZXI/XHJcbiAgICAgICAgICAgIHRoaXMuZmxhY2NpZE11bHQgPSAwLjc3O1xyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLmFkZEdldEFsdGVyYXRpb25zKCh0aGluZykgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgRlNpemUgOiB0aGlzLmZsYWNjaWRTaXplLmdldE51bWJlcigpLFxyXG4gICAgICAgICAgICAgICAgRldpZHRoIDogdGhpcy5mbGFjY2lkV2lkdGguZ2V0TnVtYmVyKCksXHJcbiAgICAgICAgICAgICAgICBFU2l6ZSA6IHRoaXMuZXJlY3RTaXplLmdld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1cclxuXHJcbiAgICBwdWJsaWMgZ2V0R2VuZGVyVmFsdWUgKCkge1xyXG4gICAgICAgIGxldCBzaXplVGFibGUgPSBbXHJcbiAgICAgICAgICAgIFsxMCwgNjBdLCAvLyAzbCAydyA9IDlcclxuICAgICAgICAgICAgWzIwLCA0NV0sIC8vIDEwbCAzdyA9IDE5XHJcbiAgICAgICAgICAgIFsyMywgMzVdLCAvLyAxNGwgM3cgPSAyNFxyXG4gICAgICAgICAgICBbMjcsIDI4XSxcclxuICAgICAgICAgICAgWzMyLCAyNF0sXHJcbiAgICAgICAgICAgIFszNiwgMThdXHJcbiAgICAgICAgXTtcclxuXHJcbiAgICAgICAgbGV0IGk7XHJcbiAgICAgICAgZm9yIChpID0gMTsgaSA8IHNpemVUYWJsZS5sZW5ndGggJiYgc2l6ZVRhYmxlW2ldWzBdIDwgdGhpcy5nZXRBY3R1YWxTaXplKCk7IGkrKykge31cclxuICAgICAgICByZXR1cm4gc2l6ZVRhYmxlW2kgLSAxXVsxXTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgYXJyYW5nZUdlbmRlclZhbHVlIChndiA6IG51bWJlcikge1xyXG4gICAgICAgIGxldCBzaXplVGFibGUgPSBbXHJcbiAgICAgICAgICAgIFs2MCwgMywgMl0sIC8vIDNsIDJ3ID0gOVxyXG4gICAgICAgICAgICBbNDUsIDEwLCAzXSwgLy8gMTBsIDN3ID0gMTlcclxuICAgICAgICAgICAgWzM1LCAxNCwgM10sIC8vIDE0bCAzdyA9IDI0XHJcbiAgICAgICAgICAgIFsyOCwgMTcsIDNdLFxyXG4gICAgICAgICAgICBbMjQsIDE5LCA0XSxcclxuICAgICAgICAgICAgWzE4LCAyMiwgNC41XVxyXG4gICAgICAgIF07XHJcblxyXG4gICAgICAgIGxldCBpO1xyXG4gICAgICAgIGZvciAoaSA9IDE7IGkgPCBzaXplVGFibGUubGVuZ3RoICYmIHNpemVUYWJsZVtpXVswXSA+IGd2OyBpKyspIHt9XHJcblxy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0bHkgc21vb3RoXCIpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5za2luU29mdG5lc3MgPiA0KSB7XHJcbiAgICAgICAgICAgIHNheS5hZGQoXCJzbW9vdGhcIik7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcInJvdWdoXCIpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgc2F5LmFkZChcIiBhbmQgXCIpO1xyXG5cclxuICAgICAgICBpZiAodGhpcy5za2luSGFpcmluZXNzID4gOCkge1xyXG4gICAgICAgICAgICBzYXkuYWRkKFwiaGFpcnksIGxpa2UgYSBnb3JpbGxhJ3NcIilcclxuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuc2tpbkhhaXJpbmVzcyA+IDYpIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcImhhaXJ5XCIpXHJcbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLnNraW5IYWlyaW5lc3MgPiAzKSB7XHJcbiAgICAgICAgICAgIHNheS5hZGQoXCJzb21ld2hhdCBoYWlybGVzc1wiKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBzYXkuYWRkKFwiY29tcGxldGVseSBoYWlybGVzc1wiKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHNheS5hZGQoXCIuXCIpO1xyXG5cclxuICAgICAgICBpZiAoZ3JlZW4pIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcIiBUaGUgdGFpbnQgb2YgeW91ciBjb3JydXB0aW9uIGhhcyB0dXJuZWQgeW91ciBza2luIGdyZWVuLCBsaWtlIGFuIG9yYydzLlwiKVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIHNheTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0R2VuZGVyVmFsdWUgKCkge1xyXG4gICAgICAgIGxldCBzb2Z0bmVzc1JhbmsgPSB0aGlzLnNraW5Tb2Z0bmV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dW5uZXI8VGhpbmc+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCB0aGluZyA9IDxUaGluZz4gcnVsZWJvb2subm91bjtcclxuXHJcbiAgICAgICAgICAgIGlmICh0aGluZyBpbnN0YW5jZW9mIENsb3RoaW5nICYmIChUaGluZy5XZWFyUmVsYXRpb24uaXNSaWdodChXb3JsZFN0YXRlLnBsYXllciwgdGhpbmcpKSkge1xyXG4gICAgICAgICAgICAgICAgRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5hZGRBdmFpbGFibGVBY3Rpb24oXCJSZW1vdmVcIiwgbmV3IEFjdGlvblJlbW92ZShXb3JsZFN0YXRlLnBsYXllciwgdGhpbmcpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuKSk7XHJcblxyXG4vKipcclxuIEludmVudG9yeVxyXG4gKi9cclxuRWxlbWVudHMuSW52ZW50b3J5SGFuZGxlci5MaW5raW5nVGhpbmcuYWRkUnVsZShuZXcgUnVsZShcclxuICAgIHtcclxuICAgICAgICBuYW1lIDogXCJJbnZlbnRvcnkgLSBSZW1vdmVcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9MT1dFU1QsXHJcbiAgICAgICAgY29kZSA6IChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPFRoaW5nPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgdGhpbmcgPSA8VGhpbmc+IHJ1bGVib29rLm5vdW47XHJcblxyXG4gICAgICAgICAgICBpZiAodGhpbmcgaW5zdGFuY2VvZiBDbG90aGluZyAmJiAoVGhpbmcuV2VhclJlbGF0aW9uLmlzUmlnaHQoV29ybGRTdGF0ZS5wbGF5ZXIsIHRoaW5nKSkpIHtcclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkludmVudG9yeUhhbmRsZXIucHJpbnRUaGluZ0xpbmsoXCJSXCIsIG5ldyBBY3Rpb25SZW1vdmUoV29ybGRTdGF0Z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3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGNhbiBvbmx5IHdlYXIgQ2xvdGhpbmcuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBjaGVja0lzSGVsZCA9IEFjdGlvbldlYXIuY2hlY2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiSXMgbm91biBoZWxkXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfSElHSCxcclxuICAgICAgICBjb2RlIDogYXN5bmMgKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPEFjdGlvbldlYXI+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IG5vdW4gPSBhY3Rpb24uZ2V0Q2xvdGhpbmcoKTtcclxuICAgICAgICAgICAgaWYgKCFUaGluZy5DYXJyeVJlbGF0aW9uLmlzUmlnaHQoYWN0aW9uLmFjdG9yLCBub3VuKSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGFjdGlvbi5hY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiKGZpcnN0IHRha2luZyB0aGUgXCIsIG5vdW4sIFwiKVwiLCBTYXkuTElORV9CUkVBSyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBsZXQgdGFraW5nQWN0aW9uID0gbmV3IEFjdGlvblRha2UoYWN0aW9uLmFjdG9yLCBub3VuKTtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHRha2luZ0FjdGlvbi5leGVjdXRlKCk7XHJcbiAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZCh0YWtpbmdBY3Rpb24uc2F5KTtcclxuICAgICAgICAgICAgICAgIGlmICghVGhpbmcuQ2FycnlSZWxhdGlvbi5pc1JpZ2h0KGFjdGlvbi5hY3Rvciwgbm91bikpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGNhcnJ5RGVmYXVsdCA9IEFjdGlvbldlYXIuY2FycnkuY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiU2V0IENsb3RoaW5nIGFzIFdvcm5cIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9NRURJVU0sXHJcbiAgICAgICAgY29kZSA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxBY3Rpb25XZWFyPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgYWN0aW9uID0gcnVubmVyLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBub3VuID0gYWN0aW9uLmdldENsb3RoaW5nKCk7XHJcbiAgICAgICAgICAgIFRoaW5nLldlYXJSZWxhdGlvbi5zZXRSZWxhdGlvbihhY3Rpb24uYWN0b3IsIG5vdW4pO1xyXG5cclxuICAgICAgICAgICAgbGV0IGFjdG9yID0gYWN0aW9uLmFjdG9yO1xyXG4gICAgICAgICAgICBsZXQgdGhpbmcgPSAoPFRoaW5nPmFjdGlvbi5nZXROb3VuKDApKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQobmV3IFNheUJvbGQodGhpbmcsIFwiOiBc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1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgIEh1bWFub2lkR2VuZGVyOiBodW1hbm9pZC5pc01hbGUoKSA/IEh1bWFub2lkLlNFWF9NQUxFIDpcclxuICAgICAgICAgICAgICAgICAgICAgICAgaHVtYW5vaWQuaXNGZW1hbGUoKSA/IEh1bWFub2lkLlNFWF9GRU1BTEUgOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgSHVtYW5vaWQuU0VYX0hFUk1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmFkZFNldEFsdGVyYXRpb25zKChodW1hbm9pZCA6IEh1bWFub2lkLCBjaGFuZ2VzKSA9PiB7XHJcbiAgICAgICAgICAgIC8vIExldCdzIG5vdCBkbyB0aGlzIGZvciBOUENzLiBJdCBjYW4gYnJlYWsgcGF0Y2hlcy5cclxuICAgICAgICAgICAgaWYgKGh1bWFub2lkLmlzUGxheWVyKCkpIHtcclxuICAgICAgICAgICAgICAgIGh1bWFub2lkLnJlbW92ZUdlbmRlcmVkUGFydHMoKTtcclxuICAgICAgICAgICAgICAgIGlmIChjaGFuZ2VzLkh1bWFub2lkR2VuZGVyID09IEh1bWFub2lkLlNFWF9NQUxFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaHVtYW5vaWQuYWRkTWFsZVBhcnRzKCk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZXMuSHVtYW5vaWRHZW5kZXIgPT0gSHVtYW5vaWQuU0VYX0ZFTUFMRSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGh1bWFub2lkLmFkZEZlbWFsZVBhcnRzKCk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGh1bWFub2lkLmFkZE1hbGVQYXJ0cygpO1xyXG4gICAgIC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zaWJsZSA9IHRydWU7XHJcbiAgICAgICAgdGhpcy5pc0Nyb3RjaFZpc2libGUgPSB0cnVlO1xyXG4gICAgICAgIHRoaXMuaXNCdXR0VmlzaWJsZSA9IHRydWU7XHJcblxyXG4gICAgICAgIGxldCBicmFzID0gW107XHJcbiAgICAgICAgbGV0IGJ1dHRzID0gW107XHJcbiAgICAgICAgbGV0IGp1bmtzID0gW107XHJcblxyXG4gICAgICAgIGNsb3RoZXMuZm9yRWFjaCgoY2xvdGggOiBDbG90aGluZykgPT4ge1xyXG4gICAgICAgICAgICBjbG90aC51cGRhdGVTdGF0dXMoKTtcclxuICAgICAgICAgICAgaWYgKGNsb3RoLnNsb3RzLmluZGV4T2YoSHVtYW5vaWQuU0xPVF9CUkVBU1RTKSAhPSAtMSkge1xyXG4gICAgICAgICAgICAgICAgYnJhcy5wdXNoKGNsb3RoKTtcclxuICAgICAgICAgICAgICAgIGlmIChjbG90aC50cmFuc3BhcmVudFNsb3RzLmluZGV4T2YoSHVtYW5vaWQuU0xPVF9CUkVBU1RTKSA9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaXNCcmVhc3RWaXNpYmxlID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKGNsb3RoLnNsb3RzLmluZGV4T2YoSHVtYW5vaWQuU0xPVF9CVVRUKSAhPSAtMSkge1xyXG4gICAgICAgICAgICAgICAgYnV0dHMucHVzaChjbG90aCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoY2xvdGgudHJhbnNwYXJlbnRTbG90cy5pbmRleE9mKEh1bWFub2lkLlNMT1RfQlVUVCkgPT0gLTEpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmlzQnV0dFZpc2libGUgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoY2xvdGguc2xvdHMua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ICAgICAgICAgcHJlc2VudGF0aW9uICs9IChcInNsdXR0eSwgXCIpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAocGxheWVyU2x1dHRpbmVzcy5zbHV0dGluZXNzQ29ycmVjdGVkID4gMzUpIHtcclxuXHJcbiAgICAgICAgfSBlbHNlIGlmIChwbGF5ZXJTbHV0dGluZXNzLnNsdXR0aW5lc3NDb3JyZWN0ZWQgPiAyMCkge1xyXG4gICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwicHJ1ZGUsIFwiKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwic2FpbnRseSwgXCIpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHBsYXllckdlbmRlci5nZW5kZXJWYWx1ZUNvcnJlY3RlZCA8IDQwKSB7XHJcbiAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJtYXNjdWxpbmUgXCIpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAocGxheWVyR2VuZGVyLmdlbmRlclZhbHVlQ29ycmVjdGVkIDwgNjApIHtcclxuICAgICAgICAgICAgcHJlc2VudGF0aW9uICs9IChcImFuZHJvZ3lub3VzIFwiKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwiZmVtaW5pbmUgXCIpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKHBsYXllckdlbmRlci5oYXNUaXRzKSB7XHJcbiAgICAgICAgICAgIGlmIChwbGF5ZXJHZW5kZXIuaGFzUGVuaXMgfHwgcGxheWVyR2VuZGVyLmhhc1BlbmlzQnVsZ2UpIHtcclxuICAgICAgICAgICAgICAgIC8vIFNoZW1hbGUgU3RhdHVzIChUaXRzICsgUGVuaXMpXHJcbiAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwic2hlbWFsZVwiKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChwbGF5ZXJHZW5kZXIuaGFzVmFnaW5hKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBpcyBhIHdvbWFuXHJcbiAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwid29tYW5cIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAvLyBObyB0aXRzXHJcbiAgICAgICAgICAgIGlmIChwbGF5ZXJHZW5kZXIuaGFzUGVuaXMpIHtcclxuICAgICAgICAgICAgICAgIC8vIFNpbXBseSBtYWxlXHJcbiAgICAgICAgICAgICAgICBpZiAocGxheWVyR2VuZGVyLmdlbmRlclZhbHVlQ29ycmVjdGVkIDwgNjApIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwibWFuXCIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwidHJhcFwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChwbGF5ZXJHZW5kZXIuaGFzUGVuaXNCdWxnZSkge1xyXG4gICAgICAgICAgICAgICAgLy8gUG9zc2libGUgU2hlbWFsZSBzdGF0dXMgLSBoYXMgYnVsZ2UgYW5kIHRpdHMgbWF5YmUgZ2V0IGJldHRlciB0ZXJtcyBzb21ldGltZVxyXG4gICAgICAgICAgICAgICAgaWYgKHBsYXllckdlbmRlci5nZW5kZXJWYWx1ZUNvcnJlY3RlZCA8IDYwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcHJlc2VudGF0aW9uICs9IChcIm1hblwiKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcHJlc2VudGF0aW9uICs9IChcInRyYXBcIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZi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ICAgICAgICBsZXQgb25lT2YgPSBuZXcgT25lT2YoT25lT2YuUFVSRUxZX0FUX1JBTkRPTSwgLi4uW1xyXG4gICAgICAgICAgICAgICAgICAgIFwiLCBpdCBpcyBub3QgY292ZXJlZCBieSBhbnkgY2xvdGhpbmdcIixcclxuICAgICAgICAgICAgICAgICAgICBcIiwgaXQgaXMgbm90IGNvdmVyZWQgYnkgYW55IGNsb3RoZXNcIixcclxuICAgICAgICAgICAgICAgICAgICBcIiwgaXQgaXMgdW5jb3ZlcmVkXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgXCIsIGl0IGlzIHZpc2libGUgdG8gYWxsXCIsXHJcbiAgICAgICAgICAgICAgICAgICAgXCIsIGl0IGlzIGhhbmdpbmcgZnJlZWx5XCJcclxuICAgICAgICAgICAgICAgIF0pO1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChvbmVPZi5nZXRPbmUoKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGV0IHRlc3RpY2xlcyA9IDxIdW1hbm9pZFRlc3RpY2xlcz4gcGxheWVyLmdldFBhcnQoSHVtYW5vaWRUZXN0aWNsZXMpO1xyXG4gICAgICAgICAgICBpZiAoSHVtYW5vaWRQZW5pcy5nZXRTaXplVGV4dChidWxnZXMuY3JvdGNoKSAhPSBIdW1hbm9pZFBlbmlzLmdldFNpemVUZXh0KHBlbmlzLmdldEJ1bGdlU2l6ZSgpICsgdGVzdGljbGVzLmdldEJ1bGdlU2l6ZSgpKSkge1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChcIiwgYnV0IGl0IGxvb2tzIGxpa2UgaXQncyBhY3R1YWxseSBcIiwgSHVtYW5vaWRQZW5pcy5nZXRTaXplVGV4dChidWxnZXMuY3JvdGNoKSwgXCIgZHVlIHRvIHlvdXIgY2xvdGhpbmdcIilcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzYXkuYWRkKFwiLiBcIik7XHJcbiAgICAgICAgICAgIGlmIC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AgICAgICAgICBpZiAoYm9keXBhcnRTbHV0dGluZXNzRmluYWwgPiA3NSkge1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChcIlRoZSB3YXkgeW91ciBib2R5IGlzIG1ha2VzIHlvdSBsb29rIGxpa2UgeW91IHdlcmUgbWFkZSBwdXJlbHkgZm9yIHNleFwiKTtcclxuICAgICAgICAgICAgICAgIGlmIChjb3ZlcmVkUGVyYyA+IDAuNykge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheS5hZGQoXCIsIHRoYW5rZnVsbHkgaXQncyBtb3N0bHkgY292ZXJlZFwiKVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb3ZlcmVkUGVyYyA8IDAuMikge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheS5hZGQoXCIsIGFuZCB5b3UgZGlkbid0IGV2ZW4gYm90aGVyIGNvdmVyaW5nIGl0IHVwXCIpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiLlwiKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChib2R5cGFydFNsdXR0aW5lc3NGaW5hbCA+IDYwKSB7XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiWW91ciBib2R5IGRlZmluaXRlbHkgaGFzIGEgbG90IG9mIHNleC1hcHBlYWwgZ29pbmcgb25cIik7XHJcbiAgICAgICAgICAgICAgICBpZiAoY292ZXJlZFBlcmMgPiAwLjcpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKFwiLCBhbHRob3VnaCBpdCdzIGNvdmVyZWRcIilcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY292ZXJlZFBlcmMgPCAwLjIpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKFwiLCBwcm91ZGx5IGRpc3BsYXllZCBmb3IgYWxsIHRvIHNlZVwiKVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAg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lZCByb29tcz9cIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9MT1dFU1QsXHJcbiAgICAgICAgcHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX0xPVyxcclxuICAgICAgICBjb2RlIDogcnVubmVyID0+IHtcclxuICAgICAgICAgICAgaWYgKHJlbWVtYmVyZWRSb29tcy52YWx1ZS5pbmRleE9mKHJ1bm5lci5ub3VuLmdldE5hbWUoKSkgIT0gLTEgfHwgcmVtZW1iZXJlZEZvZGRlci5pbmRleE9mKHJ1bm5lci5ub3VuKSAhPSAtMSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBleHBvcnQgbGV0IFJlbWVtYmVyaW5nUm9vbUluTWFwID0gUmVtZW1iZXJpbmdSb29tUnVsZWJvb2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiSXMgcm9vbSBzaG93biBvbiBhIG1hcD9cIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9MT1dFU1QsXHJcbiAgICAgICAgcHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX0xPV0VTVCxcclxuICAgICAgICBjb2RlIDogcnVubmVyID0+IHtcclxuICAgICAgICAgICAgbGV0IG1hcHMgPSA8QXJyYXk8TWFwTm90ZT4+IFRoaW5nLkNhcnJ5UmVsYXRpb24uZ2V0UmlnaHRUeXBlKHBsYXllciwgTWFwTm90ZSk7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbWFwcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgaWYgKG1hcHNbaV0uY29udGFpbnMocnVubmVyLm5vdW4pKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgIC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ZWxsaWdlbmNlO1xyXG4gICAgICAgIGxldCBza2lsbFJvb21zID0gcGxheWVyLmdldFNraWxsKFNraWxscy5TdXJ2aXZhbCkgKiByZW1lbWJlcmVkUm9vbXNGb3JTdXJ2aXZhbDtcclxuICAgICAgICByZXR1cm4gaW50Um9vbXMgKyBza2lsbFJvb21zO1xyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiB0cnVuY2F0ZVJvb21zICgpIHtcclxuICAgICAgICB3aGlsZSAocmVtZW1iZXJlZFJvb21zLnZhbHVlLmxlbmd0aCA+IGdldE1heGltdW1SZW1lbWJlcmVkUm9vbXMoKSl7XHJcbiAgICAgICAgICAgIHJlbWVtYmVyZWRSb29tcy52YWx1ZS5wb3AoKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHJlbWVtYmVyUm9vbSAoLi4ucm9vbXMgOiBBcnJheTxSb29tPikge1xyXG4gICAgICAgIHJvb21zLmZvckVhY2goKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIGlmICh2YWx1ZSBpbnN0YW5jZW9mIFJvb20pIHtcclxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5mb2RkZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocmVtZW1iZXJlZEZvZGRlci5pbmRleE9mKHZhbHVlKSA9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZW1lbWJlcmVkRm9kZGVyLnB1c2godmFsdWUpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGlkeCA9IHJlbWVtYmVyZWRSb29tcy52YWx1ZS5pbmRleE9mKHZhbHVlLmdldE5hbWUoKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlkeCAhPSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZW1lbWJlcmVkUm9vbXMudmFsdWUuc3BsaWNlKGlkeCwgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJlbWVtYmVyZWRSb29tcy52YWx1ZS51bnNoaWZ0KHZhbHVlLmdldE5hbWUoKSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgICAgICB0cnVuY2F0ZVJvb21zKCk7XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHNhdmVTdGF0ZSAoKSB7XHJcbiAgICAgICAgbGV0IHRoaW5ncyA9IHtcclxuICAgICAgICAgICAgY2FycmllZDogW10sXHJcbiAgICAgICAgICAgIHdvcm46IFtdLFxyXG4gICAgICAgICAgICB3aWVsZGVkOiBbXVxyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIFRoaW5ncyA6IHRoaW5nc1xyXG4gICAgICAgIH07XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGxldCBDb3JyZWN0UmVtZW1iZXJlZFJvb21zUnVsZSA9IFBsYXlCZWdpbnMucnVsZWJvb2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiQ29ycmVjdCByZW1lbWJlcmVkIHJvb21zXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfTE9XRVNULFxyXG4gICAgICAgIHByaW9yaXR5IDogUnVsZS5QUklPUklUWV9NRURJVU0sXHJcbiAgICAgICAgY29kZSA6ICgpID0+IHtcclxuICAgICAgICAgICAgbGV0IGFsbFJvb21zID0gcmVtZW1iZXJlZFJvb21zLnZhbHVlO1xyXG4gICAgICAgICAgICBsZXQgY3VycmVudFJvb20gPSBXb3JsZFN0YXRlLnBsYXllci5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgIGlmIChhbGxSb29tcy5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgcmVtZW1iZXJlZFJvb21zLnZhbHVlID0gW2N1cnJlbnRSb29tLmdldE5hbWUoKV07XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGV0IG5ld1Jvb21zID0gW107XHJcblxyXG4gICAgICAgICAgICBmdW5jdGlvbiByZWN1cnNpdmVseUFkZFJvb21zIChyb29tIDogUm9vbSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHJvb20gaW5zdGFuY2VvZiBSb29tUmFuZG9tKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJvb20uZm9kZGVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbWVtYmVyZWRGb2RkZXIucHVzaChyb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm9vbS5jb25uZWN0aW9ucy5mb3JFYWNoKChuZXdSb29tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWN1cnNpdmVseUFkZFJvb21zKG5ld1Jvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFsbFJvb21zLmluZGV4T2Yocm9vbS5nZXROYW1lKCkpICE9IC0xICYmIG5ld1Jvb21zLmluZGV4T2Yocm9vbS5nZXROYW1lKCkpID09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld1Jvb21zLnB1c2gocm9vbS5nZXROYW1lKCkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByb29tLmNvbm5lY3Rpb25zLmZvckVhY2goKG5ld1Jvb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY3Vyc2l2ZWx5QWRkUm9vbXMobmV3Um9vbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgcmVjdXJzaXZlbHlBZGRSb29tcyhjdXJyZW50Um9vbSk7XHJcbiAgICAgICAgICAgIHJlbWVtYmVyZWRSb29tcy52YWx1ZSA9IG5ld1Jvb21zO1xyXG4gICAgICAgIH1cclxuICAgIH0pXHJcbn0iLCIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiUmVsYXRpb25zL1JlbGF0aW9uT25lVG9NYW55LnRzXCIgLz5cclxuY2xhc3MgUmVnaW9uIHtcclxuICAgIHB1YmxpYyBuYW1lIDogc3RyaW5nO1xyXG5cclxuICAgIHB1YmxpYyBjb25zdHJ1Y3RvciAobmFtZSA6IHN0cmluZykge1xyXG4gICAgICAgIHRoaXMubmFtZSA9IG5hbWU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBSZWdpb25Sb29tID0gbmV3IFJlbGF0aW9uT25lVG9NYW55KCk7XHJcbiAgICBwdWJsaWMgc3RhdGljIFJlZ2lvblJlZ2lvbiA9IG5ldyBSZWxhdGlvbk9uZVRvTWFueSgpO1xyXG4gICAgcHVibGljIHN0YXRpYyBJblJlbGF0aW9uID0gbmV3IFJlbGF0aW9uSGFuZGxlclN0cmljdE9uZVRvTWFueShSZWdpb24uUmVnaW9uUmVnaW9uLCBSZWdpb24uUmVnaW9uUm9vbSk7XHJcblxyXG4gICAgcHVibGljIHBsYWNlICguLi5yb29tcyA6IEFycmF5PFJvb20gfCBSZWdpb24+KSB7XHJcbiAgICAgICAgcm9vbXMuZm9yRWFjaChyb29tID0+IHtcclxuICAgICAgICAgICAgaWYgKHJvb20gaW5zdGFuY2VvZiBSb29tKSB7XHJcbiAgICAgICAgICAgICAgICBSZWdpb24uUmVnaW9uUm9vbS5zZXRSZWxhdGlvbih0aGlzLCByb29tKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIFJlZ2lvbi5SZWdpb25SZWdpb24uc2V0UmVsYXRpb24odGhpcywgcm9vbSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0Um9vbXMgKCkge1xyXG4gICAgICAgIGxldCByb29tcyA9IDxBcnJheTxSb29tPj4gUmVnaW9uLlJlZ2lvblJvb20uZ2V0UmlnaHQodGhpcyk7XHJcbiAgICAgICAgUmVnaW9uLlJlZ2lvblJlZ2lvbi5nZXRSaWdodCh0aGlzKS5mb3JFYWNoKChyZWdpb24gOiBSZWdpb24pID0+IHtcclxuICAgICAgICAgICAgKDxBcnJheTxSb29tPj4gUmVnaW9uLlJlZ2lvblJvb20uZ2V0UmlnaHQocmVnaW9uKSkuZm9yRWFjaCgocm9vbSA6IFJvb20pID0+IHtcclxuICAgICAgICAgICAgICAgIHJvb21zLnB1c2gocm9vbSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIHJldHVybiByb29tcztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgY29udGFpbnNSb29tIChyb29tIDogUm9vbSkge1xyXG4gICAgICAgIGxldCBkaXJlY3RseUNvbnRhaW5lZCA9IFJlZ2lvbi5SZWdpb25Sb29tLmdldExlZnQocm9vbSkgPT0gdGhpcztcclxuICAgICAgICBpZiAoZGlyZWN0bHlDb250YWluZWQpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfSBlbHNlIGlmIChSZWdpb24uUmVnaW9uUmVnaW9uLmdldExlZnQodGhpcykgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmdldFJvb21zKCkuaW5kZXhPZihyb29tKSAhPSAtMTsgLy8gSWYgaXQncyBub3QgZGlyZWN0bHkgY29udGFpbmVkLCB3ZSBoYXZlIHRvIGNoZWNrIHJvb21zIGZvciB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FxyXG4gICAgICAgIGNvbmRpdGlvbnMgOiAocnVubmVyIDogUnVsZWJvb2tSdW5uZXI8UGVyc29uPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgcGVyc29uID0gcnVubmVyLm5vdW47XHJcbiAgICAgICAgICAgIHJldHVybiBwZXJzb24uQUkucGlja3NTaGluaWVzO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29kZSA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxQZXJzb24+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwZXJzb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IHJvb20gPSBwZXJzb24uZ2V0Um9vbSgpO1xyXG4gICAgICAgICAgICBsZXQgdmlzaWJsZVRoaW5ncyA9IHJvb20uZ2V0Q29udGFpbmVkQW5kVmlzaWJsZVRvKHBlcnNvbik7XHJcblxyXG4gICAgICAgICAgICBpZiAodmlzaWJsZVRoaW5ncy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHZpc2libGVUaGluZ3MubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXZpc2libGVUaGluZ3NbaV0uZml4ZWRJblBsYWNlICYmIHZpc2libGVUaGluZ3NbaV0uZ2V0U2hpbnkoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEFjdGlvblRha2UocGVyc29uLCB2aXNpYmxlVGhpbmdzW2ldKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxufSIsIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi9BSS50c1wiIC8+XHJcbm1vZHVsZSBBSVJ1bGVzIHtcclxuICAgIGV4cG9ydCB2YXIgV2FuZGVyID0gQUkucnVsZXMuY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiV2FuZGVyXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IEFJUnVsZXMuUFJJT1JJVFlfQUNUSU5HX09OX0lETEUsXHJcbiAgICAgICAgY29uZGl0aW9ucyA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxQZXJzb24+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwZXJzb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgcmV0dXJuIHBlcnNvbi5BSS53YW5kZXJlciAmJiAoTWF0aC5yYW5kb20oKSAqIDEwMCkgPiBwZXJzb24uQUkud2FuZGVyQ2hhbmNlO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29kZSA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxQZXJzb24+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwZXJzb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IHJvb20gPSA8Um9vbVJhbmRvbT4gcGVyc29uLmdldFJvb20oKTtcclxuXHJcbiAgICAgICAgICAgIGlmIChwZXJzb24uQUkud2FuZGVyc09uICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgLy8gc3RpY2sgdG8gcmVnaW9uIHdoaWxlIHdhbmRlcmluZ1xyXG4gICAgICAgICAgICAgICAgaWYgKHBlcnNvbi5BSS53YW5kZXJzT24uY29udGFpbnNSb29tKHJvb20pKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gQWxyZWR5IGluIHJlZ2lvbiwgc28ganVzdCB3YW5kZXIgb2ZmIGluc2lkZSBpdFxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb25uZWN0aW9ucyA9IHJvb20uY29ubmVjdGlvbnMuc2xpY2UoKTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVhbENvbm5lY3Rpb25zID0gW107XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb25uZWN0aW9ucy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29ubmVjdGlvbnNbaV0gIT0gdW5kZWZpbmVkICYmIHBlcnNvbi5BSS53YW5kZXJzT24uY29udGFpbnNSb29tKGNvbm5lY3Rpb25zW2ldKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVhbENvbm5lY3Rpb25zLnB1c2goaSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9ICgobmV3IFNodWZmbGVyKHJlYWxDb25uZWN0aW9ucykpLmdldE9uZSgpKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEFjdGlvbkdvKHBlcnNvbiwgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gcmV0dXJuIHRvIHJlZ2lvblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZWdpb25Sb29tcyA9IHBlcnNvbi5BSS53YW5kZXJzT24uZ2V0Um9vbXMoKS5maWx0ZXIoKGEgOiBSb29tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhIGluc3RhbmNlb2YgUm9vbVJhbmRvbSAmJiBhLnBsYWNlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAvLyBJZGVhbGx5IHdlJ2QgYWN0dWFsbHkgbWFrZSBhIHBhdGggdG8gaXQgYW5kIGNoZWNrIHRoZSBkaXN0YW5jZSwgc2luY2UgbWF6ZXMgY2FuIG1ha2UgaXQg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1bGVib29rLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBhY3RvciA9IGFjdGlvbi5hY3RvcjtcclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gKDxUaGluZz5hY3Rpb24uZ2V0Tm91bigwKSk7XHJcblxyXG4gICAgICAgICAgICBpZiAoVGhpbmcuV2VhclJlbGF0aW9uLmdldExlZnQodGhpbmcpID09IGFjdG9yIHx8IFRoaW5nLldpZWxkUmVsYXRpb24uZ2V0TGVmdCh0aGluZykgPT0gYWN0b3Ipe1xyXG4gICAgICAgICAgICAgICAgaWYgKGFjdGlvbi5hY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiKGZpcnN0IHRha2luZyBvZmYgdGhlIFwiLCB0aGluZywgXCIpXCIsIFNheS5MSU5FX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGxldCB0YWtpbmdBY3Rpb24gPSBuZXcgQWN0aW9uUmVtb3ZlKGFjdG9yLCB0aGluZyk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCB0YWtpbmdBY3Rpb24uZXhlY3V0ZSgpO1xyXG4gICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQodGFraW5nQWN0aW9uLnNheSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoVGhpbmcuV2VhclJlbGF0aW9uLmdldExlZnQodGhpbmcpID09IGFjdG9yIHx8IFRoaW5nLldpZWxkUmVsYXRpb24uZ2V0TGVmdCh0aGluZykgPT0gYWN0b3IpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChTYXkuTElORV9CUkVBSyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KVxyXG4pO1xyXG5cclxuQWN0aW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Aod2llbGRlZC5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChuZXcgU2F5Qm9sZChcIldpZWxkZWQ6XCIpLCBTYXkuTElORV9CUkVBSyk7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB3aWVsZGVkLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNheS5hZGQoYXdhaXQgQWN0aW9uSW52ZW50b3J5LmNyZWF0ZUJ1dHRvbih3aWVsZGVkW2ldLCByZXNvbHZlKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmICh3b3JuLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2F5LnNlcXVlbmNlLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChTYXkuUEFSQUdSQVBIX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChuZXcgU2F5Qm9sZChcIldvcm46XCIpLCBTYXkuTElORV9CUkVBSyk7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB3b3JuLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNheS5hZGQoYXdhaXQgQWN0aW9uSW52ZW50b3J5LmNyZWF0ZUJ1dHRvbih3b3JuW2ldLCByZXNvbHZlKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmIChjYXJyaWVkLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2F5LnNlcXVlbmNlLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChTYXkuUEFSQUdSQVBIX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChuZXcgU2F5Qm9sZChcIkNhcnJpZWQ6XCIpLCBTYXkuTElORV9CUkVBSyk7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjYXJyaWVkLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNheS5hZGQoYXdhaXQgQWN0aW9uSW52ZW50b3J5LmNyZWF0ZUJ1dHRvbihjYXJyaWVkW2ldLCByZXNvbHZlKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmIChzYXkuc2VxdWVuY2UubGVuZ3RoID09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZSh1bmRlZmluZWQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGJ1dHRvbnMgPSBhd2FpdCBzYXkuZ2V0SFRNTENvbnRlbnQoKTtcclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludCguLi4oYnV0dG9ucykpO1xyXG4gICAgICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgICAgICBsZXQgY2hvc2VuVGhpbmcgPSBhd2FpdCBjaG9zZW5Qcm9taXNlO1xyXG4gICAgICAgICAgICBpZiAoY2hvc2VuVGhpbmcgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIudW5wcmludCguLi5idXR0b25zKTtcclxuICAgICAgICAgICAgICAgIENvbnRyb2xzLktleUhhbmRsZXIucmVzZXQoKTtcclxuICAgICAgICAgICAgICA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XNJbXBvcnRhbnQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFVubWF0Y2hlZCAoY2QgOiBDb250ZW50RGlmZmVyZW50aWFsKSA6IENvbnRlbnREaWZmZXJlbnRpYWxDb21wYXJpc29uUmVzdWx0IHtcclxuICAgICAgICBsZXQgdW5tYXRjaGVkID0gY2Qubm91bnMuc2xpY2UoKTtcclxuICAgICAgICBsZXQgbWF0Y2hpbmcgPSB0aGlzLm5vdW5zLnNsaWNlKCk7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IG1hdGNoaW5nLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGsgPSB1bm1hdGNoZWQubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChDb250ZW50RGlmZmVyZW50aWFsLmNvbXBhcmVOb3VucyhtYXRjaGluZ1tpXSwgdW5tYXRjaGVkW2tdKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHVubWF0Y2hlZC5zcGxpY2UoaywgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hpbmcuc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIG1hdGNoaW5nIDogbWF0Y2hpbmcsXHJcbiAgICAgICAgICAgIHVubWF0Y2hlZCA6IHVubWF0Y2hlZFxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNjb3JlICgpIHtcclxuICAgICAgICBsZXQgaGlnaGVzdCA9IDA7XHJcbiAgICAgICAgbGV0IGNvdW50ID0gdGhpcy5ub3Vucy5sZW5ndGg7XHJcblxyXG4gICAgICAgIHRoaXMubm91bnMuZm9yRWFjaCgobm91bikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgbGV2ZWwgPSBDb250ZW50RGlmZmVyZW50aWFsLmdldE5vdW5MZXZlbChub3VuKTtcclxuICAgICAgICAgICAgaWYgKGhpZ2hlc3QgPCBsZXZlbCkge1xyXG4gICAgICAgICAgICAgICAgaGlnaGVzdCA9IGxldmVsO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJldHVybiBoaWdoZXN0ICsgKGNvdW50IC8gMTAwKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldE5vdW5MZXZlbCAobm91biA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nIHwgQ29udGVudERpZmZlcmVudGlhbCB8IENvbnRlbnRNYXJrZXIpIHtcclxuICAgICAgICBpZiAobm91biA9PSB1bmRlZmluZWQgfHwgbm91biA9PSBudWxsKSB7XHJcbiAgICAgICAgICAgIHJldHVybiAwO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIG5vdW4gPT0gXCJmdW5jdGlvblwiKSB7XHJcbiAgICAgICAgICAgIGlmICg8YW55Pm5vdW4ucHJvdG90eXBlIGluc3RhbmNlb2YgVGhpbmcpIHtcclxuICAgICAgICAgICAgICAgIGxldCBzcGVjaWZpdHkgPSAyOyAvLyBWYWd1ZSBUaGluZ1xyXG4gICAgICAgICAgICAgICAgbGV0IHBhcmVudENsYXNzID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKG5vdW4pO1xyXG4gICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudENsYXNzICE9IFRoaW5nKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc3BlY2lmaXR5ICs9IDAuMTtcclxuICAgICAgICAgICAgICAgICAgICBwYXJlbnRDbGFzcyA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihwYXJlbnRDbGFzcyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gc3BlY2lmaXR5O1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIDIuNTsgLy8gSXQncyBub3QgYSBcIlRoaW5nXCIsIHNvIGl0J3MgcHJvYmFibHkgYSB3ZWlyZCBjbGFzcywgd2hpY2ggaXMga2luZCBvZiBzcGVjaWZpY1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIGlmIChub3VuIGluc3RhbmNlb2YgVGhpbmcpIHtcclxuICAgICAgICAgICAgcmV0dXJuIDQ7IC8vIFNwZWNpZmljIHRoaW5nXHJcbiAgICAgICAgfSBlbHNlIGlmIChub3VuIGluc3RhbmNlb2YgQ29udGVudERpZmZlcmVudGlhbCkge1xyXG4gICAgICAgICAgICByZXR1cm4gMTsgLy8gTWlub3IgdGhpbmdcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gMC41O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGNvbXBhcmVOb3VucyAoYSA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nIHwgQ29udGVudERpZmZlcmVudGlhbCB8IENvbnRlbnRNYXJrZXIsIGIgOiBUaGluZyB8IHR5cGVvZiBUaGluZyB8IENvbnRlbnREaWZmZXJlbnRpYWwgfCBDb250ZW50TWFya2VyKSB7XHJcbiAgICAgICAgaWYgKGEgPT0gdW5kZWZpbmVkIHx8IGEgPT0gbnVsbCkge1xyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgIC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KTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodW5tYXRjaGVkLmxlbmd0aCA9PSAwICYmIG1hdGNoaW5nLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodW5tYXRjaGVkLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBvbmx5IHRoaW5nIG1pc3NpbmcgYXJlIHVuaW1wb3J0YW50IENvbnRlbnRNYXJrZXJzXHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbWF0Y2hpbmcubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBub3VucyA9IG1hdGNoaW5nW2ldLmdldE5vdW5zKCk7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBrID0gMDsgayA8IG5vdW5zLmxlbmd0aDsgaysrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEobm91bnNba10gaW5zdGFuY2VvZiBDb250ZW50TWFya2VyKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCg8Q29udGVudE1hcmtlcj4gbm91bnNba10pLmlzSW1wb3J0YW50KCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAvLyBOb3RoaW5nIGltcG9ydGFudCBmb3VuZFxyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgfVxyXG59IiwiZW51bSBDb250ZW50R3JvdXBNYXRjaCB7XHJcbiAgICBOT19NQVRDSCxcclxuICAgIFBBUlRJQUxfTUFUQ0gsXHJcbiAgICBQRVJGRUNUX01BVENIXHJcbn1cclxuXHJcbmludGVyZmFjZSBDb250ZW50R3JvdXBNYXRjaFJlc3VsdCB7XHJcbiAgICB0eXBlIDogQ29udGVudEdyb3VwTWF0Y2g7XHJcbiAgICB1bm1hdGNoZWQgOiBBcnJheTxDb250ZW50VW5pdD47XHJcbn1cclxuXHJcbmNsYXNzIENvbnRlbnRHcm91cCB7XHJcbiAgICBwcml2YXRlIHVuaXRzIDogQXJyYXk8Q29udGVudFVuaXQ+ID0gW107XHJcbiAgICBwcml2YXRlIG1hdGNoaW5nIDogQXJyYXk8Q29udGVudFVuaXQ+O1xyXG5cclxuICAgIGNvbnN0cnVjdG9yICguLi51bml0cyA6IEFycmF5PENvbnRlbnRVbml0Pikge1xyXG4gICAgICAgIHVuaXRzLmZvckVhY2godW5pdCA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMuYWRkVW5pdCh1bml0KTtcclxuICAgICAgICB9KVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhZGRVbml0ICh1bml0IDogQ29udGVudFVuaXQpIHtcclxuICAgICAgICB0aGlzLnVuaXRzLnB1c2godW5pdCk7XHJcbiAgICAgICAgcmV0dXJuIHRoaXM7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHJlc2V0ICgpIHtcclxuICAgICAgICB0aGlzLm1hdGNoaW5nID0gdGhpcy51bml0cy5zbGljZSgpO1xyXG4gICAgfVxyXG5cdFxyXG5cdHB1YmxpYyBpc01hdGNoaW5nICgpIHtcclxuXHRcdHJldHVybiB0aGlzLm1hdGNoaW5nLmxlbmd0aDtcclxuXHR9XHJcblxyXG4gICAgcHVibGljIHNldE1hdGNoaW5nIChtYXRjaGluZyA6IEFycmF5PENvbnRlbnRVbml0Pikge1xyXG4gICAgICAgIHRoaXMubWF0Y2hpbmcgPSBtYXRjaGluZztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgaXNNYXRjaCAoY2cgOiBDb250ZW50R3JvdXApIDogQ29udGVudEdyb3VwTWF0Y2hSZXN1bHQge1xyXG4gICAgICAgIGxldCB1bm1hdGNoZWQgPSBjZy5tYXRjaGluZy5zbGljZSgpO1xyXG4gICAgICAgIGxldCBtYXRjaGluZyA9IHRoaXMudW5pdHMuc2xpY2UoKTtcclxuXHJcbiAgICAgICAgZm9yIChsZXQgaSA9IG1hdGNoaW5nLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGsgPSB1bm1hdGNoZWQubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChtYXRjaGluZ1tpXS5pc01hdGNoKHVubWF0Y2hlZFtrXSkpIHtcclxuICAgICAgICAgICAgICAgICAgICB1bm1hdGNoZWQuc3BsaWNlKGssIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hdGNoaW5nLnNwbGljZShpLCAxKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgdHlwZSA6IG1hdGNoaW5nLmxlbmd0aCA+IDAgPyBDb250ZW50R3JvdXBNYXRjaC5OT19NQVRDSCA6XHJcbiAgICAgICAgICAgICAgICAgICAgdW5tYXRjaGVkLmxlbmd0aCA9PSAwID8gQ29udGVudEdyb3VwTWF0Y2guUEVSRkVDVF9NQVRDSCA6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIENvbnRlbnRHcm91cE1hdGNoLlBBUlRJQUxfTUFUQ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ljIGNvbnN0cnVjdG9yICgpIHtcbiAgICAgICAgc3VwZXIoKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgc2V0RnVja2VyIChpdCA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nKSB7XG4gICAgICAgIHRoaXMuZnVja2VyID0gbmV3IENvbnRlbnREaWZmZXJlbnRpYWwoaXQpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBwdWJsaWMgc2V0RnVja2VkIChpdCA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nKSB7XG4gICAgICAgIHRoaXMuZnVja2VkID0gbmV3IENvbnRlbnREaWZmZXJlbnRpYWwoaXQpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBwdWJsaWMgc2V0SG9sZSAoaXQgOiBUaGluZyB8IHR5cGVvZiBUaGluZykge1xuICAgICAgICB0aGlzLmhvbGUgPSBuZXcgQ29udGVudERpZmZlcmVudGlhbChpdCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHB1YmxpYyBzZXRTdGljayAoaXQgOiBUaGluZyB8IHR5cGVvZiBUaGluZykge1xuICAgICAgICB0aGlzLnN0aWNrID0gbmV3IENvbnRlbnREaWZmZXJlbnRpYWwoaXQpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBwdWJsaWMgYWRkTWFya2VyIChtYXJrZXIgOiBDb250ZW50TWFya2VyKSB7XG4gICAgICAgIHRoaXMubWFya2Vycy5hZGROb3VuKG1hcmtlcik7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHB1YmxpYyBnZXRTY29yZSAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmZ1Y2tlci5nZXRTY29yZSgpICsgdGhpcy5mdWNrZWQuZ2V0U2NvcmUoKSArIHRoaXMuaG9sZS5nZXRTY29yZSgpICsgdGhpcy5zdGljay5nZXRTY29yZSgpICsgdGhpcy5tYX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5IYW5kbGVyLmdldFNheUVsZW1lbnRzQXNDb250ZW50KHNheSk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoLi4udGhpcy5sYXN0UHJpbnRlZENob2ljZSk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGNvbnNvbGUuZGVidWcoUnVsZWJvb2suZ2V0SW5kZW50YXRpb24oKSArIFwiW0Nob2ljZV0gUGlja2VkIFwiICsgY2hvc2VuTm9kZUlkKTtcclxuICAgICAgICAgICAgY29uc29sZS5kZWJ1ZyhSdWxlYm9vay5nZXRJbmRlbnRhdGlvbigpICsgXCJbQ2hvaWNlXSBHb2luZyB0byBcIiArIGNob3Nlbk5vZGUuZ2V0TmV4dCgpKTtcclxuICAgICAgICAgICAgUnVsZWJvb2suaW5jcmVhc2VJbmRlbnRhdGlvbihjaG9zZW5Ob2RlSWQpO1xyXG4gICAgICAgICAgICBSdWxlYm9vay5kZWNyZWFzZUluZGVudGF0aW9uKCk7XHJcblxyXG4gICAgICAgICAgICBSdWxlYm9vay5kZWNyZWFzZUluZGVudGF0aW9uKCk7XHJcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmdldE5leHQoY2hvc2VuTm9kZSk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgUnVsZWJvb2suZGVjcmVhc2VJbmRlbnRhdGlvbigpO1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5nZXROZXh0KG5vZGUpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdW5wcmludExhc3RDaG9pY2UgKCkge1xyXG4gICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci51bnByaW50KC4uLnRoaXMubGFzdFByaW50ZWRDaG9pY2UpO1xyXG4gICAgfVxyXG59IiwibW9kdWxlIERpYWxvZ3VlVHJlZXMge1xyXG4gICAgLy8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ICAgICAgIHZhciBuID0gMCxcclxuICAgICAgICAgICAgcG9zID0gMCxcclxuICAgICAgICAgICAgc3RlcCA9IGFsbG93T3ZlcmxhcHBpbmcgPyAxIDogc3ViU3RyaW5nLmxlbmd0aDtcclxuXHJcbiAgICAgICAgd2hpbGUgKHRydWUpIHtcclxuICAgICAgICAgICAgcG9zID0gc3RyaW5nLmluZGV4T2Yoc3ViU3RyaW5nLCBwb3MpO1xyXG4gICAgICAgICAgICBpZiAocG9zID49IDApIHtcclxuICAgICAgICAgICAgICAgICsrbjtcclxuICAgICAgICAgICAgICAgIHBvcyArPSBzdGVwO1xyXG4gICAgICAgICAgICB9IGVsc2UgYnJlYWs7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBuO1xyXG4gICAgfVxyXG59IiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL1Jvb20udHNcIiAvPlxyXG5pbnRlcmZhY2UgVHJpY2tpZXJPcHRpb25zIHtcclxuICAgIHJlZ2lvbiA6IFJlZ2lvblJhbmRvbTtcclxuICAgIG1hcCA6IFJvb21SYW5kb21NYXA7XHJcbiAgICBvdGhlclJvb20gOiBSb29tUmFuZG9tO1xyXG59XHJcblxyXG5pbnRlcmZhY2UgVHJpY2t5T3B0aW9ucyBleHRlbmRzIFRyaWNraWVyT3B0aW9ucyB7XHJcbiAgICBvdGhlclJvb21EaXJlY3Rpb24gOiBudW1iZXI7XHJcbiAgICB0cmlja3lSb29tRGlyZWN0aW9uIDogbnVtYmVyO1xyXG4gICAgeCA6IG51bWJlcjtcclxuICAgIHkgOiBudW1iZXI7XHJcbn1cclxuXHJcbmludGVyZmFjZSBSb29tUmFuZG9tTm9kZSB7XHJcbiAgICByb29tIDogUm9vbVJhbmRvbTtcclxuICAgIGNvb3JkaW5hdGVzIDogQXJyYXk8bnVtYmVyPjtcclxuICAgIGRpc3RhbmNlIDogbnVtYmVyO1xyXG59XHJcblxyXG5jbGFzcyBSb29tUmFuZG9tIGV4dGVuZ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2hlZXRzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgcnVsZXMgPSBkb2N1bWVudC5zdHlsZVNoZWV0c1tpXVsncnVsZXMnXSB8fCBkb2N1bWVudC5zdHlsZVNoZWV0c1tpXVsnY3NzUnVsZXMnXTtcclxuICAgICAgICAgICAgICAgIGZvciAodmFyIHggaW4gcnVsZXMpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJ1bGVzW3hdLnNlbGVjdG9yVGV4dCA9PSAnc3RyaW5nJyAmJiBydWxlc1t4XS5zZWxlY3RvclRleHQgPT0gXCIuXCIgKyB0aGlzLmJhY2tncm91bmRJbWFnZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgY29uc29sZS53YXJuKFwiVW5hYmxlIHRvIHJlYWQgaW1hZ2VcIik7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgaXNDb25uZWN0YWJsZU9uIChvcHBvc2l0ZURpcmVjdGlvbiA6IG51bWJlcikge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmNvbm5lY3RhYmxlT24uaW5kZXhPZihvcHBvc2l0ZURpcmVjdGlvbikgIT0gLTE7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHRyaWNreUNvZGUgOiAob3B0aW9ucyA6IFRyaWNreU9wdGlvbnMpID0+IGJvb2xlYW47XHJcblxyXG4gICAgcHVibGljIGdldEFueURpcmVjdGlvbiAob3B0aW9ucyA6IFRyaWNraWVyT3B0aW9ucykgOiBUcmlja3lPcHRpb25zIHtcclx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FsaWRSb29tID0gdmFsaWRSb29tID09IHVuZGVmaW5lZCA/ICgpID0+IHtyZXR1cm4gdHJ1ZTt9IDogdmFsaWRSb29tO1xyXG4gICAgICAgIGxldCBtYXAgPSB0aGlzLmxhc3RNYXA7XHJcbiAgICAgICAgbGV0IGVuZFBvc2l0aW9uID0gbWFwLmdldENvb3JkaW5hdGVzKHBhdGhFbmQpO1xyXG4gICAgICAgIGxldCBvcGVuID0gW107XHJcblxyXG4gICAgICAgIGxldCBkaXN0YW5jZSA9IChjMSwgYzIpID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIE1hdGguYWJzKGMxWzBdIC0gYzJbMF0pICsgTWF0aC5hYnMoYzFbMV0gLSBjMlsxXSk7XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IG5laWdoYm9ycyA9IChyb29tIDogUm9vbVJhbmRvbSwgeCA6IG51bWJlciwgeSA6IG51bWJlcikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgbmVpZ2hzID0gW107XHJcbiAgICAgICAgICAgIGZvciAobGV0IGRpcmVjdGlvbiA9IDA7IGRpcmVjdGlvbiA8IHJvb20uY29ubmVjdGlvbnMubGVuZ3RoOyBkaXJlY3Rpb24rKykge1xyXG4gICAgICAgICAgICAgICAgbGV0IG90aGVyUm9vbSA9IHJvb20uY29ubmVjdGlvbnNbZGlyZWN0aW9uXTtcclxuICAgICAgICAgICAgICAgIGlmIChvdGhlclJvb20gIT0gdW5kZWZpbmVkICYmIG9wZW4uaW5kZXhPZihvdGhlclJvb20pID09IC0xICYmIHZhbGlkUm9vbSg8Um9vbVJhbmRvbT4gb3RoZXJSb29tKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkaXJDb29yZGluYXRlcyA9IFJvb20uc2hpZnQoW3gsIHldLCBkaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkaXIgPSBbb3RoZXJSb29tLCBkaXJDb29yZGluYXRlcywgZGlzdGFuY2UoZW5kUG9zaXRpb24sIGRpckNvb3JkaW5hdGVzKV07XHJcbiAgICAgICAgICAgICAgICAgICAgbmVpZ2hzLnB1c2goZGlyKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gbmVpZ2hzLnNvcnQoKGEsYikgPT4geyByZXR1cm4gKDxudW1iZXI+IGFbMl0pIC0gKDxudW1iZXI+IGJbMl0pO30pO1xyXG4gICAgICAgIH07XHJcblxyXG5cclxuICAgICAgICBsZXQgc2hvcnRlc3RQYXRoID0ge1xyXG4gICAgICAgICAgICBsZW5ndGggOiBtYXAuZ2V0Um9vbUNvdW50KClcclxuICAgICAgICB9O1xyXG4gICAgICAgIGxldCBub1BhdGggPSBzaG9ydGVzdFBhdGg7XHJcbiAgICAgICAgbGV0IGNQYXRoID0gW107XHJcbiAgICAgICAgbGV0IGZpbmRQYXRoID0gKG15QXJyYXkpID0+IHtcclxuICAgICAgICAgICAgbGV0IHJvb20gPSBteUFycmF5WzBdO1xyXG4gICAgICAgICAgICBjUGF0aC5wdXNoKG15QXJyYXkpO1xyXG4gICAgICAgICAgICBpZiAocm9vbSA9PSBwYXRoRW5kKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2hvcnRlc3RQYXRoLmxlbmd0aCA+PSBjUGF0aC5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICBzaG9ydGVzdFBhdGggPSBjUGF0aC5zbGljZSgwKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzaG9ydGVzdFBhdGgubGVuZ3RoID4gKGNQYXRoLmxlbmd0aCkpIHtcclxuICAgICAgICAgICAgICAgIG9wZW4ucHVzaChyb29tKTtcclxuICAgICAgICAgICAgICAgIGxldCBvdGhlclJvb21zID0gbmVpZ2hib3JzKHJvb20sIG15QXJyYXlbMV1bMF0sIG15QXJyYXlbMV1bMV0pO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBvdGhlclJvb21zLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKChjUGF0aC5sZW5ndGggKyAxKSA8IHNob3J0ZXN0UGF0aC5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmluZFBhdGgob3RoZXJSb29tc1tpXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgb3Blbi5wb3AoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjUGF0aC5wb3AoKTtcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBmaW5kUGF0aChbdGhpcywgbWFwLmdldENvb3JkaW5hdGVzKHRoaXMpXSk7XHJcbiAgICAgICAgcmV0dXJuIHNob3J0ZXN0UGF0aCAhPSBub1BhdGggPyBzaG9ydGVzdFBhdGggOiB1bmRlZmluZWQ7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEJlc3REaXJlY3Rpb25UbyAob3RoZXJSb29tIDogUm9vbVJhbmRvbSwgdmFsaWRSb29tPyA6IChyb29tIDogUm9vbVJhbmRvbSkgPT4gYm9vbGVhbikge1xyXG4gICAgICAgIGxldCBwYXRoID0gdGhpcy5maW5kUGF0aFRvKG90aGVyUm9vbSwgdmFsaWRSb29tKTtcclxuICAgICAgICBpZiAocGF0aCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgaWYgKHBhdGgubGVuZ3RoID09IDEpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29ubmVjdGlvbnMuaW5kZXhPZihwYXRoWzFdWzBdKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEFTdGFyUGF0aFRvIChvdGhlclJvb20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yZGluYXRlcywgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICBuZWlnaGJvcnMucHVzaCh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvb20gOiA8Um9vbVJhbmRvbT4gbm9kZS5yb29tLmNvbm5lY3Rpb25zW2RpcmVjdGlvbl0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzIDogY29vcmRpbmF0ZXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3RhbmNlIDogZGlzdGFuY2UoY29vcmRpbmF0ZXMsIGVuZE5vZGUuY29vcmRpbmF0ZXMpXHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdmlzaXRlZC5wdXNoKDxSb29tUmFuZG9tPiBub2RlLnJvb20uY29ubmVjdGlvbnNbZGlyZWN0aW9uXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIG5laWdoYm9ycztcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBsZXQgZ2V0Q2xvc2VzdFBhdGggPSAoKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBzaG9ydGVzdCA9IDA7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAxOyBpIDwgb3Blbi5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgbGV0IGxhc3RQb2ludCA9IG9wZW5baV1bb3BlbltpXS5sZW5ndGggLSAxXTtcclxuICAgICAgICAgICAgICAgIGlmIChsYXN0UG9pbnQuZGlzdGFuY2UgPCBvcGVuW3Nob3J0ZXN0XVtvcGVuW3Nob3J0ZXN0XS5sZW5ndGggLSAxXS5kaXN0YW5jZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNob3J0ZXN0ID0gaTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZX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7XHJcbiAgICAgICAgICAgICAgICBsZXQgcHVzaCA9IGNsb3NlZC5wdXNoKG15UGF0aCk7XHJcbiAgICAgICAgICAgICAgICBpZiAobXlQYXRoLmxlbmd0aCA8IHNob3J0ZXN0UGF0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNob3J0ZXN0UGF0aCA9IG15UGF0aC5sZW5ndGg7XHJcbiAgICAgICAgICAgICAgICAgICAgc2hvcnRlc3RJbmRleCA9IHB1c2ggLSAxO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgLy8gbGF6eSwgZmlyc3QgcGF0aCBpcyB2ZXJ5IGxpa2VseSB0byBiZSB0aGUgYmVzdFxyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgbmVpZ2hib3JzID0gZ2V0TmVpZ2hib3JzKG15UGF0aFtteVBhdGgubGVuZ3RoIC0gMV0pO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBuZWlnaGJvcnMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBvcGVuLnB1c2gobXlQYXRoLmNvbmNhdChbbmVpZ2hib3JzW2ldXSkpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSBvcGVuLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAob3BlbltpXS5sZW5ndGggPj0gc2hvcnRlc3RQYXRoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgb3Blbi5zcGxpY2UoaSwgMSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY2xvc2VzdCA9IGdldENsb3Nlc3RQYXRoKCk7XHJcbiAgICAgICAgfVxyXG5cclxuIC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HwgdGhpcy5wb3NpdGlvblRhYmxlW3hdW3ldID09PSB1bmRlZmluZWQpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBibG9jayAoeCA6IG51bWJlciwgeSA6IG51bWJlcikge1xyXG4gICAgICAgIGlmICh0aGlzLmlzRnJlZSh4LCB5KSkge1xyXG4gICAgICAgICAgICBpZiAodGhpcy5wb3NpdGlvblRhYmxlW3hdID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5wb3NpdGlvblRhYmxlW3hdID0ge307XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdGhpcy5wb3NpdGlvblRhYmxlW3hdW3ldID0gbnVsbDtcclxuICAgICAgICAgICAgdGhpcy51cGRhdGVDYWNoZU9uUG9zaXRpb24oeCwgeSk7XHJcbiAgICAgICAgICAgIHRoaXMudXBkYXRlTGltaXRzKHgsIHkpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdXBkYXRlQWxsTGltaXRzICgpIHtcclxuICAgICAgICB0aGlzLmhpZ2hlc3RYID0gMDtcclxuICAgICAgICB0aGlzLmhpZ2hlc3RZID0gMDtcclxuICAgICAgICB0aGlzLmxvd2VzdFggPSAwO1xyXG4gICAgICAgIHRoaXMubG93ZXN0WSA9IDA7XHJcbiAgICAgICAgZm9yIChsZXQgeCBpbiB0aGlzLnBvc2l0aW9uVGFibGUpIHtcclxuICAgICAgICAgICAgZm9yIChsZXQgeSBpbiB0aGlzLnBvc2l0aW9uVGFibGVbeF0pIHtcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnBvc2l0aW9uVGFibGVbeF1beV0gIT0gdW5kZWZpbmVkICYmIHRoaXMucG9zaXRpb25UYWJsZVt4XVt5XSAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51cGRhdGVMaW1pdHMocGFyc2VJbnQoeCksIHBhcnNlSW50KHkpKTtcclxuICAgICAgICAgIC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ICAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZUZyb21DYWNoZShzaGlmdGVkTWFwLCBvcHBvc2l0ZURpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNoaWZ0ZWRSb29tLmlzQ29ubmVjdGFibGVPbihvcHBvc2l0ZURpcmVjdGlvbikpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmFkZFRvQ2FjaGUoc2hpZnRlZE1hcCwgb3Bwb3NpdGVEaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVGcm9tQ2FjaGUoc2hpZnRlZE1hcCwgb3Bwb3NpdGVEaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFJvb20gKHggOiBudW1iZXIsIHkgOiBudW1iZXIpIHtcclxuICAgICAgICBpZiAodGhpcy5wb3NpdGlvblRhYmxlW3hdICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBpZiAodGhpcy5wb3NpdGlvblRhYmxlW3hdW3ldICE9IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnBvc2l0aW9uVGFibGVbeF1beV07XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0Q29vcmRpbmF0ZXMgKHJvb20gOiBSb29tKSA6IEFycmF5PG51bWJlcj4ge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnJvb21NYXAuZ2V0KHJvb20pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRSb29tQ291bnQgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnJvb21NYXAuc2l6ZTt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gZnJvbSBnZXR0aW5nIHRvbyBsb3dcclxuICAgICAgICAgICAgICAgIC8vIElmIHdlJ3JlIHBsYWNpbmcgcm9vbXMgd2l0aCB0b28gZmV3IGF2YWlsYWJsZUNvbm5lY3Rpb25zLCB3ZSBtaWdodCBlbmQgdXAgcmVhY2hpbmcgMCBhdmFpbGFibGVDb25uZWN0aW9uc1xyXG4gICAgICAgICAgICAgICAgLy8gV2hpY2ggd291bGQgbWVhbiBubyBtb3JlIHJvb21zIGNhbiBiZSBwbGFjZWQuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSAocmVnaW9uLm1hcC5yb29tcyA+IDAgJiYgcmVnaW9uLm1hcC5nZXRBdmFpbGFibGVDb25uZWN0aW9ucygpIDwgNCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBmb2RkZXIgPSBuZXcgcmVnaW9uLmZvZGRlclJvb21DbGFzcygpO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb25zID0gPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbWFwIDogcmVnaW9uLm1hcCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm9vbSA6IGZvZGRlcixcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVnaW9uIDogcmVnaW9uXHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uLnBsYWNlKGZvZGRlcik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IFJlZ2lvblJhbmRvbS5ydWxlYm9va0JlZm9yZVBsYWNlUm9vbS5leGVjdXRlKHtub3VuIDogb3B0aW9uc30pO1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IFJlZ2lvblJhbmRvbS5ydWxlYm9va1BsYWNlUm9vbS5leGVjdXRlKHtub3VuIDogb3B0aW9uc30pO1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YWl0IFJlZ2lvblJhbmRvbS5ydWxlYm9va0FmdGVyUGxhY2VSb29tLmV4ZWN1dGUoe25vdW4gOiBvcHRpb25zfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IG9wdGlvbnMgPSA8UmFuZG9taXppbmdSb29tT3B0aW9ucz4ge1xyXG4gICAgICAgICAgICAgICAgICAgIG1hcCA6IHJlZ2lvbi5tYXAsXHJcbiAgICAgICAgICAgICAgICAgICAgcm9vbSA6IHJvb20sXHJcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uIDogcmVnaW9uXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgUmVnaW9uUmFuZG9tLnJ1bGVib29rQmVmb3JlUGxhY2VSb29tLmV4ZWN1dGUoe25vdW4gOiBvcHRpb25zfSk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uZXhlY3V0ZSh7bm91biA6IG9wdGlvbnN9KTtcclxuICAgICAgICAgICAgICAgIGF3YWl0IFJlZ2lvblJhbmRvbS5ydWxlYm9va0FmdGVyUGxhY2VSb29tLmV4ZWN1dGUoe25vdW4gOiBvcHRpb25zfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCFyb29tLnBsYWNlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzRXJyb3IobmV3IFNheShcIldhcyB1bmFibGUgdG8gcGxhY2Ugcm9vbSBcIiwgcm9vbSwgXCIuIEdhbWUgbWlnaHQgYmUgdW5wbGF5YWJsZS5cIikpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBydWxlQWRkRXh0cmFDb25uZWN0aW9ucyA9IFJ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hQ29ubmVjdGlvbkNoYW5jZTsgZGlyZWN0aW9uID0gZGlyZWN0aW9uU2h1ZmZsZXIuZ2V0T25lKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3RoZXJDb29yZGluYXRlcyA9IFJvb20uc2hpZnQobXlDb29yZGluYXRlcywgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG90aGVyUm9vbSA9IHJlZ2lvbi5tYXAuZ2V0Um9vbShvdGhlckNvb3JkaW5hdGVzWzBdLCBvdGhlckNvb3JkaW5hdGVzWzFdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG90aGVyUm9vbSAhPSB1bmRlZmluZWQgJiYgb3RoZXJSb29tLnJhbmRvbWl6YWJsZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgb3RoZXJSb29tLmlzQ29ubmVjdGFibGVPbihPcHBvc2l0ZURpcmVjdGlvbltEaXJlY3Rpb25bZGlyZWN0aW9uXV0pXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAoUmVnaW9uUmFuZG9tLnJuZygpICogMTAwKSA8PSBvdGhlclJvb20uZXh0cmFDb25uZWN0aW9uQ2hhbmNlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb29tLm1hcFJvb20ob3RoZXJSb29tLCBkaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVQbGFjZUZpcnN0Um9vbSA9IFJlZ2lvblJhbmRvbS5ydWxlYm9va1BsY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AgICAgICAgICAgICAgIGxldCBvdGhlckNvb3JkaW5hdGVzID0gcGxhY2luZ09wdGlvbnMubWFwLmdldENvb3JkaW5hdGVzKGNvbm5lY3RhYmxlUm9vbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG15Q29vcmRpbmF0ZXMgPSBSb29tLnNoaWZ0KG90aGVyQ29vcmRpbmF0ZXMsIG9wcG9zaXRlRGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICBwbGFjaW5nT3B0aW9ucy5yb29tLm1hcFJvb20oY29ubmVjdGFibGVSb29tLCBkaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC5tYXAocGxhY2luZ09wdGlvbnMucm9vbSwgbXlDb29yZGluYXRlc1swXSwgbXlDb29yZGluYXRlc1sxXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGNvbmRpdGlvbnMgOiBydW5uZXIgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4gcnVubmVyLm5vdW4ucm9vbS50cmlja3lDb2RlID09IHVuZGVmaW5lZDtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVQbGFjZVRyaWNreVJvb20gPSBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiUGxhY2luZyB0cmlja3kgcm9vbSBzb21ldGhpbmdcIixcclxuICAgICAgICBjb2RlIDogcnVubmVyID0+IHtcclxuICAgICAgICAgICAgbGV0IHBsYWNpbmdPcHRpb25zID0gPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgcGxhY2VkUm9vbXMgPSA8QXJyYXk8Um9vbVJhbmRvbT4+IHBsYWNpbmdPcHRpb25zLnJlZ2lvbi5nZXRSb29tcygpLmZpbHRlcigocm9vbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJvb20gaW5zdGFuY2VvZiBSb29tUmFuZG9tICYmIHJvb20ucGxhY2VkO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIGlmIChwbGFjZWRSb29tcy5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50QXNFcnJvcihcIlVuYWJsZSB0byBwbGFjZSByb29tIFwiICsgcGxhY2luZ09wdGlvbnMucm9vbS5nZXRQcmludGVkTmFtZSgpICsgXCI6IFRoZXJlIGFyZSBubyByb29tcyB0byBjb25uZWN0IHRvIVwiKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgbGV0IHJvb21TaHVmZmxlciA9IG5ldyBTaHVmZmxlcihwbGFjZWRSb29tcywgUmVnaW9uUmFuZG9tLnJuZyk7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGNvbm5lY3RhYmxlUm9vbSA9IHJvb21TaHVmZmxlci5nZXRPbmUoKTsgY29ubmVjdGFibGVSb29tICE9IHVuZGVmaW5lZDsgY29ubmVjdGFibGVSb29tID0gcm9vbVNodWZmbGVyLmdldE9uZSgpKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgdHJpY2tpZXIgPSA8VHJpY2tpZXJPcHRpb25zPiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uIDogcGxhY2luZ09wdGlvbnMucmVnaW9uLFxyXG4gICAgICAgICAgICAgICAgICAgIG1hcCA6IHBsYWNpbmdPcHRpb25zLm1hcCxcclxuICAgICAgICAgICAgICAgICAgICBvdGhlclJvb20gOiBjb25uZWN0YWJsZVJvb21cclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICBsZXQgdHJpY2t5ID0gcGxhY2luZ09wdGlvbnMucm9vbS5nZXRBbnlEaXJlY3Rpb24odHJpY2tpZXIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKHRyaWNreSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBwbGFjaW5nT3B0aW9ucy5yb29tLm1hcFJvb20oY29ubmVjdGFibGVSb29tLCB0cmlja3kudHJpY2t5Um9vbURpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMubWFwLm1hcChwbGFjaW5nT3B0aW9ucy5yb29tLCB0cmlja3kueCwgdHJpY2t5LnkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBUSElTIFdPUktTXHJcbiAgICAgICAgICAgIC8vIEkgRE9OJ1QgS05PVyBXSFlcclxuICAgICAgICAgICAgLy8gSSBET04nVCBDQVJFIFdIWVxyXG4gICAgICAgICAgICAvLyBMRUFWRVxyXG4gICAgICAgICAgICBsZXQgY29ubmVjdGFibGVUaHJvdWdoRm9kZGVyID0gKGZvZGRlclN0ZXAgOiBudW1iZXIsIGNvbm5lY3RpbmdSb29tIDogUm9vbVJhbmRvbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgbGV0IHRyaWNraWVyID0gPFRyaWNraWVyT3B0aW9ucz4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvbiA6IHBsYWNpbmdPcHRpb25zLnJlZ2lvbixcclxuICAgICAgICAgICAgICAgICAgICBtYXAgOiBwbGFjaW5nT3B0aW9ucy5tYXAsXHJcbiAgICAgICAgICAgICAgICAgICAgb3RoZXJSb29tIDogY29ubmVjdGluZ1Jvb21cclxuICAgICAgICAgICAgIC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ICAgICAgICAgICAgICAgIGxldCBvdGhlckNvb3JkaW5hdGVzID0gcGxhY2luZ09wdGlvbnMubWFwLmdldENvb3JkaW5hdGVzKGNvbm5lY3RpbmdSb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHdvdWxkYmVDb29yZGluYXRlcyA9IFJvb20uc2hpZnQob3RoZXJDb29yZGluYXRlcywgb3Bwb3NpdGVEaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZm9kZGVyVHJpY2t5ID0ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3RoZXJSb29tIDogY29ubmVjdGluZ1Jvb20sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdGhlclJvb21EaXJlY3Rpb24gOiBvcHBvc2l0ZURpcmVjdGlvbixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyaWNreVJvb21EaXJlY3Rpb24gOiBkaXJlY3Rpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXAgOiBwbGFjaW5nT3B0aW9ucy5tYXAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWdpb24gOiBwbGFjaW5nT3B0aW9ucy5yZWdpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4IDogd291bGRiZUNvb3JkaW5hdGVzWzBdLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeSA6IHdvdWxkYmVDb29yZGluYXRlc1sxXVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5ld0ZvZGRlci5pc1BsYWNlYWJsZShmb2RkZXJUcmlja3kpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdGb2RkZXIubWFwUm9vbShjb25uZWN0aW5nUm9vbSwgZm9kZGVyVHJpY2t5LnRyaWNreVJvb21EaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMubWFwLm1hcChuZXdGb2RkZXIsIGZvZGRlclRyaWNreS54LCBmb2RkZXJUcmlja3kueSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5leHRUcmlja3kgPSBjb25uZWN0YWJsZVRocm91Z2hGb2RkZXIoZm9kZGVyU3RlcCAtIDEsIG5ld0ZvZGRlcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobmV4dFRyaWNreSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGFjaW5nT3B0aW9ucy5yZWdpb24ucGxhY2UobmV3Rm9kZGVyKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV4dFRyaWNreTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3Rm9kZGVyLnVubWFwUm9vbShmb2RkZXJUcmlja3kudHJpY2t5Um9vbURpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMubWFwLnVubWFwKGZvZGRlclRyaWNreS54LCBmb2RkZXJUcmlja3kueSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICBmb3IgKGxldCBmb2RkZXJMZXZlbCA9IDE7IGZvZGRlckxldmVsIDwgMTA7IGZvZGRlckxldmVsKyspIHtcclxuICAgICAgICAgICAgICAgIHJvb21TaHVmZmxlci5yZXN0YXJ0KCk7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBjb25uZWN0YWJs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JcbiAgICAgICAgICAgIHJuZy5wdXNoKDEsIDEpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoc3RhdCA+PSA0KSB7XHJcbiAgICAgICAgICAgIHJuZy5wdXNoKDEpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBsZXQgcmVzdWx0cyA9IFtdO1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc3RhdDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGxldCBpbmRleCA9IE1hdGguZmxvb3IoTWF0aC5yYW5kb20oKSAqIChybmcubGVuZ3RoKSk7XHJcbiAgICAgICAgICAgIHJlc3VsdHMucHVzaChybmdbaW5kZXhdKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIFRPRE86IFByaW50IHRoZSBkaWNlIHJlc3VsdHMgaWYgTWVtb3J5LlNob3dEaWNlID0gMVxyXG5cclxuICAgICAgICByZXR1cm4gcmVzdWx0cztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHN1bSAoYSwgYikge1xyXG4gICAgICAgIHJldHVybiBhICsgYjtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0U2F5IChyZXN1bHRzIDogQXJyYXk8bnVtYmVyPikgOiBTYXkge1xyXG4gICAgICAgIGxldCBmaW5hbFJlc3VsdCA9IHJlc3VsdHMucmVkdWNlKERpY2Uuc3VtKTtcclxuICAgICAgICByZXR1cm4gbmV3IFNheShcclxuICAgICAgICAgICAgbmV3IFNheUJvbGQoXCJbXCIsIHRoaXMudGVzdFN0cmluZywgXCJdIFwiKSxcclxuICAgICAgICAgICAgXCIgPSBbXCIsIHJlc3VsdHMuam9pbihcIl0gW1wiKSwgXCJdXCIsXHJcbiAgICAgICAgICAgIHJlc3VsdHMubGVuZ3RoID09IDEgPyBcIlwiIDpcclxuICAgICAgICAgICAgICAgIChcIiA9IFwiICsgZmluYWxSZXN1bHQpXHJcbiAgICAgICAgKTtcclxuICAgIH1cclxuXH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m91biA6IGNvbnRhaW5lcn0pO1xyXG4gICAgICAgIC8vIERpZCB3ZSBmaW5kIGEgbGlxdWlkP1xyXG4gICAgICAgIGlmIChyZXN1bHQgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGxldCBmaW5hbFF1YW50aXR5ID0gcmVzdWx0LnF1YW50aXR5TXVsdGlwbGllciAhPSB1bmRlZmluZWQgP1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocmVzdWx0LnF1YW50aXR5TXVsdGlwbGllciAqIGNvbnRhaW5lci5saXF1aWRDb250ZW50cy5sZW5ndGgpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNvbnRhaW5lci5saXF1aWRDb250ZW50cy5sZW5ndGgpO1xyXG5cclxuXHJcbiAgICAgICAgICAgIGNvbnRhaW5lci5saXF1aWRDb250ZW50cyA9IG5ldyBBcnJheShmaW5hbFF1YW50aXR5KTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBmaW5hbFF1YW50aXR5OyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGNvbnRhaW5lci5saXF1aWRDb250ZW50c1tpXSA9IHJlc3VsdC5yZXN1bHQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRNaXh0dXJlcyAoKSB7XHJcbiAgICAgICAgaWYgKExpcXVpZC5zb3J0ZWRNaXh0dXJlcykge1xyXG4gICAgICAgICAgICByZXR1cm4gTGlxdWlkLm1peHR1cmVzO1xyXG4gICAgICAgIH1cclxuICAgICAgICBMaXF1aWQubWl4dHVyZXMuc29ydCgoYSwgYikgPT4ge1xyXG4gICAgICAgICAgICBpZiAoYi5maXJzdFByaW9yaXR5IDwgYS5maXJzdFByaW9yaXR5KSByZXR1cm4gLTE7XHJcb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ICAgICAgICAgIG1peHR1cmUgPSBMaXF1aWQubWl4dHVyZXNbaV07XHJcbiAgICAgICAgICAgICAgICBsZXQgcHJvcG9ydGlvbnMgPSBbXTtcclxuICAgICAgICAgICAgICAgIGxldCBtaXh0dXJlSXRlcmF0b3IgPSBtaXh0dXJlLnF1YW50aXRpZXMuZW50cmllcygpO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgbWl4dHVyZUxpcXVpZCA9IG1peHR1cmVJdGVyYXRvci5uZXh0KCk7ICFtaXh0dXJlTGlxdWlkLmRvbmU7IG1peHR1cmVMaXF1aWQgPSBtaXh0dXJlSXRlcmF0b3IubmV4dCgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG1peHR1cmVUeXBlID0gbWl4dHVyZUxpcXVpZC52YWx1ZVswXTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbWl4dHVyZVF1YW50aXR5ID0gbWl4dHVyZUxpcXVpZC52YWx1ZVsxXTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbWF0Y2hlZFF1YW50aXR5ID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBydW5uZXIubm91bi5saXF1aWRDb250ZW50cy5mb3JFYWNoKChsaXF1aWRUeXBlKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGlxdWlkVHlwZSA9PSBtaXh0dXJlVHlwZSB8fFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0eXBlb2YgbWl4dHVyZVR5cGUgPT0gXCJmdW5jdGlvblwiICYmXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsaXF1aWRUeXBlIGluc3RhbmNlb2YgbWl4dHVyZVR5cGUgfHwgbWl4dHVyZVR5cGUobGlxdWlkVHlwZSkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hlZFF1YW50aXR5Kys7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBtaXh0dXJlVHlwZSBpcyBub3QgYWx3YXlzIGNhbGxhYmxlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHByb3BvcnRpb25zLnB1c2gobWF0Y2hlZFF1YW50aXR5IC8gbWl4dHVyZVF1YW50aXR5KTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGlzIGlzIGEgdmFsaWQgbWl4LCB0aGVuIGV2ZXJ5IHBhcnQgb2YgdGhlIHJlY2lwZSBpcyByZXByZXNlbnRlZCBwcm9wb3J0aW9uYWxseVxyXG4gICAgICAgICAgICAgICAgaWYgKHByb3BvcnRpb25zLmV2ZXJ5KGZ1bmN0aW9uKGVsZW1lbnQsIGluZGV4LCBhcnJheSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZWxlbWVudCA9PT0gYXJyYXlbMF07XHJcbiAgICAgICAgICAgICAgICAgICAgfSkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWl4dHVyZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59XHJcblxyXG4vLyBjbGFzcyBTZW1lbiBleHRlbmRzIExpcXVpZCB7fVxyXG4vLyBjbGFzcyBPcmNTZW1lbiBleHRlbmRzIFNlbWVuIHt9XHJcbi8vIGNsYXNzIE1pbm90YXVyU2VtZW4gZXh0ZW5kcyBTZW1lbiB7fVxyXG4vLyBjbGFzcyBQb3dlcm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WJsaWMgc3RhdGljIGNvdW50ZXIgPSAxO1xyXG4gICAgcHVibGljIGNvbnN0cnVjdG9yICgpIHtcclxuICAgICAgICBzdXBlcih7XHJcbiAgICAgICAgICAgIGlzTWFsZTogdHJ1ZSxcclxuICAgICAgICAgICAgbmFtZSA6ICgoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBsZXQgbmFtZU1vZCA9IE9yY0RlYnVnZ2VyLm5hbWVNb2RpZmllci5nZXRPbmUoKTtcclxuICAgICAgICAgICAgICAgIGlmIChuYW1lTW9kID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIG5hbWVNb2QgPSAoT3JjRGVidWdnZXIuY291bnRlcisrKS50b1N0cmluZygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5hbWVNb2QgKyBcIiBPcmNcIjtcclxuICAgICAgICAgICAgfSkoKSxcclxuICAgICAgICAgICAgdW5pcXVlIDogdHJ1ZSxcclxuICAgICAgICAgICAgZGVzY3JpcHRpb24gOiBcIlRoaXMgaXMgb25lIGV4dHJlbWVseSB1Z2x5IGZlbGxvdy5cIlxyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLkFJLndhbmRlcmVyID0gdHJ1ZTtcclxuICAgICAgICB0aGlzLkFJLnBpY2tzU2hpbmllcyA9IHRydWU7XHJcbiAgICB9XHJcbn1cclxuXHJcbkFjdGlvblRhbGsuY2FycnkuY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICBuYW1lIDogXCJUYWxraW5nIHRvIHRoZSBvcmNcIixcclxuICAgIGZpcnN0UHJpb3JpdHkgOiBBY3Rpb25UYWxrLlBSSU9SSVRZX0dMT0JBTF9ESUFMT0dVRSxcclxuICAgIHByaW9yaXR5IDogQWN0aW9uVGFsay5QUklPUklUWV9DT01NT05fRElBTE9HVUUsXHJcbiAgICBjb25kaXRpb25zIDogKHJ1bm5lciA6IFJ1bGVib29rUn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vbVwiLFxuICAgIGNvZGUgOiBydW5uZXIgPT4ge1xuICAgICAgICBsZXQgb3B0aW9ucyA9IDxSYW5kb21pemluZ1Jvb21PcHRpb25zPiBydW5uZXIubm91bjtcbiAgICAgICAgbGV0IG15Q29vcmRpbmF0ZXMgPSBvcHRpb25zLm1hcC5nZXRDb29yZGluYXRlcyhvcHRpb25zLnJvb20pO1xuICAgICAgICBpZiAobXlDb29yZGluYXRlcyAhPSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgUm9vbS5ESVJFQ1RJT05TLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IFJvb20uRElSRUNUSU9OU1tpXTtcbiAgICAgICAgICAgICAgICBpZiAoZGlyZWN0aW9uICE9IERpcmVjdGlvbi5OT1JUSCkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgY29vcmRpbmF0ZXMgPSBSb29tLnNoaWZ0KG15Q29vcmRpbmF0ZXMsIGRpcmVjdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMubWFwLmJsb2NrKGNvb3JkaW5hdGVzWzBdLCBjb29yZGluYXRlc1sxXSk7XG4gICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzID0gUm9vbS5zaGlmdChjb29yZGluYXRlcywgZGlyZWN0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5tYXAuYmxvY2soY29vcmRpbmF0ZXNbMF0sIGNvb3JkaW5hdGVzWzFdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9LFxuICAgIGNvbmRpdGlvbnMgOiBydW5uZXIgPT4ge1xuICAgICAgICByZXR1cm4gcnVubmVyLm5vdW4ucm9vbSA9PSBzb3V0aGVzdFJvb207XG4gICAgfVxufSkpXG5cblRoaW5nLkNhcnJ5UmVsYXRpb24uc2V0UmVsYXRpb24o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gICAgcmV0dXJuIHBlcnNvbi5BSS5waWNrc1NoaW5pZXM7XG4gICAgICAgIH0sXG4gICAgICAgIGNvZGUgOiAocnVubmVyIDogUnVsZWJvb2tSdW5uZXI8UGVyc29uPikgPT4ge1xuICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHJ1bm5lci5ub3VuO1xuICAgICAgICAgICAgbGV0IHJvb20gPSBwZXJzb24uZ2V0Um9vbSgpO1xuICAgICAgICAgICAgbGV0IHZpc2libGVUaGluZ3MgPSByb29tLmdldENvbnRhaW5lZEFuZFZpc2libGVUbyhwZXJzb24pO1xuXG4gICAgICAgICAgICBpZiAodmlzaWJsZVRoaW5ncy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB2aXNpYmxlVGhpbmdzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdmlzaWJsZVRoaW5nc1tpXS5maXhlZEluUGxhY2UgJiYgdmlzaWJsZVRoaW5nc1tpXS5nZXRTaGlueSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEFjdGlvblRha2UocGVyc29uLCB2aXNpYmxlVGhpbmdzW2ldKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xufVxubGV0IHJhbmRvbU9yYztcbmxldCByYW5kb21PcmMyO1xuZm9yIChsZXQgaSA9IDA7IGkgPCAxMDsgaSsrKSB7XG4gICAgbGV0IG9yYyA9IG5ldyBPcmNEZWJ1Z2dlcigpO1xuICAgIHJhbmRvbU9yYyA9IG9yYztcbiAgICBpZiAocmFuZG9tT3JjMiA9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgcmFuZG9tT3JjMiA9IG9yYztcbiAgICB9XG4gICAgb3JjLkFJLndhbmRlcmVyID0gdHJ1ZTtcbiAgICBvcmMuQUkucGlja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ZWZ0U2lkZS5hcHBlbmRDaGlsZChlbGUpO1xyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgIH0pKTtcclxuXHJcbiAgICAgICAgbGV0IG9yaWdpbnMgPSBDaGFyYWN0ZXJPcmlnaW4uZ2V0T3JpZ2lucygpO1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgb3JpZ2lucy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBsZXQgb3JpZ2luID0gb3JpZ2luc1tpXTtcclxuICAgICAgICAgICAgbGV0IHNheSA9IG5ldyBTYXkob3JpZ2luLm5hbWUpO1xyXG4gICAgICAgICAgICBpZiAob3JpZ2luLmlkID09IENoYXJhY3RlckNyZWF0aW9uLlBsYXllck9yaWdpbi52YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChcIiAtIFNFTEVDVEVEXCIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGF3YWl0IChzYXkpLmdldEhUTUwoXCJwXCIsIFtcImNob2ljZVwiXSkudGhlbihlbGVtZW50QXJyYXkgPT4ge1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuTGlua3MubWFrZUN1c3RvbUxpbmsoZWxlbWVudEFycmF5WzBdLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgbW91c2VvdmVyOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50T3JpZ2luKG9yaWdpbik7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBtb3VzZW91dDogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcmludE9yaWdpbigpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgY2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgQ2hhcmFjdGVyQ3JlYXRpb24uUGxheWVyT3JpZ2luLnZhbHVlID0gb3JpZ2luLmlkO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNldCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5hcHBseUNvZGUoZWxlbWVudEFycmF5WzBdLCBDb250cm9scy5LZXlIYW5kbGVyLmdldFNlY29uZEtleUNvZGUoKSk7XHJcbiAgICAgICAgICAgICAgICBsZWZ0U2lkZS5hcHBlbmRDaGlsZChlbGVtZW50QXJyYXlbMF0pO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcHJpbnRDb25maXJtICgpIHtcclxuICAgICAgICAobmV3IFNheShcIkNvbmZpcm1cIikpLmdldEhUTUwoXCJwXCIsIFtcImNob2ljZVwiXSkudGhlbihlbGVtZW50QXJyYXkgPT4ge1xyXG4gICAgICAgICAgICBlbGVtZW50QXJyYXlbMF0uYWRkRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsICgpID0+IHtcclxuICAgICAgICAgICAgICAgIHJlc29sdmVyKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShlbGVtZW50QXJyYXlbMF0sIENvbnRyb2xzLktleUhhbmRsZXIuZ2V0U2Vjb25kS2V5Q29kZSgpKTtcclxuICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50KGVsZW1lbnRBcnJheVswXSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcHJpbnRPcmlnaW4gKG9yaWdpbj8gOiBDaGFyYWN0ZXJPcmlnaW4pIHtcclxuICAgICAgICBpZiAob3JpZ2luID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBvcmlnaW4gPSBDaGFyYWN0ZXJPcmlnaW4uZ2V0T3JpZ2luKENoYXJhY3RlckNyZWF0aW9uLlBsYXllck9yaWdpbi52YWx1ZSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGxldCBzYXkgPSBuZXcgU2F5KG9yaWdpbi5kZXNjcmlwdGlvbik7XHJcbiAgICAgICAgaWYgKG9yaWdpbi5ib251c1N0YXRzICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBzYXkuYWRkKFNheS5QQVJBR1JBUEhfQlJFQUssIG9yaWdpbi5ib251c1N0YXRzKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgc2F5LmdldEhUTUxDb250ZW50KCkudGhlbigoZWxlcyA9PiB7XHJcbiAgICAgICAgICAgIHdoaWxlIChyaWdodFNpZGUuZmlyc3RDaGlsZCkgcmlnaHRTaWRlLnJlbW92ZUNoaWxkKHJpZ2h0U2lkZS5maXJzdENoaWxkKTtcclxuXHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZWxlcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgcmlnaHRTaWRlLmFwcGVuZENoaWxkKGVsZXNbaV0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSkpO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIHJlc2V0ICgpIHtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIuY2xlYXIoKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoY2NEaXYpO1xyXG4gICAgICAgIHByaW50VGFibGUoKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImJyXCIpKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImJyXCIpKTtcclxuICAgICAgICBwcmludENvbmZpcm0oKTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgbGV0IENDT3JpZ2luID0gQ2hhcmFjdGVyQ3JlYXRpb24ucnVsZWJvb2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZTogXCJDaGFyYWN0ZXIgQ3JlYXRpb24gLSBPcmlnaW5cIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5OiBSdWxlLlBSSU9SSVRZX01FRElVTSxcclxuICAgICAgICBwcmlvcml0eTogUnVsZS5QUklPUklUWV9ISUdILFxyXG4gICAgICAgIGNvZGU6IGFzeW5jICgpID0+IHtcclxuICAgICAgICAgICAgRWxlbWVudHMuc3RhcnRNZW51KCk7XHJcblxyXG4gICAgICAgICAgICBsZXQgcHJvbWlzZSA9IG5ldyBQcm9taXNlKHJlc29sdmUgPT4ge1xyXG4gICAgICAgICAgICAgICAgcmVzb2x2ZXIgPSByZXNvbHZlO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIHJlc2V0KCk7XHJcblxyXG4gICAgICAgICAgICBhd2FpdCBwcm9taXNlO1xyXG5cclxuICAgICAgICAgICAgQ2hhcmFjdGVyQ3JlYXRpb24uZ2V0T3JpZ2luKCkuY29uZmlybVBpY2tlZCgpO1xyXG5cclxuICAgICAgICAgICAgRWxlbWVudHMuZW5kTWVudSgpO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59IiwibW9kdWxlIENoYXJhY3RlckNyZWF0aW9uIHtcclxuICAgIGxldCBjY0RpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XHJcbiAgICBjY0Rpdi5pZCA9IFwiY2hhcmFjdGVyQ3JlYXRpb25cIjtcclxuICAgIGxldCByaWdodFNpZGUgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiZGl2XCIpO1xyXG4gICAgcmlnaHRTaWRlLmlkID0gXCJjY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GF0b3J5KVwiKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChcIiAtIFNlbGVjdGVkXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBlcmsuaXNGb3JjZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChcIiAoRm9yYmlkZGVuKVwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBhd2FpdCAoc2F5KS5nZXRIVE1MKFwicFwiLCBbXCJjaG9pY2VcIl0pLnRoZW4oZWxlbWVudEFycmF5ID0+IHtcclxuICAgICAgICAgICAgICAgIENvbnRyb2xzLkxpbmtzLm1ha2VDdXN0b21MaW5rKGVsZW1lbnRBcnJheVswXSwge1xyXG4gICAgICAgICAgICAgICAgICAgIG1vdXNlb3ZlcjogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwcmludFBlcmsocGVyayk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBtb3VzZW91dDogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbXB0eVBlcmsoKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGNsaWNrOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcGVyay5pc0ZvcmNlZCgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwZXJrLnZhbHVlID0gIXBlcmsudmFsdWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXQoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIENvbnRyb2xzLktleUhhbmRsZXIuYXBwbHlDb2RlKGV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ICBFbGVtZW50cy5zdGFydE1lbnUoKTtcclxuXHJcbiAgICAgICAgICAgIGxldCBwcm9taXNlID0gbmV3IFByb21pc2UocmVzb2x2ZSA9PiB7XHJcbiAgICAgICAgICAgICAgICByZXNvbHZlciA9IHJlc29sdmU7XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgcmVzZXQoKTtcclxuXHJcbiAgICAgICAgICAgIGF3YWl0IHByb21pc2U7XHJcblxyXG4gICAgICAgICAgICBsZXQgcGVya3MgPSBQZXJrLmdldFBlcmtzKCk7XHJcbiAgICAgICAgICAgIHBlcmtzLmZvckVhY2gocGVyayA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAocGVyay5pc0VuYWJsZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHBlcmsuY29uZmlybVBpY2tlZCgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgIEVsZW1lbnRzLmVuZE1lbnUoKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxufSIsIm1vZHVsZSBDaGFyYWN0ZXJDcmVhdGlvbiB7XHJcbiAgICBpbnRlcmZhY2UgcmFuZ2VPcHRpb25zIHtcclxuICAgICAgICBsYWJlbD8gOiBzdHJpbmc7XHJcbiAgICAgICAgc2hvd1ZhbHVlPyA6IGJvb2xlYW47XHJcbiAgICAgICAgb25DaGFuZ2UgOiAodmFsdWUgOiBudW1iZXIsIGxhYmVsVmFsdWUgOiBUZXh0LCBpbnB1dCA6IEhUTUxJbnB1dEVsZW1lbnQpID0+IHZvaWQ7XHJcbiAgICAgICAgbWluVmFsdWUgOiBudW1iZXI7XHJcbiAgICAgICAgbWF4VmFsdWUgOiBudW1iZXI7XHJcbiAgICAgICAgbGVmdExhYmVsPyA6IHN0cmluZztcclxuICAgICAgICByaWdodExhYmVsPyA6IHN0cmluZztcclxuICAgICAgICB0b3BMYWJlbD8gOiBzdHJpbmc7XH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YWJlbCA6IFwiTWFsZVwiLCByaWdodExhYmVsIDogXCJGZW1hbGVcIiwgdG9wTGFiZWwgOiBcIlNleFwiLFxyXG4gICAgICAgICAgICAgICAgb25DaGFuZ2UgOiAodmFsdWUgOiBudW1iZXIsIGxhYmVsVmFsdWUgOiBUZXh0LCBpbnB1dCA6IEhUTUxJbnB1dEVsZW1lbnQpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBsYWJlbFZhbHVlLm5vZGVWYWx1ZSA9ICh2YWx1ZSA9PSAwID8gXCJNYWxlXCIgOiBcIkZlbWFsZVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAoPEh1bWFub2lkPiBXb3JsZFN0YXRlLnBsYXllcikucmVtb3ZlR2VuZGVyZWRQYXJ0cygpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICg8SHVtYW5vaWQ+IFdvcmxkU3RhdGUucGxheWVyKS5hZGRNYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAoPEh1bWFub2lkPiBXb3JsZFN0YXRlLnBsYXllcikuYWRkRmVtYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gU29tZSBzdGF0cyBiZWNvbWUgZGlmZmVyZW50IHdoZXRoZXIgdGUgcGxheWVyIGlzIG1hbGUgb3IgZmVtYWxlLCBzbyB3ZSBoYXZlIHRvIHVwZGF0ZSB0aGVtIGFsbC5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgb3RoZXJJbnB1dHMgPSBjY0Rpdi5nZXRFbGVtZW50c0J5VGFnTmFtZShcImlucHV0XCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgb3RoZXJJbnB1dHMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG90aGVySW5wdXQgPSBvdGhlcklucHV0c1tpXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG90aGVySW5wdXQgIT0gaW5wdXQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG90aGVySW5wdXQuZGlzcGF0Y2hFdmVudChuZXcgRXZlbnQoXCJjaGFuZ2VcIikpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pKTtcclxuXHJcblxyXG5cclxuICAgICAgICAgICAgY2NMZWZ0LmFwcGVuZENoaWxkKGNyZWF0ZVJhbmdlKHtcclxuICAgICAgICAgICAgICAgIG1pblZhbHVlIDogMCwgbWF4VmFsdWUgOiA0LCBzdGVwOiAxLCB2YWx1ZSA6IDIsIGxlZnRMYWJlbCA6IFwiTWFzY3VsaW5lXCIsIHJpZ2h0TGFiZWwgOiBcIkZlbWluaW5lXCIsIHRvcExhYmVsIDogXCJHZW5kZXJcIixcclxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlIDogKHZhbHVlIDogbnVtYmVyLCBsYWJlbFZhbHVlIDogVGV4dCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBuYW1lcyA9IFtcIk1hc2N1bGluZVwiLCBcIlNvbWV3aGF0IG1hc2N1bGluZVwiLCBcIkFuZHJvZ3lub3VzXCIsIFwiU29tZXdoYXQgZmVtaW5pbmVcIiwgXCJGZW1pbmluZVwiXTtcclxuICAgICAgICAgICAgICAgICAgICBsYWJlbFZhbHVlLm5vZGVWYWx1ZSA9IG5hbWVzW3ZhbHVlXTtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgcGxheWVyID0gKDxIdW1hbm9pZD4gV29ybGRTdGF0ZS5wbGF5ZXIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBpbnRlbmRlZFZhbHVlIDogbnVtYmVyO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChwbGF5ZXIuaXNNYWxlKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlcyA9IFsxMCwgMjUsIDUwLCA1NSwgNjBdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnRlbmRlZFZhbHVlID0gdmFsdWVzW3ZhbHVlXTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWVzID0gWzM1LCA0MCwgNTAsIDY1LCA3NV07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGludGVuZGVkVmFsdWUgPSB2YWx1ZXNbdmFsdWVdO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAoPEh1bWFub2lkPiBXb3JsZFN0YXRlLnBsYXllcikuc2V0R2VuZGVyVmFsdWUoaW50ZW5kZWRWYWx1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgV29ybGRTdGF0ZS5wbGF5ZXIuc2V0U3RhdChBdHRyaWJ1dGVzLkdlbmRlcklkZW50aXR5LCBpbnRlbmRlZFZhbHVlKTtcclxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZSgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgICAgICBsZXQgc3RhdHNIZWFkZXIgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiZGl2XCIpO1xyXG4gICAgICAgICAgICBjY0xlZnQuYXBwZW5kQ2hpbGQoc3RhdHNIZWFkZXIpO1xyXG4gICAgICAgICAgICBzdGF0c0hlYWRlci5jbGFzc0xpc3QuYWRkKFwiY2NIZWFkZXJcIik7XHJcbiAgICAgICAgICAgIHN0YXRzSGVhZGVyLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKFwiU3RhdHMgKFwiKSk7XHJcblxyXG4gICAgICAgICAgICBsZXQgbWF4U3RhdHMgPSAxMjtcclxuICAgICAgICAgICAgbGV0IHN0YXRzUmVtYWluaW5nID0gZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoXCI0IHBvaW50cyByZW1haW5pbmdcIik7XHJcblxyXG5cclxuICAgICAgICAgICAgc3RhdHNIZWFkZXIuYXBwZW5kQ2hpbGQoc3RhdHNSZW1haW5pbmcpO1xyXG4gICAgICAgICAgICBzdGF0c0hlYWRlci5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShcIilcIikpO1xyXG5cclxuICAgICAgICAgICAgbGV0IHNldFN0YXQgPSAoYXR0ciA6IEF0dHJpYnV0ZSwgdmFsdWUgOiBudW1iZXIsIGlucHV0IDogSFRNTElucHV0RWxlbWVudCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgcGxheWVyLnNldFN0YXQoYXR0ciwgdmFsdWUpO1xyXG4gICAgICAgICAgICAgICAgbGV0IHJlbWFpbmluZyA9IG1heFN0YXRzXHJcbiAgICAgICAgICAgICAgICAgICAgLSBwbGF5ZXIuZ2V0U3RhdChBdHRyaWJ1dGVzLlN0cmVuZ3RoKVxyXG4gICAgICAgICAgICAgICAgICAgIC0gcGxheWVyLmdldFN0YXQoQXR0cmlidXRlcy5BZ2lsaXR5KVxyXG4gICAgICAgICAgICAgICAgICAgIC0gcGxheWVyLmdldFN0YXQoQXR0cmlidXRlcy5JbnRlbGxpZ2VuY2UpXHJcbiAgICAgICAgICAgICAgICAgICAgLSBwbGF5ZXIuZ2V0U3RhdChBdHRyaWJ1dGVzLkNoYXJtKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAocmVtYWluaW5nIDwgMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlICs9IHJlbWFpbmluZztcclxuICAgICAgICAgICAgICAgICAgICByZW1haW5pbmcgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGlucHV0LnZhbHVlID0gdmFsdWUudG9TdHJpbmcoKTtcclxuICAgICAgICAgICAgICAgICAgICBpbnB1dC5kaXNwYXRjaEV2ZW50KG5ldyBFdmVudChcImNoYW5nZVwiKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHN0YXRzUmVtYWluaW5nLm5vZGVWYWx1ZSA9IChyZW1haW5pbmcgPT0gMCA/IFwiRG9uZVwiIDpcclxuICAgICAgICAgICAgICAgICAgICByZW1haW5pbmcgPiAxID8gcmVtYWluaW5nLnRvU3RyaW5nKCkgKyBcIiBwb2ludHMgcmVtYWluaW5nXCIgOlxyXG4gICAgICAgICAgICAgICAgICAgIHJlbWFpbmluZy50b1N0cmluZygpICsgXCIgcG9pbnQgcmVtYWluaW5nXCIpO1xyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgY2NMZWZ0LmFwcGVuZENoaWxkKGNyZWF0ZVJhbmdlKHtcclxuICAgICAgICAgICAgICAgIG1pblZhbHVlIDogMSwgbWF4VmFsdWUgOiA1LCBzdGVwOiAxLCB2YWx1ZSA6IDIsIGxlZnRMYWJlbCA6IFwiLVwiLCByaWdodExhYmVsIDogXCIrXCIsIHRvcExhYmVsIDogXCJTdHJlbmd0aFwiLFxyXG4gICAgICAgICAgICAgICAgb25DaGFuZ2UgOiAodmFsdWUgOiBudW1iZXIsIGxhYmVsVmFsdWUgOiBUZXh0LCBpbnB1dCA6IEhUTUxJbnB1dEVsZW1lbnQpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBzZXRTdGF0KEF0dHJpYnV0ZXMuU3RyZW5ndGgsIHZhbHVlLCBpbnB1dCk7XHJcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2UoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAg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AgICAgICAgIH0pKTtcclxuXHJcbiAgICAgICAgICAgIGNjTGVmdC5hcHBlbmRDaGlsZChjcmVhdGVSYW5nZSh7XHJcbiAgICAgICAgICAgICAgICBtaW5WYWx1ZSA6IDEsIG1heFZhbHVlIDogNSwgc3RlcDogMSwgdmFsdWUgOiAyLCBsZWZ0TGFiZWwgOiBcIi1cIiwgcmlnaHRMYWJlbCA6IFwiK1wiLCB0b3BMYWJlbCA6IFwiSW50ZWxsaWdlbmNlXCIsXHJcbiAgICAgICAgICAgICAgICBvbkNoYW5nZSA6ICh2YWx1ZSA6IG51bWJlciwgbGFiZWxWYWx1ZSA6IFRleHQsIGlucHV0IDogSFRNTElucHV0RWxlbWVudCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHNldFN0YXQoQXR0cmlidXRlcy5JbnRlbGxpZ2VuY2UsIHZhbHVlLCBpbnB1dCk7XHJcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2UoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSkpO1xyXG5cclxuICAgICAgICAgICAgbGV0IGNyZWF0aW9uRG9uZSA9IG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAobmV3IFNheShcIkNvbmZpcm1cIikpLmdldEhUTUwoXCJwXCIsIFtcImNob2ljZVwiXSkudGhlbihlbGVtZW50QXJyYXkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRBcnJheVswXS5hZGRFdmVudExpc3RlbmVyKFwiY2xpY2tcIiwgKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBFbGVtZW50cy5lbmRNZW51KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShlbGVtZW50QXJyYXlbM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