Application.js 1.4 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303
  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;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3; h;3f;;h1;9f;;u1bh;iv;1;rda;gs;2;eq;a;;pcd;gg;3;a3b;1y;;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 && thing.isVisibleTo(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. action.stop();
  3332. return false;
  3333. }
  3334. let code;
  3335. if (actor == WorldState.player) {
  3336. code = (room) => {
  3337. return WorldState.isRoomRemembered(room);
  3338. };
  3339. }
  3340. let direction = cRoom.getAStarBestDirectionTo(dRoom, code);
  3341. if (direction == undefined) {
  3342. if (actor.isPlayer()) {
  3343. action.say.add("You don't remember how to get there.");
  3344. }
  3345. return false;
  3346. }
  3347. else {
  3348. action.setNoun(0, direction);
  3349. }
  3350. }
  3351. }
  3352. }
  3353. });
  3354. ActionGo.ruleCheckIstheredirectionandroom = ActionGo.check.createAndAddRule({
  3355. name: "Check Going - is there a direction? Does it lead anywhere?",
  3356. code: (rulebook) => {
  3357. let action = rulebook.noun;
  3358. let cRoom = action.actor.getRoom();
  3359. if (cRoom == undefined) {
  3360. return false;
  3361. }
  3362. let direction = action.getNoun(0);
  3363. if (direction == undefined) {
  3364. return false;
  3365. }
  3366. let nextRoom = cRoom.connections[direction];
  3367. if (nextRoom == undefined) {
  3368. return false;
  3369. }
  3370. action.roomGoneFrom = action.actor.getRoom();
  3371. action.roomGoneTo = nextRoom;
  3372. }
  3373. });
  3374. ActionGo.ruleCarryMove = ActionGo.carry.createAndAddRule({
  3375. name: "Going - Move Actor to Next Room",
  3376. code: (rulebook) => {
  3377. let action = rulebook.noun;
  3378. let roomGoneFrom = action.actor.getRoom();
  3379. let direction = action.getNoun(0);
  3380. let roomGoneInto = roomGoneFrom.connections[direction];
  3381. roomGoneInto.place(action.actor);
  3382. let actor = action.actor;
  3383. if (actor == WorldState.player) {
  3384. action.say.add("You go " + DirectionNames[Direction[direction]].toLowerCase() + ".");
  3385. }
  3386. else {
  3387. if (roomGoneFrom == WorldState.player.getRoom()) {
  3388. action.say.add(new SayThe(), actor, " goes " + DirectionNames[Direction[direction]].toLowerCase() + ".");
  3389. }
  3390. else {
  3391. let oppositeName = DirectionNames[OppositeDirection[direction]];
  3392. action.say.add(new SayThe(), actor, " arrives from the " + oppositeName.toLowerCase() + ".");
  3393. }
  3394. }
  3395. }
  3396. });
  3397. ActionGo.ruleCarryRememberRooms = ActionGo.carry.createAndAddRule({
  3398. name: "Going - Remember the involved rooms",
  3399. code: (rulebook) => {
  3400. let action = rulebook.noun;
  3401. let actor = action.actor;
  3402. let roomGoneInto = action.actor.getRoom();
  3403. let direction = action.getNoun(0);
  3404. let roomGoneFrom = roomGoneInto.connections[OppositeDirection[Direction[direction]]];
  3405. if (actor.isPlayer()) {
  3406. WorldState.rememberRoom(roomGoneFrom, roomGoneInto);
  3407. }
  3408. }
  3409. });
  3410. var Elements;
  3411. (function (Elements) {
  3412. var RoomHandler;
  3413. (function (RoomHandler) {
  3414. RoomHandler.currentRoomTab = document.getElementById("currentRoomTab");
  3415. RoomHandler.currentRoomDescription = document.getElementById("roomDescription");
  3416. RoomHandler.currentRoomExits = document.getElementById("roomExits");
  3417. RoomHandler.currentRoomName = document.createTextNode("");
  3418. document.getElementById("roomName").appendChild(RoomHandler.currentRoomName);
  3419. function linkObjects() {
  3420. let objs = RoomHandler.currentRoomTab.getElementsByClassName("roomObject");
  3421. for (let i = 0; i < objs.length; i++) {
  3422. let linkKeyCode = Controls.KeyHandler.getFirstKeyCode();
  3423. Controls.KeyHandler.applyCode(objs[i], linkKeyCode);
  3424. }
  3425. }
  3426. RoomHandler.linkObjects = linkObjects;
  3427. function emptyRoom() {
  3428. while (RoomHandler.currentRoomDescription.firstChild) {
  3429. RoomHandler.currentRoomDescription.removeChild(RoomHandler.currentRoomDescription.firstChild);
  3430. }
  3431. while (RoomHandler.currentRoomExits.firstChild) {
  3432. RoomHandler.currentRoomExits.removeChild(RoomHandler.currentRoomExits.firstChild);
  3433. }
  3434. RoomHandler.currentRoomName.nodeValue = "";
  3435. }
  3436. RoomHandler.emptyRoom = emptyRoom;
  3437. async function updateRoom() {
  3438. emptyRoom();
  3439. let room = WorldState.player.getRoom();
  3440. if (room != undefined) {
  3441. RoomHandler.currentRoomName.nodeValue = room.getPrintedName();
  3442. let description = room.description.getHTML("p", ["roomDescription"]);
  3443. await description.then(value => {
  3444. for (let i = 0, p = value[i]; p != undefined; p = value[++i]) {
  3445. RoomHandler.currentRoomDescription.appendChild(p);
  3446. }
  3447. });
  3448. let things = room.getContainedAndVisible();
  3449. if (things.length > 0) {
  3450. let thingList = document.createElement("p");
  3451. thingList.classList.add("roomDescription");
  3452. await RoomHandler.PrintingVisibleThingsRulebook.execute({
  3453. noun: {
  3454. things: things,
  3455. container: thingList
  3456. }
  3457. });
  3458. RoomHandler.currentRoomDescription.appendChild(thingList);
  3459. }
  3460. for (let index = 0, value = room.connections[index]; index < room.connections.length; value = room.connections[++index]) {
  3461. if (value != undefined) {
  3462. let p = document.createElement("p");
  3463. p.classList.add("roomExit");
  3464. let link = document.createElement("a");
  3465. link.classList.add("roomDirection");
  3466. link.appendChild(document.createTextNode(DirectionNames[Direction[index]]));
  3467. Controls.Links.makeLink(link, new ActionGo(WorldState.player, index));
  3468. Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getDirectionCodeByIndex(index));
  3469. p.appendChild(link);
  3470. let directionResult = ": ";
  3471. if (WorldState.isRoomRemembered(value)) {
  3472. directionResult += value.getPrintedName();
  3473. }
  3474. else {
  3475. directionResult += "A new place";
  3476. }
  3477. p.appendChild(document.createTextNode(directionResult));
  3478. RoomHandler.currentRoomExits.appendChild(p);
  3479. }
  3480. }
  3481. }
  3482. }
  3483. RoomHandler.updateRoom = updateRoom;
  3484. RoomHandler.PrintingVisibleThingsRulebook = new Rulebook("Printing the name of visible things in a room");
  3485. RoomHandler.PrintIntroToVisibleThingsRule = new Rule({
  3486. name: "Print \"You can see\" text",
  3487. firstPriority: Rule.PRIORITY_HIGH,
  3488. code: (rulebook) => {
  3489. let noun = rulebook.noun;
  3490. noun.container.appendChild(document.createTextNode("You can see "));
  3491. }
  3492. });
  3493. RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintIntroToVisibleThingsRule);
  3494. RoomHandler.PrintVisibleThingsRule = new Rule({
  3495. name: "Print all visible things",
  3496. code: async (rulebook) => {
  3497. let noun = rulebook.noun;
  3498. for (let i = 0; i < noun.things.length; i++) {
  3499. let value = noun.things[i];
  3500. let link = document.createElement("a");
  3501. link.classList.add("roomObject");
  3502. let say;
  3503. if (value instanceof Thing && value.unique) {
  3504. say = new Say(new SayThe(false), value);
  3505. }
  3506. else {
  3507. say = new Say(new SayAn(false), value);
  3508. }
  3509. await say.getPureElements().then(value2 => {
  3510. for (let i = 0, element = value2[i]; element != undefined; element = value2[++i]) {
  3511. link.appendChild(element);
  3512. }
  3513. });
  3514. Controls.Links.makeLink(link, new ActionExamine(WorldState.player, value));
  3515. Controls.KeyHandler.applyCode(link, Controls.KeyHandler.getFirstKeyCode());
  3516. noun.container.appendChild(link);
  3517. if ((i + 1) < noun.things.length) {
  3518. noun.container.appendChild(document.createTextNode(", "));
  3519. }
  3520. }
  3521. }
  3522. });
  3523. RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintVisibleThingsRule);
  3524. RoomHandler.PrintOutroToVisibleThingsRule = new Rule({
  3525. name: "Print \"... here\" text",
  3526. firstPriority: Rule.PRIORITY_LOW,
  3527. code: (rulebook) => {
  3528. let noun = rulebook.noun;
  3529. noun.container.appendChild(document.createTextNode(" here."));
  3530. }
  3531. });
  3532. RoomHandler.PrintingVisibleThingsRulebook.addRule(RoomHandler.PrintOutroToVisibleThingsRule);
  3533. })(RoomHandler = Elements.RoomHandler || (Elements.RoomHandler = {}));
  3534. })(Elements || (Elements = {}));
  3535. class CoinPouch extends Thing {
  3536. constructor(options) {
  3537. super(options);
  3538. this.coins = 0;
  3539. this.addGetAlterations((purse) => {
  3540. return {
  3541. coins: purse.getCoins()
  3542. };
  3543. });
  3544. this.addSetAlterations((purse, changeObj) => {
  3545. purse.coins = (changeObj.coins);
  3546. });
  3547. }
  3548. addCoins(coins) {
  3549. this.coins += coins;
  3550. }
  3551. removeCoins(coins) {
  3552. this.coins -= coins;
  3553. }
  3554. getCoins() {
  3555. return this.coins;
  3556. }
  3557. getShiny() {
  3558. return this.coins > 0;
  3559. }
  3560. }
  3561. CoinPouch.carryOutTakingCoinPouches = new Rule({
  3562. name: "Carry out taking coin pouches",
  3563. firstPriority: ActionTake.defaultCarryTakingRule.firstPriority,
  3564. priority: ActionTake.defaultCarryTakingRule.priority + 1,
  3565. code: async (rulebook) => {
  3566. let action = rulebook.noun;
  3567. let actor = action.actor;
  3568. let thing = action.getNoun(0);
  3569. let actorPouches = Thing.CarryRelation.getRightType(actor, CoinPouch);
  3570. if (actorPouches.length > 0) {
  3571. let thingCoins = thing.getCoins();
  3572. if (thingCoins > 0) {
  3573. rulebook.skipRule(ActionTake.defaultCarryTakingRule);
  3574. actorPouches[0].addCoins(thingCoins);
  3575. thing.removeCoins(thing.getCoins());
  3576. if (actor == WorldState.player) {
  3577. action.say.add("You empty ", new SayThe(), thing, " into your ", actorPouches[0], ". Your ", actorPouches[0], " now has " + actorPouches[0].getCoins().toString() + " coins.");
  3578. }
  3579. else {
  3580. action.say.add(new SayThe(), actor, " empties ", new SayThe(), thing, " into ", Say.hisHersIts(actor), actorPouches[0], ".");
  3581. }
  3582. }
  3583. else {
  3584. let myCoins = actorPouches[0].getCoins();
  3585. actorPouches[0].removeCoins(myCoins);
  3586. thing.addCoins(myCoins);
  3587. if (actor == WorldState.player) {
  3588. action.say.add("You empty your ", actorPouches[0], " into ", new SayThe(), thing, ".", Say.PARAGRAPH_BREAK);
  3589. }
  3590. let drop = new ActionDrop(actor, actorPouches[0]);
  3591. await drop.execute();
  3592. if (Thing.EnclosedRelation.getLeft(actorPouches[0]) == actor) {
  3593. if (actor == WorldState.player) {
  3594. action.say.add("You can't get rid of your ", actorPouches[0], "!");
  3595. }
  3596. return false;
  3597. }
  3598. }
  3599. }
  3600. },
  3601. conditions: (rulebook) => {
  3602. return (rulebook.noun.getNoun(0) instanceof CoinPouch);
  3603. }
  3604. });
  3605. ActionTake.carry.addRule(CoinPouch.carryOutTakingCoinPouches);
  3606. Say.afterPrinting.addRule(new Rule({
  3607. name: "Include contents of Coin Pouch while Printing Visible Things in a Room",
  3608. code: (rulebook) => {
  3609. let say = rulebook.noun;
  3610. let pouch = say.currentNoun;
  3611. say.currentNounElements.push(document.createTextNode(" with " + pouch.getCoins().toString() + " coins"));
  3612. },
  3613. conditions: (rulebook) => {
  3614. return Elements.RoomHandler.PrintingVisibleThingsRulebook.isRunning()
  3615. && rulebook.noun.currentNoun instanceof CoinPouch
  3616. && rulebook.noun.currentNoun.getCoins() > 0;
  3617. }
  3618. }));
  3619. ActionExamine.carry.addRule(new Rule({
  3620. name: "Print description of coins in Coin Pouch",
  3621. firstPriority: ActionExamine.PrintDescriptionOfExaminedThingRule.firstPriority,
  3622. priority: ActionExamine.PrintDescriptionOfExaminedThingRule.priority - 1,
  3623. code: (rulebook) => {
  3624. let action = rulebook.noun;
  3625. let thing = action.getNoun(0);
  3626. if (thing.getCoins() > 0) {
  3627. action.say.add(" There are " + thing.getCoins().toString() + " coins in it.");
  3628. }
  3629. else {
  3630. action.say.add(" There are no coins in it.");
  3631. }
  3632. },
  3633. conditions: (rulebook) => {
  3634. return (rulebook.noun.getNoun(0) instanceof CoinPouch);
  3635. }
  3636. }));
  3637. var Elements;
  3638. (function (Elements) {
  3639. var InventoryHandler;
  3640. (function (InventoryHandler) {
  3641. var container = document.getElementById("inventoryTarget");
  3642. function empty() {
  3643. while (container.firstChild) {
  3644. container.removeChild(container.firstChild);
  3645. }
  3646. }
  3647. function printHeader(header) {
  3648. let p = document.createElement("p");
  3649. p.classList.add("inventoryHeader");
  3650. p.appendChild(document.createTextNode(header + ":"));
  3651. container.appendChild(p);
  3652. }
  3653. let currentRow;
  3654. InventoryHandler.LinkingThing = new Rulebook("Inventory - Links for a Thing");
  3655. function printThingLink(shortcut, action) {
  3656. let nameLink = document.createElement("div");
  3657. nameLink.classList.add("inventoryLink");
  3658. nameLink.appendChild(document.createTextNode(shortcut));
  3659. currentRow.appendChild(nameLink);
  3660. Controls.Links.makeLink(nameLink, action);
  3661. }
  3662. InventoryHandler.printThingLink = printThingLink;
  3663. async function printThing(thing) {
  3664. currentRow = document.createElement("div");
  3665. currentRow.classList.add("inventoryRow");
  3666. let nameLink = document.createElement("div");
  3667. nameLink.classList.add("inventoryLink", "name");
  3668. nameLink.appendChild(document.createTextNode(thing.getPrintedName()));
  3669. currentRow.appendChild(nameLink);
  3670. Controls.Links.makeLink(nameLink, new ActionExamine(WorldState.player, thing));
  3671. await InventoryHandler.LinkingThing.execute({ noun: thing });
  3672. container.appendChild(currentRow);
  3673. }
  3674. function thingSort(a, b) {
  3675. let na = a.getPrintedName().toLowerCase();
  3676. let nb = b.getPrintedName().toLowerCase();
  3677. if (na < nb)
  3678. return -1;
  3679. if (na > nb)
  3680. return 1;
  3681. return 0;
  3682. }
  3683. InventoryHandler.thingSort = thingSort;
  3684. async function updateInventory() {
  3685. let player = WorldState.player;
  3686. empty();
  3687. let wielded = Thing.WieldRelation.getRight(player).sort(thingSort);
  3688. let worn = Thing.WearRelation.getRight(player).sort(thingSort);
  3689. let carried = Thing.CarryRelation.getRight(player).sort(thingSort);
  3690. if (wielded.length > 0) {
  3691. printHeader("Wielded");
  3692. for (let i = 0; i < wielded.length; i++) {
  3693. await printThing(wielded[i]);
  3694. }
  3695. }
  3696. if (worn.length > 0) {
  3697. printHeader("Worn");
  3698. for (let i = 0; i < worn.length; i++) {
  3699. await printThing(worn[i]);
  3700. }
  3701. }
  3702. if (carried.length > 0) {
  3703. printHeader("Carried");
  3704. for (let i = 0; i < carried.length; i++) {
  3705. await printThing(carried[i]);
  3706. }
  3707. }
  3708. let pouch = Thing.CarryRelation.getRightType(WorldState.player, CoinPouch);
  3709. if (pouch.length > 0) {
  3710. let p = document.createElement("p");
  3711. p.classList.add("inventoryGold");
  3712. let s;
  3713. if (pouch[0].getCoins() > 0) {
  3714. s = new Say("There are " + pouch[0].getCoins().toString() + " coins in your ", pouch[0], ".");
  3715. }
  3716. else {
  3717. s = new Say("There are no coins in your ", pouch[0], ".");
  3718. }
  3719. await s.getPureElements().then(elements => {
  3720. elements.forEach(element => {
  3721. p.appendChild(element);
  3722. });
  3723. });
  3724. container.appendChild(p);
  3725. }
  3726. }
  3727. InventoryHandler.updateInventory = updateInventory;
  3728. })(InventoryHandler = Elements.InventoryHandler || (Elements.InventoryHandler = {}));
  3729. })(Elements || (Elements = {}));
  3730. class ActionRetrace extends Action {
  3731. constructor(actor, ...nouns) {
  3732. super(actor, ...nouns);
  3733. this.requiresNoun = false;
  3734. this.requiresVisibility = false;
  3735. this.requiresTurn = false;
  3736. }
  3737. getCommandText() {
  3738. let name;
  3739. if (typeof this.getNoun(0) == "number") {
  3740. name = DirectionNames[Direction[this.getNoun(0)]];
  3741. }
  3742. else if (this.getNoun(0) instanceof Room) {
  3743. name = this.getNoun(0).getPrintedName();
  3744. }
  3745. return "think about how to get to " + name;
  3746. }
  3747. }
  3748. ActionRetrace.check = new Rulebook("Check Retracing");
  3749. ActionRetrace.carry = new Rulebook("Carry out Retracing");
  3750. ActionRetrace.check.addRule(new Rule({
  3751. firstPriority: Rule.PRIORITY_HIGHEST,
  3752. priority: Rule.PRIORITY_HIGH,
  3753. name: "Change Room to Direction",
  3754. code: (rulebook) => {
  3755. let action = rulebook.noun;
  3756. if (action.getNoun(0) instanceof Room) {
  3757. let actor = action.actor;
  3758. let cRoom = actor.getRoom();
  3759. if (cRoom == undefined) {
  3760. return false;
  3761. }
  3762. let dRoom = action.getNoun(0);
  3763. if (cRoom == dRoom) {
  3764. if (actor.isPlayer()) {
  3765. action.say.add("You are already there!");
  3766. }
  3767. action.stop();
  3768. return false;
  3769. }
  3770. let code;
  3771. if (actor == WorldState.player) {
  3772. code = (room) => {
  3773. return WorldState.isRoomRemembered(room);
  3774. };
  3775. }
  3776. let direction = cRoom.bestDirectionTo(dRoom, code);
  3777. if (direction == undefined) {
  3778. if (actor.isPlayer()) {
  3779. action.say.add("You don't remember how to get there.");
  3780. }
  3781. return false;
  3782. }
  3783. else {
  3784. action.setNoun(0, direction);
  3785. }
  3786. }
  3787. }
  3788. }));
  3789. ActionRetrace.carry.addRule(new Rule({
  3790. name: "Retracing - Find Direction",
  3791. code: (rulebook) => {
  3792. let action = rulebook.noun;
  3793. action.say.add("To get there, you should go " + DirectionNames[Direction[action.getNoun(0)]] + ".");
  3794. }
  3795. }));
  3796. var Elements;
  3797. (function (Elements) {
  3798. var RememberedHandler;
  3799. (function (RememberedHandler) {
  3800. var mapTarget = document.getElementById("mapTarget");
  3801. var lastMap;
  3802. var elements;
  3803. function empty() {
  3804. elements = {};
  3805. lastMap = undefined;
  3806. while (mapTarget.firstChild) {
  3807. mapTarget.removeChild(mapTarget.firstChild);
  3808. }
  3809. }
  3810. RememberedHandler.empty = empty;
  3811. async function updateMap() {
  3812. console.debug(Rulebook.getIndentation() + "[MAP] Creating Map");
  3813. let regions = Region.InRelation.getAllLeftType(WorldState.player.getRoom(), RegionRandom);
  3814. let biggestRegion = regions[regions.length - 1];
  3815. if (biggestRegion == undefined) {
  3816. empty();
  3817. return;
  3818. }
  3819. if (biggestRegion.map != lastMap) {
  3820. empty();
  3821. }
  3822. else {
  3823. await updateOldMap();
  3824. return;
  3825. }
  3826. let map = biggestRegion.map;
  3827. lastMap = map;
  3828. map.updateAllLimits();
  3829. for (let y = map.highestY; y >= map.lowestY; y--) {
  3830. let row = document.createElement("div");
  3831. row.classList.add("mapRow");
  3832. for (let x = map.lowestX; x <= map.highestX; x++) {
  3833. let room = map.getRoom(x, y);
  3834. let roomNode = new RoomNode(room);
  3835. await roomNode.createRoomNameFloater();
  3836. let roomDiv = roomNode.getElement();
  3837. row.appendChild(roomDiv);
  3838. elements[x.toString() + ";" + y.toString()] = roomNode;
  3839. }
  3840. mapTarget.appendChild(row);
  3841. }
  3842. await updateOldMap();
  3843. }
  3844. RememberedHandler.updateMap = updateMap;
  3845. async function updateOldMap() {
  3846. let map = lastMap;
  3847. for (let y = map.highestY; y >= map.lowestY; y--) {
  3848. for (let x = map.lowestX; x <= map.highestX; x++) {
  3849. await elements[x.toString() + ";" + y.toString()].update();
  3850. }
  3851. }
  3852. }
  3853. RememberedHandler.updateOldMap = updateOldMap;
  3854. })(RememberedHandler = Elements.RememberedHandler || (Elements.RememberedHandler = {}));
  3855. })(Elements || (Elements = {}));
  3856. var Debug;
  3857. (function (Debug) {
  3858. function knowdewae() {
  3859. let map = new MapNote({
  3860. name: "De Wae",
  3861. description: "This map shows de wae all de wae to Zimbabwe."
  3862. });
  3863. map.addRoom(...Region.RegionRoom.getAnyRightType(RoomRandom));
  3864. WorldState.player.setCarried(map);
  3865. }
  3866. Debug.knowdewae = knowdewae;
  3867. function hurt(target, amount) {
  3868. let bp;
  3869. if (target instanceof Person) {
  3870. bp = target.getPart(HumanoidTorso);
  3871. if (bp == undefined)
  3872. return;
  3873. }
  3874. else if (target instanceof Bodypart) {
  3875. bp = target;
  3876. }
  3877. bp.changeSoreness(amount);
  3878. }
  3879. Debug.hurt = hurt;
  3880. function goTo(str) {
  3881. }
  3882. Debug.goTo = goTo;
  3883. })(Debug || (Debug = {}));
  3884. class AI {
  3885. constructor(options) {
  3886. this.wanderer = true;
  3887. this.wanderChance = 50;
  3888. this.picksShinies = true;
  3889. this.extraRules = [];
  3890. this.extraCombatRules = [];
  3891. for (let key in options) {
  3892. this[key] = options[key];
  3893. }
  3894. }
  3895. async execute(actor) {
  3896. let promise;
  3897. if (promise != undefined) {
  3898. promise = AI.combatRules.execute({
  3899. noun: actor
  3900. }, ...this.extraCombatRules);
  3901. }
  3902. else {
  3903. promise = AI.rules.execute({
  3904. noun: actor
  3905. }, ...this.extraRules);
  3906. }
  3907. let result = await promise;
  3908. return result;
  3909. }
  3910. addRulesBook(...books) {
  3911. this.extraRules.push(...books);
  3912. arrayUnique(this.extraRules);
  3913. }
  3914. addCombatRulesBook(...books) {
  3915. this.extraCombatRules.push(...books);
  3916. arrayUnique(this.extraCombatRules);
  3917. }
  3918. }
  3919. AI.rules = new Rulebook("Default AI Rules");
  3920. AI.combatRules = new Rulebook("Default AI Combat Rules");
  3921. var AIRules;
  3922. (function (AIRules) {
  3923. AIRules.PRIORITY_ACTING_ON_SITUATION = 5;
  3924. AIRules.PRIORITY_ACTING_ON_PLACE = 3;
  3925. AIRules.PRIORITY_ACTING_ON_IDLE = 1;
  3926. })(AIRules || (AIRules = {}));
  3927. class PersonStat {
  3928. constructor(id, description) {
  3929. this.defaultValue = 0;
  3930. this.maxValue = 10;
  3931. this.id = id;
  3932. this.description = description == undefined ? "Not defined" : description;
  3933. }
  3934. getDescription(value) {
  3935. if (typeof this.description == "string" || this.description instanceof Say) {
  3936. return this.description;
  3937. }
  3938. else {
  3939. return this.description(value);
  3940. }
  3941. }
  3942. }
  3943. class Attribute extends PersonStat {
  3944. constructor(id, description, defValue, maxValue) {
  3945. super(id, description);
  3946. this.defaultValue = 2;
  3947. this.maxValue = 5;
  3948. if (defValue != undefined) {
  3949. this.defaultValue = defValue;
  3950. }
  3951. if (maxValue != undefined) {
  3952. this.maxValue = maxValue;
  3953. }
  3954. Attribute.Attributes[id] = this;
  3955. }
  3956. static getAttributes() {
  3957. let attributes = [];
  3958. for (let key in Attribute.Attributes) {
  3959. attributes.push(Attribute.Attributes[key]);
  3960. }
  3961. return attributes;
  3962. }
  3963. static getAttribute(id) {
  3964. return Attribute.Attributes[id];
  3965. }
  3966. }
  3967. Attribute.Attributes = {};
  3968. var Attributes;
  3969. (function (Attributes) {
  3970. Attributes.Strength = new Attribute("Strength", value => {
  3971. switch (value) {
  3972. case 5: return "Hercules' Bigger Cousin";
  3973. case 4: return ("Circus Strong" + (WorldState.player.isMale() ? "man" : "woman"));
  3974. case 3: return "Beach Bully";
  3975. case 2: return ("Average " + (WorldState.player.isMale() ? "Joe" : "Jane"));
  3976. case 1: return "Wet Noodle";
  3977. default: return "Out of bounds.";
  3978. }
  3979. });
  3980. Attributes.Agility = new Attribute("Agility", value => {
  3981. switch (value) {
  3982. case 5: return "Catlike";
  3983. case 4: return "Gymnast";
  3984. case 3: return "Accurate";
  3985. case 2: return "Common";
  3986. case 1: return "Accident-prone";
  3987. default: return "Out of bounds.";
  3988. }
  3989. });
  3990. Attributes.Intelligence = new Attribute("Intelligence", value => {
  3991. switch (value) {
  3992. case 5: return "Genius";
  3993. case 4: return "Gifted";
  3994. case 3: return "Knowledgeable";
  3995. case 2: return "Normal";
  3996. case 1: return "Door";
  3997. default: return "Out of bounds.";
  3998. }
  3999. });
  4000. Attributes.Charm = new Attribute("Charm", value => {
  4001. switch (value) {
  4002. case 5: return (WorldState.player.isMale() ? "Casanova" : "Seductress");
  4003. case 4: return "Diplomat";
  4004. case 3: return ("Cheery Sales" + (WorldState.player.isMale() ? "man" : "woman"));
  4005. case 2: return "Not even trying";
  4006. case 1: return "Unpleasant";
  4007. default: return "Out of bounds.";
  4008. }
  4009. });
  4010. Attributes.Corruption = new Attribute("Corruption", value => {
  4011. return "Not defined";
  4012. }, 0, 100);
  4013. Attributes.GenderIdentity = new Attribute("Gender Identity", value => {
  4014. if (value >= 75) {
  4015. return "You strongly feel, and act, like a woman.";
  4016. }
  4017. else if (value >= 60) {
  4018. return "You feel, and act, like a woman.";
  4019. }
  4020. else if (value >= 40) {
  4021. return "You don't feel nor act like any particular gender.";
  4022. }
  4023. else if (value >= 20) {
  4024. return "You feel, and act, like a man.";
  4025. }
  4026. else {
  4027. return "You strongly feel, and act, like a man.";
  4028. }
  4029. }, 50, 100);
  4030. Attributes.Degeneration = new Attribute("Degeneration", value => {
  4031. if (value >= 75) {
  4032. return "Sex is about the only thing on your mind, and you don't even try to hide it anymore.";
  4033. }
  4034. else if (value >= 60) {
  4035. return "Sometimes you can't hide how naughty you'd like to be.";
  4036. }
  4037. else if (value >= 40) {
  4038. return "";
  4039. }
  4040. else if (value >= 20) {
  4041. return "Your composure is prudish and calm.";
  4042. }
  4043. else {
  4044. return "You have the composure of a saint.";
  4045. }
  4046. }, 30, 100);
  4047. })(Attributes || (Attributes = {}));
  4048. class Skill extends PersonStat {
  4049. constructor(id, description) {
  4050. super(id, description);
  4051. this.defaultValue = 0;
  4052. this.maxValue = 5;
  4053. Skill.Skills[id] = this;
  4054. }
  4055. static getSkills() {
  4056. let skills = [];
  4057. for (let key in Skill.Skills) {
  4058. skills.push(Skill.Skills[key]);
  4059. }
  4060. skills.sort((a, b) => {
  4061. let na = a.id.toUpperCase();
  4062. let nb = b.id.toUpperCase();
  4063. if (na > nb)
  4064. return 1;
  4065. if (na < nb)
  4066. return -1;
  4067. return 0;
  4068. });
  4069. return skills;
  4070. }
  4071. static getSkill(id) {
  4072. return Skill.Skills[id];
  4073. }
  4074. }
  4075. Skill.Skills = {};
  4076. var Skills;
  4077. (function (Skills) {
  4078. Skills.Survival = new Skill("Survival", (value) => {
  4079. switch (value) {
  4080. case 5: return "";
  4081. case 4: return "";
  4082. case 3: return "";
  4083. case 2: return "";
  4084. case 1: return "Alert Chihuahua";
  4085. }
  4086. });
  4087. })(Skills || (Skills = {}));
  4088. class Container extends Thing {
  4089. put(...things) {
  4090. }
  4091. }
  4092. class Corpse extends Container {
  4093. }
  4094. class Person extends Thing {
  4095. constructor(options) {
  4096. super(options);
  4097. this.AI = new AI({});
  4098. this.animated = true;
  4099. this.soreness = 0;
  4100. this.lastHealthUpdate = 0;
  4101. this.stamina = 10;
  4102. this.lastStaminaUpdate = 0;
  4103. this.staminaPerTurn = 1;
  4104. this.attributeValue = {};
  4105. this.skillValue = {};
  4106. this.addGetAlterations((person) => {
  4107. if (person.isPlayer()) {
  4108. return {
  4109. Stats: this.attributeValue,
  4110. Skills: this.skillValue
  4111. };
  4112. }
  4113. });
  4114. this.addSetAlterations((person, changes) => {
  4115. if (person.isPlayer()) {
  4116. if (changes.Stats != undefined) {
  4117. for (let name in changes.Stats) {
  4118. let attr = Attribute.getAttribute(name);
  4119. if (attr != undefined) {
  4120. this.setStat(attr, changes.Stats[name]);
  4121. }
  4122. }
  4123. }
  4124. if (changes.Skills != undefined) {
  4125. for (let name in changes.Skills) {
  4126. let attr = Skill.getSkill(name);
  4127. if (attr != undefined) {
  4128. this.setSkill(attr, changes.Skills[name]);
  4129. }
  4130. }
  4131. }
  4132. }
  4133. });
  4134. }
  4135. changeHealth(n) {
  4136. let bodyparts = this.getParts(Bodypart);
  4137. for (let i = 0; i < bodyparts.length; i++) {
  4138. bodyparts[i].changeSoreness(n);
  4139. }
  4140. this.updateHealth();
  4141. }
  4142. getHealthOnScale() {
  4143. return Math.round(((this.getHealth() * 10) / (this.getStat(Attributes.Strength) * 2)));
  4144. }
  4145. getHealth(important) {
  4146. if (important === true || this.lastHealthUpdate != WorldState.getCurrentTurn()) {
  4147. this.updateHealth();
  4148. }
  4149. return this.soreness / (this.getStat(Attributes.Strength) * Person.STRENGTH_SORENESS_MULTIPLIER);
  4150. }
  4151. updateHealth() {
  4152. let health = 0;
  4153. let bodyparts = this.getParts(Bodypart);
  4154. for (let i = 0; i < bodyparts.length; i++) {
  4155. health += bodyparts[i].getWeightedSoreness();
  4156. }
  4157. this.soreness = health;
  4158. this.lastHealthUpdate = WorldState.getCurrentTurn();
  4159. }
  4160. changeStamina(n) {
  4161. this.updateStamina();
  4162. this.stamina += n;
  4163. if (this.stamina > Person.MAX_STAMINA) {
  4164. this.stamina = Person.MAX_STAMINA;
  4165. }
  4166. else if (this.stamina < 0) {
  4167. this.stamina = 0;
  4168. }
  4169. }
  4170. getStaminaOnScale() {
  4171. return Math.round(((this.stamina * 10) / Person.MAX_STAMINA));
  4172. }
  4173. updateStamina() {
  4174. var nTurns = WorldState.getCurrentTurn() - this.lastStaminaUpdate;
  4175. this.stamina += this.staminaPerTurn * nTurns;
  4176. if (this.stamina > Person.MAX_STAMINA) {
  4177. this.stamina = Person.MAX_STAMINA;
  4178. }
  4179. }
  4180. isPlayer() {
  4181. return this == WorldState.player;
  4182. }
  4183. getStat(stat) {
  4184. if (this.attributeValue[stat.id] == undefined) {
  4185. this.attributeValue[stat.id] = stat.defaultValue;
  4186. }
  4187. return this.attributeValue[stat.id];
  4188. }
  4189. setStat(stat, value) {
  4190. this.attributeValue[stat.id] = value;
  4191. }
  4192. getSkill(stat) {
  4193. if (this.skillValue[stat.id] == undefined) {
  4194. this.skillValue[stat.id] = stat.defaultValue;
  4195. }
  4196. return this.skillValue[stat.id];
  4197. }
  4198. setSkill(stat, value) {
  4199. this.skillValue[stat.id] = value;
  4200. }
  4201. die() {
  4202. let corpse = new Corpse({
  4203. name: this.name + "'s corpse",
  4204. unique: false,
  4205. description: new Say("The lifeless body of ", this, ". May ", new SayHeSheIt(this), " rest in peace.")
  4206. });
  4207. corpse.put(...Thing.CarryRelation.getRight(this));
  4208. corpse.put(...Thing.WearRelation.getRight(this));
  4209. this.getRoom().place(corpse);
  4210. OutOfPlay.removeFromPlay(this);
  4211. }
  4212. }
  4213. Person.MAX_STAMINA = 10;
  4214. Person.STRENGTH_SORENESS_MULTIPLIER = 4;
  4215. var EveryTurn;
  4216. (function (EveryTurn_1) {
  4217. EveryTurn_1.EveryTurn = new Rulebook("Every Turn");
  4218. EveryTurn_1.RunAIRule = EveryTurn_1.EveryTurn.createAndAddRule({
  4219. name: "Run NPC AI Rule",
  4220. code: async function () {
  4221. function isAIAvailable(person) {
  4222. return (person != WorldState.player
  4223. && ((person.getRoom() instanceof RoomRandom
  4224. && person.getRoom().placed)));
  4225. }
  4226. let people = Thing.InsideRoomRelation.getAnyRightType(Person).filter(isAIAvailable);
  4227. for (let i = 0; i < people.length; i++) {
  4228. let action = await people[i].AI.execute(people[i]);
  4229. let person = people[i];
  4230. let visible = people[i].isVisibleTo(WorldState.player);
  4231. if (action != undefined) {
  4232. let printValue = await action.execute();
  4233. if ((visible ||
  4234. person.isVisibleTo(WorldState.player)) && printValue != undefined) {
  4235. Elements.CurrentTurnHandler.printAsContent(printValue);
  4236. }
  4237. }
  4238. }
  4239. }
  4240. });
  4241. EveryTurn_1.incrementTurnCounterRule = EveryTurn_1.EveryTurn.createAndAddRule({
  4242. firstPriority: Rule.PRIORITY_LOWEST,
  4243. priority: Rule.PRIORITY_LOWEST,
  4244. name: "Increment Turn Counter",
  4245. code: function () {
  4246. WorldState.incrementWorldTurn();
  4247. }
  4248. });
  4249. })(EveryTurn || (EveryTurn = {}));
  4250. var Direction;
  4251. (function (Direction) {
  4252. Direction[Direction["NORTH"] = 0] = "NORTH";
  4253. Direction[Direction["NORTHEAST"] = 1] = "NORTHEAST";
  4254. Direction[Direction["EAST"] = 2] = "EAST";
  4255. Direction[Direction["SOUTHEAST"] = 3] = "SOUTHEAST";
  4256. Direction[Direction["SOUTH"] = 4] = "SOUTH";
  4257. Direction[Direction["SOUTHWEST"] = 5] = "SOUTHWEST";
  4258. Direction[Direction["WEST"] = 6] = "WEST";
  4259. Direction[Direction["NORTHWEST"] = 7] = "NORTHWEST";
  4260. Direction[Direction["UP"] = 8] = "UP";
  4261. Direction[Direction["DOWN"] = 9] = "DOWN";
  4262. })(Direction || (Direction = {}));
  4263. var DirectionNames = (() => {
  4264. let names;
  4265. (function (names) {
  4266. names["NORTH"] = "North";
  4267. names["SOUTH"] = "South";
  4268. names["EAST"] = "East";
  4269. names["WEST"] = "West";
  4270. names["SOUTHEAST"] = "Southeast";
  4271. names["NORTHWEST"] = "Northwest";
  4272. names["SOUTHWEST"] = "Southwest";
  4273. names["NORTHEAST"] = "Northeast";
  4274. names["UP"] = "Down";
  4275. names["DOWN"] = "Up";
  4276. })(names || (names = {}));
  4277. ;
  4278. let obj = {};
  4279. for (let name in names) {
  4280. obj[name] = names[name];
  4281. obj[Direction[name]] = names[name];
  4282. }
  4283. return obj;
  4284. })();
  4285. var OppositeDirection = (() => {
  4286. let obj = {};
  4287. obj[Direction.NORTH] = Direction.SOUTH;
  4288. obj[Direction.SOUTH] = Direction.NORTH;
  4289. obj[Direction.EAST] = Direction.WEST;
  4290. obj[Direction.WEST] = Direction.EAST;
  4291. obj[Direction.SOUTHEAST] = Direction.NORTHWEST;
  4292. obj[Direction.NORTHWEST] = Direction.SOUTHEAST;
  4293. obj[Direction.SOUTHWEST] = Direction.NORTHEAST;
  4294. obj[Direction.NORTHEAST] = Direction.SOUTHWEST;
  4295. obj[Direction.UP] = Direction.DOWN;
  4296. obj[Direction.DOWN] = Direction.UP;
  4297. for (let i = 0; i < Object.keys(Direction).length / 2; i++) {
  4298. obj[Direction[i]] = obj[i];
  4299. }
  4300. return obj;
  4301. })();
  4302. class Room {
  4303. constructor(id, fodder) {
  4304. this.description = new Say();
  4305. this.name = id == undefined ? "Room" : id;
  4306. this.connections = new Array(Room.DIRECTIONS.length);
  4307. this.fodder = fodder;
  4308. if (fodder != true) {
  4309. Room.addRoom(this);
  4310. }
  4311. }
  4312. getName() {
  4313. return this.name;
  4314. }
  4315. place(thing) {
  4316. Thing.InsideRoomRelation.setRelation(this, thing);
  4317. }
  4318. remove(thing) {
  4319. if (Thing.InsideRoomRelation.getLeft(thing) == this) {
  4320. Thing.InsideRoomRelation.unsetRight(thing);
  4321. }
  4322. }
  4323. getContained() {
  4324. return Thing.InsideRoomRelation.getRight(this);
  4325. }
  4326. getContainedAndVisibleTo(observer) {
  4327. let contained = this.getContained();
  4328. let result = [];
  4329. contained.forEach((value) => {
  4330. if (value.visible && value !== observer) {
  4331. result.push(value);
  4332. }
  4333. });
  4334. return result;
  4335. }
  4336. getContainedAndVisible() {
  4337. return this.getContainedAndVisibleTo(WorldState.player);
  4338. }
  4339. mapRoom(r, direction) {
  4340. let oppositeDirection = OppositeDirection[direction];
  4341. if (this.connections[direction] != undefined) {
  4342. console.warn("Replacing a connected room.", this, " connected through ", direction, " to ", this.connections[direction]);
  4343. this.connections[direction].unmapRoom(oppositeDirection);
  4344. }
  4345. this.connections[direction] = r;
  4346. if (r.connections[oppositeDirection] != undefined) {
  4347. console.warn("Replacing a connected room.", r, " connected through ", oppositeDirection, " to ", r.connections[oppositeDirection]);
  4348. r.unmapRoom(oppositeDirection);
  4349. }
  4350. r.connections[oppositeDirection] = this;
  4351. }
  4352. unmapRoom(direction) {
  4353. if (this.connections[direction] != undefined) {
  4354. let r = this.connections[direction];
  4355. this.connections[direction] = undefined;
  4356. r.unmapRoom(OppositeDirection[direction]);
  4357. }
  4358. }
  4359. getPrintedName() {
  4360. return this.name;
  4361. }
  4362. getConnectedRooms() {
  4363. let rooms = [];
  4364. this.connections.forEach(room => {
  4365. if (room != undefined) {
  4366. rooms.push(room);
  4367. }
  4368. });
  4369. return rooms;
  4370. }
  4371. bestDirectionTo(room, validityCode) {
  4372. if (validityCode == undefined)
  4373. validityCode = () => { return true; };
  4374. let maxSteps = 10;
  4375. maxSteps = maxSteps > WorldState.getMaximumRememberedRooms() ? maxSteps : WorldState.getMaximumRememberedRooms();
  4376. let recursiveBestPath = (cPath, cRoom, destination) => {
  4377. if (!validityCode(cRoom)) {
  4378. return;
  4379. }
  4380. if (cRoom == destination) {
  4381. maxSteps = maxSteps > cPath.length ? cPath.length : maxSteps;
  4382. return cPath;
  4383. }
  4384. else if (cPath.length > maxSteps) {
  4385. return undefined;
  4386. }
  4387. else {
  4388. let paths = [];
  4389. for (let index in Room.DIRECTIONS) {
  4390. let direction = Room.DIRECTIONS[index];
  4391. let nextRoom = cRoom.connections[direction];
  4392. if (nextRoom != undefined && cPath.indexOf(nextRoom) == -1 && validityCode(nextRoom)) {
  4393. let path = recursiveBestPath(cPath.concat([nextRoom]), nextRoom, destination);
  4394. if (path != undefined) {
  4395. paths.push(path);
  4396. }
  4397. }
  4398. }
  4399. let shortestIndex = 0;
  4400. paths.forEach((value, index, array) => {
  4401. if (value.length < paths[shortestIndex].length) {
  4402. shortestIndex = index;
  4403. }
  4404. });
  4405. return paths[shortestIndex];
  4406. }
  4407. };
  4408. let paths = Array(Room.DIRECTIONS.length);
  4409. let shortestIndex;
  4410. for (let index in Room.DIRECTIONS) {
  4411. let direction = Room.DIRECTIONS[index];
  4412. let nextRoom = this.connections[direction];
  4413. if (nextRoom != undefined) {
  4414. paths[direction] = recursiveBestPath([this, nextRoom], nextRoom, room);
  4415. if (paths[direction] != undefined && (shortestIndex == undefined || paths[shortestIndex].length > paths[direction].length)) {
  4416. shortestIndex = direction;
  4417. }
  4418. }
  4419. }
  4420. return shortestIndex;
  4421. }
  4422. static getDirectionXYZ(direction) {
  4423. var y = 0;
  4424. if ([Direction.NORTH, Direction.NORTHEAST, Direction.NORTHWEST].indexOf(direction) != -1) {
  4425. y = 1;
  4426. }
  4427. else if ([Direction.SOUTH, Direction.SOUTHEAST, Direction.SOUTHWEST].indexOf(direction) != -1) {
  4428. y = -1;
  4429. }
  4430. var x = 0;
  4431. if ([Direction.EAST, Direction.SOUTHEAST, Direction.NORTHEAST].indexOf(direction) != -1) {
  4432. x = 1;
  4433. }
  4434. else if ([Direction.WEST, Direction.SOUTHWEST, Direction.NORTHWEST].indexOf(direction) != -1) {
  4435. x = -1;
  4436. }
  4437. var z = direction == Direction.UP ? 1 :
  4438. direction == Direction.DOWN ? -1 :
  4439. 0;
  4440. return [x, y, z];
  4441. }
  4442. static shift(coordinates, direction) {
  4443. let coordinatesVector = Room.getDirectionXYZ(direction);
  4444. coordinates.forEach((value, index, array) => {
  4445. coordinatesVector[index] += coordinates[index];
  4446. });
  4447. return coordinatesVector;
  4448. }
  4449. static addRoom(room) {
  4450. Room.rooms[room.name] = room;
  4451. }
  4452. static getRooms() {
  4453. let rooms = [];
  4454. for (let name in Room.rooms) {
  4455. rooms.push(Room.rooms[name]);
  4456. }
  4457. return rooms;
  4458. }
  4459. static getRoom(id) {
  4460. return Room.rooms[id];
  4461. }
  4462. }
  4463. Room.DIRECTIONS = (() => {
  4464. let directions = [];
  4465. for (let i = 0; i < Object.keys(Direction).length / 2; i++) {
  4466. directions.push(i);
  4467. }
  4468. return directions;
  4469. })();
  4470. Room.rooms = {};
  4471. var OutOfPlay;
  4472. (function (OutOfPlay) {
  4473. OutOfPlay.Heaven = new Room("__Heaven__RIP__");
  4474. function removeFromPlay(thing) {
  4475. OutOfPlay.Heaven.place(thing);
  4476. }
  4477. OutOfPlay.removeFromPlay = removeFromPlay;
  4478. })(OutOfPlay || (OutOfPlay = {}));
  4479. var PlayBegins;
  4480. (function (PlayBegins) {
  4481. PlayBegins.rulebook = new Rulebook("Play Begins");
  4482. PlayBegins.LOAD_FAILED = false;
  4483. let startingRoom;
  4484. function execute() {
  4485. PlayBegins.rulebook.execute({});
  4486. }
  4487. PlayBegins.execute = execute;
  4488. function setStartingRoom(room) {
  4489. if (startingRoom != undefined) {
  4490. console.warn("[InitialRoom] Multiple requests for starting room, please check.", startingRoom, room);
  4491. }
  4492. startingRoom = room;
  4493. }
  4494. PlayBegins.setStartingRoom = setStartingRoom;
  4495. PlayBegins.PutPlayerIntoFirstRoom = PlayBegins.rulebook.createAndAddRule({
  4496. name: "Place player into initial room",
  4497. firstPriority: Rule.PRIORITY_HIGHEST,
  4498. priority: Rule.PRIORITY_MEDIUM,
  4499. code: () => {
  4500. if (WorldState.player.getRoom() != undefined) {
  4501. console.debug(Rulebook.getIndentation() + "[InitialRoom] Player already in a room.", WorldState.player.getRoom());
  4502. }
  4503. else {
  4504. startingRoom.place(WorldState.player);
  4505. }
  4506. }
  4507. });
  4508. PlayBegins.RunEmptyTurnSequenceRule = new Rule({
  4509. name: "Run Empty Turn Sequence Rule",
  4510. firstPriority: Rule.PRIORITY_LOWEST,
  4511. priority: Rule.PRIORITY_LOWEST,
  4512. code: (rulebook2) => {
  4513. TurnSequence.execute();
  4514. }
  4515. });
  4516. PlayBegins.rulebook.addRule(PlayBegins.RunEmptyTurnSequenceRule);
  4517. })(PlayBegins || (PlayBegins = {}));
  4518. var MachineBegins;
  4519. (function (MachineBegins) {
  4520. MachineBegins.RunPlayBegins = MachineBegins.rulebook.createAndAddRule({
  4521. firstPriority: Rule.PRIORITY_LOW,
  4522. name: "Run Play Begins",
  4523. code: () => {
  4524. PlayBegins.execute();
  4525. }
  4526. });
  4527. })(MachineBegins || (MachineBegins = {}));
  4528. var Tests;
  4529. (function (Tests) {
  4530. Tests.MIN_DICE = 0;
  4531. Tests.MAX_DICE = 3;
  4532. function rollDice() {
  4533. return Math.floor(Math.random() * (Tests.MAX_DICE - Tests.MIN_DICE)) + 1 + Tests.MIN_DICE;
  4534. }
  4535. Tests.rollDice = rollDice;
  4536. function test(attr, difficulty) {
  4537. return (attr + rollDice()) >= difficulty;
  4538. }
  4539. Tests.test = test;
  4540. })(Tests || (Tests = {}));
  4541. class MapNote extends Thing {
  4542. constructor() {
  4543. super(...arguments);
  4544. this.rooms = [];
  4545. this.regions = [];
  4546. }
  4547. addRoom(...rooms) {
  4548. rooms.forEach((room) => {
  4549. this.rooms.push(room);
  4550. });
  4551. }
  4552. addRegion(...regions) {
  4553. regions.forEach(region => {
  4554. this.regions.push(region);
  4555. });
  4556. }
  4557. contains(room) {
  4558. if (this.rooms.indexOf(room) != -1) {
  4559. return true;
  4560. }
  4561. else {
  4562. for (var i = 0; i < this.regions.length; i++) {
  4563. if (this.regions[i].getRooms().indexOf(room) != -1) {
  4564. return true;
  4565. }
  4566. }
  4567. }
  4568. }
  4569. }
  4570. class Bodypart extends Thing {
  4571. constructor(options) {
  4572. super(options);
  4573. this.sorenessWeight = 1;
  4574. this.soreness = 0;
  4575. this.sorenessPerTurn = 0.05;
  4576. this.lastSorenessUpdate = 0;
  4577. this.slots = [];
  4578. this.visibleSlots = [];
  4579. this.genderValue = Bodypart.GENDER_MEDIUM_ANDROGYNE;
  4580. this.genderWeight = 1;
  4581. this.sluttiness = 10;
  4582. this.sluttinessWeight = Bodypart.WEIGHT_LOWEST;
  4583. this.addGetAlterations((bp) => {
  4584. return {
  4585. Soreness: bp.soreness,
  4586. GenderValue: bp.genderValue,
  4587. Sluttiness: bp.getSluttiness()
  4588. };
  4589. });
  4590. this.addSetAlterations((bp, changes) => {
  4591. this.soreness = changes.Soreness;
  4592. this.genderValue = changes.GenderValue;
  4593. this.sluttiness = changes.Sluttiness;
  4594. });
  4595. }
  4596. updateSoreness() {
  4597. let cTurn = WorldState.getCurrentTurn();
  4598. if (cTurn > this.lastSorenessUpdate) {
  4599. if (this.soreness > 0) {
  4600. this.soreness -= (this.sorenessPerTurn * (cTurn - this.lastSorenessUpdate));
  4601. if (this.soreness < 0) {
  4602. this.soreness = 0;
  4603. }
  4604. }
  4605. this.lastSorenessUpdate = cTurn;
  4606. }
  4607. }
  4608. changeSoreness(soreness) {
  4609. this.updateSoreness();
  4610. this.soreness += soreness;
  4611. if (this.soreness < 0) {
  4612. this.soreness = 0;
  4613. }
  4614. }
  4615. getSoreness() {
  4616. this.updateSoreness();
  4617. return this.soreness;
  4618. }
  4619. getWeightedSoreness() {
  4620. return this.getSoreness() * this.sorenessWeight;
  4621. }
  4622. getSorenessWeight() {
  4623. return this.sorenessWeight;
  4624. }
  4625. getGenderWeight() {
  4626. if (this.slots.length == 0) {
  4627. return 0;
  4628. }
  4629. return this.genderWeight * (this.visibleSlots.length / this.slots.length);
  4630. }
  4631. getGenderValue() {
  4632. return this.genderValue;
  4633. }
  4634. getWeightedGenderValue() {
  4635. return this.getGenderValue() * this.getGenderWeight();
  4636. }
  4637. getSluttiness() {
  4638. return this.sluttiness;
  4639. }
  4640. getSluttinessWeight() {
  4641. if (this.slots.length == 0) {
  4642. return 0;
  4643. }
  4644. return this.sluttinessWeight * (this.visibleSlots.length / this.slots.length);
  4645. }
  4646. getWeightedSluttinessValue() {
  4647. return this.getSluttiness() * this.getSluttinessWeight();
  4648. }
  4649. updateVisibility() {
  4650. this.visibleSlots = this.slots.slice(0);
  4651. let parent = Thing.PartRelation.getLeft(this);
  4652. if (parent != undefined) {
  4653. let clothing = Thing.WearRelation.getRight(parent);
  4654. for (let i = 0; i < clothing.length; i++) {
  4655. let covering = clothing[i].getCoveringSlots();
  4656. for (let k = 0; k < covering.length; k++) {
  4657. let idx = this.visibleSlots.indexOf(covering[k]);
  4658. if (idx >= 0) {
  4659. this.visibleSlots.splice(idx, 1);
  4660. }
  4661. }
  4662. if (this.visibleSlots.length == 0)
  4663. break;
  4664. }
  4665. }
  4666. }
  4667. isUncovered() {
  4668. this.updateVisibility();
  4669. return this.visibleSlots.length == this.slots.length && this.slots.length > 0;
  4670. }
  4671. updateStatus() {
  4672. this.updateVisibility();
  4673. }
  4674. static getSoreness(thing) {
  4675. let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart);
  4676. let soreness = 0;
  4677. bodyparts.forEach((bodypart) => {
  4678. soreness += bodypart.getWeightedSoreness();
  4679. });
  4680. return soreness;
  4681. }
  4682. static getGenderValueOn(thing) {
  4683. let weight = 0;
  4684. let value = 0;
  4685. let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart);
  4686. bodyparts.forEach((bodypart) => {
  4687. weight += bodypart.getGenderWeight();
  4688. value += bodypart.getWeightedGenderValue();
  4689. });
  4690. return {
  4691. weight: weight,
  4692. value: value
  4693. };
  4694. }
  4695. static getSluttinessValueOn(thing) {
  4696. let weight = 0;
  4697. let value = 0;
  4698. let bodyparts = Thing.PartRelation.getRightType(thing, Bodypart);
  4699. bodyparts.forEach((bodypart) => {
  4700. weight += bodypart.getSluttinessWeight();
  4701. value += bodypart.getWeightedSluttinessValue();
  4702. });
  4703. return {
  4704. weight: weight,
  4705. value: value
  4706. };
  4707. }
  4708. arrangeGenderValue(genderValue) {
  4709. this.genderValue = genderValue;
  4710. this.getPartOne().invalidateCaches();
  4711. }
  4712. increaseFemininity(amount) {
  4713. let currentGV = this.getGenderValue();
  4714. this.arrangeGenderValue(currentGV + (5 * amount));
  4715. }
  4716. increaseMasculinity(amount) {
  4717. let currentGV = this.getGenderValue();
  4718. this.arrangeGenderValue(currentGV - (5 * amount));
  4719. }
  4720. }
  4721. Bodypart.WEIGHT_LOWEST = 1;
  4722. Bodypart.WEIGHT_LOW = 3;
  4723. Bodypart.WEIGHT_MEDIUM = 5;
  4724. Bodypart.WEIGHT_HIGH = 7;
  4725. Bodypart.WEIGHT_HIGHEST = 9;
  4726. Bodypart.SLUTTINESS_LOWEST_SAINTLY = 0;
  4727. Bodypart.SLUTTINESS_LOW_PRUDE = 25;
  4728. Bodypart.SLUTTINESS_MEDIUM_AVERAGE = 50;
  4729. Bodypart.SLUTTINESS_HIGH_SLUT = 75;
  4730. Bodypart.SLUTTINESS_HIGHEST_WHORE = 100;
  4731. Bodypart.GENDER_LOWEST_MANLIEST = 0;
  4732. Bodypart.GENDER_LOW_MANLY = 25;
  4733. Bodypart.GENDER_MEDIUM_ANDROGYNE = 50;
  4734. Bodypart.GENDER_HIGH_FEMININE = 75;
  4735. Bodypart.GENDER_HIGHEST_FEMININEST = 100;
  4736. class SexStick extends Bodypart {
  4737. getWide() {
  4738. return new Measure();
  4739. }
  4740. getLong() {
  4741. return new Measure();
  4742. }
  4743. }
  4744. class SexHole extends Bodypart {
  4745. }
  4746. class Measure {
  4747. constructor(...sides) {
  4748. this.superscript = ["", "", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹"];
  4749. this.units = 1;
  4750. sides.forEach((side) => {
  4751. this.units *= side;
  4752. });
  4753. this.sides = sides.length;
  4754. }
  4755. getText() {
  4756. let meters = Math.pow(this.sides, 100);
  4757. if (this.units > meters) {
  4758. return (+(this.units / meters).toFixed(2)).toString() + "m" + this.superscript[this.sides];
  4759. }
  4760. else {
  4761. return this.units.toString() + "cm" + this.superscript[this.sides];
  4762. }
  4763. }
  4764. getNumber() {
  4765. return this.units;
  4766. }
  4767. getSides() {
  4768. return this.sides;
  4769. }
  4770. static fromInches(inches) {
  4771. return inches * 2.54;
  4772. }
  4773. static fromFeet(feet) {
  4774. return feet * 30.48;
  4775. }
  4776. }
  4777. class MeasureLiquid {
  4778. constructor(milliliters) {
  4779. this.units = milliliters;
  4780. }
  4781. getText() {
  4782. if (this.units > 1000) {
  4783. return (+(this.units / 1000).toFixed(2)).toString() + "L";
  4784. }
  4785. else {
  4786. return this.units.toString() + "mL";
  4787. }
  4788. }
  4789. static fromLiters(liters) {
  4790. return liters * 1000;
  4791. }
  4792. }
  4793. class HumanoidArms extends Bodypart {
  4794. constructor() {
  4795. super(...arguments);
  4796. this.sorenessWeight = Bodypart.WEIGHT_LOW;
  4797. this.genderWeight = Bodypart.WEIGHT_MEDIUM;
  4798. this.slots = [Humanoid.SLOT_ARMS];
  4799. }
  4800. get sluttinessWeight() {
  4801. if (this.getPartOne().isMale()) {
  4802. return Bodypart.WEIGHT_HIGHEST;
  4803. }
  4804. else {
  4805. return Bodypart.WEIGHT_MEDIUM;
  4806. }
  4807. }
  4808. set sluttinessWeight(val) { }
  4809. getSluttiness() {
  4810. if (this.getPartOne().isMale()) {
  4811. return this.getGenderValue();
  4812. }
  4813. else {
  4814. return 100 - this.getGenderValue();
  4815. }
  4816. }
  4817. getDescription() {
  4818. let humanoid = this.getPartOne();
  4819. let str = humanoid.getStat(Attributes.Strength);
  4820. if (str > 4) {
  4821. return "Your arms and legs are ridiculously huge, showing off just how strong you are.";
  4822. }
  4823. else if (str > 2) {
  4824. return "Your arms and legs are pretty big because of your muscles.";
  4825. }
  4826. else if (str == 2) {
  4827. return "";
  4828. }
  4829. else {
  4830. return "You look like you don't even lift.";
  4831. }
  4832. }
  4833. getGenderValue() {
  4834. let humanoid = this.getPartOne();
  4835. let str = humanoid.getStat(Attributes.Strength);
  4836. return 20 * str;
  4837. }
  4838. }
  4839. class HumanoidBreasts extends Bodypart {
  4840. constructor(options) {
  4841. super(options);
  4842. this.size = 0;
  4843. this.silicone = 0;
  4844. this.milk = 0;
  4845. this.sorenessWeight = Bodypart.WEIGHT_MEDIUM;
  4846. this.genderWeight = Bodypart.WEIGHT_HIGH;
  4847. this.slots = [Humanoid.SLOT_BREASTS];
  4848. this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT;
  4849. this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  4850. this.addGetAlterations((thing) => {
  4851. return {
  4852. Size: this.size,
  4853. Silicone: this.silicone,
  4854. Milk: this.milk
  4855. };
  4856. });
  4857. this.addSetAlterations((thing, changes) => {
  4858. this.size = changes.Size;
  4859. this.silicone = changes.Silicone;
  4860. this.milk = changes.Milk;
  4861. });
  4862. }
  4863. getSize() {
  4864. return this.size + this.silicone + this.milk;
  4865. }
  4866. getSizeText() {
  4867. return HumanoidBreasts.getSizeText(this.getSize());
  4868. }
  4869. static getSizeText(size) {
  4870. let names = ["flat", "AA-cup", "A-cup", "B-cup", "C-cup", "D-cup", "E-cup", "F-cup", "G-cup", "H-cup"];
  4871. if (size >= names.length) {
  4872. return "HUGE";
  4873. }
  4874. else {
  4875. return names[size];
  4876. }
  4877. }
  4878. getGenderValue() {
  4879. return HumanoidBreasts.getGenderFromSize(this.getSize());
  4880. }
  4881. getSluttiness() {
  4882. return this.getGenderValue();
  4883. }
  4884. static getGenderFromSize(size) {
  4885. if (size <= 0) {
  4886. return 20;
  4887. }
  4888. else if (size <= 3) {
  4889. return 20 * size;
  4890. }
  4891. else {
  4892. return 80;
  4893. }
  4894. }
  4895. arrangeGenderValue(gv) {
  4896. if (gv <= 20) {
  4897. this.size = 0;
  4898. this.silicone = 0;
  4899. this.milk = 0;
  4900. }
  4901. else if (gv < 80) {
  4902. this.size = Math.round(gv / 20);
  4903. }
  4904. else {
  4905. this.size = 4;
  4906. }
  4907. }
  4908. }
  4909. class HumanoidButt extends Bodypart {
  4910. constructor(options) {
  4911. super(options);
  4912. this.size = 0;
  4913. this.silicone = 0;
  4914. this.sorenessWeight = Bodypart.WEIGHT_MEDIUM;
  4915. this.genderWeight = Bodypart.WEIGHT_MEDIUM;
  4916. this.slots = [Humanoid.SLOT_BUTT];
  4917. this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT;
  4918. this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  4919. this.addGetAlterations((thing) => {
  4920. return {
  4921. Size: this.size,
  4922. Silicone: this.silicone
  4923. };
  4924. });
  4925. this.addSetAlterations((thing, changes) => {
  4926. this.size = changes.Size;
  4927. this.silicone = changes.Silicone;
  4928. });
  4929. }
  4930. getSluttiness() {
  4931. return this.getSize() * 33;
  4932. }
  4933. getSize() {
  4934. return this.size + this.silicone;
  4935. }
  4936. getSizeText() {
  4937. return HumanoidButt.getSizeText(this.getSize());
  4938. }
  4939. static getSizeText(size) {
  4940. let names = ["flat", "tiny", "round", "plump"];
  4941. if (size >= names.length) {
  4942. return "gargantuan";
  4943. }
  4944. else {
  4945. return names[size];
  4946. }
  4947. }
  4948. getGenderValue() {
  4949. return HumanoidBreasts.getGenderFromSize(this.getSize());
  4950. }
  4951. static getGenderFromSize(size) {
  4952. if (size <= 0) {
  4953. return 20;
  4954. }
  4955. else if (size <= 2) {
  4956. return 30 * size;
  4957. }
  4958. else {
  4959. return 80;
  4960. }
  4961. }
  4962. arrangeGenderValue(gv) {
  4963. if (gv <= 20) {
  4964. this.size = 0;
  4965. }
  4966. else if (gv <= 60) {
  4967. this.size = 1;
  4968. }
  4969. else {
  4970. this.size = 3;
  4971. }
  4972. }
  4973. }
  4974. class HumanoidExtremity extends Bodypart {
  4975. constructor(options) {
  4976. super(options);
  4977. this.nailsPainted = false;
  4978. this.nailColor = 0;
  4979. this.addGetAlterations((thing) => {
  4980. return {
  4981. Painted: this.nailsPainted,
  4982. Color: this.nailColor
  4983. };
  4984. });
  4985. this.addSetAlterations((thing, changes) => {
  4986. this.nailsPainted = changes.Painted;
  4987. this.nailColor = changes.Color;
  4988. });
  4989. }
  4990. static getColor(index) {
  4991. return HumanoidExtremity.nailColorNames[index];
  4992. }
  4993. getSluttiness() {
  4994. return this.getGenderValue();
  4995. }
  4996. getGenderValue() {
  4997. let nailPaintedCorrection = this.nailColor * 50;
  4998. let nailPaintedCorrectionWeight = this.nailsPainted ? 3 : 0;
  4999. let gv = this.genderValue;
  5000. let gw = this.genderWeight;
  5001. return ((gv * gw) + (nailPaintedCorrection * nailPaintedCorrectionWeight)) / (gw + nailPaintedCorrectionWeight);
  5002. }
  5003. arrangeGenderValue(gv) {
  5004. this.genderValue = gv;
  5005. this.nailsPainted = gv > 60;
  5006. if (this.nailsPainted) {
  5007. if (gv > 70) {
  5008. this.nailColor = 2;
  5009. }
  5010. else {
  5011. this.nailColor = 1;
  5012. }
  5013. }
  5014. this.getPartOne().invalidateCaches();
  5015. }
  5016. }
  5017. HumanoidExtremity.nailColorNames = ['none', 'red', 'pink'];
  5018. class HumanoidFeet extends HumanoidExtremity {
  5019. constructor() {
  5020. super(...arguments);
  5021. this.sorenessWeight = Bodypart.WEIGHT_LOW;
  5022. this.genderWeight = Bodypart.WEIGHT_LOW;
  5023. this.slots = [Humanoid.SLOT_FEET];
  5024. }
  5025. getDescription() {
  5026. let say = new Say();
  5027. if (this.genderValue > 55) {
  5028. say.add("Your feet are small and cute.");
  5029. }
  5030. else if (this.genderValue < 45) {
  5031. say.add("Your feet are big and mannish.");
  5032. }
  5033. if (this.nailsPainted) {
  5034. say.add(" Your toenails are painted " + HumanoidExtremity.getColor(this.nailColor) + ".");
  5035. }
  5036. return say;
  5037. }
  5038. }
  5039. class HumanoidHands extends HumanoidExtremity {
  5040. constructor() {
  5041. super(...arguments);
  5042. this.sorenessWeight = Bodypart.WEIGHT_LOW;
  5043. this.genderWeight = Bodypart.WEIGHT_MEDIUM;
  5044. this.slots = [Humanoid.SLOT_HANDS];
  5045. }
  5046. getDescription() {
  5047. let say = new Say();
  5048. if (this.genderValue > 55) {
  5049. say.add("Your hands are delicate and slender.");
  5050. }
  5051. else if (this.genderValue < 45) {
  5052. say.add("Your hands are rough and large.");
  5053. }
  5054. if (this.nailsPainted) {
  5055. say.add(" Your toenails are painted " + HumanoidExtremity.getColor(this.nailColor) + ".");
  5056. }
  5057. return say;
  5058. }
  5059. }
  5060. class HumanoidHead extends Bodypart {
  5061. constructor() {
  5062. super(...arguments);
  5063. this.sorenessWeight = Bodypart.WEIGHT_MEDIUM;
  5064. this.genderWeight = Bodypart.WEIGHT_LOW;
  5065. this.slots = [Humanoid.SLOT_HEADGEAR, Humanoid.SLOT_HAIR, Humanoid.SLOT_EARS, Humanoid.SLOT_FACE, Humanoid.SLOT_EYES, , Humanoid.SLOT_NOSE, Humanoid.SLOT_MOUTH];
  5066. }
  5067. }
  5068. class HumanoidPenis extends SexStick {
  5069. constructor(options) {
  5070. super(options);
  5071. this.sorenessWeight = Bodypart.WEIGHT_HIGH;
  5072. this.genderValue = 25;
  5073. this.genderWeight = Bodypart.WEIGHT_HIGHEST;
  5074. this.slots = [Humanoid.SLOT_CROTCH_FRONT];
  5075. this.sluttiness = Bodypart.SLUTTINESS_HIGH_SLUT;
  5076. this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  5077. this.flaccidSize = new Measure(6);
  5078. this.flaccidWidth = new Measure(3);
  5079. this.erectSize = new Measure(15);
  5080. this.erectWidth = new Measure(6);
  5081. this.arousalMinimum = 5;
  5082. this.arousalErect = 25;
  5083. if (Math.random() >= 0.5) {
  5084. this.flaccidMult = 0.33;
  5085. }
  5086. else {
  5087. this.flaccidMult = 0.77;
  5088. }
  5089. this.addGetAlterations((thing) => {
  5090. return {
  5091. FSize: this.flaccidSize.getNumber(),
  5092. FWidth: this.flaccidWidth.getNumber(),
  5093. ESize: this.erectSize.getNumber(),
  5094. EWidth: this.erectWidth.getNumber(),
  5095. AMin: this.arousalMinimum,
  5096. AErect: this.arousalErect,
  5097. FMult: this.flaccidMult
  5098. };
  5099. });
  5100. this.addSetAlterations((thing, changes) => {
  5101. this.flaccidSize = new Measure(changes.FSize);
  5102. this.flaccidWidth = new Measure(changes.FWidth);
  5103. this.erectSize = new Measure(changes.ESize);
  5104. this.erectWidth = new Measure(changes.EWidth);
  5105. this.arousalMinimum = changes.AMin;
  5106. this.arousalErect = changes.AErect;
  5107. this.flaccidMult = changes.FMult;
  5108. });
  5109. }
  5110. getSluttiness() {
  5111. return this.getBulgeSize() * 3;
  5112. }
  5113. isGrower() {
  5114. return this.flaccidMult < 0.5;
  5115. }
  5116. getActualSize() {
  5117. let min = this.flaccidSize.getNumber();
  5118. let max = this.erectSize.getNumber();
  5119. let variableSize = (max - min);
  5120. let finalSize = min + (variableSize * this.getArousalPerc());
  5121. return finalSize;
  5122. }
  5123. isBig() {
  5124. return this.getBulgeSize() > 22;
  5125. }
  5126. getArousalPerc() {
  5127. let arousal = 0;
  5128. let numSteps = this.arousalErect - this.arousalMinimum;
  5129. let arousalPerc = (arousal - this.arousalMinimum) / numSteps;
  5130. arousalPerc = arousalPerc < 0 ? 0 :
  5131. arousalPerc > 1 ? 1 :
  5132. arousalPerc;
  5133. return arousalPerc;
  5134. }
  5135. isFlaccid() {
  5136. return this.getArousalPerc() < 0.6;
  5137. }
  5138. isErect() {
  5139. return !this.isFlaccid();
  5140. }
  5141. getActualWidth() {
  5142. let min = this.flaccidWidth.getNumber();
  5143. let max = this.erectWidth.getNumber();
  5144. let variableSize = (max - min);
  5145. let numSteps = this.arousalErect - this.arousalMinimum;
  5146. let arousal = 0;
  5147. let arousalPerc = (arousal - this.arousalMinimum) / numSteps;
  5148. arousalPerc = arousalPerc < 0 ? 0 :
  5149. arousalPerc > 1 ? 1 :
  5150. arousalPerc;
  5151. let finalSize = min + (variableSize * arousalPerc);
  5152. return finalSize;
  5153. }
  5154. getLong() {
  5155. return new Measure(this.getActualSize());
  5156. }
  5157. getWide() {
  5158. return new Measure(this.getActualWidth());
  5159. }
  5160. getBulgeSize() {
  5161. return this.getActualSize() + (3 * this.getActualWidth());
  5162. }
  5163. getSizeText() {
  5164. return HumanoidPenis.getSizeText(this.getBulgeSize());
  5165. }
  5166. static getSizeText(size) {
  5167. let sizeTable = [
  5168. [0, "nonexistent"],
  5169. [1, "tiny"],
  5170. [20, "small"],
  5171. [23, "medium"],
  5172. [27, "big"],
  5173. [32, "huge"],
  5174. [36, "monstrous"]
  5175. ];
  5176. let i;
  5177. for (i = 1; i < sizeTable.length && sizeTable[i][0] < size; i++) { }
  5178. return sizeTable[i - 1][1];
  5179. }
  5180. getGenderValue() {
  5181. let sizeTable = [
  5182. [10, 60],
  5183. [20, 45],
  5184. [23, 35],
  5185. [27, 28],
  5186. [32, 24],
  5187. [36, 18]
  5188. ];
  5189. let i;
  5190. for (i = 1; i < sizeTable.length && sizeTable[i][0] < this.getActualSize(); i++) { }
  5191. return sizeTable[i - 1][1];
  5192. }
  5193. arrangeGenderValue(gv) {
  5194. let sizeTable = [
  5195. [60, 3, 2],
  5196. [45, 10, 3],
  5197. [35, 14, 3],
  5198. [28, 17, 3],
  5199. [24, 19, 4],
  5200. [18, 22, 4.5]
  5201. ];
  5202. let i;
  5203. for (i = 1; i < sizeTable.length && sizeTable[i][0] > gv; i++) { }
  5204. this.flaccidSize = new Measure(this.flaccidMult * sizeTable[i - 1][1]);
  5205. this.flaccidWidth = new Measure(this.flaccidMult * sizeTable[i - 1][2]);
  5206. this.erectSize = new Measure(sizeTable[i - 1][1]);
  5207. this.erectWidth = new Measure(sizeTable[i - 1][2]);
  5208. this.getPartOne().invalidateCaches();
  5209. }
  5210. static getSynonym() {
  5211. let cockNames = [
  5212. "cock",
  5213. "dick"
  5214. ];
  5215. return (new OneOf(OneOf.PURELY_AT_RANDOM, ...cockNames).getOne());
  5216. }
  5217. }
  5218. class HumanoidSkin extends Bodypart {
  5219. constructor(options) {
  5220. super(options);
  5221. this.sorenessWeight = 0;
  5222. this.genderWeight = Bodypart.WEIGHT_MEDIUM;
  5223. this.slots = [
  5224. Humanoid.SLOT_FACE, Humanoid.SLOT_NECK, Humanoid.SLOT_SHOULDERS,
  5225. Humanoid.SLOT_ARMS, Humanoid.SLOT_HANDS, Humanoid.SLOT_UPPER_CHEST,
  5226. Humanoid.SLOT_MIDRIFF, Humanoid.SLOT_WAIST, Humanoid.SLOT_BACK,
  5227. Humanoid.SLOT_HIPS, Humanoid.SLOT_BUTT, Humanoid.SLOT_LEG_UPPER,
  5228. Humanoid.SLOT_LEG_LOWER
  5229. ];
  5230. this.skinSoftness = 5;
  5231. this.skinHairiness = 2;
  5232. this.addGetAlterations((thing) => {
  5233. return {
  5234. Softness: this.skinSoftness,
  5235. Hairiness: this.skinHairiness
  5236. };
  5237. });
  5238. this.addSetAlterations((thing, changes) => {
  5239. this.skinSoftness = changes.Softness;
  5240. this.skinHairiness = changes.Hairiness;
  5241. });
  5242. }
  5243. getSluttiness() {
  5244. return this.getGenderValue();
  5245. }
  5246. getDescription() {
  5247. let owner = this.getPartOne();
  5248. let green = (owner.getStat(Attributes.Corruption) > 50);
  5249. let say = new Say("Your skin is ");
  5250. if (this.skinSoftness > 7) {
  5251. say.add("perfectly smooth");
  5252. }
  5253. else if (this.skinSoftness > 4) {
  5254. say.add("smooth");
  5255. }
  5256. else {
  5257. say.add("rough");
  5258. }
  5259. say.add(" and ");
  5260. if (this.skinHairiness > 8) {
  5261. say.add("hairy, like a gorilla's");
  5262. }
  5263. else if (this.skinHairiness > 6) {
  5264. say.add("hairy");
  5265. }
  5266. else if (this.skinHairiness > 3) {
  5267. say.add("somewhat hairless");
  5268. }
  5269. else {
  5270. say.add("completely hairless");
  5271. }
  5272. say.add(".");
  5273. if (green) {
  5274. say.add(" The taint of your corruption has turned your skin green, like an orc's.");
  5275. }
  5276. return say;
  5277. }
  5278. getGenderValue() {
  5279. let softnessRank = this.skinSoftness * 100;
  5280. let hairinessRank = 1000 - (this.skinHairiness * 100);
  5281. return (softnessRank + hairinessRank) / 20;
  5282. }
  5283. arrangeGenderValue(genderValue) {
  5284. let ideal = genderValue / 10;
  5285. this.skinHairiness = 10 - Math.round(ideal);
  5286. this.skinSoftness = Math.round(ideal);
  5287. this.getPartOne().invalidateCaches();
  5288. }
  5289. }
  5290. class HumanoidTesticles extends Bodypart {
  5291. constructor(options) {
  5292. super(options);
  5293. this.size = 1;
  5294. this.sorenessWeight = Bodypart.WEIGHT_HIGH;
  5295. this.genderWeight = Bodypart.WEIGHT_HIGHEST;
  5296. this.slots = [Humanoid.SLOT_CROTCH_FRONT];
  5297. this.sluttiness = Bodypart.SLUTTINESS_MEDIUM_AVERAGE;
  5298. this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  5299. this.addGetAlterations((thing) => {
  5300. return {
  5301. Size: this.size
  5302. };
  5303. });
  5304. this.addSetAlterations((thing, changes) => {
  5305. this.size = changes.Size;
  5306. });
  5307. }
  5308. getBulgeSize() {
  5309. return this.size;
  5310. }
  5311. getGenderWeight() {
  5312. return 80;
  5313. }
  5314. }
  5315. class HumanoidVagina extends SexHole {
  5316. constructor() {
  5317. super(...arguments);
  5318. this.genderValue = 85;
  5319. this.genderWeight = Bodypart.WEIGHT_HIGHEST;
  5320. this.slots = [Humanoid.SLOT_CROTCH_FRONT];
  5321. this.sluttiness = 50;
  5322. this.sluttinessWeight = Bodypart.WEIGHT_MEDIUM;
  5323. }
  5324. getSluttiness() {
  5325. let slut = 100 - this.genderValue;
  5326. let obscenelyOpen = false;
  5327. slut += obscenelyOpen ? 25 : 0;
  5328. return slut;
  5329. }
  5330. getDescription() {
  5331. let say = new Say("Your ");
  5332. let hairless = this.genderValue >= 80;
  5333. let smallClit = this.genderValue >= 55;
  5334. let innie = this.genderValue > 70;
  5335. let obscenelyOpen = false;
  5336. if (hairless) {
  5337. say.add("hairless ", Say.PUSSY);
  5338. }
  5339. else {
  5340. say.add("hairy ", Say.PUSSY);
  5341. }
  5342. say.add(" ");
  5343. if (innie) {
  5344. say.add("is usually completely covered by its lips");
  5345. }
  5346. else {
  5347. say.add("has some curtains escaping its lips");
  5348. }
  5349. if (!smallClit) {
  5350. say.add(" and has an oversized clit");
  5351. }
  5352. say.add(".");
  5353. if (obscenelyOpen) {
  5354. say.add(" It is currently stretched open obscenely.");
  5355. }
  5356. return say;
  5357. }
  5358. arrangeGenderValue(gv) {
  5359. gv = (gv / 2) + 50;
  5360. this.genderValue = gv;
  5361. this.getPartOne().invalidateCaches();
  5362. return;
  5363. }
  5364. static getSynonym() {
  5365. let cockNames = [
  5366. "pussy",
  5367. "womanhood"
  5368. ];
  5369. return (new OneOf(OneOf.PURELY_AT_RANDOM, ...cockNames).getOne());
  5370. }
  5371. }
  5372. class HumanoidTorso extends Bodypart {
  5373. constructor() {
  5374. super(...arguments);
  5375. this.genderWeight = 0;
  5376. this.sluttinessWeight = 0;
  5377. }
  5378. }
  5379. class Clothing extends Thing {
  5380. constructor() {
  5381. super(...arguments);
  5382. this.slots = [];
  5383. this.transparentSlots = [];
  5384. this.layer = Clothing.LAYER_MEDIUM;
  5385. this.isVisible = false;
  5386. this.visibleOn = [];
  5387. this.breastPadding = 0;
  5388. this.maxBreastSize = -1;
  5389. this.tightBreastSize = -1;
  5390. this.looseBreastSize = 0;
  5391. this.crotchPadding = 0;
  5392. this.maxCrotchSize = -1;
  5393. this.tightCrotchSize = -1;
  5394. this.looseCrotchSize = 0;
  5395. this.buttPadding = 0;
  5396. this.maxButtSize = -1;
  5397. this.tightButtSize = -1;
  5398. this.looseButtSize = 0;
  5399. this.genderValue = 50;
  5400. this.sluttinessValue = 40;
  5401. }
  5402. updateStatus() {
  5403. this.visibleOn = [];
  5404. this.visibleOn.push(...this.slots);
  5405. let wearer = Thing.WearRelation.getLeft(this);
  5406. if (wearer == undefined)
  5407. return;
  5408. let cloths = Thing.WearRelation.getRight(wearer);
  5409. let coveredSlots = [];
  5410. for (let i = 0; i < cloths.length; i++) {
  5411. let worn = cloths[i];
  5412. if ((worn != this) && worn.layer > this.layer) {
  5413. coveredSlots.push(...worn.getCoveringSlots());
  5414. }
  5415. }
  5416. this.visibleOn = this.visibleOn.filter(visible => {
  5417. return coveredSlots.indexOf(visible) == -1;
  5418. });
  5419. this.isVisible = this.visibleOn.length > 0;
  5420. }
  5421. getCoveringSlots() {
  5422. if (this.transparentSlots.length == 0) {
  5423. return this.slots.slice(0);
  5424. }
  5425. return this.slots.filter((value, index, array) => {
  5426. return this.transparentSlots.indexOf(value) == -1;
  5427. });
  5428. }
  5429. getGenderWeight() {
  5430. return this.visibleOn.length;
  5431. }
  5432. getGenderValue() {
  5433. return this.genderValue;
  5434. }
  5435. getSluttinessWeight() {
  5436. return this.visibleOn.length;
  5437. }
  5438. getSluttinessValue() {
  5439. return this.sluttinessValue;
  5440. }
  5441. static getGenderValueOn(p) {
  5442. let weight = 0;
  5443. let value = 0;
  5444. let clothes = Thing.WearRelation.getRight(p);
  5445. for (let i = 0; i < clothes.length; i++) {
  5446. weight += clothes[i].getGenderWeight();
  5447. value += clothes[i].getGenderWeight() * clothes[i].getGenderValue();
  5448. }
  5449. return {
  5450. weight: weight,
  5451. value: value
  5452. };
  5453. }
  5454. static getSluttinessValueOn(p) {
  5455. let weight = 0;
  5456. let value = 0;
  5457. let clothes = Thing.WearRelation.getRight(p);
  5458. for (let i = 0; i < clothes.length; i++) {
  5459. weight += clothes[i].getSluttinessWeight();
  5460. value += clothes[i].getSluttinessWeight() * clothes[i].getSluttinessValue();
  5461. }
  5462. return {
  5463. weight: weight,
  5464. value: value
  5465. };
  5466. }
  5467. }
  5468. Clothing.LAYER_LOWEST = 0;
  5469. Clothing.LAYER_LOW = 5;
  5470. Clothing.LAYER_MEDIUM = 10;
  5471. Clothing.LAYER_HIGH = 15;
  5472. Clothing.LAYER_HIGHEST = 20;
  5473. class ActionRemove extends Action {
  5474. getCommandText() {
  5475. return "take off " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
  5476. }
  5477. getClothing() {
  5478. return this.getNoun(0);
  5479. }
  5480. }
  5481. ActionRemove.check = new Rulebook("Check Removing");
  5482. ActionRemove.carry = new Rulebook("Carry out Removing");
  5483. ActionRemove.checkIsWearable = ActionRemove.check.createAndAddRule({
  5484. name: "Is noun a clothing",
  5485. firstPriority: Rule.PRIORITY_HIGHEST,
  5486. code: (runner) => {
  5487. let action = runner.noun;
  5488. let noun = action.getClothing();
  5489. if (!(noun instanceof Clothing)) {
  5490. if (action.actor == WorldState.player) {
  5491. action.say.add("You can only remove Clothing.");
  5492. }
  5493. return false;
  5494. }
  5495. }
  5496. });
  5497. ActionRemove.checkIsHeld = ActionRemove.check.createAndAddRule({
  5498. name: "Is noun worn",
  5499. firstPriority: Rule.PRIORITY_HIGH,
  5500. code: async (runner) => {
  5501. let action = runner.noun;
  5502. let noun = action.getClothing();
  5503. if (!Thing.WearRelation.isRight(action.actor, noun)) {
  5504. if (action.actor == WorldState.player) {
  5505. action.say.add("You are not wearing it.");
  5506. }
  5507. return false;
  5508. }
  5509. }
  5510. });
  5511. ActionRemove.carryDefault = ActionRemove.carry.createAndAddRule({
  5512. name: "Set Clothing as Carried",
  5513. firstPriority: Rule.PRIORITY_MEDIUM,
  5514. code: (runner) => {
  5515. let action = runner.noun;
  5516. let noun = action.getClothing();
  5517. Thing.CarryRelation.setRelation(action.actor, noun);
  5518. let actor = action.actor;
  5519. let thing = action.getNoun(0);
  5520. if (actor == WorldState.player) {
  5521. action.say.add(new SayBold(thing, ": "), "Removed.");
  5522. }
  5523. else {
  5524. action.say.add(new SayThe(), actor, " takes off ", new SayThe(), thing, ".");
  5525. }
  5526. }
  5527. });
  5528. Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
  5529. name: "Hyperlink - Remove",
  5530. firstPriority: Rule.PRIORITY_HIGHEST,
  5531. code: (rulebook) => {
  5532. let thing = rulebook.noun;
  5533. if (thing instanceof Clothing && (Thing.WearRelation.isRight(WorldState.player, thing))) {
  5534. Elements.HyperlinkHandler.addAvailableAction("Remove", new ActionRemove(WorldState.player, thing));
  5535. }
  5536. }
  5537. }));
  5538. Elements.InventoryHandler.LinkingThing.addRule(new Rule({
  5539. name: "Inventory - Remove",
  5540. firstPriority: Rule.PRIORITY_LOWEST,
  5541. code: (rulebook) => {
  5542. let thing = rulebook.noun;
  5543. if (thing instanceof Clothing && (Thing.WearRelation.isRight(WorldState.player, thing))) {
  5544. Elements.InventoryHandler.printThingLink("R", new ActionRemove(WorldState.player, thing));
  5545. }
  5546. }
  5547. }));
  5548. class ActionWear extends Action {
  5549. getCommandText() {
  5550. return "wear " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
  5551. }
  5552. getClothing() {
  5553. return this.getNoun(0);
  5554. }
  5555. }
  5556. ActionWear.check = new Rulebook("Check Wearing");
  5557. ActionWear.carry = new Rulebook("Carry out Wearing");
  5558. ActionWear.checkIsWearable = ActionWear.check.createAndAddRule({
  5559. name: "Is noun a clothing",
  5560. firstPriority: Rule.PRIORITY_HIGHEST,
  5561. code: (runner) => {
  5562. let action = runner.noun;
  5563. let noun = action.getClothing();
  5564. if (!(noun instanceof Clothing)) {
  5565. if (action.actor == WorldState.player) {
  5566. action.say.add("You can only wear Clothing.");
  5567. }
  5568. return false;
  5569. }
  5570. }
  5571. });
  5572. ActionWear.checkIsHeld = ActionWear.check.createAndAddRule({
  5573. name: "Is noun held",
  5574. firstPriority: Rule.PRIORITY_HIGH,
  5575. code: async (runner) => {
  5576. let action = runner.noun;
  5577. let noun = action.getClothing();
  5578. if (!Thing.CarryRelation.isRight(action.actor, noun)) {
  5579. if (action.actor == WorldState.player) {
  5580. action.say.add("(first taking the ", noun, ")", Say.LINE_BREAK);
  5581. }
  5582. let takingAction = new ActionTake(action.actor, noun);
  5583. await takingAction.execute();
  5584. action.say.add(takingAction.say);
  5585. if (!Thing.CarryRelation.isRight(action.actor, noun)) {
  5586. return false;
  5587. }
  5588. }
  5589. }
  5590. });
  5591. ActionWear.carryDefault = ActionWear.carry.createAndAddRule({
  5592. name: "Set Clothing as Worn",
  5593. firstPriority: Rule.PRIORITY_MEDIUM,
  5594. code: (runner) => {
  5595. let action = runner.noun;
  5596. let noun = action.getClothing();
  5597. Thing.WearRelation.setRelation(action.actor, noun);
  5598. let actor = action.actor;
  5599. let thing = action.getNoun(0);
  5600. if (actor == WorldState.player) {
  5601. action.say.add(new SayBold(thing, ": "), "Worn.");
  5602. }
  5603. else {
  5604. action.say.add(new SayThe(), actor, " puts on ", new SayThe(), thing, ".");
  5605. }
  5606. }
  5607. });
  5608. Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
  5609. name: "Hyperlink - Wear",
  5610. firstPriority: Rule.PRIORITY_HIGHEST,
  5611. code: (rulebook) => {
  5612. let thing = rulebook.noun;
  5613. if (thing instanceof Clothing && !(Thing.WearRelation.isRight(WorldState.player, thing))) {
  5614. Elements.HyperlinkHandler.addAvailableAction("Wear", new ActionWear(WorldState.player, thing));
  5615. }
  5616. }
  5617. }));
  5618. Elements.InventoryHandler.LinkingThing.addRule(new Rule({
  5619. name: "Inventory - Wear",
  5620. firstPriority: Rule.PRIORITY_LOWEST,
  5621. code: (rulebook) => {
  5622. let thing = rulebook.noun;
  5623. if (thing instanceof Clothing && !(Thing.WearRelation.isRight(WorldState.player, thing))) {
  5624. Elements.InventoryHandler.printThingLink("W", new ActionWear(WorldState.player, thing));
  5625. }
  5626. }
  5627. }));
  5628. class Humanoid extends Person {
  5629. constructor(options) {
  5630. super(options);
  5631. this.breastVisibleSize = 0;
  5632. this.isBreastVisible = false;
  5633. this.isBreastTight = false;
  5634. this.isBreastLoose = false;
  5635. this.crotchVisibleSize = 0;
  5636. this.isCrotchVisible = false;
  5637. this.isCrotchTight = false;
  5638. this.buttVisibleSize = 0;
  5639. this.isButtVisible = false;
  5640. this.isButtTight = false;
  5641. this.isGenderCached = false;
  5642. this.isSluttinessCached = false;
  5643. this.uncoveredSlots = [];
  5644. this.addParts(new HumanoidSkin(), new HumanoidHead(), new HumanoidArms(), new HumanoidHands(), new HumanoidBreasts(), new HumanoidFeet(), new HumanoidTorso(), new HumanoidButt());
  5645. if (options.isMale) {
  5646. this.addMaleParts();
  5647. this.setGenderValue(25);
  5648. }
  5649. else {
  5650. this.addFemaleParts();
  5651. this.setGenderValue(75);
  5652. }
  5653. this.addGetAlterations((humanoid) => {
  5654. if (humanoid.isPlayer()) {
  5655. return {
  5656. HumanoidGender: humanoid.isMale() ? Humanoid.SEX_MALE :
  5657. humanoid.isFemale() ? Humanoid.SEX_FEMALE :
  5658. Humanoid.SEX_HERM
  5659. };
  5660. }
  5661. });
  5662. this.addSetAlterations((humanoid, changes) => {
  5663. if (humanoid.isPlayer()) {
  5664. humanoid.removeGenderedParts();
  5665. if (changes.HumanoidGender == Humanoid.SEX_MALE) {
  5666. humanoid.addMaleParts();
  5667. }
  5668. else if (changes.HumanoidGender == Humanoid.SEX_FEMALE) {
  5669. humanoid.addFemaleParts();
  5670. }
  5671. else {
  5672. humanoid.addMaleParts();
  5673. humanoid.addFemaleParts();
  5674. }
  5675. }
  5676. });
  5677. }
  5678. invalidateCaches() {
  5679. this.isGenderCached = false;
  5680. this.isSluttinessCached = false;
  5681. }
  5682. getGenderValue() {
  5683. if (!this.isSluttinessCached) {
  5684. this.updateCaches();
  5685. }
  5686. return this.cachedGenderValue;
  5687. }
  5688. getSluttiness() {
  5689. if (!this.isSluttinessCached) {
  5690. this.updateCaches();
  5691. }
  5692. return this.cachedSluttiness;
  5693. }
  5694. getBulges() {
  5695. if (!this.isGenderCached) {
  5696. this.updateCaches();
  5697. }
  5698. return this.cachedBulges;
  5699. }
  5700. updateCaches() {
  5701. this.updateClothing();
  5702. this.updateSlots();
  5703. this.updateBodyparts();
  5704. this.updateBulges();
  5705. this.updateGenderValue();
  5706. this.updateSluttiness();
  5707. }
  5708. updateSlots() {
  5709. this.uncoveredSlots = [];
  5710. for (let i = 0; i < Humanoid.SLOT_SLOT_COUNT; i++) {
  5711. this.uncoveredSlots.push(i);
  5712. }
  5713. let clothing = Thing.WearRelation.getRightType(this, Clothing);
  5714. for (let i = 0; i < clothing.length; i++) {
  5715. let covering = clothing[i].getCoveringSlots();
  5716. for (let k = 0; k < covering.length; k++) {
  5717. let idx = this.uncoveredSlots.indexOf(covering[k]);
  5718. if (idx >= 0) {
  5719. this.uncoveredSlots.splice(idx, 1);
  5720. }
  5721. }
  5722. if (this.uncoveredSlots.length == 0)
  5723. break;
  5724. }
  5725. }
  5726. updateGenderValue() {
  5727. let clothingGender = Clothing.getGenderValueOn(this);
  5728. let bodypartGender = Bodypart.getGenderValueOn(this);
  5729. let genderWeight = clothingGender.weight + bodypartGender.weight;
  5730. let genderValue = clothingGender.value + bodypartGender.value;
  5731. let correctionWeight = Bodypart.WEIGHT_HIGHEST;
  5732. let correctionValue = this.getStat(Attributes.GenderIdentity) * Bodypart.WEIGHT_HIGHEST;
  5733. let hasPenis = false;
  5734. let hasVagina = false;
  5735. if (this.isCrotchVisible) {
  5736. if (Thing.PartRelation.getRightTypeOne(this, HumanoidPenis) != undefined) {
  5737. hasPenis = true;
  5738. hasVagina = false;
  5739. correctionValue += 0 * Bodypart.WEIGHT_LOWEST;
  5740. correctionWeight += Bodypart.WEIGHT_LOWEST;
  5741. }
  5742. else if (Thing.PartRelation.getRightTypeOne(this, HumanoidVagina) != undefined) {
  5743. hasPenis = false;
  5744. hasVagina = true;
  5745. correctionValue += 100 * Bodypart.WEIGHT_LOWEST;
  5746. correctionWeight += Bodypart.WEIGHT_LOWEST;
  5747. }
  5748. }
  5749. if (this.breastVisibleSize > 0) {
  5750. correctionValue += 100 * Bodypart.WEIGHT_LOWEST;
  5751. correctionWeight += Bodypart.WEIGHT_LOWEST;
  5752. }
  5753. if (this.crotchVisibleSize > 0 && !hasVagina) {
  5754. correctionValue += 0 * Bodypart.WEIGHT_LOWEST;
  5755. correctionWeight += Bodypart.WEIGHT_LOWEST;
  5756. }
  5757. let genderValueFinal = genderValue / genderWeight;
  5758. let genderValueCorrected = (genderValue + correctionValue) / (genderWeight + correctionWeight);
  5759. this.cachedGenderValue = {
  5760. hasTits: this.breastVisibleSize > 1,
  5761. hasPenisBulge: this.crotchVisibleSize > 0 && !hasVagina,
  5762. hasPenis: hasPenis,
  5763. hasVagina: hasVagina,
  5764. genderValue: genderValueFinal,
  5765. genderValueCorrected: genderValueCorrected
  5766. };
  5767. this.isGenderCached = true;
  5768. }
  5769. isVisibleOn(slot) {
  5770. return this.uncoveredSlots.indexOf(slot) != -1;
  5771. }
  5772. updateSluttiness() {
  5773. let clothingSluttiness = Clothing.getSluttinessValueOn(this);
  5774. let bodypartSluttiness = Bodypart.getSluttinessValueOn(this);
  5775. let sluttinessWeight = clothingSluttiness.weight + bodypartSluttiness.weight;
  5776. let sluttinessValue = clothingSluttiness.value + bodypartSluttiness.value;
  5777. let correctionWeight = 0;
  5778. let correctionValue = 0;
  5779. let somewhatSlutty = [Humanoid.SLOT_MIDRIFF, Humanoid.SLOT_LEG_UPPER, Humanoid.SLOT_WAIST, Humanoid.SLOT_HIPS, Humanoid.SLOT_BACK];
  5780. for (let i = 0; i < somewhatSlutty.length; i++) {
  5781. if (this.isVisibleOn(somewhatSlutty[i])) {
  5782. correctionWeight += 1;
  5783. correctionValue += 75;
  5784. }
  5785. }
  5786. let verySlutty = [Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT];
  5787. for (let i = 0; i < verySlutty.length; i++) {
  5788. if (this.isVisibleOn(verySlutty[i])) {
  5789. correctionWeight += 3;
  5790. correctionValue += 75;
  5791. }
  5792. }
  5793. if ((this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) > 0.75) {
  5794. let extremeSlutty = [Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT];
  5795. for (let i = 0; i < extremeSlutty.length; i++) {
  5796. if (this.isVisibleOn(extremeSlutty[i])) {
  5797. correctionWeight += 5;
  5798. correctionValue += 85;
  5799. }
  5800. }
  5801. }
  5802. let halfNaked;
  5803. let naked;
  5804. if (!this.isMale()) {
  5805. halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 &&
  5806. !this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]);
  5807. naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 &&
  5808. this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]);
  5809. }
  5810. else {
  5811. if (this.hasBreasts()) {
  5812. halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 &&
  5813. !this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]);
  5814. naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 &&
  5815. this.isVisibleOnArray([Humanoid.SLOT_BREASTS, Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]);
  5816. }
  5817. else {
  5818. halfNaked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.5 &&
  5819. !this.isVisibleOnArray([Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK]);
  5820. naked = (this.isVisibleOn.length / Humanoid.SLOT_SLOT_COUNT) < 0.3 &&
  5821. this.isVisibleOnArray([Humanoid.SLOT_CROTCH_FRONT, Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_BUTT]);
  5822. }
  5823. }
  5824. let sluttinessValueFinal = sluttinessValue / sluttinessWeight;
  5825. let sluttinessCorrected = (sluttinessValue + correctionValue) / (sluttinessWeight + correctionWeight);
  5826. this.cachedSluttiness = {
  5827. halfNaked: halfNaked,
  5828. naked: naked,
  5829. sluttiness: sluttinessValueFinal,
  5830. sluttinessCorrected: sluttinessCorrected
  5831. };
  5832. this.isSluttinessCached = true;
  5833. }
  5834. isVisibleOnArray(arr) {
  5835. for (let i = 0; i < arr.length; i++) {
  5836. if (!this.isVisibleOn(arr[i])) {
  5837. return false;
  5838. }
  5839. }
  5840. return true;
  5841. }
  5842. addMaleParts() {
  5843. if (!this.isMale() && !this.isHerm()) {
  5844. this.addParts(new HumanoidTesticles(), new HumanoidPenis());
  5845. }
  5846. this.invalidateCaches();
  5847. }
  5848. addFemaleParts() {
  5849. if (!this.isFemale() && !this.isHerm()) {
  5850. this.addParts(new HumanoidVagina());
  5851. }
  5852. this.invalidateCaches();
  5853. }
  5854. removeGenderedParts() {
  5855. this.removeParts(HumanoidVagina);
  5856. this.removeParts(HumanoidPenis);
  5857. this.removeParts(HumanoidTesticles);
  5858. this.invalidateCaches();
  5859. }
  5860. setGenderValue(value) {
  5861. let bp = this.getParts(Bodypart);
  5862. for (let i = 0; i < bp.length; i++) {
  5863. if (bp[i] instanceof HumanoidBreasts && this.isMale()) {
  5864. bp[i].arrangeGenderValue(0);
  5865. }
  5866. else {
  5867. bp[i].arrangeGenderValue(value);
  5868. }
  5869. }
  5870. }
  5871. updateBodyparts() {
  5872. let parts = Thing.PartRelation.getRightType(this, Bodypart);
  5873. for (let i = 0; i < parts.length; i++) {
  5874. parts[i].updateStatus();
  5875. }
  5876. }
  5877. updateClothing() {
  5878. let clothes = Thing.WearRelation.getRightType(this, Clothing);
  5879. for (let i = 0; i < clothes.length; i++) {
  5880. clothes[i].updateStatus();
  5881. }
  5882. }
  5883. updateBulges() {
  5884. let clothes = Thing.WearRelation.getRightType(this, Clothing).sort(function (a, b) {
  5885. return a.layer - b.layer;
  5886. });
  5887. this.isBreastVisible = true;
  5888. this.isCrotchVisible = true;
  5889. this.isButtVisible = true;
  5890. let bras = [];
  5891. let butts = [];
  5892. let junks = [];
  5893. clothes.forEach((cloth) => {
  5894. cloth.updateStatus();
  5895. if (cloth.slots.indexOf(Humanoid.SLOT_BREASTS) != -1) {
  5896. bras.push(cloth);
  5897. if (cloth.transparentSlots.indexOf(Humanoid.SLOT_BREASTS) == -1) {
  5898. this.isBreastVisible = false;
  5899. }
  5900. }
  5901. if (cloth.slots.indexOf(Humanoid.SLOT_BUTT) != -1) {
  5902. butts.push(cloth);
  5903. if (cloth.transparentSlots.indexOf(Humanoid.SLOT_BUTT) == -1) {
  5904. this.isButtVisible = false;
  5905. }
  5906. }
  5907. if (cloth.slots.indexOf(Humanoid.SLOT_CROTCH_FRONT) != -1) {
  5908. junks.push(cloth);
  5909. if (cloth.transparentSlots.indexOf(Humanoid.SLOT_CROTCH_FRONT) == -1) {
  5910. this.isCrotchVisible = false;
  5911. }
  5912. }
  5913. });
  5914. this.updateBreastSizes(bras);
  5915. this.updateCrotchSizes(junks);
  5916. this.updateButtSizes(butts);
  5917. this.cachedBulges = {
  5918. breasts: this.breastVisibleSize,
  5919. butt: this.buttVisibleSize,
  5920. crotch: this.crotchVisibleSize,
  5921. waist: 0
  5922. };
  5923. }
  5924. getTopClothOn(slot) {
  5925. return Thing.WearRelation.getRightType(this, Clothing).filter(otherCloth => {
  5926. return otherCloth.visibleOn.includes(slot);
  5927. }).sort((a, b) => {
  5928. return a.layer - b.layer;
  5929. })[0];
  5930. }
  5931. updateBreastSizes(bras) {
  5932. this.isBreastTight = false;
  5933. this.isBreastLoose = true;
  5934. let breasts = Thing.PartRelation.getRightTypeOne(this, HumanoidBreasts);
  5935. this.breastVisibleSize = breasts.getSize();
  5936. bras.forEach((bra) => {
  5937. if (bra.tightBreastSize >= 0 && this.breastVisibleSize > bra.tightBreastSize) {
  5938. this.isBreastTight = true;
  5939. }
  5940. if (bra.maxBreastSize >= 0 && this.breastVisibleSize > bra.maxBreastSize) {
  5941. this.breastVisibleSize = bra.maxBreastSize;
  5942. }
  5943. if (this.breastVisibleSize >= bra.looseBreastSize) {
  5944. this.isBreastLoose = false;
  5945. }
  5946. this.breastVisibleSize += bra.breastPadding;
  5947. if (this.breastVisibleSize < 0) {
  5948. this.breastVisibleSize = 0;
  5949. }
  5950. });
  5951. }
  5952. updateCrotchSizes(cloths) {
  5953. this.isCrotchTight = false;
  5954. this.crotchVisibleSize = 0;
  5955. let penis = Thing.PartRelation.getRightTypeOne(this, HumanoidPenis);
  5956. let testicles = Thing.PartRelation.getRightTypeOne(this, HumanoidTesticles);
  5957. this.crotchVisibleSize = 0;
  5958. if (penis != undefined) {
  5959. this.crotchVisibleSize += penis.getBulgeSize();
  5960. }
  5961. if (testicles != undefined) {
  5962. this.crotchVisibleSize += testicles.getBulgeSize();
  5963. }
  5964. this.crotchVisibleSize = Math.floor(this.crotchVisibleSize * 10) / 10;
  5965. cloths.forEach((worn) => {
  5966. if (worn.tightCrotchSize >= 0 && this.crotchVisibleSize > worn.tightCrotchSize) {
  5967. this.isCrotchTight = true;
  5968. }
  5969. if (worn.maxCrotchSize >= 0 && this.crotchVisibleSize > worn.maxCrotchSize) {
  5970. this.crotchVisibleSize = worn.maxCrotchSize;
  5971. }
  5972. this.crotchVisibleSize += worn.crotchPadding;
  5973. if (this.crotchVisibleSize < 0) {
  5974. this.crotchVisibleSize = 0;
  5975. }
  5976. });
  5977. }
  5978. updateButtSizes(cloths) {
  5979. this.isButtTight = false;
  5980. let butt = Thing.PartRelation.getRightTypeOne(this, HumanoidButt);
  5981. this.buttVisibleSize = butt == undefined ? 0 : butt.getSize();
  5982. cloths.forEach((worn) => {
  5983. if (worn.tightButtSize >= 0 && this.buttVisibleSize > worn.tightButtSize) {
  5984. this.isButtTight = true;
  5985. }
  5986. if (worn.maxButtSize >= 0 && this.buttVisibleSize > worn.maxButtSize) {
  5987. this.buttVisibleSize = worn.maxButtSize;
  5988. }
  5989. this.buttVisibleSize += worn.buttPadding;
  5990. if (this.buttVisibleSize < 0) {
  5991. this.buttVisibleSize = 0;
  5992. }
  5993. });
  5994. }
  5995. hasBreasts() {
  5996. let breasts = this.getPart(HumanoidBreasts);
  5997. if (breasts.size > 1) {
  5998. return true;
  5999. }
  6000. return false;
  6001. }
  6002. isMale() {
  6003. return this.getParts(HumanoidPenis).length > 0 && this.getParts(HumanoidVagina).length == 0;
  6004. }
  6005. isFemale() {
  6006. return this.getParts(HumanoidPenis).length == 0 && this.getParts(HumanoidVagina).length > 0;
  6007. }
  6008. isHerm() {
  6009. return this.getParts(HumanoidPenis).length > 0 && this.getParts(HumanoidVagina).length > 0;
  6010. }
  6011. getShortestDescription() {
  6012. let playerGender = this.getGenderValue();
  6013. let playerSluttiness = this.getSluttiness();
  6014. let presentation = "";
  6015. if (playerSluttiness.sluttinessCorrected > 75) {
  6016. presentation += ("slutty, ");
  6017. }
  6018. else if (playerSluttiness.sluttinessCorrected > 35) {
  6019. }
  6020. else if (playerSluttiness.sluttinessCorrected > 20) {
  6021. presentation += ("prude, ");
  6022. }
  6023. else {
  6024. presentation += ("saintly, ");
  6025. }
  6026. if (playerGender.genderValueCorrected < 40) {
  6027. presentation += ("masculine ");
  6028. }
  6029. else if (playerGender.genderValueCorrected < 60) {
  6030. presentation += ("androgynous ");
  6031. }
  6032. else {
  6033. presentation += ("feminine ");
  6034. }
  6035. if (playerGender.hasTits) {
  6036. if (playerGender.hasPenis || playerGender.hasPenisBulge) {
  6037. presentation += ("shemale");
  6038. }
  6039. else if (playerGender.hasVagina) {
  6040. presentation += ("woman");
  6041. }
  6042. }
  6043. else {
  6044. if (playerGender.hasPenis) {
  6045. if (playerGender.genderValueCorrected < 60) {
  6046. presentation += ("man");
  6047. }
  6048. else {
  6049. presentation += ("trap");
  6050. }
  6051. }
  6052. else if (playerGender.hasPenisBulge) {
  6053. if (playerGender.genderValueCorrected < 60) {
  6054. presentation += ("man");
  6055. }
  6056. else {
  6057. presentation += ("trap");
  6058. }
  6059. }
  6060. else if (playerGender.hasVagina) {
  6061. presentation += ("woman");
  6062. }
  6063. }
  6064. return presentation;
  6065. }
  6066. static getPlayerDescription() {
  6067. let say = new Say();
  6068. say.add("You are ");
  6069. let player = WorldState.player;
  6070. let male = player.getParts(HumanoidPenis).length > 0;
  6071. let female = player.getParts(HumanoidVagina).length > 0;
  6072. if (male && female) {
  6073. say.add("hermaphrodite");
  6074. }
  6075. else if (male) {
  6076. say.add("male");
  6077. }
  6078. else {
  6079. say.add("female");
  6080. }
  6081. say.add(". You are presenting as ", new SayAn(), player.getShortestDescription() + ". ");
  6082. say.add(Attributes.GenderIdentity.getDescription(player.getStat(Attributes.GenderIdentity)));
  6083. let sv = player.getSluttiness();
  6084. let bulges = player.getBulges();
  6085. let coveredPerc = 1 - (player.uncoveredSlots.length / Humanoid.SLOT_SLOT_COUNT);
  6086. say.add(" ", player.getPart(HumanoidSkin).getDescription());
  6087. if (sv.halfNaked) {
  6088. say.add(" You are almost naked. ");
  6089. }
  6090. else if (sv.naked) {
  6091. say.add(" You are naked. ");
  6092. }
  6093. else if (coveredPerc < 0.2) {
  6094. say.add("You are not showing much of it, though.");
  6095. }
  6096. say.add(Attributes.Degeneration.getDescription(player.getStat(Attributes.Degeneration)));
  6097. say.add(Say.PARAGRAPH_BREAK);
  6098. say.add(player.getPart(HumanoidArms).getDescription(), " ");
  6099. say.add(player.getPart(HumanoidHands).getDescription(), " ");
  6100. say.add(player.getPart(HumanoidFeet).getDescription(), " ");
  6101. let penis = player.getPart(HumanoidPenis);
  6102. let vagina = player.getPart(HumanoidVagina);
  6103. if (penis != undefined) {
  6104. say.add("You have a ", penis.getSizeText(), (penis.isFlaccid() ? " flaccid " : " erect "), Say.COCK, " between your legs");
  6105. if (!penis.isBig() && penis.isGrower() && penis.isFlaccid()) {
  6106. say.add(", which is okay, since you're a grower, not a shower");
  6107. }
  6108. if (penis.isUncovered()) {
  6109. let oneOf = new OneOf(OneOf.PURELY_AT_RANDOM, ...[
  6110. ", it is not covered by any clothing",
  6111. ", it is not covered by any clothes",
  6112. ", it is uncovered",
  6113. ", it is visible to all",
  6114. ", it is hanging freely"
  6115. ]);
  6116. say.add(oneOf.getOne());
  6117. }
  6118. let testicles = player.getPart(HumanoidTesticles);
  6119. if (HumanoidPenis.getSizeText(bulges.crotch) != HumanoidPenis.getSizeText(penis.getBulgeSize() + testicles.getBulgeSize())) {
  6120. say.add(", but it looks like it's actually ", HumanoidPenis.getSizeText(bulges.crotch), " due to your clothing");
  6121. }
  6122. say.add(". ");
  6123. if (testicles != undefined) {
  6124. }
  6125. }
  6126. else {
  6127. say.add(vagina.getDescription());
  6128. }
  6129. say.add(" ");
  6130. let breasts = player.getPart(HumanoidBreasts);
  6131. let butt = player.getPart(HumanoidButt);
  6132. say.add("You have ", breasts.getSizeText(), " breasts and a ", butt.getSizeText(), " butt.");
  6133. if (bulges.breasts != breasts.getSize() && bulges.butt != butt.getSize()) {
  6134. 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), ".");
  6135. }
  6136. else if (bulges.breasts != breasts.getSize()) {
  6137. say.add(" Your clothing makes your breasts look like they're actually ", HumanoidBreasts.getSizeText(bulges.breasts), ".");
  6138. }
  6139. else if (bulges.butt != butt.getSize()) {
  6140. say.add(" Your clothing makes your butt appear ", HumanoidButt.getSizeText(bulges.butt), ".");
  6141. }
  6142. say.add(Say.PARAGRAPH_BREAK);
  6143. let clothingSluttiness = Clothing.getSluttinessValueOn(player);
  6144. let bodypartSluttiness = Bodypart.getSluttinessValueOn(player);
  6145. if (clothingSluttiness.weight > 0) {
  6146. let clothingSluttinessFinal = clothingSluttiness.value / clothingSluttiness.weight;
  6147. if (clothingSluttinessFinal > 75) {
  6148. say.add("Your outfit can only be described as \"whore-ish\", it is far too nasty.");
  6149. }
  6150. else if (clothingSluttinessFinal > 60) {
  6151. say.add("Your clothing are obviously making you look a bit naughty.");
  6152. }
  6153. else if (clothingSluttinessFinal < 30 && sv.sluttinessCorrected < 30) {
  6154. say.add("Your clothing are definitely a bit prude.");
  6155. }
  6156. else if (clothingSluttinessFinal < 15 && sv.sluttinessCorrected < 30) {
  6157. say.add("Your outfit is so prude that it could be worn by a saint.");
  6158. }
  6159. }
  6160. say.add(" ");
  6161. if (bodypartSluttiness.weight > 0) {
  6162. let bodypartSluttinessFinal = bodypartSluttiness.value / bodypartSluttiness.weight;
  6163. if (bodypartSluttinessFinal > 75) {
  6164. say.add("The way your body is makes you look like you were made purely for sex");
  6165. if (coveredPerc > 0.7) {
  6166. say.add(", thankfully it's mostly covered");
  6167. }
  6168. else if (coveredPerc < 0.2) {
  6169. say.add(", and you didn't even bother covering it up");
  6170. }
  6171. say.add(".");
  6172. }
  6173. else if (bodypartSluttinessFinal > 60) {
  6174. say.add("Your body definitely has a lot of sex-appeal going on");
  6175. if (coveredPerc > 0.7) {
  6176. say.add(", although it's covered");
  6177. }
  6178. else if (coveredPerc < 0.2) {
  6179. say.add(", proudly displayed for all to see");
  6180. }
  6181. say.add(".");
  6182. }
  6183. else if (bodypartSluttinessFinal < 30) {
  6184. say.add("You have very little sex-appeal, maybe you are a kitchen table?");
  6185. if (coveredPerc > 0.7) {
  6186. say.add(" At least you covered it up.");
  6187. }
  6188. else if (coveredPerc < 0.2) {
  6189. say.add(" Maybe you could cover it up a bit.");
  6190. }
  6191. }
  6192. }
  6193. say.add(Say.PARAGRAPH_BREAK);
  6194. let stats = new SayLeftRight();
  6195. stats.addLeft(new SayBold("Strength: "), Attributes.Strength.getDescription(player.getStat(Attributes.Strength)));
  6196. stats.addLeft(Say.LINE_BREAK);
  6197. stats.addLeft(new SayBold("Agility: "), Attributes.Agility.getDescription(player.getStat(Attributes.Agility)));
  6198. stats.addLeft(Say.LINE_BREAK);
  6199. stats.addLeft(new SayBold("Charm: "), Attributes.Charm.getDescription(player.getStat(Attributes.Charm)));
  6200. stats.addLeft(Say.LINE_BREAK);
  6201. stats.addLeft(new SayBold("Intelligence: "), Attributes.Intelligence.getDescription(player.getStat(Attributes.Intelligence)));
  6202. Skill.getSkills().forEach((skill) => {
  6203. if (player.getSkill(skill) > 0) {
  6204. stats.addRight(new SayBold(skill.id + ": "), skill.getDescription(player.getSkill(skill)));
  6205. }
  6206. });
  6207. say.add(stats);
  6208. return say;
  6209. }
  6210. }
  6211. Humanoid.SEX_MALE = 0;
  6212. Humanoid.SEX_FEMALE = 1;
  6213. Humanoid.SEX_HERM = 2;
  6214. Humanoid.SLOT_HAIR = 0;
  6215. Humanoid.SLOT_HEADGEAR = 1;
  6216. Humanoid.SLOT_FACE = 2;
  6217. Humanoid.SLOT_EARS = 3;
  6218. Humanoid.SLOT_EYES = 4;
  6219. Humanoid.SLOT_NOSE = 5;
  6220. Humanoid.SLOT_MOUTH = 6;
  6221. Humanoid.SLOT_NECK = 7;
  6222. Humanoid.SLOT_SHOULDERS = 8;
  6223. Humanoid.SLOT_ARMS = 9;
  6224. Humanoid.SLOT_HANDS = 10;
  6225. Humanoid.SLOT_FINGERS = 11;
  6226. Humanoid.SLOT_FINGERNAILS = 12;
  6227. Humanoid.SLOT_UPPER_CHEST = 13;
  6228. Humanoid.SLOT_MIDRIFF = 14;
  6229. Humanoid.SLOT_WAIST = 15;
  6230. Humanoid.SLOT_BACK = 16;
  6231. Humanoid.SLOT_HIPS = 17;
  6232. Humanoid.SLOT_CROTCH_FRONT = 18;
  6233. Humanoid.SLOT_CROTCH_BACK = 19;
  6234. Humanoid.SLOT_BUTT = 20;
  6235. Humanoid.SLOT_LEG_UPPER = 21;
  6236. Humanoid.SLOT_LEG_LOWER = 22;
  6237. Humanoid.SLOT_FEET = 23;
  6238. Humanoid.SLOT_FEET_NAILS = 24;
  6239. Humanoid.SLOT_BREASTS = 25;
  6240. Humanoid.SLOT_SLOT_COUNT = 26;
  6241. Humanoid.cacheInvalidationActionRule = new Rule({
  6242. name: "Invalidate humanoid caches",
  6243. firstPriority: Rule.PRIORITY_LOWEST,
  6244. code: (runner) => {
  6245. runner.noun.actor.invalidateCaches();
  6246. },
  6247. conditions: (runner) => {
  6248. return runner.noun.actor instanceof Humanoid;
  6249. }
  6250. });
  6251. ActionWear.carry.addRule(Humanoid.cacheInvalidationActionRule);
  6252. ActionRemove.carry.addRule(Humanoid.cacheInvalidationActionRule);
  6253. var WorldState;
  6254. (function (WorldState) {
  6255. var worldTurn = 0;
  6256. var playerTurn = 0;
  6257. WorldState.player = new Humanoid({ isMale: false });
  6258. WorldState.player.description = Humanoid.getPlayerDescription;
  6259. var rememberedRooms = new StoredVariable({
  6260. id: "Remembered Rooms",
  6261. value: []
  6262. });
  6263. var rememberedFodder = [];
  6264. let rememberedRoomsForIntelligence = 2;
  6265. let rememberedRoomsForSurvival = 1;
  6266. WorldState.RememberingRoomRulebook = new Rulebook("Remembering Room something");
  6267. function isTurnWaiting() {
  6268. return worldTurn < playerTurn;
  6269. }
  6270. WorldState.isTurnWaiting = isTurnWaiting;
  6271. function incrementWorldTurn() {
  6272. worldTurn++;
  6273. }
  6274. WorldState.incrementWorldTurn = incrementWorldTurn;
  6275. function incrementPlayerTurn() {
  6276. playerTurn++;
  6277. }
  6278. WorldState.incrementPlayerTurn = incrementPlayerTurn;
  6279. function getCurrentTurn() {
  6280. return playerTurn;
  6281. }
  6282. WorldState.getCurrentTurn = getCurrentTurn;
  6283. function setCurrentTurn(turn) {
  6284. playerTurn = turn;
  6285. worldTurn = turn;
  6286. }
  6287. WorldState.setCurrentTurn = setCurrentTurn;
  6288. WorldState.RememberingRoomInList = WorldState.RememberingRoomRulebook.createAndAddRule({
  6289. name: "Is room listed in remembered rooms?",
  6290. firstPriority: Rule.PRIORITY_LOWEST,
  6291. priority: Rule.PRIORITY_LOW,
  6292. code: runner => {
  6293. if (rememberedRooms.value.indexOf(runner.noun.getName()) != -1 || rememberedFodder.indexOf(runner.noun) != -1) {
  6294. return true;
  6295. }
  6296. }
  6297. });
  6298. WorldState.RememberingRoomInMap = WorldState.RememberingRoomRulebook.createAndAddRule({
  6299. name: "Is room shown on a map?",
  6300. firstPriority: Rule.PRIORITY_LOWEST,
  6301. priority: Rule.PRIORITY_LOWEST,
  6302. code: runner => {
  6303. let maps = Thing.CarryRelation.getRightType(WorldState.player, MapNote);
  6304. for (let i = 0; i < maps.length; i++) {
  6305. if (maps[i].contains(runner.noun)) {
  6306. return true;
  6307. }
  6308. }
  6309. }
  6310. });
  6311. async function isRoomRemembered(room) {
  6312. let result = await WorldState.RememberingRoomRulebook.execute({ noun: room });
  6313. return result == true;
  6314. }
  6315. WorldState.isRoomRemembered = isRoomRemembered;
  6316. function getRememberedRooms() {
  6317. return rememberedRooms.value;
  6318. }
  6319. WorldState.getRememberedRooms = getRememberedRooms;
  6320. function getRememberedRoomsAsRooms() {
  6321. let rooms = [];
  6322. rememberedRooms.value.forEach(roomName => {
  6323. let room = Room.getRoom(roomName);
  6324. if (room != undefined)
  6325. rooms.push(room);
  6326. });
  6327. return rooms;
  6328. }
  6329. WorldState.getRememberedRoomsAsRooms = getRememberedRoomsAsRooms;
  6330. function getMaximumRememberedRooms() {
  6331. let intRooms = WorldState.player.getStat(Attributes.Intelligence) * rememberedRoomsForIntelligence;
  6332. let skillRooms = WorldState.player.getSkill(Skills.Survival) * rememberedRoomsForSurvival;
  6333. return intRooms + skillRooms;
  6334. }
  6335. WorldState.getMaximumRememberedRooms = getMaximumRememberedRooms;
  6336. function truncateRooms() {
  6337. while (rememberedRooms.value.length > getMaximumRememberedRooms()) {
  6338. rememberedRooms.value.pop();
  6339. }
  6340. }
  6341. WorldState.truncateRooms = truncateRooms;
  6342. function rememberRoom(...rooms) {
  6343. rooms.forEach((value) => {
  6344. if (value instanceof Room) {
  6345. if (value.fodder) {
  6346. if (rememberedFodder.indexOf(value) == -1) {
  6347. rememberedFodder.push(value);
  6348. }
  6349. }
  6350. else {
  6351. let idx = rememberedRooms.value.indexOf(value.getName());
  6352. if (idx != -1) {
  6353. rememberedRooms.value.splice(idx, 1);
  6354. }
  6355. rememberedRooms.value.unshift(value.getName());
  6356. }
  6357. }
  6358. });
  6359. truncateRooms();
  6360. }
  6361. WorldState.rememberRoom = rememberRoom;
  6362. function saveState() {
  6363. let things = {
  6364. carried: [],
  6365. worn: [],
  6366. wielded: []
  6367. };
  6368. return {
  6369. Things: things
  6370. };
  6371. }
  6372. WorldState.saveState = saveState;
  6373. WorldState.CorrectRememberedRoomsRule = PlayBegins.rulebook.createAndAddRule({
  6374. name: "Correct remembered rooms",
  6375. firstPriority: Rule.PRIORITY_LOWEST,
  6376. priority: Rule.PRIORITY_MEDIUM,
  6377. code: () => {
  6378. let allRooms = rememberedRooms.value;
  6379. let currentRoom = WorldState.player.getRoom();
  6380. if (allRooms.length == 0) {
  6381. rememberedRooms.value = [currentRoom.getName()];
  6382. return;
  6383. }
  6384. let newRooms = [];
  6385. function recursivelyAddRooms(room) {
  6386. if (room instanceof RoomRandom) {
  6387. if (room.fodder) {
  6388. rememberedFodder.push(room);
  6389. room.connections.forEach((newRoom) => {
  6390. recursivelyAddRooms(newRoom);
  6391. });
  6392. }
  6393. else if (allRooms.indexOf(room.getName()) != -1 && newRooms.indexOf(room.getName()) == -1) {
  6394. newRooms.push(room.getName());
  6395. room.connections.forEach((newRoom) => {
  6396. recursivelyAddRooms(newRoom);
  6397. });
  6398. }
  6399. }
  6400. }
  6401. recursivelyAddRooms(currentRoom);
  6402. rememberedRooms.value = newRooms;
  6403. }
  6404. });
  6405. })(WorldState || (WorldState = {}));
  6406. class Region {
  6407. constructor(name) {
  6408. this.name = name;
  6409. }
  6410. place(...rooms) {
  6411. rooms.forEach(room => {
  6412. if (room instanceof Room) {
  6413. Region.RegionRoom.setRelation(this, room);
  6414. }
  6415. else {
  6416. Region.RegionRegion.setRelation(this, room);
  6417. }
  6418. });
  6419. }
  6420. getRooms() {
  6421. let rooms = Region.RegionRoom.getRight(this);
  6422. Region.RegionRegion.getRight(this).forEach((region) => {
  6423. Region.RegionRoom.getRight(region).forEach((room) => {
  6424. rooms.push(room);
  6425. });
  6426. });
  6427. return rooms;
  6428. }
  6429. containsRoom(room) {
  6430. let directlyContained = Region.RegionRoom.getLeft(room) == this;
  6431. if (directlyContained) {
  6432. return true;
  6433. }
  6434. else if (Region.RegionRegion.getLeft(this) != undefined) {
  6435. return this.getRooms().indexOf(room) != -1;
  6436. }
  6437. return false;
  6438. }
  6439. contains(thing) {
  6440. let room = thing.getRoom();
  6441. if (room == undefined) {
  6442. return false;
  6443. }
  6444. else {
  6445. let regions = Region.InRelation.getAllLeft(room);
  6446. return regions.indexOf(this) != -1;
  6447. }
  6448. }
  6449. }
  6450. Region.RegionRoom = new RelationOneToMany();
  6451. Region.RegionRegion = new RelationOneToMany();
  6452. Region.InRelation = new RelationHandlerStrictOneToMany(Region.RegionRegion, Region.RegionRoom);
  6453. class Shuffler {
  6454. constructor(array, rng) {
  6455. this.position = 0;
  6456. this.rng = rng == undefined ? Math.random : rng;
  6457. this.array = array;
  6458. }
  6459. restart() {
  6460. this.position = 0;
  6461. }
  6462. getOne() {
  6463. if (this.position >= this.array.length) {
  6464. return undefined;
  6465. }
  6466. let randomIndex = Math.floor(this.rng() * (this.array.length - this.position)) + this.position;
  6467. let localCopy = this.array[this.position];
  6468. this.array[this.position] = this.array[randomIndex];
  6469. this.array[randomIndex] = localCopy;
  6470. return this.array[this.position++];
  6471. }
  6472. getShuffled() {
  6473. let array = this.array.slice(0);
  6474. var m = array.length, t, i;
  6475. while (m) {
  6476. i = Math.floor(this.rng() * m--);
  6477. t = array[m];
  6478. array[m] = array[i];
  6479. array[i] = t;
  6480. }
  6481. return array;
  6482. }
  6483. }
  6484. var AIRules;
  6485. (function (AIRules) {
  6486. AIRules.PickShiny = AI.rules.createAndAddRule({
  6487. name: "Pick Shinies",
  6488. firstPriority: AIRules.PRIORITY_ACTING_ON_PLACE,
  6489. conditions: (runner) => {
  6490. let person = runner.noun;
  6491. return person.AI.picksShinies;
  6492. },
  6493. code: (runner) => {
  6494. let person = runner.noun;
  6495. let room = person.getRoom();
  6496. let visibleThings = room.getContainedAndVisibleTo(person);
  6497. if (visibleThings.length > 0) {
  6498. for (let i = 0; i < visibleThings.length; i++) {
  6499. if (!visibleThings[i].fixedInPlace && visibleThings[i].getShiny()) {
  6500. return new ActionTake(person, visibleThings[i]);
  6501. }
  6502. }
  6503. }
  6504. }
  6505. });
  6506. })(AIRules || (AIRules = {}));
  6507. var AIRules;
  6508. (function (AIRules) {
  6509. AIRules.Wander = AI.rules.createAndAddRule({
  6510. name: "Wander",
  6511. firstPriority: AIRules.PRIORITY_ACTING_ON_IDLE,
  6512. conditions: (runner) => {
  6513. let person = runner.noun;
  6514. return person.AI.wanderer && (Math.random() * 100) > person.AI.wanderChance;
  6515. },
  6516. code: (runner) => {
  6517. let person = runner.noun;
  6518. let room = person.getRoom();
  6519. if (person.AI.wandersOn != undefined) {
  6520. if (person.AI.wandersOn.containsRoom(room)) {
  6521. let connections = room.connections.slice();
  6522. let realConnections = [];
  6523. for (let i = 0; i < connections.length; i++) {
  6524. if (connections[i] != undefined && person.AI.wandersOn.containsRoom(connections[i])) {
  6525. realConnections.push(i);
  6526. }
  6527. }
  6528. let direction = ((new Shuffler(realConnections)).getOne());
  6529. return new ActionGo(person, direction);
  6530. }
  6531. else {
  6532. let regionRooms = person.AI.wandersOn.getRooms().filter((a) => {
  6533. if (a instanceof RoomRandom && a.placed) {
  6534. return true;
  6535. }
  6536. });
  6537. regionRooms.sort((a, b) => {
  6538. let dist = a.getDistanceTo(b);
  6539. if (dist != undefined) {
  6540. return -dist;
  6541. }
  6542. else {
  6543. return 0;
  6544. }
  6545. });
  6546. let targetRoom = regionRooms.pop();
  6547. return new ActionGo(person, targetRoom);
  6548. }
  6549. }
  6550. else {
  6551. let direction = room.getConnectedDirection();
  6552. return new ActionGo(person, direction);
  6553. }
  6554. }
  6555. });
  6556. })(AIRules || (AIRules = {}));
  6557. class ActionDrop extends Action {
  6558. getCommandText() {
  6559. return "drop " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
  6560. }
  6561. }
  6562. ActionDrop.check = new Rulebook("Check Dropping");
  6563. ActionDrop.carry = new Rulebook("Carry out Dropping");
  6564. ActionDrop.check.addRule(new Rule({
  6565. name: "Check Dropping - Are you Wearing it?",
  6566. firstPriority: Rule.PRIORITY_LOWEST,
  6567. code: async (rulebook) => {
  6568. let action = rulebook.noun;
  6569. let actor = action.actor;
  6570. let thing = action.getNoun(0);
  6571. if (Thing.WearRelation.getLeft(thing) == actor || Thing.WieldRelation.getLeft(thing) == actor) {
  6572. if (action.actor == WorldState.player) {
  6573. action.say.add("(first taking off the ", thing, ")", Say.LINE_BREAK);
  6574. }
  6575. let takingAction = new ActionRemove(actor, thing);
  6576. await takingAction.execute();
  6577. action.say.add(takingAction.say);
  6578. if (Thing.WearRelation.getLeft(thing) == actor || Thing.WieldRelation.getLeft(thing) == actor) {
  6579. return false;
  6580. }
  6581. action.say.add(Say.LINE_BREAK);
  6582. }
  6583. }
  6584. }));
  6585. ActionDrop.check.addRule(new Rule({
  6586. name: "Check Dropping - Do you have it??",
  6587. firstPriority: Rule.PRIORITY_LOWEST,
  6588. code: (rulebook) => {
  6589. let action = rulebook.noun;
  6590. let actor = action.actor;
  6591. let thing = action.getNoun(0);
  6592. if (Thing.CarryRelation.getLeft(thing) != actor) {
  6593. if (actor == WorldState.player) {
  6594. action.say.add("You don't have it.");
  6595. }
  6596. return false;
  6597. }
  6598. }
  6599. }));
  6600. ActionDrop.carry.addRule(new Rule({
  6601. name: "Dropping - Place the noun on the floor",
  6602. code: (rulebook) => {
  6603. let action = rulebook.noun;
  6604. let actor = action.actor;
  6605. let thing = action.getNoun(0);
  6606. Thing.EnclosedRelation.unsetRight(thing);
  6607. actor.getRoom().place(thing);
  6608. if (actor == WorldState.player) {
  6609. action.say.add(new SayBold(action.getNoun(0).getPrintedName() + ": "), "Dropped.");
  6610. }
  6611. else {
  6612. action.say.add(new SayThe(), actor, " drops ", new SayThe(), action.getNoun(0), " on the floor.");
  6613. }
  6614. }
  6615. }));
  6616. Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
  6617. name: "Hyperlink - Drop",
  6618. firstPriority: Rule.PRIORITY_HIGHEST,
  6619. code: (rulebook) => {
  6620. let thing = rulebook.noun;
  6621. if (Thing.CarryRelation.getLeft(thing) == WorldState.player || Thing.WieldRelation.getLeft(thing) == WorldState.player || Thing.WearRelation.getLeft(thing) == WorldState.player) {
  6622. Elements.HyperlinkHandler.addAvailableAction("Drop", new ActionDrop(WorldState.player, thing));
  6623. }
  6624. }
  6625. }));
  6626. Elements.InventoryHandler.LinkingThing.addRule(new Rule({
  6627. name: "Inventory - Drop",
  6628. firstPriority: Rule.PRIORITY_LOWEST,
  6629. code: (rulebook) => {
  6630. let thing = rulebook.noun;
  6631. Elements.InventoryHandler.printThingLink("D", new ActionDrop(WorldState.player, thing));
  6632. }
  6633. }));
  6634. class ActionInventory extends Action {
  6635. constructor() {
  6636. super(...arguments);
  6637. this.requiresTurn = false;
  6638. this.requiresNoun = false;
  6639. this.requiresVisibility = false;
  6640. }
  6641. getCommandText() {
  6642. return "take inventory";
  6643. }
  6644. static async createButton(thing, resolve) {
  6645. let p = document.createElement("p");
  6646. p.classList.add("choice");
  6647. let elements = await ((new Say(thing)).getPureElements());
  6648. elements.forEach(ele => {
  6649. p.appendChild(ele);
  6650. });
  6651. p.addEventListener("click", () => {
  6652. resolve(thing);
  6653. });
  6654. Controls.KeyHandler.applyCode(p, Controls.KeyHandler.getFirstKeyCode());
  6655. return p;
  6656. }
  6657. }
  6658. ActionInventory.check = new Rulebook("Check Taking Inventory");
  6659. ActionInventory.carry = new Rulebook("Carry out Taking Inventory");
  6660. ActionInventory.checkInventoryRule = ActionInventory.check.createAndAddRule({
  6661. name: "List inventory as options",
  6662. code: async (rulebook) => {
  6663. let player = WorldState.player;
  6664. let wielded = Thing.WieldRelation.getRight(player).sort(Elements.InventoryHandler.thingSort);
  6665. let worn = Thing.WearRelation.getRight(player).sort(Elements.InventoryHandler.thingSort);
  6666. let carried = Thing.CarryRelation.getRight(player).sort(Elements.InventoryHandler.thingSort);
  6667. let buttons;
  6668. let chosenPromise = new Promise((async (resolve) => {
  6669. Controls.KeyHandler.reset();
  6670. let say = new Say();
  6671. if (wielded.length > 0) {
  6672. say.add(new SayBold("Wielded:"), Say.LINE_BREAK);
  6673. for (let i = 0; i < wielded.length; i++) {
  6674. say.add(await ActionInventory.createButton(wielded[i], resolve));
  6675. }
  6676. }
  6677. if (worn.length > 0) {
  6678. if (say.sequence.length > 0) {
  6679. say.add(Say.PARAGRAPH_BREAK);
  6680. }
  6681. say.add(new SayBold("Worn:"), Say.LINE_BREAK);
  6682. for (let i = 0; i < worn.length; i++) {
  6683. say.add(await ActionInventory.createButton(worn[i], resolve));
  6684. }
  6685. }
  6686. if (carried.length > 0) {
  6687. if (say.sequence.length > 0) {
  6688. say.add(Say.PARAGRAPH_BREAK);
  6689. }
  6690. say.add(new SayBold("Carried:"), Say.LINE_BREAK);
  6691. for (let i = 0; i < carried.length; i++) {
  6692. say.add(await ActionInventory.createButton(carried[i], resolve));
  6693. }
  6694. }
  6695. if (say.sequence.length == 0) {
  6696. return resolve(undefined);
  6697. }
  6698. buttons = await say.getHTMLContent();
  6699. Elements.CurrentTurnHandler.print(...(buttons));
  6700. }));
  6701. let chosenThing = await chosenPromise;
  6702. if (chosenThing != undefined) {
  6703. Elements.CurrentTurnHandler.unprint(...buttons);
  6704. Controls.KeyHandler.reset();
  6705. return new ActionExamine(WorldState.player, chosenThing);
  6706. }
  6707. else {
  6708. rulebook.noun.say.add("You have nothing.");
  6709. return false;
  6710. }
  6711. }
  6712. });
  6713. Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
  6714. name: "Add Take Inventory Command Rule",
  6715. firstPriority: Rule.PRIORITY_LOWEST,
  6716. priority: Rule.PRIORITY_MEDIUM,
  6717. code: (rulebook) => {
  6718. Elements.HyperlinkHandler.addCommonAction("Inventory", new ActionInventory(WorldState.player));
  6719. }
  6720. }));
  6721. class ActionSaveGame extends Action {
  6722. constructor() {
  6723. super(...arguments);
  6724. this.requiresTurn = false;
  6725. this.requiresNoun = false;
  6726. this.requiresVisibility = false;
  6727. }
  6728. getCommandText() {
  6729. return "save to file";
  6730. }
  6731. }
  6732. ActionSaveGame.check = new Rulebook("Check Saving");
  6733. ActionSaveGame.carry = new Rulebook("Carry out Saving");
  6734. ActionSaveGame.carry.addRule(new Rule({
  6735. name: "Save the game",
  6736. code: runner => {
  6737. SaveHandler.saveToFile();
  6738. runner.noun.say.add("Saved.");
  6739. }
  6740. }));
  6741. Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
  6742. name: "Add Save Command Rule",
  6743. firstPriority: Rule.PRIORITY_LOWEST,
  6744. priority: Rule.PRIORITY_LOWEST,
  6745. code: (rulebook) => {
  6746. Elements.HyperlinkHandler.addCommonAction("Save", new ActionSaveGame(WorldState.player));
  6747. }
  6748. }));
  6749. class ActionTalk extends Action {
  6750. getCommandText() {
  6751. return "talk to " + (this.getNoun(0) != undefined ? this.getNoun(0).getPrintedName() : "");
  6752. }
  6753. }
  6754. ActionTalk.PRIORITY_SITUATION_DIALOGUE = 9;
  6755. ActionTalk.PRIORITY_POSSESSION_DIALOGUE = 7;
  6756. ActionTalk.PRIORITY_LOCATION_DIALOGUE = 5;
  6757. ActionTalk.PRIORITY_COMMON_DIALOGUE = 3;
  6758. ActionTalk.PRIORITY_GLOBAL_DIALOGUE = 1;
  6759. ActionTalk.check = new Rulebook("Check Talking");
  6760. ActionTalk.carry = new Rulebook("Carry out Talking");
  6761. ActionTalk.defaultCarryTalkingRule = ActionTalk.carry.createAndAddRule({
  6762. name: "Talking - Doesn't want to talk",
  6763. firstPriority: -1,
  6764. priority: -1,
  6765. code: (rulebook) => {
  6766. let action = rulebook.noun;
  6767. let thing = action.getNoun(0);
  6768. if (thing instanceof Person) {
  6769. action.say = new Say("It doesn't look like ", new SayHeSheIt(thing), " wants to talk.");
  6770. }
  6771. else {
  6772. action.say = new Say("How are you going to talk to that?");
  6773. }
  6774. }
  6775. });
  6776. Elements.HyperlinkHandler.HyperlinkingRulebook.addRule(new Rule({
  6777. name: "Hyperlink - Talk",
  6778. firstPriority: Rule.PRIORITY_HIGHEST,
  6779. code: (rulebook) => {
  6780. let thing = rulebook.noun;
  6781. if (thing instanceof Person && thing.getRoom() == WorldState.player.getRoom()) {
  6782. Elements.HyperlinkHandler.addAvailableAction("Talk", new ActionTalk(WorldState.player, thing));
  6783. }
  6784. }
  6785. }));
  6786. class ActionWait extends Action {
  6787. constructor() {
  6788. super(...arguments);
  6789. this.requiresTurn = true;
  6790. this.requiresNoun = false;
  6791. this.requiresVisibility = false;
  6792. }
  6793. getCommandText() {
  6794. return "wait";
  6795. }
  6796. }
  6797. ActionWait.check = new Rulebook("Check Waiting");
  6798. ActionWait.carry = new Rulebook("Carry out Waiting");
  6799. ActionWait.carry.addRule(new Rule({
  6800. name: "Print waiting message",
  6801. code: runner => {
  6802. if (runner.noun.actor == WorldState.player) {
  6803. runner.noun.say.add("You wait.");
  6804. }
  6805. }
  6806. }));
  6807. Elements.HyperlinkHandler.CommonActionsRulebook.addRule(new Rule({
  6808. name: "Add Wait Command Rule",
  6809. firstPriority: Rule.PRIORITY_HIGHEST,
  6810. priority: Rule.PRIORITY_MEDIUM,
  6811. code: (rulebook) => {
  6812. Elements.HyperlinkHandler.addCommonAction("Wait", new ActionWait(WorldState.player));
  6813. }
  6814. }));
  6815. class ContentDescription {
  6816. constructor(name, group) {
  6817. this.saidCount = 0;
  6818. this.name = name;
  6819. this.group = group;
  6820. }
  6821. getScore() {
  6822. return (this.group).getScore();
  6823. }
  6824. getDescription(group) {
  6825. this.saidCount++;
  6826. if (typeof this.description == "function") {
  6827. return this.description(this, group);
  6828. }
  6829. return this.description;
  6830. }
  6831. setDescription(description) {
  6832. if (!(description instanceof Say)) {
  6833. this.description = new Say(description);
  6834. }
  6835. else {
  6836. this.description = description;
  6837. }
  6838. return this;
  6839. }
  6840. static pickDescriptions(cda, target) {
  6841. let a = cda.slice();
  6842. let groups = [];
  6843. for (let i = 0; i < a.length; i++) {
  6844. let randomIndex = Math.floor(Math.random() * (a.length - i)) + i;
  6845. let temp = a[i];
  6846. a[i] = a[randomIndex];
  6847. a[randomIndex] = temp;
  6848. }
  6849. a.sort((a, b) => {
  6850. let scoreA = a.getScore() / (a.saidCount + 1);
  6851. let scoreB = b.getScore() / (b.saidCount + 1);
  6852. if (scoreA != scoreB)
  6853. return scoreB - scoreA;
  6854. return 0;
  6855. });
  6856. a.forEach(description => {
  6857. groups.push(description.group);
  6858. });
  6859. let matches = target.matchAgainst(groups);
  6860. if (matches != undefined) {
  6861. let result = [];
  6862. matches.forEach(i => {
  6863. result.push(a[i].getDescription(target));
  6864. result.push(new Say(" "));
  6865. });
  6866. return result;
  6867. }
  6868. else {
  6869. console.warn("No description available for", target);
  6870. return [new Say("Warning: No description available for the current situation. Please report so it can be corrected.")];
  6871. }
  6872. }
  6873. }
  6874. class ContentDifferential {
  6875. constructor(...nouns) {
  6876. this.nouns = [];
  6877. this.score = 0;
  6878. this.addNoun(...nouns);
  6879. }
  6880. addNoun(...nouns) {
  6881. nouns.forEach(noun => {
  6882. this.nouns.push(noun);
  6883. });
  6884. this.score = this.getScore();
  6885. return this;
  6886. }
  6887. getNouns() {
  6888. return this.nouns;
  6889. }
  6890. replaceNouns(...nouns) {
  6891. this.nouns = nouns;
  6892. return this;
  6893. }
  6894. isMatch(cd, allowPartial = false) {
  6895. let check = this.getUnmatched(cd);
  6896. if ((allowPartial || check.unmatched.length == 0) && check.matching.length == 0) {
  6897. return true;
  6898. }
  6899. else if (check.matching.length == 0) {
  6900. for (let i = 0; i < check.unmatched.length; i++) {
  6901. if (!(check.unmatched[i] instanceof ContentMarker)) {
  6902. return false;
  6903. }
  6904. else {
  6905. if (check.unmatched[i].isImportant()) {
  6906. return false;
  6907. }
  6908. }
  6909. }
  6910. return true;
  6911. }
  6912. return false;
  6913. }
  6914. getUnmatched(cd) {
  6915. let unmatched = cd.nouns.slice();
  6916. let matching = this.nouns.slice();
  6917. for (let i = matching.length - 1; i >= 0; i--) {
  6918. for (let k = unmatched.length - 1; k >= 0; k--) {
  6919. if (ContentDifferential.compareNouns(matching[i], unmatched[k])) {
  6920. unmatched.splice(k, 1);
  6921. matching.splice(i, 1);
  6922. break;
  6923. }
  6924. }
  6925. }
  6926. return {
  6927. matching: matching,
  6928. unmatched: unmatched
  6929. };
  6930. }
  6931. getScore() {
  6932. let highest = 0;
  6933. let count = this.nouns.length;
  6934. this.nouns.forEach((noun) => {
  6935. let level = ContentDifferential.getNounLevel(noun);
  6936. if (highest < level) {
  6937. highest = level;
  6938. }
  6939. });
  6940. return highest + (count / 100);
  6941. }
  6942. static getNounLevel(noun) {
  6943. if (noun == undefined || noun == null) {
  6944. return 0;
  6945. }
  6946. else if (typeof noun == "function") {
  6947. if (noun.prototype instanceof Thing) {
  6948. let specifity = 2;
  6949. let parentClass = Object.getPrototypeOf(noun);
  6950. while (parentClass != Thing) {
  6951. specifity += 0.1;
  6952. parentClass = Object.getPrototypeOf(parentClass);
  6953. }
  6954. return specifity;
  6955. }
  6956. else {
  6957. return 2.5;
  6958. }
  6959. }
  6960. else if (noun instanceof Thing) {
  6961. return 4;
  6962. }
  6963. else if (noun instanceof ContentDifferential) {
  6964. return 1;
  6965. }
  6966. else {
  6967. return 0.5;
  6968. }
  6969. }
  6970. static compareNouns(a, b) {
  6971. if (a == undefined || a == null) {
  6972. return true;
  6973. }
  6974. if (typeof a == "function") {
  6975. return b == a || b instanceof a || (typeof b == "function" && b.prototype instanceof a);
  6976. }
  6977. else if (a instanceof Thing) {
  6978. return b == a;
  6979. }
  6980. return a === b;
  6981. }
  6982. static isMatch(matchFrom, matchAgainst) {
  6983. let unmatched = matchAgainst.slice();
  6984. let matching = matchFrom.slice();
  6985. for (let i = matching.length - 1; i >= 0; i--) {
  6986. for (let k = unmatched.length - 1; k >= 0; k--) {
  6987. if (matching[i].isMatch(unmatched[k])) {
  6988. unmatched.splice(k, 1);
  6989. matching.splice(i, 1);
  6990. break;
  6991. }
  6992. }
  6993. }
  6994. if (unmatched.length == 0 && matching.length == 0) {
  6995. return true;
  6996. }
  6997. else if (unmatched.length == 0) {
  6998. for (let i = 0; i < matching.length; i++) {
  6999. let nouns = matching[i].getNouns();
  7000. for (let k = 0; k < nouns.length; k++) {
  7001. if (!(nouns[k] instanceof ContentMarker)) {
  7002. return false;
  7003. }
  7004. else {
  7005. if (nouns[k].isImportant()) {
  7006. return false;
  7007. }
  7008. }
  7009. }
  7010. }
  7011. return true;
  7012. }
  7013. return false;
  7014. }
  7015. }
  7016. var ContentGroupMatch;
  7017. (function (ContentGroupMatch) {
  7018. ContentGroupMatch[ContentGroupMatch["NO_MATCH"] = 0] = "NO_MATCH";
  7019. ContentGroupMatch[ContentGroupMatch["PARTIAL_MATCH"] = 1] = "PARTIAL_MATCH";
  7020. ContentGroupMatch[ContentGroupMatch["PERFECT_MATCH"] = 2] = "PERFECT_MATCH";
  7021. })(ContentGroupMatch || (ContentGroupMatch = {}));
  7022. class ContentGroup {
  7023. constructor(...units) {
  7024. this.units = [];
  7025. units.forEach(unit => {
  7026. this.addUnit(unit);
  7027. });
  7028. }
  7029. addUnit(unit) {
  7030. this.units.push(unit);
  7031. return this;
  7032. }
  7033. reset() {
  7034. this.matching = this.units.slice();
  7035. }
  7036. isMatching() {
  7037. return this.matching.length;
  7038. }
  7039. setMatching(matching) {
  7040. this.matching = matching;
  7041. }
  7042. isMatch(cg) {
  7043. let unmatched = cg.matching.slice();
  7044. let matching = this.units.slice();
  7045. for (let i = matching.length - 1; i >= 0; i--) {
  7046. for (let k = unmatched.length - 1; k >= 0; k--) {
  7047. if (matching[i].isMatch(unmatched[k])) {
  7048. unmatched.splice(k, 1);
  7049. matching.splice(i, 1);
  7050. break;
  7051. }
  7052. }
  7053. }
  7054. return {
  7055. type: matching.length > 0 ? ContentGroupMatch.NO_MATCH :
  7056. unmatched.length == 0 ? ContentGroupMatch.PERFECT_MATCH :
  7057. ContentGroupMatch.PARTIAL_MATCH,
  7058. unmatched: unmatched
  7059. };
  7060. }
  7061. getScore() {
  7062. let score = 0;
  7063. this.units.forEach(unit => {
  7064. score += unit.getScore();
  7065. });
  7066. return score;
  7067. }
  7068. matchAgainst(a) {
  7069. let matches = [];
  7070. this.reset();
  7071. for (let i = 0; i < a.length; i++) {
  7072. let match = a[i].isMatch(this);
  7073. if (match.type != ContentGroupMatch.NO_MATCH) {
  7074. matches.push(i);
  7075. this.setMatching(match.unmatched);
  7076. }
  7077. if (!this.isMatching()) {
  7078. return matches;
  7079. }
  7080. }
  7081. return undefined;
  7082. }
  7083. }
  7084. class ContentMarker {
  7085. constructor(name, important) {
  7086. this.important = false;
  7087. this.name = name;
  7088. this.important = important == true;
  7089. }
  7090. isImportant() {
  7091. return this.important;
  7092. }
  7093. }
  7094. class ContentUnit {
  7095. constructor() {
  7096. this.categories = [];
  7097. }
  7098. addCategory(...nouns) {
  7099. this.categories.push(new ContentDifferential(...nouns));
  7100. }
  7101. isMatch(cu) {
  7102. return ContentDifferential.isMatch(this.categories, cu.categories);
  7103. }
  7104. getScore() {
  7105. let score = 0;
  7106. this.categories.forEach(diff => {
  7107. score += diff.score;
  7108. });
  7109. return score / this.categories.length;
  7110. }
  7111. matchAgainst(a) {
  7112. for (let i = 0; i < a.length; i++) {
  7113. if (a[i].isMatch(this)) {
  7114. return [i];
  7115. }
  7116. }
  7117. }
  7118. }
  7119. class CombatDescription extends ContentDescription {
  7120. constructor(name) {
  7121. super(name, new ContentGroup());
  7122. CombatDescription.DESCRIPTIONS.push(this);
  7123. }
  7124. addUnit() {
  7125. let unit = new CombatUnit();
  7126. this.group.addUnit(unit);
  7127. return unit;
  7128. }
  7129. static getDescription(target) {
  7130. return ContentDescription.pickDescriptions(CombatDescription.DESCRIPTIONS, target);
  7131. }
  7132. }
  7133. CombatDescription.DESCRIPTIONS = [];
  7134. class CombatHit extends ContentMarker {
  7135. }
  7136. CombatHit.FULL_DODGE = new CombatHit("Full Dodge", true);
  7137. CombatHit.PARTIAL_DODGE = new CombatHit("Partial Dodge", true);
  7138. CombatHit.FULL_HIT = new CombatHit("Full Hit", true);
  7139. class CombatDamage extends ContentMarker {
  7140. }
  7141. CombatDamage.LOW_DAMAGE = new CombatDamage("Low Damage");
  7142. CombatDamage.MEDIUM_DAMAGE = new CombatDamage("Medium Damage");
  7143. CombatDamage.HIGH_DAMAGE = new CombatDamage("High Damage");
  7144. class CombatResult extends ContentMarker {
  7145. }
  7146. CombatResult.KNOCKED = new CombatResult("Target was knocked down by the attack", true);
  7147. CombatResult.KNOCKED_OFF = new CombatResult("Target was knocked off by the attack, becoming unconscious", true);
  7148. CombatResult.KILLED = new CombatResult("Target was killed by this attack", true);
  7149. class CombatUnit extends ContentUnit {
  7150. constructor() {
  7151. super();
  7152. this.actor = new ContentDifferential(Person);
  7153. this.target = new ContentDifferential(Person);
  7154. this.weapon = new ContentDifferential(Thing);
  7155. this.markers = new ContentDifferential();
  7156. }
  7157. setActor(it) {
  7158. this.actor = new ContentDifferential(it);
  7159. return this;
  7160. }
  7161. setTarget(it) {
  7162. this.target = new ContentDifferential(it);
  7163. return this;
  7164. }
  7165. setWeapon(it) {
  7166. this.weapon = new ContentDifferential(it);
  7167. return this;
  7168. }
  7169. addMarker(marker) {
  7170. this.markers.addNoun(marker);
  7171. return this;
  7172. }
  7173. getScore() {
  7174. return this.actor.getScore() + this.target.getScore() + this.weapon.getScore() + this.markers.getScore();
  7175. }
  7176. isMatch(cu) {
  7177. if (cu instanceof CombatUnit) {
  7178. return this.actor.isMatch(cu.actor) && this.target.isMatch(cu.target) &&
  7179. this.weapon.isMatch(cu.weapon) && this.markers.isMatch(cu.markers);
  7180. }
  7181. return false;
  7182. }
  7183. }
  7184. class FuckingDescription extends ContentDescription {
  7185. constructor(name) {
  7186. super(name, new ContentGroup());
  7187. FuckingDescription.DESCRIPTIONS.push(this);
  7188. }
  7189. addUnit() {
  7190. let unit = new FuckingUnit();
  7191. this.group.addUnit(unit);
  7192. return unit;
  7193. }
  7194. static getDescription(target) {
  7195. return ContentDescription.pickDescriptions(FuckingDescription.DESCRIPTIONS, target);
  7196. }
  7197. }
  7198. FuckingDescription.DESCRIPTIONS = [];
  7199. class FuckingStyle extends ContentMarker {
  7200. }
  7201. FuckingStyle.GENTLE = new FuckingStyle("Gentle");
  7202. FuckingStyle.ROUGH = new FuckingStyle("Rough");
  7203. class FuckingState extends ContentMarker {
  7204. }
  7205. FuckingState.PENETRATING = new FuckingState("Penetration Start", true);
  7206. FuckingState.REMOVING = new FuckingState("Removing Stick", true);
  7207. FuckingState.SPEEDING_UP = new FuckingState("Speeding up", true);
  7208. FuckingState.CUM_START = new FuckingState("Started Cumming", true);
  7209. FuckingState.CUMMING = new FuckingState("Cumming", true);
  7210. FuckingState.CUM_END = new FuckingState("Finished Cumming", true);
  7211. FuckingState.CUM_INSIDE = new FuckingState("Cum Inside", true);
  7212. FuckingState.CUM_OUTSIDE = new FuckingState("Cum Outside", true);
  7213. class FuckingUnit extends ContentUnit {
  7214. constructor() {
  7215. super();
  7216. this.fucker = new ContentDifferential(Person);
  7217. this.fucked = new ContentDifferential(Person);
  7218. this.hole = new ContentDifferential(SexHole);
  7219. this.stick = new ContentDifferential(SexStick);
  7220. this.markers = new ContentDifferential();
  7221. }
  7222. setFucker(it) {
  7223. this.fucker = new ContentDifferential(it);
  7224. return this;
  7225. }
  7226. setFucked(it) {
  7227. this.fucked = new ContentDifferential(it);
  7228. return this;
  7229. }
  7230. setHole(it) {
  7231. this.hole = new ContentDifferential(it);
  7232. return this;
  7233. }
  7234. setStick(it) {
  7235. this.stick = new ContentDifferential(it);
  7236. return this;
  7237. }
  7238. addMarker(marker) {
  7239. this.markers.addNoun(marker);
  7240. return this;
  7241. }
  7242. getScore() {
  7243. return this.fucker.getScore() + this.fucked.getScore() + this.hole.getScore() + this.stick.getScore() + this.markers.getScore();
  7244. }
  7245. isMatch(fu) {
  7246. if (fu instanceof FuckingUnit) {
  7247. return this.fucker.isMatch(fu.fucker) && this.fucked.isMatch(fu.fucked) &&
  7248. this.hole.isMatch(fu.hole) && this.stick.isMatch(fu.stick) && this.markers.isMatch(fu.markers);
  7249. }
  7250. return false;
  7251. }
  7252. }
  7253. class BranchingOption {
  7254. constructor(say, appearCondition) {
  7255. this.previouslyPicked = false;
  7256. this.say = say;
  7257. this.appearCondition = appearCondition;
  7258. }
  7259. }
  7260. class BranchingDialogue {
  7261. constructor(...options) {
  7262. this.options = [];
  7263. this.addOptions(...options);
  7264. }
  7265. addOptions(...options) {
  7266. this.options.push(...options);
  7267. arrayUnique(this.options);
  7268. }
  7269. async getChosenOption() {
  7270. let validOptions = [];
  7271. for (let i = 0, value = this.options[i]; value != undefined; value = this.options[++i]) {
  7272. if (value.appearCondition == undefined || (typeof value.appearCondition == "function" && value.appearCondition()) || value.appearCondition) {
  7273. validOptions.push(value);
  7274. }
  7275. }
  7276. let choiceButtons = [];
  7277. for (let i = 0; i < validOptions.length; i++) {
  7278. let value = validOptions[i];
  7279. let classes = ["choice"];
  7280. if (value.previouslyPicked) {
  7281. classes.push("picked");
  7282. }
  7283. choiceButtons.push((await value.say.getHTML("p", classes))[0]);
  7284. }
  7285. let PlayerInput = new Promise((resolve, reject) => {
  7286. this.resolve = resolve;
  7287. });
  7288. Controls.KeyHandler.reset();
  7289. for (let index = 0, value = choiceButtons[index]; value != undefined; value = choiceButtons[++index]) {
  7290. Controls.KeyHandler.applyCode(value, Controls.KeyHandler.getFirstKeyCode());
  7291. value.addEventListener("click", (e) => {
  7292. validOptions[index].previouslyPicked = true;
  7293. this.resolve(validOptions[index]);
  7294. e.preventDefault();
  7295. });
  7296. }
  7297. await Elements.CurrentTurnHandler.print(...choiceButtons);
  7298. let choice = await PlayerInput;
  7299. await Elements.CurrentTurnHandler.unprint(...choiceButtons);
  7300. return choice;
  7301. }
  7302. }
  7303. var NodeType;
  7304. (function (NodeType) {
  7305. NodeType[NodeType["Node"] = 0] = "Node";
  7306. NodeType[NodeType["Tree"] = 1] = "Tree";
  7307. NodeType[NodeType["Text"] = 2] = "Text";
  7308. NodeType[NodeType["Set"] = 3] = "Set";
  7309. NodeType[NodeType["Choice"] = 4] = "Choice";
  7310. NodeType[NodeType["Branch"] = 5] = "Branch";
  7311. })(NodeType || (NodeType = {}));
  7312. class DialogueNode {
  7313. constructor(id) {
  7314. this.type = NodeType.Node;
  7315. this.id = id;
  7316. }
  7317. setName(name) {
  7318. this.name = name;
  7319. }
  7320. setNext(next) {
  7321. this.next = next;
  7322. }
  7323. getNext() {
  7324. return this.next;
  7325. }
  7326. setChoices(choices) {
  7327. this.choices = choices;
  7328. }
  7329. hasChoices() {
  7330. return this.choices != undefined && this.choices.length > 0;
  7331. }
  7332. }
  7333. class DialogueBranch extends DialogueNode {
  7334. constructor() {
  7335. super(...arguments);
  7336. this.type = NodeType.Branch;
  7337. this.variable = () => { return false; };
  7338. this.branchIds = [];
  7339. this.branchConditions = [];
  7340. }
  7341. setVariable(varFunc) {
  7342. this.variable = varFunc;
  7343. }
  7344. addBranch(targetid, valueFunc) {
  7345. this.branchIds.push(targetid);
  7346. this.branchConditions.push(valueFunc);
  7347. }
  7348. getNext() {
  7349. let variable = this.variable();
  7350. for (let i = 0; i < this.branchIds.length; i++) {
  7351. let comparing = this.branchConditions[i]();
  7352. if (comparing == variable) {
  7353. return this.branchIds[i];
  7354. }
  7355. }
  7356. return this.next;
  7357. }
  7358. }
  7359. class DialogueText extends DialogueNode {
  7360. constructor() {
  7361. super(...arguments);
  7362. this.type = NodeType.Text;
  7363. }
  7364. setSay(sayCreator) {
  7365. this.sayCreator = sayCreator;
  7366. }
  7367. getSay() {
  7368. return this.sayCreator();
  7369. }
  7370. }
  7371. class DialogueChoice extends DialogueText {
  7372. constructor() {
  7373. super(...arguments);
  7374. this.type = NodeType.Choice;
  7375. this.conditions = () => { return true; };
  7376. }
  7377. isAvailable() {
  7378. return this.conditions();
  7379. }
  7380. setConditions(conditions) {
  7381. this.conditions = conditions;
  7382. }
  7383. }
  7384. class DialogueNodeTree extends DialogueNode {
  7385. constructor() {
  7386. super(...arguments);
  7387. this.type = NodeType.Tree;
  7388. }
  7389. setTree(treeFinder) {
  7390. this.tree = treeFinder;
  7391. }
  7392. }
  7393. class DialogueSet extends DialogueNode {
  7394. constructor() {
  7395. super(...arguments);
  7396. this.type = NodeType.Set;
  7397. }
  7398. setFunction(code) {
  7399. this.code = code;
  7400. }
  7401. run() {
  7402. return this.code();
  7403. }
  7404. }
  7405. class DialogueTree {
  7406. constructor(id) {
  7407. this.nodes = {};
  7408. this.startNode = undefined;
  7409. this.repeatChoices = true;
  7410. this.id = id;
  7411. }
  7412. addNode(node) {
  7413. this.nodes[node.id] = node;
  7414. if (node.type == NodeType.Node) {
  7415. this.nodes[node.name] = node;
  7416. }
  7417. }
  7418. addStartNode(node) {
  7419. this.addNode(node);
  7420. this.startNode = node;
  7421. }
  7422. getNode(id) {
  7423. return this.nodes[id];
  7424. }
  7425. getNext(node) {
  7426. let next = node.getNext();
  7427. if (next != undefined) {
  7428. return this.getNode(next);
  7429. }
  7430. }
  7431. setRepeatChoices(doIt) {
  7432. this.repeatChoices = doIt;
  7433. }
  7434. async execute(startId) {
  7435. console.debug(Rulebook.getIndentation() + "[DialogueTree] Running " + this.id);
  7436. Rulebook.increaseIndentation(this);
  7437. let node;
  7438. if (startId == undefined) {
  7439. node = this.startNode;
  7440. }
  7441. else {
  7442. node = this.getNode(startId);
  7443. }
  7444. if (node == undefined) {
  7445. Elements.CurrentTurnHandler.printAsError("Unable to start dialogue " + this.id + ": A starting node could not be found.");
  7446. return;
  7447. }
  7448. let previousNode;
  7449. while (node != undefined) {
  7450. let nextNode = await this.processNode(node, previousNode);
  7451. previousNode = node;
  7452. node = nextNode;
  7453. }
  7454. Rulebook.decreaseIndentation();
  7455. }
  7456. async processNode(node, previousNode) {
  7457. console.debug(Rulebook.getIndentation() + "[" + node.type + "] " + node.id);
  7458. Rulebook.increaseIndentation(node);
  7459. let doChoices = node.hasChoices();
  7460. if (node.type == NodeType.Tree) {
  7461. await node.tree().execute();
  7462. }
  7463. else if (node.type == NodeType.Text) {
  7464. let say = node.getSay();
  7465. Elements.CurrentTurnHandler.printAsContent(say);
  7466. }
  7467. else if (node.type == NodeType.Set) {
  7468. let runningSet = node.run();
  7469. if (runningSet instanceof Promise) {
  7470. await runningSet;
  7471. }
  7472. }
  7473. if (doChoices) {
  7474. let branchingDialogue = new BranchingDialogue();
  7475. let choices = node.choices;
  7476. let options = [];
  7477. for (let i = 0; i < choices.length; i++) {
  7478. let choice = this.getNode(choices[i]);
  7479. let branchingOption = new BranchingOption(choice.getSay(), choice.isAvailable());
  7480. options.push(branchingOption);
  7481. branchingDialogue.addOptions(branchingOption);
  7482. }
  7483. let chosenOption = await branchingDialogue.getChosenOption();
  7484. let chosenNodeId = choices[options.indexOf(chosenOption)];
  7485. let chosenNode = this.getNode(chosenNodeId);
  7486. if (this.repeatChoices) {
  7487. let say = new Say(new SayBold(" > ", chosenNode.getSay()));
  7488. this.lastPrintedChoice = await Elements.CurrentTurnHandler.getSayElementsAsContent(say);
  7489. await Elements.CurrentTurnHandler.print(...this.lastPrintedChoice);
  7490. }
  7491. console.debug(Rulebook.getIndentation() + "[Choice] Picked " + chosenNodeId);
  7492. console.debug(Rulebook.getIndentation() + "[Choice] Going to " + chosenNode.getNext());
  7493. Rulebook.increaseIndentation(chosenNodeId);
  7494. Rulebook.decreaseIndentation();
  7495. Rulebook.decreaseIndentation();
  7496. return this.getNext(chosenNode);
  7497. }
  7498. else {
  7499. Rulebook.decreaseIndentation();
  7500. return this.getNext(node);
  7501. }
  7502. }
  7503. unprintLastChoice() {
  7504. Elements.CurrentTurnHandler.unprint(...this.lastPrintedChoice);
  7505. }
  7506. }
  7507. var DialogueTrees;
  7508. (function (DialogueTrees) {
  7509. function findUnusedTrees() {
  7510. let allCode = document.getElementById("appCode").innerHTML;
  7511. let useCount = {};
  7512. let unused = [];
  7513. for (let dialogueName in DialogueTrees) {
  7514. if (dialogueName != "findUnusedTrees") {
  7515. let count = occurrences(allCode, "DialogueTrees." + dialogueName, false) - 1;
  7516. if (count > 0) {
  7517. useCount[dialogueName] = count;
  7518. }
  7519. else {
  7520. unused.push(dialogueName);
  7521. }
  7522. }
  7523. }
  7524. for (let dialogueName in useCount) {
  7525. let times = useCount[dialogueName];
  7526. console.debug("[DialogueUsage] " + dialogueName + " is referenced " + times + (times > 1 ? " times." : " time."));
  7527. }
  7528. for (let i = 0; i < unused.length; i++) {
  7529. console.error("[DialogueUsage] " + unused[i] + " is never referenced and will not appear in-game.");
  7530. }
  7531. }
  7532. DialogueTrees.findUnusedTrees = findUnusedTrees;
  7533. function occurrences(string, subString, allowOverlapping) {
  7534. string += "";
  7535. subString += "";
  7536. if (subString.length <= 0)
  7537. return (string.length + 1);
  7538. var n = 0, pos = 0, step = allowOverlapping ? 1 : subString.length;
  7539. while (true) {
  7540. pos = string.indexOf(subString, pos);
  7541. if (pos >= 0) {
  7542. ++n;
  7543. pos += step;
  7544. }
  7545. else
  7546. break;
  7547. }
  7548. return n;
  7549. }
  7550. })(DialogueTrees || (DialogueTrees = {}));
  7551. class RoomRandom extends Room {
  7552. constructor(id, fodder) {
  7553. super(id, fodder);
  7554. this.connectableOn = [Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST];
  7555. this.randomizable = true;
  7556. this.placed = false;
  7557. this.appearChance = 75;
  7558. this.extraConnectionChance = 75;
  7559. this.backgroundImage = "tomato";
  7560. }
  7561. getBackgroundClass() {
  7562. if (this.isImageDefined()) {
  7563. return this.backgroundImage;
  7564. }
  7565. return "tomato";
  7566. }
  7567. isImageDefined() {
  7568. try {
  7569. for (var i = 0; i < document.styleSheets.length; i++) {
  7570. var rules = document.styleSheets[i]['rules'] || document.styleSheets[i]['cssRules'];
  7571. for (var x in rules) {
  7572. if (typeof rules[x].selectorText == 'string' && rules[x].selectorText == "." + this.backgroundImage) {
  7573. return true;
  7574. }
  7575. }
  7576. }
  7577. return false;
  7578. }
  7579. catch (e) {
  7580. console.warn("Unable to read image");
  7581. return true;
  7582. }
  7583. }
  7584. isConnectableOn(oppositeDirection) {
  7585. return this.connectableOn.indexOf(oppositeDirection) != -1;
  7586. }
  7587. getAnyDirection(options) {
  7588. let directionShuffler = new Shuffler(this.connectableOn);
  7589. for (let direction = directionShuffler.getOne(); direction != undefined; direction = directionShuffler.getOne()) {
  7590. let oppositeDirection = OppositeDirection[Direction[direction]];
  7591. let otherCoordinates = options.map.getCoordinates(options.otherRoom);
  7592. let wouldbeCoordinates = Room.shift(otherCoordinates, oppositeDirection);
  7593. let trickyOptions = {
  7594. otherRoom: options.otherRoom,
  7595. otherRoomDirection: oppositeDirection,
  7596. trickyRoomDirection: direction,
  7597. map: options.map,
  7598. region: options.region,
  7599. x: wouldbeCoordinates[0],
  7600. y: wouldbeCoordinates[1]
  7601. };
  7602. if (this.isPlaceable(trickyOptions)) {
  7603. return trickyOptions;
  7604. }
  7605. }
  7606. }
  7607. isPlaceable(options) {
  7608. if (!this.isConnectableOn(options.trickyRoomDirection) || !options.map.isFree(options.x, options.y)) {
  7609. return false;
  7610. }
  7611. if (options.otherRoom == undefined || !options.otherRoom.isConnectableOn(options.otherRoomDirection)) {
  7612. return false;
  7613. }
  7614. if (this.trickyCode != undefined) {
  7615. return this.trickyCode(options);
  7616. }
  7617. return true;
  7618. }
  7619. getDistanceTo(room) {
  7620. let myCoordinates = this.lastMap.getCoordinates(this);
  7621. let otherCoordinates = this.lastMap.getCoordinates(room);
  7622. if (myCoordinates != undefined && otherCoordinates != undefined) {
  7623. let c1 = myCoordinates;
  7624. let c2 = otherCoordinates;
  7625. return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]);
  7626. }
  7627. }
  7628. findPathTo(pathEnd, validRoom) {
  7629. validRoom = validRoom == undefined ? () => { return true; } : validRoom;
  7630. let map = this.lastMap;
  7631. let endPosition = map.getCoordinates(pathEnd);
  7632. let open = [];
  7633. let distance = (c1, c2) => {
  7634. return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]);
  7635. };
  7636. let neighbors = (room, x, y) => {
  7637. let neighs = [];
  7638. for (let direction = 0; direction < room.connections.length; direction++) {
  7639. let otherRoom = room.connections[direction];
  7640. if (otherRoom != undefined && open.indexOf(otherRoom) == -1 && validRoom(otherRoom)) {
  7641. let dirCoordinates = Room.shift([x, y], direction);
  7642. let dir = [otherRoom, dirCoordinates, distance(endPosition, dirCoordinates)];
  7643. neighs.push(dir);
  7644. }
  7645. }
  7646. return neighs.sort((a, b) => { return a[2] - b[2]; });
  7647. };
  7648. let shortestPath = {
  7649. length: map.getRoomCount()
  7650. };
  7651. let noPath = shortestPath;
  7652. let cPath = [];
  7653. let findPath = (myArray) => {
  7654. let room = myArray[0];
  7655. cPath.push(myArray);
  7656. if (room == pathEnd) {
  7657. if (shortestPath.length >= cPath.length) {
  7658. shortestPath = cPath.slice(0);
  7659. }
  7660. }
  7661. else if (shortestPath.length > (cPath.length)) {
  7662. open.push(room);
  7663. let otherRooms = neighbors(room, myArray[1][0], myArray[1][1]);
  7664. for (let i = 0; i < otherRooms.length; i++) {
  7665. if ((cPath.length + 1) < shortestPath.length) {
  7666. findPath(otherRooms[i]);
  7667. }
  7668. }
  7669. open.pop();
  7670. }
  7671. cPath.pop();
  7672. };
  7673. findPath([this, map.getCoordinates(this)]);
  7674. return shortestPath != noPath ? shortestPath : undefined;
  7675. }
  7676. getBestDirectionTo(otherRoom, validRoom) {
  7677. let path = this.findPathTo(otherRoom, validRoom);
  7678. if (path != undefined) {
  7679. if (path.length == 1) {
  7680. return undefined;
  7681. }
  7682. return this.connections.indexOf(path[1][0]);
  7683. }
  7684. }
  7685. getAStarPathTo(otherRoom, validRoom) {
  7686. validRoom = validRoom != undefined ? validRoom : () => { return true; };
  7687. let distance = (c1, c2) => {
  7688. return Math.abs(c1[0] - c2[0]) + Math.abs(c1[1] - c2[1]);
  7689. };
  7690. let isVisited = (room) => {
  7691. return visited.indexOf(room) != -1;
  7692. };
  7693. let getNeighbors = (node) => {
  7694. let neighbors = [];
  7695. for (let direction = 0; direction < node.room.connections.length; direction++) {
  7696. if (node.room.connections[direction] != undefined && !isVisited(node.room.connections[direction]) && validRoom(node.room.connections[direction])) {
  7697. let coordinates = Room.shift(node.coordinates, direction);
  7698. neighbors.push({
  7699. room: node.room.connections[direction],
  7700. coordinates: coordinates,
  7701. distance: distance(coordinates, endNode.coordinates)
  7702. });
  7703. visited.push(node.room.connections[direction]);
  7704. }
  7705. }
  7706. return neighbors;
  7707. };
  7708. let getClosestPath = () => {
  7709. let shortest = 0;
  7710. for (let i = 1; i < open.length; i++) {
  7711. let lastPoint = open[i][open[i].length - 1];
  7712. if (lastPoint.distance < open[shortest][open[shortest].length - 1].distance) {
  7713. shortest = i;
  7714. }
  7715. }
  7716. return shortest;
  7717. };
  7718. let endNode = { room: otherRoom, coordinates: this.lastMap.getCoordinates(otherRoom), distance: 0 };
  7719. let startCoordinates = this.lastMap.getCoordinates(this);
  7720. let startNode = { room: this, coordinates: startCoordinates, distance: distance(startCoordinates, endNode.coordinates) };
  7721. let open = [[startNode]];
  7722. let closed = [];
  7723. let shortestPath = this.lastMap.getRoomCount();
  7724. let shortestIndex;
  7725. let myPath;
  7726. let closest = 0;
  7727. let visited = [this];
  7728. while (open.length > 0) {
  7729. myPath = open.splice(closest, 1)[0];
  7730. if (myPath[myPath.length - 1].distance == 0) {
  7731. let push = closed.push(myPath);
  7732. if (myPath.length < shortestPath) {
  7733. shortestPath = myPath.length;
  7734. shortestIndex = push - 1;
  7735. }
  7736. break;
  7737. }
  7738. else {
  7739. let neighbors = getNeighbors(myPath[myPath.length - 1]);
  7740. for (let i = 0; i < neighbors.length; i++) {
  7741. open.push(myPath.concat([neighbors[i]]));
  7742. }
  7743. }
  7744. for (let i = open.length - 1; i >= 0; i--) {
  7745. if (open[i].length >= shortestPath) {
  7746. open.splice(i, 1);
  7747. }
  7748. }
  7749. closest = getClosestPath();
  7750. }
  7751. return closed[shortestIndex];
  7752. }
  7753. getAStarBestDirectionTo(otherRoom, validRoom) {
  7754. let path = this.getAStarPathTo(otherRoom, validRoom);
  7755. if (path != undefined) {
  7756. if (path.length == 1) {
  7757. return undefined;
  7758. }
  7759. return this.connections.indexOf(path[1].room);
  7760. }
  7761. }
  7762. getConnectedDirection() {
  7763. let shuffler = new Shuffler(Room.DIRECTIONS);
  7764. for (let direction = shuffler.getOne(); direction != undefined; direction = shuffler.getOne()) {
  7765. if (this.connections[direction] != undefined) {
  7766. return direction;
  7767. }
  7768. }
  7769. }
  7770. static getActive(type) {
  7771. }
  7772. }
  7773. class RoomRandomMap {
  7774. constructor() {
  7775. this.positionTable = {};
  7776. this.roomMap = new Map();
  7777. this.lowestX = 0;
  7778. this.lowestY = 0;
  7779. this.highestX = 0;
  7780. this.highestY = 0;
  7781. this.limitsInvalid = false;
  7782. }
  7783. emptyCache() {
  7784. this.availableConnections = [];
  7785. Room.DIRECTIONS.forEach(() => {
  7786. this.availableConnections.push([]);
  7787. });
  7788. this.rooms = 0;
  7789. }
  7790. getAvailableConnections() {
  7791. return this.availableConnections.reduce((previousValue, currentValue, currentIndex, array) => {
  7792. return previousValue + (currentValue.length);
  7793. }, 0);
  7794. }
  7795. removeFromCache(coordinatesToRemove, direction) {
  7796. let directionArray = this.availableConnections[direction];
  7797. for (let k = 0, coordinates = directionArray[k]; coordinates != undefined; coordinates = directionArray[++k]) {
  7798. if (coordinates.x == coordinatesToRemove.x && coordinates.y == coordinatesToRemove.y) {
  7799. directionArray.splice(k, 1);
  7800. return;
  7801. }
  7802. }
  7803. }
  7804. addToCache(coordinatesToAdd, direction) {
  7805. let directionArray = this.availableConnections[direction];
  7806. for (let k = 0, coordinates = directionArray[k]; coordinates != undefined; coordinates = directionArray[++k]) {
  7807. if (coordinates.x == coordinatesToAdd.x && coordinates.y == coordinatesToAdd.y) {
  7808. return;
  7809. }
  7810. }
  7811. directionArray.push(coordinatesToAdd);
  7812. }
  7813. getAnyFromCache(direction) {
  7814. let array = this.availableConnections[direction];
  7815. if (array.length > 0) {
  7816. let randomIndex = Math.floor(Math.random() * (array.length));
  7817. let randomCoordinates = array[randomIndex];
  7818. if (randomCoordinates != undefined) {
  7819. return this.getRoom(randomCoordinates.x, randomCoordinates.y);
  7820. }
  7821. }
  7822. }
  7823. isFree(x, y) {
  7824. return (this.positionTable[x] == undefined || this.positionTable[x][y] === undefined);
  7825. }
  7826. block(x, y) {
  7827. if (this.isFree(x, y)) {
  7828. if (this.positionTable[x] == undefined) {
  7829. this.positionTable[x] = {};
  7830. }
  7831. this.positionTable[x][y] = null;
  7832. this.updateCacheOnPosition(x, y);
  7833. this.updateLimits(x, y);
  7834. }
  7835. }
  7836. updateAllLimits() {
  7837. this.highestX = 0;
  7838. this.highestY = 0;
  7839. this.lowestX = 0;
  7840. this.lowestY = 0;
  7841. for (let x in this.positionTable) {
  7842. for (let y in this.positionTable[x]) {
  7843. if (this.positionTable[x][y] != undefined && this.positionTable[x][y] != null) {
  7844. this.updateLimits(parseInt(x), parseInt(y));
  7845. }
  7846. }
  7847. }
  7848. this.limitsInvalid = false;
  7849. }
  7850. updateLimits(x, y) {
  7851. if (x > this.highestX)
  7852. this.highestX = x;
  7853. if (y > this.highestY)
  7854. this.highestY = y;
  7855. if (y < this.lowestY)
  7856. this.lowestY = y;
  7857. if (x < this.lowestX)
  7858. this.lowestX = x;
  7859. }
  7860. map(room, x, y) {
  7861. if (this.positionTable[x] == undefined) {
  7862. this.positionTable[x] = {};
  7863. }
  7864. this.positionTable[x][y] = room;
  7865. this.roomMap.set(room, [x, y]);
  7866. this.updateCacheOnPosition(x, y);
  7867. this.updateLimits(x, y);
  7868. room.placed = true;
  7869. room.lastMap = this;
  7870. this.rooms++;
  7871. }
  7872. unmap(x, y) {
  7873. if (this.positionTable[x] != undefined && this.positionTable[x][y] != undefined) {
  7874. this.roomMap.delete(this.positionTable[x][y]);
  7875. delete (this.positionTable[x][y]);
  7876. this.rooms--;
  7877. this.updateCacheOnPosition(x, y);
  7878. this.limitsInvalid = true;
  7879. }
  7880. }
  7881. updateCacheOnPosition(x, y) {
  7882. let coordinates = [x, y, 0];
  7883. let coordinatesMap = { x: x, y: y };
  7884. let coordinatesBlocked = !this.isFree(x, y);
  7885. let coordinatesRoom = this.getRoom(x, y);
  7886. Room.DIRECTIONS.forEach(direction => {
  7887. let oppositeDirection = OppositeDirection[Direction[direction]];
  7888. let shifted = Room.shift(coordinates, direction);
  7889. let shiftedMap = { x: shifted[0], y: shifted[1] };
  7890. let shiftedBlocked = !this.isFree(shifted[0], shifted[1]);
  7891. let shiftedRoom = this.getRoom(shifted[0], shifted[1]);
  7892. if (coordinatesRoom != undefined) {
  7893. if (shiftedBlocked) {
  7894. this.removeFromCache(coordinatesMap, direction);
  7895. }
  7896. else if (coordinatesRoom.isConnectableOn(direction)) {
  7897. this.addToCache(coordinatesMap, direction);
  7898. }
  7899. }
  7900. else {
  7901. this.removeFromCache(coordinatesMap, direction);
  7902. }
  7903. if (shiftedRoom != undefined) {
  7904. if (coordinatesBlocked) {
  7905. this.removeFromCache(shiftedMap, oppositeDirection);
  7906. }
  7907. else if (shiftedRoom.isConnectableOn(oppositeDirection)) {
  7908. this.addToCache(shiftedMap, oppositeDirection);
  7909. }
  7910. }
  7911. else {
  7912. this.removeFromCache(shiftedMap, oppositeDirection);
  7913. }
  7914. });
  7915. }
  7916. getRoom(x, y) {
  7917. if (this.positionTable[x] != undefined) {
  7918. if (this.positionTable[x][y] != null) {
  7919. return this.positionTable[x][y];
  7920. }
  7921. }
  7922. return undefined;
  7923. }
  7924. getCoordinates(room) {
  7925. return this.roomMap.get(room);
  7926. }
  7927. getRoomCount() {
  7928. return this.roomMap.size;
  7929. }
  7930. getWidth() {
  7931. return this.highestX - this.lowestX;
  7932. }
  7933. getHeight() {
  7934. return this.highestY - this.lowestY;
  7935. }
  7936. getPreferredGrowth() {
  7937. let ratio = this.getHeight() / this.getWidth();
  7938. let idealRatio = 2.5;
  7939. let difference = Math.abs(ratio - idealRatio);
  7940. if (difference < 0.5) {
  7941. return RoomRandomMap.PREFERRED_GROWTH_ANY;
  7942. }
  7943. else {
  7944. if (ratio < idealRatio) {
  7945. return RoomRandomMap.PREFERRED_GROWTH_VERTICAL;
  7946. }
  7947. else {
  7948. return RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL;
  7949. }
  7950. }
  7951. }
  7952. static isDirectionPreferred(direction, growth) {
  7953. if (growth == RoomRandomMap.PREFERRED_GROWTH_ANY) {
  7954. return true;
  7955. }
  7956. else if (direction == Direction.NORTH || direction == Direction.SOUTH) {
  7957. return growth == RoomRandomMap.PREFERRED_GROWTH_VERTICAL;
  7958. }
  7959. else {
  7960. return growth == RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL;
  7961. }
  7962. }
  7963. }
  7964. RoomRandomMap.PREFERRED_GROWTH_HORIZONTAL = 0;
  7965. RoomRandomMap.PREFERRED_GROWTH_VERTICAL = 1;
  7966. RoomRandomMap.PREFERRED_GROWTH_ANY = 2;
  7967. class ShufflerDirection extends Shuffler {
  7968. constructor(array, preferredGrowth, rng) {
  7969. super(array, rng);
  7970. this.runner = 0;
  7971. this.preferredGrowth = preferredGrowth;
  7972. let goodDirections = [];
  7973. let badDirections = [];
  7974. for (let direction = this.getOne(); direction != undefined; direction = this.getOne()) {
  7975. if (RoomRandomMap.isDirectionPreferred(direction, this.preferredGrowth)) {
  7976. goodDirections.push(direction);
  7977. }
  7978. else {
  7979. badDirections.push(direction);
  7980. }
  7981. }
  7982. this.directionsArray = goodDirections.concat(badDirections);
  7983. }
  7984. getDirection() {
  7985. return this.directionsArray[this.runner++];
  7986. }
  7987. }
  7988. class RoomRandomFodder extends RoomRandom {
  7989. constructor(id) {
  7990. super(id, true);
  7991. }
  7992. }
  7993. class RegionRandom extends Region {
  7994. constructor(name, map) {
  7995. super(name);
  7996. this.randomized = false;
  7997. this.fodderRoomClass = RoomRandomFodder;
  7998. this.placedRooms = [];
  7999. this.map = map == undefined ? new RoomRandomMap() : map;
  8000. }
  8001. async randomize() {
  8002. if (!this.randomized) {
  8003. await RegionRandom.rulebookRandomizeRegion.execute({
  8004. noun: this
  8005. });
  8006. }
  8007. }
  8008. }
  8009. RegionRandom.rng = () => { return Math.random(); };
  8010. RegionRandom.rulebookRandomizeRegion = new Rulebook("Randomizing Random Region something");
  8011. RegionRandom.rulebookPlaceRoom = new Rulebook("Placing Random Room something");
  8012. RegionRandom.rulebookBeforePlaceRoom = new Rulebook("Before placing Random Room something");
  8013. RegionRandom.rulebookAfterPlaceRoom = new Rulebook("After placing Random Room something");
  8014. RegionRandom.ruleFirstRandomizeRegion = RegionRandom.rulebookRandomizeRegion.createAndAddRule({
  8015. name: "Empty map cache to start randomizing region",
  8016. firstPriority: Rule.PRIORITY_HIGHEST,
  8017. code: runner => {
  8018. let region = runner.noun;
  8019. region.map.emptyCache();
  8020. }
  8021. });
  8022. RegionRandom.ruleBasicRandomizeRegion = RegionRandom.rulebookRandomizeRegion.createAndAddRule({
  8023. name: "Randomize all unplaced, randomizable rooms in region something",
  8024. code: async (runner) => {
  8025. let region = runner.noun;
  8026. let roomShuffler = new Shuffler(Region.InRelation.getAllRightTypes(region, RoomRandom).filter((room) => {
  8027. return room.randomizable && !room.placed &&
  8028. (room == WorldState.player.getRoom() || (RegionRandom.rng() * 100) <= room.appearChance);
  8029. }), RegionRandom.rng);
  8030. for (let room = roomShuffler.getOne(); room != undefined; room = roomShuffler.getOne()) {
  8031. while (region.map.rooms > 0 && region.map.getAvailableConnections() < 4) {
  8032. let fodder = new region.fodderRoomClass();
  8033. let options = {
  8034. map: region.map,
  8035. room: fodder,
  8036. region: region
  8037. };
  8038. region.place(fodder);
  8039. await RegionRandom.rulebookBeforePlaceRoom.execute({ noun: options });
  8040. await RegionRandom.rulebookPlaceRoom.execute({ noun: options });
  8041. await RegionRandom.rulebookAfterPlaceRoom.execute({ noun: options });
  8042. }
  8043. let options = {
  8044. map: region.map,
  8045. room: room,
  8046. region: region
  8047. };
  8048. await RegionRandom.rulebookBeforePlaceRoom.execute({ noun: options });
  8049. await RegionRandom.rulebookPlaceRoom.execute({ noun: options });
  8050. await RegionRandom.rulebookAfterPlaceRoom.execute({ noun: options });
  8051. if (!room.placed) {
  8052. Elements.CurrentTurnHandler.printAsError(new Say("Was unable to place room ", room, ". Game might be unplayable."));
  8053. }
  8054. }
  8055. }
  8056. });
  8057. RegionRandom.ruleAddExtraConnections = RegionRandom.rulebookRandomizeRegion.createAndAddRule({
  8058. firstPriority: Rule.PRIORITY_LOWEST,
  8059. name: "Add extra connections to rooms in region",
  8060. code: runner => {
  8061. let region = runner.noun;
  8062. let placedRooms = Region.InRelation.getAllRightTypes(region, RoomRandom).filter((room) => {
  8063. return room.randomizable && room.placed;
  8064. });
  8065. placedRooms.forEach((room) => {
  8066. let myCoordinates = region.map.getCoordinates(room);
  8067. let directionShuffler = new Shuffler(room.connectableOn.slice(0), RegionRandom.rng);
  8068. for (let direction = directionShuffler.getOne(); direction != undefined && (RegionRandom.rng() * 100) <= room.extraConnectionChance; direction = directionShuffler.getOne()) {
  8069. if (room.connections[direction] == undefined) {
  8070. let otherCoordinates = Room.shift(myCoordinates, direction);
  8071. let otherRoom = region.map.getRoom(otherCoordinates[0], otherCoordinates[1]);
  8072. if (otherRoom != undefined && otherRoom.randomizable
  8073. && otherRoom.isConnectableOn(OppositeDirection[Direction[direction]])
  8074. && (RegionRandom.rng() * 100) <= otherRoom.extraConnectionChance) {
  8075. room.mapRoom(otherRoom, direction);
  8076. }
  8077. }
  8078. }
  8079. });
  8080. }
  8081. });
  8082. RegionRandom.rulePlaceFirstRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({
  8083. name: "Placing First room something",
  8084. firstPriority: Rule.PRIORITY_HIGHEST,
  8085. code: runner => {
  8086. let placingOptions = runner.noun;
  8087. if (placingOptions.map.isFree(0, 0)) {
  8088. placingOptions.map.map(placingOptions.room, 0, 0);
  8089. return true;
  8090. }
  8091. },
  8092. conditions: runner => {
  8093. return runner.noun.map.rooms == 0;
  8094. }
  8095. });
  8096. RegionRandom.rulePlaceNonTrickyRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({
  8097. name: "Placing non-tricky room something",
  8098. firstPriority: Rule.PRIORITY_HIGH,
  8099. code: runner => {
  8100. let placingOptions = runner.noun;
  8101. let preferredGrowthDirection = placingOptions.map.getPreferredGrowth();
  8102. let directionShuffler = new ShufflerDirection(placingOptions.room.connectableOn, preferredGrowthDirection);
  8103. for (let direction = directionShuffler.getDirection(); direction != undefined; direction = directionShuffler.getDirection()) {
  8104. let oppositeDirection = OppositeDirection[Direction[direction]];
  8105. let connectableRoom = placingOptions.map.getAnyFromCache(oppositeDirection);
  8106. if (connectableRoom != undefined) {
  8107. let otherCoordinates = placingOptions.map.getCoordinates(connectableRoom);
  8108. let myCoordinates = Room.shift(otherCoordinates, oppositeDirection);
  8109. placingOptions.room.mapRoom(connectableRoom, direction);
  8110. placingOptions.map.map(placingOptions.room, myCoordinates[0], myCoordinates[1]);
  8111. return true;
  8112. }
  8113. }
  8114. },
  8115. conditions: runner => {
  8116. return runner.noun.room.trickyCode == undefined;
  8117. }
  8118. });
  8119. RegionRandom.rulePlaceTrickyRoom = RegionRandom.rulebookPlaceRoom.createAndAddRule({
  8120. name: "Placing tricky room something",
  8121. code: runner => {
  8122. let placingOptions = runner.noun;
  8123. let placedRooms = placingOptions.region.getRooms().filter((room) => {
  8124. return room instanceof RoomRandom && room.placed;
  8125. });
  8126. if (placedRooms.length == 0) {
  8127. Elements.CurrentTurnHandler.printAsError("Unable to place room " + placingOptions.room.getPrintedName() + ": There are no rooms to connect to!");
  8128. return false;
  8129. }
  8130. let roomShuffler = new Shuffler(placedRooms, RegionRandom.rng);
  8131. for (let connectableRoom = roomShuffler.getOne(); connectableRoom != undefined; connectableRoom = roomShuffler.getOne()) {
  8132. let trickier = {
  8133. region: placingOptions.region,
  8134. map: placingOptions.map,
  8135. otherRoom: connectableRoom
  8136. };
  8137. let tricky = placingOptions.room.getAnyDirection(trickier);
  8138. if (tricky != undefined) {
  8139. placingOptions.room.mapRoom(connectableRoom, tricky.trickyRoomDirection);
  8140. placingOptions.map.map(placingOptions.room, tricky.x, tricky.y);
  8141. return true;
  8142. }
  8143. }
  8144. let connectableThroughFodder = (fodderStep, connectingRoom) => {
  8145. let trickier = {
  8146. region: placingOptions.region,
  8147. map: placingOptions.map,
  8148. otherRoom: connectingRoom
  8149. };
  8150. if (fodderStep == 0) {
  8151. return placingOptions.room.getAnyDirection(trickier);
  8152. }
  8153. else {
  8154. let newFodder = new (placingOptions.region.fodderRoomClass)();
  8155. let preferredGrowthDirection = placingOptions.map.getPreferredGrowth();
  8156. let directionShuffler = new ShufflerDirection(placingOptions.room.connectableOn, preferredGrowthDirection);
  8157. for (let direction = directionShuffler.getDirection(); direction != undefined; direction = directionShuffler.getDirection()) {
  8158. let oppositeDirection = OppositeDirection[Direction[direction]];
  8159. let otherCoordinates = placingOptions.map.getCoordinates(connectingRoom);
  8160. let wouldbeCoordinates = Room.shift(otherCoordinates, oppositeDirection);
  8161. let fodderTricky = {
  8162. otherRoom: connectingRoom,
  8163. otherRoomDirection: oppositeDirection,
  8164. trickyRoomDirection: direction,
  8165. map: placingOptions.map,
  8166. region: placingOptions.region,
  8167. x: wouldbeCoordinates[0],
  8168. y: wouldbeCoordinates[1]
  8169. };
  8170. if (newFodder.isPlaceable(fodderTricky)) {
  8171. newFodder.mapRoom(connectingRoom, fodderTricky.trickyRoomDirection);
  8172. placingOptions.map.map(newFodder, fodderTricky.x, fodderTricky.y);
  8173. let nextTricky = connectableThroughFodder(fodderStep - 1, newFodder);
  8174. if (nextTricky != undefined) {
  8175. placingOptions.region.place(newFodder);
  8176. return nextTricky;
  8177. }
  8178. else {
  8179. newFodder.unmapRoom(fodderTricky.trickyRoomDirection);
  8180. placingOptions.map.unmap(fodderTricky.x, fodderTricky.y);
  8181. }
  8182. }
  8183. }
  8184. }
  8185. };
  8186. for (let fodderLevel = 1; fodderLevel < 10; fodderLevel++) {
  8187. roomShuffler.restart();
  8188. for (let connectableRoom = roomShuffler.getOne(); connectableRoom != undefined; connectableRoom = roomShuffler.getOne()) {
  8189. let tricky = connectableThroughFodder(fodderLevel, connectableRoom);
  8190. if (tricky != undefined) {
  8191. placingOptions.room.mapRoom(tricky.otherRoom, tricky.trickyRoomDirection);
  8192. placingOptions.map.map(placingOptions.room, tricky.x, tricky.y);
  8193. return true;
  8194. }
  8195. }
  8196. }
  8197. Elements.CurrentTurnHandler.printAsError("Unable to place room " + placingOptions.room.getPrintedName() + ": All attempts failed");
  8198. return false;
  8199. }
  8200. });
  8201. class SavedEvent extends StoredVariable {
  8202. constructor(options) {
  8203. super(options);
  8204. this.description = options.description;
  8205. this.getValueDescription = options.valueDescription;
  8206. }
  8207. getDescription() {
  8208. return this.description;
  8209. }
  8210. }
  8211. let EVENT_ORC_CHIEF_KILLED = new SavedEvent({
  8212. id: "EVENT_ORC_CHIEF_KILLED",
  8213. description: "Describer whether the orc chief is alive or dead.",
  8214. value: false,
  8215. valueDescription: (value) => {
  8216. if (EVENT_ORC_CHIEF_KILLED.value) {
  8217. return "The orc chief has been killed.";
  8218. }
  8219. else {
  8220. return "The orc chief is alive.";
  8221. }
  8222. }
  8223. });
  8224. class Dice {
  8225. constructor(testString) {
  8226. this.range = [0, 0, 1, 1];
  8227. this.minResult = 0;
  8228. this.testString = testString;
  8229. }
  8230. roll(stat) {
  8231. let rng = this.range.slice();
  8232. if (stat >= 10) {
  8233. rng.push(2, 1);
  8234. }
  8235. else if (stat >= 7) {
  8236. rng.push(1, 1);
  8237. }
  8238. else if (stat >= 4) {
  8239. rng.push(1);
  8240. }
  8241. let results = [];
  8242. for (let i = 0; i < stat; i++) {
  8243. let index = Math.floor(Math.random() * (rng.length));
  8244. results.push(rng[index]);
  8245. }
  8246. return results;
  8247. }
  8248. static sum(a, b) {
  8249. return a + b;
  8250. }
  8251. getSay(results) {
  8252. let finalResult = results.reduce(Dice.sum);
  8253. return new Say(new SayBold("[", this.testString, "] "), " = [", results.join("] ["), "]", results.length == 1 ? "" :
  8254. (" = " + finalResult));
  8255. }
  8256. static testAgainstRoll(player, enemy) {
  8257. let playerDice = new Dice(player.name);
  8258. let playerResult = playerDice.roll(player.value);
  8259. let enemyDice = new Dice(enemy.name);
  8260. let enemyResult = enemyDice.roll(enemy.value);
  8261. return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum);
  8262. }
  8263. static testAgainstDifficulty(player, difficulty) {
  8264. let playerDice = new Dice(player.name);
  8265. let playerResult = playerDice.roll(player.value);
  8266. return playerResult.reduce(Dice.sum) - difficulty;
  8267. }
  8268. }
  8269. class DiceCommon extends Dice {
  8270. constructor() {
  8271. super(...arguments);
  8272. this.range = [-1, 0, 0, 0, 1, 1, 1];
  8273. this.minResult = -1;
  8274. }
  8275. static testAgainstRoll(player, enemy) {
  8276. let playerDice = new DiceCommon(player.name);
  8277. let playerResult = playerDice.roll(player.value);
  8278. let enemyDice = new DiceCommon(enemy.name);
  8279. let enemyResult = enemyDice.roll(enemy.value);
  8280. return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum);
  8281. }
  8282. static testAgainstDifficulty(player, difficulty) {
  8283. let playerDice = new DiceCommon(player.name);
  8284. let playerResult = playerDice.roll(player.value);
  8285. return playerResult.reduce(Dice.sum) - difficulty;
  8286. }
  8287. }
  8288. class DiceDangerous extends Dice {
  8289. constructor() {
  8290. super(...arguments);
  8291. this.range = [-2, -1, 0, 0, 0, 0, 1, 1, 1, 1];
  8292. this.minResult = -2;
  8293. }
  8294. static testAgainstRoll(player, enemy) {
  8295. let playerDice = new DiceDangerous(player.name);
  8296. let playerResult = playerDice.roll(player.value);
  8297. let enemyDice = new DiceDangerous(enemy.name);
  8298. let enemyResult = enemyDice.roll(enemy.value);
  8299. return playerResult.reduce(Dice.sum) - enemyResult.reduce(Dice.sum);
  8300. }
  8301. static testAgainstDifficulty(player, difficulty) {
  8302. let playerDice = new DiceDangerous(player.name);
  8303. let playerResult = playerDice.roll(player.value);
  8304. return playerResult.reduce(Dice.sum) - difficulty;
  8305. }
  8306. }
  8307. class Liquid extends Thing {
  8308. constructor(options) {
  8309. super(options);
  8310. options = options == undefined ? {} : options;
  8311. if (options.taste != undefined) {
  8312. this.taste = options.taste;
  8313. }
  8314. else {
  8315. 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.");
  8316. }
  8317. }
  8318. static async mix(container) {
  8319. let result = await Liquid.rulebookMixing.execute({ noun: container });
  8320. if (result != undefined) {
  8321. let finalQuantity = result.quantityMultiplier != undefined ?
  8322. (result.quantityMultiplier * container.liquidContents.length)
  8323. :
  8324. (container.liquidContents.length);
  8325. container.liquidContents = new Array(finalQuantity);
  8326. for (let i = 0; i < finalQuantity; i++) {
  8327. container.liquidContents[i] = result.result;
  8328. }
  8329. }
  8330. }
  8331. static getMixtures() {
  8332. if (Liquid.sortedMixtures) {
  8333. return Liquid.mixtures;
  8334. }
  8335. Liquid.mixtures.sort((a, b) => {
  8336. if (b.firstPriority < a.firstPriority)
  8337. return -1;
  8338. if (a.firstPriority < b.firstPriority)
  8339. return 1;
  8340. if (b.priority < a.priority)
  8341. return -1;
  8342. if (a.priority < b.priority)
  8343. return 1;
  8344. return 0;
  8345. });
  8346. Liquid.sortedMixtures = true;
  8347. return Liquid.mixtures;
  8348. }
  8349. static addMixture(mixture) {
  8350. Liquid.mixtures.push(mixture);
  8351. Liquid.sortedMixtures = false;
  8352. }
  8353. }
  8354. Liquid.rulebookMixing = new Rulebook("Mixing the liquid contents of something");
  8355. Liquid.mixtures = [];
  8356. Liquid.sortedMixtures = false;
  8357. Liquid.ruleDefaultMixing = Liquid.rulebookMixing.createAndAddRule({
  8358. name: "Mixing through Mixtures",
  8359. code: runner => {
  8360. if (runner.noun.liquidContents.length == 0) {
  8361. return;
  8362. }
  8363. let mixture;
  8364. for (let i = 0; i < Liquid.mixtures.length; i++) {
  8365. mixture = Liquid.mixtures[i];
  8366. let proportions = [];
  8367. let mixtureIterator = mixture.quantities.entries();
  8368. for (let mixtureLiquid = mixtureIterator.next(); !mixtureLiquid.done; mixtureLiquid = mixtureIterator.next()) {
  8369. let mixtureType = mixtureLiquid.value[0];
  8370. let mixtureQuantity = mixtureLiquid.value[1];
  8371. let matchedQuantity = 0;
  8372. runner.noun.liquidContents.forEach((liquidType) => {
  8373. try {
  8374. if (liquidType == mixtureType ||
  8375. (typeof mixtureType == "function" &&
  8376. (liquidType instanceof mixtureType || mixtureType(liquidType)))) {
  8377. matchedQuantity++;
  8378. }
  8379. }
  8380. catch (e) { }
  8381. });
  8382. proportions.push(matchedQuantity / mixtureQuantity);
  8383. }
  8384. if (proportions.every(function (element, index, array) {
  8385. return element === array[0];
  8386. })) {
  8387. return mixture;
  8388. }
  8389. }
  8390. }
  8391. });
  8392. class Scenery extends Thing {
  8393. constructor() {
  8394. super(...arguments);
  8395. this.fixedInPlace = true;
  8396. this.scenery = true;
  8397. }
  8398. }
  8399. class OrcDebugger extends Humanoid {
  8400. constructor() {
  8401. super({
  8402. isMale: true,
  8403. name: (() => {
  8404. let nameMod = OrcDebugger.nameModifier.getOne();
  8405. if (nameMod == undefined) {
  8406. nameMod = (OrcDebugger.counter++).toString();
  8407. }
  8408. return nameMod + " Orc";
  8409. })(),
  8410. unique: true,
  8411. description: "This is one extremely ugly fellow."
  8412. });
  8413. this.AI.wanderer = true;
  8414. this.AI.picksShinies = true;
  8415. }
  8416. }
  8417. OrcDebugger.nameModifier = new Shuffler([
  8418. "Ugly", "Muscular", "Veiny", "Angry", "Sad", "Smart", "Agile", "Short", "Bulging", "Intense", "Smouldering"
  8419. ]);
  8420. OrcDebugger.counter = 1;
  8421. ActionTalk.carry.createAndAddRule({
  8422. name: "Talking to the orc",
  8423. firstPriority: ActionTalk.PRIORITY_GLOBAL_DIALOGUE,
  8424. priority: ActionTalk.PRIORITY_COMMON_DIALOGUE,
  8425. conditions: (runner) => {
  8426. return runner.noun.getNoun(0) instanceof OrcDebugger;
  8427. },
  8428. code: (runner) => {
  8429. let orc = runner.noun.getNoun(0);
  8430. 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 });
  8431. if (result > 0) {
  8432. Elements.CurrentTurnHandler.printAsContent(new Say("You win!"));
  8433. }
  8434. else {
  8435. Elements.CurrentTurnHandler.printAsContent(new Say("You lose."));
  8436. }
  8437. return true;
  8438. }
  8439. });
  8440. class Semen extends Liquid {
  8441. constructor(cummer, options) {
  8442. super(options);
  8443. this.cummer = cummer;
  8444. }
  8445. }
  8446. var rooma = new RoomRandom("Room A");
  8447. 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(() => {
  8448. return Thing.InsideRoomRelation.getLeft(vase) == rooma || Thing.InsideRoomRelation.getLeft(urn) == rooma;
  8449. }, " Still, there are some things thrown about."));
  8450. PlayBegins.setStartingRoom(rooma);
  8451. let paddedBra = new Clothing({ name: "Padded Bra", unique: true });
  8452. paddedBra.breastPadding = 3;
  8453. paddedBra.slots = [Humanoid.SLOT_BREASTS];
  8454. let paddedUnderwear = new Clothing({ name: "Padded Underwear", unique: true });
  8455. paddedUnderwear.crotchPadding = 15;
  8456. paddedUnderwear.slots = [Humanoid.SLOT_CROTCH_BACK, Humanoid.SLOT_CROTCH_FRONT];
  8457. let player = WorldState.player;
  8458. WorldState.player = player;
  8459. var vase = new Thing({ name: "Vase" });
  8460. vase.description = new Say("This is an ornamental vase that'd look very nice on your lap. Why? Who knows.");
  8461. rooma.place(vase);
  8462. let mapOfTest = new MapNote({ name: "Map of this Region",
  8463. description: "This is a simple map showing all the rooms here.", unique: true });
  8464. rooma.place(mapOfTest);
  8465. let urn = new Thing({ unique: true, name: "Urn of Dreams", image: "image001" });
  8466. urn.description = new Say("This appears to be a simple, black urn containing the ashes of your dreams.");
  8467. rooma.place(urn);
  8468. var roomb = new RoomRandom("Room B");
  8469. roomb.place(vase);
  8470. let frillyPouch = new CoinPouch({
  8471. name: "Frilly Pouch",
  8472. description: new Say("This is a very gay little pink pouch full of little hearts.")
  8473. });
  8474. frillyPouch.addCoins(502);
  8475. rooma.place(frillyPouch);
  8476. let bigSack = new CoinPouch({ name: "Big Sack" });
  8477. bigSack.addCoins(100);
  8478. rooma.place(bigSack);
  8479. let region = new RegionRandom("Test Region");
  8480. region.place(rooma, roomb);
  8481. for (let i = 1; i < 6; i++) {
  8482. let room = new RoomRandom("Room " + i.toString());
  8483. region.place(room);
  8484. if (Math.random() > 0.5) {
  8485. }
  8486. }
  8487. mapOfTest.addRegion(region);
  8488. let southestRoom = new RoomRandom("Southest Room");
  8489. region.place(southestRoom);
  8490. southestRoom.appearChance = 100;
  8491. southestRoom.backgroundImage = "bloo";
  8492. southestRoom.trickyCode = (options) => {
  8493. let myCoordinates = [options.x, options.y];
  8494. for (let i = 0; i < Room.DIRECTIONS.length; i++) {
  8495. let direction = Room.DIRECTIONS[i];
  8496. if (direction != Direction.NORTH) {
  8497. let coordinates = Room.shift(myCoordinates, direction);
  8498. if (!options.map.isFree(coordinates[0], coordinates[1])) {
  8499. return false;
  8500. }
  8501. coordinates = Room.shift(coordinates, direction);
  8502. if (!options.map.isFree(coordinates[0], coordinates[1])) {
  8503. return false;
  8504. }
  8505. }
  8506. }
  8507. return true;
  8508. };
  8509. RegionRandom.rulebookAfterPlaceRoom.addRule(new Rule({
  8510. name: "After placing the southest room",
  8511. code: runner => {
  8512. let options = runner.noun;
  8513. let myCoordinates = options.map.getCoordinates(options.room);
  8514. if (myCoordinates != undefined) {
  8515. for (let i = 0; i < Room.DIRECTIONS.length; i++) {
  8516. let direction = Room.DIRECTIONS[i];
  8517. if (direction != Direction.NORTH) {
  8518. let coordinates = Room.shift(myCoordinates, direction);
  8519. options.map.block(coordinates[0], coordinates[1]);
  8520. coordinates = Room.shift(coordinates, direction);
  8521. options.map.block(coordinates[0], coordinates[1]);
  8522. }
  8523. }
  8524. }
  8525. },
  8526. conditions: runner => {
  8527. return runner.noun.room == southestRoom;
  8528. }
  8529. }));
  8530. Thing.CarryRelation.setRelation(WorldState.player, mapOfTest);
  8531. PlayBegins.rulebook.addRule(new Rule({
  8532. name: "randomize region",
  8533. firstPriority: Rule.PRIORITY_HIGHEST,
  8534. code: async (runner) => {
  8535. await region.randomize();
  8536. }
  8537. }));
  8538. RegionRandom.rulebookRandomizeRegion.addRule(new Rule({
  8539. name: "Add room A and B to region",
  8540. firstPriority: Rule.PRIORITY_HIGHEST,
  8541. code: async (runner) => {
  8542. await RegionRandom.rulebookPlaceRoom.execute({
  8543. noun: {
  8544. map: region.map,
  8545. room: rooma,
  8546. region: region
  8547. }
  8548. }).then();
  8549. await RegionRandom.rulebookPlaceRoom.execute({
  8550. noun: {
  8551. map: region.map,
  8552. room: roomb,
  8553. region: region
  8554. }
  8555. }).then();
  8556. },
  8557. conditions: runner => {
  8558. return runner.noun == region;
  8559. }
  8560. }));
  8561. function getPath(rooma, roomb) {
  8562. console.debug("The best path from " + rooma.getPrintedName() + " to " + roomb.getPrintedName() + " is:");
  8563. let t0, dir, t1;
  8564. t0 = performance.now();
  8565. dir = rooma.bestDirectionTo(roomb);
  8566. t1 = performance.now();
  8567. if (dir != undefined) {
  8568. console.debug(DirectionNames[Direction[dir]]);
  8569. }
  8570. else {
  8571. console.debug("There is no path.");
  8572. }
  8573. console.debug("Call to doSomething took " + (t1 - t0) + " milliseconds.");
  8574. }
  8575. let wanderRegion = new RegionRandom("OrcableRegion");
  8576. wanderRegion.place(rooma, roomb);
  8577. region.place(wanderRegion);
  8578. let rooms = region.getRooms();
  8579. let shuffler = new Shuffler(rooms);
  8580. for (let i = 0; i < 0; i++) {
  8581. AI.rules.createAndAddRule({
  8582. name: "Pick Shinies",
  8583. firstPriority: AIRules.PRIORITY_ACTING_ON_PLACE,
  8584. conditions: (runner) => {
  8585. let person = runner.noun;
  8586. return person.AI.picksShinies;
  8587. },
  8588. code: (runner) => {
  8589. let person = runner.noun;
  8590. let room = person.getRoom();
  8591. let visibleThings = room.getContainedAndVisibleTo(person);
  8592. if (visibleThings.length > 0) {
  8593. for (let i = 0; i < visibleThings.length; i++) {
  8594. if (!visibleThings[i].fixedInPlace && visibleThings[i].getShiny()) {
  8595. return new ActionTake(person, visibleThings[i]);
  8596. }
  8597. }
  8598. }
  8599. }
  8600. });
  8601. }
  8602. let randomOrc;
  8603. let randomOrc2;
  8604. for (let i = 0; i < 10; i++) {
  8605. let orc = new OrcDebugger();
  8606. randomOrc = orc;
  8607. if (randomOrc2 == undefined) {
  8608. randomOrc2 = orc;
  8609. }
  8610. orc.AI.wanderer = true;
  8611. orc.AI.picksShinies = true;
  8612. orc.AI.wandersOn = wanderRegion;
  8613. let room = new Shuffler(region.getRooms()).getOne();
  8614. room.place(orc);
  8615. }
  8616. var fTarget = new ContentGroup();
  8617. fTarget.addUnit(new FuckingUnit()
  8618. .setFucked(WorldState.player)
  8619. .setFucker(randomOrc)
  8620. .setHole(WorldState.player.getPart(HumanoidVagina))
  8621. .setStick(randomOrc.getPart(HumanoidPenis)));
  8622. fTarget.addUnit(new FuckingUnit()
  8623. .setFucked(WorldState.player)
  8624. .setFucker(randomOrc2)
  8625. .setHole(WorldState.player.getPart(HumanoidHead))
  8626. .setStick(randomOrc2.getPart(HumanoidPenis)));
  8627. let spitroast = (new FuckingDescription("Orc spitroast!"));
  8628. spitroast.setDescription(new Say("Orc Spitroast!"))
  8629. .addUnit()
  8630. .setFucker(OrcDebugger)
  8631. .setHole(HumanoidVagina)
  8632. .setStick(HumanoidPenis);
  8633. spitroast.addUnit()
  8634. .setFucker(OrcDebugger)
  8635. .setHole(HumanoidHead)
  8636. .setStick(HumanoidPenis);
  8637. (new FuckingDescription("Specific Orc in Vagina"))
  8638. .setDescription(new Say("Specific Orc in Vagina."))
  8639. .addUnit()
  8640. .setFucker(randomOrc)
  8641. .setHole(WorldState.player.getPart(HumanoidVagina))
  8642. .setStick(randomOrc.getPart(HumanoidPenis));
  8643. (new FuckingDescription("Specific Orc Starts Cumming in Vagina"))
  8644. .setDescription(new Say("Specific Orc Starts Cumming in Vagina"))
  8645. .addUnit()
  8646. .setFucker(randomOrc)
  8647. .setHole(WorldState.player.getPart(HumanoidVagina))
  8648. .addMarker(FuckingState.CUM_START)
  8649. .setStick(randomOrc.getPart(HumanoidPenis));
  8650. (new FuckingDescription("Orc in mouth"))
  8651. .setDescription(new Say("Orc in mouth."))
  8652. .addUnit()
  8653. .setFucker(OrcDebugger)
  8654. .setHole(HumanoidHead)
  8655. .setStick(HumanoidPenis);
  8656. var DialogueTrees;
  8657. (function (DialogueTrees) {
  8658. DialogueTrees.CreationIntro = (function () {
  8659. let tree = new DialogueTree("CreationIntro");
  8660. let node;
  8661. let text;
  8662. let set;
  8663. node = new DialogueNode("ae981322-9151-49c8-a889-94455db7c262");
  8664. node.setNext("81582dea-ba27-4baa-8df2-a77fbb5ed9ef");
  8665. tree.addStartNode(node);
  8666. text = new DialogueText("f72bf099-bae2-49df-9433-c9c3ec6a020d");
  8667. 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."); });
  8668. text.setNext("66d4b27a-ff40-4a8e-a749-2b5e8237695a");
  8669. tree.addNode(text);
  8670. set = new DialogueSet("81582dea-ba27-4baa-8df2-a77fbb5ed9ef");
  8671. set.setFunction(() => { Elements.startMenu(); });
  8672. set.setNext("f72bf099-bae2-49df-9433-c9c3ec6a020d");
  8673. tree.addNode(set);
  8674. set = new DialogueSet("0b4fec87-a2b0-4e3b-81ed-a4150f94fc10");
  8675. set.setFunction(() => { Elements.endMenu(); });
  8676. tree.addNode(set);
  8677. set = new DialogueSet("66d4b27a-ff40-4a8e-a749-2b5e8237695a");
  8678. set.setFunction(() => { return Elements.waitForAnyKey(); });
  8679. set.setNext("0b4fec87-a2b0-4e3b-81ed-a4150f94fc10");
  8680. tree.addNode(set);
  8681. return tree;
  8682. })();
  8683. })(DialogueTrees || (DialogueTrees = {}));
  8684. var CharacterCreation;
  8685. (function (CharacterCreation) {
  8686. CharacterCreation.CreationIntro = CharacterCreation.rulebook.createAndAddRule({
  8687. name: "Show small Intro",
  8688. firstPriority: Rule.PRIORITY_HIGHEST,
  8689. priority: Rule.PRIORITY_HIGHEST,
  8690. code: async () => {
  8691. await DialogueTrees.CreationIntro.execute();
  8692. }
  8693. });
  8694. })(CharacterCreation || (CharacterCreation = {}));
  8695. var CharacterCreation;
  8696. (function (CharacterCreation) {
  8697. let ccDiv = document.createElement("div");
  8698. ccDiv.id = "characterCreation";
  8699. let rightSide = document.createElement("div");
  8700. rightSide.id = "ccRight";
  8701. let leftSide = document.createElement("div");
  8702. leftSide.id = "ccLeft";
  8703. ccDiv.appendChild(leftSide);
  8704. ccDiv.appendChild(rightSide);
  8705. let resolver;
  8706. async function printTable() {
  8707. printOrigin();
  8708. while (leftSide.firstChild)
  8709. leftSide.removeChild(leftSide.firstChild);
  8710. await (new Say(new SayBold("Character Origin:")).getHTMLContent().then(eles => {
  8711. eles.forEach(ele => {
  8712. leftSide.appendChild(ele);
  8713. });
  8714. }));
  8715. let origins = CharacterOrigin.getOrigins();
  8716. for (let i = 0; i < origins.length; i++) {
  8717. let origin = origins[i];
  8718. let say = new Say(origin.name);
  8719. if (origin.id == CharacterCreation.PlayerOrigin.value) {
  8720. say.add(" - SELECTED");
  8721. }
  8722. await (say).getHTML("p", ["choice"]).then(elementArray => {
  8723. Controls.Links.makeCustomLink(elementArray[0], {
  8724. mouseover: () => {
  8725. printOrigin(origin);
  8726. },
  8727. mouseout: () => {
  8728. printOrigin();
  8729. },
  8730. click: () => {
  8731. CharacterCreation.PlayerOrigin.value = origin.id;
  8732. reset();
  8733. }
  8734. });
  8735. Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
  8736. leftSide.appendChild(elementArray[0]);
  8737. });
  8738. }
  8739. }
  8740. function printConfirm() {
  8741. (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => {
  8742. elementArray[0].addEventListener("click", () => {
  8743. resolver();
  8744. });
  8745. Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
  8746. Elements.CurrentTurnHandler.print(elementArray[0]);
  8747. });
  8748. }
  8749. function printOrigin(origin) {
  8750. if (origin == undefined) {
  8751. origin = CharacterOrigin.getOrigin(CharacterCreation.PlayerOrigin.value);
  8752. }
  8753. let say = new Say(origin.description);
  8754. if (origin.bonusStats != undefined) {
  8755. say.add(Say.PARAGRAPH_BREAK, origin.bonusStats);
  8756. }
  8757. say.getHTMLContent().then((eles => {
  8758. while (rightSide.firstChild)
  8759. rightSide.removeChild(rightSide.firstChild);
  8760. for (let i = 0; i < eles.length; i++) {
  8761. rightSide.appendChild(eles[i]);
  8762. }
  8763. }));
  8764. }
  8765. function reset() {
  8766. Elements.CurrentTurnHandler.clear();
  8767. Elements.CurrentTurnHandler.print(ccDiv);
  8768. printTable();
  8769. Elements.CurrentTurnHandler.print(document.createElement("br"));
  8770. Elements.CurrentTurnHandler.print(document.createElement("br"));
  8771. printConfirm();
  8772. }
  8773. CharacterCreation.CCOrigin = CharacterCreation.rulebook.createAndAddRule({
  8774. name: "Character Creation - Origin",
  8775. firstPriority: Rule.PRIORITY_MEDIUM,
  8776. priority: Rule.PRIORITY_HIGH,
  8777. code: async () => {
  8778. Elements.startMenu();
  8779. let promise = new Promise(resolve => {
  8780. resolver = resolve;
  8781. });
  8782. reset();
  8783. await promise;
  8784. CharacterCreation.getOrigin().confirmPicked();
  8785. Elements.endMenu();
  8786. }
  8787. });
  8788. })(CharacterCreation || (CharacterCreation = {}));
  8789. var CharacterCreation;
  8790. (function (CharacterCreation) {
  8791. let ccDiv = document.createElement("div");
  8792. ccDiv.id = "characterCreation";
  8793. let rightSide = document.createElement("div");
  8794. rightSide.id = "ccRight";
  8795. let leftSide = document.createElement("div");
  8796. leftSide.id = "ccLeft";
  8797. ccDiv.appendChild(leftSide);
  8798. ccDiv.appendChild(rightSide);
  8799. let resolver;
  8800. async function printTable() {
  8801. while (leftSide.firstChild)
  8802. leftSide.removeChild(leftSide.firstChild);
  8803. await (new Say(new SayBold("Perks (Choose any):")).getHTMLContent().then(eles => {
  8804. eles.forEach(ele => {
  8805. leftSide.appendChild(ele);
  8806. });
  8807. }));
  8808. let perks = Perk.getPerks();
  8809. for (let i = 0; i < perks.length; i++) {
  8810. let perk = perks[i];
  8811. let say = new Say(perk.name);
  8812. if (perk.isEnabled()) {
  8813. if (perk.isForced()) {
  8814. say.add(" (Mandatory)");
  8815. }
  8816. else {
  8817. say.add(" - Selected");
  8818. }
  8819. }
  8820. else if (perk.isForced()) {
  8821. say.add(" (Forbidden)");
  8822. }
  8823. await (say).getHTML("p", ["choice"]).then(elementArray => {
  8824. Controls.Links.makeCustomLink(elementArray[0], {
  8825. mouseover: () => {
  8826. printPerk(perk);
  8827. },
  8828. mouseout: () => {
  8829. emptyPerk();
  8830. },
  8831. click: () => {
  8832. if (!perk.isForced()) {
  8833. perk.value = !perk.value;
  8834. }
  8835. reset();
  8836. }
  8837. });
  8838. Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
  8839. leftSide.appendChild(elementArray[0]);
  8840. });
  8841. }
  8842. }
  8843. function printConfirm() {
  8844. (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => {
  8845. elementArray[0].addEventListener("click", () => {
  8846. resolver();
  8847. });
  8848. Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
  8849. Elements.CurrentTurnHandler.print(elementArray[0]);
  8850. });
  8851. }
  8852. function emptyPerk() {
  8853. while (rightSide.firstChild)
  8854. rightSide.removeChild(rightSide.firstChild);
  8855. }
  8856. function printPerk(perk) {
  8857. let say = new Say(perk.description);
  8858. say.getHTMLContent().then((eles => {
  8859. emptyPerk();
  8860. for (let i = 0; i < eles.length; i++) {
  8861. rightSide.appendChild(eles[i]);
  8862. }
  8863. }));
  8864. }
  8865. function reset() {
  8866. Perk.updatePerks();
  8867. Elements.CurrentTurnHandler.clear();
  8868. Elements.CurrentTurnHandler.print(ccDiv);
  8869. printTable();
  8870. Elements.CurrentTurnHandler.print(document.createElement("br"));
  8871. Elements.CurrentTurnHandler.print(document.createElement("br"));
  8872. printConfirm();
  8873. }
  8874. CharacterCreation.CCPerk = CharacterCreation.rulebook.createAndAddRule({
  8875. name: "Character Creation - Origin",
  8876. firstPriority: Rule.PRIORITY_LOW,
  8877. priority: Rule.PRIORITY_HIGH,
  8878. code: async () => {
  8879. Elements.startMenu();
  8880. let promise = new Promise(resolve => {
  8881. resolver = resolve;
  8882. });
  8883. reset();
  8884. await promise;
  8885. let perks = Perk.getPerks();
  8886. perks.forEach(perk => {
  8887. if (perk.isEnabled()) {
  8888. perk.confirmPicked();
  8889. }
  8890. });
  8891. Elements.endMenu();
  8892. }
  8893. });
  8894. })(CharacterCreation || (CharacterCreation = {}));
  8895. var CharacterCreation;
  8896. (function (CharacterCreation) {
  8897. function createRange(options) {
  8898. let valueNode = document.createTextNode(String(options.value));
  8899. let div = document.createElement("div");
  8900. div.classList.add("ccOption");
  8901. if (options.topLabel != undefined) {
  8902. let topLabel = document.createElement("div");
  8903. topLabel.classList.add("ccOptionTopLabel");
  8904. topLabel.appendChild(document.createTextNode(options.topLabel + ":"));
  8905. div.appendChild(topLabel);
  8906. }
  8907. let label = document.createElement("div");
  8908. if (options.showValue != false) {
  8909. label.classList.add("rangeValue");
  8910. if (options.label != undefined) {
  8911. let b = document.createElement("b");
  8912. b.appendChild(document.createTextNode(options.label + ": "));
  8913. label.appendChild(b);
  8914. }
  8915. label.appendChild(valueNode);
  8916. }
  8917. let input = document.createElement("input");
  8918. input.classList.add("ccRange");
  8919. input.type = "range";
  8920. input.min = options.minValue.toString();
  8921. input.max = options.maxValue.toString();
  8922. input.step = options.step.toString();
  8923. input.value = options.value.toString();
  8924. let onChange = () => {
  8925. valueNode.nodeValue = input.value;
  8926. options.onChange(Number(input.value), valueNode, input);
  8927. };
  8928. input.addEventListener("change", onChange);
  8929. let leftButton = document.createElement("a");
  8930. leftButton.classList.add("ccButton");
  8931. leftButton.addEventListener("click", () => {
  8932. input.value = String(Number(input.value) - options.step);
  8933. onChange();
  8934. });
  8935. Controls.KeyHandler.applyCode(leftButton, Controls.KeyHandler.getFirstKeyCode());
  8936. if (options.leftLabel != undefined) {
  8937. leftButton.appendChild(document.createTextNode(options.leftLabel));
  8938. }
  8939. let rightButton = document.createElement("a");
  8940. rightButton.classList.add("ccButton");
  8941. rightButton.addEventListener("click", () => {
  8942. input.value = String(Number(input.value) + options.step);
  8943. onChange();
  8944. });
  8945. Controls.KeyHandler.applyCode(rightButton, Controls.KeyHandler.getFirstKeyCode());
  8946. ;
  8947. if (options.rightLabel != undefined) {
  8948. rightButton.appendChild(document.createTextNode(options.rightLabel));
  8949. }
  8950. div.appendChild(leftButton);
  8951. div.appendChild(input);
  8952. div.appendChild(rightButton);
  8953. div.appendChild(label);
  8954. onChange();
  8955. return div;
  8956. }
  8957. CharacterCreation.CCSexStats = CharacterCreation.rulebook.createAndAddRule({
  8958. name: "Character Creation - Sex and Stats",
  8959. firstPriority: Rule.PRIORITY_HIGH,
  8960. priority: Rule.PRIORITY_HIGH,
  8961. code: () => {
  8962. Elements.startMenu();
  8963. let ccDiv = document.createElement("div");
  8964. ccDiv.id = "characterCreation";
  8965. let ccLeft = document.createElement("div");
  8966. ccLeft.id = "ccLeft";
  8967. ccDiv.appendChild(ccLeft);
  8968. let ccRight = document.createElement("div");
  8969. ccRight.id = "ccRight";
  8970. ccDiv.appendChild(ccRight);
  8971. let onChange = () => {
  8972. (new Say(WorldState.player.description)).getHTMLContent().then((value => {
  8973. while (ccRight.firstChild)
  8974. ccRight.removeChild(ccRight.firstChild);
  8975. value.forEach(val => {
  8976. ccRight.appendChild(val);
  8977. });
  8978. }));
  8979. };
  8980. ccLeft.appendChild(createRange({
  8981. minValue: 0, maxValue: 1, step: 1, value: 0, leftLabel: "Male", rightLabel: "Female", topLabel: "Sex",
  8982. onChange: (value, labelValue, input) => {
  8983. labelValue.nodeValue = (value == 0 ? "Male" : "Female");
  8984. WorldState.player.removeGenderedParts();
  8985. if (value == 0) {
  8986. WorldState.player.addMaleParts();
  8987. }
  8988. else {
  8989. WorldState.player.addFemaleParts();
  8990. }
  8991. let otherInputs = ccDiv.getElementsByTagName("input");
  8992. for (let i = 0; i < otherInputs.length; i++) {
  8993. let otherInput = otherInputs[i];
  8994. if (otherInput != input) {
  8995. otherInput.dispatchEvent(new Event("change"));
  8996. }
  8997. }
  8998. onChange();
  8999. }
  9000. }));
  9001. ccLeft.appendChild(createRange({
  9002. minValue: 0, maxValue: 4, step: 1, value: 2, leftLabel: "Masculine", rightLabel: "Feminine", topLabel: "Gender",
  9003. onChange: (value, labelValue) => {
  9004. let names = ["Masculine", "Somewhat masculine", "Androgynous", "Somewhat feminine", "Feminine"];
  9005. labelValue.nodeValue = names[value];
  9006. let player = WorldState.player;
  9007. let intendedValue;
  9008. if (player.isMale()) {
  9009. let values = [10, 25, 50, 55, 60];
  9010. intendedValue = values[value];
  9011. }
  9012. else {
  9013. let values = [35, 40, 50, 65, 75];
  9014. intendedValue = values[value];
  9015. }
  9016. WorldState.player.setGenderValue(intendedValue);
  9017. WorldState.player.setStat(Attributes.GenderIdentity, intendedValue);
  9018. onChange();
  9019. }
  9020. }));
  9021. let statsHeader = document.createElement("div");
  9022. ccLeft.appendChild(statsHeader);
  9023. statsHeader.classList.add("ccHeader");
  9024. statsHeader.appendChild(document.createTextNode("Stats ("));
  9025. let maxStats = 12;
  9026. let statsRemaining = document.createTextNode("4 points remaining");
  9027. statsHeader.appendChild(statsRemaining);
  9028. statsHeader.appendChild(document.createTextNode(")"));
  9029. let setStat = (attr, value, input) => {
  9030. player.setStat(attr, value);
  9031. let remaining = maxStats
  9032. - player.getStat(Attributes.Strength)
  9033. - player.getStat(Attributes.Agility)
  9034. - player.getStat(Attributes.Intelligence)
  9035. - player.getStat(Attributes.Charm);
  9036. if (remaining < 0) {
  9037. value += remaining;
  9038. remaining = 0;
  9039. input.value = value.toString();
  9040. input.dispatchEvent(new Event("change"));
  9041. return;
  9042. }
  9043. statsRemaining.nodeValue = (remaining == 0 ? "Done" :
  9044. remaining > 1 ? remaining.toString() + " points remaining" :
  9045. remaining.toString() + " point remaining");
  9046. };
  9047. ccLeft.appendChild(createRange({
  9048. minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Strength",
  9049. onChange: (value, labelValue, input) => {
  9050. setStat(Attributes.Strength, value, input);
  9051. onChange();
  9052. }
  9053. }));
  9054. ccLeft.appendChild(createRange({
  9055. minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Agility",
  9056. onChange: (value, labelValue, input) => {
  9057. setStat(Attributes.Agility, value, input);
  9058. onChange();
  9059. }
  9060. }));
  9061. ccLeft.appendChild(createRange({
  9062. minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Charm",
  9063. onChange: (value, labelValue, input) => {
  9064. setStat(Attributes.Charm, value, input);
  9065. onChange();
  9066. }
  9067. }));
  9068. ccLeft.appendChild(createRange({
  9069. minValue: 1, maxValue: 5, step: 1, value: 2, leftLabel: "-", rightLabel: "+", topLabel: "Intelligence",
  9070. onChange: (value, labelValue, input) => {
  9071. setStat(Attributes.Intelligence, value, input);
  9072. onChange();
  9073. }
  9074. }));
  9075. let creationDone = new Promise((resolve) => {
  9076. (new Say("Confirm")).getHTML("p", ["choice"]).then(elementArray => {
  9077. elementArray[0].addEventListener("click", () => {
  9078. Elements.endMenu();
  9079. resolve();
  9080. });
  9081. Controls.KeyHandler.applyCode(elementArray[0], Controls.KeyHandler.getSecondKeyCode());
  9082. Elements.CurrentTurnHandler.print(elementArray[0]);
  9083. });
  9084. });
  9085. Elements.CurrentTurnHandler.print(ccDiv);
  9086. return creationDone;
  9087. }
  9088. });
  9089. })(CharacterCreation || (CharacterCreation = {}));
  9090. var PlayBegins;
  9091. (function (PlayBegins) {
  9092. PlayBegins.LOAD_FAILED = false;
  9093. PlayBegins.CONTINUE_FAILED = false;
  9094. PlayBegins.IntroMenuRule = PlayBegins.rulebook.createAndAddRule({
  9095. name: "Intro Menu Rule",
  9096. firstPriority: Rule.PRIORITY_HIGHEST,
  9097. priority: Rule.PRIORITY_HIGHEST,
  9098. code: async (runner) => {
  9099. await DialogueTrees.IntroMenu.execute();
  9100. }
  9101. });
  9102. })(PlayBegins || (PlayBegins = {}));
  9103. var DialogueTrees;
  9104. (function (DialogueTrees) {
  9105. DialogueTrees.IntroMenu = (function () {
  9106. let tree = new DialogueTree("IntroMenu");
  9107. let node;
  9108. let choice;
  9109. let text;
  9110. let branch;
  9111. let set;
  9112. node = new DialogueNode("b018bb28-4efc-493b-ac37-31634c4e6406");
  9113. node.setNext("f448e718-9d24-4191-9913-ccc36d97c4c0");
  9114. tree.addStartNode(node);
  9115. choice = new DialogueChoice("3b8c8bcb-0ac8-40dc-9f62-4abbde0d0f7f");
  9116. choice.setSay(() => { return new Say("Start Game"); });
  9117. choice.setNext("719e71dd-9989-4015-93af-9fb7096002c1");
  9118. tree.addNode(choice);
  9119. choice = new DialogueChoice("53710087-4002-41b7-b089-cadabedbcafd");
  9120. choice.setSay(() => { return new Say("Load from file"); });
  9121. choice.setNext("f25f6525-dad6-45d7-a391-246c1b02b569");
  9122. tree.addNode(choice);
  9123. choice = new DialogueChoice("b4593a36-ca83-4afc-b01b-e71344ca6e1f");
  9124. choice.setSay(() => { return new Say("Settings"); });
  9125. choice.setNext("d4a379b5-06c9-4fca-a25c-b1a31b6bf93d");
  9126. tree.addNode(choice);
  9127. choice = new DialogueChoice("4c5032a5-5509-4a00-b8c7-788e7ddbf17d");
  9128. choice.setSay(() => { return new Say("About"); });
  9129. choice.setNext("6b3f385b-8283-4635-9c73-e2303d77642d");
  9130. tree.addNode(choice);
  9131. node = new DialogueNode("674841a6-3752-4c81-977d-19e111536203");
  9132. node.setName("2");
  9133. 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"]);
  9134. tree.addNode(node);
  9135. text = new DialogueText("bc32e411-3c54-4747-ad79-506fc5a9d6c9");
  9136. 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.")); });
  9137. text.setNext("36da9ea6-909c-4c0c-94d1-a17fef44452d");
  9138. tree.addNode(text);
  9139. text = new DialogueText("36da9ea6-909c-4c0c-94d1-a17fef44452d");
  9140. 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?"); });
  9141. text.setNext("674841a6-3752-4c81-977d-19e111536203");
  9142. tree.addNode(text);
  9143. node = new DialogueNode("9f11871f-eebd-4b9a-b3db-ed9be8cf78e7");
  9144. node.setName("1");
  9145. node.setNext("9eeb2100-917d-41fd-b756-6d3b80e92463");
  9146. tree.addNode(node);
  9147. branch = new DialogueBranch("5d1dfb86-abd9-4ad6-bf07-8ced5476e401");
  9148. branch.setVariable(() => { return PlayBegins.LOAD_FAILED; });
  9149. branch.addBranch("415dc32a-1549-429d-9ac4-8cd1b4c92c14", () => { return true; });
  9150. branch.setNext("f82fc177-b4bd-4f06-b7ab-216259e056a5");
  9151. tree.addNode(branch);
  9152. set = new DialogueSet("f82fc177-b4bd-4f06-b7ab-216259e056a5");
  9153. set.setFunction(() => { Elements.endMenu(); });
  9154. tree.addNode(set);
  9155. set = new DialogueSet("9eeb2100-917d-41fd-b756-6d3b80e92463");
  9156. set.setFunction(() => { Elements.clearMainScreen(); });
  9157. set.setNext("bc32e411-3c54-4747-ad79-506fc5a9d6c9");
  9158. tree.addNode(set);
  9159. node = new DialogueNode("415dc32a-1549-429d-9ac4-8cd1b4c92c14");
  9160. node.setNext("1");
  9161. tree.addNode(node);
  9162. set = new DialogueSet("f448e718-9d24-4191-9913-ccc36d97c4c0");
  9163. set.setFunction(() => { Elements.startMenu(); tree.setRepeatChoices(false); });
  9164. set.setNext("9f11871f-eebd-4b9a-b3db-ed9be8cf78e7");
  9165. tree.addNode(set);
  9166. choice = new DialogueChoice("ef9253b9-5c24-46cc-8e2d-5562a1544f07");
  9167. choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(0)); });
  9168. choice.setNext("9594cf06-6062-4952-b378-6aedaafe2951");
  9169. tree.addNode(choice);
  9170. choice = new DialogueChoice("82c512c6-0115-4d72-a413-5728a623f04b");
  9171. choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(1)); });
  9172. choice.setNext("fe95cfb3-b9f5-4b12-83aa-94d26e5bcac0");
  9173. tree.addNode(choice);
  9174. choice = new DialogueChoice("7315835a-4d95-4377-828c-8a4ca7e49f87");
  9175. choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(2)); });
  9176. choice.setNext("dc884974-7bb2-436f-b3a4-cdf8550bd494");
  9177. tree.addNode(choice);
  9178. choice = new DialogueChoice("50afd6f8-87ce-49bf-b689-4819bc5dc8e7");
  9179. choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(3)); });
  9180. choice.setNext("62f5ea88-c6f0-4469-87f2-ea3b37638509");
  9181. tree.addNode(choice);
  9182. choice = new DialogueChoice("d79e9955-f81e-4ac9-8246-a02b0bd49dae");
  9183. choice.setSay(() => { return new Say(SaveHandler.getSayForSlot(4)); });
  9184. choice.setNext("ee4ecd8b-59e2-43a6-8150-8a835d6eeae1");
  9185. tree.addNode(choice);
  9186. node = new DialogueNode("719e71dd-9989-4015-93af-9fb7096002c1");
  9187. node.setName("SlotChoices");
  9188. 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"]);
  9189. tree.addNode(node);
  9190. set = new DialogueSet("9594cf06-6062-4952-b378-6aedaafe2951");
  9191. set.setFunction(() => { SaveHandler.setSlot(0); });
  9192. set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9193. tree.addNode(set);
  9194. set = new DialogueSet("fe95cfb3-b9f5-4b12-83aa-94d26e5bcac0");
  9195. set.setFunction(() => { SaveHandler.setSlot(1); });
  9196. set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9197. tree.addNode(set);
  9198. set = new DialogueSet("dc884974-7bb2-436f-b3a4-cdf8550bd494");
  9199. set.setFunction(() => { SaveHandler.setSlot(2); });
  9200. set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9201. tree.addNode(set);
  9202. set = new DialogueSet("62f5ea88-c6f0-4469-87f2-ea3b37638509");
  9203. set.setFunction(() => { SaveHandler.setSlot(3); });
  9204. set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9205. tree.addNode(set);
  9206. set = new DialogueSet("ee4ecd8b-59e2-43a6-8150-8a835d6eeae1");
  9207. set.setFunction(() => { SaveHandler.setSlot(4); });
  9208. set.setNext("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9209. tree.addNode(set);
  9210. set = new DialogueSet("f25f6525-dad6-45d7-a391-246c1b02b569");
  9211. set.setFunction(() => { return SaveHandler.loadFromFile(); });
  9212. set.setNext("5d1dfb86-abd9-4ad6-bf07-8ced5476e401");
  9213. tree.addNode(set);
  9214. choice = new DialogueChoice("9483a087-04d0-48dd-884f-946930771b95");
  9215. choice.setSay(() => { return new Say("Erase a save"); });
  9216. choice.setConditions(() => { return !SaveHandler.isErasing(); });
  9217. choice.setNext("ee65c84a-021f-44d3-aa34-50235f438c96");
  9218. tree.addNode(choice);
  9219. choice = new DialogueChoice("defe0f4c-4452-40f3-aff1-ba076263fcbc");
  9220. choice.setSay(() => { return new Say("Don't erase my saves!"); });
  9221. choice.setConditions(() => { return SaveHandler.isErasing(); });
  9222. choice.setNext("ee65c84a-021f-44d3-aa34-50235f438c96");
  9223. tree.addNode(choice);
  9224. set = new DialogueSet("ee65c84a-021f-44d3-aa34-50235f438c96");
  9225. set.setFunction(() => { SaveHandler.toggleErasing(); });
  9226. set.setNext("6f15f7d6-4944-4b93-9d47-7046e8ae1f15");
  9227. tree.addNode(set);
  9228. node = new DialogueNode("6f15f7d6-4944-4b93-9d47-7046e8ae1f15");
  9229. node.setNext("SlotChoices");
  9230. tree.addNode(node);
  9231. set = new DialogueSet("915492f1-8fa7-4ddc-9dc0-6b0340f738c8");
  9232. set.setFunction(() => { return SaveHandler.loadFromStorage(); });
  9233. set.setNext("f82fc177-b4bd-4f06-b7ab-216259e056a5");
  9234. tree.addNode(set);
  9235. node = new DialogueNode("d4a379b5-06c9-4fca-a25c-b1a31b6bf93d");
  9236. node.setNext("Settings");
  9237. tree.addNode(node);
  9238. node = new DialogueNode("6b3f385b-8283-4635-9c73-e2303d77642d");
  9239. node.setNext("About");
  9240. tree.addNode(node);
  9241. node = new DialogueNode("b75c038c-654c-4c62-8f49-2f4518f52cff");
  9242. node.setName("Settings");
  9243. node.setNext("d33456b8-72b6-4214-90b3-3eba2442b287");
  9244. tree.addNode(node);
  9245. text = new DialogueText("d33456b8-72b6-4214-90b3-3eba2442b287");
  9246. text.setSay(() => { return new Say("Not implemented."); });
  9247. text.setNext("bc24b446-d6a2-4284-93fb-67ad3598fcd1");
  9248. tree.addNode(text);
  9249. set = new DialogueSet("bc24b446-d6a2-4284-93fb-67ad3598fcd1");
  9250. set.setFunction(() => { return Elements.waitForAnyKey(); });
  9251. set.setNext("81f9d62b-907e-48ae-84fe-78c7cecc4fe3");
  9252. tree.addNode(set);
  9253. node = new DialogueNode("81f9d62b-907e-48ae-84fe-78c7cecc4fe3");
  9254. node.setNext("1");
  9255. tree.addNode(node);
  9256. node = new DialogueNode("c342e112-5c73-4c82-8882-47ca3a71c914");
  9257. node.setName("About");
  9258. node.setNext("d33456b8-72b6-4214-90b3-3eba2442b287");
  9259. tree.addNode(node);
  9260. choice = new DialogueChoice("a55f46fa-98a9-4dff-9f1c-4f88c18ce8dd");
  9261. choice.setSay(() => { return new Say("Note about content (Spoiler Alert)"); });
  9262. choice.setNext("7c2060aa-66ce-4dbb-88d2-0c8f190e0a6c");
  9263. tree.addNode(choice);
  9264. text = new DialogueText("59a3cb30-d4ba-4b46-8157-b900fc7022dd");
  9265. 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.")); });
  9266. text.setNext("1b8bdc9d-a4bf-40aa-a382-f7813c158840");
  9267. tree.addNode(text);
  9268. set = new DialogueSet("c27829b7-7199-4b1e-9334-536258546cfc");
  9269. set.setFunction(() => { return Elements.waitForAnyKey(); });
  9270. set.setNext("42401145-9154-40c3-a9d3-4f83df97b89e");
  9271. tree.addNode(set);
  9272. node = new DialogueNode("42401145-9154-40c3-a9d3-4f83df97b89e");
  9273. node.setNext("1");
  9274. tree.addNode(node);
  9275. set = new DialogueSet("7c2060aa-66ce-4dbb-88d2-0c8f190e0a6c");
  9276. set.setFunction(() => { Elements.clearMainScreen(); });
  9277. set.setNext("59a3cb30-d4ba-4b46-8157-b900fc7022dd");
  9278. tree.addNode(set);
  9279. text = new DialogueText("1b8bdc9d-a4bf-40aa-a382-f7813c158840");
  9280. 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."); });
  9281. text.setNext("c27829b7-7199-4b1e-9334-536258546cfc");
  9282. tree.addNode(text);
  9283. branch = new DialogueBranch("a6b6b3d2-25ef-41b1-a5b5-25143f1b41f9");
  9284. branch.setVariable(() => { return SaveHandler.isVirgin(); });
  9285. branch.addBranch("d0dcd7c6-26ae-41d0-99a6-e0cae17ae381", () => { return true; });
  9286. branch.setNext("915492f1-8fa7-4ddc-9dc0-6b0340f738c8");
  9287. tree.addNode(branch);
  9288. text = new DialogueText("b8ee6702-8d38-4bd7-9b24-df8c901a50d4");
  9289. 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."); });
  9290. text.setNext("50876e13-23b9-43c0-b6b1-a89b1683d5e7");
  9291. tree.addNode(text);
  9292. set = new DialogueSet("50876e13-23b9-43c0-b6b1-a89b1683d5e7");
  9293. set.setFunction(() => { return Elements.waitForAnyKey(); });
  9294. set.setNext("915492f1-8fa7-4ddc-9dc0-6b0340f738c8");
  9295. tree.addNode(set);
  9296. set = new DialogueSet("d0dcd7c6-26ae-41d0-99a6-e0cae17ae381");
  9297. set.setFunction(() => { Elements.clearMainScreen(); });
  9298. set.setNext("b8ee6702-8d38-4bd7-9b24-df8c901a50d4");
  9299. tree.addNode(set);
  9300. return tree;
  9301. })();
  9302. })(DialogueTrees || (DialogueTrees = {}));
  9303. //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIj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dWxlO1xyXG4gICAgcHJpdmF0ZSBydWxlUnVubmVyIDogbnVtYmVyID0gLTE7XHJcblxyXG4gICAgcHVibGljIGNvbnN0cnVjdG9yIChydWxlYm9vayA6IFJ1bGVib29rPFQ+LCBub3VuIDogVCkge1xyXG4gICAgICAgIHRoaXMucnVsZWJvb2sgPSBydWxlYm9vaztcclxuICAgICAgICB0aGlzLm5vdW4gPSBub3VuO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhZGRSdWxlYm9va3MgKC4uLnJ1bGVib29rcyA6IEFycmF5PFJ1bGVib29rPFQ+Pikge1xyXG4gICAgICAgIHJ1bGVib29rcyA9IGFycmF5VW5pcXVlTmV3QXJyYXkocnVsZWJvb2tzKTtcclxuICAgICAgICBydWxlYm9va3MuZm9yRWFjaCgocnVsZWJvb2spID0+IHtcclxuICAgICAgICAgICAgdGhpcy5hZGRSdWxlcyguLi5ydWxlYm9vay5ydWxlcyk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFkZFJ1bGVzICguLi5ydWxlcykge1xyXG4gICAgICAgIGlmICh0aGlzLnJ1bGVSdW5uZXIgPCAwKSB7XHJcbiAgICAgICAgICAgIHRoaXMucnVsZXNUb0V4ZWN1dGUucHVzaCguLi5ydWxlcyk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBza2lwUnVsZSAocnVsZSA6IFJ1bGUpIHtcclxuICAgICAgICBpZiAodGhpcy5ydWxlUnVubmVyID49IDApIHtcclxuICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5ydWxlc1RvRXhlY3V0ZS5pbmRleE9mKHJ1bGUpO1xyXG4gICAgICAgICAgICBpZiAoaW5kZXggPiB0aGlzLnJ1bGVSdW5uZXIpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMucnVsZXNUb0V4ZWN1dGUuc3BsaWNlKGluZGV4LCAxKTtcclxuICAgICAgICAgICAgICAgIG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B9XHJcbn1cclxuXHJcbmNsYXNzIFJ1bGVib29rPFQ+IHtcclxuICAgIHB1YmxpYyBydWxlcyA6IEFycmF5PFJ1bGU+ID0gW107XHJcbiAgICBwdWJsaWMgbmFtZSA6IHN0cmluZztcclxuICAgIHByaXZhdGUgc3RhdGljIGluZGVudGFudGlvblNwYWNlcyA9IDI7XHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVib29rU3RhY2sgOiBBcnJheTxhbnk+ID0gW107XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRTdGFjayAoKSB7XHJcbiAgICAgICAgbGV0IHN0YWNrID0gW107XHJcbiAgICAgICAgUnVsZWJvb2sucnVsZWJvb2tTdGFjay5mb3JFYWNoKChybCkgPT4ge1xyXG4gICAgICAgICAgICBpZiAocmwgaW5zdGFuY2VvZiBPYmplY3QgJiYgcmwubmFtZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHN0YWNrLnB1c2gocmwubmFtZSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHJsID09IFwic3RyaW5nXCIpIHtcclxuICAgICAgICAgICAgICAgIHN0YWNrLnB1c2gocmwpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJsIGluc3RhbmNlb2YgT2JqZWN0ICYmIHJsLmlkICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgc3RhY2sucHVzaChybC5pZCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzdGFjay5wdXNoKFwiVW5kZWZpbmVkXCIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgcmV0dXJuIHN0YWNrO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgZ2V0SW5kZW50YXRpb24gKCkge1xyXG4gICAgICAgIHJldHVybiBcIiBcIi5yZXBlYXQoUnVsZWJvb2suaW5kZ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Sh1bmRlZmluZWQpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZnIgPSBuZXcgRmlsZVJlYWRlcigpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBmci5vbmxvYWQgPSAoZXYpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShldi50YXJnZXRbJ3Jlc3VsdCddKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGZyLnJlYWRBc1RleHQoZWxlbWVudC5maWxlc1swXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgZWxlbWVudC5jbGljaygpO1xyXG4gICAgICAgIHJldHVybiBwcm9taXNlO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGRvd25sb2FkKGZpbGVuYW1lLCB0ZXh0KSB7XHJcbiAgICAgICAgdmFyIGVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdhJyk7XHJcbiAgICAgICAgZWxlbWVudC5zZXRBdHRyaWJ1dGUoJ2hyZWYnLCAnZGF0YTp0ZXh0L3BsYWluO2NoYXJzZXQ9dXRmLTgsJyArIGVuY29kZVVSSUNvbXBvbmVudCh0ZXh0KSk7XHJcbiAgICAgICAgZWxlbWVudC5zZXRBdHRyaWJ1dGUoJ2Rvd25sb2FkJywgZmlsZW5hbWUpO1xyXG5cclxuICAgICAgICBlbGVtZW50LnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XHJcbiAgICAgICAgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChlbGVtZW50KTtcclxuXHJcbiAgICAgICAgZWxlbWVudC5jbGljaygpO1xyXG5cclxuICAgICAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUNoaWxkKGVsZW1lbnQpO1xyXG4gICAgfVxyXG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ZykgOiBUaGluZyB7XHJcbiAgICAgICAgbGV0IGl0ZW0gOiBUaGluZztcclxuICAgICAgICBpZiAodGhpbmcuVW5pcXVlKSB7XHJcbiAgICAgICAgICAgIGl0ZW0gPSBUaGluZy5nZXRVbmlxdWUodGhpbmcuTmFtZSk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgbGV0IGl0ZW1zID0gVGhpbmcuZ2V0Tm9uVW5pcXVlKHRoaW5nLk5hbWUpO1xyXG4gICAgICAgICAgICBpZiAoaXRlbXMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgaXRlbSA9IGl0ZW1zWzBdO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChpdGVtID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgbGV0IGVycm9yID0gdGhpbmcuTmFtZSArIFwiIG5vIGxvbmdlciBleGlzdHMuXCI7XHJcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiW1NhdmVIYW5kbGVyXSBcIiArIGVycm9yKTtcclxuICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKGVycm9yKVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGl0ZW0gPSBpdGVtLmNsb25lKHRydWUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGl0ZW0uc2V0Q2hhbmdlcyh0aGluZy5DaGFuZ2VzKTtcclxuICAgICAgICByZXR1cm4gaXRlbTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gbG9hZEdhbWUgKHNhdmVTdHJ1YyA6IFNhdmVTdHJ1Y3R1cmUpIHtcclxuICAgICAgICAvLyBpbnRlcmZhY2UgU2F2ZVN0cnVjdHVyZSB7XHJcbiAgICAgICAgLy8gICAgIFZhcmlhYmx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dXJuIHRoaXMudmFsdWU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzRm9yY2VkICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5mb3JjZWRTdGF0dXModGhpcykgIT0gdW5kZWZpbmVkO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXREZXNjcmlwdGlvbiAoKSB7XHJcbiAgICAgICAgaWYgKHR5cGVvZiB0aGlzLmRlc2NyaXB0aW9uID09IFwiZnVuY3Rpb25cIikge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kZXNjcmlwdGlvbih0aGlzKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5kZXNjcmlwdGlvbjtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBwZXJrcyA6IHtbaWQgOiBzdHJpbmddIDogUGVya30gPSB7fTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHN0b3JlUGVyayAocGVyayA6IFBlcmspIHtcclxuICAgICAgICBQZXJrLnBlcmtzW3BlcmsuaWRdID0gcGVyaztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldFBlcmsgKGlkIDogc3RyaW5nKSB7XHJcbiAgICAgICAgcmV0dXJuIFBlcmsucGVya3NbaWRdO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgZ2V0UGVya3MgKCkgOiBBcnJheTxQZXJrPiB7XHJcbiAgICAgICAgbGV0IHBlcmtzID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgaWQgaW4gUGVyay5wZXJrcykge1xyXG4gICAgICAgICAgICBwZXJrcy5wdXNoKFBlcmsucGVya3NbaWRdKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcGVya3Muc29ydCgoYSA6IFBlcmssIGIgOiBQZXJrKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBuYSA9IGEubmFtZS50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgICAgICBsZXQgbmIgPSBiLm5hbWUudG9VcHBlckNhc2UoKTtcclxuICAgICAgICAgICAgaWYgKG5hIDwgbmIpIHJldHVybiAtMTtcclxuICAgICAgICAgICAgaWYgKG5hID4gbmIpIHJldHVybiAxO1xyXG4gICAgICAgICAgICByZXR1cm4gMDtcclxuICAgICAgICB9KTtcclxuICAgICAgICByZXR1cm4gcGVya3M7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyB1cGRhdGVQZXJrcygpIHtcclxuICAgICAgICBmb3IgKGxldCBpZCBpbiBQZXJrLnBlcmtzKSB7XHJcbiAgICAgICAgICAgIGxldCBwZXJrID0gUGVyay5wZXJrc1tpZF07XHJcbiAgICAgICAgICAgIGlmIChwZXJrLmlzRm9yY2VkKCkpIHtcclxuICAgICAgICAgICAgICAgIHBlcmsudmFsdWUgPSA8Ym9vbGVhbj4gcGVyay5mb3JjZWRTdGF0dXMocGVyayk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn0iLCIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi4vU2F5LnRzXCIgLz5cclxuY2xhc3MgT25lT2Yge1xyXG4gICAgcHJpdmF0ZSBwb3NzaWJpbGl0aWVzID0gW107XHJcbiAgICBwcml2YXRlIGF2YWlsYWJsZVBvc3NpYmlsaXRlcztcclxuICAgIHByaXZhdGUgcmFuZG9tTW9kZSA6IG51bWJlcjtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIFBVUkVMWV9BVF9SQU5ET00gOiBudW1iZXIgPSAwO1xyXG4gICAgcHVibGljIHN0YXRpYyBST1RBVElOR19SQU5ET00gOiBudW1iZXIgPSAxO1xyXG4gICAgcHVibGljIHN0YXRpYyBDWUNMSU5HIDogbnVtYmVyID0gMjtcclxuXHJcbiAgICBwcml2YXRlIGN5Y2xpbmdPcmRlciA6IG51bWJlciA9IDA7XHJcblx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HVybiA9IGZhbHNlO1xyXG4gICAgbGV0IG1lbnVzID0gMDtcclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gc3RhcnRNZW51ICgpIHtcclxuICAgICAgICBpZiAoIWlzSW5UdXJuKCkpIHtcclxuICAgICAgICAgICAgbWVudU91dHNpZGVvZlR1cm4gPSB0cnVlO1xyXG4gICAgICAgICAgICBzdGFydFR1cm4oKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgbWFpblBhZ2UuY2xhc3NMaXN0LmFkZChcIm1haW5tZW51XCIpO1xyXG4gICAgICAgIG1lbnVzKys7XHJcbiAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLmNsZWFyKCk7XHJcbiAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5yZXNldCgpO1xyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBlbmRNZW51ICgpIHtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIuY2xlYXIoKTtcclxuICAgICAgICBpZiAoLS1tZW51cyA9PSAwKSB7XHJcbiAgICAgICAgICAgIGlmIChtZW51T3V0c2lkZW9mVHVybikge1xyXG4gICAgICAgICAgICAgICAgZW5kVHVybigpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJlc2V0TWVudXMoKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHJlc2V0TWVudXMgKCkge1xyXG4gICAgICAgIGlmIChtZW51cyAhPSAwKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJBIG1lbnUgd2Fzbid0IGZpbmlzaGVkIHByb3Blcmx5LiBQbGVhc2UgY29ycmVjdCB0aGUgZGlhbG9ndWUuXCIpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBtZW51cyA9IDA7XHJcbiAgICAgICAgbWVudU91dHNpZGVvZlR1cm4gPSBmYWxz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ICAgICAgaWYgKGV2LnNoaWZ0S2V5KSB7XHJcbiAgICAgICAgICAgIG5hbWUgPSBcIlNoaWZ0ICsgXCIgKyBuYW1lO1xyXG4gICAgICAgICAgICBldkNvZGUgPSBcIlNoXCIgKyBldkNvZGU7XHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uID0gXCJTXCIgKyByZXByZXNlbnRhdGlvbjtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGV2LmFsdEtleSkge1xyXG4gICAgICAgICAgICBuYW1lID0gXCJBbHQgKyBcIiArIG5hbWU7XHJcbiAgICAgICAgICAgIGV2Q29kZSA9IFwiQWxcIiArIGV2Q29kZTtcclxuICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gPSBcIkFcIiArIHJlcHJlc2VudGF0aW9uO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoZXYuY3RybEtleSkge1xyXG4gICAgICAgICAgICBuYW1lID0gXCJDb250cm9sICsgXCIgKyBuYW1lO1xyXG4gICAgICAgICAgICBldkNvZGUgPSBcIkN0XCIgKyBldkNvZGU7XHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uID0gXCJDXCIgKyByZXByZXNlbnRhdGlvbjtcclxuICAgICAgICB9XHJcbiAgICAgICAgbGV0IGtleUNvZGUgOiBLZXlDb2RlID0gIHtcclxuICAgICAgICAgICAgZXZDb2RlIDogZXZDb2RlLFxyXG4gICAgICAgICAgICBuYW1lIDogbmFtZSxcclxuICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gOiByZXByZXNlbnRhdGlvblxyXG4gICAgICAgIH07XHJcbiAgICAgICAgcmV0dXJuIGtleUNvZGU7XHJcbiAgICB9XHJcblxyXG4gICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoXCJtb3VzZWRvd25cIiwgZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgbGV0IGtleUNvZGUgOiBLZXlDb2RlID0ge1xyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiQ2xpY2tcIixcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJDbGlja1wiLFxyXG4gICAgICAgICAgICBuYW1lIDogXCJDbGlja1wiXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IHByb21pc2UgPSBwcm9taXNlU3RhY2suc2hpZnQoKTtcclxuICAgICAgICBpZiAocHJvbWlzZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgcHJvbWlzZShrZXlDb2RlKTtcclxuICAgICAgICAgICAgcHJvbWlzZU9yaWdpbmFsU3RhY2suc2hpZnQoKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKFwia2V5ZG93blwiLCBmdW5jdGlvbiAoZXZlbnQpIHtcclxuICAgICAgICAvL2V2ZW50LnByZXZlbnREZWZhdWx0KCk7IFRoaXMgZnVja3MgdXAgYnJvd3NlciBjb250cm9sLiBMZXQncyBqdXN0IGFzc3VtZSB0aGF0IHRoaXMgaXMgYWx3YXlzIGdvaW5nIHRvIGJlIHRoZSBsYXN0IHRoaW5nIHRvIGNhdGNoIGEga2V5LlxyXG4gICAgICAgIGxldCBrZXlDb2RlID0gY3JlYXRlS2V5Q29kZShldmVudCk7XHJcblxyXG4gICAgICAgIGxldCBwcm9taXNlID0gcHJvbWlzZVN0YWNrLnNoaWZ0KCk7XHJcbiAgICAgICAgaWYgKHByb21pc2UgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHByb21pc2Uoa2V5Q29kZSk7XHJcbiAgICAgICAgICAgIHByb21pc2VPcmlnaW5hbFN0YWNrLnNoaWZ0KCk7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChrZXlDb2RlLmV2Q29kZSA9PSBzY3JvbGxLZXlDb2RlLmdldFZhbHVlKCkuZXZDb2RlKSB7XHJcbiAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5zY3JvbGxTcGFjZSgpO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfSBlbHNlIGlmIChrZXlDb2RlLmV2Q29kZSA9PSBpbWFnZUtleUNvZGUuZ2V0VmFsdWUoKS5ldkNvZGUpIHtcclxuICAgICAgICAgICAgaWYgKFNheUltYWdlLmltYWdlVmlld2VyLnN0eWxlLmRpc3BsYXkgPT0gXCJibG9ja1wiKSB7XHJcbiAgICAgICAgICAgICAgICBTYXlJbWFnZS5pbWFnZVZpZXdlci5zdHlsZS5kaXNwbGF5ID0gXCJub25lXCI7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgaW1hZ2VzID0gRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLmN1cnJlbnRUdXJuVGFiLmdldEVsZW1lbnRzQnlDbGFzc05hbWUoXCJjb250ZW50SW1hZ2VcIik7XHJcbiAgICAgICAgICAgICAgICBpZiAoaW1hZ2VzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAoPEhUTUxFbGVtZW50PiBpbWFnZXNbaW1hZ2VzLmxlbmd0aCAtIDFdKS5jbGljaygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGxldCBlbGU7XHJcblxyXG4gICAgICAgIEVsZW1lbnRzLmdldExpbmtFbGVtZW50cygpLnNvbWUoKGVsZW1lbnQgOiBIVE1MRWxlbWVudCkgPT4ge1xyXG4gICAgICAgICAgICBsZXQga2V5YWJsZXMgPSBlbGVtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoXCJrZXlhYmxlXCIpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGtleWFibGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoKDxIVE1MRWxlbWVudD4ga2V5YWJsZXNbaV0pLmRhdGFzZXRbJ3Nob3J0Y3V0Y29kZSddID09IGtleUNvZGUuZXZDb2RlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZWxlID0ga2V5YWJsZXNbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICBpZiAoZWxlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBlbGUuY2xpY2soKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gY3JlYXRlS2V5Q29kZXMgKGNvZGVzIDogQXJyYXk8c3RyaW5nPiwga2V5cyA6IEFycmF5PHN0cmluZz4sIG1vZHM/IDogQXJyYXk8Ym9vbGVhbj4pIHtcclxuICAgICAgICBsZXQgYXJyID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgbW9kID0gMDsgbW9kIDwgNDsgbW9kKyspIHtcclxuICAgICAgICAgICAgaWYgKG1vZCA9PSAwIHx8IG1vZHNbbW9kXSA9PSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvZGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBrZXlzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXByZXNlbnRhdGlvbiA9IGtleXNbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGV2Q29kZSA9IGNvZGVzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2QgPT0gMSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gXCJTaGlmdCArIFwiICsgbmFtZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZDb2RlID0gXCJTaFwiICsgZXZDb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXByZXNlbnRhdGlvbiA9IFwiU1wiICsgcmVwcmVzZW50YXRpb247XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2QgPT0gMikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lID0gXCJBbHQgKyBcIiArIG5hbWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2Q29kZSA9IFwiQWxcIiArIGV2Q29kZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVwcmVzZW50YXRpb24gPSBcIkFcIiArIHJlcHJlc2VudGF0aW9uO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAobW9kID09IDMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSA9IFwiQ29udHJvbCArIFwiICsgbmFtZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXZDb2RlID0gXCJDdFwiICsgZXZDb2RlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXByZXNlbnRhdGlvbiA9IFwiQ1wiICsgcmVwcmVzZW50YXRpb247XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBrZXlDb2RlOiBLZXlDb2RlID0ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBldkNvZGU6IGV2Q29kZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVwcmVzZW50YXRpb246IHJlcHJlc2VudGF0aW9uLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lIDogbmFtZVxyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAg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cclxuICAgIGV4cG9ydCB2YXIga2V5Q29kZVNvdXRoID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVTb3V0aFwiLFxyXG4gICAgICAgIDxLZXlDb2RlPiB7XHJcbiAgICAgICAgICAgIGV2Q29kZSA6IFwiS2V5WFwiLFxyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiWFwiXHJcbiAgICAgICAgfVxyXG4gICAgKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIGtleUNvZGVXZXN0ID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVXZXN0XCIsXHJcbiAgICAgICAgPEtleUNvZGU+IHtcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJLZXlaXCIsXHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uIDogXCJaXCJcclxuICAgICAgICB9XHJcbiAgICApO1xyXG5cclxuICAgIGV4cG9ydCB2YXIga2V5Q29kZVVwID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVVcFwiLFxyXG4gICAgICAgIDxLZXlDb2RlPiB7XHJcbiAgICAgICAgICAgIGV2Q29kZSA6IFwiS2V5QVwiLFxyXG4gICAgICAgICAgICByZXByZXNlbnRhdGlvbiA6IFwiQVwiXHJcbiAgICAgICAgfVxyXG4gICAgKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIGtleUNvZGVEb3duID0gbmV3IFN0b3JlZE1lbW9yeShcclxuICAgICAgICBcImtleUNvZGVEb3duXCIsXHJcbiAgICAgICAgPEtleUNvZGU+IHtcclxuICAgICAgICAgICAgZXZDb2RlIDogXCJLZXlEXCIsXHJcbiAgICAgICAgICAgIHJlcHJlc2VudGF0aW9uIDogXCJEXCJcclxuICAgICAgICB9XHJcbiAgICApO1xyXG5cclxuICAgIC8vIFRPRE86IE1ha2UgdGhpcyBzYWZlciBieSBjcmVhdGluZyBpdCB1c2luZyBSb29tLkRJUk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YXZhaWxhYmxlMy5sZW5ndGggPiAwID8gYXZhaWxhYmxlMyA6IHVuZGVmaW5lZDtcclxuICAgICAgICBpZiAoY2hvc2VuICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gY2hvc2VuLnNoaWZ0KCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIGdldFNlY29uZEtleUNvZGUgKCkge1xyXG4gICAgICAgIGxldCBjaG9zZW4gPSBhdmFpbGFibGUyLmxlbmd0aCA+IDAgPyBhdmFpbGFibGUyIDpcclxuICAgICAgICAgICAgYXZhaWxhYmxlMy5sZW5ndGggPiAwID8gYXZhaWxhYmxlMyA6IHVuZGVmaW5lZDtcclxuICAgICAgICBpZiAoY2hvc2VuICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gY2hvc2VuLnNwbGljZSgwLCAxKVswXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gZ2V0VGhpcmRLZXlDb2RlICgpIHtcclxuICAgICAgICBsZXQgY2hvc2VuID0gYXZhaWxhYmxlMy5sZW5ndGggPiAwID8gYXZhaWxhYmxlMyA6IHVuZGVmaW5lZDtcclxuICAgICAgICBpZiAoY2hvc2VuICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gY2hvc2VuLnNwbGljZSgwLCAxKVswXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJldHVybnMgYSBwcm9taXNlIG9mIGEga2V5IHByZXNzLlxyXG4gICAgICogSWYgYWZ0ZXIgdGltZW91dCBzZWNvbmRzIGEga2V5IHdhcyBub3QgcHJlc3NlZCwgdGhlIHByb21pc2UgZmFpbHMuXHJcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gdGltZW91dFxyXG4gICAgICovXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gZ2V0TmV4dEtleSAodGltZW91dD8gOiBudW1iZXIpIDogUHJvbWlzZTxLZXlDb2RlPiB7XHJcbiAgICAgICAgbGV0IHRpbWVvdXROdW1iZXI7XHJcbiAgICAgICAgbGV0IHByb21pc2UgPSA8UHJvbWlzZTxLZXlDb2RlPj4gKG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICAgICAgcHJvbWlzZVN0YWNrLnB1c2gocmVzb2x2ZSk7XHJcblxyXG4gICAgICAgICAgICBpZiAodGltZW91dCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRpbWVvdXROdW1iZXIgPSBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBLZXlIYW5kbGVyLnJlamVjdFByb21pc2UocmVzb2x2ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KCk7XHJcbiAgICAgICAgICAgICAgICB9LCB0aW1lb3V0ICogMTAwMCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgIHByb21pc2UudGhlbigoKSA9PiB7XHJcbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lb3V0TnVtYmVyKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgcmV0dXJuIHByb21pc2U7XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHN0b3BHaXZpbmdOZXh0S2V5IChvcmlnaW5hbFByb21pc2UgOiBQcm9taXNlPEtleUNvZGU+KSB7XHJcbiAgICAgICAgbGV0IGluZGV4ID0gcHJvbWlzZU9yaWdpbmFsU3RhY2suaW5kZXhPZihvcmlnaW5hbFByb21pc2UpO1xy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gIGZvcih2YXIgeCBpbiBydWxlcykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBydWxlc1t4XS5zZWxlY3RvclRleHQgPT0gJ3N0cmluZycgJiYgcnVsZXNbeF0uc2VsZWN0b3JUZXh0ID09IFwiLlwiICsgdGhpcy5pbWdOYW1lKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICBjb25zb2xlLndhcm4oXCJDYW4ndCBjaGVjayBmb3IgdW5kZWZpbmVkIGltYWdlcy5cIik7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgY29uc3RydWN0b3IgKGltZ05hbWUgOiBzdHJpbmcpIHtcclxuICAgICAgICB0aGlzLmltZ05hbWUgPSBpbWdOYW1lO1xyXG5cclxuICAgICAgICBpZiAoIVNheUltYWdlLmxvYWRUaW1lQ2hlY2sgJiYgU2F5SW1hZ2UuaW1hZ2VOYW1lcy5pbmRleE9mKHRoaXMpID09IC0xKSB7XHJcbiAgICAgICAgICAgIFNheUltYWdlLmltYWdlTmFtZXMucHVzaCh0aGlzKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEltYWdlRWxlbWVudCAoKSA6IEVsZW1lbnQge1xyXG4gICAgICAgIGxldCBpbWcgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwiZGl2XCIpO1xyXG4gICAgICAgIGlmICh0aGlzLmlzSW1hZ2VEZWZpbmVkKCkpIHtcclxuICAgICAgICAgICAgaW1nLmNsYXNzTGlzdC5hZGQodGhpcy5pbWdOYW1lKTtcclxuIC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gICAgICAgICAgICBpZiAoc2VxIGluc3RhbmNlb2YgT25lT2YpIHtcclxuICAgICAgICAgICAgICAgIHNlcSA9IHNlcS5nZXRPbmUoKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKHNlcSA9PSBTYXkuQ0VOVEVSRUQpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0Q2VudGVyZWQodHJ1ZSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VxID09IFNheS5iKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgYm9sZE9iamVjdHMgPSBbXTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSB0aGlzLnNlcXVlbmNlUnVubmVyICsgMTsgaSA8IHRoaXMuc2VxdWVuY2UubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgY2FuZGlkYXRlID0gdGhpcy5zZXF1ZW5jZVJ1bm5lcltpXTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoY2FuZGlkYXRlID09IFNheS5iKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBib2xkT2JqZWN0cy5wdXNoKHRoaXMuc2VxdWVuY2Uuc3BsaWNlKGksIDEpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoYm9sZE9iamVjdHMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBib2xkID0gbmV3IFNheUJvbGQoLi4uYm9sZE9iamVjdHMpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKHRoaXMuc2VxdWVuY2VSdW5uZXIgKyAxLCAwLCBib2xkKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEgPT0gU2F5LkNPQ0spIHtcclxuICAgICAgICAgICAgICAgIGlmIChIdW1hbm9pZFBlbmlzICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2NrID0gSHVtYW5vaWRQZW5pcy5nZXRTeW5vbnltKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50UGFyYWdyYXBoLnB1c2goZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoY29jaykpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gIGVsc2UgaWYgKHNlcSA9PSBTYXkuUFVTU1kpIHtcclxuICAgICAgICAgICAgICAgIGlmIChIdW1hbm9pZFZhZ2luYSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgdmFnaW5hID0gSHVtYW5vaWRWYWdpbmEuZ2V0U3lub255bSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudFBhcmFncmFwaC5wdXNoKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHZhZ2luYSkpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VxID09IFNheS5MSU5FX0JSRUFLKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmRvTGluZUJyZWFrKCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2VxID09IFNheS5QQVJBR1JBUEhfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuZG9QYXJhZ3JhcGhCcmVhaygpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNlcSA9PSBTYXkuUlVOX1BBUkFHUkFQSCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5za2lwYnJlYWtzID0gdHJ1ZTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEgPT0gU2F5LlJVTl9QQVJBR1JBUEhfT0ZGKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnNraXBicmVha3MgPSBmYWxzZTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2Ygc2VxID09IFwiZnVuY3Rpb25cIikge1xyXG4gICAgICAgICAgICAgICAgbGV0IGZPYmogPSAoPChzOiBTYXkpID0+IGFueT4gc2VxKSh0aGlzKTtcclxuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZPYmopKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgayA9IGZPYmoubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZS5zcGxpY2UodGhpcy5zZXF1ZW5jZVJ1bm5lciArIDEsIDAsIGZPYmpba10pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZk9iaiAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlcXVlbmNlLnNwbGljZSh0aGlzLnNlcXVlbmNlUnVubmVyICsgMSwgMCwgZk9iaik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB0aGlzLnNlcXVlbmNlLnNwbGljZSh0aGlzLnNlcXVlbmNlUnVubmVyLCAxKTtcclxuICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2VSdW5uZXItLTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChzZXEuY29uc3RydWN0b3IgPT0gdGhpcy5jb25zdHJ1Y3Rvcikge1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgayA9ICg8U2F5PiBzZXEpLnNlcXVlbmNlLmxlbmd0aCAtIDE7IGsgPj0gMDsgay0tKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZS5zcGxpY2UodGhpcy5zZXF1ZW5jZVJ1bm5lciArIDEsIDAsICg8U2F5PiBzZXEpLnNlcXVlbmNlW2tdKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VxdWVuY2Uuc3BsaWNlKHRoaXMuc2VxdWVuY2VSdW5uZXIsIDEpO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5zZXF1ZW5jZVJ1bm5lci0tO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNlcSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCBlbGVtZW50cyA9IGF3YWl0IHRoaXMuZ2V0RWxlbWVudEZvcih0aGlzLnNlcXVlbmNlUnVubmVyLCBzZXEpO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbGVtZW50cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50c1tpXSA9PT0gU2F5LkRPX0xJTkVfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kb0xpbmVCcmVhaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZWxlbWVudHNbaV0gPT09IFNheS5ET19QQVJBR1JBUEhfQlJFQUspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kb1BhcmFncmFwaEJyZWFrKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50UGFyYWdyYXBoLnB1c2goZWxlbWVudHNbaV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gVE9ETzogUmVtb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KTtcclxuXHJcbiAgICAgICAgLy8gUmVkdWNlIHRvIHNpbmdsZSBwYXJhZ3JhcGhcclxuICAgICAgICBpZiAoc2luZ2xlUGFyYWdyYXBoID09IHRydWUgJiYgcGFyYWdyYXBocy5sZW5ndGggPiAxKSB7XHJcbiAgICAgICAgICAgIHBhcmFncmFwaHMgPSBbQXJyYXkucHJvdG90eXBlLmNvbmNhdC5hcHBseShbXSwgcGFyYWdyYXBocyldO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgbGV0IGVsZW1lbnRzID0gW107XHJcblxyXG5cclxuICAgICAgICBmb3IgKGxldCBpID0gMCwgcGFyYWdyYXBoID0gcGFyYWdyYXBoc1tpXTsgcGFyYWdyYXBoICE9IHVuZGVmaW5lZDsgcGFyYWdyYXBoID0gcGFyYWdyYXBoc1srK2ldKSB7XHJcbiAgICAgICAgICAgIGxldCBwYXJlbnQgPSA8SFRNTEVsZW1lbnQ+IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQodGFnTmFtZSk7XHJcbiAgICAgICAgICAgIGlmIChjbGFzc0xpc3QubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgcGFyZW50LmNsYXNzTGlzdC5hZGQoLi4uY2xhc3NMaXN0KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgZm9yIChsZXQgayA9IDAsIGVsZSA9IHBhcmFncmFwaFtrXTsgZWxlIT0gdW5kZWZpbmVkOyBlbGUgPSBwYXJhZ3JhcGhbKytrXSkge1xyXG4gICAgICAgICAgICAgICAgcGFyZW50LmFwcGVuZENoaWxkKGVsZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZWxlbWVudHMucHVzaChwYXJlbnQpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHRoaXMuY2VudGVyZWQpIHtcclxuICAgICAgICAgICAgICAgIHBhcmVudC5jbGFzc0xpc3QuYWRkKFwiY2VudGVyZWRcIik7XHJcbiAgICAgICAgIC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ogUHJvbWlzZTxBcnJheTxIVE1MRWxlbWVudD4+IHtcclxuICAgICAgICByZXR1cm4gc2F5LmdldEhUTUwoXCJwXCIsIFtcImNvbnRlbnRcIl0pO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogUHJpbnRzIGdpdmVuIFNheSBkaXJlY3RseVxyXG4gICAgICogQHBhcmFtIHNheVxyXG4gICAgICovXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gcHJpbnRBc0NvbnRlbnQgKHNheSA6IFNheSkge1xyXG4gICAgICAgIGxldCBub2RlID0gZ2V0TWFya2VyKCk7XHJcbiAgICAgICAgZ2V0U2F5RWxlbWVudHNBc0NvbnRlbnQoc2F5KS50aGVuKHZhbHVlID0+IHtcclxuICAgICAgICAgICAgaW5zZXJ0QmVmb3JlKHZhbHVlLCBub2RlKTtcclxuICAgICAgICAgICAgdW5wcmludChub2RlKTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIENyZWF0ZXMgYSBzYXkgZm9yIHNheVZhbHVlcyBhbmQgdGhlbiBwcmludHMgaXQgYXMgY29udGVudC5cclxuICAgICAqIEBwYXJhbSBzYXlWYWx1ZXNcclxuICAgICAqL1xyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIHNpbXBsZVByaW50ICguLi5zYXlWYWx1ZXMgOiBBcnJheTxhbnk+KSB7XHJcbiAgICAgICAgcHJpbnRBc0NvbnRlbnQobmV3IFNheSguLi5zYXlWYWx1ZXMpKTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gcHJpbnRBc0Vycm9yIChtc2cgOiBTYXkgfCBzdHJpbmcpIHtcclxuICAgICAgICBpZiAobXNnIGluc3RhbmNlb2YgU2F5KSB7XHJcbiAgICAgICAgICAgIG1zZy5nZXRIVE1MKFwiZGl2XCIsIFtcImVycm9yXCJdLCB0cnVlKS50aGVuKHZhbHVlID0+IHtcclxuICAgICAgICAgICAgICAgIHByaW50KC4uLnZhbHVlKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgbGV0IGRpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XHJcbiAgICAgICAgICAgIGRpdi5jbGFzc0xpc3QuYWRkKFwiZXJyb3JcIik7XHJcbiAgICAgICAgICAgIGRpdi5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShtc2cpKTtcclxuICAgICAgICAgICAgcHJpbnQoZGl2KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZXhwb3J0IGZ1bmN0aW9uIGNsZWFyICgpIHtcclxuICAgICAgICB3aGlsZSAoY3VycmVudFR1cm5UYWIuZmlyc3RDaGlsZCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgY3VycmVudFR1cm5UYWIucmVtb3ZlQ2hpbGQoY3VycmVudFR1cm5UYWIuZmlyc3RDaGlsZCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIENvbnRyb2xzLktleUhhbmRsZXIucmVzZXQoKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIEluY2x1ZGVzIHRoZSBnaXZlbiBlbGVtZW50cyBhcyBjb250ZW50LlxyXG4gICAgICogVGhpcyBpcyB0aGUgb25seSBjb3JyZWN0IHdheSBvZiBwcmludGluZyBlbGVtZW50cy5cclxuICAgICAqIEBwYXJhbSBlbGVtZW50c1xyXG4gICAgICovXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gcHJpbnQgKC4uLmVsZW1lbnRzIDogQXJyYXk8Tm9kZT4pIHtcclxuICAgICAgICBpZihlbGVtZW50cy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIGVsZW1lbnRzLmZvckVhY2goKGVsZW1lbnQpID0+IHtcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRUdXJuVGFiLmFwcGVuZEN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QVRFRFxyXG4gICAgICAgICAgICAvL3RoaXMudXBkYXRlKCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBjcmVhdGVSb29tTmFtZUZsb2F0ZXIgKCkge1xyXG4gICAgICAgIGlmICh0aGlzLnJvb20gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGxldCByb29tTmFtZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XHJcblxyXG4gICAgICAgICAgICBsZXQgc2F5TmFtZSA9IG5ldyBTYXkodGhpcy5yb29tKTtcclxuICAgICAgICAgICAgYXdhaXQgc2F5TmFtZS5nZXRQdXJlRWxlbWVudHMoKS50aGVuKHZhbHVlID0+IHtcclxuICAgICAgICAgICAgICAgIHZhbHVlLmZvckVhY2goZWxlbWVudCA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgcm9vbU5hbWUuYXBwZW5kQ2hpbGQoZWxlbWVudCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgICAgICAgICBFbGVtZW50cy5Ib3ZlckluZm8ubWFrZUhvdmVyYWJsZSh0aGlzLm1haW5EaXYsIHZhbHVlKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyB1cGRhdGUgKCkge1xyXG4gICAgICAgIGlmICh0aGlzLnJvb20gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGlmIChXb3JsZFN0YXRlLnBsYXllci5nZXRSb29tKCkgPT0gdGhpcy5yb29tKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LmFkZChcImN1cnJlbnRcIik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm1haW5EaXYuY2xhc3NMaXN0LnJlbW92ZShcImN1cn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0aW1lcyBcImFuXCIgd2FzIHNlZW4gZm9yIHRoaXMgcHJlZml4XHJcbiAgICAgICAgLy8gICBhcnRpY2xlOiBcImFuXCIsIC8vdGhlIG1vc3QgY29tbW9uIGFydGljbGVcclxuICAgICAgICAvL31cclxuICAgICAgICBxdWVyeTogZnVuY3Rpb24gKHdvcmQpIHtcclxuXHJcbiAgICAgICAgICAgIHZhciBub2RlIDogYW55ID0gcm9vdCwgc0kgPSAwLCByZXN1bHQsIGM7XHJcbiAgICAgICAgICAgIGRvIHtcclxuICAgICAgICAgICAgICAgIGMgPSB3b3JkW3NJKytdO1xyXG4gICAgICAgICAgICB9IHdoaWxlICgnXCLigJjigJnigJzigJ0kXFwnLSgnLmluZGV4T2YoYykgPj0gMCk7Ly9hbHNvIHRlcm1pbmF0ZXMgb24gZW5kLW9mLXN0cmluZyBcInVuZGVmaW5lZFwiLlxyXG5cclxuICAgICAgICAgICAgd2hpbGUgKDEpIHtcclxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IG5vZGUuZGF0YSB8fCByZXN1bHQ7XHJcbiAgICAgICAgICAgICAgICBub2RlID0gbm9kZVtjXTtcclxuICAgICAgICAgICAgICAgIGlmICghbm9kZSkgcmV0dXJuIHJlc3VsdDtcclxuICAgICAgICAgICAgICAgIGMgPSB3b3JkW3NJKytdIHx8IFwiIFwiO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxufSkoKTsiLCIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi4vU2F5LnRzXCIgLz5cclxuY2xhc3MgU2F5Qm9sZCBleHRlbmRzIFNheSB7XHJcbiAgICBwdWJsaWMgYXN5bmMgZ2V0UHVyZUVsZW1lbnRzICgpIDogUHJvbWlzZTxBcnJheTxFbGVtZW50IHwgVGV4dD4+IHtcclxuICAgICAgICBsZXQgcGFyYWdyYXBocyA9IGF3YWl0IHRoaXMuZ2V0UGFyYWdyYXBocygpO1xyXG5cclxuICAgICAgICBsZX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5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcIlwiO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGlmIChuZXh0IGluc3RhbmNlb2YgSHVtYW5vaWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCBnZW5kZXIgPSBuZXh0LmdldEdlbmRlclZhbHVlKCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoZ2VuZGVyLmdlbmRlclZhbHVlQ29ycmVjdGVkID4gNjUpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJzaGUgXCI7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5nZW5kZXJWYWx1ZUNvcnJlY3RlZCA8IDM1KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGUgXCI7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgcGVyc29uIGlzIGFuZHJvZ3lub3VzLi4uXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdlbmRlci5oYXNQZW5pc0J1bGdlIHx8IGdlbmRlci5oYXNQZW5pcykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJoZSBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwic2hlIFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcInRoZXkgXCI7XHJcbiAg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gIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpbSBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGVyIFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcInRoZW0gXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogSWYgd2UgZXZlciBoYXZlIGdlbmRlcmVkIG5vbi1odW1hbm9pZHMsIHRoZXkgbXVzdCBiZSBhZGRlZCBoZXJlLlxyXG4gICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaXQgXCI7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh0aGlzLnVwcGVyY2FzZSAmJiBzYXkuY3VycmVudFBhcmFncmFwaC5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IHRoaXMubm9kZS5ub2RlVmFsdWUuY2hhckF0KDApLnRvVXBwZXJDYXNlKClcclxuICAgICAgICAgICAgICAgICAgICArIHRoaXMubm9kZS5ub2RlVmFsdWUuc3Vic3RyKDEsIHRoaXMubm9kZS5ub2RlVmFsdWUubGVuZ3RoIC0gMSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIFt0aGlzLm5vZGVdO1xyXG4gICAgfVxyXG59IiwiY2xhc3MgU2F5SGlzSGVyc0l0cyBleHRlbmRzIFNheSB7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5kZXIuZ2VuZGVyVmFsdWVDb3JyZWN0ZWQgPCAzNSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpcyBcIjtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gVGhpcyBwZXJzb24gaXMgYW5kcm9neW5vdXMuLi5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2VuZGVyLmhhc1BlbmlzQnVsZ2UgfHwgZ2VuZGVyLmhhc1BlbmlzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcImhpcyBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdlbmRlci5oYXNWYWdpbmEgfHwgZ2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiaGVycyBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJ0aGVpciBcIjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAvLyBUT0RPOiBJZiB3ZSBldmVyIGhhdmUgZ2VuZGVyZWQgbm9uLWh1bWFub2lkcywgdGhleSBtdXN0IGJlIGFkZGVkIGhlcmUuXHJcbiAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJpdHMgXCI7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh0aGlzLnVwcGVyY2FzZSAmJiBzYXkuY3VycmVudFBhcmFncmFwaC5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgdGhp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iAgICAgICAgICAgIHRoaXMudXBwZXJjYXNlID0gYXV0b1VwcGVyY2FzZTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGFsd2F5c1ByaW50KSB7XHJcbiAgICAgICAgICAgIHRoaXMuYWx3YXlzUHJpbnQgPSBhbHdheXNQcmludDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFzeW5jIGdldFB1cmVFbGVtZW50cyAoc2F5IDogU2F5KSA6IFByb21pc2U8QXJyYXk8RWxlbWVudCB8IFRleHQ+PiB7XHJcbiAgICAgICAgbGV0IG5leHQgPSBzYXkuc2VxdWVuY2Vbc2F5LnNlcXVlbmNlUnVubmVyICsgMV07XHJcbiAgICAgICAgaWYgKHRoaXMuYWx3YXlzUHJpbnQpIHtcclxuICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwidGhlIFwiO1xyXG4gICAgICAgIH0gZWxzZSBpZiAobmV4dCA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwiXCI7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKG5leHQgaW5zdGFuY2VvZiBUaGluZykge1xyXG4gICAgICAgICAgICAgICAgaWYgKCEoPFRoaW5nPiBuZXh0KS5wcm9wZXJseU5hbWVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2RlLm5vZGVWYWx1ZSA9IFwidGhlIFwiO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGUubm9kZVZhbHVlID0gXCJcIjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMubm9kZS5ub2RlVmFsdWUgPSBcIlwiO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgIC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FzIFwiICsgSHVtYW5vaWRCcmVhc3RzLmdldFNpemVUZXh0KGJ1bGdlcy5icmVhc3RzKSArIFwiKVwiKTtcclxuXHJcbiAgICAgICAgaWYgKHBlbmlzID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBwcmVzZW50YXRpb24uYWRkKFwiIFlvdSBoYXZlIFwiLCBuZXcgU2F5QW4oKSwgSHVtYW5vaWRQZW5pcy5nZXRTaXplVGV4dChidWxnZXMuY3JvdGNoKSArIFwiIGNyb3RjaCBidWxnZSB2aXNpYmxlIHRocm91Z2ggeW91ciBjbG90aGluZy5cIik7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgbGV0IHJlYWxEaWNrID0gcGVuaXMuZ2V0U2l6ZVRleHQoKTtcclxuICAgICAgICAgICAgbGV0IGZha2VEaWNrID0gSHVtYW5vaWRQZW5pcy5nZXRTaXplVGV4dChidWxnZXMuY3JvdGNoKTtcclxuICAgICAgICAgICAgcHJlc2VudGF0aW9uLmFkZChcIiBZb3UgaGF2ZSBcIiwgbmV3IFNheUFuKCksIHJlYWxEaWNrICsgXCIgZGlja1wiKTtcclxuICAgICAgICAgICAgaWYgKHBlbmlzLmdldEFjdHVhbFNpemUoKSAhPSBidWxnZXMuY3JvdGNoICYmIHJlYWxEaWNrICE9IGZha2VEaWNrKSB7XHJcbiAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24uYWRkKFwiLCB3aGljaCBsb29rcyBsaWtlIGl0IGlzIFwiICsgZmFrZURpY2sgKyBcIiBkdWUgdG8geW91ciBjbG90aGluZy5cIilcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGlmICghcGVuaXMuaXNVbmNvdmVyZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbi5hZGQoXCIsIHdoaWNoIGlzIGNvdmVyZWQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24uYWRkKFwiLlwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gaWYgKHBlbmlzID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgIC8vICAgICBpZiAoYnVsZ2VzLmNyb3RjaCA+IDApIHtcclxuICAgICAgICAvLyAgICAgICAgIHByZXNlbnRhdGlvbi5hZGQoU2F5LlBBUkFHUkFQSF9CUkVBSywgXCJZb3UgaGF2ZSBcIiwgbmV3IFNheUFuKCksIEh1bWFub2lkUGVuaXMuZ2V0U2l6ZVRleHQoYnVsZ2VzLmNyb3RjaCkgKyBcIiBidWxnZSB2aXNpYmxlIG9uIHlvdXIgY3JvdGNoLlwiKTtcclxuICAgICAgICAvLyAgICAgfVxyXG4gICAgICAgIC8vIH0gZWxzZSB7XHJcbiAgICAgICAgLy8gICAgIHByZXNlbnRhdGlvbi5hZGQoU2F5LlBBUkFHUkFQSF9CUkVBSyxcclxuICAgICAgICAvLyAgICAgICAgIG5ldyBTYXlCb2xkKFwiRGljazogXCIpLFxyXG4gICAgICAgIC8vICAgICAgICAgcGVuaXMuZ2V0U2l6ZVRleHQoKSxcclxuICAgICAgICAvLyAgICAgICAgIFwiIChWaXNpYmxlIGFzIFwiLFxyXG4gICAgICAgIC8vICAgICAgICAgbmV3IFNheUFuKCksXHJcbiAgICAgICAgLy8gICAgICAgICBIdW1hbm9pZFBlbmlzLmdldFNpemVUZXh0KGJ1bGdlcy5jcm90Y2gpLFxyXG4gICAgICAgIC8vICAgICAgICAgICAgIHBsYXllckdlbmRlci5oYXNQZW5pcyA/XHJcbiAgICAgICAgLy8gICAgICAgICAgICAgICAgIChwZW5pcy5pc0ZsYWNjaWQgPyBcIiBmbGFjY2lkXCIgOiBcIiBlcmVjdFwiKSArXHJcbiAgICAgICAgLy8gICAgICAgICAgICAgICAgIChwZW5pcy5nZXRBY3R1YWx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lY2tSdWxlYm9va3MgPSBbXTtcclxuICAgICAgICBsZXQgY2FycnlSdWxlYm9va3MgPSBbXTtcclxuICAgICAgICBsZXQgY0NsYXNzID0gdGhpcy5jb25zdHJ1Y3RvcjtcclxuICAgICAgICB3aGlsZSAoY0NsYXNzICE9IEFjdGlvbikge1xyXG4gICAgICAgICAgICBpZiAoKDx0eXBlb2YgQWN0aW9uPiBjQ2xhc3MpLmNoZWNrICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgY2hlY2tSdWxlYm9va3MucHVzaCgoPHR5cGVvZiBBY3Rpb24+IGNDbGFzcykuY2hlY2spO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICgoPHR5cGVvZiBBY3Rpb24+IGNDbGFzcykuY2FycnkgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBjYXJyeVJ1bGVib29rcy5wdXNoKCg8dHlwZW9mIEFjdGlvbj4gY0NsYXNzKS5jYXJyeSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY0NsYXNzID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKGNDbGFzcyk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKipcclxuICAgICAgICAgKiBDaGVjayBpZiBhY3Rpb24gZ29lcyB0aHJvdWdoXHJcbiAgICAgICAgICovXHJcbiAgICAgICAgbGV0IHJlc3VsdCA9IGF3YWl0IEFjdGlvbi5jaGVjay5leGVjdXRlKHtcclxuICAgICAgICAgICAgbm91biA6IHRoaXNcclxuICAgICAgICB9LCAuLi5jaGVja1J1bGVib29rcyk7XHJcblxyXG4gICAgICAgIC8vIFRoZXJlIGFyZSBub3cgbXVsdGlwbGUgcmVzdWx0cyEgQSBmYWxzZSByZXN1bHQgbWVhbnMgYSBmYWlsIENoZWNrISBCdXQgaXQgY2FuIGFsc28gcmV0dXJuIGEgbmV3IGFjdGlvbiFcclxuICAgICAgICBpZiAocmVzdWx0ID09IGZhbHNlKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9IGVsc2UgaWYocmVzdWx0IGluc3RhbmNlb2YgQWN0aW9uKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUuZGVidWcoUnVsZWJvb2suZ2V0SW5kZW50YXRpb24oKSArIFwiW0FDVElPTl0gSW5zdGVhZCBvZi4uLlwiKTtcclxuICAgICAgICAgICAgYXdhaXQgcmVzdWx0LmV4ZWN1dGUoKTtcclxuICAgICAgICAgICAgdGhpcy5zYXkuYWRkKHJlc3VsdC5zYXkpO1xyXG4gICAgICAgICAgICB0aGlzLm5vdW5zID0gcmVzdWx0Lm5vdW5zO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKipcclxuICAgICAgICAgKiBDYXJyeSBPdXRcclxuICAgICAgICAgKi9cclxuICAgICAgICBhd2FpdCBBY3Rpb24uY2FycnkuZXhlY3V0ZSh7XHJcbiAgICAgICAgICAgIG5vdW4gOiB0aGlzXHJcbiAgICAgICAgfSwgLi4uY2FycnlSdWxlYm9va3MpO1xyXG5cclxuICAgICAgICByZXR1cm4gdGhpcy5zYXk7XHJcbiAgICB9XHJcblxyXG4gICAgZ2V0IGFjdG9yKCk6IFRoaW5nIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5fYWN0b3I7XHJcbiAgICB9XHJcblxyXG4gICAgc2V0IGFjdG9yKHZhbHVlOiBUaGluZykge1xyXG4gICAgICAgIHRoaXMuX2FjdG9yID0gdmFsdWU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldE5vdW4gKG4gOiBudW1iZXIpIDogYW55IHtcclxuICAgICAgICBpZiAodGhpcy5ub3Vucy5sZW5ndGggPiBuKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0aGlzLm5vdW5zW25dO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xyXG4gICAgfVxy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pZDIgKyBcIjtcIiArIGlkMSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgc3RhdGljIG9iamVjdENvdW50ID0gMDtcclxuICAgIHByaXZhdGUgc3RhdGljIG9iamVjdElkRmllbGQgPSBcIl9SRUxBVElPTklOVEVSTkFMSURcIjtcclxuXHJcbiAgICAvKipcclxuICAgICAqIGlmIGdldElkID49IDAsIHRoZW4gb2JqIGlzIE5PVCBhbiBPYmplY3RcclxuICAgICAqIGlmIGdldElkICA8IDAsIHRoZW4gb2JqIGlzIGFuIE9iamVjdFxyXG4gICAgICogQHBhcmFtIG9ialxyXG4gICAgICogQHJldHVybnMge251bWJlcn1cclxuICAgICAqL1xyXG4gICAgcHVibGljIHN0YXRpYyBnZXRJZCAob2JqIDogT2JqZWN0KSA6IG51bWJlciB7XHJcbiAgICAgICAgaWYgKG9ialtSZWxhdGlvbi5vYmplY3RJZEZpZWxkXSA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgb2JqW1JlbGF0aW9uLm9iamVjdElkRmllbGRdID0gUmVsYXRpb24ub2JqZWN0Q291bnQrKztcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIG9ialtSZWxhdGlvbi5vYmplY3RJZEZpZWxkXTtcclxuICAgIH1cclxufSIsIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi9SZWxhdGlvbi50c1wiIC8+XHJcbi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi8uLi8uLi9GdW5jdGlvbnMudHNcIiAvPlxyXG5jbGFzcyBSZWxhdGlvbkhhbmRsZXJTdHJpY3RPbmVUb01hbnkgZXh0ZW5kcyBSZWxhdGlvbkhhbmRsZXIge1xyXG5cclxuICAgIHB1YmxpYyBzZXRSZWxhdGlvbiAocmVsYXRpb24gOiBSZWxhdGlvbiwgbGVmdCA6IGFueSwgcmlnaHQgOiBhbnksIHZhbHVlPyA6IGFueSkgOiBib29sZWFuIHtcclxuICA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xuICAgICAgICBpZiAodGhpcy5oYW5kbGVyICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBwcm9jZWVkID0gdGhpcy5oYW5kbGVyLnNldFJlbGF0aW9uKHRoaXMsIGxlZnQsIHJpZ2h0LCB2YWx1ZSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAocHJvY2VlZCkge1xyXG4gICAgICAgICAgICAvLyBzb21ldGhpbmcgb24gdGhlIGxlZnQgY2FuJ3QgYmUgb24gdGhlIHJpZ2h0XHJcbiAgICAgICAgICAgIHRoaXMudW5zZXRSaWdodChsZWZ0KTtcclxuXHJcbiAgICAgICAgICAgIC8vIHNvbWV0aGluZyBvbiB0aGUgcmlnaHQgY2FuJ3QgYmUgb24gdGhlIGxlZnRcclxuICAgICAgICAgICAgdGhpcy51bnNldExlZnQocmlnaHQpO1xyXG5cclxuICAgICAgICAgICAgLy8gc29tZXRoaW5nIG9uIHRoZSByaWdodCBjYW4gb25seSBoYXZlIG9uZSBsZWZ0XHJcbiAgICAgICAgICAgIHRoaXMudW5zZXRSaWdodChyaWdodCk7XHJcblxyXG4gICAgICAgICAgICBsZXQgc3RyaW5nID0gUmVsYXRpb24uY3JlYXRlU3RyaW5nKGxlZnQsIHJpZ2h0KTtcclxuICAgICAgICAgICAgaWYgKHN0cmluZyAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMudmFsdWVzSGFzaFtzdHJpbmddID0gdmFsdWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdGhpcy5tYW55TWFwLnNldChyaWdodCwgbGVmdCk7XHJcbiAgICAgICAgICAgIGlmICh0aGlzLm9uZU1hcC5nZXQobGVmdCkgPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLm9uZU1hcC5zZXQobGVmdCwgW3JpZ2h0XSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0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biAgICAgICAgfSBlbHNlIGlmIChvcHRpb25zLm5hbWUgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIHRoaXMubmFtZSA9IG9wdGlvbnMubmFtZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLm5hbWUgPSAoPGFueT4gdGhpcy5jb25zdHJ1Y3RvcikubmFtZTsgLy8gSWYgdGhlcmUgaXMgbm8gbmFtZSwgdXNlIENsYXNzIGFzIG5hbWVcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChvcHRpb25zLmRlc2NyaXB0aW9uICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBpZiAob3B0aW9ucy5kZXNjcmlwdGlvbiBpbnN0YW5jZW9mIFNheSkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5kZXNjcmlwdGlvbiA9IG9wdGlvbnMuZGVzY3JpcHRpb247XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmRlc2NyaXB0aW9uID0gbmV3IFNheShvcHRpb25zLmRlc2NyaXB0aW9uKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKG9wdGlvbnMudW5pcXVlKSB7XHJcbiAgICAgICAgICAgIFRoaW5nLnN0b3JlVW5pcXVlKHRoaXMpO1xyXG4gICAgICAgICAgICB0aGlzLnVuaXF1ZSA9IHRydWU7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgVGhpbmcuc3RvcmVOb25VbmlxdWUodGhpcyk7XHJcbiAgICAgICAgICAgIHRoaXMuY2xvbmVPcHRpb25zID0gb3B0aW9ucztcclxuICAgICAgICAgICAgdGhpcy5jbG9uZSA9IChpbmNsdWRlQ2hhbmdlcz8gOiBib29sZWFuKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBsZXQgY29ucyA9IDxhbnk+IGV2YWwoKDxhbnk+IHRoaXMuY29uc3RydWN0b3IpLm5hbWUpO1xyXG4gICAgICAgICAgICAgICAgbGV0IG5ld1RoaW5nID0gPFRoaW5nPiBuZXcgY29ucyh0aGlzLmNsb25lT3B0aW9ucyk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKGluY2x1ZGVDaGFuZ2VzID09IHVuZGVmaW5lZCB8fCBpbmNsdWRlQ2hhbmdlcykge1xyXG4gICAgICAgICAgICAgICAgICAgIG5ld1RoaW5nLnNldENoYW5nZXModGhpcy5nZXRDaGFuZ2VzKCkpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBuZXdUaGluZztcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChvcHRpb25zLmltYWdlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBpZiAob3B0aW9ucy5pbWFnZSBpbnN0YW5jZW9mIFNheUltYWdlKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmltYWdlID0gb3B0aW9ucy5pbWFnZTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuaW1hZ2UgPSBuZXcgU2F5SW1hZ2Uob3B0aW9ucy5pbWFnZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHRoaXMuc2hpbnkgPSBvcHRpb25zLnNoaW55ID09IHRydWU7XHJcblxyXG4gICAgICAgIHRoaXMuYWRkR2V0QWx0ZXJhdGlvbnMoKHRoaW5nIDogVGhpbmcpID0+IHtcclxuICAgICAgICAgICAgZnVuY3Rpb24gZ2V0Q2xvc2VzdFJvb20gKGN1cnJlbnRSb29tIDogUm9vbVJhbmRvbSwgcm9vbXMgOiBBcnJheTxSb29tUmFuZG9tPikge1xyXG4gICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRSb29tIGluc3RhbmNlb2YgUm9vbVJhbmRvbSAmJiByb29tcy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcm9vbXMuc29ydCgoYSA6IFJvb21SYW5kb20sIGIgOiBSb29tUmFuZG9tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghKGEgaW5zdGFuY2VvZiBSb29tUmFuZG9tKSkgcmV0dXJuIC0xO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIShiIGluc3RhbmNlb2YgUm9vbVJhbmRvbSkpIHJldHVybiAxO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGEgPSBhLmdldERpc3RhbmNlVG8oPFJvb21SYW5kb20+IGN1cnJlbnRSb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRiID0gYi5nZXREaXN0YW5jZVRvKDxSb29tUmFuZG9tPiBjdXJyZW50Um9vbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkYSAtIGRiO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIExvY2F0aW9uIDogcm9vbXNbMF0uZ2V0TmFtZSgpXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAoVGhpbmcuRW5jbG9zZWRSZWxhdGlvbi5nZXRMZWZ0KHRoaW5nKSA9PSB0aGluZy5nZXRSb29tKCkgJiYgdGhpbmcuZ2V0Um9vbSgpICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaW5nLmdldFJvb20oKS5mb2RkZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpbmcuaXNQbGF5ZXIoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwdXQgYXQgY2xvc2VzdCByZW1lbWJlcmVkIHJvb21cclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJvb21zID0gV29ybGRTdGF0ZS5nZXRSZW1lbWJlcmVkUm9vbXNBc1Jvb21zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjdXJyZW50Um9vbSA9IHRoaW5nLmdldFJvb20oKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdldENsb3Nlc3RSb29tKDxSb29tUmFuZG9tPiBjdXJyZW50Um9vbSwgPEFycmF5PFJvb21SYW5kb20+PiByb29tcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcHV0IGF0IGNsb3Nlc3Qgcm9vbVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcm9vbXMgPSB0aGluZy5nZXRSb29tKCkuZ2V0Q29ubmVjdGVkUm9vbXMoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGN1cnJlbnRSb29tID0gdGhpbmcuZ2V0Um9vbSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZm91bmRSb29tID0gZ2V0Q2xvc2VzdFJvb20oPFJvb21SYW5kb20+IGN1cnJlbnRSb29tLCA8QXJyYXk8Um9vbVJhbmRvbT4+IHJvb21zKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZvdW5kUm9vbSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmb3VuZFJvb207XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb29tcyA9ICg8UmVnaW9uPiBSZWdpb24uSW5SZWxhdGlvbi5nZXRMZWZ0KHRoaW5nLmdldFJvb20oKSkpLmdldFJvb21zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0Q2xvc2VzdFJvb20oPFJvb21SYW5kb20+IGN1cnJlbnRSb29tLCA8QXJyYXk8Um9vbVJhbmRvbT4+IHJvb21zKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgTG9jYXRpb246IHRoaW5nLmdldFJvb20oKS5nZXROYW1lKClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy5hZGRTZXRBbHRlcmF0aW9ucygodGhpbmcgOiBUaGluZywgY2hhbmdlcykgPT4ge1xyXG4gICAgICAgICAgICBpZiAoY2hhbmdlcy5Mb2NhdGlvbiAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGxldCByb29tID0gUm9vbS5nZXRSb29tKGNoYW5nZXMuTG9jYXRpb24pO1xyXG4gICAgICAgICAgICAgICAgaWYgKHJvb20gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcm9vbS5wbGFjZSh0aGluZyk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoXCJVbmFibGUgdG8gcGxhY2UgXCIsIHRoaW5nLCBcIiBhdCByb29tIFwiLCBjaGFuZ2VzLkxvY2F0aW9uKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhZGRHZXRBbHRlcmF0aW9ucyAobmV3R2V0KSB7XHJcbiAgICAgICAgdGhpcy5nZXRBbHRlcmF0aW9ucy5wdXNoKG5ld0dld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AgICAgICBhY3Rpb24uc2F5LmFkZChuZXcgU2F5VGhlKCksIGFjdG9yLCBcIiB0YWtlcyBcIiwgbmV3IFNheVRoZSh1bmRlZmluZWQsIHRydWUpLCAoPFRoaW5nPiBhY3Rpb24uZ2V0Tm91bigwKSksIFwiLlwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59XHJcblxyXG5BY3Rpb25UYWtlLmNoZWNrLmFkZFJ1bGUoXHJcbiAgICBuZXcgUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiQ2hlY2sgVGFraW5nIC0gV2hvIGhhcyBpdCwgcmVhbGx5P1wiLFxyXG4gICAgICAgIHByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxyXG4gICAgICAgIGNvZGUgOiAocnVsZWJvb2sgOiBSdWxlYm9va1J1bm5lcjxBY3Rpb25UYWtlPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgYWN0aW9uID0gPEFjdGlvbkdvPiBydWxlYm9vay5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgYWN0b3IgPSBhY3Rpb24uYWN0b3I7XHJcbiAgICAgICAgICAgIGxldCB0aGluZyA9ICg8VGhpbmc+YWN0aW9uLmdldE5vdW4oMCkpO1xyXG4gICAgICAgICAgICBsZXQgb3duZXIgPSA8VGhpbmc+IHRoaW5nLmdldEVuY2xvc2VkT25lKCk7XHJcblxyXG4gICAgICAgICAgICBpZiAob3duZXIgPT0gYWN0b3Ipe1xyXG4gICAgICAgICAgICAgICAgaWYgKG93bmVyID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgYWxyZWFkeSBoYXZlIGl0LlwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pX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cjxBY3Rpb25UYWtlPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgYWN0aW9uID0gPEFjdGlvbkdvPiBydWxlYm9vay5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgYWN0b3IgPSBhY3Rpb24uYWN0b3I7XHJcbiAgICAgICAgICAgIGxldCB0aGluZyA9ICg8VGhpbmc+YWN0aW9uLmdldE5vdW4oMCkpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHRoaW5nLmZpeGVkSW5QbGFjZSl7XHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBjYW4ndCB0YWtlIHRoYXQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSlcclxuKTtcclxuXHJcbkFjdGlvblRha2UuY2FycnkuYWRkUnVsZShcclxuICAgIEFjdGlvblRha2UuZGVmYXVsdENhcnJ5VGFraW5nUnVsZVxyXG4pO1xyXG5cclxuRWxlbWVudHMuSHlwZXJsaW5rSGFuZGxlci5IeXBlcmxpbmtpbmdSdWxlYm9vay5hZGRSdWxlKG5ldyBSdWxlKFxyXG4gICAge1xyXG4gICAgICAgIG5hbWUgOiBcIkh5cGVybGluayAtIFRha2VcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxyXG4gICAgICAgIGNvZGUgOiAocnVsZWJvb2sgOiBSdWxlYm9va1J1bm5lcjxUaGluZz4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gPFRoaW5nPiBydWxlYm9vay5ub3VuO1xyXG5cclxuICAgICAgICAgICAgaWYgKCF0aGluZy5hbmltYXRlZCAmJiAhdGhpbmcuZml4ZWRJblBsY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vciA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsgLy8gUnVsZSBmYWlsc1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBydWxlQ2hlY2tDb252ZXJ0Um9vbVRvRGlyZWN0aW9uID0gQWN0aW9uR28uY2hlY2suY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgZmlyc3RQcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfSElHSEVTVCxcclxuICAgICAgICBwcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfSElHSCxcclxuICAgICAgICBuYW1lIDogXCJDaGFuZ2UgUm9vbSB0byBEaXJlY3Rpb25cIixcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uR28+IHJ1bGVib29rLm5vdW47XHJcblxyXG4gICAgICAgICAgICAvLyBTb21lb25lIGFza2VkIGZvciBhIHJvb20uLi5cclxuICAgICAgICAgICAgaWYgKGFjdGlvbi5nZXROb3VuKDApIGluc3RhbmNlb2YgUm9vbVJhbmRvbSkge1xyXG4gICAgICAgICAgICAgICAgbGV0IGFjdG9yID0gYWN0aW9uLmFjdG9yO1xyXG4gICAgICAgICAgICAgICAgbGV0IGNSb29tID0gYWN0b3IuZ2V0Um9vbSgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNSb29tIGluc3RhbmNlb2YgUm9vbVJhbmRvbSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkUm9vbSA9IGFjdGlvbi5nZXROb3VuKDApO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoY1Jvb20gPT0gZFJvb20pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjdG9yLmlzUGxheWVyKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKFwiWW91IGFyZSBhbHJlYWR5IHRoZXJlIVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc3RvcCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgY29kZTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPSAocm9vbTogUm9vbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFdvcmxkU3RhdGUuaXNSb29tUmVtZW1iZXJlZChyb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IGNSb29tLmdldEFTdGFyQmVzdERpcmVjdGlvblRvKGRSb29tLCBjb2RlKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoZGlyZWN0aW9uID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0b3IuaXNQbGF5ZXIoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgZG9uJ3QgcmVtZW1iZXIgaG93IHRvIGdldCB0aGVyZS5cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGFjdGlvbi5zZXROb3VuKDAsIGRpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBydWxlQ2hlY2tJc3RoZXJlZGlyZWN0aW9uYW5kcm9vbSA9IEFjdGlvbkdvLmNoZWNrLmNyZWF0ZUFuZEFkZFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIkNoZWNrIEdvaW5nIC0gaXMgdGhlcmUgYSBkaXJlY3Rpb24/IERvZXMgaXQgbGVhZCBhbnl3aGVyZT9cIixcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uR28+IHJ1bGVib29rLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBjUm9vbSA9IGFjdGlvbi5hY3Rvci5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgIGlmIChjUm9vbSA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsgLy8gUnVsZSBmYWlscywgYWN0b3IgaXMgb3V0IG9mIHdvcmxkXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IGFjdGlvbi5nZXROb3VuKDApO1xyXG4gICAgICAgICAgICBpZiAoZGlyZWN0aW9uID09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOyAvLyBSdWxlIGZhaWxzLCBubyBkaXJlY3Rpb25cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBsZXQgbmV4dFJvb20gPSBjUm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dO1xyXG4gICAgICAgICAgICBpZiAobmV4dFJvb20gPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1c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XS50b0xvd2VyQ2FzZSgpICsgXCIuXCIpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgaWYgKHJvb21Hb25lRnJvbSA9PSBXb3JsZFN0YXRlLnBsYXllci5nZXRSb29tKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChuZXcgU2F5VGhlKCksIGFjdG9yLCBcIiBnb2VzIFwiICsgRGlyZWN0aW9uTmFtZXNbRGlyZWN0aW9uW2RpcmVjdGlvbl1dLnRvTG93ZXJDYXNlKCkgKyBcIi5cIik7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHBvc2l0ZU5hbWUgPSBEaXJlY3Rpb25OYW1lc1tcclxuICAgICAgICAgICAgICAgICAgICAgICAgT3Bwb3NpdGVEaXJlY3Rpb25bZGlyZWN0aW9uXVxyXG4gICAgICAgICAgICAgICAgICAgIF07XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQobmV3IFNheVRoZSgpLCBhY3RvciwgXCIgYXJyaXZlcyBmcm9tIHRoZSBcIiArIG9wcG9zaXRlTmFtZS50b0xvd2VyQ2FzZSgpICsgXCIuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBydWxlQ2FycnlSZW1lbWJlclJvb21zID0gQWN0aW9uR28uY2FycnkuY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiR29pbmcgLSBSZW1lbWJlciB0aGUgaW52b2x2ZWQgcm9vbXNcIixcclxuICAgICAgICBjb2RlIDogKHJ1bGVib29rKSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSA8QWN0aW9uR28+IHJ1bGVib29rLm5vdW47XHJcbiAgICAgICAgICA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gICAgICAgICAgICAgICAgdGhpbmdMaXN0LmNsYXNzTGlzdC5hZGQoXCJyb29tRGVzY3JpcHRpb25cIik7XHJcblxyXG4gICAgICAgICAgICAgICAgYXdhaXQgUHJpbnRpbmdWaXNpYmxlVGhpbmdzUnVsZWJvb2suZXhlY3V0ZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgbm91biA6IDxWaXNpYmxlVGhpbmdzT3B0aW9ucz4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGluZ3MgOiB0aGluZ3MsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lciA6IHRoaW5nTGlzdFxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIGN1cnJlbnRSb29tRGVzY3JpcHRpb24uYXBwZW5kQ2hpbGQodGhpbmdMaXN0KTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgZm9yIChsZXQgaW5kZXggPSAwLCB2YWx1ZSA9IHJvb20uY29ubmVjdGlvbnNbaW5kZXhdOyBpbmRleCA8IHJvb20uY29ubmVjdGlvbnMubGVuZ3RoOyB2YWx1ZSA9IHJvb20uY29ubmVjdGlvbnNbKytpbmRleF0pIHtcclxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgcCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJwXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIHAuY2xhc3NMaXN0LmFkZChcInJvb21FeGl0XCIpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJhXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGxpbmsuY2xhc3NMaXN0LmFkZChcInJvb21EaXJlY3Rpb25cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgbGluay5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShEaXJlY3Rpb25OYW1lc1tEaXJlY3Rpb25baW5kZXhdXSkpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBDb250cm9scy5MaW5rcy5tYWtlTGluayhsaW5rLCBuZXcgQWN0aW9uR28oV29ybGRTdGF0ZS5wbGF5ZXIsIGluZGV4KSk7XHJcbiAgICAgICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5hcHBseUNvZGUobGluaywgQ29udHJvbHMuS2V5SGFuZGxlci5nZXREaXJlY3Rpb25Db2RlQnlJbmRleChpbmRleCkpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBwLmFwcGVuZENoaWxkKGxpbmspO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aW9uUmVzdWx0ID0gXCI6IFwiO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChXb3JsZFN0YXRlLmlzUm9vbVJlbWVtYmVyZWQodmFsdWUpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpcmVjdGlvblJlc3VsdCArPSB2YWx1ZS5nZXRQcmludGVkTmFtZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpcmVjdGlvblJlc3VsdCArPSBcIkEgbmV3IHBsYWNlXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBwLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKGRpcmVjdGlvblJlc3VsdCkpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50Um9vbUV4aXRzLmFwcGVuZENoaWxkKHApO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxu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IFByaW50VmlzaWJsZVRoaW5nc1J1bGUgPSBuZXcgUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiUHJpbnQgYWxsIHZpc2libGUgdGhpbmdzXCIsXHJcbiAgICAgICAgY29kZSA6IGFzeW5jIChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPFZpc2libGVUaGluZ3NPcHRpb25zPikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgbm91biA9IDxWaXNpYmxlVGhpbmdzT3B0aW9ucz4gcnVsZWJvb2subm91bjtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBub3VuLnRoaW5ncy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gbm91bi50aGluZ3NbaV07XHJcbiAgICAgICAgICAgICAgICBsZXQgbGluayA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJhXCIpO1xyXG4gICAgICAgICAgICAgICAgbGluay5jbGFzc0xpc3QuYWRkKFwicm9vbU9iamVjdFwiKTtcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgc2F5IDogU2F5XHJcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUgaW5zdGFuY2VvZiBUaGluZyAmJiB2YWx1ZS51bmlxdWUpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkgPSBuZXcgU2F5KG5ldyBTYXlUaGUoZmFsc2UpLCB2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheSA9IG5ldyBTYXkobmV3IFNheUFuKGZhbHNlKSwgdmFsdWUpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgYXdhaXQgc2F5LmdldFB1cmVFbGVtZW50cygpLnRoZW4odmFsdWUyID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMCwgZWxlbWVudCA9IHZhbHVlMltpXTsgZWxlbWVudCAhPSB1bmRlZmluZWQ7IGVsZW1lbnQgPSB2YWx1ZTJbKytpXSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5rLmFwcGVuZENoaWxkKGVsZW1lbnQpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgIENvbnRyb2xzLkxpbmtzLm1ha2VMaW5rKGxpbmssIG5ldyBBY3Rpb25FeGFtaW5lKFdvcmxkU3RhdGUucGxheWVyLCB2YWx1ZSkpO1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5hcHBseUNvZGUobGluaywgQ29udHJvbHMuS2V5SGFuZGxlci5nZXRGaXJzdEtleUNvZGUoKSk7XHJcblxyXG4gICAgICAgICAgICAgICAgbm91bi5jb250YWluZXIuYXBwZW5kQ2hpbGQobGluayk7XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKChpICsgMSkgPCBub3VuLnRoaW5ncy5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICBub3VuLmNvbnRhaW5lci5hcHBlbmRDaGlsZChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShcIiwgXCIpKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG4gICAgUHJpbnRpbmdWaXNpYmxlVGhpbmdzUnVsZWJvb2suYWRkUnVsZShQcmludFZpc2libGVUaGluZ3NSdWxlKTtcclxuXHJcbiAgICBleHBvcnQgdmFyIFByaW50T3V0cm9Ub1Zpc2libGVUaGluZ3NSdWxlID0gbmV3IFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIlByaW50IFxcXCIuLi4gaGVyZVxcXCIgdGV4dFwiLFxyXG4gICAgICAgIGZpcnN0UHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX0xPVyxcclxuICAgICAgICBjb2RlIDogKHJ1bGV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cclxuICAgICAgICAgICAgbGV0IHRoaW5nID0gKDxDb2luUG91Y2g+YWN0aW9uLmdldE5vdW4oMCkpO1xyXG4gICAgICAgICAgICBsZXQgYWN0b3JQb3VjaGVzID0gVGhpbmcuQ2FycnlSZWxhdGlvbi5nZXRSaWdodFR5cGUoYWN0b3IsIENvaW5Qb3VjaCk7XHJcblxyXG4gICAgICAgICAgICBpZiAoYWN0b3JQb3VjaGVzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgIGxldCB0aGluZ0NvaW5zID0gdGhpbmcuZ2V0Q29pbnMoKTtcclxuICAgICAgICAgICAgICAgIGlmICh0aGluZ0NvaW5zID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVib29rLnNraXBSdWxlKEFjdGlvblRha2UuZGVmYXVsdENhcnJ5VGFraW5nUnVsZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICg8Q29pblBvdWNoPiBhY3RvclBvdWNoZXNbMF0pLmFkZENvaW5zKHRoaW5nQ29pbnMpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaW5nLnJlbW92ZUNvaW5zKHRoaW5nLmdldENvaW5zKCkpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBpZiAoYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgZW1wdHkgXCIsIG5ldyBTYXlUaGUoKSwgdGhpbmcsIFwiIGludG8geW91ciBcIiwgYWN0b3JQb3VjaGVzWzBdLCBcIi4gWW91ciBcIiwgYWN0b3JQb3VjaGVzWzBdLCBcIiBub3cgaGFzIFwiICsgYWN0b3JQb3VjaGVzWzBdLmdldENvaW5zKCkudG9TdHJpbmcoKSArIFwiIGNvaW5zLlwiKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChuZXcgU2F5VGhlKCksIGFjdG9yLCBcIiBlbXB0aWVzIFwiLCBuZXcgU2F5VGhlKCksIHRoaW5nLCBcIiBpbnRvIFwiLCBTYXkuaGlzSGVyc0l0cyhhY3RvciksIGFjdG9yUG91Y2hlc1swXSwgXCIuXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gZ2l2ZSB0aGVtIHRoZSBvbCcgc3dpdGNoYXJvb1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBteUNvaW5zID0gYWN0b3JQb3VjaGVzWzBdLmdldENvaW5zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0b3JQb3VjaGVzWzBdLnJlbW92ZUNvaW5zKG15Q29pbnMpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaW5nLmFkZENvaW5zKG15Q29pbnMpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBlbXB0eSB5b3VyIFwiLCBhY3RvclBvdWNoZXNbMF0sIFwiIGludG8gXCIsIG5ldyBTYXlUaGUoKSwgdGhpbmcsIFwiLlwiLCBTYXkuUEFSQUdSQVBIX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRyb3AgPSBuZXcgQWN0aW9uRHJvcChhY3RvciwgYWN0b3JQb3VjaGVzWzBdKTtcclxuICAgICAgICAgICAgICAgICAgICBhd2FpdCBkcm9wLmV4ZWN1dGUoKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRoaW5nLkVuY2xvc2VkUmVsYXRpb24uZ2V0TGVmdChhY3RvclBvdWNoZXNbMF0pID09IGFjdG9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhY3RvciA9PSBXb3JsZFN0YXRlLnBsYXllcikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgY2FuJ3QgZ2V0IHJpZCBvZiB5b3VyIFwiLCBhY3RvclBvdWNoZXNbMF0sIFwiIVwiKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb25kaXRpb25zIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uVGFrZT4pID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuICgoPEFjdGlvblRha2U+IHJ1bGVib29rLm5vdW4pLmdldE5vdW4oMCkgaW5zdGFuY2VvZiBDb2luUG91Y2gpO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59XHJcblxyXG5BY3Rpb25UYWtlLmNhcnJ5LmFkZFJ1bGUoQ29pblBvdWNoLmNhcnJ5T3V0VGFraW5nQ29pblBvdWNoZXMpO1xyXG5cclxuU2F5LmFmdGVyUHJpbnRpbmcuYWRkUnVsZShuZXcgUnVsZShcclxuICAgIHtcclxuICAgICAgICBuYW1lIDogXCJJbmNsdWRlIGNvbnRlbnRzIG9mIENvaW4gUG91Y2ggd2hpbGUgUHJpbnRpbmcgVmlzaWJsZSBUaGluZ3MgaW4gYSBSb29tXCIsXHJcbiAgICAgICAgY29kZSA6IChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPFNheT4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHNheSA9IDxTYXk+IHJ1bGVib29rLm5vdW47XHJcbiAgICAgICAgICAgIGxldCBwb3VjaCA9IDxDb2luUG91Y2g+IHNheS5jdXJyZW50Tm91bjtcclxuICAgICAgICAgICAgc2F5LmN1cnJlbnROb3VuRWxlbWVudHMucHVzaChkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZShcIiB3aXRoIFwiICsgcG91Y2guZ2V0Q29pbnMoKS50b1N0cmluZygpICsgXCIgY29pbnNcIikpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29uZGl0aW9ucyA6IChydWxlYm9vayA6IFJ1bGVib29rUnVubmVyPFNheT4pID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIEVsZW1lbnRzLlJvb21IYW5kbGVyLlByaW50aW5nVmlzaWJsZVRoaW5nc1J1bGVib29rLmlzUnVubmluZygpXHJcbiAgICAgICAgICAgICAgICAmJiAoPFNheT4gcnVsZWJvb2subm91bikuY3VycmVudE5vdW4gaW5zdGFuY2VvZiBDb2luUG91Y2hcclxuICAgICAgICAgICAgICAgICYmICg8Q29pblBvdWNoPiAoPFNheT4gcnVsZWJvb2subm91bikuY3VycmVudE5vdW4pLmdldENvaW5zKCkgPiAwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuKSk7XHJcblxyXG5BY3Rpb25FeGFtaW5lLmNhcnJ5LmFkZFJ1bGUobmV3IFJ1bGUoe1xyXG4gICAgbmFtZSA6IFwiUHJpbnQgZGVzY3JpcHRpb24gb2YgY29pbnMgaW4gQ29pbiBQb3VjaFwiLFxyXG4gICAgZmlyc3RQcmlvcml0eSA6IEFjdGlvbkV4YW1pbmUuUHJpbnREZXNjcmlwdGlvbk9mRXhhbWluZWRUaGluZ1J1bGUuZmlyc3RQcmlvcml0eSxcclxuICAgIHByaW9yaXR5IDogQWN0aW9uRXhhbWluZS5QcmludERlc2NyaXB0aW9uT2ZFeGFtaW5lZFRoaW5nUnVsZS5wcmlvcml0eSAtIDEsXHJcbiAgICBjb2RlIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uRXhhbWluZT4pID0+IHtcclxuICAgICAgICBsZXQgYWN0aW9uID0gPEFjdGl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yXG5cclxuICAgICAgICBpZiAod29ybi5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIHByaW50SGVhZGVyKFwiV29yblwiKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB3b3JuLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBwcmludFRoaW5nKHdvcm5baV0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoY2FycmllZC5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIHByaW50SGVhZGVyKFwiQ2FycmllZFwiKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjYXJyaWVkLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBwcmludFRoaW5nKGNhcnJpZWRbaV0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBsZXQgcG91Y2ggPSA8QXJyYXk8Q29pblBvdWNoPj4gVGhpbmcuQ2FycnlSZWxhdGlvbi5nZXRSaWdodFR5cGUoV29ybGRTdGF0ZS5wbGF5ZXIsIENvaW5Qb3VjaCk7XHJcbiAgICAgICAgaWYgKHBvdWNoLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgbGV0IHAgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KFwicFwiKTtcclxuICAgICAgICAgICAgcC5jbGFzc0xpc3QuYWRkKFwiaW52ZW50b3J5R29sZFwiKTtcclxuICAgICAgICAgICAgbGV0IHMgOiBTYXk7XHJcbiAgICAgICAgICAgIGlmIChwb3VjaFswXS5nZXRDb2lucygpID4gMCkge1xyXG4gICAgICAgICAgICAgICAgcyA9IG5ldyBTYXkoXCJUaGVyZSBhcmUgXCIgKyBwb3VjaFswXS5nZXRDb2lucygpLnRvU3RyaW5nKCkgKyBcIiBjb2lucyBpbiB5b3VyIFwiLCB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UoKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIFwidGhpbmsgYWJvdXQgaG93IHRvIGdldCB0byBcIiArIG5hbWU7XHJcbiAgICB9XHJcbn1cclxuXHJcblxyXG5BY3Rpb25SZXRyYWNlLmNoZWNrLmFkZFJ1bGUobmV3IFJ1bGUoe1xyXG4gICAgZmlyc3RQcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfSElHSEVTVCxcclxuICAgIHByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdILFxyXG4gICAgbmFtZSA6IFwiQ2hhbmdlIFJvb20gdG8gRGlyZWN0aW9uXCIsXHJcbiAgICBjb2RlIDogKHJ1bGVib29rIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uUmV0cmFjZT4pID0+IHtcclxuICAgICAgICBsZXQgYWN0aW9uID0gPEFjdGlvbkdvPiBydWxlYm9vay5ub3VuO1xyXG5cclxuICAgICAgICAvLyBTb21lb25lIGFza2VkIGZvciBhIHJvb20uLi5cclxuICAgICAgICBpZiAoYWN0aW9uLmdldE5vdW4oMCkgaW5zdGFuY2VvZiBSb29tKSB7XHJcbiAgICAgICAgICAgIGxldCBhY3RvciA9IGFjdGlvbi5hY3RvcjtcclxuICAgICAgICAgICAgbGV0IGNSb29tID0gYWN0b3IuZ2V0Um9vbSgpO1xyXG4gICAgICAgICAgICBpZiAoY1Jvb20gPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGV0IGRSb29tID0gYWN0aW9uLmdldE5vdW4oMCk7XHJcblxyXG4gICAgICAgICAgICBpZiAoY1Jvb20gPT0gZFJvb20pIHtcclxuICAgICAgICAgICAgICAgIGlmIChhY3Rvci5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgYXJlIGFscmVhZHkgdGhlcmUhXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgYWN0aW9uLnN0b3AoKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgbGV0IGNvZGU7XHJcblxyXG4gICAgICAgICAgICBpZiAoYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgIGNvZGUgPSAocm9vbSA6IFJvb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gV29ybGRTdGF0ZS5pc1Jvb21SZW1lbWJlcmVkKHJvb20pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBsZXQgZGlyZWN0aW9uID0gY1Jvb20uYmVzdERpcmVjdGlvblRvKGRSb29tLCBjb2RlKTtcclxuICAgICAgICAgICAgaWYgKGRpcmVjdGlvbiA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGlmIChhY3Rvci5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgZG9uJ3QgcmVtZW1iZXIgaG93IHRvIGdldCB0aGVyZS5cIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBhY3Rpb24uc2V0Tm91bigwLCBkaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59KSk7XHJcblxyXG5BY3Rpb25SZXRyYWNlLmNhcnJ5LmFkZFJ1bGUobmV3IFJ1bGUoe1xyXG4gICAgbmFtZSA6IFwiUmV0cmFjaW5nIC0gRmluZCBEaXJlY3Rpb25cIixcclxuICAgIGNvZGUgOiAocnVsZ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ZXN0UmVnaW9uLm1hcCAhPSBsYXN0TWFwKSB7XHJcbiAgICAgICAgICAgIGVtcHR5KCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgYXdhaXQgdXBkYXRlT2xkTWFwKCk7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGxldCBtYXAgPSBiaWdnZXN0UmVnaW9uLm1hcDtcclxuICAgICAgICBsYXN0TWFwID0gbWFwO1xyXG5cclxuICAgICAgICBtYXAudXBkYXRlQWxsTGltaXRzKCk7XHJcblxyXG4gICAgICAgIGZvciAobGV0IHkgPSBtYXAuaGlnaGVzdFk7IHkgPj0gbWFwLmxvd2VzdFk7IHktLSkge1xyXG4gICAgICAgICAgICBsZXQgcm93ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImRpdlwiKTtcclxuICAgICAgICAgICAgcm93LmNsYXNzTGlzdC5hZGQoXCJtYXBSb3dcIik7XHJcbiAgICAgICAgICAgIGZvciAobGV0IHggPSBtYXAubG93ZXN0WDsgeCA8PSBtYXAuaGlnaGVzdFg7IHgrKykge1xyXG4gICAgICAgICAgICAgICAgbGV0IHJvb20gPSBtYXAuZ2V0Um9vbSh4LCB5KTtcclxuICAgICAgICAgICAgICAgIGxldCByb29tTm9kZSA9IG5ldyBSb29tTm9kZShyb29tKTtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHJvb21Ob2RlLmNyZWF0ZVJvb21OYW1lRmxvYXRlcigpO1xyXG5cclxuICAgICAgICAgICAgICAgIGxldCByb29tRGl2ID0gcm9vbU5vZGUuZ2V0RWxlbWVudCgpO1xyXG4gICAgICAgICAgICAgICAgcm93LmFwcGVuZENoaWxkKHJvb21EaXYpO1xyXG5cclxuICAgICAgICAgICAgICAgIGVsZW1lbnRzW3gudG9TdHJpbmcoKSArIFwiO1wiICsgeS50b1N0cmluZygpXSA9IHJvb21Ob2RlO1xyXG4gICAgICAgICAgICB9XHJcbi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tleV0gPSBvcHRpb25zW2tleV07XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogRXhlY3V0aW5nIGFuIEFJIHJldHVybnMgYW4gQWN0aW9uLiBET0VTTidUIGV4ZWN1dGUgdGhlIGFjdGlvbiwganVzdCBmaW5kcyBpdCFcclxuICAgICAqIEByZXR1cm5zIHtQcm9taXNlPEFjdGlvbj59XHJcbiAgICAgKi9cclxuICAgIHB1YmxpYyBhc3luYyBleGVjdXRlIChhY3RvciA6IFRoaW5nKSA6IFByb21pc2U8QWN0aW9uPiB7XHJcbiAgICAgICAgbGV0IHByb21pc2UgOiBQcm9taXNlPEFjdGlvbj47XHJcbiAgICAgICAgLy8gVE9ETzogaWYgYWN0b3IuaXNJbkNvbWJhdCgpO1xyXG4gICAgICAgIGlmIChwcm9taXNlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBwcm9taXNlID0gQUkuY29tYmF0UnVsZXMuZXhlY3V0ZSh7XHJcbiAgICAgICAgICAgICAgICBub3VuIDogYWN0b3JcclxuICAgICAgICAgICAgfSwgLi4udGhpcy5leHRyYUNvbWJhdFJ1bGVzKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBwcm9taXNlID0gQUkucnVsZXMuZXhlY3V0ZSh7XHJcbiAgICAgICAgICAgICAgICBub3VuIDogYWN0b3JcclxuICAgICAgICAgICAgfSwgLi4udGhpcy5leHRyYVJ1bGVzKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGxldCByZXN1bHQgOiBBY3Rpb24gPSBhd2FpdCBwcm9taXNlO1xyXG5cclxuICAgICAgICByZXR1cm4gcmVzdWx0O1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhZGRSdWxlc0Jvb2sgKC4uLmJvb2tzIDogQXJyYXk8UnVsZWJvb2s8VGhpbmc+Pikge1xyXG4gICAgICAgIHRoaXMuZXh0cmFSdWxlcy5wdXNoKC4u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gICAgICAgICAgICAgICBjYXNlIDQ6IHJldHVybiBcIkd5bW5hc3RcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMzogcmV0dXJuIFwiQWNjdXJhdGVcIjtcclxuICAgICAgICAgICAgICAgIGNhc2UgMjogcmV0dXJuIFwiQ29tbW9uXCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDE6IHJldHVybiBcIkFjY2lkZW50LXByb25lXCI7XHJcbiAgICAgICAgICAgICAgICBkZWZhdWx0OiByZXR1cm4gXCJPdXQgb2YgYm91bmRzLlwiO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgKTtcclxuXHJcbiAgICBleHBvcnQgbGV0IEludGVsbGlnZW5jZSA9IG5ldyBBdHRyaWJ1dGUoXHJcbiAgICAgICAgXCJJbnRlbGxpZ2VuY2VcIixcclxuICAgICAgICB2YWx1ZSA9PiB7XHJcbiAgICAgICAgICAgIHN3aXRjaCAodmFsdWUpIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogcmV0dXJuIFwiR2VuaXVzXCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDQ6IHJldHVybiBcIkdpZnRlZFwiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAzOiByZXR1cm4gXCJLbm93bGVkZ2VhYmxlXCI7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDI6IHJldHVybiBcIk5vcm1hbFwiO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAxOiByZXR1cm4gXCJEb29yXCI7XHJcbiAgICAgICAgICAgICAgICBkZWZhdWx0OiByZXR1cm4gXCJPdXQgb2YgYm91bmRzLlwiO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgKTtcclxuXHJcbiAgICBleHBvcnQgbGV0IENoYXJtID0gbmV3IEF0dHJpYnV0ZShcclxuICAgICAgICBcIkNoYXJtXCIsXHJcbiAgICAgICAgdmFsdWUgPT4ge1xyXG4gICAgICAgICAgICBzd2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kZXNjcmlwdGlvbik7XHJcbiAgICAgICAgU2tpbGwuU2tpbGxzW2lkXSA9IHRoaXM7XHJcbiAgICB9XHJcblxyXG4gICAgcHJpdmF0ZSBzdGF0aWMgU2tpbGxzIDoge1tpZCA6IHN0cmluZ10gOiBTa2lsbH0gPSB7fTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldFNraWxscyAoKSB7XHJcbiAgICAgICAgbGV0IHNraWxscyA9IFtdO1xyXG4gICAgICAgIGZvciAobGV0IGtleSBpbiBTa2lsbC5Ta2lsbHMpIHtcclxuICAgICAgICAgICAgc2tpbGxzLnB1c2goU2tpbGwuU2tpbGxzW2tleV0pO1xyXG4gICAgICAgIH1cclxuICAgICAgICBza2lsbHMuc29ydCgoYSA6IFNraWxsLCBiIDogU2tpbGwpID0+IHtcclxuICAgICAgICAgICAgbGV0IG5hID0gYS5pZC50b1VwcGVyQ2FzZSgpO1xyXG4gICAgICAgICAgICBsZXQgbmIgPSBiLmlkLnRvVXBwZXJDYXNlKCk7XHJcbiAgICAgICAgICAgIGlmIChuYSA+IG5iKSByZXR1cm4gMTtcclxuICAgICAgICAgICAgaWYgKG5hIDwgbmIpIHJldHVybiAtMTtcclxuICAgICAgICAgICAgcmV0dXJuIDA7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgcmV0dXJuIHNraWxscztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldFNraWxsIChpZCA6IHN0cmluZykge1xyXG4gICAgICAgIHJldHVybiBTa2lsbC5Ta2lsbHNbaWRdO1xyXG4gICAgfVxyXG59XHJcblxyXG5tb2R1bGUgU2tpbGxzIHtcclxuICAgIGV4cG9ydCBsZXQgU3Vydml2YWwgPSBuZXcgU2tpbGwoXHJcbiAgICBcIlN1cnZpdmFsXCIsXHJcbiAgICAodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgc3dpdGNoICh2YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgY2FzZSA1OiBy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5cclxuICAgICAgICAgICAgaWYgKHBlcnNvbi5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgIFN0YXRzOiB0aGlzLmF0dHJpYnV0ZVZhbHVlLFxyXG4gICAgICAgICAgICAgICAgICAgIFNraWxsczogdGhpcy5za2lsbFZhbHVlXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy5hZGRTZXRBbHRlcmF0aW9ucygocGVyc29uIDogUGVyc29uLCBjaGFuZ2VzKSA9PiB7XHJcbiAgICAgICAgICAgIC8vIExldCdzIG5vdCBkbyB0aGlzIGZvciBOUENzLiBJdCBjYW4gYnJlYWsgcGF0Y2hlcy5cclxuICAgICAgICAgICAgaWYgKHBlcnNvbi5pc1BsYXllcigpKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoY2hhbmdlcy5TdGF0cyAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBuYW1lIGluIGNoYW5nZXMuU3RhdHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF0dHIgPSBBdHRyaWJ1dGUuZ2V0QXR0cmlidXRlKG5hbWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXR0ciAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0U3RhdChhdHRyLCBjaGFuZ2VzLlN0YXRzW25hbWVdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmIChjaGFuZ2VzLlNraWxscyAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBuYW1lIGluIGNoYW5nZXMuU2tpbGxzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdHRyID0gU2tpbGwuZ2V0U2tpbGwobmFtZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhdHRyICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRTa2lsbChhdHRyLCBjaGFuZ2VzLlNraWxsc1tuYW1lXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgY2hhbmdlSGVhbHRoIChuIDogbnVtYmVyKSB7XHJcbiAgICAgICAgbGV0IGJvZHlwYXJ0cyA9IDxBcnJheTxCb2R5cGFydD4+IHRoaXMuZ2V0UGFydHMoQm9keXBhcnQpO1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYm9keXBhcnRzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGJvZHlwYXJ0c1tpXS5jaGFuZ2VTb3JlbmVzcyhuKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy51cGRhdGVIZWFsdGgoKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFJldHVybnMgaGVhbHRoIGFzIGEgbnVtYmVyIGZyb20gMCB0byAxMC5cclxuICAgICAqL1xyXG4gICAgcHVibGljIGdldEhlYWx0aE9uU2NhbGUgKCkge1xyXG4gICAgICAgIHJldHVybiBNYXRoLnJvdW5kKFxyXG4gICAgICAgICAgICAoKHRoaXMuZ2V0SGVhbHRoKCkgKiAxMCkgLyAodGhpcy5nZXRTdGF0KEF0dHJpYnV0ZXMuU3RyZW5ndGgpICogMikpXHJcbiAgICAgICAgKTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAg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vbiA9IGF3YWl0IHBlb3BsZVtpXS5BSS5leGVjdXRlKHBlb3BsZVtpXSk7XHJcbiAgICAgICAgICAgICAgICBsZXQgcGVyc29uID0gcGVvcGxlW2ldO1xyXG4gICAgICAgICAgICAgICAgbGV0IHZpc2libGUgPSBwZW9wbGVbaV0uaXNWaXNpYmxlVG8oV29ybGRTdGF0ZS5wbGF5ZXIpO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb24gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHByaW50VmFsdWU6IFNheSA9IGF3YWl0IGFjdGlvbi5leGVjdXRlKCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChcclxuICAgICAgICAgICAgICAgICAgICAgICAgKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlzaWJsZSB8fFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGVyc29uLmlzVmlzaWJsZVRvKFdvcmxkU3RhdGUucGxheWVyKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICApICYmIHByaW50VmFsdWUgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzQ29udGVudChwcmludFZhbHVlKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBleHBvcnQgdmFyIGluY3JlbWVudFR1cm5Db3VudGVyUnVsZSA9IEV2ZXJ5VHVybi5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBmaXJzdFByaW9yaXR5OiBSdWxlLlBSSU9SSVRZX0xPV0VTVCxcclxuICAgICAgICBwcmlvcml0eTogUnVsZS5QUklPUklUWV9MT1dFU1QsXHJcbiAgICAgICAgbmFtZTogXCJJb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ICAgfVxyXG5cclxuICAgIHB1YmxpYyByZW1vdmUgKHRoaW5nIDogVGhpbmcpIHtcclxuICAgICAgICAvLyBEb24ndCByZW1vdmUgc3R1ZmYgZnJvbSBvdGhlciByb29tc1xyXG4gICAgICAgIGlmIChUaGluZy5JbnNpZGVSb29tUmVsYXRpb24uZ2V0TGVmdCh0aGluZykgPT0gdGhpcykge1xyXG4gICAgICAgICAgICBUaGluZy5JbnNpZGVSb29tUmVsYXRpb24udW5zZXRSaWdodCh0aGluZyk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRDb250YWluZWQgKCkgOiBBcnJheTxUaGluZz4ge1xyXG4gICAgICAgIHJldHVybiA8QXJyYXk8VGhpbmc+PiBUaGluZy5JbnNpZGVSb29tUmVsYXRpb24uZ2V0UmlnaHQodGhpcyk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldENvbnRhaW5lZEFuZFZpc2libGVUbyAob2JzZXJ2ZXIgOiBUaGluZykgOiBBcnJheTxUaGluZz4ge1xyXG4gICAgICAgIGxldCBjb250YWluZWQgPSB0aGlzLmdldENvbnRhaW5lZCgpO1xyXG4gICAgICAgIGxldCByZXN1bHQgPSBbXTtcclxuXHJcbiAgICAgICAgY29udGFpbmVkLmZvckVhY2goKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIGlmICh2YWx1ZS52aXNpYmxlICYmIHZhbHVlICE9PSBvYnNlcnZlcikge1xyXG4gICAgICAgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJldHVybiByZXN1bHQ7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBESVJFQ1RJT05TIDogQXJyYXk8RGlyZWN0aW9uPiA9ICgoKSA9PiB7XHJcbiAgICAgICAgbGV0IGRpcmVjdGlvbnMgOiBBcnJheTxEaXJlY3R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ICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBjb25zb2xlLndhcm4oXCJSZXBsYWNpbmcgYSBjb25uZWN0ZWQgcm9vbS5cIiwgciwgXCIgY29ubmVjdGVkIHRocm91Z2ggXCIsIG9wcG9zaXRlRGlyZWN0aW9uLCBcIiB0byBcIiwgci5jb25uZWN0aW9uc1tvcHBvc2l0ZURpcmVjdGlvbl0pO1xyXG4gICAgICAgICAgICByLnVubWFwUm9vbShvcHBvc2l0ZURpcmVjdGlvbik7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHIuY29ubmVjdGlvbnNbb3Bwb3NpdGVEaXJlY3Rpb25dID0gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdW5tYXBSb29tIChkaXJlY3Rpb24gOiBEaXJlY3Rpb24pIHtcclxuICAgICAgICBpZiAodGhpcy5jb25uZWN0aW9uc1tkaXJlY3Rpb25dICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBsZXQgciA9IHRoaXMuY29ubmVjdGlvbnNbZGlyZWN0aW9uXTtcclxuICAgICAgICAgICAgdGhpcy5jb25uZWN0aW9uc1tkaXJlY3Rpb25dID0gdW5kZWZpbmVkO1xyXG4gICAgICAgICAgICByLnVubWFwUm9vbShPcHBvc2l0ZURpcmVjdGlvbltkaXJlY3Rpb25dKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFByaW50ZWROYW1lICgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5uYW1lO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRDb25uZWN0ZWRSb29tcyAoKSA6IEFycmF5PFJvb20+IHtcclxuICAgICAgICBsZXQgcm9vbXMgPSBbXTtcclxuICAgICAgICB0aGlzLmNvbm5lY3Rpb25zLmZvckVhY2gocm9vbSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChyb29tICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICA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mluZWQpIHZhbGlkaXR5Q29kZSA9ICgpID0+IHtyZXR1cm4gdHJ1ZX07XHJcblxyXG4gICAgICAgIC8qKlxyXG4gICAgICAgICAqIE1heGltdW0gYW1vdW50IG9mIHN0ZXBzIHRoYXQgd2lsbCBiZSBjb25zaWRlcmVkIGZvciBhIHJvdXRlLlxyXG4gICAgICAgICAqIFRoaXMgaXMgdXNlZnVsIHRvIHByZXZlbnQgdGhlIGNvZGUgZnJvbSBzcGFubmluZyB0b28gbWFueSByb29tcywgYXMgZWFjaCByb29tIGNhbiBoYXZlIFJvb20uRElSRUNUSU9OUy5sZW5ndGggZGlyZWN0aW9ucyB0byBtYWtlIGFub3RoZXIgY2FsbCwgZXRjLlxyXG4gICAgICAgICAqXHJcbiAgICAgICAgICogQHR5cGUge251bWJlcn1cclxuICAgICAgICAgKi9cclxuICAgICAgICBsZXQgbWF4U3RlcHMgPSAxMDtcclxuICAgICAgICBtYXhTdGVwcyA9IG1heFN0ZXBzID4gV29ybGRTdGF0ZS5nZXRNYXhpbXVtUmVtZW1iZXJlZFJvb21zKCkgPyBtYXhTdGVwcyA6IFdvcmxkU3RhdGUuZ2V0TWF4aW11bVJlbWVtYmVyZWRSb29tcygpO1xyXG5cclxuICAgICAgICBsZXQgcmVjdXJzaXZlQmVzdFBhdGggPSAoY1BhdGggOiBBcnJheTxSb29tPiwgY1Jvb20gOiBSb29tLCBkZXN0aW5hdGlvbiA6IFJvb20pID0+IHtcclxuICAgICAgICAgICAgLy8gSWdub3JlIFwiYmFkXCIgcm9vbXNcclxuICAgICAgICAgICAgaWYgKCF2YWxpZGl0eUNvZGUoY1Jvb20pKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLy8gUHJldmVudCB0aGUgY29kZSBmcm9tIHN0cmF5aW5nIHRvbyBmYXJcclxuICAgICAgICAgICAgaWYgKGNSb29tID09IGRlc3RpbmF0aW9uKSB7XHJcbiAgICAgICAgICAgICAgICBtYXhTdGVwcyA9IG1heFN0ZXBzID4gY1BhdGgubGVuZ3RoID8gY1BhdGgubGVuZ3RoIDogbWF4U3RlcHM7IC8vIFN0b3AgY29uc2lkZXJpbmcgd29yc2Ugcm91dGVzXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gY1BhdGg7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY1BhdGgubGVuZ3RoID4gbWF4U3RlcHMpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgcGF0aHMgPSBbXTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGluZGV4IGluIFJvb20uRElSRUNUSU9OUykge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkaXJlY3Rpb24gPSBSb29tLkRJUkVDVElPTlNbaW5kZXhdO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBuZXh0Um9vbSA9IGNSb29tLmNvbm5lY3Rpb25zW2RpcmVjdGlvbl07XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5leHRSb29tICE9IHVuZGVmaW5lZCAmJiBjUGF0aC5pbmRleE9mKG5leHRSb29tKSA9PSAtMSAmJiB2YWxpZGl0eUNvZGUobmV4dFJvb20pKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXRoID0gcmVjdXJzaXZlQmVzdFBhdGgoY1BhdGguY29uY2F0KFtuZXh0Um9vbV0pLCBuZXh0Um9vbSwgZGVzdGluYXRpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGF0aCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhzLnB1c2gocGF0aCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBsZXQgc2hvcnRlc3RJbmRleCA9IDA7XHJcbiAgICAgICAgICAgICAgICBwYXRocy5mb3JFYWNoKCh2YWx1ZSwgaW5kZXgsIGFycmF5KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmxlbmd0aCA8IHBhdGhzW3Nob3J0ZXN0SW5kZXhdLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzaG9ydGVzdEluZGV4ID0gaW5kZXg7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gcGF0aHNbc2hvcnRlc3RJbmRleF07XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBsZXQgcGF0aHMgPSBBcnJheShSb29tLkRJUkVDVElPTlMubGVuZ3RoKTtcclxuICAgICAgICBsZXQgc2hvcnRlc3RJbmRleDtcclxuICAgICAgICBmb3IgKGxldCBpbmRleCBpbiBSb29tLkRJUkVDVElPTlMpIHtcclxuICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IFJvb20uRElSRUNUSU9OU1tpbmRleF07XHJcbiAgICAgICAgICAgIGxldCBuZXh0Um9vbSA9IHRoaXMuY29ubmVjdGlvbnNbZGlyZWN0aW9uXTtcclxuICAgICAgICAgICAgaWYgKG5leHRSb29tICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcGF0aHNbZGlyZWN0aW9uXSA9IHJlY3Vyc2l2ZUJlc3RQYXRoKFt0aGlzLCBuZXh0Um9vbV0sIG5leHRSb29tLCByb29tKTtcclxuICAgICAgICAgICAgICAgIGlmIChwYXRoc1tkaXJlY3Rpb25dICE9IHVuZGVmaW5lZCAmJiAoc2hvcnRlc3RJbmRleCA9PSB1bmRlZmluZWQgfHwgcGF0aHNbc2hvcnRlc3RJbmRleF0ubGVuZ3RoID4gcGF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ciB6ID0gZGlyZWN0aW9uID09IERpcmVjdGlvbi5VUCA/IDEgOlxyXG4gICAgICAgICAgICAgICAgIGRpcmVjdGlvbiA9PSBEaXJlY3Rpb24uRE9XTiA/IC0xIDpcclxuICAgICAgICAgICAgICAgICAwO1xyXG5cclxuICAgICAgICByZXR1cm4gW3gsIHksIHpdO1xyXG4gICAgfVxyXG4gICAgcHVibGljIHN0YXRpYyBzaGlmdCAoY29vcmRpbmF0ZXMgOiBBcnJheTxudW1iZXI+LCBkaXJlY3Rpb24gOiBudW1iZXIpIHtcclxuICAgICAgICBsZXQgY29vcmRpbmF0ZXNWZWN0b3IgPSBSb29tLmdldERpcmVjdGlvblhZWihkaXJlY3Rpb24pO1xyXG4gICAgICAgIGNvb3JkaW5hdGVzLmZvckVhY2goKHZhbHVlLCBpbmRleCwgYXJyYXkpID0+IHtcclxuICAgICAgICAgICAgY29vcmRpbmF0ZXNWZWN0b3JbaW5kZXhdICs9IGNvb3JkaW5hdGVzW2luZGV4XTtcclxuICAgICAgICB9KTtcclxuICAgICAgICByZXR1cm4gY29vcmRpbmF0ZXNWZWN0b3I7XHJcbiAgICB9XHJcblxyXG4gICAgcHJvdGVjdGVkIHN0YXRpYyByb29tcyA6IHtbaWQgOiBzdHJpbmddIDogUm9vbX0gPSB7fTtcclxuXHJcbiAgICBwcm90ZWN0ZWQgc3RhdGljIGFkZFJvb20gKHJvb20gOiBSb29tKSB7XHJcbiAgICAgICAgUm9vbS5yb29tc1tyb29tLm5hbWVdID0gcm9vbTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldFJvb21zICgpIDogQXJyYXk8Um9vbT4ge1xyXG4gICAgICAgIGxldCByb29tcyA9IFtdO1xyXG4gICAgICAgIGZvciAobGV0IG5hbWUgaW4gUm9vbS5yb29tcykge1xyXG4gICAgICAgICAgICByb29tcy5wdXNoKFJvb20ucm9vbXNbbmFtZV0pO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4g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oaXMucm9vbXMucHVzaChyb29tKTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgYWRkUmVnaW9uICguLi5yZWdpb25zIDogQXJyYXk8UmVnaW9uPikge1xyXG4gICAgICAgIHJlZ2lvbnMuZm9yRWFjaChyZWdpb24gPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnJlZ2lvbnMucHVzaChyZWdpb24pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBjb250YWlucyAocm9vbSA6IFJvb20pIHtcclxuICAgICAgICBpZih0aGlzLnJvb21zLmluZGV4T2Yocm9vbSkgIT0gLTEpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLnJlZ2lvbnMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnJlZ2lvbnNbaV0uZ2V0Um9vbXMoKS5pbmRleE9mKHJvb20pICE9IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbn0iLCIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi4vVGhpbmcudHNcIiAvPlxyXG5pbnRlcmZhY2UgQm9keXBhcnRWYWx1ZVJlc3VsdCB7XHJcbiAgICB2YWx1ZSA6IG51bWJlcjtcclxuICAgIHdlaWdodCA6IG51bWJlcjtcclxufVxyXG5cclxuY2xhc3MgQm9keXBhcnQgZXh0ZW5kcyBUaGluZyB7XHJcbiAgICBwdWJsaWMgc3RhdGljIFdFSUdIVF9MT1dFU1QgPSAxO1xyXG4gICAgcHVibGljIHN0YXRpYyBXRUlHSFRfTE9XID0gMztcclxuICAgIHB1YmxpYyBzdGF0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GNoYW5nZXMuU2x1dHRpbmVzcztcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdXBkYXRlU29yZW5lc3MgKCkge1xyXG4gICAgICAgIGxldCBjVHVybiA9IFdvcmxkU3RhdGUuZ2V0Q3VycmVudFR1cm4oKTtcclxuICAgICAgICBpZiAoY1R1cm4gPiB0aGlzLmxhc3RTb3JlbmVzc1VwZGF0ZSkge1xyXG4gICAgICAgICAgICBpZiAodGhpcy5zb3JlbmVzcyA+IDApIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuc29yZW5lc3MgLT0gKHRoaXMuc29yZW5lc3NQZXJUdXJuICogKGNUdXJuIC0gdGhpcy5sYXN0U29yZW5lc3NVcGRhdGUpKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zb3JlbmVzcyA8IDApIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNvcmVuZXNzID0gMDtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGlzLmxhc3RTb3JlbmVzc1VwZGF0ZSA9IGNUdXJuO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgY2hhbmdlU29yZW5lc3MgKHNvcmVuZXNzIDogbnVtYmVyKSB7XHJcbiAgICAgICAgdGhpcy51cGRhdGVTb3JlbmVzcygpO1xyXG4gICAgICAgIHRoaXMuc29yZW5lc3MgKz0gc29yZW5lc3M7XHJcbiAgICAgICAgaWYgKHRoaXMuc29yZW5lc3MgPCAwKSB7XHJcbiAgICAgICAgICAgIHRoaXMuc29yZW5lc3MgPSAwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0U29yZW5lc3MgKCkge1xyXG4gICAgICAgIHRoaXMudXBkYXRlU29yZW5lc3MoKTtcclxuICAgICAgICByZXR1cm4gdGhpcy5zb3JlbmVzcztcclxuICAgIH1cclx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uICAgICAgICAgICAgbGV0IGNsb3RoaW5nID0gPEFycmF5PENsb3RoaW5nPj5UaGluZy5XZWFyUmVsYXRpb24uZ2V0UmlnaHQocGFyZW50KTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjbG90aGluZy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgbGV0IGNvdmVyaW5nID0gY2xvdGhpbmdbaV0uZ2V0Q292ZXJpbmdTbG90cygpO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgayA9IDA7IGsgPCBjb3ZlcmluZy5sZW5ndGg7IGsrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBpZHggPSB0aGlzLnZpc2libGVTbG90cy5pbmRleE9mKGNvdmVyaW5nW2tdKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaWR4ID49IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy52aXNpYmxlU2xvdHMuc3BsaWNlKGlkeCwgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnZpc2libGVTbG90cy5sZW5ndGggPT0gMCkgYnJlYWs7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzVW5jb3ZlcmVkICgpIHtcclxuICAgICAgICB0aGlzLnVwZGF0ZVZpc2liaWxpdHkoKTtcclxuICAgICAgICByZXR1cm4gdGhpcy52aXNpYmxlU2xvdHMubGVuZ3RoID09IHRoaXMuc2xvdHMubGVuZ3RoICYmIHRoaXMuc2xvdHMubGVuZ3RoID4gMDtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdXBkYXRlU3RhdHVzICgpIHtcclxuICAgICAgICB0aGlzLnVwZGF0ZVZpc2liaWxpdHkoKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3Rh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HJcbiAgICAgICAgICAgIHJldHVybiBcIkhVR0VcIjtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gbmFtZXNbc2l6ZV07XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRHZW5kZXJWYWx1ZSAoKSB7XHJcbiAgICAgICAgcmV0dXJuIEh1bWFub2lkQnJlYXN0cy5nZXRHZW5kZXJGcm9tU2l6ZSh0aGlzLmdldFNpemUoKSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNsdXR0aW5lc3MgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmdldEdlbmRlclZhbHVlKCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRHZW5kZXJGcm9tU2l6ZSAoc2l6ZSA6IG51bWJlcikge1xyXG4gICAgICAgIGlmIChzaXplIDw9IDApIHtcclxuICAgICAgICAgICAgcmV0dXJuIDIwO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoc2l6ZSA8PSAzKSB7XHJcbiAgICAgICAgICAgIHJldHVybiAyMCAqIHNpemU7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgcmV0dXJuIDgwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgYXJyYW5nZUdlbmRlclZhbHVlIChndiA6IG51bWJlcikge1xyXG4gICAgICAgIGlmIChndiA8PSAyMCkge1xyXG4gICAgICAgICAgICB0aGlzLnNpemUgPSAwO1xyXG4gICAgICAgICAgICB0aGlzLnNpbGljb25lID0gMDtcclxuICAgICAgICAgICAgdGhpcy5taWxrID0gMDtcclxuICAgICAgICB9IGVsc2UgaWYgKGd2IDwgODApIHtcclxuICAgICAgICAgICAgdGhpcy5zaXplID0gTWF0aC5yb3VuZChndiAvIDIwKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLnNpem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GlvbnMpIHtcclxuICAgICAgICBzdXBlcihvcHRpb25zKTtcclxuICAgICAgICB0aGlzLmFkZEdldEFsdGVyYXRpb25zKCh0aGluZykgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgU2l6ZSA6IHRoaXMuc2l6ZSxcclxuICAgICAgICAgICAgICAgIFNpbGljb25lIDogdGhpcy5zaWxpY29uZVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHRoaXMuYWRkU2V0QWx0ZXJhdGlvbnMoKHRoaW5nLCBjaGFuZ2VzKSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMuc2l6ZSA9IGNoYW5nZXMuU2l6ZTtcclxuICAgICAgICAgICAgdGhpcy5zaWxpY29uZSA9IGNoYW5nZXMuU2lsaWNvbmU7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNpemUgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnNpemUgKyB0aGlzLnNpbGljb25lO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRTaXplVGV4dCAoKSB7XHJcbiAgICAgICAgcmV0dXJuIEh1bWFub2lkQnV0dC5nZXRTaXplVGV4dCh0aGlzLmdldFNpemUoKSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBnZXRTaXplVGV4dCAoc2l6ZSA6IG51bWJlcikge1xyXG4gICAgICAgIGxldCBuYW1lcyA9IFtcImZsYXRcIiwgXCJ0aW55XCIsIFwicm91bmRcIiwgXCJwbHVtcFwiXTsgLy8gVE9ETzogZmluaXNoIHRoaXNcclxuICAgICAgICBpZiAoc2l6ZSA+PSBuYW1lcy5sZW5ndGgpIHtcclxuICAgICAgICAgICAgcmV0dXJuIFwiZ2FyZ2FudHVhblwiO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHJldHVybiBuYW1lc1tzaXplXTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEdlbmRlclZhbHVlICgpIHtcclxuICAgICAgICByZXR1cm4gSHVtYW5vaWRCcmVhc3RzLmdldEdlbmRlckZyb21TaXplKHRoaXMuZ2V0U2l6ZSgpKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldEdlbmRlckZyb21TaXplIChzaXplIDogbnVtYmVyKSB7XHJcbiAgICAgICAgaWYgKHNpemUgPD0gMCkge1xyXG4gICAgICAgICAgICByZXR1cm4gMjA7XHJcbiAgICAgICAgfSBlbHNlIGlmIChzaXplIDw9IDIpIHtcclxuICAgICAgICAgICAgcmV0dXJuIDMwICogc2l6ZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gODA7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8vIFRPRE86IFJFUExBQ0UgTlVNQkVSUyBXSVRIIFRBQkxFXHJcbiAgICBwdWJsaWMgYXJyYW5nZUdlbmRlclZhbHVlIChndiA6IG51bWJlcikge1xyXG4gICAgICAgIGlmIChndiA8PSAyMCkge1xyXG4gICAgICAgICAgICB0aGlzLnNpemUgPSAwO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoZ3YgPD0gNjApIHtcclxuICAgICAgICAgICAgdGhpcy5zaXplID0gMTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLnNpemUgPSAzO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufSIsIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi8uLi9Cb2R5cGFydC50c1wiIC8+XHJcbi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi8uLi9IdW1hbm9pZC9IdW1hbm9pZC50c1wiIC8+XHJcbi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi9TZXhTdGljay50c1wiIC8+XHJcbi8vLyA8cm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JcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGNvbnN0cnVjdG9yIChvcHRpb25zPyA6IFRoaW5nT3B0aW9ucykge1xyXG4gICAgICAgIHN1cGVyKG9wdGlvbnMpO1xyXG4gICAgICAgIGlmIChNYXRoLnJhbmRvbSgpID49IDAuNSkge1xyXG4gICAgICAgICAgICAvLyBncm93ZXI/XHJcbiAgICAgICAgICAgIHRoaXMuZmxhY2NpZE11bHQgPSAwLjMzO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIC8vIHNob3dlcj9cclxuICAgICAgICAgICAgdGhpcy5mbGFjY2lkTXVsdCA9IDAuNzc7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMuYWRkR2V0QWx0ZXJhdGlvbnMoKHRoaW5nKSA9PiB7XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBGU2l6ZSA6IHRoaXMuZmxhY2NpZFNpemUuZ2V0TnVtYmVyKCksXHJcbiAgICAgICAgICAgICAgICBGV2lkdGggOiB0aGlzLmZsYWNjaWRXaWR0aC5nZXROdW1iZXIoKSxcclxuICAgICAgICAgICAgICAgIEVTaXplIDogdGhpcy5lcmVjdFNpemUuZ2V0TnVtYmVyKCksXHJcbiAgICAgICAgICAgICAgICBFV2lkdGggOiB0aGlzLmVyZWN0V2lkdGguZ2V0TnVtYmVyKCksXHJcbiAgICAgICAgICAgICAgICBBTWluIDogdGhpcy5hcm91c2FsTWluaW11bSxcclxuICAgICAgICAgICAgICAgIEFFcmVjdCA6IHRoaXMuYXJvdXNhbEVyZWN0LFxyXG4gICAgICAgICAgICAgICAgRk11bHQgOiB0aGlzLmZsYWNjaWRNdWx0XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy5hZGRTZXRBbHRlcmF0aW9ucygodGhpbmcsIGNoYW5nZXMpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5mbGFjY2l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XJhdGlvbnMoKHRoaW5nLCBjaGFuZ2VzKSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMuc2tpblNvZnRuZXNzID0gY2hhbmdlcy5Tb2Z0bmVzcztcclxuICAgICAgICAgICAgdGhpcy5za2luSGFpcmluZXNzID0gY2hhbmdlcy5IYWlyaW5lc3M7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNsdXR0aW5lc3MgKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmdldEdlbmRlclZhbHVlKCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldERlc2NyaXB0aW9uICgpIHtcclxuICAgICAgICBsZXQgb3duZXIgPSA8UGVyc29uPiB0aGlzLmdldFBhcnRPbmUoKTtcclxuICAgICAgICBsZXQgZ3JlZW4gPSAob3duZXIuZ2V0U3RhdChBdHRyaWJ1dGVzLkNvcnJ1cHRpb24pID4gNTApO1xyXG5cclxuICAgICAgICBsZXQgc2F5ID0gbmV3IFNheShcIllvdXIgc2tpbiBpcyBcIik7XHJcblxyXG4gICAgICAgIGlmICh0aGlzLnNraW5Tb2Z0bmVzcyA+IDcpIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcInBlcmZlY3RseSBzbW9vdGhcIik7XHJcbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLnNraW5Tb2Z0bmVzcyA+IDQpIHtcclxuICAgICAgICAgICAgc2F5LmFkZChcInNtb290aFwiKTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBzYXkuYWRkKFwicm91Z2hcIik7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBzYXkuYWRkKFwiIGFuZCBcIik7XHJcblxyXG4gICAgICAgIGlmICh0aGlzLnNraW5IYWlyaW5lc3MgPiA4KSB7XHJcbiAgICAgICAgICAgIHNheS5hZGQoXCJoYWlyeSwgbGlrZSBhIGdvcmlsbGEnc1wiKVxyXG4gICAgICAgIH0gZWxz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ci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgbm91biA9IGFjdGlvbi5nZXRDbG90aGluZygpO1xyXG4gICAgICAgICAgICBpZiAoIVRoaW5nLldlYXJSZWxhdGlvbi5pc1JpZ2h0KGFjdGlvbi5hY3Rvciwgbm91bikpIHtcclxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb24uYWN0b3IgPT0gV29ybGRTdGF0ZS5wbGF5ZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uc2F5LmFkZChcIllvdSBhcmUgbm90IHdlYXJpbmcgaXQuXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBjYXJyeURlZmF1bHQgPSBBY3Rpb25SZW1vdmUuY2FycnkuY3JlYXRlQW5kQWRkUnVsZSh7XHJcbiAgICAgICAgbmFtZSA6IFwiU2V0IENsb3RoaW5nIGFzIENhcnJpZWRcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9NRURJVU0sXHJcbiAgICAgICAgY29kZSA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxBY3Rpb25SZW1vdmU+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBhY3Rpb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IG5vdW4gPSBhY3Rpb24uZ2V0Q2xvdGhpbmcoKTtcclxuICAgICAgICAgICAgVGhpbmcuQ2FycnlSZWxhdGlvbi5zZXRSZWxhdGlvbihhY3Rpb24uYWN0b3IsIG5vdW4pO1xyXG5cclxuICAgICAgICAgICAgbGV0IGFjdG9yID0gYWN0aW9uLmFjdG9yO1xyXG4gICAgICAgICAgICBsZXQgdGhpbmcgPSAoPFRoaW5nPmFjdGlvbi5nZXROb3VuKDApKTtcclxuX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kID8gdGhpcy5nZXROb3VuKDApLmdldFByaW50ZWROYW1lKCkgOiBcIlwiKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0Q2xvdGhpbmcgKCkgOiBDbG90aGluZ3tcclxuICAgICAgICByZXR1cm4gdGhpcy5nZXROb3VuKDApO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgY2hlY2tJc1dlYXJhYmxlID0gQWN0aW9uV2Vhci5jaGVjay5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJJcyBub3VuIGEgY2xvdGhpbmdcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxyXG4gICAgICAgIGNvZGUgOiAocnVubmVyIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uV2Vhcj4pID0+IHtcclxuICAgICAgICAgICAgbGV0IGFjdGlvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgbm91biA9IGFjdGlvbi5nZXRDbG90aGluZygpO1xyXG4gICAgICAgICAgICBpZiAoIShub3VuIGluc3RhbmNlb2YgQ2xvdGhpbmcpKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0aW9uLmFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCJZb3UgY2FuIG9ubHkgd2VhciBDbG90aGluZy5cIik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGNoZWNrSXNIZWxkID0gQWN0aW9uV2Vhci5jaGVjay5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJJcyBub3VuIGhlbGRcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdILFxyXG4gICAgICAgIGNvZGUgOiBhc3luYyAocnVubmVyIDogUnVsZWJvb2tSdW5uZXI8QWN0aW9uV2Vhcj4pID0+IHtcclxuICAgICAgICAgICAgbGV0IGFjdGlvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgbm91biA9IGFjdGlvbi5nZXRDbG90aGluZygpO1xyXG4gICAgICAgICAgICBpZiAoIVRoaW5nLkNhcnJ5UmVsYXRpb24uaXNSaWdodChhY3Rpb24uYWN0b3IsIG5vdW4pKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoYWN0aW9uLmFjdG9yID09IFdvcmxkU3RhdGUucGxheWVyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLnNheS5hZGQoXCIoZmlyc3QgdGFraW5nIHRoZSBcIiwgbm91biwgXCIpXCIsIFNheS5MSU5FX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGxldCB0YWtpbmdBY3Rpb24gPSBuZXcgQWN0aW9uVGFrZShhY3Rpb24uYWN0b3IsIG5vdW4pO1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgdGFraW5nQWN0aW9uLmV4ZWN1dGUoKTtcclxuICAgICAgICAgICAgICAgIGFjdGlvbi5zYXkuYWRkKHRha2luZ0FjdGlvbi5zYXkpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFUaGluZy5DYXJyeVJlbGF0aW9uLmlzUmlnaHQoYWN0aW9uLmFjdG9yLCBub3VuKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgY2FycnlEZWZhdWx0ID0gQWN0aW9uV2Vhci5jYXJyeS5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VtYW5vaWQuU0xPVF9TTE9UX0NPVU5UOyBpKyspIHsgdGhpcy51bmNvdmVyZWRTbG90cy5wdXNoKGkpOyB9XHJcblxyXG4gICAgICAgIGxldCBjbG90aGluZyA9IDxBcnJheTxDbG90aGluZz4+VGhpbmcuV2VhclJlbGF0aW9uLmdldFJpZ2h0VHlwZSh0aGlzLCBDbG90aGluZyk7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjbG90aGluZy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBsZXQgY292ZXJpbmcgPSBjbG90aGluZ1tpXS5nZXRDb3ZlcmluZ1Nsb3RzKCk7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGsgPSAwOyBrIDwgY292ZXJpbmcubGVuZ3RoOyBrKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBpZHggPSB0aGlzLnVuY292ZXJlZFNsb3RzLmluZGV4T2YoY292ZXJpbmdba10pO1xyXG4gICAgICAgICAgICAgICAgaWYgKGlkeCA+PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51bmNvdmVyZWRTbG90cy5zcGxpY2UoaWR4LCAxKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKHRoaXMudW5jb3ZlcmVkU2xvdHMubGVuZ3RoID09IDApIGJyZWFrO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdXBkYXRlR2VuZGVyVmFsdWUgKCkge1xyXG4gICAgICAgIGxldCBjbG90aGluZ0dlbmRlciA9IENsb3RoaW5nLmdldEdlbmRlclZhbHVlT24odGhpcyk7XHJcbiAgICAgICAgbGV0IGJvZHlwYXJ0R2VuZGVyID0gQm9keXBhcnQuZ2V0R2VuZGVyVmFsdWVPbih0aGlzKTtcclxuXHJcbiAgICAgICAgbGV0IGdlbmRlcldlaWdodCA9IGNsb3RoaW5nR2VuZGVyLndlaW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XHJcbiAgICAgICAgfTtcclxuICAgICAgICB0aGlzLmlzU2x1dHRpbmVzc0NhY2hlZCA9IHRydWU7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzVmlzaWJsZU9uQXJyYXkgKGFyciA6IEFycmF5PG51bWJlcj4pIHtcclxuICAgICAgICBmb3IgKGxldCBpID0wIDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBpZiAoIXRoaXMuaXNWaXNpYmxlT24oYXJyW2ldKSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhZGRNYWxlUGFydHMgKCkge1xyXG4gICAgICAgIGlmICghdGhpcy5pc01hbGUoKSAmJiAhdGhpcy5pc0hlcm0oKSkge1xyXG4gICAgICAgICAgICB0aGlzLmFkZFBhcnRzKFxyXG4gICAgICAgICAgICAgICAgbmV3IEh1bWFub2lkVGVzdGljbGVzKCksIG5ldyBIdW1hbm9pZFBlbmlzKClcclxuICAgICAgICAgICAgKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5pbnZhbGlkYXRlQ2FjaGVzKCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFkZEZlbWFsZVBhcnRzICgpIHtcclxuICAgICAgICBpZiAoIXRoaXMuaXNGZW1hbGUoKSAmJiAhdGhpcy5pc0hlcm0oKSkge1xyXG4gICAgICAgICAgICB0aGlzLmFkZFBhcnRzKFxyXG4gICAgICAgICAgICAgICAgbmV3IEh1bWFub2lkVmFnaW5hKClcclxuICAgICAgICAgICAgKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5pbnZhbGlkYXRlQ2FjaGVzKCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHJlbW92ZUdlbmRlcmVkUGFydHMgKCkge1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CBuZXcgSHVtYW5vaWRCcmVhc3RzKCksIG5ldyBIdW1hbm9pZEZlZXQoKSxcclxuICAgICAgICAgICAgbmV3IEh1bWFub2lkVG9yc28oKSwgbmV3IEh1bWFub2lkQnV0dCgpXHJcbiAgICAgICAgKTtcclxuXHJcbiAgICAgICAgaWYgKG9wdGlvbnMuaXNNYWxlKSB7XHJcbiAgICAgICAgICAgIHRoaXMuYWRkTWFsZVBhcnRzKCk7XHJcbiAgICAgICAgICAgIHRoaXMuc2V0R2VuZGVyVmFsdWUoMjUpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHRoaXMuYWRkRmVtYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgdGhpcy5zZXRHZW5kZXJWYWx1ZSg3NSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICB0aGlzLmFkZEdldEFsdGVyYXRpb25zKChodW1hbm9pZCA6IEh1bWFub2lkKSA9PiB7XHJcbiAgICAgICAgICAgIC8vIExldCdzIG5vdCBkbyB0aGlzIGZvciBOUENzLiBJdCBjYW4gYnJlYWsgcGF0Y2hlcy5cclxuICAgICAgICAgICAgaWYgKGh1bWFub2lkLmlzUGxheWVyKCkpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICAgICAgSHVtYW5vaWRHZW5kZXI6IGh1bWFub2lkLmlzTWFsZSgpID8gSHVtYW5vaWQuU0VYX01BTEUgOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBodW1hbm9pZC5pc0ZlbWFsZSgpID8gSHVtYW5vaWQuU0VYX0ZFTUFMRSA6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBIdW1hbm9pZC5TRVhfSEVSTVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHRoaXMuYWRkU2V0QWx0ZXJhdGlvbnMoKGh1bWFub2lkIDogSHVtYW5vaWQsIGNoYW5nZXMpID0+IHtcclxuICAgICAgICAgICAgLy8gTGV0J3Mgbm90IGRvIHRoaXMgZm9yIE5QQ3MuIEl0IGNhbiBicmVhayBwYXRjaGVzLlxyXG4gICAgICAgICAgICBpZiAoaHVtYW5vaWQuaXNQbGF5ZXIoKSkge1xyXG4gICAgICAgICAgICAgICAgaHVtYW5vaWQucmVtb3ZlR2VuZGVyZWRQYXJ0cygpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNoYW5nZXMuSHVtYW5vaWRHZW5kZXIgPT0gSHVtYW5vaWQuU0VYX01BTEUpIHtcclxuICAgICAgICAgICAgICAgICAgICBodW1hbm9pZC5hZGRNYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hhbmdlcy5IdW1hbm9pZEdlbmRlciA9PSBIdW1hbm9pZC5TRVhfRkVNQUxFKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaHVtYW5vaWQuYWRkRmVtYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaHVtYW5vaWQuYWRkTWFsZVBhcnRzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgaHVtYW5vaWQuYWRkRmVtYWxlUGFydHMoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyB1cGRhdGVCb2R5cGFydHMgKCkge1xyXG4gICAgICAgIGxldCBwYXJ0cyA9IDxBcnJheTxCb2R5cGFydD4+IFRoaW5nLlBhcnRSZWxhdGlvbi5nZXRSaWdodFR5cGUodGhpcywgQm9keXBhcnQpO1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGFydHMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgcGFydHNbaV0udXBkYXRlU3RhdHVzKCk7XHJcbiAgICAgIC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pICE9IC0xKSB7XHJcbiAgICAgICAgICAgICAgICBicmFzLnB1c2goY2xvdGgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNsb3RoLnRyYW5zcGFyZW50U2xvdHMuaW5kZXhPZihIdW1hbm9pZC5TTE9UX0JSRUFTVFMpID09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pc0JyZWFzdFZpc2libGUgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoY2xvdGguc2xvdHMuaW5kZXhPZihIdW1hbm9pZC5TTE9UX0JVVFQpICE9IC0xKSB7XHJcbiAgICAgICAgICAgICAgICBidXR0cy5wdXNoKGNsb3RoKTtcclxuICAgICAgICAgICAgICAgIGlmIChjbG90aC50cmFuc3BhcmVudFNsb3RzLmluZGV4T2YoSHVtYW5vaWQuU0xPVF9CVVRUKSA9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaXNCdXR0VmlzaWJsZSA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChjbG90aC5zbG90cy5pbmRleE9mKEh1bWFub2lkLlNMT1RfQ1JPVENIX0ZST05UKSAhPSAtMSkge1xyXG4gICAgICAgICAgICAgICAganVua3MucHVzaChjbG90aCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoY2xvdGgudHJhbnNwYXJlbnRTbG90cy5pbmRleE9mKEh1bWFub2lkLlNMT1RfQ1JPVENIX0ZST05UKSA9PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaXNDcm90Y2hWaXNpYmxlID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgdGhpcy51cGRhdGVCcmVhc3RTaXplcyhicmFzKTtcclxuICAgICAgICB0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dW1hbm9pZEJyZWFzdHMpO1xyXG4gICAgICAgIHRoaXMuYnJlYXN0VmlzaWJsZVNpemUgPSBicmVhc3RzLmdldFNpemUoKTtcclxuICAgICAgICBicmFzLmZvckVhY2goKGJyYSA6IENsb3RoaW5nKSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChicmEudGlnaHRCcmVhc3RTaXplID49IDAgJiYgdGhpcy5icmVhc3RWaXNpYmxlU2l6ZSA+IGJyYS50aWdodEJyZWFzdFNpemUpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuaXNCcmVhc3RUaWdodCA9IHRydWU7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmIChicmEubWF4QnJlYXN0U2l6ZSA+PSAwICYmIHRoaXMuYnJlYXN0VmlzaWJsZVNpemUgPiBicmEubWF4QnJlYXN0U2l6ZSkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5icmVhc3RWaXNpYmxlU2l6ZSA9IGJyYS5tYXhCcmVhc3RTaXplO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAodGhpcy5icmVhc3RWaXNpYmxlU2l6ZSA+PSBicmEubG9vc2VCcmVhc3RTaXplKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmlzQnJlYXN0TG9vc2UgPSBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgdGhpcy5icmVhc3RWaXNpYmxlU2l6ZSArPSBicmEuYnJlYXN0UGFkZGluZztcclxuICAgICAgICAgICAgaWYgKHRoaXMuYnJlYXN0VmlzaWJsZVNpemUgPCAwKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmJyZWFzdFZpc2libGVTaXplID0gMDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyB1cGRhdGVDcm90Y2hTaXplcyAoY2xvdGhzIDogQXJyYXk8Q2xvdGhpbmc+KSB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IHtcclxuICAgICAgICAgICAgcHJlc2VudGF0aW9uICs9IChcIm1hc2N1bGluZSBcIik7XHJcbiAgICAgICAgfSBlbHNlIGlmIChwbGF5ZXJHZW5kZXIuZ2VuZGVyVmFsdWVDb3JyZWN0ZWQgPCA2MCkge1xyXG4gICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwiYW5kcm9neW5vdXMgXCIpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJmZW1pbmluZSBcIik7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAocGxheWVyR2VuZGVyLmhhc1RpdHMpIHtcclxuICAgICAgICAgICAgaWYgKHBsYXllckdlbmRlci5oYXNQZW5pcyB8fCBwbGF5ZXJHZW5kZXIuaGFzUGVuaXNCdWxnZSkge1xyXG4gICAgICAgICAgICAgICAgLy8gU2hlbWFsZSBTdGF0dXMgKFRpdHMgKyBQZW5pcylcclxuICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJzaGVtYWxlXCIpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBsYXllckdlbmRlci5oYXNWYWdpbmEpIHtcclxuICAgICAgICAgICAgICAgIC8vIGlzIGEgd29tYW5cclxuICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJ3b21hblwiKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIC8vIE5vIHRpdHNcclxuICAgICAgICAgICAgaWYgKHBsYXllckdlbmRlci5oYXNQZW5pcykge1xyXG4gICAgICAgICAgICAgICAgLy8gU2ltcGx5IG1hbGVcclxuICAgICAgICAgICAgICAgIGlmIChwbGF5ZXJHZW5kZXIuZ2VuZGVyVmFsdWVDb3JyZWN0ZWQgPCA2MCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJtYW5cIik7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHByZXNlbnRhdGlvbiArPSAoXCJ0cmFwXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBsYXllckdlbmRlci5oYXNQZW5pc0J1bGdlKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBQb3NzaWJsZSBTaGVtYWxlIHN0YXR1cyAtIGhhcyBidWxnZSBhbmQgdGl0cyBtYXliZSBnZXQgYmV0dGVyIHRlcm1zIHNvbWV0aW1lXHJcbiAgICAgICAgICAgICAgICBpZiAocGxheWVyR2VuZGVyLmdlbmRlclZhbHVlQ29ycmVjdGVkIDwgNjApIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwibWFuXCIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwidHJhcFwiKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIGlmIChwbGF5ZXJHZW5kZXIuaGFzVmFnaW5hKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBpcyBhIHdvbWFuXHJcbiAgICAgICAgICAgICAgICBwcmVzZW50YXRpb24gKz0gKFwid29tYW5cIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBwcmVzZW50YXRpb247XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBTTE9UX0hBSVIgPSAwO1xyXG4gICAgcHVibGljIHN0YXRpYyBTTE9UX0hFQURHRUFSID0gMTtcclxuICAgIHB1YmxpYyBzdGF0aWMgU0xPVF9GQUNFID0gMjtcclxuICAgIHB1YmxpYyBzdGF0aWMgU0xPVF9FQVJTID0gMztcclxuICAgIHB1YmxpYyBzdGF0aWMgU0xPVF9FWUVTID0gNDt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ICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBzYXkuYWRkKFwiWW91IGhhdmUgYSBcIixcclxuICAgICAgICAgICAgICAgIHBlbmlzLmdldFNpemVUZXh0KCksIChwZW5pcy5pc0ZsYWNjaWQoKSA/IFwiIGZsYWNjaWQgXCIgOiBcIiBlcmVjdCBcIiksXHJcbiAgICAgICAgICAgICAgICBTYXkuQ09DSywgXCIgYmV0d2VlbiB5b3VyIGxlZ3NcIlxyXG4gICAgICAgICAgICApO1xyXG4gICAgICAgICAgICBpZiAoIXBlbmlzLmlzQmlnKCkgJiYgcGVuaXMuaXNHcm93ZXIoKSAmJiBwZW5pcy5pc0ZsYWNjaWQoKSkge1xyXG4gICAgICAgICAgICAgICAgc2F5LmFkZChcIiwgd2hpY2ggaXMgb2theSwgc2luY2UgeW91J3JlIGEgZ3Jvd2VyLCBub3QgYSBzaG93ZXJcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHBlbmlzLmlzVW5jb3ZlcmVkKCkpIHtcclxuICAgICAgICAgICAgICAgIGxldCBvbmVPZiA9IG5ldyBPbmVPZihPbmVPZi5QVVJFTFlfQVRfUkFORE9NLCAuLi5bXHJcbiAgICAgICAgICAgICAgICAgICAgXCIsIGl0IGlzIG5vdCBjb3ZlcmVkIGJ5IGFueSBjbG90aGluZ1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIFwiLCBpdCBpcyBub3QgY292ZXJlZCBieSBhbnkgY2xvdGhlc1wiLFxyXG4gICAgICAgICAgICAgICAgICAgIFwiLCBpdCBpcyB1bmNvdmVyZWRcIixcclxuICAgICAgICAgICAgICAgICAgICBcIiwgaXQgaXMgdmlzaWJsZSB0byBhbGxcIixcclxuICAgICAgICAgICAgICAgICAgICBcIiwgaXQgaXMgaGFuZ2luZyBmcmVlbHlcIlxyXG4gICAgICAgICAgICAgICAgXSk7XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKG9uZU9mLmdldE9uZSgpK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gZXZlbiBib3RoZXIgY292ZXJpbmcgaXQgdXBcIilcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHNheS5hZGQoXCIuXCIpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGJvZHlwYXJ0U2x1dHRpbmVzc0ZpbmFsID4gNjApIHtcclxuICAgICAgICAgICAgICAgIHNheS5hZGQoXCJZb3VyIGJvZHkgZGVmaW5pdGVseSBoYXMgYSBsb3Qgb2Ygc2V4LWFwcGVhbCBnb2luZyBvblwiKTtcclxuICAgICAgICAgICAgICAgIGlmIChjb3ZlcmVkUGVyYyA+IDAuNykge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheS5hZGQoXCIsIGFsdGhvdWdoIGl0J3MgY292ZXJlZFwiKVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjb3ZlcmVkUGVyYyA8IDAuMikge1xyXG4gICAgICAgICAgICAgICAgICAgIHNheS5hZGQoXCIsIHByb3VkbHkgZGlzcGxheWVkIGZvciBhbGwgdG8gc2VlXCIpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiLlwiKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChib2R5cGFydFNsdXR0aW5lc3NGaW5hbCA8IDMwKSB7XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiWW91IGhhdmUgdmVyeSBsaXR0bGUgc2V4LWFwcGVhbCwgbWF5YmUgeW91IGFyZSBhIGtpdGNoZW4gdGFibGU/XCIpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvdmVyZWRQZXJjID4gMC43KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChcIiBBdCBsZWFzdCB5b3UgY292ZXJlZCBpdCB1cC5cIilcclxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY292ZXJlZFBlcmMgPCAwLjIpIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkuY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gUmVtZW1iZXJpbmdSb29tSW5NYXAgPSBSZW1lbWJlcmluZ1Jvb21SdWxlYm9vay5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJJcyByb29tIHNob3duIG9uIGEgbWFwP1wiLFxyXG4gICAgICAgIGZpcnN0UHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX0xPV0VTVCxcclxuICAgICAgICBwcmlvcml0eSA6IFJ1bGUuUFJJT1JJVFlfTE9XRVNULFxyXG4gICAgICAgIGNvZGUgOiBydW5uZXIgPT4ge1xyXG4gICAgICAgICAgICBsZXQgbWFwcyA9IDxBcnJheTxNYXBOb3RlPj4gVGhpbmcuQ2FycnlSZWxhdGlvbi5nZXRSaWdodFR5cGUocGxheWVyLCBNYXBOb3RlKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBtYXBzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAobWFwc1tpXS5jb250YWlucyhydW5uZXIubm91bikpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIGV4cG9ydCBhc3luYyBmdW5jdGlvbiBpc1Jvb21SZW1lbWJlcmVkIChyb29tIDogUm9vbSkgOiBQcm9taXNlPGJvb2xlYW4+IHtcclxuICAgICAgICBsZXQgcmVzdWx0ID0gYXdhaXQgUmVtZW1iZXJpbmdSb29tUnVsZWJvb2suZXhlY3V0ZSh7bm91biA6IHJvb219KTtcclxuICAgICAgICByZXR1cm4gcmVzdWx0ID09IHRydWU7IC8vIGNhbiByZXR1cm4gXCJ1bmRlZmluZWRcIlxyXG4gICAgfVxyXG5cclxuICAgIGV4cG9ydCBmdW5jdGlvbiBnZXRSZW1lbWJlcmVkUm9vbXMgKCkge1xyXG4gICAgICAgIHJldHVybiByZW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gIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gcmVtZW1iZXJSb29tICguLi5yb29tcyA6IEFycmF5PFJvb20+KSB7XHJcbiAgICAgICAgcm9vbXMuZm9yRWFjaCgodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgaWYgKHZhbHVlIGluc3RhbmNlb2YgUm9vbSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlLmZvZGRlcikge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZW1lbWJlcmVkRm9kZGVyLmluZGV4T2YodmFsdWUpID09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbWVtYmVyZWRGb2RkZXIucHVzaCh2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgaWR4ID0gcmVtZW1iZXJlZFJvb21zLnZhbHVlLmluZGV4T2YodmFsdWUuZ2V0TmFtZSgpKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaWR4ICE9IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbWVtYmVyZWRSb29tcy52YWx1ZS5zcGxpY2UoaWR4LCAxKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmVtZW1iZXJlZFJvb21zLnZhbHVlLnVuc2hpZnQodmFsdWUuZ2V0TmFtZSgpKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIHRydW5jYXRlUm9vbXMoKTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgZnVuY3Rpb24gc2F2ZVN0YXRlICgpIHtcclxuICAgICAgICBsZXQgdGhpbmdzID0ge1xyXG4gICAgICAgICAgICBjYXJyaWVkOiBbXSxcclxuICAgICAgICAgICAgd29ybjogW10sXHJcbiAgICAgICAgICAgIHdpZWxkZWQ6IFtdXHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgVGhpbmdzIDogdGhpbmdzXHJcbiAgICAgICAgfTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgbGV0IENvcnJlY3RSZW1lbWJlcmVkUm9vbXNSdWxlID0gUGxheUJlZ2lucy5ydWxlYm9vay5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJDb3JyZWN0IHJlbWVtYmVyZWQgcm9vbXNcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9MT1dFU1QsXHJcbiAgICAgICAgcHJpb3JpdHkgOiBSdWxlLlBSSU9SSVRZX01FRElVTSxcclxuICAgICAgICBjb2RlIDogKCkgPT4ge1xyXG4gICAgICAgICAgICBsZXQgYWxsUm9vbXMgPSByZW1lbWJlcmVkUm9vbXMudmFsdWU7XHJcbiAgICAgICAgICAgIGxldCBjdXJyZW50Um9vbSA9IFdvcmxkU3RhdGUucGxheWVyLmdldFJvb20oKTtcclxuICAgICAgICAgICAgaWYgKGFsbFJvb21zLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgICAgICByZW1lbWJlcmVkUm9vbXMudmFsdWUgPSBbY3VycmVudFJvb20uZ2V0TmFtZSgpXTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBsZXQgbmV3Um9vbXMgPSBbXTtcclxuXHJcbiAgICAgICAgICAgIGZ1bmN0aW9uIHJlY3Vyc2l2ZWx5QWRkUm9vbXMgKHJvb20gOiBSb29tKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAocm9vbSBpbnN0YW5jZW9mIFJvb21SYW5kb20pIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocm9vbS5mb2RkZXIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVtZW1iZXJlZEZvZGRlci5wdXNoKHJvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByb29tLmNvbm5lY3Rpb25zLmZvckVhY2goKG5ld1Jvb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY3Vyc2l2ZWx5QWRkUm9vbXMobmV3Um9vbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYWxsUm9vbXMuaW5kZXhPZihyb29tLmdldE5hbWUoKSkgIT0gLTEgJiYgbmV3Um9vbXMuaW5kZXhPZihyb29tLmdldE5hbWUoKSkgPT0gLTEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmV3Um9vbXMucHVzaChyb29tLmdldE5hbWUoKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvb20uY29ubmVjdGlvbnMuZm9yRWFjaCgobmV3Um9vbSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjdXJzaXZlbHlBZGRSb29tcyhuZXdSb29tKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICByZWN1cnNpdmVseUFkZFJvb21zKGN1cnJlbnRSb29tKTtcclxuICAgICAgICAgICAgcmVtZW1iZXJlZFJvb21zLnZhbHVlID0gbmV3Um9vbXM7XHJcbiAgICAgICAgfVxyXG4gICAgfSlcclxufSIsIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCJSZWxhdGlvbnMvUmVsYXRpb25PbmVUb01hbnkudHNcIiAvPlxyXG5jbGFzcyBSZWdpb24ge1xyXG4gICAgcHVibGljIG5hbWUgOiBzdHJpbmc7XHJcblxyXG4gICAgcHVibGljIGNvbnN0cnVjdG9yIChuYW1lIDogc3RyaW5nKSB7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G4gICAgICogQHJldHVybnMge1R9XHJcbiAgICAgKi9cclxuICAgIHB1YmxpYyBnZXRPbmUgKCkgOiBUIHtcclxuICAgICAgICAvLyBnZXQgYSByYW5kb20gZWxlbWVudCBmcm9tIHRoaXMucG9zaXRpb24gdG8gKGFycmF5Lmxlbmd0aCAtIDEpXHJcbiAgICAgICAgLy8gc3RvcmUgaXQgbG9jYWxseVxyXG4gICAgICAgIC8vIHN3aXRjaCBpdCB3aXRoIGFycmF5W3RoaXMucG9zaXRpb25dXHJcbiAgICAgICAgLy8gcmV0dXJuIGl0XHJcbiAgICAgICAgaWYgKHRoaXMucG9zaXRpb24gPj0gdGhpcy5hcnJheS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcclxuICAgICAgICB9XHJcbiAgICAgICAgbGV0IHJhbmRvbUluZGV4ID0gTWF0aC5mbG9vcih0aGlzLnJuZygpICogKHRoaXMuYXJyYXkubGVuZ3RoIC0gdGhpcy5wb3NpdGlvbikpICsgdGhpcy5wb3NpdGlvbjtcclxuICAgICAgICBsZXQgbG9jYWxDb3B5ID0gdGhpcy5hcnJheVt0aGlzLnBvc2l0aW9uXTtcclxuICAgICAgICB0aGlzLmFycmF5W3RoaXMucG9zaXRpb25dID0gdGhpcy5hcnJheVtyYW5kb21JbmRleF07XHJcbiAgICAgICAgdGhpcy5hcnJheVtyYW5kb21JbmRleF0gPSBsb2NhbENvcHk7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuYXJyYXlbdGhpcy5wb3NpdGlvbisrXTtcclxuICAgIH1cclxuXHJcbiAgICAvKipcclxuICAgICAqIFRoZXJlIHNob3VsZCBiZSBubyByZWFzb24gdG8gdXNlIHRoaXMgd2l0aCB0aGUgXCJnZXRPbmVcIiBjb2RlIGFib3ZlLlxyXG4gICAgICogQHJldHVybnMge1RbXX1cclxuICAgICAqL1xyXG4gICAgcHVibGljIGdldFNodWZmbGVkICgpIDogQXJyYXk8VD4ge1xyXG4gICAgICAgIGxldCBhcnJheSA9IHRoaXMuYXJyYXkuc2xpY2UoMCk7XHJcbiAgICAgICAgdmFyIG0gPSBhcnJheS5sZW5ndGgsIHQsIGk7XHJcbiAgICAgICAgd2hpbGUgKG0pIHtcclxuICAgICAgICAgICAgaSA9IE1hdGguZmxvb3IodGhpcy5ybmcoKSAqIG0tLSk7XHJcbiAgICAgICAgICAgIHQgPSBhcnJheVttXTtcclxuICAgICAgICAgICAgYXJyYXlbbV0gPSBhcnJheVtpXTtcclxuICAgICAgICAgICAgYXJyYXlbaV0gPSB0O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIGFycmF5O1xyXG4gICAgfVxyXG59IiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL0FJLnRzXCIgLz5cclxubW9kdWxlIEFJUnVsZXMge1xyXG4gICAgZXhwb3J0IHZhciBQaWNrU2hpbnkgPSBBSS5ydWxlcy5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJQaWNrIFNoaW5pZXNcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogQUlSdWxlcy5QUklPUklUWV9BQ1RJTkdfT05fUExBQ0UsXHJcbiAgICAgICAgY29uZGl0aW9ucyA6IChydW5uZXIgOiBSdWxlYm9va1J1bm5lcjxQZXJzb24+KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwZXJzb24gPSBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgcmV0dXJuIHBlcnNvbi5BSS5waWNrc1NoaW5pZXM7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb2RlIDogKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPFBlcnNvbj4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgcm9vbSA9IHBlcnNvbi5nZXRSb29tKCk7XHJcbiAgICAgICAgICAgIGxldCB2aXNpYmxlVGhpbmdzID0gcm9vbS5nZXRDb250YWluZWRBbmRWaXNpYmxlVG8ocGVyc29uKTtcclxuXHJcbiAgICAgICAgICAgIGlmICh2aXNpYmxlVGhpbmdzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdmlzaWJsZVRoaW5ncy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghdmlzaWJsZVRoaW5nc1tpXS5maXhlZEluUGxhY2UgJiYgdmlzaWJsZVRoaW5nc1tpXS5nZXRTaGlueSgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgQWN0aW9uVGFrZShwZXJzb24sIHZpc2libGVUaGluZ3NbaV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59IiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL0FJLnRzXCIgLz5cclxubW9kdWxlIEFJUnVsZXMge1xyXG4gICAgZXhwb3J0IHZhciBXYW5kZXIgPSBBSS5ydWxlcy5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJXYW5kZXJcIixcclxuICAgICAgICBmaXJzdFByaW9yaXR5IDogQUlSdWxlcy5QUklPUklUWV9BQ1RJTkdfT05fSURMRSxcclxuICAgICAgICBjb25kaXRpb25zIDogKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPFBlcnNvbj4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICByZXR1cm4gcGVyc29uLkFJLndhbmRlcmVyICYmIChNYXRoLnJhbmRvbSgpICogMTAwKSA+IHBlcnNvbi5BSS53YW5kZXJDaGFuY2U7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb2RlIDogKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPFBlcnNvbj4pID0+IHtcclxuICAgICAgICAgICAgbGV0IHBlcnNvbiA9IHJ1bm5lci5ub3VuO1xyXG4gICAgICAgICAgICBsZXQgcm9vbSA9IDxSb29tUmFuZG9tPiBwZXJzb24uZ2V0Um9vbSgpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHBlcnNvbi5BSS53YW5kZXJzT24gIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBzdGljayB0byByZWdpb24gd2hpbGUgd2FuZGVyaW5nXHJcbiAgICAgICAgICAgICAgICBpZiAocGVyc29uLkFJLndhbmRlcnNPbi5jb250YWluc1Jvb20ocm9vbSkpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBBbHJlZHkgaW4gcmVnaW9uLCBzbyBqdXN0IHdhbmRlciBvZmYgaW5zaWRlIGl0XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbm5lY3Rpb25zID0gcm9vbS5jb25uZWN0aW9ucy5zbGljZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZWFsQ29ubmVjdGlvbnMgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbm5lY3Rpb25zLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25uZWN0aW9uc1tpXSAhPSB1bmRlZmluZWQgJiYgcGVyc29uLkFJLndhbmRlcnNPbi5jb250YWluc1Jvb20oY29ubmVjdGlvbnNbaV0pKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFsQ29ubmVjdGlvbnMucHVzaChpKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlyZWN0aW9uID0gKChuZXcgU2h1ZmZsZXIocmVhbENvbm5lY3Rpb25zKSkuZ2V0T25lKCkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgQWN0aW9uR28ocGVyc29uLCBkaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyByZXR1cm4gdG8gcmVnaW9uXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlZ2lvblJvb21zID0gcGVyc29uLkFJLndhbmRlcnNPbi5nZXRSb29tcygpLmZpbHRlcigoYSA6IFJvb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGEgaW5zdGFuY2VvZiBSb29tUmFuZG9tICYmIGEucGxhY2VkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIElkZWFsbHkgd2UnZCBhY3R1YWxseSBtYWtlIGEgcGF0aCB0byBpdCBhbmQgY2hlY2sgdGhlIGRpc3RhbmNlLCBzaW5jZSBtYXplcyBjYW4gbWFrZSBpdCBiZSBsb25nZXIgdGhhbiBpdCByZWFsbHkgaXNcclxuICAgICAgICAgICAgICAgICAgICAvLyBCdXQgdGhpcyBpcyBxdWljayBhbmQgZGlydHkgZW5vdWdoLiBBbmQgc2luY2UgcmVnaW9ucyBhcmUgY2xvc2VseSBwYWNrZWQsIGV2ZW4gaWYgdGhpcyBpcyBub3QgcmVhbGx5IHRoZSBjbG9zZXN0IHJvb20sIHRoZSBOUEMgd2lsbCBlbmQgdXBcclxuICAgICAgICAgICAgICAgICAgICAvLyBlbnRlcmluZyB0aGUgcmVnaW9uIGVhcmxpZXIgYnkgYWNjaWRlbnQuXHJcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uUm9vbXMuc29ydCgoYSA6IFJvb21SYW5kb20sIGIgOiBSb29tUmFuZG9tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkaXN0ID0gYS5nZXREaXN0YW5jZVRvKGIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGlzdCAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtZGlzdDsgLy8gVGhpcyBtZWFucyB0aGF0IHRoZSBsYXRlc3QgZWxlbWVudCB3aWxsIGJlIHRoZSBjbG9zZXN0LlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7IC8vIFRoaXMgbWVhbnMgdGhhdCB0aGUgZmlyc3QgZWxlbWVudHMgd2lsbCBiZSB1bnJlYWNoYWJsZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGxldCB0YXJnZXRSb29tID0gcmVnaW9uUm9vbXMucG9wKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBBY3Rpb25HbyhwZXJzb24sIHRhcmdldFJvb20pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8ganVzdCB3YW5kZXIgaW4gcmFuZG9tIGRpcmVjdGlvblxyXG4gICAgICAgICAgICAgICAgbGV0IGRpcmVjdGlvbiA9IHJvb20uZ2V0Q29ubmVjdGVkRGlyZWN0aW9uKCk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEFjdGlvbkdvKHBlcnNvbiwgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59IiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4uL0FjdGlvbi50c1wiIC8+XHJcbi8vLyA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gICAgIGxldCBwbGF5ZXIgPSBXb3JsZFN0YXRlLnBsYXllcjtcclxuICAgICAgICAgICAgbGV0IHdpZWxkZWQgPSBUaGluZy5XaWVsZFJlbGF0aW9uLmdldFJpZ2h0KHBsYXllcikuc29ydChFbGVtZW50cy5JbnZlbnRvcnlIYW5kbGVyLnRoaW5nU29ydCk7XHJcbiAgICAgICAgICAgIGxldCB3b3JuID0gVGhpbmcuV2VhclJlbGF0aW9uLmdldFJpZ2h0KHBsYXllcikuc29ydChFbGVtZW50cy5JbnZlbnRvcnlIYW5kbGVyLnRoaW5nU29ydCk7XHJcbiAgICAgICAgICAgIGxldCBjYXJyaWVkID0gVGhpbmcuQ2FycnlSZWxhdGlvbi5nZXRSaWdodChwbGF5ZXIpLnNvcnQoRWxlbWVudHMuSW52ZW50b3J5SGFuZGxlci50aGluZ1NvcnQpO1xyXG5cclxuICAgICAgICAgICAgbGV0IGJ1dHRvbnM7XHJcbiAgICAgICAgICAgIGxldCBjaG9zZW5Qcm9taXNlID0gbmV3IFByb21pc2UoKGFzeW5jIHJlc29sdmUgPT4ge1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5yZXNldCgpO1xyXG4gICAgICAgICAgICAgICAgbGV0IHNheSA9IG5ldyBTYXkoKTtcclxuICAgICAgICAgICAgICAgIGlmICh3aWVsZGVkLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKG5ldyBTYXlCb2xkKFwiV2llbGRlZDpcIiksIFNheS5MSU5FX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHdpZWxkZWQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChhd2FpdCBBY3Rpb25JbnZlbnRvcnkuY3JlYXRlQnV0dG9uKHdpZWxkZWRbaV0sIHJlc29sdmUpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKHdvcm4ubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzYXkuc2VxdWVuY2UubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKFNheS5QQVJBR1JBUEhfQlJFQUspO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKG5ldyBTYXlCb2xkKFwiV29ybjpcIiksIFNheS5MSU5FX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHdvcm4ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChhd2FpdCBBY3Rpb25JbnZlbnRvcnkuY3JlYXRlQnV0dG9uKHdvcm5baV0sIHJlc29sdmUpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKGNhcnJpZWQubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzYXkuc2VxdWVuY2UubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKFNheS5QQVJBR1JBUEhfQlJFQUspO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzYXkuYWRkKG5ldyBTYXlCb2xkKFwiQ2FycmllZDpcIiksIFNheS5MSU5FX0JSRUFLKTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNhcnJpZWQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2F5LmFkZChhd2FpdCBBY3Rpb25JbnZlbnRvcnkuY3JlYXRlQnV0dG9uKGNhcnJpZWRbaV0sIHJlc29sdmUpKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKHNheS5zZXF1ZW5jZS5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKHVuZGVmaW5lZCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgYnV0dG9ucyA9IGF3YWl0IHNheS5nZXRIVE1MQ29udGVudCgpO1xyXG4gICAgICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50KC4uLihidXR0b25zKSk7XHJcbiAgICAgICAgICAgIH0pKTtcclxuXHJcbiAgICAgICAgICAgIGxldCBjaG9zZW5UaGluZyA9IGF3YWl0IGNob3NlblByb21pc2U7XHJcbiAgICAgICAgICAgIGlmIChjaG9zZW5UaGluZyAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci51bnByaW50KC4uLmJ1dHRvbnMpO1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5yZXNldCgpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBBY3Rpb25FeGFtaW5lKFdvcmxkU3RhdGUucGxheWVyLCBjaG9zZW5UaGluZyk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBydWxlYm9vay5ub3VuLnNheS5hZGQoXCJZb3UgaGF2ZSBub3RoaW5nLlwiKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59XHJcblxyXG5FbGVtZW50cy5IeXBlcmxpbmtIYW5kbGVyLkNvbW1vbkFjdGlvbnNSdWxlYm9vay5hZGRSdWxlKG5ldyB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IHJldHVybiB0aGlzLm5vdW5zO1xyXG4gICAgfVxyXG5cdFxyXG5cdHB1YmxpYyByZXBsYWNlTm91bnMgKC4uLm5vdW5zIDogQXJyYXk8YW55Pikge1xyXG5cdFx0dGhpcy5ub3VucyA9IG5vdW5zO1xyXG5cdFx0cmV0dXJuIHRoaXM7XHJcblx0fVxyXG5cclxuICAgIHB1YmxpYyBpc01hdGNoIChjZCA6IENvbnRlbnREaWZmZXJlbnRpYWwsIGFsbG93UGFydGlhbCA9IGZhbHNlKSB7XHJcbiAgICAgICAgbGV0IGNoZWNrID0gdGhpcy5nZXRVbm1hdGNoZWQoY2QpO1xyXG4gICAgICAgIGlmICgoYWxsb3dQYXJ0aWFsIHx8IGNoZWNrLnVubWF0Y2hlZC5sZW5ndGggPT0gMCkgJiYgY2hlY2subWF0Y2hpbmcubGVuZ3RoID09IDApIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfSBlbHNlIGlmIChjaGVjay5tYXRjaGluZy5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNoZWNrLnVubWF0Y2hlZC5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgaWYgKCEoY2hlY2sudW5tYXRjaGVkW2ldIGluc3RhbmNlb2YgQ29udGVudE1hcmtlcikpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgoPENvbnRlbnRNYXJrZXI+IGNoZWNrLnVubWF0Y2hlZFtpXSkuaXNJbXBvcnRhbnQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFVubWF0Y2hlZCAoY2QgOiBDb250ZW50RGlmZmVyZW50aWFsKSA6IENvbnRlbnREaWZmZXJlbnRpYWxDb21wYXJpc29uUmVzdWx0IHtcclxuICAgICAgICBsZXQgdW5tYXRjaGVkID0gY2Qubm91bnMuc2xpY2UoKTtcclxuICAgICAgICBsZXQgbWF0Y2hpbmcgPSB0aGlzLm5vdW5zLnNsaWNlKCk7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IG1hdGNoaW5nLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGsgPSB1bm1hdGNoZWQubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChDb250ZW50RGlmZmVyZW50aWFsLmNvbXBhcmVOb3VucyhtYXRjaGluZ1tpXSwgdW5tYXRjaGVkW2tdKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHVubWF0Y2hlZC5zcGxpY2UoaywgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hpbmcuc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIG1hdGNoaW5nIDogbWF0Y2hpbmcsXHJcbiAgICAgICAgICAgIHVubWF0Y2hlZCA6IHVubWF0Y2hlZFxyXG4gICAgICAgIH07XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNjb3JlICgpIHtcclxuICAgICAgICBsZXQgaGlnaGVzdCA9IDA7XHJcbiAgICAgICAgbGV0IGNvdW50ID0gdGhpcy5ub3Vucy5sZW5ndGg7XHJcblxyXG4gICAgICAgIHRoaXMubm91bnMuZm9yRWFjaCgobm91bikgPT4ge1xyXG4gICAgICAgICAgICBsZXQgbGV2ZWwgPSBDb250ZW50RGlmZmVyZW50aWFsLmdldE5vdW5MZXZlbChub3VuKTtcclxuICAgICAgICAgICAgaWYgKGhpZ2hlc3QgPCBsZXZlbCkge1xyXG4gICAgICAgICAgICAgICAgaGlnaGVzdCA9IGxldmVsO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJldHVybiBoaWdoZXN0ICsgKGNvdW50IC8gMTAwKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGdldE5vdW5MZXZlbCAobm91biA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nIHwgQ29udGVudERpZmZlcmVudGlhbCB8IENvbnRlbnRNYXJrZXIpIHtcclxuICAgICAgICBpZiAobm91biA9PSB1bmRlZmluZWQgfHwgbm91biA9PSBudWxsKSB7XHJcbiAgICAgICAgICAgIHJldHVybiAwO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIG5vdW4gPT0gXCJmdW5jdGlvblwiKSB7XHJcbiAgICAgICAgICAgIGlmICg8YW55Pm5vdW4ucHJvdG90eXBlIGluc3RhbmNlb2YgVGhpbmcpIHtcclxuICAgICAgICAgICAgICAgIGxldCBzcGVjaWZpdHkgPSAyOyAvLyBWYWd1ZSBUaGluZ1xyXG4gICAgICAgICAgICAgICAgbGV0IHBhcmVudENsYXNzID0gT2JqZWN0LmdldFByb3RvdHlwZU9mKG5vdW4pO1xyXG4gICAgICAgICAgICAgICAgd2hpbGUgKHBhcmVudENsYXNzICE9IFRoaW5nKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc3BlY2lmaXR5ICs9IDAuMTtcclxuICAgICAgICAgICAgICAgICAgICBwYXJlbnRDbGFzcyA9IE9iamVjdC5nZXRQcm90b3R5cGVPZihwYXJlbnRDbGFzcyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gc3BlY2lmaXR5O1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIDIuNTsgLy8gSXQncyBub3QgYSBcIlRoaW5nXCIsIHNvIGl0J3MgcHJvYmFibHkgYSB3ZWlyZCBjbGFzcywgd2hpY2ggaXMga2luZCBvZiBzcGVjaWZpY1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBlbHNlIGlmIChub3VuIGluc3RhbmNlb2YgVGhpbmcpIHtcclxuICAgICAgICAgICAgcmV0dXJuIDQ7IC8vIFNwZWNpZmljIHRoaW5nXHJcbiAgICAgICAgfSBlbHNlIGlmIChub3VuIGluc3RhbmNlb2YgQ29udGVudERpZmZlcmVudGlhbCkge1xyXG4gICAgICAgICAgICByZXR1cm4gMTsgLy8gTWlub3IgdGhpbmdcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXR1cm4gMC41O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGNvbXBhcmVOb3VucyAoYSA6IFRoaW5nIHwgdHlwZW9mIFRoaW5nIHwgQ29udGVudERpZmZlcmVudGlhbCB8IENvbnRlbnRNYXJrZXIsIGIgOiBUaGluZyB8IHR5cGVvZiBUaGluZyB8IENvbnRlbnREaWZmZXJlbnRpYWwgfCBDb250ZW50TWFya2VyKSB7XHJcbiAgICAgICAgaWYgKGEgPT0gdW5kZWZpbmVkIHx8IGEgPT0gbnVsbCkge1xyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKHR5cGVvZiBhID09IFwiZnVuY3Rpb25cIikge1xyXG4gICAgICAgICAgICAvLyBiIG11c3QgaW5oZXJpdCBhIG9yIGJlIGFcclxuICAgICAgICAgICAgcmV0dXJuIGIgPT0gYSB8fCBiIGluc3RhbmNlb2YgYSB8fCAodHlwZW9mIGIgPT0gXCJmdW5jdGlvblwiICYmICg8YW55PmIpLnByb3RvdHlwZSBpbnN0YW5jZW9mIGEpXHJcbiAgICAgICAgfSBlbHNlIGlmIChhIGluc3RhbmNlb2YgVGhpbmcpIHtcclxuICAgICAgICAgICAgLy8gYiBtdXN0IGJlIGFcclxuICAgICAgICAgICAgcmV0dXJuIGIgPT0gYTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGEgPT09IGI7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBpc01hdGNoIChtYXRjaEZyb20gOiBBcnJheTxDb250ZW50RGlmZmVyZW50aWFsPiwgbWF0Y2hBZ2FpbnN0IDogQXJyYXk8Q29udGVudERpZmZlcmVudGlhbD4pIHtcclxuICAgICAgICBsZXQgdW5tYXRjaGVkID0gbWF0Y2hBZ2FpbnN0LnNsaWNlKCk7XHJcbiAgICAgICAgbGV0IG1hdGNoaW5nID0gbWF0Y2hGcm9tLnNsaWNlKCk7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IG1hdGNoaW5nLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGsgPSB1bm1hdGNoZWQubGVuZ3RoIC0gMTsgayA+PSAwOyBrLS0pIHtcclxuICAgICAgICAgICAgICAgIGlmIChtYXRjaGluZ1tpXS5pc01hdGNoKHVubWF0Y2hlZFtrXSkpIHtcclxuICAgICAgICAgICAgICAgICAgICB1bm1hdGNoZWQuc3BsaWNlKGssIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hdGNoaW5nLnNwbGljZShpLCAxKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAodW5tYXRjaGVkLmxlbmd0aCA9PSAwICYmIG1hdGNoaW5nLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH0gZWxzZSBpZiAodW5tYXRjaGVkLmxlbmd0aCA9PSAwKSB7XHJcbiAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoZSBvbmx5IHRoaW5nIG1pc3NpbmcgYXJlIHVuaW1wb3J0YW50IENvbnRlbnRNYXJrZXJzXHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbWF0Y2hpbmcubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBub3VucyA9IG1hdGNoaW5nW2ldLmdldE5vdW5zKCk7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBrID0gMDsgayA8IG5vdW5zLmxlbmd0aDsgaysrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEobm91bnNba10gaW5zdGFuY2VvZiBDb250ZW50TWFya2VyKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCg8Q29udGVudE1hcmtlcj4gbm91bnNba10pLmlzSW1wb3J0YW50KCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAvLyBOb3RoaW5nIGltcG9ydGFudCBmb3VuZFxyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgfVxyXG59IiwiZW51bSBDb250ZW50R3JvdXBNYXRjaCB7XG4gICAgTk9fTUFUQ0gsXG4gICAgUEFSVElBTF9NQVRDSCxcbiAgICBQRVJGRUNUX01BVENIXG59XG5cbmludGVyZmFjZSBDb250ZW50R3JvdXBNYXRjaFJlc3VsdCB7XG4gICAgdHlwZSA6IENvbnRlbnRHcm91cE1hdGNoO1xuICAgIHVubWF0Y2hlZCA6IEFycmF5PENvbnRlbnRVbml0Pjtcbn1cblxuY2xhc3MgQ29udGVudEdyb3VwIHtcbiAgICBwcml2YXRlIHVuaXRzIDogQXJyYXk8Q29udGVudFVuaXQ+ID0gW107XG4gICAgcHJpdmF0ZSBtYXRjaGluZyA6IEFycmF5PENvbnRlbnRVbml0PjtcblxuICAgIGNvbnN0cnVjdG9yICguLi51bml0cyA6IEFycmF5PENvbnRlbnRVbml0Pikge1xuICAgICAgICB1bml0cy5mb3JFYWNoKHVuaXQgPT4ge1xuICAgICAgICAgICAgdGhpcy5hZGRVbml0KHVuaXQpO1xuICAgICAgICB9KVxuICAgIH1cblxuICAgIHB1YmxpYyBhZGRVbml0ICh1bml0IDogQ29udGVudFVuaXQpIHtcbiAgICAgICAgdGhpcy51bml0cy5wdXNoKHVuaXQpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBwdWJsaWMgcmVzZXQgKCkge1xuICAgICAgICB0aGlzLm1hdGNoaW5nID0gdGhpcy51bml0cy5zbGljZSgpO1xuICAgIH1cblx0XG5cdHB1YmxpYyBpc01hdGNoaW5nICgpIHtcblx0XHRyZXR1cm4gdGhpcy5tYXRjaGluZy5sZW5ndGg7XG5cdH1cblxuICAgIHB1YmxpYyBzZXRNYXRjaGluZyAobWF0Y2hpbmcgOiBBcnJheTxDb250ZW50VW5pdD4pIHtcbiAgICAgICAgdGhpcy5tYXRjaGluZyA9IG1hdGNoaW5nO1xuICAgIH1cblxuICAgIHB1YmxpYyBpc01hdGNoIChjZyA6IENvbnRlbnRHcm91cCkgOiBDb250ZW50R3JvdXBNYXRjaFJlc3VsdCB7XG4gICAgICAgIGxldCB1bm1hdGNoZWQgPSBjZy5tYXRjaGluZy5zbGljZSgpO1xuICAgICAgICBsZXQgbWF0Y2hpbmcgPSB0aGlzLnVuaXRzLnNsaWNlKCk7XG5cbiAgICAgICAgZm9yIChsZXQgaSA9IG1hdGNoaW5nLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBrID0gdW5tYXRjaGVkLmxlbmd0aCAtIDE7IGsgPj0gMDsgay0tKSB7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoaW5nW2ldLmlzTWF0Y2godW5tYXRjaGVkW2tdKSkge1xuICAgICAgICAgICAgICAgICAgICB1bm1hdGNoZWQuc3BsaWNlKGssIDEpO1xuICAgICAgICAgICAgICAgICAgICBtYXRjaGluZy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0eXBlIDogbWF0Y2hpbmcubGVuZ3RoID4gMCA/IENvbnRlbnRHcm91cE1hdGNoLk5PX01BVENIIDpcbiAgICAgICAgICAgICAgICAgICAgdW5tYXRjaGVkLmxlbmd0aCA9PSAwID8gQ29udGVudEdyb3VwTWF0Y2guUEVSRkVDVF9NQVRDSCA6XG4gICAgICAgICAgICAgICAgICAgICAgICBDb250ZW50R3JvdXBNYXRjaC5QQVJUSUFMX01BVENILFxuICAgICAgICAgICAgdW5tYXRjaGVkIDogdW5tYXRjaGVkXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0U2NvcmUgKCkge1xuICAgICAgICBsZXQgc2NvcmUgPSAwO1xuICAgICAgICB0aGlzLnVuaXRzLmZvckVhY2godW5pdCA9PiB7XG4gICAgICAgICAgICBzY29yZSArPSB1bml0LmdldFNjb3JlKCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBzY29yZTtcbiAgICB9XG5cbiAgICBwdWJsaWMgbWF0Y2hBZ2FpbnN0IChhIDogQXJyYXk8Q29udGVudEdyb3VwPikgOiBBcnJheTxudW1iZXI+IHtcbiAgICAgICAgbGV0IG1hdGNoZXMgPSBbXTtcbiAgICAgICAgdGhpcy5yZXNldCgpO1xuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGxldCBtYXRjaCA9IGFbaV0uaXNNYXRjaCh0aGlzKTtcbiAgICAgICAgICAgIGlmIChtYXRjaC50eXBlICE9IENvbnRlbnRHcm91cE1hdGNoLk5PX01BVENIKSB7XG4gICAgICAgICAgICAgICAgbWF0Y2hlcy5wdXNoKGkpO1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0TWF0Y2hpbmcobWF0Y2gudW5tYXRjaGVkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghdGhpcy5pc01hdGNoaW5nKCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hlcztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH1cbn0iLCJjbGFzcyBDb250ZW50TWFya2VyIHtcclxuICAgIHB1YmxpYyBuYW1lIDogc3RyaW5nO1xyXG4gICAgcHJpdmF0ZSByZWFkb25seSBpbXBvcnRhbnQgOiBib29sZWFuID0gZmFsc2U7XHJcblxyXG4gICAgY29uc3RydWN0b3IgKG5hbWUgOiBzdHJpbmcsIGltcG9ydGFudD8gOiBib29sZWFuKSB7XHJcbiAgICAgICAgdGhpcy5uYW1lID0gbmFtZTtcclxuICAgICAgICB0aGlzLmltcG9ydGFudCA9IGltcG9ydGFudCA9PSB0cnVlO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBpc0ltcG9ydGFudCAoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuaW1wb3J0YW50O1xyXG4gICAgfVxyXG59IiwiLy8vIDxyZWZlcmVuY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IiArIG5vZGUudHlwZSArIFwiXSBcIiArIG5vZGUuaWQpO1xyXG4gICAgICAgIFJ1bGVib29rLmluY3JlYXNlSW5kZW50YXRpb24obm9kZSk7XHJcbiAgICAgICAgbGV0IGRvQ2hvaWNlcyA9IG5vZGUuaGFzQ2hvaWNlcygpO1xyXG5cclxuICAgICAgICBpZiAobm9kZS50eXBlID09IE5vZGVUeXBlLlRyZWUpIHtcclxuICAgICAgICAgICAgYXdhaXQgKDxEaWFsb2d1ZU5vZGVUcmVlPiBub2RlKS50cmVlKCkuZXhlY3V0ZSgpO1xyXG4gICAgICAgIH0gZWxzZSBpZiAobm9kZS50eXBlID09IE5vZGVUeXBlLlRleHQpIHtcclxuICAgICAgICAgICAgbGV0IHNheSA9ICg8RGlhbG9ndWVUZXh0PiBub2RlKS5nZXRTYXkoKTtcclxuICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50QXNDb250ZW50KHNheSk7XHJcbiAgICAgICAgfSBlbHNlIGlmIChub2RlLnR5cGUgPT0gTm9kZVR5cGUuU2V0KSB7XHJcbiAgICAgICAgICAgIGxldCBydW5uaW5nU2V0ID0gKDxEaWFsb2d1ZVNldD4gbm9kZSkucnVuKCk7XHJcbiAgICAgICAgICAgIGlmIChydW5uaW5nU2V0IGluc3RhbmNlb2YgUHJvbWlzZSkge1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgcnVubmluZ1NldDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKGRvQ2hvaWNlcykge1xyXG4gICAgICAgICAgICAvLyBOZXh0IG5vZGUgaXMgZGVjaWRlZCBieSB0aGUgY2hvaWNlc1xyXG4gICAgICAgICAgICBsZXQgYnJhbmNoaW5nRGlhbG9ndWUgPSBuZXcgQnJhbmNoaW5nRGlhbG9ndWUoKTtcclxuICAgICAgICAgICAgbGV0IGNob2ljZXMgPSBub2RlLmNob2ljZXM7XHJcbiAgICAg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dXJuSGFuZGxlci5nZXRTYXlFbGVtZW50c0FzQ29udGVudChzYXkpO1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50KC4uLnRoaXMubGFzdFByaW50ZWRDaG9pY2UpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBjb25zb2xlLmRlYnVnKFJ1bGVib29rLmdldEluZGVudGF0aW9uKCkgKyBcIltDaG9pY2VdIFBpY2tlZCBcIiArIGNob3Nlbk5vZGVJZCk7XHJcbiAgICAgICAgICAgIGNvbnNvbGUuZGVidWcoUnVsZWJvb2suZ2V0SW5kZW50YXRpb24oKSArIFwiW0Nob2ljZV0gR29pbmcgdG8gXCIgKyBjaG9zZW5Ob2RlLmdldE5leHQoKSk7XHJcbiAgICAgICAgICAgIFJ1bGVib29rLmluY3JlYXNlSW5kZW50YXRpb24oY2hvc2VuTm9kZUlkKTtcclxuICAgICAgICAgICAgUnVsZWJvb2suZGVjcmVhc2VJbmRlbnRhdGlvbigpO1xyXG5cclxuICAgICAgICAgICAgUnVsZWJvb2suZGVjcmVhc2VJbmRlbnRhdGlvbigpO1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5nZXROZXh0KGNob3Nlbk5vZGUpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIFJ1bGVib29rLmRlY3JlYXNlSW5kZW50YXRpb24oKTtcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0TmV4dChub2RlKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHVucHJpbnRMYXN0Q2hvaWNlICgpIHtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIudW5wcmludCguLi50aGlzLmxhc3RQcmludGVkQ2hvaWNlKTtcclxuICAgIH1cclxufSIsIm1vZHVsZSBEaWFsb2d1ZVRyZWVzIHtcclxuICAgIC8vIG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1xyXG5cclxuICAgICAgICB2YXIgbiA9IDAsXHJcbiAgICAgICAgICAgIHBvcyA9IDAsXHJcbiAgICAgICAgICAgIHN0ZXAgPSBhbGxvd092ZXJsYXBwaW5nID8gMSA6IHN1YlN0cmluZy5sZW5ndGg7XHJcblxyXG4gICAgICAgIHdoaWxlICh0cnVlKSB7XHJcbiAgICAgICAgICAgIHBvcyA9IHN0cmluZy5pbmRleE9mKHN1YlN0cmluZywgcG9zKTtcclxuICAgICAgICAgICAgaWYgKHBvcyA+PSAwKSB7XHJcbiAgICAgICAgICAgICAgICArK247XHJcbiAgICAgICAgICAgICAgICBwb3MgKz0gc3RlcDtcclxuICAgICAgICAgICAgfSBlbHNlIGJyZWFrO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gbjtcclxuICAgIH1cclxufSIsIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuLi9Sb29tLnRzXCIgLz5cclxuaW50ZXJmYWNlIFRyaWNraWVyT3B0aW9ucyB7XHJcbiAgICByZWdpb24gOiBSZWdpb25SYW5kb207XHJcbiAgICBtYXAgOiBSb29tUmFuZG9tTWFwO1xyXG4gICAgb3RoZXJSb29tIDogUm9vbVJhbmRvbTtcclxufVxyXG5cclxuaW50ZXJmYWNlIFRyaWNreU9wdGlvbnMgZXh0ZW5kcyBUcmlja2llck9wdGlvbnMge1xyXG4gICAgb3RoZXJSb29tRGlyZWN0aW9uIDogbnVtYmVyO1xyXG4gICAgdHJpY2t5Um9vbURpcmVjdGlvbiA6IG51bWJlcjtcclxuICAgIHggOiBudW1iZXI7XHJcbiAgICB5IDogbnVtYmVyO1xyXG59XHJcblxyXG5pbnRlcmZhY2UgUm9vbVJhbmRvbU5vZGUge1xyXG4gICAgcm9vbSA6IFJvb21SYW5kb207XHJcbiAgICBjb29yZGluYXRlcyA6IEFycmF5PG51bWJlcj47XHJcbiAgICBkaXN0YW5jZSA6IG51bWJlcjtcclxufVxyXG5cclxuY2xhc3MgUm9vbVJhbmRv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VudC5zdHlsZVNoZWV0cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgdmFyIHJ1bGVzID0gZG9jdW1lbnQuc3R5bGVTaGVldHNbaV1bJ3J1bGVzJ10gfHwgZG9jdW1lbnQuc3R5bGVTaGVldHNbaV1bJ2Nzc1J1bGVzJ107XHJcbiAgICAgICAgICAgICAgICBmb3IgKHZhciB4IGluIHJ1bGVzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBydWxlc1t4XS5zZWxlY3RvclRleHQgPT0gJ3N0cmluZycgJiYgcnVsZXNbeF0uc2VsZWN0b3JUZXh0ID09IFwiLlwiICsgdGhpcy5iYWNrZ3JvdW5kSW1hZ2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUud2FybihcIlVuYWJsZSB0byByZWFkIGltYWdlXCIpO1xyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzQ29ubmVjdGFibGVPbiAob3Bwb3NpdGVEaXJlY3Rpb24gOiBudW1iZXIpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5jb25uZWN0YWJsZU9uLmluZGV4T2Yob3Bwb3NpdGVEaXJlY3Rpb24pICE9IC0xO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyB0cmlja3lDb2RlIDogKG9wdGlvbnMgOiBUcmlja3lPcHRpb25zKSA9PiBib29sZWFuO1xyXG5cclxuICAgIHB1YmxpYyBnZXRBbnlEaXJlY3Rpb24gKG9wdGlvbnMgOiBUcmlja2llck9wdGlvbnMpIDogVH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XHJcbiAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICBpZiAodGhpcy5pc1BsYWNlYWJsZSh0cmlja3lPcHRpb25zKSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRyaWNreU9wdGlvbnM7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGlzUGxhY2VhYmxlIChvcHRpb25zIDogVHJpY2t5T3B0aW9ucykge1xyXG4gICAgICAgIGlmICghdGhpcy5pc0Nvbm5lY3RhYmxlT24ob3B0aW9ucy50cmlja3lSb29tRGlyZWN0aW9uKSB8fCAhb3B0aW9ucy5tYXAuaXNGcmVlKG9wdGlvbnMueCwgb3B0aW9ucy55KSkge1xyXG4gICAgICAgICAgICAvLyBUaGlzIGNhbid0IGNvbm5lY3QgdGhyb3VnaCB0aGF0IVxyXG4gICAgICAgICAgICAvLyBUaGF0IGNvb3JkaW5hdGUgaXNuJ3QgZnJlZSFcclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKG9wdGlvbnMub3RoZXJSb29tID09IHVuZGVmaW5lZCB8fCAhb3B0aW9ucy5vdGhlclJvb20uaXNDb25uZWN0YWJsZU9uKG9wdGlvbnMub3RoZXJSb29tRGlyZWN0aW9uKSkge1xyXG4gICAgICAgICAgICAvLyBUaGVyZSBpcyBubyBvdGhlciByb29tIHRoZXJlP1xyXG4gICAgICAgICAgICAvLyBUaGUgb3RoZXIgcm9vbSBkb2Vzbid0IGxpa2UgaXQgdGhpcyB3YXlcclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gRG8gSSBoYXZlIG15IG93biB0cmlja3kgY29kZT9cclxuICAgICAgICBpZiAodGhpcy50cmlja3lDb2RlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gdGh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vc2l0aW9uLCBkaXJDb29yZGluYXRlcyldO1xyXG4gICAgICAgICAgICAgICAgICAgIG5laWdocy5wdXNoKGRpcik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIG5laWdocy5zb3J0KChhLGIpID0+IHsgcmV0dXJuICg8bnVtYmVyPiBhWzJdKSAtICg8bnVtYmVyPiBiWzJdKTt9KTtcclxuICAgICAgICB9O1xyXG5cclxuXHJcbiAgICAgICAgbGV0IHNob3J0ZXN0UGF0aCA9IHtcclxuICAgICAgICAgICAgbGVuZ3RoIDogbWFwLmdldFJvb21Db3VudCgpXHJcbiAgICAgICAgfTtcclxuICAgICAgICBsZXQgbm9QYXRoID0gc2hvcnRlc3RQYXRoO1xyXG4gICAgICAgIGxldCBjUGF0aCA9IFtdO1xyXG4gICAgICAgIGxldCBmaW5kUGF0aCA9IChteUFycmF5KSA9PiB7XHJcbiAgICAgICAgICAgIGxldCByb29tID0gbXlBcnJheVswXTtcclxuICAgICAgICAgICAgY1BhdGgucHVzaChteUFycmF5KTtcclxuICAgICAgICAgICAgaWYgKHJvb20gPT0gcGF0aEVuZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHNob3J0ZXN0UGF0aC5sZW5ndGggPj0gY1BhdGgubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2hvcnRlc3RQYXRoID0gY1BhdGguc2xpY2UoMCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc2hvcnRlc3RQYXRoLmxlbmd0aCA+IChjUGF0aC5sZW5ndGgpKSB7XHJcbiAgICAgICAgICAgICAgICBvcGVuLnB1c2gocm9vbSk7XHJcbiAgICAgICAgICAgICAgICBsZXQgb3RoZXJSb29tcyA9IG5laWdoYm9ycyhyb29tLCBteUFycmF5WzFdWzBdLCBteUFycmF5WzFdWzFdKTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgb3RoZXJSb29tcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1BhdGgubGVuZ3RoICsgMSkgPCBzaG9ydGVzdFBhdGgubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbmRQYXRoKG90aGVyUm9vbXNbaV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIG9wZW4ucG9wKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY1BhdGgucG9wKCk7XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgZmluZFBhdGgoW3RoaXMsIG1hcC5nZXRDb29yZGluYXRlcyh0aGlzKV0pO1xyXG4gICAgICAgIHJldHVybiBzaG9ydGVzdFBhdGggIT0gbm9QYXRoID8gc2hvcnRlc3RQYXRoIDogdW5kZWZpbmVkO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRCZXN0RGlyZWN0aW9uVG8gKG90aGVyUm9vbSA6IFJvb21SYW5kb20sIHZhbGlkUm9vbT8gOiAocm9vbSA6IFJvb21SYW5kb20pID0+IGJvb2xlYW4pIHtcclxuICAgICAgICBsZXQgcGF0aCA9IHRoaXMuZmluZFBhdGhUbyhvdGhlclJvb20sIHZhbGlkUm9vbSk7XHJcbiAgICAgICAgaWYgKHBhdGggIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgIGlmIChwYXRoLmxlbmd0aCA9PSAxKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbm5lY3Rpb25zLmluZGV4T2YocGF0aFsxXVswXSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRBU3RhclBhdGhU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oaWZ0KG5vZGUuY29vcmRpbmF0ZXMsIGRpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgbmVpZ2hib3JzLnB1c2goe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByb29tIDogPFJvb21SYW5kb20+IG5vZGUucm9vbS5jb25uZWN0aW9uc1tkaXJlY3Rpb25dLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA6IGNvb3JkaW5hdGVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkaXN0YW5jZSA6IGRpc3RhbmNlKGNvb3JkaW5hdGVzLCBlbmROb2RlLmNvb3JkaW5hdGVzKVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHZpc2l0ZWQucHVzaCg8Um9vbVJhbmRvbT4gbm9kZS5yb29tLmNvbm5lY3Rpb25zW2RpcmVjdGlvbl0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBuZWlnaGJvcnM7XHJcbiAgICAgICAgfTtcclxuXHJcbiAgICAgICAgbGV0IGdldENsb3Nlc3RQYXRoID0gKCkgPT4ge1xyXG4gICAgICAgICAgICBsZXQgc2hvcnRlc3QgPSAwO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMTsgaSA8IG9wZW4ubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgIGxldCBsYXN0UG9pbnQgPSBvcGVuW2ldW29wZW5baV0ubGVuZ3RoIC0gMV07XHJcbiAgICAgICAgICAgICAgICBpZiAobGFzdFBvaW50LmRpc3RhbmNlIDwgb3BlbltzaG9ydGVzdF1bb3BlbltzaG9ydGVzdF0ubGVuZ3RoIC0gMV0uZGlzdGFuY2UpIHtcclxuICAgICAgICAgICAgICAgICAgICBzaG9ydGVzdCA9IGk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1ccl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Y2UgPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHB1c2ggPSBjbG9zZWQucHVzaChteVBhdGgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKG15UGF0aC5sZW5ndGggPCBzaG9ydGVzdFBhdGgpIHtcclxuICAgICAgICAgICAgICAgICAgICBzaG9ydGVzdFBhdGggPSBteVBhdGgubGVuZ3RoO1xyXG4gICAgICAgICAgICAgICAgICAgIHNob3J0ZXN0SW5kZXggPSBwdXNoIC0gMTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIC8vIGxhenksIGZpcnN0IHBhdGggaXMgdmVyeSBsaWtlbHkgdG8gYmUgdGhlIGJlc3RcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgbGV0IG5laWdoYm9ycyA9IGdldE5laWdoYm9ycyhteVBhdGhbbXlQYXRoLmxlbmd0aCAtIDFdKTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbmVpZ2hib3JzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgb3Blbi5wdXNoKG15UGF0aC5jb25jYXQoW25laWdoYm9yc1tpXV0pKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gb3Blbi5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKG9wZW5baV0ubGVuZ3RoID49IHNob3J0ZXN0UGF0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIG9wZW4uc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNsb3Nlc3QgPSBnZXRDbG9zZXN0UGF0aCgpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcm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zICE9IHVuZGVmaW5lZDsgY29vcmRpbmF0ZXMgPSBkaXJlY3Rpb25BcnJheVsrK2tdKSB7XHJcbiAgICAgICAgICAgIGlmIChjb29yZGluYXRlcy54ID09IGNvb3JkaW5hdGVzVG9BZGQueCAmJiBjb29yZGluYXRlcy55ID09IGNvb3JkaW5hdGVzVG9BZGQueSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGRpcmVjdGlvbkFycmF5LnB1c2goY29vcmRpbmF0ZXNUb0FkZCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEFueUZyb21DYWNoZSAoZGlyZWN0aW9uIDogbnVtYmVyKSA6IFJvb21SYW5kb20ge1xyXG4gICAgICAgIGxldCBhcnJheSA9IHRoaXMuYXZhaWxhYmxlQ29ubmVjdGlvbnNbZGlyZWN0aW9uXTtcclxuICAgICAgICBpZiAoYXJyYXkubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICBsZXQgcmFuZG9tSW5kZXggPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiAoYXJyYXkubGVuZ3RoKSk7XHJcbiAgICAgICAgICAgIGxldCByYW5kb21Db29yZGluYXRlcyA9IGFycmF5W3JhbmRvbUluZGV4XTtcclxuICAgICAgICAgICAgaWYgKHJhbmRvbUNvb3JkaW5hdGVzICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0Um9vbShyYW5kb21Db29yZGluYXRlcy54LCByYW5kb21Db29yZGluYXRlcy55KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgaXNGcmVlICh4IDogbnVtYmVyLCB5IDogbnVtYmVyKSB7XHJcbiAgICAgICAgcmV0dXJuICh0aGlzLnBvc2l0aW9uVGFibGVbeF0gPT0gdW5kZWZpbmVkIHx8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jaGUoKTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVCYXNpY1JhbmRvbWl6ZVJlZ2lvbiA9IFJlZ2lvblJhbmRvbS5ydWxlYm9va1JhbmRvbWl6ZVJlZ2lvbi5jcmVhdGVBbmRBZGRSdWxlKHtcclxuICAgICAgICBuYW1lIDogXCJSYW5kb21pemUgYWxsIHVucGxhY2VkLCByYW5kb21pemFibGUgcm9vbXMgaW4gcmVnaW9uIHNvbWV0aGluZ1wiLFxyXG4gICAgICAgIGNvZGUgOiBhc3luYyBydW5uZXIgPT4ge1xyXG4gICAgICAgICAgICBsZXQgcmVnaW9uID0gPFJlZ2lvblJhbmRvbT4gcnVubmVyLm5vdW47XHJcblxyXG4gICAgICAgICAgICBsZXQgcm9vbVNodWZmbGVyID0gbmV3IFNodWZmbGVyKFxyXG4gICAgICAgICAgICAgICAgUmVnaW9uLkluUmVsYXRpb24uZ2V0QWxsUmlnaHRUeXBlcyhyZWdpb24sIFJvb21SYW5kb20pLmZpbHRlcigocm9vbSA6IFJvb21SYW5kb20pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcm9vbS5yYW5kb21pemFibGUgJiYgIXJvb20ucGxhY2VkICYmXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIChyb29tID09IFdvcmxkU3RhdGUucGxheWVyLmdldFJvb20oKSB8fCAoUmVnaW9uUmFuZG9tLnJuZygpICogMTAwKSA8PSByb29tLmFwcGVhckNoYW5jZSk7XHJcbiAgICAgICAgICAgICAgICB9KSwgUmVnaW9uUmFuZG9tLnJuZ1xyXG4gICAgICAgICAgICApO1xyXG5cclxuICAgICAgICAgICAgZm9yIChsZXQgcm9vbSA9IHJvb21TaHVmZmxlci5nZXRPbmUoKTsgcm9vbSAhPSB1bmRlZmluZWQ7IHJvb20gPSByb29tU2h1ZmZsZXIuZ2V0T25lKCkpIHtcclxuICAgICAgICAgICAgICAgIC8vIFByZ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6IG9wdGlvbnN9KTtcclxuICAgICAgICAgICAgICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tBZnRlclBsYWNlUm9vbS5leGVjdXRlKHtub3VuIDogb3B0aW9uc30pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGxldCBvcHRpb25zID0gPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHtcclxuICAgICAgICAgICAgICAgICAgICBtYXAgOiByZWdpb24ubWFwLFxyXG4gICAgICAgICAgICAgICAgICAgIHJvb20gOiByb29tLFxyXG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvbiA6IHJlZ2lvblxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIGF3YWl0IFJlZ2lvblJhbmRvbS5ydWxlYm9va0JlZm9yZVBsYWNlUm9vbS5leGVjdXRlKHtub3VuIDogb3B0aW9uc30pO1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgUmVnaW9uUmFuZG9tLnJ1bGVib29rUGxhY2VSb29tLmV4ZWN1dGUoe25vdW4gOiBvcHRpb25zfSk7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tBZnRlclBsYWNlUm9vbS5leGVjdXRlKHtub3VuIDogb3B0aW9uc30pO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICghcm9vbS5wbGFjZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnRBc0Vycm9yKG5ldyBTYXkoXCJXYXMgdW5hYmxlIHRvIHBsYWNlIHJvb20gXCIsIHJvb20sIFwiLiBHYW1lIG1pZ2h0IGJlIHVucGxheWFibGUuXCIpKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgcnVsZ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RvbS5ybmcoKSAqIDEwMCkgPD0gcm9vbS5leHRyYUNvbm5lY3Rpb25DaGFuY2U7IGRpcmVjdGlvbiA9IGRpcmVjdGlvblNodWZmbGVyLmdldE9uZSgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJvb20uY29ubmVjdGlvbnNbZGlyZWN0aW9uXSA9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG90aGVyQ29vcmRpbmF0ZXMgPSBSb29tLnNoaWZ0KG15Q29vcmRpbmF0ZXMsIGRpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvdGhlclJvb20gPSByZWdpb24ubWFwLmdldFJvb20ob3RoZXJDb29yZGluYXRlc1swXSwgb3RoZXJDb29yZGluYXRlc1sxXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvdGhlclJvb20gIT0gdW5kZWZpbmVkICYmIG90aGVyUm9vbS5yYW5kb21pemFibGVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICYmIG90aGVyUm9vbS5pc0Nvbm5lY3RhYmxlT24oT3Bwb3NpdGVEaXJlY3Rpb25bRGlyZWN0aW9uW2RpcmVjdGlvbl1dKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgKFJlZ2lvblJhbmRvbS5ybmcoKSAqIDEwMCkgPD0gb3RoZXJSb29tLmV4dHJhQ29ubmVjdGlvbkNoYW5jZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcm9vbS5tYXBSb29tKG90aGVyUm9vbSwgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBydWxlUGxhY2VGaXJzdFJvb20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AgaWYgKGNvbm5lY3RhYmxlUm9vbSAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgb3RoZXJDb29yZGluYXRlcyA9IHBsYWNpbmdPcHRpb25zLm1hcC5nZXRDb29yZGluYXRlcyhjb25uZWN0YWJsZVJvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBteUNvb3JkaW5hdGVzID0gUm9vbS5zaGlmdChvdGhlckNvb3JkaW5hdGVzLCBvcHBvc2l0ZURpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMucm9vbS5tYXBSb29tKGNvbm5lY3RhYmxlUm9vbSwgZGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICBwbGFjaW5nT3B0aW9ucy5tYXAubWFwKHBsYWNpbmdPcHRpb25zLnJvb20sIG15Q29vcmRpbmF0ZXNbMF0sIG15Q29vcmRpbmF0ZXNbMV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjb25kaXRpb25zIDogcnVubmVyID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIHJ1bm5lci5ub3VuLnJvb20udHJpY2t5Q29kZSA9PSB1bmRlZmluZWQ7XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBydWxlUGxhY2VUcmlja3lSb29tID0gUmVnaW9uUmFuZG9tLnJ1bGVib29rUGxhY2VSb29tLmNyZWF0ZUFuZEFkZFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIlBsYWNpbmcgdHJpY2t5IHJvb20gc29tZXRoaW5nXCIsXHJcbiAgICAgICAgY29kZSA6IHJ1bm5lciA9PiB7XHJcbiAgICAgICAgICAgIGxldCBwbGFjaW5nT3B0aW9ucyA9IDxSYW5kb21pemluZ1Jvb21PcHRpb25zPiBydW5uZXIubm91bjtcclxuICAgICAgICAgICAgbGV0IHBsYWNlZFJvb21zID0gPEFycmF5PFJvb21SYW5kb20+PiBwbGFjaW5nT3B0aW9ucy5yZWdpb24uZ2V0Um9vbXMoKS5maWx0ZXIoKHJvb20pID0+IHtcclxuICAgICAgICAgICAgICAgIHJldHVybiByb29tIGluc3RhbmNlb2YgUm9vbVJhbmRvbSAmJiByb29tLnBsYWNlZDtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICBpZiAocGxhY2VkUm9vbXMubGVuZ3RoID09IDApIHtcclxuICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludEFzRXJyb3IoXCJVbmFibGUgdG8gcGxhY2Ugcm9vbSBcIiArIHBsYWNpbmdPcHRpb25zLnJvb20uZ2V0UHJpbnRlZE5hbWUoKSArIFwiOiBUaGVyZSBhcmUgbm8gcm9vbXMgdG8gY29ubmVjdCB0byFcIik7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGxldCByb29tU2h1ZmZsZXIgPSBuZXcgU2h1ZmZsZXIocGxhY2VkUm9vbXMsIFJlZ2lvblJhbmRvbS5ybmcpO1xyXG4gICAgICAgICAgICBmb3IgKGxldCBjb25uZWN0YWJsZVJvb20gPSByb29tU2h1ZmZsZXIuZ2V0T25lKCk7IGNvbm5lY3RhYmxlUm9vbSAhPSB1bmRlZmluZWQ7IGNvbm5lY3RhYmxlUm9vbSA9IHJvb21TaHVmZmxlci5nZXRPbmUoKSkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHRyaWNraWVyID0gPFRyaWNraWVyT3B0aW9ucz4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvbiA6IHBsYWNpbmdPcHRpb25zLnJlZ2lvbixcclxuICAgICAgICAgICAgICAgICAgICBtYXAgOiBwbGFjaW5nT3B0aW9ucy5tYXAsXHJcbiAgICAgICAgICAgICAgICAgICAgb3RoZXJSb29tIDogY29ubmVjdGFibGVSb29tXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgbGV0IHRyaWNreSA9IHBsYWNpbmdPcHRpb25zLnJvb20uZ2V0QW55RGlyZWN0aW9uKHRyaWNraWVyKTtcclxuICAgICAgICAgICAgICAgIGlmICh0cmlja3kgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMucm9vbS5tYXBSb29tKGNvbm5lY3RhYmxlUm9vbSwgdHJpY2t5LnRyaWNreVJvb21EaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC5tYXAocGxhY2luZ09wdGlvbnMucm9vbSwgdHJpY2t5LngsIHRyaWNreS55KTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gVEhJUyBXT1JLU1xyXG4gICAgICAgICAgICAvLyBJIERPTidUIEtOT1cgV0hZXHJcbiAgICAgICAgICAgIC8vIEkgRE9OJ1QgQ0FSRSBXSFlcclxuICAgICAgICAgICAgLy8gTEVBVkVcclxuICAgICAgICAgICAgbGV0IGNvbm5lY3RhYmxlVGhyb3VnaEZvZGRlciA9IChmb2RkZXJTdGVwIDogbnVtYmVyLCBjb25uZWN0aW5nUm9vbSA6IFJvb21SYW5kb20pID0+IHtcclxuICAgICAgICAgICAgICAgIGxldCB0cmlja2llciA9IDxUcmlja2llck9wdGlvbnM+IHtcclxuICAgICAgICAgICAgICAgICAgICByZWdpb24gOiBwbGFjaW5nT3B0aW9ucy5yZWdpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgbWFwIDogcGxhY2luZ09wdGlvbnMubWFwLFxyXG4gICAgICAgICAgICAgICAgICAgIG90aGVyUm9vbSA6IGNvbm5lY3RpbmdSb29tXHJcbiAgICAgICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgICAgIGlmIChmb2RkZXJTdGVwID09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGxhY2luZ09wdGlvbnMucm9vbS5nZXRBbnlEaXJlY3Rpb24odHJpY2tpZXIpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbmV3Rm9kZGVyID0gbmV3IChwbGFjaW5nT3B0aW9ucy5yZWdpb24uZm9kZGVyUm9vbUNsYXNzKSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vbGV0IGRpcmVjdGlvblNodWZmbGVyID0gbmV3IFNodWZmbGVyPG51bWJlcj4obmV3Rm9kZGVyLmNvbm5lY3RhYmxlT24sIFJlZ2lvblJhbmRvbS5ybmcpO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBwcmVmZXJyZWRHcm93dGhEaXJlY3Rpb24gPSBwbGFjaW5nT3B0aW9ucy5tYXAuZ2V0UHJlZmVycmVkR3Jvd3RoKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRpcmVjdGlvblNodWZmbGVyID0gbmV3IFNodWZmbGVyRGlyZWN0aW9uKHBsYWNpbmdPcHRpb25zLnJvb20uY29ubmVjdGFibGVPbiwgcHJlZmVycmVkR3Jvd3RoRGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBkaXJlY3Rpb24gPSBkaXJlY3Rpb25TaHVmZmxlci5nZXREaXJlY3Rpb24oKTsgZGlyZWN0aW9uICE9IHVuZGVmaW5lZDsgZGlyZWN0aW9uID0gZGlyZWN0aW9uU2h1ZmZsZXIuZ2V0RGlyZWN0aW9uKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9wcG9zaXRlRGlyZWN0aW9uID0gT3Bwb3NpdGVEaXJlY3Rpb25bRGlyZWN0aW9uW2RpcmVjdGlvbl1dO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3RoZXJDb29yZGluYXRlcyA9IHBsYWNpbmdPcHRpb25zLm1hcC5nZXRDb29yZGluYXRlcyhjb25uZWN0aW5nUm9vbSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB3b3VsZGJlQ29vcmRpbmF0ZXMgPSBSb29tLnNoaWZ0KG90aGVyQ29vcmRpbmF0ZXMsIG9wcG9zaXRlRGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZvZGRlclRyaWNreSA9IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG90aGVyUm9vbSA6IGNvbm5lY3RpbmdSb29tLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3RoZXJSb29tRGlyZWN0aW9uIDogb3Bwb3NpdGVEaXJlY3Rpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmlja3lSb29tRGlyZWN0aW9uIDogZGlyZWN0aW9uLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwIDogcGxhY2luZ09wdGlvbnMubWFwLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVnaW9uIDogcGxhY2luZ09wdGlvbnMucmVnaW9uLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeCA6IHdvdWxkYmVDb29yZGluYXRlc1swXSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHkgOiB3b3VsZGJlQ29vcmRpbmF0ZXNbMV1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdGb2RkZXIuaXNQbGFjZWFibGUoZm9kZGVyVHJpY2t5KSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3Rm9kZGVyLm1hcFJvb20oY29ubmVjdGluZ1Jvb20sIGZvZGRlclRyaWNreS50cmlja3lSb29tRGlyZWN0aW9uKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC5tYXAobmV3Rm9kZGVyLCBmb2RkZXJUcmlja3kueCwgZm9kZGVyVHJpY2t5LnkpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXh0VHJpY2t5ID0gY29ubmVjdGFibGVUaHJvdWdoRm9kZGVyKGZvZGRlclN0ZXAgLSAxLCBuZXdGb2RkZXIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5leHRUcmlja3kgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2luZ09wdGlvbnMucmVnaW9uLnBsYWNlKG5ld0ZvZGRlcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5leHRUcmlja3k7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0ZvZGRlci51bm1hcFJvb20oZm9kZGVyVHJpY2t5LnRyaWNreVJvb21EaXJlY3Rpb24pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC51bm1hcChmb2RkZXJUcmlja3kueCwgZm9kZGVyVHJpY2t5LnkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgZm9yIChsZXQgZm9kZGVyTGV2ZWwgPSAxOyBmb2RkZXJMZXZlbCA8IDEwOyBmb2RkZXJMZXZlbCsrKSB7XHJcbiAgICAgICAgICAgICAgICByb29tU2h1ZmZsZXIucmVzdGFydCgpO1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgY29ubmVjdGFibGVSb29tID0gcm9vbVNodWZmbGVyLmdldE9uZSgpOyBjb25uZWN0YWJsZVJvb20gIT0gdW5kZWZpbmVkOyBjb25uZWN0YWJsZVJvb20gPSByb29tU2h1ZmZsZXIuZ2V0T25lKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgdHJpY2t5ID0gY29ubmVjdGFibGVUaHJvdWdoRm9kZGVyKGZvZGRlckxldmVsLCBjb25uZWN0YWJsZVJvb20pO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0cmlja3kgIT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLnJvb20ubWFwUm9vbSh0cmlja3kub3RoZXJSb29tLCB0cmlja3kudHJpY2t5Um9vbURpcmVjdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNpbmdPcHRpb25zLm1hcC5tYXAocGxhY2luZ09wdGlvbnMucm9vbSwgdHJpY2t5LngsIHRyaWNreS55KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnRBc0Vycm9yKFwiVW5hYmxlIHRvIHBsYWNlIHJvb20gXCIgKyBwbGFjaW5nT3B0aW9ucy5yb29tLmdldFByaW50ZWROYW1lKCkgKyBcIjogQWxsIGF0dGVtcHRzIGZhaWxlZFwiKTtcclxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59IiwiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIlN0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ybmcucHVzaCgyLCAxKTtcclxuICAgICAgICB9IGVsc2UgaWYgKHN0YXQgPj0gNykge1xyXG4gICAgICAgICAgICBybmcucHVzaCgxLCAxKTtcclxuICAgICAgICB9IGVsc2UgaWYgKHN0YXQgPj0gNCkge1xyXG4gICAgICAgICAgICBybmcucHVzaCgxKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgbGV0IHJlc3VsdHMgPSBbXTtcclxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHN0YXQ7IGkrKykge1xyXG4gICAgICAgICAgICBsZXQgaW5kZXggPSBNYXRoLmZsb29yKE1hdGgucmFuZG9tKCkgKiAocm5nLmxlbmd0aCkpO1xyXG4gICAgICAgICAgICByZXN1bHRzLnB1c2gocm5nW2luZGV4XSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBUT0RPOiBQcmludCB0aGUgZGljZSByZXN1bHRzIGlmIE1lbW9yeS5TaG93RGljZSA9IDFcclxuXHJcbiAgICAgICAgcmV0dXJuIHJlc3VsdHM7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHN0YXRpYyBzdW0gKGEsIGIpIHtcclxuICAgICAgICByZXR1cm4gYSArIGI7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFNheSAocmVzdWx0cyA6IEFycmF5PG51bWJlcj4pIDogU2F5IHtcclxuICAgICAgICBsZXQgZmluYWxSZXN1bHQgPSByZXN1bHRzLnJlZHVjZShEaWNlLnN1bSk7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBTYXkoXHJcbiAgICAgICAgICAgIG5ldyBTYXlCb2xkKFwiW1wiLCB0aGlzLnRlc3RTdHJpbmcsIFwiXSBcIiksXHJcbiAgICAgICAgICAgIFwiID0gW1wiLCByZXN1bHRzLmpvaW4oXCJdIFtcIiksIFwiXVwiLFxyXG4gICAgICAgICAgICByZXN1bHRzLmxlbmd0aCA9PSAxID8gXCJcIiA6XHJcbiAgICAgICAgICAgICAgICAoXCI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ge30gOiBvcHRpb25zO1xyXG4gICAgICAgIGlmIChvcHRpb25zLnRhc3RlICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICB0aGlzLnRhc3RlID0gb3B0aW9ucy50YXN0ZTtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLnRhc3RlID0gbmV3IE9uZU9mKFxyXG4gICAgICAgICAgICAgICAgT25lT2YuUk9UQVRJTkdfUkFORE9NLFxyXG4gICAgICAgICAgICAgICAgXCJJdCBnb2VzIGVhc2lseSB0aHJvdWdoIHlvdXIgdGhyb2F0IHdpdGggbm8gcGFydGljdWxhciB0YXN0ZS5cIixcclxuICAgICAgICAgICAgICAgIFwiWW91IHRhc3RlIG5vdGhpbmcgYXMgaXQgc29mdGx5IHNsaWRlcyB0aHJvdWdoIHlvdXIgdG9uZ3VlLlwiXHJcbiAgICAgICAgICAgICk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogVGhpcyBydWxlYm9vayB3aWxsIHJldHVybiBhIExpcXVpZE1peHR1cmVcclxuICAgICAqIEB0eXBlIHtSdWxlYm9vazxMaXF1aWRDb250YWluZXI+fVxyXG4gICAgICovXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVib29rTWl4aW5nID0gbmV3IFJ1bGVib29rPExpcXVpZENvbnRhaW5lcj4oXCJNaXhpbmcgdGhlIGxpcXVpZCBjb250ZW50cyBvZiBzb21ldGhpbmdcIik7IC8vIG5vdW4gPSBMaXF1aWRDb250YWluZXJcclxuICAgIHB1YmxpYyBzdGF0aWMgbWl4dHVyZXMgOiBBcnJheTxMaXF1aWRNaXh0dXJlPiA9IFtdO1xyXG4gICAgcHVibGljIHN0YXRpYyBzb3J0ZWRNaXh0dXJlcyA9IGZhbHNlO1xyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgYXN5bmMgbWl4IChjb250YWluZXIgOiBMaXF1aWRDb250YWluZXIpIHtcclxuICAgICAgICBsZXQgcmVzdWx0ID0gYXdhaXQgTGlxdWlkLnJ1bGVib29rTWl4aW5nLmV4ZWN1dGUoe25vdW4gOiBjb250YWluZXJ9KTtcclxuICAgICAgICAvLyBEaWQgd2UgZmluZCBhIGxpcXVpZD9cclxuICAgICAgICBpZiAocmVzdWx0ICE9IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICBsZXQgZmluYWxRdWFudGl0eSA9IHJlc3VsdC5xdWFudGl0eU11bHRpcGxpZXIgIT0gdW5kZWZpbmVkID9cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHJlc3VsdC5xdWFudGl0eU11bHRpcGxpZXIgKiBjb250YWluZXIubGlxdWlkQ29udGVudHMubGVuZ3RoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb250YWluZXIubGlxdWlkQ29udGVudHMubGVuZ3RoKTtcclxuXHJcblxyXG4gICAgICAgICAgICBjb250YWluZXIubGlxdWlkQ29udGVudHMgPSBuZXcgQXJyYXkoZmluYWxRdWFudGl0eSk7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZmluYWxRdWFudGl0eTsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBjb250YWluZXIubGlxdWlkQ29udGVudHNbaV0gPSByZXN1bHQucmVzdWx0O1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBzdGF0aWMgZ2V0TWl4dHVyZXMgKCkge1xyXG4gICAgICAgIGlmIChMaXF1aWQuc29ydGVkTWl4dHVyZXMpIHtcclxuICAgICAgICAgICAgcmV0dXJuIExpcXVpZC5taXh0dXJlcztcclxuICAgICAgICB9XHJcbiAgICAgICAgTGlxdWlkLm1peHR1cmVzLnNvcnQoKGEsIGIpID0+IHtcclxuICAgICAgICAgICAgaWYgKGIuZmlyc3RQcmlvcml0eSA8IGEuZmlyc3RQcmlvcml0eSkgcmV0dXJuIC0xO1xyXG4gICAgICAgICAgICBpZiAoYS5maXJzdFByaW9yaXR5IDwgYi5maXJzdFByaW9yaXR5KSByZXR1cm4gMTtcclxuICAgICAgICAgICAgaWYgKGIucHJpb3JpdHkgPCBhLnByaW9yaXR5KSByZXR1cm4gLTE7XHJcbiAgICAgICAgICAgIGlmIChhLnByaW9yaXR5IDwgYi5wcmlvcml0eSkgcmV0dXJuIDE7XHJcbiAgICAgICAgICAgIHJldHVybiAwO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIExpcXVpZC5zb3J0ZWRNaXh0dXJlcyA9IHRydWU7XHJcbiAgICAgICAgcmV0dXJuIExpcXVpZC5taXh0dXJlcztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIGFkZE1peHR1cmUobWl4dHVyZSA6IExpcXVpZE1peHR1cmUpIHtcclxuICAgICAgICBMaXF1aWQubWl4dHVyZXMucHVzaChtaXh0dXJlKTtcclxuICAgICAgICBMaXF1aWQuc29ydGVkTWl4dHVyZXMgPSBmYWxzZTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgc3RhdGljIHJ1bGVEZWZhdWx0TWl4aW5nID0gTGlxdWlkLnJ1bGVib29rTWl4aW5nLmNyZWF0ZUFuZEFkZFJ1bGUoe1xyXG4gICAgICAgIG5hbWUgOiBcIk1peGluZyB0aHJvdWdoIE1peHR1cmVzXCIsXHJcbiAgICAgICAgY29kZSA6IHJ1bm5lciA9PiB7XHJcbiAgICAgICAgICAgIGlmIChydW5uZXIubm91bi5saXF1aWRDb250ZW50cy5sZW5ndGggPT0gMCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBsZXQgbWl4dHVyZSA6IExpcXVpZE1peHR1cmU7XHJcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgTGlxdWlkLm1peHR1cmVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBtaXh0dXJlID0gTGlxdWlkLm1peHR1cmVzW2ldO1xyXG4gICAgICAgICAgICAgICAgbGV0IHByb3BvcnRpb25zID0gW107XHJcbiAgICAgICAgICAgICAgICBsZXQgbWl4dHVyZUl0ZXJhdG9yID0gbWl4dHVyZS5xdWFudGl0aWVzLmVudHJpZXMoKTtcclxuICAgICAgICAgICAgICAgIGZvciAobGV0IG1peHR1cmVMaXF1aWQgPSBtaXh0dXJlSXRlcmF0b3IubmV4dCgpOyAhbWl4dHVyZUxpcXVpZC5kb25lOyBtaXh0dXJlTGlxdWlkID0gbWl4dHVyZUl0ZXJhdG9yLm5leHQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBtaXh0dXJlVHlwZSA9IG1peHR1cmVMaXF1aWQudmFsdWVbMF07XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG1peHR1cmVRdWFudGl0eSA9IG1peHR1cmVMaXF1aWQudmFsdWVbMV07XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG1hdGNoZWRRdWFudGl0eSA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgcnVubmVyLm5vdW4ubGlxdWlkQ29udGVudHMuZm9yRWFjaCgobGlxdWlkVHlwZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxpcXVpZFR5cGUgPT0gbWl4dHVyZVR5cGUgfHxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodHlwZW9mIG1peHR1cmVUeXBlID09IFwiZnVuY3Rpb25cIiAmJlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGlxdWlkVHlwZSBpbnN0YW5jZW9mIG1peHR1cmVUeXBlIHx8IG1peHR1cmVUeXBlKGxpcXVpZFR5cGUpKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZWRRdWFudGl0eSsrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbWl4dHVyZVR5cGUgaXMgbm90IGFsd2F5cyBjYWxsYWJsZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBwcm9wb3J0aW9ucy5wdXNoKG1hdGNoZWRRdWFudGl0eSAvIG1peHR1cmVRdWFudGl0eSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gSWYgdGhpcyBpcyBhIHZhbGlkIG1peCwgdGhlbiBldmVyeSBwYXJ0IG9mIHRoZSByZWNpcGUgaXMgcmVwcmVzZW50ZWQgcHJvcG9ydGlvbmFsbHlcclxuICAgICAgICAgICAgICAgIGlmIChwcm9wb3J0aW9ucy5ldmVyeShmdW5jdGlvbihlbGVtZW50LCBpbmRleCwgYXJyYXkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVsZW1lbnQgPT09IGFycmF5WzBdO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1peHR1cmU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9KTtcclxufVxyXG5cclxuLy8gY2xhc3MgU2VtZW4gZXh0ZW5kcyBMaXF1aWQge31cclxuLy8gY2xhc3MgT3JjU2VtZW4gZXh0ZW5kcyBTZW1lbiB7fVxyXG4vLyBjbGFzcyBNaW5vdGF1clNlbWVuIGV4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29tLmFkZFJ1bGUobmV3IFJ1bGUoe1xuICAgIG5hbWUgOiBcIkFmdGVyIHBsYWNpbmcgdGhlIHNvdXRoZXN0IHJvb21cIixcbiAgICBjb2RlIDogcnVubmVyID0+IHtcbiAgICAgICAgbGV0IG9wdGlvbnMgPSA8UmFuZG9taXppbmdSb29tT3B0aW9ucz4gcnVubmVyLm5vdW47XG4gICAgICAgIGxldCBteUNvb3JkaW5hdGVzID0gb3B0aW9ucy5tYXAuZ2V0Q29vcmRpbmF0ZXMob3B0aW9ucy5yb29tKTtcbiAgICAgICAgaWYgKG15Q29vcmRpbmF0ZXMgIT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IFJvb20uRElSRUNUSU9OUy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGxldCBkaXJlY3Rpb24gPSBSb29tLkRJUkVDVElPTlNbaV07XG4gICAgICAgICAgICAgICAgaWYgKGRpcmVjdGlvbiAhPSBEaXJlY3Rpb24uTk9SVEgpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvb3JkaW5hdGVzID0gUm9vbS5zaGlmdChteUNvb3JkaW5hdGVzLCBkaXJlY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm1hcC5ibG9jayhjb29yZGluYXRlc1swXSwgY29vcmRpbmF0ZXNbMV0pO1xuICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA9IFJvb20uc2hpZnQoY29vcmRpbmF0ZXMsIGRpcmVjdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMubWFwLmJsb2NrKGNvb3JkaW5hdGVzWzBdLCBjb29yZGluYXRlc1sxXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSxcbiAgICBjb25kaXRpb25zIDogcnVubmVyID0+IHtcbiAgICAgICAgcmV0dXJuIHJ1bm5lci5ub3VuLnJvb20gPT0gc291dGhlc3RSb29tO1xuICAgIH1cbn0pKVxuXG5UaGluZy5DYXJyeVJlbGF0aW9uLnNldFJlbGF0aW9uKFdvcmxkU3RhdGUucGxheWVyLCBtYXBPZlRlc3QpO1xuXG4vLyBTZXR0aW5ncy5zZXREZWJ1ZyhmYWxzZSk7XG5QbGF5QmVnaW5zLnJ1bGVib29rLmFkZFJ1bGUobmV3IFJ1bGUoe1xuICAgIG5hbWUgOiBcInJhbmRvbWl6ZSByZWdpb25cIixcbiAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxuICAgIGNvZGUgOiBhc3luYyBydW5uZXIgPT4ge1xuICAgICAgICAvL2xldCB0MCA9IHBlcmZvcm1hbmNlLm5vdygpO1xuICAgICAgICBhd2FpdCByZWdpb24ucmFuZG9taXplKCk7XG4gICAgICAgIC8vbGV0IHQxID0gcGVyZm9ybWFuY2Uubm93KCk7XG4gICAgfVxufSkpO1xuXG5SZWdpb25SYW5kb20ucnVsZWJvb2tSYW5kb21pemVSZWdpb24uYWRkUnVsZShuZXcgUnVsZSh7XG4gICAgbmFtZSA6IFwiQWRkIHJvb20gQSBhbmQgQiB0byByZWdpb25cIixcbiAgICBmaXJzdFByaW9yaXR5IDogUnVsZS5QUklPUklUWV9ISUdIRVNULFxuICAgIGNvZGUgOiBhc3luYyBydW5uZXIgPT4ge1xuICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uZXhlY3V0ZSh7XG4gICAgICAgICAgICBub3VuIDogPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHtcbiAgICAgICAgICAgICAgICBtYXAgOiByZWdpb24ubWFwLFxuICAgICAgICAgICAgICAgIHJvb20gOiByb29tYSxcbiAgICAgICAgICAgICAgICByZWdpb24gOiByZWdpb25cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSkudGhlbigpO1xuICAgICAgICBhd2FpdCBSZWdpb25SYW5kb20ucnVsZWJvb2tQbGFjZVJvb20uZXhlY3V0ZSh7XG4gICAgICAgICAgICBub3VuIDogPFJhbmRvbWl6aW5nUm9vbU9wdGlvbnM+IHtcbiAgICAgICAgICAgICAgICBtYXAgOiByZWdpb24ubWFwLFxuICAgICAgICAgICAgICAgIHJvb20gOiByb29tYixcbiAgICAgICAgICAgICAgICByZWdpb24gOiByZWdpb25cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSkudGhlbigpO1xuICAgIH0sXG4gICAgY29uZGl0aW9ucyA6IHJ1bm5lciA9PiB7XG4gICAgICAgIHJldHVybiBydW5uZXIubm91biA9PSByZWdpb247XG4gICAgfVxufSkpO1xuXG5mdW5jdGlvbiBnZXRQYXRoIChyb29tYSA6IFJvb20sIHJvb21iIDogUm9vbSkge1xuICAgIGNvbnNvbGUuZGVidWcoXCJUaGUgYmVzdCBwYXRoIGZyb20gXCIgKyByb29tYS5nZXRQcmludGVkTmFtZSgpICsgXCIgdG8gXCIgKyByb29tYi5nZXRQcmludGVkTmFtZSgpICsgXCIgaXM6XCIpO1xuICAgIGxldCB0MCwgZGlyLCB0MTtcbiAgICB0MCA9IHBlcmZvcm1hbmNlLm5vdygpO1xuICAgIGRpciA9IHJvb21hLmJlc3REaXJlY3Rpb25Ubyhyb29tYik7XG4gICAgdDEgPSBwZXJmb3JtYW5jZS5ub3coKTtcbiAgICBpZiAoZGlyICE9IHVuZGVmaW5lZCkge1xuICAgICAgICBjb25zb2xlLmRlYnVnKERpcmVjdGlvbk5hbWVzW0RpcmVjdGlvbltkaXJdXSk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgY29uc29sZS5kZWJ1ZyhcIlRoZXJlIGlzIG5vIHBhdGguXCIpO1xuICAgIH1cbiAgICBjb25zb2xlLmRlYnVnKFwiQ2FsbCB0byBkb1NvbWV0aGluZyB0b29rIFwiICsgKHQxIC0gdDApICsgXCIgbWlsbGlzZWNvbmRzLlwiKTtcbn1cblxuLy8gbGV0IHQwID0gcGVyZm9ybWFuY2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ICAgIHJldHVybiBwZXJzb24uQUkucGlja3NTaGluaWVzO1xuICAgICAgICB9LFxuICAgICAgICBjb2RlIDogKHJ1bm5lciA6IFJ1bGVib29rUnVubmVyPFBlcnNvbj4pID0+IHtcbiAgICAgICAgICAgIGxldCBwZXJzb24gPSBydW5uZXIubm91bjtcbiAgICAgICAgICAgIGxldCByb29tID0gcGVyc29uLmdldFJvb20oKTtcbiAgICAgICAgICAgIGxldCB2aXNpYmxlVGhpbmdzID0gcm9vbS5nZXRDb250YWluZWRBbmRWaXNpYmxlVG8ocGVyc29uKTtcblxuICAgICAgICAgICAgaWYgKHZpc2libGVUaGluZ3MubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdmlzaWJsZVRoaW5ncy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXZpc2libGVUaGluZ3NbaV0uZml4ZWRJblBsYWNlICYmIHZpc2libGVUaGluZ3NbaV0uZ2V0U2hpbnkoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBBY3Rpb25UYWtlKHBlcnNvbiwgdmlzaWJsZVRoaW5nc1tpXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbn1cbmxldCByYW5kb21PcmM7XG5sZXQgcmFuZG9tT3JjMjtcbmZvciAobGV0IGkgPSAwOyBpIDwgMTA7IGkrKykge1xuICAgIGxldCBvcmMgPSBuZXcgT3JjRGVidWdnZXIoKTtcbiAgICByYW5kb21PcmMgPSBvcmM7XG4gICAgaWYgKHJhbmRvbU9yYzIgPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHJhbmRvbU9yYzIgPSBvcmM7XG4gICAgfVxuICAgIG9yYy5BSS53YW5kZXJlciA9IHRydWU7XG4gICAgb3JjLkFJLnBpY2tzU2hpbmllcyA9IHRyd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AgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBvcmlnaW5zLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGxldCBvcmlnaW4gPSBvcmlnaW5zW2ldO1xyXG4gICAgICAgICAgICBsZXQgc2F5ID0gbmV3IFNheShvcmlnaW4ubmFtZSk7XHJcbiAgICAgICAgICAgIGlmIChvcmlnaW4uaWQgPT0gQ2hhcmFjdGVyQ3JlYXRpb24uUGxheWVyT3JpZ2luLnZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiIC0gU0VMRUNURURcIik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgYXdhaXQgKHNheSkuZ2V0SFRNTChcInBcIiwgW1wiY2hvaWNlXCJdKS50aGVuKGVsZW1lbnRBcnJheSA9PiB7XHJcbiAgICAgICAgICAgICAgICBDb250cm9scy5MaW5rcy5tYWtlQ3VzdG9tTGluayhlbGVtZW50QXJyYXlbMF0sIHtcclxuICAgICAgICAgICAgICAgICAgICBtb3VzZW92ZXI6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRPcmlnaW4ob3JpZ2luKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIG1vdXNlb3V0OiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50T3JpZ2luKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBjbGljazogKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBDaGFyYWN0ZXJDcmVhdGlvbi5QbGF5ZXJPcmlnaW4udmFsdWUgPSBvcmlnaW4uaWQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc2V0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICBDb250cm9scy5LZX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Iik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocGVyay5pc0ZvcmNlZCgpKSB7XHJcbiAgICAgICAgICAgICAgICBzYXkuYWRkKFwiIChGb3JiaWRkZW4pXCIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGF3YWl0IChzYXkpLmdldEhUTUwoXCJwXCIsIFtcImNob2ljZVwiXSkudGhlbihlbGVtZW50QXJyYXkgPT4ge1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuTGlua3MubWFrZUN1c3RvbUxpbmsoZWxlbWVudEFycmF5WzBdLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgbW91c2VvdmVyOiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByaW50UGVyayhwZXJrKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIG1vdXNlb3V0OiAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVtcHR5UGVyaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgY2xpY2s6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFwZXJrLmlzRm9yY2VkKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBlcmsudmFsdWUgPSAhcGVyay52YWx1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNldCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgQ29udHJvbHMuS2V5SGFuZGxlci5hcHBseUNvZGUoZWxlbWVudEFycmF5WzBdLCBDb250cm9scy5LZXlIYW5kbGVyLmdldFNlY29uZEtleUNvZGUoKSk7XHJcbiAgICAgICAgICAgICAgICBsZWZ0U2lkZS5hcHBlbmRDaGlsZChlbGVtZW50QXJyYXlbMF0pO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcHJpbnRDb25maXJtICgpIHtcclxuICAgICAgICAobmV3IFNheShcIkNvbmZpcm1cIikpLmdldEhUTUwoXCJwXCIsIFtcImNob2ljZVwiXSkudGhlbihlbGVtZW50QXJyYXkgPT4ge1xyXG4gICAgICAgICAgICBlbGVtZW50QXJyYXlbMF0uYWRkRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsICgpID0+IHtcclxuICAgICAgICAgICAgICAgIHJlc29sdmVyKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBDb250cm9scy5LZXlIYW5kbGVyLmFwcGx5Q29kZShlbGVtZW50QXJyYXlbMF0sIENvbnRyb2xzLktleUhhbmRsZXIuZ2V0U2Vjb25kS2V5Q29kZSgpKTtcclxuICAgICAgICAgICAgRWxlbWVudHMuQ3VycmVudFR1cm5IYW5kbGVyLnByaW50KGVsZW1lbnRBcnJheVswXSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gZW1wdHlQZXJrICgpIHtcclxuICAgICAgICB3aGlsZSAocmlnaHRTaWRlLmZpcnN0Q2hpbGQpIHJpZ2h0U2lkZS5yZW1vdmVDaGlsZChyaWdodFNpZGUuZmlyc3RDaGlsZCk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcHJpbnRQZXJrIChwZXJrIDogUGVyaykge1xyXG4gICAgICAgIGxldCBzYXkgPSBuZXcgU2F5KHBlcmsuZGVzY3JpcHRpb24pO1xyXG4gICAgICAgIHNheS5nZXRIVE1MQ29udGVudCgpLnRoZW4oKGVsZXMgPT4ge1xyXG4gICAgICAgICAgICBlbXB0eVBlcmsoKTtcclxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbGVzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICByaWdodFNpZGUuYXBwZW5kQ2hpbGQoZWxlc1tpXSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KSk7XHJcbiAgICB9XHJcblxyXG4gICAgZnVuY3Rpb24gcmVzZXQgKCkge1xyXG4gICAgICAgIFBlcmsudXBkYXRlUGVya3MoKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIuY2xlYXIoKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoY2NEaXYpO1xyXG4gICAgICAgIHByaW50VGFibGUoKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImJyXCIpKTtcclxuICAgICAgICBFbGVtZW50cy5DdXJyZW50VHVybkhhbmRsZXIucHJpbnQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImJyXCIpKTtcclxuICAgICAgICBwcmludENvbmZpcm0oKTtcclxuICAgIH1cclxuXHJcbiAgICBleHBvcnQgbGV0IENDUGVyayA9IENoYXJhY3RlckNyZWF0aW9uLnJ1bGVib29rLmNyZWF0ZUFuZEFkZFJ1bGUoe1xyXG4gICAgICAgIG5hbWU6IFwiQ2hhcmFjdGVyIENyZWF0aW9uIC0gT3JpZ2luXCIsXHJcbiAgICAgICAgZmlyc3RQcmlvcml0eTogUnVsZS5QUklPUklUWV9MT1csXHJcbiAgICAgICAgcHJpb3JpdHk6IFJ1bGUuUFJJT1JJVFlfSElHSCxcclxuICAgICAgICBjb2RlOiBhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgIEVsZW1lbnRzLnN0YXJ0TWVudSgpO1xyXG5cclxuICAgICAgICAgICAgbGV0IHByb21pc2UgPSBuZXcgUHJvbWlzZShyZXNvbHZlID0+IHtcclxuICAgICAgICAgICAgICAgIHJlc29sdmVyID0gcmVzb2x2ZTtcclxuICAgICAgICAgICAgfSk7XHJcblxyXG4gICAgICAgICAgICByZXNldCgpO1xyXG5cclxuICAgICAgICAgICAgYXdhaXQgcHJvbWlzZTtcclxuXHJcbiAgICAgICAgICAgIGxldCBwZXJrcyA9IFBlcmsuZ2V0UGVya3MoKTtcclxuICAgICAgICAgICAgcGVya3MuZm9yRWFjaChwZXJrID0+IHtcclxuICAgICAgICAgICAgICAgIGlmIChwZXJrLmlzRW5hYmxlZCgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGVyay5jb25maXJtUGlja2VkKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG5cclxuICAgICAgICAgICAgRWxlbWVudHMuZW5kTWVudSgpO1xyXG4gICAgICAgIH1cclxuICAgIH0pO1xyXG59IiwibW9kdWxlIENoYXJhY3RlckNyZWF0aW9uIHtcclxuICAgIGludGVyZmFjZSByYW5nZU9wdGlvbnMge1xyXG4gICAgICAgIGxhYmVsPyA6IHN0cmluZztcclxuICAgICAgICBzaG93VmFsdWU/IDogYm9vbGVhbjtcclxuICAgICAgICBvbkNoYW5nZSA6ICh2YWx1ZSA6IG51bWJlciwgbGFiZWxWYWx1ZSA6IFRleHQsIGlucHV0IDogSFRNTElucHV0RWxlbWVudCkgPT4gdm9pZDtcclxuICAgICAgICBtaW5WYWx1ZSA6IG51bWJlcjtcclxuICAgICAgICBtYXhWYWx1ZSA6IG51bWJlcjtcclxuICAgICAgICBsZWZ0TGFiZWw/IDogc3RyaW5nO1xyXG4gICAgICAgIHJpZ2h0TGFiZWw/IDogc3RyaW5nO1xyXG4gICAgICAgIHRvcExhYmVsPyA6IHN0cmluZztcclxuICAgICAgICB2YWx1ZSA6IG51bWJlcjtcclxuICAgICAgICBzdGVwIDogbnVtYmVyO1xyXG4gICAgfVxyXG5cclxuICAgIGZ1bmN0aW9uIGNyZWF0ZVJhbmdlIChvcHRpb25zIDogcmFuZ2VPcHRpb25z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ZWxWYWx1ZSA6IFRleHQsIGlucHV0IDogSFRNTElucHV0RWxlbWVudCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsVmFsdWUubm9kZVZhbHVlID0gKHZhbHVlID09IDAgPyBcIk1hbGVcIiA6IFwiRmVtYWxlXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgICg8SHVtYW5vaWQ+IFdvcmxkU3RhdGUucGxheWVyKS5yZW1vdmVHZW5kZXJlZFBhcnRzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlID09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgKDxIdW1hbm9pZD4gV29ybGRTdGF0ZS5wbGF5ZXIpLmFkZE1hbGVQYXJ0cygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICg8SHVtYW5vaWQ+IFdvcmxkU3RhdGUucGxheWVyKS5hZGRGZW1hbGVQYXJ0cygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAvLyBTb21lIHN0YXRzIGJlY29tZSBkaWZmZXJlbnQgd2hldGhlciB0ZSBwbGF5ZXIgaXMgbWFsZSBvciBmZW1hbGUsIHNvIHdlIGhhdmUgdG8gdXBkYXRlIHRoZW0gYWxsLlxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBvdGhlcklucHV0cyA9IGNjRGl2LmdldEVsZW1lbnRzQnlUYWdOYW1lKFwiaW5wdXRcIik7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBvdGhlcklucHV0cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgb3RoZXJJbnB1dCA9IG90aGVySW5wdXRzW2ldO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob3RoZXJJbnB1dCAhPSBpbnB1dCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3RoZXJJbnB1dC5kaXNwYXRjaEV2ZW50KG5ldyBFdmVudChcImNoYW5nZVwiKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2UoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSkpO1xyXG5cclxuXHJcblxyXG4gICAgICAgICAgICBjY0xlZnQuYXBwZW5kQ2hpbGQoY3JlYXRlUmFuZ2Uoe1xyXG4gICAgICAgICAgICAgICAgbWluVmFsdWUgOiAwLCBtYXhWYWx1ZSA6IDQsIHN0ZXA6IDEsIHZhbHVlIDogMiwgbGVmdExhYmVsIDogXCJNYXNjdWxpbmVcIiwgcmlnaHRMYWJlbCA6IFwiRmVtaW5pbmVcIiwgdG9wTGFiZWwgOiBcIkdlbmRlclwiLFxyXG4gICAgICAgICAgICAgICAgb25DaGFuZ2UgOiAodmFsdWUgOiBudW1iZXIsIGxhYmVsVmFsdWUgOiBUZXh0KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWVzID0gW1wiTWFzY3VsaW5lXCIsIFwiU29tZXdoYXQgbWFzY3VsaW5lXCIsIFwiQW5kcm9neW5vdXNcIiwgXCJTb21ld2hhdCBmZW1pbmluZVwiLCBcIkZlbWluaW5lXCJdO1xyXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsVmFsdWUubm9kZVZhbHVlID0gbmFtZXNbdmFsdWVdO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBwbGF5ZXIgPSAoPEh1bWFub2lkPiBXb3JsZFN0YXRlLnBsYXllcik7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IGludGVuZGVkVmFsdWUgOiBudW1iZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBsYXllci5pc01hbGUoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBs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lbnQobmV3IEV2ZW50KFwiY2hhbmdlXCIpKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgc3RhdHNSZW1haW5pbmcubm9kZVZhbHVlID0gKHJlbWFpbmluZyA9PSAwID8gXCJEb25lXCIgOlxyXG4gICAgICAgICAgICAgICAgICAgIHJlbWFpbmluZyA+IDEgPyByZW1haW5pbmcudG9TdHJpbmcoKSArIFwiIHBvaW50cyByZW1haW5pbmdcIiA6XHJcbiAgICAgICAgICAgICAgICAgICAgcmVtYWluaW5nLnRvU3RyaW5nKCkgKyBcIiBwb2ludCByZW1haW5pbmdcIik7XHJcbiAgICAgICAgICAgIH07XHJcblxyXG4gICAgICAgICAgICBjY0xlZnQuYXBwZW5kQ2hpbGQoY3JlYXRlUmFuZ2Uoe1xyXG4gICAgICAgICAgICAgICAgbWluVmFsdWUgOiAxLCBtYXhWYWx1ZSA6IDUsIHN0ZXA6IDEsIHZhbHVlIDogMiwgbGVmdExhYmVsIDogXCItXCIsIHJpZ2h0TGFiZWwgOiBcIitcIiwgdG9wTGFiZWwgOiBcIlN0cmVuZ3RoXCIsXHJcbiAgICAgICAgICAgICAgICBvbkNoYW5nZSA6ICh2YWx1ZSA6IG51bWJlciwgbGFiZWxWYWx1ZSA6IFRleHQsIGlucHV0IDogSFRNTElucHV0RWxlbWVudCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHNldFN0YXQoQXR0cmlidXRlcy5TdHJlbmd0aCwgdmFsdWUsIGlucHV0KTtcclxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZSgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgICAgICBjY0xlZnQuYXBwZW5kQ2hpbGQoY3JlYXRlUmFuZ2Uoe1xyXG4gICAgICAgICAgICAgICAgbWluVmFsdWUgOiAxLCBtYXhWYWx1ZSA6I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zdGVwOiAxLCB2YWx1ZSA6IDIsIGxlZnRMYWJlbCA6IFwiLVwiLCByaWdodExhYmVsIDogXCIrXCIsIHRvcExhYmVsIDogXCJJbnRlbGxpZ2VuY2VcIixcclxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlIDogKHZhbHVlIDogbnVtYmVyLCBsYWJlbFZhbHVlIDogVGV4dCwgaW5wdXQgOiBIVE1MSW5wdXRFbGVtZW50KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2V0U3RhdChBdHRyaWJ1dGVzLkludGVsbGlnZW5jZSwgdmFsdWUsIGlucHV0KTtcclxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZSgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KSk7XHJcblxyXG4gICAgICAgICAgICBsZXQgY3JlYXRpb25Eb25lID0gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcclxuICAgICAgICAgICAgICAgIChuZXcgU2F5KFwiQ29uZmlybVwiKSkuZ2V0SFRNTChcInBcIiwgW1wiY2hvaWNlXCJdKS50aGVuKGVsZW1lbnRBcnJheSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudEFycmF5WzBdLmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIEVsZW1lbnRzLmVuZE1lbnUoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIENvbnRyb2xzLktleUhhbmRsZXIuYXBwbHlDb2RlKGVsZW1lbnRBcnJheVswXSwgQ29udHJvbHMuS2V5SGFuZGxlci5nZXRTZWNvbmRLZXlDb2RlKCkpO1xyXG4gICAgICAgICAgICAgICAgICAgIEVsZW1lbnRzLkN1cnJlbnRUdXJuSGFuZGxlci5wcmludChlbGVtZW50QXJ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