main-html.js 297 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106
  1. 'use strict';
  2. (function () {
  3. function z(a, b) {
  4. function c() {}
  5. c.prototype = a;
  6. var e = new c,
  7. g;
  8. for (g in b) e[g] = b[g];
  9. b.toString !== Object.prototype.toString && (e.toString = b.toString);
  10. return e
  11. }
  12. function sc(a) {
  13. return a instanceof Array ? function () {
  14. return p.iter(a)
  15. } : "function" == typeof a.iterator ? ea(a, a.iterator) : a.iterator
  16. }
  17. function ea(a, b) {
  18. if (null == b) return null;
  19. null == b.__id__ && (b.__id__ = Dc++);
  20. var c;
  21. null == a.hx__closures__ ? a.hx__closures__ = {} : c = a.hx__closures__[b.__id__];
  22. null == c && (c = function () {
  23. return c.method.apply(c.scope,
  24. arguments)
  25. }, c.scope = a, c.method = b, a.hx__closures__[b.__id__] = c);
  26. return c
  27. }
  28. var f = {},
  29. s = function () {
  30. return N.__string_rec(this, "")
  31. },
  32. $ = function (a, b) {
  33. b = b.split("u").join("");
  34. this.r = RegExp(a, b)
  35. };
  36. f.EReg = $;
  37. $.__name__ = ["EReg"];
  38. $.prototype = {
  39. match: function (a) {
  40. this.r.global && (this.r.lastIndex = 0);
  41. this.r.m = this.r.exec(a);
  42. this.r.s = a;
  43. return null != this.r.m
  44. },
  45. matched: function (a) {
  46. if (null != this.r.m && 0 <= a && a < this.r.m.length) return this.r.m[a];
  47. throw "EReg::matched";
  48. },
  49. matchedPos: function () {
  50. if (null == this.r.m) throw "No string matched";
  51. return {
  52. pos: this.r.m.index,
  53. len: this.r.m[0].length
  54. }
  55. },
  56. split: function (a) {
  57. return a.replace(this.r, "#__delim__#").split("#__delim__#")
  58. },
  59. __class__: $
  60. };
  61. var fa = function () {};
  62. f.G = fa;
  63. fa.__name__ = ["G"];
  64. fa.saveData = function () {
  65. d.saveData("unlocked_levels", fa.unlockedLevels)
  66. };
  67. fa.loadData = function () {
  68. var a = d.loadData("unlocked_levels");
  69. fa.unlockedLevels = 0 < a ? a : 0
  70. };
  71. var la = function (a, b) {
  72. null == b && (b = 0);
  73. null == a && (a = 0);
  74. this.x = a;
  75. this.y = b
  76. };
  77. f["flambe.math.Point"] = la;
  78. la.__name__ = ["flambe", "math", "Point"];
  79. la.prototype = {
  80. set: function (a,
  81. b) {
  82. this.x = a;
  83. this.y = b
  84. },
  85. distanceTo: function (a, b) {
  86. return Math.sqrt(this.distanceToSquared(a, b))
  87. },
  88. distanceToSquared: function (a, b) {
  89. var c = this.x - a,
  90. e = this.y - b;
  91. return c * c + e * e
  92. },
  93. __class__: la
  94. };
  95. var i = function (a, b, c) {
  96. i.ref = this;
  97. this.gridLayer = a;
  98. this.width = b;
  99. this.height = c;
  100. i.offsetX = (d.width - b * (i.pieceWidth + i.gap)) / 2 + i.pieceWidth / 2 | 0;
  101. i.offsetY = 150;
  102. i.playingGridHeight = i.initPlayingGridHeight;
  103. c < i.playingGridHeight && (i.playingGridHeight = c, i.offsetY += (i.initPlayingGridHeight - c) * i.pieceHeight);
  104. c > i.playingGridHeight +
  105. 1 && (a._compMap.Sprite_0.y.set__(-(c - i.playingGridHeight) * i.pieceHeight), L.tween(a._compMap.Sprite_0, 0.08 * c, {
  106. y: 0
  107. }, 0, function () {}, q.quadOut));
  108. this.genEmptyGrid()
  109. };
  110. f.Grid = i;
  111. i.__name__ = ["Grid"];
  112. i.prototype = {
  113. genEmptyGrid: function () {
  114. for (var a = [], b = 0, c = this.height; b < c;) b++, a.push(function (a) {
  115. for (var b = [], c = 0, a = a.width; c < a;) c++, b.push(null);
  116. return b
  117. }(this));
  118. this.grid = a
  119. },
  120. genGridFromArray: function (a) {
  121. for (var b = 0, c = this.grid.length; b < c;) {
  122. var e = b++;
  123. null != a[e] && this.addRowFromArrayAt(a[e], e)
  124. }
  125. },
  126. getEmptySpaceAbove: function () {
  127. for (var a = [], b = 0, c = this.grid[0].length; b < c;)
  128. for (var e = b++, g = 0; g < this.grid.length;) null == this.grid[g][e] ? a.push([g, e]) : g = this.grid.length, g++;
  129. return a
  130. },
  131. addRowFromArrayAt: function (a, b) {
  132. for (var c = 0, e = this.grid[b].length; c < e;) {
  133. var g = c++; - 1 != a[g] && null == this.grid[b][g] ? this.grid[b][g] = new C(g, b, a[g] | 0) : null == this.grid[b][g] && null
  134. }
  135. },
  136. getRow: function (a) {
  137. var b = [];
  138. if (null != this.grid[a])
  139. for (var c = 0, e = this.grid[a].length; c < e;) {
  140. var g = c++;
  141. null != this.grid[a][g] && b.push(this.grid[a][g])
  142. }
  143. return b
  144. },
  145. getColumn: function (a) {
  146. for (var b = [], c = 0, e = i.playingGridHeight; c < e;) {
  147. var g = c++;
  148. null != this.grid[g][a] && b.push(this.grid[g][a])
  149. }
  150. return b
  151. },
  152. getPiecesOfType: function (a) {
  153. for (var b = [], c = 0, e = i.playingGridHeight; c < e;)
  154. for (var g = c++, h = 0, d = this.grid[g].length; h < d;) {
  155. var j = h++;
  156. null != this.grid[g][j] && this.grid[g][j].type == a && b.push(this.grid[g][j])
  157. }
  158. return b
  159. },
  160. getNOfTypes: function (a) {
  161. for (var b = 0, c = 0, e = i.playingGridHeight; c < e;)
  162. for (var g = c++, h = 0, d = this.grid[g].length; h < d;) {
  163. var j = h++;
  164. if (null != this.grid[g][j])
  165. for (var f = 0, k = a.length; f < k;) {
  166. var m = f++;
  167. this.grid[g][j].type ==
  168. a[m] && b++
  169. }
  170. }
  171. return b
  172. },
  173. getPiecesAroundPiece: function (a) {
  174. for (var b = [], c = a.gridX - 1, e = a.gridY - 1, g = c + 3, h = e + 3; e < h;) {
  175. for (; c < g;) 0 <= e && e < i.playingGridHeight && 0 <= c && c < this.width && null != this.grid[e][c] && b.push(this.grid[e][c]), c++;
  176. c = a.gridX - 1;
  177. e++
  178. }
  179. return b
  180. },
  181. getTopPieceY: function () {
  182. for (var a = 0, b = this.grid.length; a < b;)
  183. for (var c = a++, e = 0, g = this.grid[c].length; e < g;) {
  184. var h = e++;
  185. if (null != this.grid[c][h] && 222 != this.grid[c][h].type) return c
  186. }
  187. return 0
  188. },
  189. getAllBonuses: function () {
  190. for (var a = [], b = 0, c = i.playingGridHeight; b < c;)
  191. for (var e =
  192. b++, g = 0, h = this.grid[e].length; g < h;) {
  193. var d = g++;
  194. null != this.grid[e][d] && (5 <= this.grid[e][d].type && 9 >= this.grid[e][d].type ? a.push(this.grid[e][d]) : 20 == this.grid[e][d].type && a.push(this.grid[e][d]))
  195. }
  196. return a
  197. },
  198. getPetsOnBottom: function () {
  199. for (var a = [], b = this.grid[this.height - 1], c = 0, e = b.length; c < e;) {
  200. var g = c++;
  201. null != b[g] && 111 == b[g].type && a.push(b[g])
  202. }
  203. return a
  204. },
  205. applyGravityDown: function () {
  206. for (var a = i.playingGridHeight - 1, b = []; 0 < a;) {
  207. for (var c = this.grid[a], e = 0, g = c.length; e < g;) {
  208. var h = e++;
  209. if (null == c[h])
  210. for (var d =
  211. a; 0 < d;) d--, null != this.grid[d][h] && 222 != this.grid[d][h].type ? (this.grid[a][h] = this.grid[d][h], this.grid[a][h].gridY = a, b.push(this.grid[a][h]), this.grid[d][h] = null, d = 0) : null != this.grid[d][h] && 222 == this.grid[d][h].type && (d = 0)
  212. }
  213. a--
  214. }
  215. return b
  216. },
  217. needForGravity: function () {
  218. for (var a = i.playingGridHeight - 1; 0 < a;) {
  219. for (var b = this.grid[a], c = 0, e = b.length; c < e;) {
  220. var g = c++;
  221. if (null == b[g])
  222. for (var h = a; 0 < h;) {
  223. h--;
  224. if (null != this.grid[h][g] && 222 != this.grid[h][g].type) return !0;
  225. null != this.grid[h][g] && 222 == this.grid[h][g].type &&
  226. (h = 0)
  227. }
  228. }
  229. a--
  230. }
  231. return !1
  232. },
  233. slideToLeft: function () {
  234. for (var a = this.grid[i.playingGridHeight - 1], b = 0, c = [], e = 0; e < a.length;) {
  235. if (null == a[e] && e != a.length - 1 && (b++, null != a[e + 1] && 222 != a[e + 1].type)) {
  236. for (var g = e + 1, h = a[g]; null != h;) {
  237. for (h = i.playingGridHeight - 1; - 1 < h;) null != this.grid[h][g] && 222 != this.grid[h][g].type ? null == this.grid[h][g - 1] ? (this.grid[h][g - 1] = this.grid[h][g], this.grid[h][g - 1].gridX = g - 1, c.push(this.grid[h][g - 1]), this.grid[h][g] = null) : h = 0 : null != this.grid[h][g] && 222 == this.grid[h][g].type && (h = 0), h--;
  238. g++;
  239. h = a[g]
  240. }
  241. e -=
  242. b;
  243. 0 > e && (e = -1);
  244. b = 0
  245. }
  246. e++
  247. }
  248. a = 0;
  249. for (b = i.playingGridHeight; a < b;) {
  250. e = a++;
  251. g = 0;
  252. for (h = this.grid[e].length; g < h;) {
  253. var d = g++;
  254. if (null != this.grid[e][d] && 222 == this.grid[e][d].type && 0 != d && (null == this.grid[e][d - 1] || 222 == this.grid[e][d - 1].type))
  255. for (var j = e; 0 < j;) j--, null != this.grid[j][d] && 222 != this.grid[j][d].type ? null == this.grid[j][d - 1] ? (this.grid[j][d - 1] = this.grid[j][d], this.grid[j][d - 1].gridX = d - 1, c.push(this.grid[j][d - 1]), this.grid[j][d] = null) : j = 0 : null != this.grid[j][d] && 222 == this.grid[j][d].type ? j = 0 : null == this.grid[j +
  256. 1][d] && (j = 0)
  257. }
  258. }
  259. return c
  260. },
  261. needForSlideToLeft: function () {
  262. for (var a = this.grid[i.playingGridHeight - 1], b = 0, c = 0; c < a.length;) {
  263. if (null == a[c] && c != a.length - 1 && (b++, null != a[c + 1] && 222 != a[c + 1].type)) {
  264. for (var e = c + 1, g = a[e]; null != g;) {
  265. for (g = i.playingGridHeight - 1; - 1 < g;) {
  266. if (null != this.grid[g][e] && 222 != this.grid[g][e].type) {
  267. if (null == this.grid[g][e - 1]) return !0;
  268. g = 0
  269. } else null != this.grid[g][e] && 222 == this.grid[g][e].type && (g = 0);
  270. g--
  271. }
  272. e++;
  273. g = a[e]
  274. }
  275. c -= b;
  276. 0 > c && (c = -1);
  277. b = 0
  278. }
  279. c++
  280. }
  281. a = 0;
  282. for (b = i.playingGridHeight; a < b;) {
  283. c = a++;
  284. e = 0;
  285. for (g = this.grid[c].length; e <
  286. g;) {
  287. var h = e++;
  288. if (null != this.grid[c][h] && 222 == this.grid[c][h].type && 0 != h && (null == this.grid[c][h - 1] || 222 == this.grid[c][h - 1].type))
  289. for (var d = c; 0 < d;)
  290. if (d--, null != this.grid[d][h] && 222 != this.grid[d][h].type) {
  291. if (null == this.grid[d][h - 1]) return !0;
  292. d = 0
  293. } else null != this.grid[d][h] && 222 == this.grid[d][h].type ? d = 0 : null == this.grid[d + 1][h] && (d = 0)
  294. }
  295. }
  296. return !1
  297. },
  298. updateGridView: function () {
  299. if (i.playingGridHeight != this.height) {
  300. var a = this.getTopPieceY();
  301. i.playingGridHeight < i.initPlayingGridHeight + a && (i.playingGridHeight = i.initPlayingGridHeight +
  302. a, i.playingGridHeight > this.height && (i.playingGridHeight = this.height), this.gridLayer._compMap.Sprite_0.y._value > -(this.height - i.initPlayingGridHeight) * i.pieceHeight && this.gridLayer._compMap.Sprite_0.y.animateTo(-((i.playingGridHeight - i.initPlayingGridHeight) * i.pieceHeight), 0.4, q.quadOut))
  303. }
  304. },
  305. getGridRowsBelow: function () {
  306. return this.height - i.playingGridHeight
  307. },
  308. coordsInGrid: function (a, b) {
  309. return 0 <= a && 0 <= b && a < this.width && b < i.playingGridHeight
  310. },
  311. getPiece: function (a, b) {
  312. return this.coordsInGrid(a, b) && null !=
  313. this.grid[b][a] ? this.grid[b][a] : null
  314. },
  315. neighbourOf: function (a, b) {
  316. var c = a.relativeCoordinates(b, 1);
  317. return this.getPiece(c.x | 0, c.y | 0)
  318. },
  319. neighboursOf: function (a) {
  320. for (var b = [], c = 0, e = i.dirs.length; c < e;) {
  321. var g = c++;
  322. b.push(this.neighbourOf(a, i.dirs[g]))
  323. }
  324. return b
  325. },
  326. getDeepMatches: function (a) {
  327. null == a && (a = 2);
  328. for (var b = [], c = [], e = 0, g = i.playingGridHeight; e < g;)
  329. for (var h = this.grid[e++], d = 0, j = h.length; d < j;) {
  330. var f = d++,
  331. k = h[f];
  332. if (null != k && -1 == va.indexOf(b, k)) {
  333. for (var f = k.deepMatchingNeighbours(), m = 0, l = f.length; m < l;) {
  334. var n =
  335. m++;
  336. b.push(f[n])
  337. }
  338. if (f.length >= a && null != k) {
  339. k = 0;
  340. for (m = f.length; k < m;) l = k++, c.push(f[l])
  341. }
  342. }
  343. }
  344. return c
  345. },
  346. __class__: i
  347. };
  348. var p = function () {};
  349. f.HxOverrides = p;
  350. p.__name__ = ["HxOverrides"];
  351. p.dateStr = function (a) {
  352. var b = a.getMonth() + 1,
  353. c = a.getDate(),
  354. e = a.getHours(),
  355. g = a.getMinutes(),
  356. h = a.getSeconds();
  357. return a.getFullYear() + "-" + (10 > b ? "0" + b : "" + b) + "-" + (10 > c ? "0" + c : "" + c) + " " + (10 > e ? "0" + e : "" + e) + ":" + (10 > g ? "0" + g : "" + g) + ":" + (10 > h ? "0" + h : "" + h)
  358. };
  359. p.strDate = function (a) {
  360. switch (a.length) {
  361. case 8:
  362. var a = a.split(":"),
  363. b = new Date;
  364. b.setTime(0);
  365. b.setUTCHours(a[0]);
  366. b.setUTCMinutes(a[1]);
  367. b.setUTCSeconds(a[2]);
  368. return b;
  369. case 10:
  370. return a = a.split("-"), new Date(a[0], a[1] - 1, a[2], 0, 0, 0);
  371. case 19:
  372. return b = a.split(" "), a = b[0].split("-"), b = b[1].split(":"), new Date(a[0], a[1] - 1, a[2], b[0], b[1], b[2]);
  373. default:
  374. throw "Invalid date format : " + a;
  375. }
  376. };
  377. p.cca = function (a, b) {
  378. var c = a.charCodeAt(b);
  379. return c != c ? void 0 : c
  380. };
  381. p.substr = function (a, b, c) {
  382. if (null != b && 0 != b && null != c && 0 > c) return "";
  383. null == c && (c = a.length);
  384. 0 > b ? (b = a.length + b, 0 > b && (b = 0)) : 0 > c && (c = a.length + c - b);
  385. return a.substr(b,
  386. c)
  387. };
  388. p.remove = function (a, b) {
  389. var c = a.indexOf(b);
  390. if (-1 == c) return !1;
  391. a.splice(c, 1);
  392. return !0
  393. };
  394. p.iter = function (a) {
  395. return {
  396. cur: 0,
  397. arr: a,
  398. hasNext: function () {
  399. return this.cur < this.arr.length
  400. },
  401. next: function () {
  402. return this.arr[this.cur++]
  403. }
  404. }
  405. };
  406. var va = function () {};
  407. f.Lambda = va;
  408. va.__name__ = ["Lambda"];
  409. va.array = function (a) {
  410. for (var b = [], a = sc(a)(); a.hasNext();) {
  411. var c = a.next();
  412. b.push(c)
  413. }
  414. return b
  415. };
  416. va.count = function (a, b) {
  417. var c = 0;
  418. if (null == b)
  419. for (var e = sc(a)(); e.hasNext();) e.next(), c++;
  420. else
  421. for (e = sc(a)(); e.hasNext();) {
  422. var g = e.next();
  423. b(g) && c++
  424. }
  425. return c
  426. };
  427. va.indexOf = function (a, b) {
  428. for (var c = 0, e = sc(a)(); e.hasNext();) {
  429. var g = e.next();
  430. if (b == g) return c;
  431. c++
  432. }
  433. return -1
  434. };
  435. var fb = function () {
  436. this.length = 0
  437. };
  438. f.List = fb;
  439. fb.__name__ = ["List"];
  440. fb.prototype = {
  441. add: function (a) {
  442. a = [a];
  443. null == this.h ? this.h = a : this.q[1] = a;
  444. this.q = a;
  445. this.length++
  446. },
  447. iterator: function () {
  448. return {
  449. h: this.h,
  450. hasNext: function () {
  451. return null != this.h
  452. },
  453. next: function () {
  454. if (null == this.h) return null;
  455. var a = this.h[0];
  456. this.h = this.h[1];
  457. return a
  458. }
  459. }
  460. },
  461. __class__: fb
  462. };
  463. var W = function () {};
  464. f.Main = W;
  465. W.__name__ = ["Main"];
  466. W.main = function () {
  467. l.init();
  468. d.systemBgColor = 5459013;
  469. (new d(640, 960)).init.connect(W.onInit).once()
  470. };
  471. W.onInit = function () {
  472. W.lang = 'cn';//SG_Hooks.getLanguage("en,de,es,fr,it,pt,ru,tk".split(","));
  473. //SG_Hooks.setResizeHandler(d.onResizeCallback);
  474. //SG_Hooks.setOrientationHandler(d.onOrientationChangeCallback);
  475. if(W.lang == "cn") d.defaultFont = "default_font2";
  476. d.initFlipbooks([
  477. ["bl111", 3, 1, 0.5, 35, 35],
  478. ["bl112", 3, 1, 0.5, 35, 35],
  479. ["bl113", 3, 1, 0.5, 35, 35],
  480. ["fx/booster_fx", 2, 1, 0.2, 50, 40],
  481. ["fx/flash_fx", 2, 1, 0.2, 35, 35],
  482. ["fx/block_explosion1", 3, 1, 0.2, 48, 48],
  483. ["bottom_wheels",
  484. 3, 1, 0.5, 35, 35
  485. ]
  486. ]);
  487. fa.loadData();
  488. d.buttonClickSfx = "button_click_sfx";
  489. d.goToScene((new wa).root)
  490. };
  491. var Qb = function () {};
  492. f.IMap = Qb;
  493. Qb.__name__ = ["IMap"];
  494. Math.__name__ = ["Math"];
  495. var C = function (a, b, c, e) {
  496. null == e && (e = !1);
  497. this.sx = 1;
  498. this.cageEnt = null;
  499. this.gridX = a;
  500. this.gridY = b;
  501. this.type = c;
  502. this.drop = e;
  503. this.init()
  504. };
  505. f.Piece = C;
  506. C.__name__ = ["Piece"];
  507. C.prototype = {
  508. init: function () {
  509. var a = this;
  510. C.gridIsActive = !0;
  511. var b = "bl" + this.type;
  512. 30 <= this.type && 34 >= this.type && (b = "bl" + (this.type - 30));
  513. 111 == this.type && (b = "bl" + (111 + d.rand(3)));
  514. var c = this.getY();
  515. this.drop && (c = 70);
  516. this.pieceEnt = 111 == this.type ? d.addMovieSprite(i.ref.gridLayer, this.getX(), c, b, function () {
  517. var b = a.pieceEnt._compMap.Sprite_0;
  518. b.set_paused(!0);
  519. d.addDelay(a.pieceEnt, 3 + d.rand(40) / 10, function () {
  520. 0 != (b._flags & 16) ? b.set_paused(!1) : b.set_paused(!0);
  521. 1 == d.rand(2) ? b.setScaleXY(-1, 1) : b.setScaleXY(1, 1)
  522. }, !1)
  523. }) : d.addImageSprite(i.ref.gridLayer, this.getX(), c, b);
  524. 1 == d.rand(2) && (this.sx = -1);
  525. this.pieceEnt._compMap.Sprite_0.setScaleXY(this.sx, 1);
  526. this.pieceEnt.add(new ma);
  527. 30 <= this.type &&
  528. 34 >= this.type && (this.cageEnt = d.addImageSprite(this.pieceEnt, i.pieceWidth / 2 | 0, i.pieceHeight / 2 | 0, "cage"));
  529. 40 > this.type && this.pieceEnt._compMap.Disposer_2.connect1(this.pieceEnt._compMap.Sprite_0.get_pointerUp(), ea(this, this.onPointerUp));
  530. null == C.applyGravSlideAction && (C.applyGravSlideAction = new xa([new ga(function () {
  531. C.gridIsActive = !1;
  532. for (var a = i.ref.applyGravityDown(), b = 0, c = a.length; b < c;) {
  533. var d = b++;
  534. a[d].tweenOnGravityDown()
  535. }
  536. }), new na(0.2), new ga(function () {
  537. for (var b = i.ref.slideToLeft(), c = 0, h = b.length; c <
  538. h;) {
  539. var d = c++;
  540. b[d].tweenOnSlideLeft()
  541. }
  542. a.removePetsOnBottom()
  543. })]));
  544. this.drop && this.tweenOnInit();
  545. null == C.emt && (C.emtMold = new w(d.assets, "fx/explode"), C.emt = C.emtMold.createEmitter(), C.emt.disablePointer(), C.emt.setXY(0, -1E3), i.ref.gridLayer.parent.addChild((new D).add(C.emt)))
  546. },
  547. onPointerUp: function () {
  548. if (i.ref.coordsInGrid(this.gridX, this.gridY) && C.gridIsActive)
  549. if (5 <= this.type && 9 >= this.type) this.activateBonusColorBomb();
  550. else if (20 == this.type) this.activateBonusBomb();
  551. else {
  552. var a = this.deepMatchingNeighbours();
  553. if (0 < a.length) {
  554. t.playSfx("pop_sfx");
  555. this.unlockNeighbours(a);
  556. for (var b = 0, c = a.length; b < c;) {
  557. var e = b++;
  558. this.tweenOnRemove(a[e])
  559. }
  560. this.updateGrid(a.length)
  561. } else this.tweenShake()
  562. }
  563. },
  564. updateGrid: function (a) {
  565. this.updateScore(10 * a * a - 10 * a);
  566. i.ref.gridLayer._compMap.Script_3.run(C.applyGravSlideAction);
  567. var b = null,
  568. b = d.addDelay(i.ref.gridLayer, 0.6, function () {
  569. i.ref.needForGravity() || i.ref.needForSlideToLeft() ? i.ref.gridLayer._compMap.Script_3.run(C.applyGravSlideAction) : (b._compMap.Script_3.stopAll(), i.ref.updateGridView(),
  570. i.ref.gridLayer.parent._compMap.GameSceneComp_8.updateGame(), C.gridIsActive = !0)
  571. }, !0)
  572. },
  573. updateScore: function (a) {
  574. if (0 < a) {
  575. i.ref.gridLayer.parent._compMap.GameSceneComp_8.updateScore(a);
  576. var b = d.localPointerX(),
  577. c = d.localPointerY(),
  578. e = 0;
  579. 111 == this.type && (e = 50);
  580. var g;
  581. g = d.addLabel(i.ref.gridLayer.parent, b, c, "" + a, 1, 1, !0, "score_font2")._compMap.Sprite_0;
  582. g.disablePointer();
  583. var h = x["int"](g.getNaturalWidth() / 2);
  584. b < h && g.x.set__(1.4 * h + 20);
  585. b + h > d.width && g.x.set__(d.width - 1.4 * h - 20);
  586. g.setScale(0.8);
  587. L.tween(g, 0.8, {
  588. y: g.y._value -
  589. 120 - e,
  590. scaleX: 1.4,
  591. scaleY: 1.4
  592. }, 0, null, q.cubeOut);
  593. L.tween(g, 0.6, {
  594. y: g.y._value + 20,
  595. alpha: 0
  596. }, 0.7, function () {
  597. g.dispose()
  598. }, q.cubeIn);
  599. e = "";
  600. 420 == a && (e = d.settings.get(W.lang + ".enfx1"));
  601. 560 == a && (e = d.settings.get(W.lang + ".enfx2"));
  602. 720 == a && (e = d.settings.get(W.lang + ".enfx3"));
  603. 900 <= a && (e = d.settings.get(W.lang + ".enfx4"));
  604. var f;
  605. f = d.addLabel(i.ref.gridLayer.parent, d.halfWidth, d.halfHeight, e, 0.1, 1, !0)._compMap.Sprite_0;
  606. f.disablePointer();
  607. a = 6;
  608. 0 == d.rand(2) && (a *= -1);
  609. L.tween(f, 0.6, {
  610. scaleX: 1.8,
  611. scaleY: 1.8,
  612. y: f.y._value - 120 -
  613. d.rand(40),
  614. rotation: a
  615. }, 0, function () {
  616. f.dispose()
  617. }, q.backOut);
  618. C.emt.setXY(b, c);
  619. C.emt.restart()
  620. }
  621. },
  622. removePetsOnBottom: function () {
  623. for (var a = i.ref.getPetsOnBottom(), b = 0, c = a.length; b < c;) {
  624. var e = b++;
  625. this.updateScore(1E3);
  626. i.ref.gridLayer.parent._compMap.GameSceneComp_8.cRescuedPets++;
  627. this.tweenOnRemove(a[e])
  628. }
  629. },
  630. unlockNeighbours: function (a) {
  631. for (var b = 0, c = a.length; b < c;)
  632. for (var e = b++, e = a[e].neighbours(), g = 0, h = e.length; g < h;) {
  633. var d = g++;
  634. null != e[d] && 30 <= e[d].type && 34 >= e[d].type && (e[d].type -= 30, null != e[d].cageEnt &&
  635. e[d].cageEnt.dispose())
  636. }
  637. },
  638. activateBonusColorBomb: function () {
  639. var a = i.ref.getPiecesOfType(this.type - 5);
  640. this.unlockNeighbours(a);
  641. for (var b = 0, c = a.length; b < c;) {
  642. var e = b++;
  643. this.tweenOnRemove(a[e])
  644. }
  645. this.makeExplosion(this.getX(), this.getY());
  646. this.tweenOnRemove(this);
  647. t.playSfx("bonus_sfx", 0.6);
  648. i.ref.gridLayer._compMap.Script_3.run(new ya(10, 0, 0.5));
  649. this.updateGrid(a.length)
  650. },
  651. chainedExplBonusColorBomb: function () {
  652. var a = i.ref.getPiecesOfType(this.type - 5);
  653. this.unlockNeighbours(a);
  654. for (var b = 0, c = a.length; b < c;) {
  655. var e =
  656. b++;
  657. this.tweenOnRemove(a[e])
  658. }
  659. this.makeExplosion(this.getX(), this.getY());
  660. this.tweenOnRemove(this);
  661. return a.length
  662. },
  663. activateBonusBomb: function () {
  664. for (var a = i.ref.getPiecesAroundPiece(this), b = [], c = 0, e = 0, g = a.length; e < g;) {
  665. var h = e++;
  666. 4 >= a[h].type || 40 == a[h].type ? (this.tweenOnRemove(a[h]), c++) : 30 <= a[h].type && 34 >= a[h].type ? (a[h].type -= 30, null != a[h].cageEnt && a[h].cageEnt.dispose()) : 20 == a[h].type && a[h] != this && b.push(a[h])
  667. }
  668. this.makeExplosion(this.getX(), this.getY());
  669. this.tweenOnRemove(this);
  670. t.playSfx("bonus_sfx",
  671. 0.6);
  672. a = 0;
  673. for (e = b.length; a < e;) g = a++, c += b[g].chainedExplBonusBomb();
  674. i.ref.gridLayer._compMap.Script_3.run(new ya(10, 0, 0.5));
  675. this.updateGrid(c)
  676. },
  677. chainedExplBonusBomb: function () {
  678. for (var a = i.ref.getPiecesAroundPiece(this), b = [], c = 0, e = 0, g = a.length; e < g;) {
  679. var h = e++;
  680. 4 >= a[h].type || 40 == a[h].type ? (this.tweenOnRemove(a[h]), c++) : 30 <= a[h].type && 34 >= a[h].type ? (a[h].type -= 30, null != a[h].cageEnt && a[h].cageEnt.dispose()) : 20 == a[h].type && a[h] != this && b.push(a[h])
  681. }
  682. this.makeExplosion(this.getX(), this.getY());
  683. this.tweenOnRemove(this);
  684. a = 0;
  685. for (e = b.length; a < e;) g = a++, c += b[g].chainedExplBonusBomb();
  686. return c
  687. },
  688. activateBooster: function (a, b, c, e) {
  689. var g = [];
  690. "row" == b ? g = i.ref.getRow(a) : "column" == b && (g = i.ref.getColumn(a));
  691. if ("row" == b) {
  692. var h;
  693. h = d.addMovieSprite(i.ref.gridLayer, c, e - i.ref.gridLayer._compMap.Sprite_0.y._value, "fx/booster_fx")._compMap.Sprite_0;
  694. var f;
  695. f = d.addMovieSprite(i.ref.gridLayer, c, e - i.ref.gridLayer._compMap.Sprite_0.y._value, "fx/booster_fx")._compMap.Sprite_0;
  696. f.setRotation(180);
  697. L.tween(h, 0.4, {
  698. x: d.width + 100
  699. }, 0, function () {
  700. h.dispose()
  701. },
  702. q.backIn);
  703. L.tween(f, 0.4, {
  704. x: -100
  705. }, 0, function () {
  706. f.dispose()
  707. }, q.backIn)
  708. }
  709. c = a = 0;
  710. for (e = g.length; c < e;) {
  711. var j = c++;
  712. if ("column" == b && 222 != g[j].type && 111 != g[j].type) {
  713. var y = [d.addMovieSprite(i.ref.gridLayer, g[j].getX(), g[j].getY(), "fx/flash_fx")._compMap.Sprite_0];
  714. y[0].setRotation(90);
  715. d.addDelay(y[0].owner, 0.4, function (a) {
  716. return function () {
  717. a[0].dispose()
  718. }
  719. }(y))
  720. }
  721. 4 >= g[j].type || 40 == g[j].type ? (this.tweenOnRemove(g[j]), a++) : 30 <= g[j].type && 34 >= g[j].type ? (g[j].type -= 30, null != g[j].cageEnt && g[j].cageEnt.dispose()) : 20 ==
  722. g[j].type ? a += g[j].chainedExplBonusBomb() : 5 <= g[j].type && 9 >= g[j].type && (a += g[j].chainedExplBonusColorBomb())
  723. }
  724. i.ref.gridLayer._compMap.Script_3.run(new ya(10, 0, 0.5));
  725. this.updateGrid(a)
  726. },
  727. makeExplosion: function (a, b) {
  728. var c = 0,
  729. e = new D;
  730. i.ref.gridLayer.addChild(e);
  731. d.addDelay(i.ref.gridLayer, 0.05, function () {
  732. 5 > c ? e.add(d.initImageSpriteComp(a, b, "fx/explosion_" + c, 0.7)) : e.dispose();
  733. c++
  734. }, !0, 6)
  735. },
  736. getX: function () {
  737. return this.gridX * (i.pieceWidth + i.gap) + (i.gap / 2 | 0) + i.offsetX
  738. },
  739. getY: function () {
  740. return this.gridY * (i.pieceHeight +
  741. i.gap) + (i.gap / 2 | 0) + i.offsetY
  742. },
  743. tweenOnInit: function () {
  744. this.tweenOnGravityDown()
  745. },
  746. tweenOnRemove: function (a) {
  747. i.ref.grid[a.gridY][a.gridX] = null;
  748. if (4 >= a.type) {
  749. var b = null,
  750. b = d.addMovieSprite(i.ref.gridLayer, a.getX(), a.getY(), "fx/block_explosion1", function () {
  751. b.dispose()
  752. }, 0.7, 0.4);
  753. b._compMap.Sprite_0.disablePointer();
  754. L.tween(b._compMap.Sprite_0, 0.1, {
  755. scaleX: 1.3,
  756. scaleY: 1.3
  757. }, 0, null, q.backIn)
  758. }
  759. a.pieceEnt._compMap.Sprite_0.setAlpha(0.7);
  760. var c = 0;
  761. 111 == a.type && (c = 0.2);
  762. L.tween(a.pieceEnt._compMap.Sprite_0, 0.3, {
  763. alpha: 0.5,
  764. scaleX: 0 * this.sx,
  765. scaleY: 0
  766. }, c, function () {
  767. a.pieceEnt.dispose();
  768. a = null
  769. }, q.backIn)
  770. },
  771. tweenOnSlideLeft: function () {
  772. var a = this;
  773. C.gridIsActive = !1;
  774. this.pieceEnt._compMap.Sprite_0.x.animateTo(this.getX(), 0.3, q.backInOut);
  775. L.tween(this.pieceEnt._compMap.Sprite_0, 0.1, {
  776. rotation: 10,
  777. scaleX: 0.7 * this.sx
  778. }, 0.1, function () {
  779. L.tween(a.pieceEnt._compMap.Sprite_0, 0.2, {
  780. rotation: 0,
  781. scaleX: a.sx
  782. }, 0, null, q.backOut)
  783. }, q.backIn)
  784. },
  785. tweenOnGravityDown: function () {
  786. var a = this;
  787. C.gridIsActive = !1;
  788. this.pieceEnt._compMap.Sprite_0.y.animateTo(this.getY(),
  789. 0.3, q.backIn);
  790. L.tween(this.pieceEnt._compMap.Sprite_0, 0.15, {
  791. scaleX: 1.2 * this.sx,
  792. scaleY: 0.9
  793. }, 0.2, function () {
  794. L.tween(a.pieceEnt._compMap.Sprite_0, 0.25, {
  795. scaleX: a.sx,
  796. scaleY: 1
  797. }, 0, null, q.bounceOut)
  798. }, q.cubeIn)
  799. },
  800. tweenShake: function () {
  801. t.playSfx("no_match_sfx", 0.5);
  802. this.pieceEnt._compMap.Sprite_0.x.set__(this.getX());
  803. this.pieceEnt._compMap.Sprite_0.y.set__(this.getY());
  804. this.pieceEnt._compMap.Script_3.run(new ya(10, 0, 0.3))
  805. },
  806. relativeCoordinates: function (a, b) {
  807. return new la(this.gridX + b * a.x, this.gridY + b * a.y)
  808. },
  809. neighbours: function () {
  810. return i.ref.neighboursOf(this)
  811. },
  812. matchingNeighbours: function () {
  813. for (var a = [], b = this.neighbours(), c, e = 0, g = b.length; e < g;) c = e++, c = b[c], null != c && c.type == this.type && 4 >= this.type && a.push(c);
  814. return a
  815. },
  816. deepMatchingNeighbours: function () {
  817. var a = [],
  818. b = null,
  819. b = function (c) {
  820. for (var c = c.matchingNeighbours(), e = 0, g = c.length; e < g;) {
  821. var h = e++,
  822. h = c[h]; - 1 == va.indexOf(a, h) && (a.push(h), b(h))
  823. }
  824. };
  825. b(this);
  826. return a
  827. },
  828. __class__: C
  829. };
  830. var F = function () {};
  831. f.Reflect = F;
  832. F.__name__ = ["Reflect"];
  833. F.field = function (a, b) {
  834. try {
  835. return a[b]
  836. } catch (c) {
  837. return null
  838. }
  839. };
  840. F.getProperty = function (a,
  841. b) {
  842. var c;
  843. return null == a ? null : a.__properties__ && (c = a.__properties__["get_" + b]) ? a[c]() : a[b]
  844. };
  845. F.callMethod = function (a, b, c) {
  846. return b.apply(a, c)
  847. };
  848. F.fields = function (a) {
  849. var b = [];
  850. if (null != a) {
  851. var c = Object.prototype.hasOwnProperty,
  852. e;
  853. for (e in a) "__id__" != e && "hx__closures__" != e && c.call(a, e) && b.push(e)
  854. }
  855. return b
  856. };
  857. F.isFunction = function (a) {
  858. return "function" == typeof a && !(a.__name__ || a.__ename__)
  859. };
  860. F.deleteField = function (a, b) {
  861. if (!Object.prototype.hasOwnProperty.call(a, b)) return !1;
  862. delete a[b];
  863. return !0
  864. };
  865. var x = function () {};
  866. f.Std = x;
  867. x.__name__ = ["Std"];
  868. x.is = function (a, b) {
  869. return N.__instanceof(a, b)
  870. };
  871. x.string = function (a) {
  872. return N.__string_rec(a, "")
  873. };
  874. x["int"] = function (a) {
  875. return a | 0
  876. };
  877. x.parseInt = function (a) {
  878. var b = parseInt(a, 10);
  879. if (0 == b && (120 == p.cca(a, 1) || 88 == p.cca(a, 1))) b = parseInt(a);
  880. return isNaN(b) ? null : b
  881. };
  882. x.parseFloat = function (a) {
  883. return parseFloat(a)
  884. };
  885. x.random = function (a) {
  886. return 0 >= a ? 0 : Math.floor(Math.random() * a)
  887. };
  888. var Ga = function () {
  889. this.b = ""
  890. };
  891. f.StringBuf = Ga;
  892. Ga.__name__ = ["StringBuf"];
  893. Ga.prototype = {
  894. add: function (a) {
  895. this.b +=
  896. x.string(a)
  897. },
  898. addSub: function (a, b, c) {
  899. this.b = null == c ? this.b + p.substr(a, b, null) : this.b + p.substr(a, b, c)
  900. },
  901. __class__: Ga
  902. };
  903. var I = function () {};
  904. f.StringTools = I;
  905. I.__name__ = ["StringTools"];
  906. I.startsWith = function (a, b) {
  907. return a.length >= b.length && p.substr(a, 0, b.length) == b
  908. };
  909. I.replace = function (a, b, c) {
  910. return a.split(b).join(c)
  911. };
  912. I.fastCodeAt = function (a, b) {
  913. return a.charCodeAt(b)
  914. };
  915. var v = f.ValueType = {
  916. __ename__: ["ValueType"],
  917. __constructs__: "TNull,TInt,TFloat,TBool,TObject,TFunction,TClass,TEnum,TUnknown".split(",")
  918. };
  919. v.TNull = ["TNull", 0];
  920. v.TNull.toString = s;
  921. v.TNull.__enum__ = v;
  922. v.TInt = ["TInt", 1];
  923. v.TInt.toString = s;
  924. v.TInt.__enum__ = v;
  925. v.TFloat = ["TFloat", 2];
  926. v.TFloat.toString = s;
  927. v.TFloat.__enum__ = v;
  928. v.TBool = ["TBool", 3];
  929. v.TBool.toString = s;
  930. v.TBool.__enum__ = v;
  931. v.TObject = ["TObject", 4];
  932. v.TObject.toString = s;
  933. v.TObject.__enum__ = v;
  934. v.TFunction = ["TFunction", 5];
  935. v.TFunction.toString = s;
  936. v.TFunction.__enum__ = v;
  937. v.TClass = function (a) {
  938. a = ["TClass", 6, a];
  939. a.__enum__ = v;
  940. a.toString = s;
  941. return a
  942. };
  943. v.TEnum = function (a) {
  944. a = ["TEnum", 7, a];
  945. a.__enum__ = v;
  946. a.toString = s;
  947. return a
  948. };
  949. v.TUnknown = ["TUnknown", 8];
  950. v.TUnknown.toString = s;
  951. v.TUnknown.__enum__ = v;
  952. var H = function () {};
  953. f.Type = H;
  954. H.__name__ = ["Type"];
  955. H.getClass = function (a) {
  956. return null == a ? null : a instanceof Array && null == a.__enum__ ? Array : a.__class__
  957. };
  958. H.getClassName = function (a) {
  959. return a.__name__.join(".")
  960. };
  961. H.getEnumName = function (a) {
  962. return a.__ename__.join(".")
  963. };
  964. H.resolveClass = function (a) {
  965. a = f[a];
  966. return null == a || !a.__name__ ? null : a
  967. };
  968. H.resolveEnum = function (a) {
  969. a = f[a];
  970. return null == a || !a.__ename__ ? null : a
  971. };
  972. H.createEmptyInstance = function (a) {
  973. function b() {}
  974. b.prototype = a.prototype;
  975. return new b
  976. };
  977. H.createEnum = function (a, b, c) {
  978. var e = F.field(a, b);
  979. if (null == e) throw "No such constructor " + b;
  980. if (F.isFunction(e)) {
  981. if (null == c) throw "Constructor " + b + " need parameters";
  982. return e.apply(a, c)
  983. }
  984. if (null != c && 0 != c.length) throw "Constructor " + b + " does not need parameters";
  985. return e
  986. };
  987. H.getEnumConstructs = function (a) {
  988. return a.__constructs__.slice()
  989. };
  990. H["typeof"] = function (a) {
  991. switch (typeof a) {
  992. case "boolean":
  993. return v.TBool;
  994. case "string":
  995. return v.TClass(String);
  996. case "number":
  997. return Math.ceil(a) ==
  998. a % 2147483648 ? v.TInt : v.TFloat;
  999. case "object":
  1000. if (null == a) return v.TNull;
  1001. var b = a.__enum__;
  1002. if (null != b) return v.TEnum(b);
  1003. a = a instanceof Array && null == a.__enum__ ? Array : a.__class__;
  1004. return null != a ? v.TClass(a) : v.TObject;
  1005. case "function":
  1006. return a.__name__ || a.__ename__ ? v.TObject : v.TFunction;
  1007. case "undefined":
  1008. return v.TNull;
  1009. default:
  1010. return v.TUnknown
  1011. }
  1012. };
  1013. f.XmlType = {
  1014. __ename__: ["XmlType"],
  1015. __constructs__: []
  1016. };
  1017. var o = function () {};
  1018. f.Xml = o;
  1019. o.__name__ = ["Xml"];
  1020. o.parse = function (a) {
  1021. return ra.parse(a)
  1022. };
  1023. o.createElement = function (a) {
  1024. var b =
  1025. new o;
  1026. b.nodeType = o.Element;
  1027. b._children = [];
  1028. b._attributes = new O;
  1029. b.set_nodeName(a);
  1030. return b
  1031. };
  1032. o.createPCData = function (a) {
  1033. var b = new o;
  1034. b.nodeType = o.PCData;
  1035. b.set_nodeValue(a);
  1036. return b
  1037. };
  1038. o.createCData = function (a) {
  1039. var b = new o;
  1040. b.nodeType = o.CData;
  1041. b.set_nodeValue(a);
  1042. return b
  1043. };
  1044. o.createComment = function (a) {
  1045. var b = new o;
  1046. b.nodeType = o.Comment;
  1047. b.set_nodeValue(a);
  1048. return b
  1049. };
  1050. o.createDocType = function (a) {
  1051. var b = new o;
  1052. b.nodeType = o.DocType;
  1053. b.set_nodeValue(a);
  1054. return b
  1055. };
  1056. o.createProcessingInstruction = function (a) {
  1057. var b = new o;
  1058. b.nodeType =
  1059. o.ProcessingInstruction;
  1060. b.set_nodeValue(a);
  1061. return b
  1062. };
  1063. o.createDocument = function () {
  1064. var a = new o;
  1065. a.nodeType = o.Document;
  1066. a._children = [];
  1067. return a
  1068. };
  1069. o.prototype = {
  1070. get_nodeName: function () {
  1071. if (this.nodeType != o.Element) throw "bad nodeType";
  1072. return this._nodeName
  1073. },
  1074. set_nodeName: function (a) {
  1075. if (this.nodeType != o.Element) throw "bad nodeType";
  1076. return this._nodeName = a
  1077. },
  1078. set_nodeValue: function (a) {
  1079. if (this.nodeType == o.Element || this.nodeType == o.Document) throw "bad nodeType";
  1080. return this._nodeValue = a
  1081. },
  1082. get: function (a) {
  1083. if (this.nodeType !=
  1084. o.Element) throw "bad nodeType";
  1085. return this._attributes.get(a)
  1086. },
  1087. set: function (a, b) {
  1088. if (this.nodeType != o.Element) throw "bad nodeType";
  1089. this._attributes.set(a, b)
  1090. },
  1091. exists: function (a) {
  1092. if (this.nodeType != o.Element) throw "bad nodeType";
  1093. return this._attributes.exists(a)
  1094. },
  1095. elements: function () {
  1096. if (null == this._children) throw "bad nodetype";
  1097. return {
  1098. cur: 0,
  1099. x: this._children,
  1100. hasNext: function () {
  1101. for (var a = this.cur, b = this.x.length; a < b && !(this.x[a].nodeType == o.Element);) a += 1;
  1102. this.cur = a;
  1103. return a < b
  1104. },
  1105. next: function () {
  1106. for (var a = this.cur,
  1107. b = this.x.length; a < b;) {
  1108. var c = this.x[a],
  1109. a = a + 1;
  1110. if (c.nodeType == o.Element) return this.cur = a, c
  1111. }
  1112. return null
  1113. }
  1114. }
  1115. },
  1116. firstElement: function () {
  1117. if (null == this._children) throw "bad nodetype";
  1118. for (var a = 0, b = this._children.length; a < b;) {
  1119. var c = this._children[a];
  1120. if (c.nodeType == o.Element) return c;
  1121. a++
  1122. }
  1123. return null
  1124. },
  1125. addChild: function (a) {
  1126. if (null == this._children) throw "bad nodetype";
  1127. null != a._parent && p.remove(a._parent._children, a);
  1128. a._parent = this;
  1129. this._children.push(a)
  1130. },
  1131. __class__: o,
  1132. __properties__: {
  1133. set_nodeValue: "set_nodeValue",
  1134. set_nodeName: "set_nodeName",
  1135. get_nodeName: "get_nodeName"
  1136. }
  1137. };
  1138. var ha = function () {};
  1139. f["flambe.util.Disposable"] = ha;
  1140. ha.__name__ = ["flambe", "util", "Disposable"];
  1141. ha.prototype = {
  1142. __class__: ha
  1143. };
  1144. var E = function () {};
  1145. f["flambe.Component"] = E;
  1146. E.__name__ = ["flambe", "Component"];
  1147. E.__interfaces__ = [ha];
  1148. E.prototype = {
  1149. onAdded: function () {},
  1150. onRemoved: function () {},
  1151. onUpdate: function () {},
  1152. dispose: function () {
  1153. null != this.owner && this.owner.remove(this)
  1154. },
  1155. get_name: function () {
  1156. return null
  1157. },
  1158. init: function (a, b) {
  1159. this.owner = a;
  1160. this.next = b
  1161. },
  1162. __class__: E,
  1163. __properties__: {
  1164. get_name: "get_name"
  1165. }
  1166. };
  1167. var sa = function () {
  1168. this._disposables = []
  1169. };
  1170. f["flambe.Disposer"] = sa;
  1171. sa.__name__ = ["flambe", "Disposer"];
  1172. sa.__super__ = E;
  1173. sa.prototype = z(E.prototype, {
  1174. get_name: function () {
  1175. return "Disposer_2"
  1176. },
  1177. add: function (a) {
  1178. this._disposables.push(a);
  1179. return this
  1180. },
  1181. connect0: function (a, b) {
  1182. this.add(a.connect(b));
  1183. return this
  1184. },
  1185. connect1: function (a, b) {
  1186. this.add(a.connect(b));
  1187. return this
  1188. },
  1189. onRemoved: function () {
  1190. this.freeDisposables()
  1191. },
  1192. dispose: function () {
  1193. E.prototype.dispose.call(this);
  1194. this.freeDisposables()
  1195. },
  1196. freeDisposables: function () {
  1197. var a =
  1198. this._disposables;
  1199. this._disposables = [];
  1200. for (var b = 0; b < a.length;) {
  1201. var c = a[b];
  1202. ++b;
  1203. c.dispose()
  1204. }
  1205. },
  1206. __class__: sa
  1207. });
  1208. var D = function () {
  1209. this.parent = this.firstChild = this.next = this.firstComponent = null;
  1210. this._compMap = {}
  1211. };
  1212. f["flambe.Entity"] = D;
  1213. D.__name__ = ["flambe", "Entity"];
  1214. D.__interfaces__ = [ha];
  1215. D.prototype = {
  1216. add: function (a) {
  1217. null != a.owner && a.owner.remove(a);
  1218. var b = a.get_name(),
  1219. c = this._compMap[b];
  1220. null != c && this.remove(c);
  1221. this._compMap[b] = a;
  1222. b = null;
  1223. for (c = this.firstComponent; null != c;) b = c, c = c.next;
  1224. null != b ? b.next = a : this.firstComponent =
  1225. a;
  1226. a.init(this, null);
  1227. a.onAdded();
  1228. return this
  1229. },
  1230. remove: function (a) {
  1231. for (var b = null, c = this.firstComponent; null != c;) {
  1232. var e = c.next;
  1233. if (c == a) return null == b ? this.firstComponent = e : b.init(this, e), delete this._compMap[c.get_name()], c.onRemoved(), c.init(null, null), !0;
  1234. b = c;
  1235. c = e
  1236. }
  1237. return !1
  1238. },
  1239. addChild: function (a, b) {
  1240. null == b && (b = !0);
  1241. null != a.parent && a.parent.removeChild(a);
  1242. a.parent = this;
  1243. if (b) {
  1244. for (var c = null, e = this.firstChild; null != e;) c = e, e = e.next;
  1245. null != c ? c.next = a : this.firstChild = a
  1246. } else a.next = this.firstChild, this.firstChild =
  1247. a;
  1248. return this
  1249. },
  1250. removeChild: function (a) {
  1251. for (var b = null, c = this.firstChild; null != c;) {
  1252. var e = c.next;
  1253. if (c == a) {
  1254. null == b ? this.firstChild = e : b.next = e;
  1255. c.parent = null;
  1256. c.next = null;
  1257. break
  1258. }
  1259. b = c;
  1260. c = e
  1261. }
  1262. },
  1263. disposeChildren: function () {
  1264. for (; null != this.firstChild;) this.firstChild.dispose()
  1265. },
  1266. dispose: function () {
  1267. for (null != this.parent && this.parent.removeChild(this); null != this.firstComponent;) this.firstComponent.dispose();
  1268. this.disposeChildren()
  1269. },
  1270. __class__: D
  1271. };
  1272. var tc = function () {};
  1273. f["flambe.util.PackageLog"] = tc;
  1274. tc.__name__ = ["flambe",
  1275. "util", "PackageLog"
  1276. ];
  1277. var Rb = function () {};
  1278. f["flambe.platform.Platform"] = Rb;
  1279. Rb.__name__ = ["flambe", "platform", "Platform"];
  1280. Rb.prototype = {
  1281. __class__: Rb
  1282. };
  1283. var ta = function () {};
  1284. f["flambe.platform.html.HtmlPlatform"] = ta;
  1285. ta.__name__ = ["flambe", "platform", "html", "HtmlPlatform"];
  1286. ta.__interfaces__ = [Rb];
  1287. ta.prototype = {
  1288. init: function () {
  1289. var a = this;
  1290. u.fixAndroidMath();
  1291. var b = null;
  1292. try {
  1293. b = window.flambe.canvas
  1294. } catch (c) {}
  1295. b.setAttribute("tabindex", "0");
  1296. b.style.outlineStyle = "none";
  1297. b.style.webkitTapHighlightColor = "transparent";
  1298. b.setAttribute("moz-opaque", "true");
  1299. this._stage = new Ha(b);
  1300. this._pointer = new Q;
  1301. this._mouse = new gb(this._pointer, b);
  1302. this._renderer = this.createRenderer(b);
  1303. this.mainLoop = new Ia;
  1304. this.musicPlaying = !1;
  1305. this._canvas = b;
  1306. this._container = b.parentElement;
  1307. this._container.style.overflow = "visible";
  1308. this._container.style.position = "relative";
  1309. this._container.style.msTouchAction = "none";
  1310. var e = 0,
  1311. g = function (c) {
  1312. if (!(1E3 > c.timeStamp - e)) {
  1313. var g = b.getBoundingClientRect(),
  1314. d = a.getX(c, g),
  1315. g = a.getY(c, g);
  1316. switch (c.type) {
  1317. case "mousedown":
  1318. c.target ==
  1319. b && (c.preventDefault(), a._mouse.submitDown(d, g, c.button), b.focus());
  1320. break;
  1321. case "mousemove":
  1322. a._mouse.submitMove(d, g);
  1323. break;
  1324. case "mouseup":
  1325. a._mouse.submitUp(d, g, c.button);
  1326. break;
  1327. case "mousewheel":
  1328. case "DOMMouseScroll":
  1329. a._mouse.submitScroll(d, g, "mousewheel" == c.type ? c.wheelDelta / 40 : -c.detail) && c.preventDefault()
  1330. }
  1331. }
  1332. };
  1333. window.addEventListener("mousedown", g, !1);
  1334. window.addEventListener("mousemove", g, !1);
  1335. window.addEventListener("mouseup", g, !1);
  1336. b.addEventListener("mousewheel", g, !1);
  1337. b.addEventListener("DOMMouseScroll",
  1338. g, !1);
  1339. b.addEventListener("contextmenu", function (a) {
  1340. a.preventDefault()
  1341. }, !1);
  1342. var h = "undefined" != typeof window.ontouchstart,
  1343. g = "msMaxTouchPoints" in window.navigator && 1 < window.navigator.msMaxTouchPoints;
  1344. if (h || g) {
  1345. var d = new hb(this._pointer, h ? 4 : window.navigator.msMaxTouchPoints);
  1346. this._touch = d;
  1347. g = function (b) {
  1348. var c;
  1349. c = h ? b.changedTouches : [b];
  1350. var g = b.target.getBoundingClientRect();
  1351. e = b.timeStamp;
  1352. switch (b.type) {
  1353. case "touchstart":
  1354. case "MSPointerDown":
  1355. case "pointerdown":
  1356. b.preventDefault();
  1357. u.SHOULD_HIDE_MOBILE_BROWSER &&
  1358. u.hideMobileBrowser();
  1359. for (b = 0; b < c.length;) {
  1360. var j = c[b];
  1361. ++b;
  1362. var f = a.getX(j, g),
  1363. y = a.getY(j, g);
  1364. d.submitDown((h ? j.identifier : j.pointerId) | 0, f, y)
  1365. }
  1366. break;
  1367. case "touchmove":
  1368. case "MSPointerMove":
  1369. case "pointermove":
  1370. b.preventDefault();
  1371. for (b = 0; b < c.length;) j = c[b], ++b, f = a.getX(j, g), y = a.getY(j, g), d.submitMove((h ? j.identifier : j.pointerId) | 0, f, y);
  1372. break;
  1373. case "touchend":
  1374. case "touchcancel":
  1375. case "MSPointerUp":
  1376. case "pointerup":
  1377. for (b = 0; b < c.length;) j = c[b], ++b, f = a.getX(j, g), y = a.getY(j, g), d.submitUp((h ? j.identifier : j.pointerId) |
  1378. 0, f, y)
  1379. }
  1380. };
  1381. h ? (b.addEventListener("touchstart", g, !1), b.addEventListener("touchmove", g, !1), b.addEventListener("touchend", g, !1), b.addEventListener("touchcancel", g, !1)) : (b.addEventListener("MSPointerDown", g, !1), b.addEventListener("MSPointerMove", g, !1), b.addEventListener("MSPointerUp", g, !1))
  1382. } else this._touch = new ib;
  1383. var j = window.onerror;
  1384. window.onerror = function (a, b, c) {
  1385. l.uncaughtError.emit(a);
  1386. return null != j ? j(a, b, c) : !1
  1387. };
  1388. var f = u.loadExtension("hidden", window.document);
  1389. null != f.value ? (g = function () {
  1390. l.hidden.set__(F.field(window.document,
  1391. f.field))
  1392. }, g(null), window.document.addEventListener(f.prefix + "visibilitychange", g, !1)) : (g = function (a) {
  1393. l.hidden.set__("pagehide" == a.type)
  1394. }, window.addEventListener("pageshow", g, !1), window.addEventListener("pagehide", g, !1));
  1395. l.hidden.get_changed().connect(function (b) {
  1396. b || (a._skipFrame = !0)
  1397. });
  1398. this._skipFrame = !1;
  1399. this._lastUpdate = Date.now();
  1400. var i = u.loadExtension("requestAnimationFrame").value,
  1401. g = u.loadExtension("requestAnimationFrame").prefix;
  1402. if (null != i && "webkit" != g) {
  1403. var m = window.performance,
  1404. k = null != m && u.polyfill("now",
  1405. m);
  1406. k ? this._lastUpdate = m.now() : null;
  1407. var n = null,
  1408. n = function (c) {
  1409. a.update(k ? m.now() : c);
  1410. i(n, b)
  1411. };
  1412. i(n, b)
  1413. } else window.setInterval(function () {
  1414. a.update(Date.now())
  1415. }, 16);
  1416. Ra.info("Initialized HTML platform", ["renderer", this._renderer.get_type()])
  1417. },
  1418. loadAssetPack: function (a) {
  1419. return (new B(this, a)).promise
  1420. },
  1421. getStage: function () {
  1422. return this._stage
  1423. },
  1424. getStorage: function () {
  1425. if (null == this._storage) {
  1426. var a = uc.getLocalStorage();
  1427. this._storage = null != a ? new jb(a) : new kb
  1428. }
  1429. return this._storage
  1430. },
  1431. update: function (a) {
  1432. var b = (a - this._lastUpdate) /
  1433. 1E3;
  1434. this._lastUpdate = a;
  1435. l.hidden._value || (this._skipFrame ? this._skipFrame = !1 : (this.mainLoop.update(b), this.mainLoop.render(this._renderer)))
  1436. },
  1437. getPointer: function () {
  1438. return this._pointer
  1439. },
  1440. getWeb: function () {
  1441. null == this._web && (this._web = new lb(this._container));
  1442. return this._web
  1443. },
  1444. getRenderer: function () {
  1445. return this._renderer
  1446. },
  1447. getX: function (a, b) {
  1448. return (a.clientX - b.left) * this._stage.get_width() / b.width
  1449. },
  1450. getY: function (a, b) {
  1451. return (a.clientY - b.top) * this._stage.get_height() / b.height
  1452. },
  1453. createRenderer: function (a) {
  1454. return new Ja(a)
  1455. },
  1456. __class__: ta
  1457. };
  1458. var S = function (a, b) {
  1459. this._value = a;
  1460. this._changed = null != b ? new Sa(b) : null
  1461. };
  1462. f["flambe.util.Value"] = S;
  1463. S.__name__ = ["flambe", "util", "Value"];
  1464. S.prototype = {
  1465. watch: function (a) {
  1466. a(this._value, this._value);
  1467. return this.get_changed().connect(a)
  1468. },
  1469. set__: function (a) {
  1470. var b = this._value;
  1471. a != b && (this._value = a, null != this._changed && this._changed.emit(a, b));
  1472. return a
  1473. },
  1474. get_changed: function () {
  1475. null == this._changed && (this._changed = new Sa);
  1476. return this._changed
  1477. },
  1478. __class__: S,
  1479. __properties__: {
  1480. get_changed: "get_changed",
  1481. set__: "set__"
  1482. }
  1483. };
  1484. var Ka = function (a, b) {
  1485. this._next = null;
  1486. this._signal = a;
  1487. this._listener = b;
  1488. this.stayInList = !0
  1489. };
  1490. f["flambe.util.SignalConnection"] = Ka;
  1491. Ka.__name__ = ["flambe", "util", "SignalConnection"];
  1492. Ka.__interfaces__ = [ha];
  1493. Ka.prototype = {
  1494. once: function () {
  1495. this.stayInList = !1;
  1496. return this
  1497. },
  1498. dispose: function () {
  1499. null != this._signal && (this._signal.disconnect(this), this._signal = null)
  1500. },
  1501. __class__: Ka
  1502. };
  1503. var P = function (a) {
  1504. this._head = null != a ? new Ka(this, a) : null;
  1505. this._deferredTasks = null
  1506. };
  1507. f["flambe.util.SignalBase"] = P;
  1508. P.__name__ = ["flambe", "util",
  1509. "SignalBase"
  1510. ];
  1511. P.prototype = {
  1512. connectImpl: function (a, b) {
  1513. var c = this,
  1514. e = new Ka(this, a);
  1515. this._head == P.DISPATCHING_SENTINEL ? this.defer(function () {
  1516. c.listAdd(e, b)
  1517. }) : this.listAdd(e, b);
  1518. return e
  1519. },
  1520. disconnect: function (a) {
  1521. var b = this;
  1522. this._head == P.DISPATCHING_SENTINEL ? this.defer(function () {
  1523. b.listRemove(a)
  1524. }) : this.listRemove(a)
  1525. },
  1526. defer: function (a) {
  1527. for (var b = null, c = this._deferredTasks; null != c;) b = c, c = c.next;
  1528. a = new Sb(a);
  1529. null != b ? b.next = a : this._deferredTasks = a
  1530. },
  1531. willEmit: function () {
  1532. var a = this._head;
  1533. this._head = P.DISPATCHING_SENTINEL;
  1534. return a
  1535. },
  1536. didEmit: function (a) {
  1537. this._head = a;
  1538. a = this._deferredTasks;
  1539. for (this._deferredTasks = null; null != a;) a.fn(), a = a.next
  1540. },
  1541. listAdd: function (a, b) {
  1542. if (b) a._next = this._head, this._head = a;
  1543. else {
  1544. for (var c = null, e = this._head; null != e;) c = e, e = e._next;
  1545. null != c ? c._next = a : this._head = a
  1546. }
  1547. },
  1548. listRemove: function (a) {
  1549. for (var b = null, c = this._head; null != c;) {
  1550. if (c == a) {
  1551. a = c._next;
  1552. null == b ? this._head = a : b._next = a;
  1553. break
  1554. }
  1555. b = c;
  1556. c = c._next
  1557. }
  1558. },
  1559. __class__: P
  1560. };
  1561. var Sa = function (a) {
  1562. P.call(this, a)
  1563. };
  1564. f["flambe.util.Signal2"] = Sa;
  1565. Sa.__name__ = ["flambe", "util",
  1566. "Signal2"
  1567. ];
  1568. Sa.__super__ = P;
  1569. Sa.prototype = z(P.prototype, {
  1570. connect: function (a, b) {
  1571. null == b && (b = !1);
  1572. return this.connectImpl(a, b)
  1573. },
  1574. emit: function (a, b) {
  1575. var c = this;
  1576. this._head == P.DISPATCHING_SENTINEL ? this.defer(function () {
  1577. c.emitImpl(a, b)
  1578. }) : this.emitImpl(a, b)
  1579. },
  1580. emitImpl: function (a, b) {
  1581. for (var c = this.willEmit(), e = c; null != e;) e._listener(a, b), e.stayInList || e.dispose(), e = e._next;
  1582. this.didEmit(c)
  1583. },
  1584. __class__: Sa
  1585. });
  1586. var G = function (a) {
  1587. P.call(this, a)
  1588. };
  1589. f["flambe.util.Signal1"] = G;
  1590. G.__name__ = ["flambe", "util", "Signal1"];
  1591. G.__super__ =
  1592. P;
  1593. G.prototype = z(P.prototype, {
  1594. connect: function (a, b) {
  1595. null == b && (b = !1);
  1596. return this.connectImpl(a, b)
  1597. },
  1598. emit: function (a) {
  1599. var b = this;
  1600. this._head == P.DISPATCHING_SENTINEL ? this.defer(function () {
  1601. b.emitImpl(a)
  1602. }) : this.emitImpl(a)
  1603. },
  1604. emitImpl: function (a) {
  1605. for (var b = this.willEmit(), c = b; null != c;) c._listener(a), c.stayInList || c.dispose(), c = c._next;
  1606. this.didEmit(b)
  1607. },
  1608. __class__: G
  1609. });
  1610. var n = function (a, b) {
  1611. this._behavior = null;
  1612. S.call(this, a, b)
  1613. };
  1614. f["flambe.animation.AnimatedFloat"] = n;
  1615. n.__name__ = ["flambe", "animation", "AnimatedFloat"];
  1616. n.__super__ = S;
  1617. n.prototype = z(S.prototype, {
  1618. set__: function (a) {
  1619. this._behavior = null;
  1620. return S.prototype.set__.call(this, a)
  1621. },
  1622. update: function (a) {
  1623. null != this._behavior && (S.prototype.set__.call(this, this._behavior.update(a)), this._behavior.isComplete() && (this._behavior = null))
  1624. },
  1625. animateTo: function (a, b, c) {
  1626. this.set_behavior(new La(this._value, a, b, c))
  1627. },
  1628. animateBy: function (a, b, c) {
  1629. this.set_behavior(new La(this._value, this._value + a, b, c))
  1630. },
  1631. set_behavior: function (a) {
  1632. this._behavior = a;
  1633. this.update(0);
  1634. return a
  1635. },
  1636. __class__: n,
  1637. __properties__: z(S.prototype.__properties__, {
  1638. set_behavior: "set_behavior"
  1639. })
  1640. });
  1641. var l = function () {};
  1642. f["flambe.System"] = l;
  1643. l.__name__ = ["flambe", "System"];
  1644. l.init = function () {
  1645. l._calledInit || (l._platform.init(), l._calledInit = !0)
  1646. };
  1647. l.loadAssetPack = function (a) {
  1648. return l._platform.loadAssetPack(a)
  1649. };
  1650. var Ra = function () {};
  1651. f["flambe.Log"] = Ra;
  1652. Ra.__name__ = ["flambe", "Log"];
  1653. Ra.info = function () {
  1654. null
  1655. };
  1656. Ra.__super__ = tc;
  1657. Ra.prototype = z(tc.prototype, {
  1658. __class__: Ra
  1659. });
  1660. var Tb = function () {
  1661. this._realDt = 0
  1662. };
  1663. f["flambe.SpeedAdjuster"] = Tb;
  1664. Tb.__name__ = ["flambe", "SpeedAdjuster"];
  1665. Tb.__super__ = E;
  1666. Tb.prototype = z(E.prototype, {
  1667. get_name: function () {
  1668. return "SpeedAdjuster_6"
  1669. },
  1670. onUpdate: function (a) {
  1671. 0 < this._realDt && (a = this._realDt, this._realDt = 0);
  1672. this.scale.update(a)
  1673. },
  1674. __class__: Tb
  1675. });
  1676. var mb = function () {};
  1677. f["flambe.animation.Behavior"] = mb;
  1678. mb.__name__ = ["flambe", "animation", "Behavior"];
  1679. mb.prototype = {
  1680. __class__: mb
  1681. };
  1682. var q = function () {};
  1683. f["flambe.animation.Ease"] = q;
  1684. q.__name__ = ["flambe", "animation", "Ease"];
  1685. q.linear = function (a) {
  1686. return a
  1687. };
  1688. q.quadIn = function (a) {
  1689. return a *
  1690. a
  1691. };
  1692. q.quadOut = function (a) {
  1693. return a * (2 - a)
  1694. };
  1695. q.cubeIn = function (a) {
  1696. return a * a * a
  1697. };
  1698. q.cubeOut = function (a) {
  1699. return 1 + --a * a * a
  1700. };
  1701. q.bounceOut = function (a) {
  1702. return 0.36363636363636365 > a ? 7.5625 * a * a : 0.7272727272727273 > a ? 7.5625 * (a - 0.5454545454545454) * (a - 0.5454545454545454) + 0.75 : 0.9090909090909091 > a ? 7.5625 * (a - 0.8181818181818182) * (a - 0.8181818181818182) + 0.9375 : 7.5625 * (a - 0.9545454545454546) * (a - 0.9545454545454546) + 0.984375
  1703. };
  1704. q.circInOut = function (a) {
  1705. return 0.5 >= a ? (Math.sqrt(1 - 4 * a * a) - 1) / -2 : (Math.sqrt(1 - (2 * a - 2) * (2 * a - 2)) + 1) / 2
  1706. };
  1707. q.backIn = function (a) {
  1708. return a * a * (2.70158 * a - 1.70158)
  1709. };
  1710. q.backOut = function (a) {
  1711. return 1 - --a * a * (-2.70158 * a - 1.70158)
  1712. };
  1713. q.backInOut = function (a) {
  1714. a *= 2;
  1715. if (1 > a) return a * a * (2.70158 * a - 1.70158) / 2;
  1716. a -= 2;
  1717. return (1 - a * a * (-2.70158 * a - 1.70158)) / 2 + 0.5
  1718. };
  1719. var Ta = function (a, b) {
  1720. this.base = a;
  1721. this.strength = b
  1722. };
  1723. f["flambe.animation.Jitter"] = Ta;
  1724. Ta.__name__ = ["flambe", "animation", "Jitter"];
  1725. Ta.__interfaces__ = [mb];
  1726. Ta.prototype = {
  1727. update: function () {
  1728. return this.base + 2 * Math.random() * this.strength - this.strength
  1729. },
  1730. isComplete: function () {
  1731. return !1
  1732. },
  1733. __class__: Ta
  1734. };
  1735. var La = function (a, b, c, e) {
  1736. this._from = a;
  1737. this._to = b;
  1738. this._duration = c;
  1739. this.elapsed = 0;
  1740. this._easing = null != e ? e : q.linear
  1741. };
  1742. f["flambe.animation.Tween"] = La;
  1743. La.__name__ = ["flambe", "animation", "Tween"];
  1744. La.__interfaces__ = [mb];
  1745. La.prototype = {
  1746. update: function (a) {
  1747. this.elapsed += a;
  1748. return this.elapsed >= this._duration ? this._to : this._from + (this._to - this._from) * this._easing(this.elapsed / this._duration)
  1749. },
  1750. isComplete: function () {
  1751. return this.elapsed >= this._duration
  1752. },
  1753. __class__: La
  1754. };
  1755. var za = function () {};
  1756. f["flambe.asset.Asset"] =
  1757. za;
  1758. za.__name__ = ["flambe", "asset", "Asset"];
  1759. za.__interfaces__ = [ha];
  1760. za.prototype = {
  1761. __class__: za
  1762. };
  1763. var k = f["flambe.asset.AssetFormat"] = {
  1764. __ename__: ["flambe", "asset", "AssetFormat"],
  1765. __constructs__: "WEBP,JXR,PNG,JPG,GIF,DDS,PVR,PKM,MP3,M4A,OPUS,OGG,WAV,Data".split(",")
  1766. };
  1767. k.WEBP = ["WEBP", 0];
  1768. k.WEBP.toString = s;
  1769. k.WEBP.__enum__ = k;
  1770. k.JXR = ["JXR", 1];
  1771. k.JXR.toString = s;
  1772. k.JXR.__enum__ = k;
  1773. k.PNG = ["PNG", 2];
  1774. k.PNG.toString = s;
  1775. k.PNG.__enum__ = k;
  1776. k.JPG = ["JPG", 3];
  1777. k.JPG.toString = s;
  1778. k.JPG.__enum__ = k;
  1779. k.GIF = ["GIF", 4];
  1780. k.GIF.toString = s;
  1781. k.GIF.__enum__ =
  1782. k;
  1783. k.DDS = ["DDS", 5];
  1784. k.DDS.toString = s;
  1785. k.DDS.__enum__ = k;
  1786. k.PVR = ["PVR", 6];
  1787. k.PVR.toString = s;
  1788. k.PVR.__enum__ = k;
  1789. k.PKM = ["PKM", 7];
  1790. k.PKM.toString = s;
  1791. k.PKM.__enum__ = k;
  1792. k.MP3 = ["MP3", 8];
  1793. k.MP3.toString = s;
  1794. k.MP3.__enum__ = k;
  1795. k.M4A = ["M4A", 9];
  1796. k.M4A.toString = s;
  1797. k.M4A.__enum__ = k;
  1798. k.OPUS = ["OPUS", 10];
  1799. k.OPUS.toString = s;
  1800. k.OPUS.__enum__ = k;
  1801. k.OGG = ["OGG", 11];
  1802. k.OGG.toString = s;
  1803. k.OGG.__enum__ = k;
  1804. k.WAV = ["WAV", 12];
  1805. k.WAV.toString = s;
  1806. k.WAV.__enum__ = k;
  1807. k.Data = ["Data", 13];
  1808. k.Data.toString = s;
  1809. k.Data.__enum__ = k;
  1810. var Ub = function (a, b, c, e) {
  1811. this.name = a;
  1812. this.url = b;
  1813. this.format = c;
  1814. this.bytes = e
  1815. };
  1816. f["flambe.asset.AssetEntry"] = Ub;
  1817. Ub.__name__ = ["flambe", "asset", "AssetEntry"];
  1818. Ub.prototype = {
  1819. __class__: Ub
  1820. };
  1821. var nb = function () {};
  1822. f["flambe.asset.AssetPack"] = nb;
  1823. nb.__name__ = ["flambe", "asset", "AssetPack"];
  1824. nb.__interfaces__ = [ha];
  1825. nb.prototype = {
  1826. __class__: nb
  1827. };
  1828. var ob = function () {};
  1829. f["flambe.asset.File"] = ob;
  1830. ob.__name__ = ["flambe", "asset", "File"];
  1831. ob.__interfaces__ = [za];
  1832. ob.prototype = {
  1833. __class__: ob
  1834. };
  1835. var Y = function () {
  1836. this._localBase = this._remoteBase = null;
  1837. this._entries = []
  1838. };
  1839. f["flambe.asset.Manifest"] =
  1840. Y;
  1841. Y.__name__ = ["flambe", "asset", "Manifest"];
  1842. Y.fromAssets = function (a, b) {
  1843. null == b && (b = !0);
  1844. var c = F.field(vc.getType(Y).assets[0], a);
  1845. if (null == c) {
  1846. if (b) throw M.withFields("Missing asset pack", ["name", a]);
  1847. return null
  1848. }
  1849. var e = new Y;
  1850. e.set_localBase("assets");
  1851. for (var g = 0; g < c.length;) {
  1852. var d = c[g];
  1853. ++g;
  1854. var f = d.name,
  1855. j = a + "/" + f + "?v=" + x.string(d.md5),
  1856. y = Y.inferFormat(f);
  1857. y != k.Data && (f = M.removeFileExtension(f));
  1858. e.add(f, j, d.bytes, y)
  1859. }
  1860. return e
  1861. };
  1862. Y.inferFormat = function (a) {
  1863. a = M.getUrlExtension(a);
  1864. if (null != a) switch (a.toLowerCase()) {
  1865. case "gif":
  1866. return k.GIF;
  1867. case "jpg":
  1868. case "jpeg":
  1869. return k.JPG;
  1870. case "jxr":
  1871. case "wdp":
  1872. return k.JXR;
  1873. case "png":
  1874. return k.PNG;
  1875. case "webp":
  1876. return k.WEBP;
  1877. case "dds":
  1878. return k.DDS;
  1879. case "pvr":
  1880. return k.PVR;
  1881. case "pkm":
  1882. return k.PKM;
  1883. case "m4a":
  1884. return k.M4A;
  1885. case "mp3":
  1886. return k.MP3;
  1887. case "ogg":
  1888. return k.OGG;
  1889. case "opus":
  1890. return k.OPUS;
  1891. case "wav":
  1892. return k.WAV
  1893. } else null;
  1894. return k.Data
  1895. };
  1896. Y.prototype = {
  1897. add: function (a, b, c, e) {
  1898. null == c && (c = 0);
  1899. null == e && (e = Y.inferFormat(b));
  1900. a = new Ub(a, b, e, c);
  1901. this._entries.push(a);
  1902. return a
  1903. },
  1904. iterator: function () {
  1905. return p.iter(this._entries)
  1906. },
  1907. getFullURL: function (a) {
  1908. var b;
  1909. b = null != this.get_remoteBase() && Y._supportsCrossOrigin ? this.get_remoteBase() : this.get_localBase();
  1910. return null != b ? M.joinPath(b, a.url) : a.url
  1911. },
  1912. get_localBase: function () {
  1913. return this._localBase
  1914. },
  1915. set_localBase: function (a) {
  1916. null != a && wc.that(!I.startsWith(a, "http://") && !I.startsWith(a, "https://"), "localBase must be a path on the same domain, NOT starting with http(s)://", null);
  1917. return this._localBase = a
  1918. },
  1919. get_remoteBase: function () {
  1920. return this._remoteBase
  1921. },
  1922. __class__: Y,
  1923. __properties__: {
  1924. get_remoteBase: "get_remoteBase",
  1925. set_localBase: "set_localBase",
  1926. get_localBase: "get_localBase"
  1927. }
  1928. };
  1929. var T = f["flambe.display.BlendMode"] = {
  1930. __ename__: ["flambe", "display", "BlendMode"],
  1931. __constructs__: ["Normal", "Add", "Mask", "Copy"]
  1932. };
  1933. T.Normal = ["Normal", 0];
  1934. T.Normal.toString = s;
  1935. T.Normal.__enum__ = T;
  1936. T.Add = ["Add", 1];
  1937. T.Add.toString = s;
  1938. T.Add.__enum__ = T;
  1939. T.Mask = ["Mask", 2];
  1940. T.Mask.toString = s;
  1941. T.Mask.__enum__ = T;
  1942. T.Copy = ["Copy", 3];
  1943. T.Copy.toString = s;
  1944. T.Copy.__enum__ = T;
  1945. var ia = f["flambe.display.EmitterType"] = {
  1946. __ename__: ["flambe", "display", "EmitterType"],
  1947. __constructs__: ["Gravity",
  1948. "Radial"
  1949. ]
  1950. };
  1951. ia.Gravity = ["Gravity", 0];
  1952. ia.Gravity.toString = s;
  1953. ia.Gravity.__enum__ = ia;
  1954. ia.Radial = ["Radial", 1];
  1955. ia.Radial.toString = s;
  1956. ia.Radial.__enum__ = ia;
  1957. var w = function (a, b) {
  1958. for (var c = 0, e = 0, g = o.parse(a.getFile(b + ".pex").toString()).firstElement().elements(); g.hasNext();) {
  1959. var d = g.next();
  1960. switch (d.get_nodeName().toLowerCase()) {
  1961. case "texture":
  1962. this.texture = a.getTexture(M.removeFileExtension(d.get("name")));
  1963. break;
  1964. case "angle":
  1965. this.angle = w.getFloat(d, "value");
  1966. break;
  1967. case "anglevariance":
  1968. this.angleVariance = w.getFloat(d,
  1969. "value");
  1970. break;
  1971. case "blendfuncdestination":
  1972. e = x["int"](w.getFloat(d, "value"));
  1973. break;
  1974. case "blendfuncsource":
  1975. c = x["int"](w.getFloat(d, "value"));
  1976. break;
  1977. case "duration":
  1978. this.duration = w.getFloat(d, "value");
  1979. break;
  1980. case "emittertype":
  1981. this.type = 0 == x["int"](w.getFloat(d, "value")) ? ia.Gravity : ia.Radial;
  1982. break;
  1983. case "finishcolor":
  1984. this.alphaEnd = w.getFloat(d, "alpha");
  1985. break;
  1986. case "finishcolorvariance":
  1987. this.alphaEndVariance = w.getFloat(d, "alpha");
  1988. break;
  1989. case "finishparticlesize":
  1990. this.sizeEnd = w.getFloat(d, "value");
  1991. break;
  1992. case "finishparticlesizevariance":
  1993. this.sizeEndVariance =
  1994. w.getFloat(d, "value");
  1995. break;
  1996. case "gravity":
  1997. this.gravityX = w.getFloat(d, "x");
  1998. this.gravityY = w.getFloat(d, "y");
  1999. break;
  2000. case "maxparticles":
  2001. this.maxParticles = x["int"](w.getFloat(d, "value"));
  2002. break;
  2003. case "maxradius":
  2004. this.maxRadius = w.getFloat(d, "value");
  2005. break;
  2006. case "maxradiusvariance":
  2007. this.maxRadiusVariance = w.getFloat(d, "value");
  2008. break;
  2009. case "minradius":
  2010. this.minRadius = w.getFloat(d, "value");
  2011. break;
  2012. case "particlelifespan":
  2013. this.lifespan = w.getFloat(d, "value");
  2014. break;
  2015. case "particlelifespanvariance":
  2016. this.lifespanVariance =
  2017. w.getFloat(d, "value");
  2018. break;
  2019. case "radialaccelvariance":
  2020. this.radialAccelVariance = w.getFloat(d, "value");
  2021. break;
  2022. case "radialacceleration":
  2023. this.radialAccel = w.getFloat(d, "value");
  2024. break;
  2025. case "rotatepersecond":
  2026. this.rotatePerSecond = w.getFloat(d, "value");
  2027. break;
  2028. case "rotatepersecondvariance":
  2029. this.rotatePerSecondVariance = w.getFloat(d, "value");
  2030. break;
  2031. case "rotationend":
  2032. this.rotationEnd = w.getFloat(d, "value");
  2033. break;
  2034. case "rotationendvariance":
  2035. this.rotationEndVariance = w.getFloat(d, "value");
  2036. break;
  2037. case "rotationstart":
  2038. this.rotationStart =
  2039. w.getFloat(d, "value");
  2040. break;
  2041. case "rotationstartvariance":
  2042. this.rotationStartVariance = w.getFloat(d, "value");
  2043. break;
  2044. case "sourcepositionvariance":
  2045. this.emitXVariance = w.getFloat(d, "x");
  2046. this.emitYVariance = w.getFloat(d, "y");
  2047. break;
  2048. case "speed":
  2049. this.speed = w.getFloat(d, "value");
  2050. break;
  2051. case "speedvariance":
  2052. this.speedVariance = w.getFloat(d, "value");
  2053. break;
  2054. case "startcolor":
  2055. this.alphaStart = w.getFloat(d, "alpha");
  2056. break;
  2057. case "startcolorvariance":
  2058. this.alphaStartVariance = w.getFloat(d, "alpha");
  2059. break;
  2060. case "startparticlesize":
  2061. this.sizeStart =
  2062. w.getFloat(d, "value");
  2063. break;
  2064. case "startparticlesizevariance":
  2065. this.sizeStartVariance = w.getFloat(d, "value");
  2066. break;
  2067. case "tangentialaccelvariance":
  2068. this.tangentialAccelVariance = w.getFloat(d, "value");
  2069. break;
  2070. case "tangentialacceleration":
  2071. this.tangentialAccel = w.getFloat(d, "value")
  2072. }
  2073. }
  2074. 0 >= this.lifespan && (this.lifespan = this.duration);
  2075. 1 == c && 1 == e ? this.blendMode = T.Add : 1 == c && 771 == e ? this.blendMode = null : (0 != c || 0 != e) && null
  2076. };
  2077. f["flambe.display.EmitterMold"] = w;
  2078. w.__name__ = ["flambe", "display", "EmitterMold"];
  2079. w.getFloat = function (a,
  2080. b) {
  2081. return x.parseFloat(a.get(b))
  2082. };
  2083. w.prototype = {
  2084. createEmitter: function () {
  2085. return new J(this)
  2086. },
  2087. __class__: w
  2088. };
  2089. var r = function () {
  2090. this.blendMode = this.scissor = null;
  2091. var a = this;
  2092. this._flags = 139;
  2093. this._localMatrix = new Vb;
  2094. var b = function () {
  2095. a._flags |= 12
  2096. };
  2097. this.x = new n(0, b);
  2098. this.y = new n(0, b);
  2099. this.rotation = new n(0, b);
  2100. this.scaleX = new n(1, b);
  2101. this.scaleY = new n(1, b);
  2102. this.anchorX = new n(0, b);
  2103. this.anchorY = new n(0, b);
  2104. this.alpha = new n(1)
  2105. };
  2106. f["flambe.display.Sprite"] = r;
  2107. r.__name__ = ["flambe", "display", "Sprite"];
  2108. r.hitTest = function (a,
  2109. b, c) {
  2110. var e = a._compMap.Sprite_0;
  2111. if (null != e) {
  2112. if (3 != (e._flags & 3)) return null;
  2113. e.getLocalMatrix().inverseTransform(b, c, r._scratchPoint) && (b = r._scratchPoint.x, c = r._scratchPoint.y);
  2114. var g = e.scissor;
  2115. if (null != g && !g.contains(b, c)) return null
  2116. }
  2117. a = r.hitTestBackwards(a.firstChild, b, c);
  2118. return null != a ? a : null != e && e.containsLocal(b, c) ? e : null
  2119. };
  2120. r.render = function (a, b) {
  2121. var c = a._compMap.Sprite_0;
  2122. if (null != c) {
  2123. var e = c.alpha._value;
  2124. if (0 == (c._flags & 1) || 0 >= e) return;
  2125. b.save();
  2126. 1 > e && b.multiplyAlpha(e);
  2127. null != c.blendMode && b.setBlendMode(c.blendMode);
  2128. var e = c.getLocalMatrix(),
  2129. g = e.m02,
  2130. d = e.m12;
  2131. 0 != (c._flags & 128) && (g = Math.round(g), d = Math.round(d));
  2132. b.transform(e.m00, e.m10, e.m01, e.m11, g, d);
  2133. e = c.scissor;
  2134. null != e && b.applyScissor(e.x, e.y, e.width, e.height);
  2135. c.draw(b)
  2136. }
  2137. e = a._compMap.Director_5;
  2138. if (null != e) {
  2139. e = e.occludedScenes;
  2140. for (g = 0; g < e.length;) d = e[g], ++g, r.render(d, b)
  2141. }
  2142. for (e = a.firstChild; null != e;) g = e.next, r.render(e, b), e = g;
  2143. null != c && b.restore()
  2144. };
  2145. r.hitTestBackwards = function (a, b, c) {
  2146. if (null != a) {
  2147. var e = r.hitTestBackwards(a.next, b, c);
  2148. return null != e ? e : r.hitTest(a, b, c)
  2149. }
  2150. return null
  2151. };
  2152. r.__super__ = E;
  2153. r.prototype = z(E.prototype, {
  2154. get_name: function () {
  2155. return "Sprite_0"
  2156. },
  2157. getNaturalWidth: function () {
  2158. return 0
  2159. },
  2160. getNaturalHeight: function () {
  2161. return 0
  2162. },
  2163. containsLocal: function (a, b) {
  2164. return 0 <= a && a < this.getNaturalWidth() && 0 <= b && b < this.getNaturalHeight()
  2165. },
  2166. getLocalMatrix: function () {
  2167. 0 != (this._flags & 4) && (this._flags &= -5, this._localMatrix.compose(this.x._value, this.y._value, this.scaleX._value, this.scaleY._value, 3.141592653589793 * this.rotation._value / 180), this._localMatrix.translate(-this.anchorX._value, -this.anchorY._value));
  2168. return this._localMatrix
  2169. },
  2170. setAnchor: function (a, b) {
  2171. this.anchorX.set__(a);
  2172. this.anchorY.set__(b);
  2173. return this
  2174. },
  2175. centerAnchor: function () {
  2176. this.anchorX.set__(this.getNaturalWidth() / 2);
  2177. this.anchorY.set__(this.getNaturalHeight() / 2);
  2178. return this
  2179. },
  2180. setXY: function (a, b) {
  2181. this.x.set__(a);
  2182. this.y.set__(b);
  2183. return this
  2184. },
  2185. setAlpha: function (a) {
  2186. this.alpha.set__(a);
  2187. return this
  2188. },
  2189. setRotation: function (a) {
  2190. this.rotation.set__(a);
  2191. return this
  2192. },
  2193. setScale: function (a) {
  2194. this.scaleX.set__(a);
  2195. this.scaleY.set__(a);
  2196. return this
  2197. },
  2198. setScaleXY: function (a, b) {
  2199. this.scaleX.set__(a);
  2200. this.scaleY.set__(b);
  2201. return this
  2202. },
  2203. disablePointer: function () {
  2204. this.set_pointerEnabled(!1);
  2205. return this
  2206. },
  2207. onAdded: function () {
  2208. 0 != (this._flags & 256) && this.connectHover()
  2209. },
  2210. onRemoved: function () {
  2211. null != this._hoverConnection && (this._hoverConnection.dispose(), this._hoverConnection = null)
  2212. },
  2213. onUpdate: function (a) {
  2214. this.x.update(a);
  2215. this.y.update(a);
  2216. this.rotation.update(a);
  2217. this.scaleX.update(a);
  2218. this.scaleY.update(a);
  2219. this.alpha.update(a);
  2220. this.anchorX.update(a);
  2221. this.anchorY.update(a)
  2222. },
  2223. draw: function () {},
  2224. getParentSprite: function () {
  2225. if (null == this.owner) return null;
  2226. for (var a = this.owner.parent; null != a;) {
  2227. var b = a._compMap.Sprite_0;
  2228. if (null != b) return b;
  2229. a = a.parent
  2230. }
  2231. return null
  2232. },
  2233. get_pointerDown: function () {
  2234. null == this._pointerDown && (this._pointerDown = new G);
  2235. return this._pointerDown
  2236. },
  2237. get_pointerMove: function () {
  2238. null == this._pointerMove && (this._pointerMove = new G);
  2239. return this._pointerMove
  2240. },
  2241. get_pointerUp: function () {
  2242. null == this._pointerUp && (this._pointerUp = new G);
  2243. return this._pointerUp
  2244. },
  2245. connectHover: function () {
  2246. var a =
  2247. this;
  2248. null == this._hoverConnection && (this._hoverConnection = l._platform.getPointer().move.connect(function (b) {
  2249. for (var c = b.hit; null != c;) {
  2250. if (c == a) return;
  2251. c = c.getParentSprite()
  2252. }
  2253. null != a._pointerOut && 0 != (a._flags & 256) && a._pointerOut.emit(b);
  2254. a._flags &= -257;
  2255. a._hoverConnection.dispose();
  2256. a._hoverConnection = null
  2257. }))
  2258. },
  2259. set_visible: function (a) {
  2260. this._flags = pb.set(this._flags, 1, a);
  2261. return a
  2262. },
  2263. set_pointerEnabled: function (a) {
  2264. this._flags = pb.set(this._flags, 2, a);
  2265. return a
  2266. },
  2267. onPointerDown: function (a) {
  2268. this.onHover(a);
  2269. null != this._pointerDown &&
  2270. this._pointerDown.emit(a)
  2271. },
  2272. onPointerMove: function (a) {
  2273. this.onHover(a);
  2274. null != this._pointerMove && this._pointerMove.emit(a)
  2275. },
  2276. onHover: function (a) {
  2277. if (0 == (this._flags & 256) && (this._flags |= 256, null != this._pointerIn || null != this._pointerOut)) null != this._pointerIn && this._pointerIn.emit(a), this.connectHover()
  2278. },
  2279. onPointerUp: function (a) {
  2280. switch (a.source[1]) {
  2281. case 1:
  2282. null != this._pointerOut && 0 != (this._flags & 256) && this._pointerOut.emit(a), this._flags &= -257, null != this._hoverConnection && (this._hoverConnection.dispose(),
  2283. this._hoverConnection = null)
  2284. }
  2285. null != this._pointerUp && this._pointerUp.emit(a)
  2286. },
  2287. __class__: r,
  2288. __properties__: z(E.prototype.__properties__, {
  2289. set_pointerEnabled: "set_pointerEnabled",
  2290. set_visible: "set_visible",
  2291. get_pointerUp: "get_pointerUp",
  2292. get_pointerMove: "get_pointerMove",
  2293. get_pointerDown: "get_pointerDown"
  2294. })
  2295. });
  2296. var J = function (a) {
  2297. this._emitElapsed = this._totalElapsed = 0;
  2298. this.enabled = !0;
  2299. this.numParticles = 0;
  2300. r.call(this);
  2301. this.texture = a.texture;
  2302. this.blendMode = a.blendMode;
  2303. this.type = a.type;
  2304. this.alphaEnd = new n(a.alphaEnd);
  2305. this.alphaEndVariance = new n(a.alphaEndVariance);
  2306. this.alphaStart = new n(a.alphaStart);
  2307. this.alphaStartVariance = new n(a.alphaStartVariance);
  2308. this.angle = new n(a.angle);
  2309. this.angleVariance = new n(a.angleVariance);
  2310. this.duration = a.duration;
  2311. this.emitXVariance = new n(a.emitXVariance);
  2312. this.emitYVariance = new n(a.emitYVariance);
  2313. this.gravityX = new n(a.gravityX);
  2314. this.gravityY = new n(a.gravityY);
  2315. this.maxRadius = new n(a.maxRadius);
  2316. this.maxRadiusVariance = new n(a.maxRadiusVariance);
  2317. this.minRadius = new n(a.minRadius);
  2318. this.lifespan =
  2319. new n(a.lifespan);
  2320. this.lifespanVariance = new n(a.lifespanVariance);
  2321. this.radialAccel = new n(a.radialAccel);
  2322. this.radialAccelVariance = new n(a.radialAccelVariance);
  2323. this.rotatePerSecond = new n(a.rotatePerSecond);
  2324. this.rotatePerSecondVariance = new n(a.rotatePerSecondVariance);
  2325. this.rotationEnd = new n(a.rotationEnd);
  2326. this.rotationEndVariance = new n(a.rotationEndVariance);
  2327. this.rotationStart = new n(a.rotationStart);
  2328. this.rotationStartVariance = new n(a.rotationStartVariance);
  2329. this.sizeEnd = new n(a.sizeEnd);
  2330. this.sizeEndVariance =
  2331. new n(a.sizeEndVariance);
  2332. this.sizeStart = new n(a.sizeStart);
  2333. this.sizeStartVariance = new n(a.sizeStartVariance);
  2334. this.speed = new n(a.speed);
  2335. this.speedVariance = new n(a.speedVariance);
  2336. this.tangentialAccel = new n(a.tangentialAccel);
  2337. this.tangentialAccelVariance = new n(a.tangentialAccelVariance);
  2338. this.emitX = new n(0);
  2339. this.emitY = new n(0);
  2340. this._particles = Array(a.maxParticles);
  2341. for (var a = 0, b = this._particles.length; a < b;) this._particles[a] = new Wb, ++a
  2342. };
  2343. f["flambe.display.EmitterSprite"] = J;
  2344. J.__name__ = ["flambe", "display",
  2345. "EmitterSprite"
  2346. ];
  2347. J.random = function (a, b) {
  2348. 0 != b && (a += b * (2 * Math.random() - 1));
  2349. return a
  2350. };
  2351. J.__super__ = r;
  2352. J.prototype = z(r.prototype, {
  2353. restart: function () {
  2354. this.enabled = !0;
  2355. this._totalElapsed = 0
  2356. },
  2357. onUpdate: function (a) {
  2358. r.prototype.onUpdate.call(this, a);
  2359. this.alphaEnd.update(a);
  2360. this.alphaEndVariance.update(a);
  2361. this.alphaStart.update(a);
  2362. this.alphaStartVariance.update(a);
  2363. this.angle.update(a);
  2364. this.angleVariance.update(a);
  2365. this.emitX.update(a);
  2366. this.emitXVariance.update(a);
  2367. this.emitY.update(a);
  2368. this.emitYVariance.update(a);
  2369. this.gravityX.update(a);
  2370. this.gravityY.update(a);
  2371. this.lifespan.update(a);
  2372. this.lifespanVariance.update(a);
  2373. this.maxRadius.update(a);
  2374. this.maxRadiusVariance.update(a);
  2375. this.minRadius.update(a);
  2376. this.radialAccel.update(a);
  2377. this.radialAccelVariance.update(a);
  2378. this.rotatePerSecond.update(a);
  2379. this.rotatePerSecondVariance.update(a);
  2380. this.rotationEnd.update(a);
  2381. this.rotationEndVariance.update(a);
  2382. this.rotationStart.update(a);
  2383. this.rotationStartVariance.update(a);
  2384. this.sizeEnd.update(a);
  2385. this.sizeEndVariance.update(a);
  2386. this.sizeStart.update(a);
  2387. this.sizeStartVariance.update(a);
  2388. this.speed.update(a);
  2389. this.speedVariance.update(a);
  2390. this.tangentialAccel.update(a);
  2391. this.tangentialAccelVariance.update(a);
  2392. for (var b = this.type == ia.Gravity, c = 0; c < this.numParticles;) {
  2393. var e = this._particles[c];
  2394. if (e.life > a) {
  2395. if (b) {
  2396. e.x += e.velX * a;
  2397. e.y += e.velY * a;
  2398. var g = this.gravityX._value,
  2399. d = -this.gravityY._value;
  2400. if (0 != e.radialAccel || 0 != e.tangentialAccel) var f = e.x - e.emitX,
  2401. j = e.y - e.emitY,
  2402. y = Math.sqrt(f * f + j * j),
  2403. f = f / y,
  2404. j = j / y,
  2405. g = g + f * e.radialAccel,
  2406. d = d + j * e.radialAccel,
  2407. y = f,
  2408. g = g + -j * e.tangentialAccel,
  2409. d = d + y * e.tangentialAccel;
  2410. e.velX += g * a;
  2411. e.velY += d * a
  2412. } else e.radialRotation += e.velRadialRotation * a, e.radialRadius += e.velRadialRadius * a, g = e.radialRadius, e.x = this.emitX._value - Math.cos(e.radialRotation) * g, e.y = this.emitY._value - Math.sin(e.radialRotation) * g, g < this.minRadius._value && (e.life = 0);
  2413. e.scale += e.velScale * a;
  2414. e.rotation += e.velRotation * a;
  2415. e.alpha += e.velAlpha * a;
  2416. e.life -= a;
  2417. ++c
  2418. } else --this.numParticles, c != this.numParticles && (this._particles[c] = this._particles[this.numParticles], this._particles[this.numParticles] =
  2419. e)
  2420. }
  2421. if (this.enabled) {
  2422. if (0 < this.duration && (this._totalElapsed += a, this._totalElapsed >= this.duration)) {
  2423. this.enabled = !1;
  2424. return
  2425. }
  2426. b = this.lifespan._value / this._particles.length;
  2427. for (this._emitElapsed += a; this._emitElapsed >= b;) this.numParticles < this._particles.length && this.initParticle(this._particles[this.numParticles]) && ++this.numParticles, this._emitElapsed -= b
  2428. }
  2429. },
  2430. draw: function (a) {
  2431. for (var b = -this.texture.get_width() / 2, c = 0, e = this.numParticles; c < e;) {
  2432. var g = this._particles[c];
  2433. a.save();
  2434. a.translate(g.x, g.y);
  2435. 1 > g.alpha &&
  2436. a.multiplyAlpha(g.alpha);
  2437. 0 != g.rotation && a.rotate(g.rotation);
  2438. 1 != g.scale && a.scale(g.scale, g.scale);
  2439. a.drawTexture(this.texture, b, b);
  2440. a.restore();
  2441. ++c
  2442. }
  2443. },
  2444. initParticle: function (a) {
  2445. a.life = J.random(this.lifespan._value, this.lifespanVariance._value);
  2446. if (0 >= a.life) return !1;
  2447. a.emitX = this.emitX._value;
  2448. a.emitY = this.emitY._value;
  2449. var b = -Aa.toRadians(J.random(this.angle._value, this.angleVariance._value)),
  2450. c = J.random(this.speed._value, this.speedVariance._value);
  2451. a.velX = c * Math.cos(b);
  2452. a.velY = c * Math.sin(b);
  2453. a.radialAccel =
  2454. J.random(this.radialAccel._value, this.radialAccelVariance._value);
  2455. a.tangentialAccel = J.random(this.tangentialAccel._value, this.tangentialAccelVariance._value);
  2456. a.radialRadius = J.random(this.maxRadius._value, this.maxRadiusVariance._value);
  2457. a.velRadialRadius = -a.radialRadius / a.life;
  2458. a.radialRotation = b;
  2459. a.velRadialRotation = Aa.toRadians(J.random(this.rotatePerSecond._value, this.rotatePerSecondVariance._value));
  2460. this.type == ia.Gravity ? (a.x = J.random(this.emitX._value, this.emitXVariance._value), a.y = J.random(this.emitY._value,
  2461. this.emitYVariance._value)) : (b = a.radialRadius, a.x = this.emitX._value - Math.cos(a.radialRotation) * b, a.y = this.emitY._value - Math.sin(a.radialRotation) * b);
  2462. c = this.texture.get_width();
  2463. b = J.random(this.sizeStart._value, this.sizeStartVariance._value) / c;
  2464. c = J.random(this.sizeEnd._value, this.sizeEndVariance._value) / c;
  2465. a.scale = b;
  2466. a.velScale = (c - b) / a.life;
  2467. b = J.random(this.rotationStart._value, this.rotationStartVariance._value);
  2468. c = J.random(this.rotationEnd._value, this.rotationEndVariance._value);
  2469. a.rotation = b;
  2470. a.velRotation =
  2471. (c - b) / a.life;
  2472. b = J.random(this.alphaStart._value, this.alphaStartVariance._value);
  2473. c = J.random(this.alphaEnd._value, this.alphaEndVariance._value);
  2474. a.alpha = b;
  2475. a.velAlpha = (c - b) / a.life;
  2476. return !0
  2477. },
  2478. __class__: J
  2479. });
  2480. var Wb = function () {
  2481. this.emitX = this.emitY = this.x = this.velX = this.y = this.velY = this.radialRadius = this.velRadialRadius = this.radialRotation = this.velRadialRotation = this.radialAccel = this.tangentialAccel = this.scale = this.velScale = this.rotation = this.velRotation = this.alpha = this.velAlpha = this.life = 0
  2482. };
  2483. f["flambe.display._EmitterSprite.Particle"] =
  2484. Wb;
  2485. Wb.__name__ = ["flambe", "display", "_EmitterSprite", "Particle"];
  2486. Wb.prototype = {
  2487. __class__: Wb
  2488. };
  2489. var qb = function (a, b, c) {
  2490. r.call(this);
  2491. this.color = a;
  2492. this.width = new n(b);
  2493. this.height = new n(c)
  2494. };
  2495. f["flambe.display.FillSprite"] = qb;
  2496. qb.__name__ = ["flambe", "display", "FillSprite"];
  2497. qb.__super__ = r;
  2498. qb.prototype = z(r.prototype, {
  2499. draw: function (a) {
  2500. a.fillRect(this.color, 0, 0, this.width._value, this.height._value)
  2501. },
  2502. getNaturalWidth: function () {
  2503. return this.width._value
  2504. },
  2505. getNaturalHeight: function () {
  2506. return this.height._value
  2507. },
  2508. setSize: function (a,
  2509. b) {
  2510. this.width.set__(a);
  2511. this.height.set__(b);
  2512. return this
  2513. },
  2514. onUpdate: function (a) {
  2515. r.prototype.onUpdate.call(this, a);
  2516. this.width.update(a);
  2517. this.height.update(a)
  2518. },
  2519. __class__: qb
  2520. });
  2521. var rb = function (a) {
  2522. this._kernings = null;
  2523. this.xOffset = this.yOffset = this.xAdvance = 0;
  2524. this.page = null;
  2525. this.x = this.y = this.width = this.height = 0;
  2526. this.charCode = a
  2527. };
  2528. f["flambe.display.Glyph"] = rb;
  2529. rb.__name__ = ["flambe", "display", "Glyph"];
  2530. rb.prototype = {
  2531. draw: function (a, b, c) {
  2532. 0 < this.width && a.drawSubTexture(this.page, b + this.xOffset, c + this.yOffset, this.x,
  2533. this.y, this.width, this.height)
  2534. },
  2535. getKerning: function (a) {
  2536. return null != this._kernings ? x["int"](this._kernings.get(a)) : 0
  2537. },
  2538. setKerning: function (a, b) {
  2539. null == this._kernings && (this._kernings = new ba);
  2540. this._kernings.set(a, b)
  2541. },
  2542. __class__: rb
  2543. };
  2544. var Ma = function (a, b) {
  2545. this.name = b;
  2546. this._pack = a;
  2547. this.reload()
  2548. };
  2549. f["flambe.display.Font"] = Ma;
  2550. Ma.__name__ = ["flambe", "display", "Font"];
  2551. Ma.prototype = {
  2552. layoutText: function (a, b, c, e, g) {
  2553. null == g && (g = 0);
  2554. null == e && (e = 0);
  2555. null == c && (c = 0);
  2556. null == b && (b = K.Left);
  2557. return new Ba(this, a, b, c, e, g)
  2558. },
  2559. reload: function () {
  2560. this._glyphs =
  2561. new ba;
  2562. this._glyphs.set(Ma.NEWLINE.charCode, Ma.NEWLINE);
  2563. for (var a = new Na(this._pack.getFile(this.name + ".fnt").toString()), b = new ba, c = this.name.lastIndexOf("/"), c = 0 <= c ? p.substr(this.name, 0, c + 1) : "", e = a.keywords(); e.hasNext();) switch (e.next()) {
  2564. case "info":
  2565. for (var g = a.pairs(); g.hasNext();) {
  2566. var d = g.next();
  2567. switch (d.key) {
  2568. case "size":
  2569. this.size = d.getInt()
  2570. }
  2571. }
  2572. break;
  2573. case "common":
  2574. for (g = a.pairs(); g.hasNext();) switch (d = g.next(), d.key) {
  2575. case "lineHeight":
  2576. this.lineHeight = d.getInt()
  2577. }
  2578. break;
  2579. case "page":
  2580. for (var g = 0, d =
  2581. null, f = a.pairs(); f.hasNext();) {
  2582. var j = f.next();
  2583. switch (j.key) {
  2584. case "id":
  2585. g = j.getInt();
  2586. break;
  2587. case "file":
  2588. d = j.getString()
  2589. }
  2590. }
  2591. d = this._pack.getTexture(c + M.removeFileExtension(d));
  2592. b.set(g, d);
  2593. break;
  2594. case "char":
  2595. g = null;
  2596. for (d = a.pairs(); d.hasNext();) switch (f = d.next(), f.key) {
  2597. case "id":
  2598. g = new rb(f.getInt());
  2599. break;
  2600. case "x":
  2601. g.x = f.getInt();
  2602. break;
  2603. case "y":
  2604. g.y = f.getInt();
  2605. break;
  2606. case "width":
  2607. g.width = f.getInt();
  2608. break;
  2609. case "height":
  2610. g.height = f.getInt();
  2611. break;
  2612. case "page":
  2613. f = f.getInt();
  2614. g.page = b.get(f);
  2615. break;
  2616. case "xoffset":
  2617. g.xOffset =
  2618. f.getInt();
  2619. break;
  2620. case "yoffset":
  2621. g.yOffset = f.getInt();
  2622. break;
  2623. case "xadvance":
  2624. g.xAdvance = f.getInt()
  2625. }
  2626. this._glyphs.set(g.charCode, g);
  2627. break;
  2628. case "kerning":
  2629. g = null;
  2630. f = d = 0;
  2631. for (j = a.pairs(); j.hasNext();) {
  2632. var y = j.next();
  2633. switch (y.key) {
  2634. case "first":
  2635. g = this._glyphs.get(y.getInt());
  2636. break;
  2637. case "second":
  2638. d = y.getInt();
  2639. break;
  2640. case "amount":
  2641. f = y.getInt()
  2642. }
  2643. }
  2644. null != g && 0 != f && g.setKerning(d, f)
  2645. }
  2646. },
  2647. __class__: Ma
  2648. };
  2649. var K = f["flambe.display.TextAlign"] = {
  2650. __ename__: ["flambe", "display", "TextAlign"],
  2651. __constructs__: ["Left", "Center", "Right"]
  2652. };
  2653. K.Left = ["Left", 0];
  2654. K.Left.toString = s;
  2655. K.Left.__enum__ = K;
  2656. K.Center = ["Center", 1];
  2657. K.Center.toString = s;
  2658. K.Center.__enum__ = K;
  2659. K.Right = ["Right", 2];
  2660. K.Right.toString = s;
  2661. K.Right.__enum__ = K;
  2662. var Ba = function (a, b, c, e, g, d) {
  2663. this.lines = 0;
  2664. var f = this;
  2665. this._font = a;
  2666. this._glyphs = [];
  2667. this._offsets = [];
  2668. this._lineOffset = Math.round(a.lineHeight + d);
  2669. this.bounds = new sb;
  2670. for (var j = [], d = b.length, y = 0; y < d;) {
  2671. var i = y++,
  2672. i = b.charCodeAt(i),
  2673. i = a._glyphs.get(i);
  2674. null != i ? this._glyphs.push(i) : null
  2675. }
  2676. for (var b = -1, m = 0, k = 0, a = a._glyphs.get(10), d = function () {
  2677. f.bounds.width =
  2678. Aa.max(f.bounds.width, m);
  2679. f.bounds.height += k;
  2680. j[f.lines] = m;
  2681. k = m = 0;
  2682. ++f.lines
  2683. }, y = 0; y < this._glyphs.length;) {
  2684. i = this._glyphs[y];
  2685. this._offsets[y] = Math.round(m);
  2686. var l = 0 < e && m + i.width > e;
  2687. l || i == a ? (l && (0 <= b ? (this._glyphs[b] = a, m = this._offsets[b], y = b) : this._glyphs.splice(y, 0, a)), b = -1, k = this._lineOffset, d()) : (32 == i.charCode && (b = y), m += i.xAdvance + g, k = Aa.max(k, i.height + i.yOffset), y + 1 < this._glyphs.length && (m += i.getKerning(this._glyphs[y + 1].charCode)));
  2688. ++y
  2689. }
  2690. d();
  2691. g = 0;
  2692. a = Ba.getAlignOffset(c, j[0], e);
  2693. b = 1.79769313486231E308;
  2694. d = -1.79769313486231E308;
  2695. i = y = 0;
  2696. for (l = this._glyphs.length; i < l;) {
  2697. var n = this._glyphs[i];
  2698. 10 == n.charCode && (g += this._lineOffset, ++y, a = Ba.getAlignOffset(c, j[y], e));
  2699. this._offsets[i] += a;
  2700. var o = g + n.yOffset;
  2701. b < o || (b = o);
  2702. d = Aa.max(d, o + n.height);
  2703. ++i
  2704. }
  2705. this.bounds.x = Ba.getAlignOffset(c, this.bounds.width, e);
  2706. this.bounds.y = b;
  2707. this.bounds.height = d - b
  2708. };
  2709. f["flambe.display.TextLayout"] = Ba;
  2710. Ba.__name__ = ["flambe", "display", "TextLayout"];
  2711. Ba.getAlignOffset = function (a, b, c) {
  2712. switch (a[1]) {
  2713. case 0:
  2714. return 0;
  2715. case 2:
  2716. return c - b;
  2717. case 1:
  2718. return Math.round((c -
  2719. b) / 2)
  2720. }
  2721. };
  2722. Ba.prototype = {
  2723. draw: function (a) {
  2724. for (var b = 0, c = 0, e = this._glyphs.length; c < e;) {
  2725. var g = this._glyphs[c];
  2726. 10 == g.charCode ? b += this._lineOffset : g.draw(a, this._offsets[c], b);
  2727. ++c
  2728. }
  2729. },
  2730. __class__: Ba
  2731. };
  2732. var Na = function (a) {
  2733. this._configText = a;
  2734. this._keywordPattern = new $("([A-Za-z]+)(.*)", "");
  2735. this._pairPattern = new $('([A-Za-z]+)=("[^"]*"|[^\\s]+)', "")
  2736. };
  2737. f["flambe.display._Font.ConfigParser"] = Na;
  2738. Na.__name__ = ["flambe", "display", "_Font", "ConfigParser"];
  2739. Na.advance = function (a, b) {
  2740. var c = b.matchedPos();
  2741. return p.substr(a, c.pos +
  2742. c.len, a.length)
  2743. };
  2744. Na.prototype = {
  2745. keywords: function () {
  2746. var a = this,
  2747. b = this._configText;
  2748. return {
  2749. next: function () {
  2750. b = Na.advance(b, a._keywordPattern);
  2751. a._pairText = a._keywordPattern.matched(2);
  2752. return a._keywordPattern.matched(1)
  2753. },
  2754. hasNext: function () {
  2755. return a._keywordPattern.match(b)
  2756. }
  2757. }
  2758. },
  2759. pairs: function () {
  2760. var a = this,
  2761. b = this._pairText;
  2762. return {
  2763. next: function () {
  2764. b = Na.advance(b, a._pairPattern);
  2765. return new Xb(a._pairPattern.matched(1), a._pairPattern.matched(2))
  2766. },
  2767. hasNext: function () {
  2768. return a._pairPattern.match(b)
  2769. }
  2770. }
  2771. },
  2772. __class__: Na
  2773. };
  2774. var Xb = function (a, b) {
  2775. this.key = a;
  2776. this._value = b
  2777. };
  2778. f["flambe.display._Font.ConfigPair"] = Xb;
  2779. Xb.__name__ = ["flambe", "display", "_Font", "ConfigPair"];
  2780. Xb.prototype = {
  2781. getInt: function () {
  2782. return x.parseInt(this._value)
  2783. },
  2784. getString: function () {
  2785. return 34 != this._value.charCodeAt(0) ? null : p.substr(this._value, 1, this._value.length - 2)
  2786. },
  2787. __class__: Xb
  2788. };
  2789. var Yb = function () {};
  2790. f["flambe.display.Graphics"] = Yb;
  2791. Yb.__name__ = ["flambe", "display", "Graphics"];
  2792. Yb.prototype = {
  2793. __class__: Yb
  2794. };
  2795. var Ua = function (a) {
  2796. r.call(this);
  2797. this.texture = a
  2798. };
  2799. f["flambe.display.ImageSprite"] =
  2800. Ua;
  2801. Ua.__name__ = ["flambe", "display", "ImageSprite"];
  2802. Ua.__super__ = r;
  2803. Ua.prototype = z(r.prototype, {
  2804. draw: function (a) {
  2805. null != this.texture && a.drawTexture(this.texture, 0, 0)
  2806. },
  2807. getNaturalWidth: function () {
  2808. return null != this.texture ? this.texture.get_width() : 0
  2809. },
  2810. getNaturalHeight: function () {
  2811. return null != this.texture ? this.texture.get_height() : 0
  2812. },
  2813. __class__: Ua
  2814. });
  2815. var ja = f["flambe.display.Orientation"] = {
  2816. __ename__: ["flambe", "display", "Orientation"],
  2817. __constructs__: ["Portrait", "Landscape"]
  2818. };
  2819. ja.Portrait = ["Portrait", 0];
  2820. ja.Portrait.toString =
  2821. s;
  2822. ja.Portrait.__enum__ = ja;
  2823. ja.Landscape = ["Landscape", 1];
  2824. ja.Landscape.toString = s;
  2825. ja.Landscape.__enum__ = ja;
  2826. var tb = function () {};
  2827. f["flambe.display.Texture"] = tb;
  2828. tb.__name__ = ["flambe", "display", "Texture"];
  2829. tb.__interfaces__ = [za];
  2830. tb.prototype = {
  2831. __class__: tb
  2832. };
  2833. var xc = function () {};
  2834. f["flambe.display.SubTexture"] = xc;
  2835. xc.__name__ = ["flambe", "display", "SubTexture"];
  2836. xc.__interfaces__ = [tb];
  2837. var ub = function (a, b) {
  2838. null == b && (b = "");
  2839. this._layout = null;
  2840. var c = this;
  2841. r.call(this);
  2842. this._font = a;
  2843. this._text = b;
  2844. this._align = K.Left;
  2845. this._flags |=
  2846. 64;
  2847. var e = function () {
  2848. c._flags |= 64
  2849. };
  2850. this.wrapWidth = new n(0, e);
  2851. this.letterSpacing = new n(0, e);
  2852. this.lineSpacing = new n(0, e)
  2853. };
  2854. f["flambe.display.TextSprite"] = ub;
  2855. ub.__name__ = ["flambe", "display", "TextSprite"];
  2856. ub.__super__ = r;
  2857. ub.prototype = z(r.prototype, {
  2858. draw: function (a) {
  2859. this.updateLayout();
  2860. this._layout.draw(a)
  2861. },
  2862. getNaturalWidth: function () {
  2863. this.updateLayout();
  2864. return 0 < this.wrapWidth._value ? this.wrapWidth._value : this._layout.bounds.width
  2865. },
  2866. getNaturalHeight: function () {
  2867. this.updateLayout();
  2868. var a = this._layout.lines *
  2869. (this._font.lineHeight + this.lineSpacing._value),
  2870. b = this._layout.bounds.height;
  2871. return a > b ? a : b
  2872. },
  2873. containsLocal: function (a, b) {
  2874. this.updateLayout();
  2875. return this._layout.bounds.contains(a, b)
  2876. },
  2877. setWrapWidth: function (a) {
  2878. this.wrapWidth.set__(a);
  2879. return this
  2880. },
  2881. setAlign: function (a) {
  2882. this.set_align(a);
  2883. return this
  2884. },
  2885. set_text: function (a) {
  2886. a != this._text && (this._text = a, this._flags |= 64);
  2887. return a
  2888. },
  2889. set_align: function (a) {
  2890. a != this._align && (this._align = a, this._flags |= 64);
  2891. return a
  2892. },
  2893. updateLayout: function () {
  2894. 0 != (this._flags & 64) && (this._flags &=
  2895. -65, this._layout = this._font.layoutText(this._text, this._align, this.wrapWidth._value, this.letterSpacing._value, this.lineSpacing._value))
  2896. },
  2897. onUpdate: function (a) {
  2898. r.prototype.onUpdate.call(this, a);
  2899. this.wrapWidth.update(a);
  2900. this.letterSpacing.update(a);
  2901. this.lineSpacing.update(a)
  2902. },
  2903. __class__: ub,
  2904. __properties__: z(r.prototype.__properties__, {
  2905. set_align: "set_align",
  2906. set_text: "set_text"
  2907. })
  2908. });
  2909. var R = f["flambe.input.MouseButton"] = {
  2910. __ename__: ["flambe", "input", "MouseButton"],
  2911. __constructs__: ["Left", "Middle", "Right", "Unknown"]
  2912. };
  2913. R.Left = ["Left", 0];
  2914. R.Left.toString = s;
  2915. R.Left.__enum__ = R;
  2916. R.Middle = ["Middle", 1];
  2917. R.Middle.toString = s;
  2918. R.Middle.__enum__ = R;
  2919. R.Right = ["Right", 2];
  2920. R.Right.toString = s;
  2921. R.Right.__enum__ = R;
  2922. R.Unknown = function (a) {
  2923. a = ["Unknown", 3, a];
  2924. a.__enum__ = R;
  2925. a.toString = s;
  2926. return a
  2927. };
  2928. var ca = f["flambe.input.MouseCursor"] = {
  2929. __ename__: ["flambe", "input", "MouseCursor"],
  2930. __constructs__: ["Default", "Button", "None"]
  2931. };
  2932. ca.Default = ["Default", 0];
  2933. ca.Default.toString = s;
  2934. ca.Default.__enum__ = ca;
  2935. ca.Button = ["Button", 1];
  2936. ca.Button.toString = s;
  2937. ca.Button.__enum__ =
  2938. ca;
  2939. ca.None = ["None", 2];
  2940. ca.None.toString = s;
  2941. ca.None.__enum__ = ca;
  2942. var Zb = function () {
  2943. this.init(0, 0, 0, null)
  2944. };
  2945. f["flambe.input.MouseEvent"] = Zb;
  2946. Zb.__name__ = ["flambe", "input", "MouseEvent"];
  2947. Zb.prototype = {
  2948. init: function (a, b, c, e) {
  2949. this.id = a;
  2950. this.viewX = b;
  2951. this.viewY = c;
  2952. this.button = e
  2953. },
  2954. __class__: Zb
  2955. };
  2956. var vb = f["flambe.input.EventSource"] = {
  2957. __ename__: ["flambe", "input", "EventSource"],
  2958. __constructs__: ["Mouse", "Touch"]
  2959. };
  2960. vb.Mouse = function (a) {
  2961. a = ["Mouse", 0, a];
  2962. a.__enum__ = vb;
  2963. a.toString = s;
  2964. return a
  2965. };
  2966. vb.Touch = function (a) {
  2967. a = ["Touch",
  2968. 1, a
  2969. ];
  2970. a.__enum__ = vb;
  2971. a.toString = s;
  2972. return a
  2973. };
  2974. var $b = function () {
  2975. this.init(0, 0, 0, null, null)
  2976. };
  2977. f["flambe.input.PointerEvent"] = $b;
  2978. $b.__name__ = ["flambe", "input", "PointerEvent"];
  2979. $b.prototype = {
  2980. init: function (a, b, c, e, g) {
  2981. this.id = a;
  2982. this.viewX = b;
  2983. this.viewY = c;
  2984. this.hit = e;
  2985. this.source = g;
  2986. this._stopped = !1
  2987. },
  2988. __class__: $b
  2989. };
  2990. var ac = function (a) {
  2991. this.id = a;
  2992. this._source = vb.Touch(this)
  2993. };
  2994. f["flambe.input.TouchPoint"] = ac;
  2995. ac.__name__ = ["flambe", "input", "TouchPoint"];
  2996. ac.prototype = {
  2997. init: function (a, b) {
  2998. this.viewX = a;
  2999. this.viewY = b
  3000. },
  3001. __class__: ac
  3002. };
  3003. var Aa = function () {};
  3004. f["flambe.math.FMath"] = Aa;
  3005. Aa.__name__ = ["flambe", "math", "FMath"];
  3006. Aa.toRadians = function (a) {
  3007. return 3.141592653589793 * a / 180
  3008. };
  3009. Aa.max = function (a, b) {
  3010. return a > b ? a : b
  3011. };
  3012. var Vb = function () {
  3013. this.identity()
  3014. };
  3015. f["flambe.math.Matrix"] = Vb;
  3016. Vb.__name__ = ["flambe", "math", "Matrix"];
  3017. Vb.prototype = {
  3018. set: function (a, b, c, e, g, d) {
  3019. this.m00 = a;
  3020. this.m01 = c;
  3021. this.m02 = g;
  3022. this.m10 = b;
  3023. this.m11 = e;
  3024. this.m12 = d
  3025. },
  3026. identity: function () {
  3027. this.set(1, 0, 0, 1, 0, 0)
  3028. },
  3029. compose: function (a, b, c, e, g) {
  3030. var d = Math.sin(g),
  3031. g = Math.cos(g);
  3032. this.set(g * c,
  3033. d * c, -d * e, g * e, a, b)
  3034. },
  3035. translate: function (a, b) {
  3036. this.m02 += this.m00 * a + this.m01 * b;
  3037. this.m12 += this.m11 * b + this.m10 * a
  3038. },
  3039. determinant: function () {
  3040. return this.m00 * this.m11 - this.m01 * this.m10
  3041. },
  3042. inverseTransform: function (a, b, c) {
  3043. var e = this.determinant();
  3044. if (0 == e) return !1;
  3045. a -= this.m02;
  3046. b -= this.m12;
  3047. c.x = (a * this.m11 - b * this.m01) / e;
  3048. c.y = (b * this.m00 - a * this.m10) / e;
  3049. return !0
  3050. },
  3051. __class__: Vb
  3052. };
  3053. var sb = function (a, b, c, e) {
  3054. null == e && (e = 0);
  3055. null == c && (c = 0);
  3056. null == b && (b = 0);
  3057. null == a && (a = 0);
  3058. this.set(a, b, c, e)
  3059. };
  3060. f["flambe.math.Rectangle"] = sb;
  3061. sb.__name__ = ["flambe", "math", "Rectangle"];
  3062. sb.prototype = {
  3063. set: function (a, b, c, e) {
  3064. this.x = a;
  3065. this.y = b;
  3066. this.width = c;
  3067. this.height = e
  3068. },
  3069. contains: function (a, b) {
  3070. a -= this.x;
  3071. if (0 <= this.width) {
  3072. if (0 > a || a > this.width) return !1
  3073. } else if (0 < a || a < this.width) return !1;
  3074. b -= this.y;
  3075. if (0 <= this.height) {
  3076. if (0 > b || b > this.height) return !1
  3077. } else if (0 < b || b < this.height) return !1;
  3078. return !0
  3079. },
  3080. __class__: sb
  3081. };
  3082. var U = function () {
  3083. this._disposed = !1
  3084. };
  3085. f["flambe.platform.BasicAsset"] = U;
  3086. U.__name__ = ["flambe", "platform", "BasicAsset"];
  3087. U.__interfaces__ = [za];
  3088. U.prototype = {
  3089. dispose: function () {
  3090. this._disposed ||
  3091. (this._disposed = !0, this.onDisposed())
  3092. },
  3093. onDisposed: function () {
  3094. null
  3095. },
  3096. __class__: U
  3097. };
  3098. var Ca = function (a, b) {
  3099. var c = this;
  3100. this.manifest = b;
  3101. this._platform = a;
  3102. this.promise = new wb;
  3103. this._bytesLoaded = new O;
  3104. this._pack = new xb(b, this);
  3105. var e = va.array(b);
  3106. if (0 == e.length) this.handleSuccess();
  3107. else {
  3108. for (var g = new O, d = 0; d < e.length;) {
  3109. var f = e[d];
  3110. ++d;
  3111. var j = g.get(f.name);
  3112. null == j && (j = [], g.set(f.name, j));
  3113. j.push(f)
  3114. }
  3115. this._assetsRemaining = va.count(g);
  3116. for (e = g.iterator(); e.hasNext();) g = [e.next()], this.pickBestEntry(g[0], function (a) {
  3117. return function (e) {
  3118. if (null !=
  3119. e) {
  3120. var g = b.getFullURL(e);
  3121. try {
  3122. c.loadEntry(g, e)
  3123. } catch (d) {
  3124. c.handleError(e, "Unexpected error: " + x.string(d))
  3125. }
  3126. g = c.promise;
  3127. g.set_total(g._total + e.bytes)
  3128. } else e = a[0][0], Ca.isAudio(e.format) ? c.handleLoad(e, aa.getInstance()) : c.handleError(e, "Could not find a supported format to load")
  3129. }
  3130. }(g))
  3131. }
  3132. };
  3133. f["flambe.platform.BasicAssetPackLoader"] = Ca;
  3134. Ca.__name__ = ["flambe", "platform", "BasicAssetPackLoader"];
  3135. Ca.isAudio = function (a) {
  3136. switch (a[1]) {
  3137. case 8:
  3138. case 9:
  3139. case 10:
  3140. case 11:
  3141. case 12:
  3142. return !0;
  3143. default:
  3144. return !1
  3145. }
  3146. };
  3147. Ca.prototype = {
  3148. onDisposed: function () {},
  3149. pickBestEntry: function (a, b) {
  3150. this.getAssetFormats(function (c) {
  3151. for (var e = 0; e < c.length;) {
  3152. var g = c[e];
  3153. ++e;
  3154. for (var d = 0; d < a.length;) {
  3155. var f = a[d];
  3156. ++d;
  3157. if (f.format == g) {
  3158. b(f);
  3159. return
  3160. }
  3161. }
  3162. }
  3163. b(null)
  3164. })
  3165. },
  3166. loadEntry: function () {
  3167. null
  3168. },
  3169. getAssetFormats: function () {
  3170. null
  3171. },
  3172. handleLoad: function (a, b) {
  3173. if (!this._pack.disposed) {
  3174. this.handleProgress(a, a.bytes);
  3175. var c;
  3176. switch (a.format[1]) {
  3177. case 0:
  3178. case 1:
  3179. case 2:
  3180. case 3:
  3181. case 4:
  3182. case 5:
  3183. case 6:
  3184. case 7:
  3185. c = this._pack.textures;
  3186. break;
  3187. case 8:
  3188. case 9:
  3189. case 10:
  3190. case 11:
  3191. case 12:
  3192. c = this._pack.sounds;
  3193. break;
  3194. case 13:
  3195. c = this._pack.files
  3196. }
  3197. c.set(a.name, b);
  3198. this._assetsRemaining -= 1;
  3199. 0 == this._assetsRemaining && this.handleSuccess()
  3200. }
  3201. },
  3202. handleProgress: function (a, b) {
  3203. this._bytesLoaded.set(a.name, b);
  3204. for (var c = 0, e = this._bytesLoaded.iterator(); e.hasNext();) var g = e.next(),
  3205. c = c + g;
  3206. this.promise.set_progress(c)
  3207. },
  3208. handleSuccess: function () {
  3209. this.promise.set_result(this._pack)
  3210. },
  3211. handleError: function (a, b) {
  3212. this.promise.error.emit(M.withFields(b, ["url", a.url]))
  3213. },
  3214. handleTextureError: function (a) {
  3215. this.handleError(a, "Failed to create texture. Is the GPU context unavailable?")
  3216. },
  3217. __class__: Ca
  3218. };
  3219. var xb = function (a, b) {
  3220. this.disposed = !1;
  3221. this._manifest = a;
  3222. this.loader = b;
  3223. this.textures = new O;
  3224. this.sounds = new O;
  3225. this.files = new O
  3226. };
  3227. f["flambe.platform._BasicAssetPackLoader.BasicAssetPack"] = xb;
  3228. xb.__name__ = ["flambe", "platform", "_BasicAssetPackLoader", "BasicAssetPack"];
  3229. xb.__interfaces__ = [nb];
  3230. xb.prototype = {
  3231. getTexture: function (a, b) {
  3232. null == b && (b = !0);
  3233. var c = this.textures.get(a);
  3234. if (null == c && b) throw M.withFields("Missing texture", ["name", a]);
  3235. return c
  3236. },
  3237. getSound: function (a, b) {
  3238. null == b && (b = !0);
  3239. var c = this.sounds.get(a);
  3240. if (null == c && b) throw M.withFields("Missing sound", ["name", a]);
  3241. return c
  3242. },
  3243. getFile: function (a, b) {
  3244. null == b && (b = !0);
  3245. var c = this.files.get(a);
  3246. if (null == c && b) throw M.withFields("Missing file", ["name", a]);
  3247. return c
  3248. },
  3249. dispose: function () {
  3250. if (!this.disposed) {
  3251. this.disposed = !0;
  3252. for (var a = this.textures.iterator(); a.hasNext();) a.next().dispose();
  3253. this.textures = null;
  3254. for (a = this.sounds.iterator(); a.hasNext();) a.next().dispose();
  3255. this.sounds = null;
  3256. for (a = this.files.iterator(); a.hasNext();) a.next().dispose();
  3257. this.files = null;
  3258. this.loader.onDisposed()
  3259. }
  3260. },
  3261. __class__: xb
  3262. };
  3263. var Va = function (a) {
  3264. this._disposed = !1;
  3265. this._content = a
  3266. };
  3267. f["flambe.platform.BasicFile"] = Va;
  3268. Va.__name__ = ["flambe", "platform", "BasicFile"];
  3269. Va.__interfaces__ = [ob];
  3270. Va.__super__ = U;
  3271. Va.prototype = z(U.prototype, {
  3272. toString: function () {
  3273. return this._content
  3274. },
  3275. onDisposed: function () {
  3276. this._content = null
  3277. },
  3278. __class__: Va
  3279. });
  3280. var Ac = function () {};
  3281. f["flambe.subsystem.MouseSystem"] = Ac;
  3282. Ac.__name__ = ["flambe", "subsystem", "MouseSystem"];
  3283. var Z = function (a) {
  3284. this._pointer = a;
  3285. this._source = vb.Mouse(Z._sharedEvent);
  3286. this.down =
  3287. new G;
  3288. this.move = new G;
  3289. this.up = new G;
  3290. this.scroll = new G;
  3291. this._y = this._x = 0;
  3292. this._cursor = ca.Default;
  3293. this._buttonStates = new ba
  3294. };
  3295. f["flambe.platform.BasicMouse"] = Z;
  3296. Z.__name__ = ["flambe", "platform", "BasicMouse"];
  3297. Z.__interfaces__ = [Ac];
  3298. Z.prototype = {
  3299. submitDown: function (a, b, c) {
  3300. this._buttonStates.exists(c) || (this._buttonStates.set(c, !0), this.prepare(a, b, bc.toButton(c)), this._pointer.submitDown(a, b, this._source), this.down.emit(Z._sharedEvent))
  3301. },
  3302. submitMove: function (a, b) {
  3303. this.prepare(a, b, null);
  3304. this._pointer.submitMove(a,
  3305. b, this._source);
  3306. this.move.emit(Z._sharedEvent)
  3307. },
  3308. submitUp: function (a, b, c) {
  3309. this._buttonStates.exists(c) && (this._buttonStates.remove(c), this.prepare(a, b, bc.toButton(c)), this._pointer.submitUp(a, b, this._source), this.up.emit(Z._sharedEvent))
  3310. },
  3311. submitScroll: function (a, b, c) {
  3312. this._x = a;
  3313. this._y = b;
  3314. if (null == this.scroll._head) return !1;
  3315. this.scroll.emit(c);
  3316. return !0
  3317. },
  3318. prepare: function (a, b, c) {
  3319. this._x = a;
  3320. this._y = b;
  3321. Z._sharedEvent.init(Z._sharedEvent.id + 1, a, b, c)
  3322. },
  3323. __class__: Z
  3324. };
  3325. var cc = function () {};
  3326. f["flambe.subsystem.PointerSystem"] =
  3327. cc;
  3328. cc.__name__ = ["flambe", "subsystem", "PointerSystem"];
  3329. cc.prototype = {
  3330. __class__: cc
  3331. };
  3332. var Q = function (a, b, c) {
  3333. null == c && (c = !1);
  3334. null == b && (b = 0);
  3335. null == a && (a = 0);
  3336. this.down = new G;
  3337. this.move = new G;
  3338. this.up = new G;
  3339. this._x = a;
  3340. this._y = b;
  3341. this._isDown = c
  3342. };
  3343. f["flambe.platform.BasicPointer"] = Q;
  3344. Q.__name__ = ["flambe", "platform", "BasicPointer"];
  3345. Q.__interfaces__ = [cc];
  3346. Q.prototype = {
  3347. get_x: function () {
  3348. return this._x
  3349. },
  3350. get_y: function () {
  3351. return this._y
  3352. },
  3353. isDown: function () {
  3354. return this._isDown
  3355. },
  3356. submitDown: function (a, b, c) {
  3357. if (!this._isDown) {
  3358. this.submitMove(a,
  3359. b, c);
  3360. this._isDown = !0;
  3361. var e = [],
  3362. g = r.hitTest(l.root, a, b);
  3363. if (null != g) {
  3364. var d = g.owner;
  3365. do {
  3366. var f = d._compMap.Sprite_0;
  3367. null != f && e.push(f);
  3368. d = d.parent
  3369. } while (null != d)
  3370. }
  3371. this.prepare(a, b, g, c);
  3372. for (a = 0; a < e.length;)
  3373. if (b = e[a], ++a, b.onPointerDown(Q._sharedEvent), Q._sharedEvent._stopped) return;
  3374. this.down.emit(Q._sharedEvent)
  3375. }
  3376. },
  3377. submitMove: function (a, b, c) {
  3378. if (!(a == this._x && b == this._y)) {
  3379. var e = [],
  3380. g = r.hitTest(l.root, a, b);
  3381. if (null != g) {
  3382. var d = g.owner;
  3383. do {
  3384. var f = d._compMap.Sprite_0;
  3385. null != f && e.push(f);
  3386. d = d.parent
  3387. } while (null != d)
  3388. }
  3389. this.prepare(a,
  3390. b, g, c);
  3391. for (a = 0; a < e.length;)
  3392. if (b = e[a], ++a, b.onPointerMove(Q._sharedEvent), Q._sharedEvent._stopped) return;
  3393. this.move.emit(Q._sharedEvent)
  3394. }
  3395. },
  3396. submitUp: function (a, b, c) {
  3397. if (this._isDown) {
  3398. this.submitMove(a, b, c);
  3399. this._isDown = !1;
  3400. var e = [],
  3401. d = r.hitTest(l.root, a, b);
  3402. if (null != d) {
  3403. var h = d.owner;
  3404. do {
  3405. var f = h._compMap.Sprite_0;
  3406. null != f && e.push(f);
  3407. h = h.parent
  3408. } while (null != h)
  3409. }
  3410. this.prepare(a, b, d, c);
  3411. for (a = 0; a < e.length;)
  3412. if (b = e[a], ++a, b.onPointerUp(Q._sharedEvent), Q._sharedEvent._stopped) return;
  3413. this.up.emit(Q._sharedEvent)
  3414. }
  3415. },
  3416. prepare: function (a,
  3417. b, c, e) {
  3418. this._x = a;
  3419. this._y = b;
  3420. Q._sharedEvent.init(Q._sharedEvent.id + 1, a, b, c, e)
  3421. },
  3422. __class__: Q,
  3423. __properties__: {
  3424. get_y: "get_y",
  3425. get_x: "get_x"
  3426. }
  3427. };
  3428. var Da = function (a, b, c) {
  3429. this._x = this._y = 0;
  3430. this._parent = null;
  3431. this.rootX = this.rootY = 0;
  3432. this._disposed = !1;
  3433. this.root = a;
  3434. this._width = b;
  3435. this._height = c
  3436. };
  3437. f["flambe.platform.BasicTexture"] = Da;
  3438. Da.__name__ = ["flambe", "platform", "BasicTexture"];
  3439. Da.__interfaces__ = [xc];
  3440. Da.__super__ = U;
  3441. Da.prototype = z(U.prototype, {
  3442. subTexture: function (a, b, c, e) {
  3443. c = this.root.createTexture(c, e);
  3444. c._parent = this;
  3445. c._x = a;
  3446. c._y = b;
  3447. c.rootX = this.rootX + a;
  3448. c.rootY = this.rootY + b;
  3449. return c
  3450. },
  3451. split: function (a, b) {
  3452. null == b && (b = 1);
  3453. for (var c = [], e = this._width / a | 0, d = this._height / b | 0, h = 0; h < b;)
  3454. for (var f = h++, j = 0; j < a;) {
  3455. var i = j++;
  3456. c.push(this.subTexture(i * e, f * d, e, d))
  3457. }
  3458. return c
  3459. },
  3460. onDisposed: function () {
  3461. null == this._parent && this.root.dispose()
  3462. },
  3463. get_width: function () {
  3464. return this._width
  3465. },
  3466. get_height: function () {
  3467. return this._height
  3468. },
  3469. __class__: Da,
  3470. __properties__: {
  3471. get_height: "get_height",
  3472. get_width: "get_width"
  3473. }
  3474. });
  3475. var yc = function () {};
  3476. f["flambe.subsystem.TouchSystem"] =
  3477. yc;
  3478. yc.__name__ = ["flambe", "subsystem", "TouchSystem"];
  3479. var hb = function (a, b) {
  3480. null == b && (b = 4);
  3481. this._pointer = a;
  3482. this._maxPoints = b;
  3483. this._pointMap = new ba;
  3484. this._points = [];
  3485. this.down = new G;
  3486. this.move = new G;
  3487. this.up = new G
  3488. };
  3489. f["flambe.platform.BasicTouch"] = hb;
  3490. hb.__name__ = ["flambe", "platform", "BasicTouch"];
  3491. hb.__interfaces__ = [yc];
  3492. hb.prototype = {
  3493. submitDown: function (a, b, c) {
  3494. if (!this._pointMap.exists(a)) {
  3495. var e = new ac(a);
  3496. e.init(b, c);
  3497. this._pointMap.set(a, e);
  3498. this._points.push(e);
  3499. null == this._pointerTouch && (this._pointerTouch =
  3500. e, this._pointer.submitDown(b, c, e._source));
  3501. this.down.emit(e)
  3502. }
  3503. },
  3504. submitMove: function (a, b, c) {
  3505. a = this._pointMap.get(a);
  3506. null != a && (a.init(b, c), this._pointerTouch == a && this._pointer.submitMove(b, c, a._source), this.move.emit(a))
  3507. },
  3508. submitUp: function (a, b, c) {
  3509. var e = this._pointMap.get(a);
  3510. null != e && (e.init(b, c), this._pointMap.remove(a), p.remove(this._points, e), this._pointerTouch == e && (this._pointerTouch = null, this._pointer.submitUp(b, c, e._source)), this.up.emit(e))
  3511. },
  3512. __class__: hb
  3513. };
  3514. var Oa = function () {};
  3515. f["flambe.sound.Sound"] =
  3516. Oa;
  3517. Oa.__name__ = ["flambe", "sound", "Sound"];
  3518. Oa.__interfaces__ = [za];
  3519. Oa.prototype = {
  3520. __class__: Oa
  3521. };
  3522. var aa = function () {
  3523. this._disposed = !1;
  3524. this._playback = new yb(this)
  3525. };
  3526. f["flambe.platform.DummySound"] = aa;
  3527. aa.__name__ = ["flambe", "platform", "DummySound"];
  3528. aa.__interfaces__ = [Oa];
  3529. aa.getInstance = function () {
  3530. null == aa._instance && (aa._instance = new aa);
  3531. return aa._instance
  3532. };
  3533. aa.__super__ = U;
  3534. aa.prototype = z(U.prototype, {
  3535. play: function () {
  3536. return this._playback
  3537. },
  3538. loop: function () {
  3539. return this._playback
  3540. },
  3541. onDisposed: function () {},
  3542. __class__: aa
  3543. });
  3544. var Pa = function () {};
  3545. f["flambe.sound.Playback"] = Pa;
  3546. Pa.__name__ = ["flambe", "sound", "Playback"];
  3547. Pa.__interfaces__ = [ha];
  3548. Pa.prototype = {
  3549. __class__: Pa
  3550. };
  3551. var yb = function (a) {
  3552. this._sound = a;
  3553. this.volume = new n(0);
  3554. this._complete = new S(!0)
  3555. };
  3556. f["flambe.platform.DummyPlayback"] = yb;
  3557. yb.__name__ = ["flambe", "platform", "DummyPlayback"];
  3558. yb.__interfaces__ = [Pa];
  3559. yb.prototype = {
  3560. get_sound: function () {
  3561. return this._sound
  3562. },
  3563. set_paused: function () {
  3564. return !0
  3565. },
  3566. dispose: function () {},
  3567. __class__: yb,
  3568. __properties__: {
  3569. get_sound: "get_sound",
  3570. set_paused: "set_paused"
  3571. }
  3572. };
  3573. var zb = function () {};
  3574. f["flambe.subsystem.StorageSystem"] = zb;
  3575. zb.__name__ = ["flambe", "subsystem", "StorageSystem"];
  3576. zb.prototype = {
  3577. __class__: zb
  3578. };
  3579. var kb = function () {
  3580. this.clear()
  3581. };
  3582. f["flambe.platform.DummyStorage"] = kb;
  3583. kb.__name__ = ["flambe", "platform", "DummyStorage"];
  3584. kb.__interfaces__ = [zb];
  3585. kb.prototype = {
  3586. set: function (a, b) {
  3587. this._hash.set(a, b);
  3588. return !0
  3589. },
  3590. get: function (a, b) {
  3591. return this._hash.exists(a) ? this._hash.get(a) : b
  3592. },
  3593. clear: function () {
  3594. this._hash = new O
  3595. },
  3596. __class__: kb
  3597. };
  3598. var ib = function () {
  3599. this.down = new G;
  3600. this.move =
  3601. new G;
  3602. this.up = new G
  3603. };
  3604. f["flambe.platform.DummyTouch"] = ib;
  3605. ib.__name__ = ["flambe", "platform", "DummyTouch"];
  3606. ib.__interfaces__ = [yc];
  3607. ib.prototype = {
  3608. __class__: ib
  3609. };
  3610. var Wa = function () {
  3611. this._entries = []
  3612. };
  3613. f["flambe.platform.EventGroup"] = Wa;
  3614. Wa.__name__ = ["flambe", "platform", "EventGroup"];
  3615. Wa.__interfaces__ = [ha];
  3616. Wa.prototype = {
  3617. addListener: function (a, b, c) {
  3618. a.addEventListener(b, c, !1);
  3619. this._entries.push(new dc(a, b, c))
  3620. },
  3621. addDisposingListener: function (a, b, c) {
  3622. var e = this;
  3623. this.addListener(a, b, function (a) {
  3624. e.dispose();
  3625. c(a)
  3626. })
  3627. },
  3628. dispose: function () {
  3629. for (var a =
  3630. 0, b = this._entries; a < b.length;) {
  3631. var c = b[a];
  3632. ++a;
  3633. c.dispatcher.removeEventListener(c.type, c.listener, !1)
  3634. }
  3635. this._entries = []
  3636. },
  3637. __class__: Wa
  3638. };
  3639. var dc = function (a, b, c) {
  3640. this.dispatcher = a;
  3641. this.type = b;
  3642. this.listener = c
  3643. };
  3644. f["flambe.platform._EventGroup.Entry"] = dc;
  3645. dc.__name__ = ["flambe", "platform", "_EventGroup", "Entry"];
  3646. dc.prototype = {
  3647. __class__: dc
  3648. };
  3649. var Ab = function () {};
  3650. f["flambe.platform.InternalGraphics"] = Ab;
  3651. Ab.__name__ = ["flambe", "platform", "InternalGraphics"];
  3652. Ab.__interfaces__ = [Yb];
  3653. Ab.prototype = {
  3654. __class__: Ab
  3655. };
  3656. var ec =
  3657. function () {};
  3658. f["flambe.subsystem.RendererSystem"] = ec;
  3659. ec.__name__ = ["flambe", "subsystem", "RendererSystem"];
  3660. ec.prototype = {
  3661. __class__: ec
  3662. };
  3663. var Bb = function () {};
  3664. f["flambe.platform.InternalRenderer"] = Bb;
  3665. Bb.__name__ = ["flambe", "platform", "InternalRenderer"];
  3666. Bb.__interfaces__ = [ec];
  3667. Bb.prototype = {
  3668. __class__: Bb
  3669. };
  3670. var Ia = function () {
  3671. this._tickables = []
  3672. };
  3673. f["flambe.platform.MainLoop"] = Ia;
  3674. Ia.__name__ = ["flambe", "platform", "MainLoop"];
  3675. Ia.updateEntity = function (a, b) {
  3676. var c = a._compMap.SpeedAdjuster_6;
  3677. if (null != c && (c._realDt = b,
  3678. b *= c.scale._value, 0 >= b)) {
  3679. c.onUpdate(b);
  3680. return
  3681. }
  3682. for (c = a.firstComponent; null != c;) {
  3683. var e = c.next;
  3684. c.onUpdate(b);
  3685. c = e
  3686. }
  3687. for (c = a.firstChild; null != c;) e = c.next, Ia.updateEntity(c, b), c = e
  3688. };
  3689. Ia.prototype = {
  3690. update: function (a) {
  3691. if (!(0 >= a)) {
  3692. 1 < a && (a = 1);
  3693. for (var b = 0; b < this._tickables.length;) {
  3694. var c = this._tickables[b];
  3695. null == c || c.update(a) ? this._tickables.splice(b, 1) : ++b
  3696. }
  3697. l.volume.update(a);
  3698. Ia.updateEntity(l.root, a)
  3699. }
  3700. },
  3701. render: function (a) {
  3702. var b = a.graphics;
  3703. null != b && (a.willRender(), r.render(l.root, b), a.didRender())
  3704. },
  3705. addTickable: function (a) {
  3706. this._tickables.push(a)
  3707. },
  3708. __class__: Ia
  3709. };
  3710. var bc = function () {};
  3711. f["flambe.platform.MouseCodes"] = bc;
  3712. bc.__name__ = ["flambe", "platform", "MouseCodes"];
  3713. bc.toButton = function (a) {
  3714. switch (a) {
  3715. case 0:
  3716. return R.Left;
  3717. case 1:
  3718. return R.Middle;
  3719. case 2:
  3720. return R.Right
  3721. }
  3722. return R.Unknown(a)
  3723. };
  3724. var fc = function () {};
  3725. f["flambe.platform.TextureRoot"] = fc;
  3726. fc.__name__ = ["flambe", "platform", "TextureRoot"];
  3727. fc.prototype = {
  3728. __class__: fc
  3729. };
  3730. var Cb = function () {};
  3731. f["flambe.platform.Tickable"] = Cb;
  3732. Cb.__name__ = ["flambe", "platform", "Tickable"];
  3733. Cb.prototype = {
  3734. __class__: Cb
  3735. };
  3736. var Db =
  3737. function (a) {
  3738. this._firstDraw = !1;
  3739. this._canvasCtx = a.getContext("2d")
  3740. };
  3741. f["flambe.platform.html.CanvasGraphics"] = Db;
  3742. Db.__name__ = ["flambe", "platform", "html", "CanvasGraphics"];
  3743. Db.__interfaces__ = [Ab];
  3744. Db.prototype = {
  3745. save: function () {
  3746. this._canvasCtx.save()
  3747. },
  3748. translate: function (a, b) {
  3749. this._canvasCtx.translate(a | 0, b | 0)
  3750. },
  3751. scale: function (a, b) {
  3752. this._canvasCtx.scale(a, b)
  3753. },
  3754. rotate: function (a) {
  3755. this._canvasCtx.rotate(3.141592653589793 * a / 180)
  3756. },
  3757. transform: function (a, b, c, e, d, h) {
  3758. this._canvasCtx.transform(a, b, c, e, d, h)
  3759. },
  3760. restore: function () {
  3761. this._canvasCtx.restore()
  3762. },
  3763. drawTexture: function (a, b, c) {
  3764. this.drawSubTexture(a, b, c, 0, 0, a.get_width(), a.get_height())
  3765. },
  3766. drawSubTexture: function (a, b, c, e, d, h, f) {
  3767. this._firstDraw ? (this._firstDraw = !1, this._canvasCtx.globalCompositeOperation = "copy", this.drawSubTexture(a, b, c, e, d, h, f), this._canvasCtx.globalCompositeOperation = "source-over") : this._canvasCtx.drawImage(a.root.image, a.rootX + e | 0, a.rootY + d | 0, h | 0, f | 0, b | 0, c | 0, h | 0, f | 0)
  3768. },
  3769. fillRect: function (a, b, c, e, d) {
  3770. if (this._firstDraw) this._firstDraw = !1, this._canvasCtx.globalCompositeOperation = "copy",
  3771. this.fillRect(a, b, c, e, d), this._canvasCtx.globalCompositeOperation = "source-over";
  3772. else {
  3773. for (a = (16777215 & a).toString(16); 6 > a.length;) a = "0" + x.string(a);
  3774. this._canvasCtx.fillStyle = "#" + x.string(a);
  3775. this._canvasCtx.fillRect(b | 0, c | 0, e | 0, d | 0)
  3776. }
  3777. },
  3778. multiplyAlpha: function (a) {
  3779. this._canvasCtx.globalAlpha *= a
  3780. },
  3781. setBlendMode: function (a) {
  3782. var b;
  3783. switch (a[1]) {
  3784. case 0:
  3785. b = "source-over";
  3786. break;
  3787. case 1:
  3788. b = "lighter";
  3789. break;
  3790. case 2:
  3791. b = "destination-in";
  3792. break;
  3793. case 3:
  3794. b = "copy"
  3795. }
  3796. this._canvasCtx.globalCompositeOperation = b
  3797. },
  3798. applyScissor: function (a,
  3799. b, c, e) {
  3800. this._canvasCtx.beginPath();
  3801. this._canvasCtx.rect(a | 0, b | 0, c | 0, e | 0);
  3802. this._canvasCtx.clip()
  3803. },
  3804. willRender: function () {
  3805. this._firstDraw = !0
  3806. },
  3807. didRender: function () {},
  3808. __class__: Db
  3809. };
  3810. var Ja = function (a) {
  3811. this.graphics = new Db(a);
  3812. this._hasGPU = new S(!0)
  3813. };
  3814. f["flambe.platform.html.CanvasRenderer"] = Ja;
  3815. Ja.__name__ = ["flambe", "platform", "html", "CanvasRenderer"];
  3816. Ja.__interfaces__ = [Bb];
  3817. Ja.prototype = {
  3818. get_type: function () {
  3819. return da.Canvas
  3820. },
  3821. createTextureFromImage: function (a) {
  3822. a = new Xa(Ja.CANVAS_TEXTURES ? u.createCanvas(a) :
  3823. a);
  3824. return a.createTexture(a.width, a.height)
  3825. },
  3826. getCompressedTextureFormats: function () {
  3827. return []
  3828. },
  3829. createCompressedTexture: function () {
  3830. return null
  3831. },
  3832. willRender: function () {
  3833. this.graphics.willRender()
  3834. },
  3835. didRender: function () {
  3836. this.graphics.didRender()
  3837. },
  3838. __class__: Ja,
  3839. __properties__: {
  3840. get_type: "get_type"
  3841. }
  3842. };
  3843. var Eb = function (a, b, c) {
  3844. Da.call(this, a, b, c)
  3845. };
  3846. f["flambe.platform.html.CanvasTexture"] = Eb;
  3847. Eb.__name__ = ["flambe", "platform", "html", "CanvasTexture"];
  3848. Eb.__super__ = Da;
  3849. Eb.prototype = z(Da.prototype, {
  3850. __class__: Eb
  3851. });
  3852. var Xa =
  3853. function (a) {
  3854. this._graphics = null;
  3855. this._disposed = !1;
  3856. this.image = a;
  3857. this.width = a.width;
  3858. this.height = a.height
  3859. };
  3860. f["flambe.platform.html.CanvasTextureRoot"] = Xa;
  3861. Xa.__name__ = ["flambe", "platform", "html", "CanvasTextureRoot"];
  3862. Xa.__interfaces__ = [fc];
  3863. Xa.__super__ = U;
  3864. Xa.prototype = z(U.prototype, {
  3865. createTexture: function (a, b) {
  3866. return new Eb(this, a, b)
  3867. },
  3868. onDisposed: function () {
  3869. this._graphics = this.image = null
  3870. },
  3871. __class__: Xa
  3872. });
  3873. var B = function (a, b) {
  3874. Ca.call(this, a, b)
  3875. };
  3876. f["flambe.platform.html.HtmlAssetPackLoader"] = B;
  3877. B.__name__ = ["flambe",
  3878. "platform", "html", "HtmlAssetPackLoader"
  3879. ];
  3880. B.detectImageFormats = function (a) {
  3881. var b = [k.PNG, k.JPG, k.GIF],
  3882. c = 2,
  3883. e;
  3884. e = window.document.createElement("img");
  3885. e.onload = e.onerror = function () {
  3886. 1 == e.width && b.unshift(k.WEBP);
  3887. --c;
  3888. 0 == c && a(b)
  3889. };
  3890. e.src = "data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==";
  3891. var d;
  3892. d = window.document.createElement("img");
  3893. d.onload = d.onerror = function () {
  3894. 1 == d.width && b.unshift(k.JXR);
  3895. --c;
  3896. 0 == c && a(b)
  3897. };
  3898. d.src = "data:image/vnd.ms-photo;base64,SUm8AQgAAAAFAAG8AQAQAAAASgAAAIC8BAABAAAAAQAAAIG8BAABAAAAAQAAAMC8BAABAAAAWgAAAMG8BAABAAAAHwAAAAAAAAAkw91vA07+S7GFPXd2jckNV01QSE9UTwAZAYBxAAAAABP/gAAEb/8AAQAAAQAAAA=="
  3899. };
  3900. B.detectAudioFormats = function () {
  3901. var a;
  3902. a = window.document.createElement("audio");
  3903. if (null == a || null == ea(a, a.canPlayType)) return [];
  3904. var b = new $("\\b(iPhone|iPod|iPad|Android|Windows Phone)\\b", ""),
  3905. c = window.navigator.userAgent;
  3906. if (!A.get_supported() && b.match(c)) return [];
  3907. for (var b = [{
  3908. format: k.M4A,
  3909. mimeType: "audio/mp4; codecs=mp4a"
  3910. }, {
  3911. format: k.MP3,
  3912. mimeType: "audio/mpeg"
  3913. }, {
  3914. format: k.OPUS,
  3915. mimeType: "audio/ogg; codecs=opus"
  3916. }, {
  3917. format: k.OGG,
  3918. mimeType: "audio/ogg; codecs=vorbis"
  3919. }, {
  3920. format: k.WAV,
  3921. mimeType: "audio/wav"
  3922. }], c = [],
  3923. e = 0; e < b.length;) {
  3924. var d = b[e];
  3925. ++e;
  3926. var h = "";
  3927. try {
  3928. h = a.canPlayType(d.mimeType)
  3929. } catch (f) {}
  3930. "" != h && c.push(d.format)
  3931. }
  3932. return c
  3933. };
  3934. B.supportsBlob = function () {
  3935. if (B._detectBlobSupport) {
  3936. B._detectBlobSupport = !1;
  3937. if ((new $("\\bSilk\\b", "")).match(window.navigator.userAgent) || null == window.Blob) return !1;
  3938. var a = new XMLHttpRequest;
  3939. a.open("GET", ".", !0);
  3940. if ("" != a.responseType) return !1;
  3941. a.responseType = "blob";
  3942. if ("blob" != a.responseType) return !1;
  3943. B._URL = u.loadExtension("URL").value
  3944. }
  3945. return null != B._URL && null != B._URL.createObjectURL
  3946. };
  3947. B.__super__ = Ca;
  3948. B.prototype = z(Ca.prototype, {
  3949. loadEntry: function (a, b) {
  3950. var c = this;
  3951. switch (b.format[1]) {
  3952. case 0:
  3953. case 1:
  3954. case 2:
  3955. case 3:
  3956. case 4:
  3957. var e;
  3958. e = window.document.createElement("img");
  3959. var d = new Wa;
  3960. d.addDisposingListener(e, "load", function () {
  3961. B.supportsBlob() && B._URL.revokeObjectURL(e.src);
  3962. var a = c._platform.getRenderer().createTextureFromImage(e);
  3963. null != a ? c.handleLoad(b, a) : c.handleTextureError(b)
  3964. });
  3965. d.addDisposingListener(e, "error", function () {
  3966. c.handleError(b, "Failed to load image")
  3967. });
  3968. B.supportsBlob() ? this.download(a,
  3969. b, "blob", function (a) {
  3970. e.src = B._URL.createObjectURL(a)
  3971. }) : e.src = a;
  3972. break;
  3973. case 5:
  3974. case 6:
  3975. case 7:
  3976. this.download(a, b, "arraybuffer", function () {
  3977. var a = c._platform.getRenderer().createCompressedTexture(b.format, null);
  3978. null != a ? c.handleLoad(b, a) : c.handleTextureError(b)
  3979. });
  3980. break;
  3981. case 8:
  3982. case 9:
  3983. case 10:
  3984. case 11:
  3985. case 12:
  3986. if (A.get_supported()) this.download(a, b, "arraybuffer", function (a) {
  3987. A.ctx.decodeAudioData(a, function (a) {
  3988. c.handleLoad(b, new A(a))
  3989. }, function () {
  3990. c.handleLoad(b, aa.getInstance())
  3991. })
  3992. });
  3993. else {
  3994. var h;
  3995. h = window.document.createElement("audio");
  3996. h.preload = "auto";
  3997. var f = ++B._mediaRefCount;
  3998. null == B._mediaElements && (B._mediaElements = new ba);
  3999. B._mediaElements.set(f, h);
  4000. d = new Wa;
  4001. d.addDisposingListener(h, "canplaythrough", function () {
  4002. B._mediaElements.remove(f);
  4003. c.handleLoad(b, new Ya(h))
  4004. });
  4005. d.addDisposingListener(h, "error", function () {
  4006. B._mediaElements.remove(f);
  4007. var a = h.error.code;
  4008. 3 == a || 4 == a ? c.handleLoad(b, aa.getInstance()) : c.handleError(b, "Failed to load audio: " + h.error.code)
  4009. });
  4010. d.addListener(h, "progress", function () {
  4011. if (0 < h.buffered.length && 0 < h.duration) {
  4012. var a =
  4013. h.buffered.end(0) / h.duration;
  4014. c.handleProgress(b, a * b.bytes | 0)
  4015. }
  4016. });
  4017. h.src = a;
  4018. h.load()
  4019. }
  4020. break;
  4021. case 13:
  4022. this.download(a, b, "text", function (a) {
  4023. c.handleLoad(b, new Va(a))
  4024. })
  4025. }
  4026. },
  4027. getAssetFormats: function (a) {
  4028. var b = this;
  4029. null == B._supportedFormats && (B._supportedFormats = new wb, B.detectImageFormats(function (a) {
  4030. B._supportedFormats.set_result(b._platform.getRenderer().getCompressedTextureFormats().concat(a).concat(B.detectAudioFormats()).concat([k.Data]))
  4031. }));
  4032. B._supportedFormats.get(a)
  4033. },
  4034. download: function (a, b, c, e) {
  4035. var d = this,
  4036. h = null,
  4037. f = null,
  4038. j = 0,
  4039. i = !1,
  4040. k = function () {
  4041. i && (i = !1, window.clearInterval(j))
  4042. },
  4043. m = 3,
  4044. l = function () {
  4045. --m;
  4046. return 0 <= m ? (f(), !0) : !1
  4047. },
  4048. f = function () {
  4049. k();
  4050. null != h && h.abort();
  4051. h = new XMLHttpRequest;
  4052. h.open("GET", a, !0);
  4053. h.responseType = c;
  4054. var f = 0;
  4055. h.onprogress = function (a) {
  4056. i || (i = !0, j = window.setInterval(function () {
  4057. 4 != h.readyState && 5E3 < Date.now() - f && !l() && (k(), d.handleError(b, "Download stalled"))
  4058. }, 1E3));
  4059. f = Date.now();
  4060. d.handleProgress(b, a.loaded)
  4061. };
  4062. h.onerror = function () {
  4063. if (0 != h.status || !l()) k(), d.handleError(b, "HTTP error " + h.status)
  4064. };
  4065. h.onload = function () {
  4066. var a = h.response;
  4067. null == a && (a = h.responseText);
  4068. k();
  4069. e(a)
  4070. };
  4071. h.send()
  4072. };
  4073. f()
  4074. },
  4075. __class__: B
  4076. });
  4077. var gb = function (a, b) {
  4078. Z.call(this, a);
  4079. this._canvas = b
  4080. };
  4081. f["flambe.platform.html.HtmlMouse"] = gb;
  4082. gb.__name__ = ["flambe", "platform", "html", "HtmlMouse"];
  4083. gb.__super__ = Z;
  4084. gb.prototype = z(Z.prototype, {
  4085. __class__: gb
  4086. });
  4087. var Ya = function (a) {
  4088. this._disposed = !1;
  4089. this.audioElement = a
  4090. };
  4091. f["flambe.platform.html.HtmlSound"] = Ya;
  4092. Ya.__name__ = ["flambe", "platform", "html", "HtmlSound"];
  4093. Ya.__interfaces__ = [Oa];
  4094. Ya.__super__ = U;
  4095. Ya.prototype =
  4096. z(U.prototype, {
  4097. play: function (a) {
  4098. null == a && (a = 1);
  4099. return new Za(this, a, !1)
  4100. },
  4101. loop: function (a) {
  4102. null == a && (a = 1);
  4103. return new Za(this, a, !0)
  4104. },
  4105. onDisposed: function () {
  4106. this.audioElement = null
  4107. },
  4108. __class__: Ya
  4109. });
  4110. var Za = function (a, b, c) {
  4111. var e = this;
  4112. this._sound = a;
  4113. this._tickableAdded = !1;
  4114. this._clonedElement = window.document.createElement("audio");
  4115. this._clonedElement.loop = c;
  4116. this._clonedElement.src = a.audioElement.src;
  4117. this.volume = new n(b, function () {
  4118. e.updateVolume()
  4119. });
  4120. this.updateVolume();
  4121. this._complete = new S(!1);
  4122. this.playAudio();
  4123. l.hidden._value && this.set_paused(!0)
  4124. };
  4125. f["flambe.platform.html._HtmlSound.HtmlPlayback"] = Za;
  4126. Za.__name__ = ["flambe", "platform", "html", "_HtmlSound", "HtmlPlayback"];
  4127. Za.__interfaces__ = [Cb, Pa];
  4128. Za.prototype = {
  4129. get_sound: function () {
  4130. return this._sound
  4131. },
  4132. set_paused: function (a) {
  4133. this._clonedElement.paused != a && (a ? this._clonedElement.pause() : this.playAudio());
  4134. return a
  4135. },
  4136. update: function (a) {
  4137. this.volume.update(a);
  4138. this._complete.set__(this._clonedElement.ended);
  4139. return this._complete._value || this._clonedElement.paused ? (this._tickableAdded = !1, this._volumeBinding.dispose(), this._hideBinding.dispose(), !0) : !1
  4140. },
  4141. dispose: function () {
  4142. this.set_paused(!0);
  4143. this._complete.set__(!0)
  4144. },
  4145. playAudio: function () {
  4146. var a = this;
  4147. this._clonedElement.play();
  4148. this._tickableAdded || (ta.instance.mainLoop.addTickable(this), this._tickableAdded = !0, this._volumeBinding = l.volume.get_changed().connect(function () {
  4149. a.updateVolume()
  4150. }), this._hideBinding = l.hidden.get_changed().connect(function (b) {
  4151. b ? (a._wasPaused = a._clonedElement.paused, a.set_paused(!0)) : a.set_paused(a._wasPaused)
  4152. }))
  4153. },
  4154. updateVolume: function () {
  4155. this._clonedElement.volume = l.volume._value * this.volume._value
  4156. },
  4157. __class__: Za,
  4158. __properties__: {
  4159. get_sound: "get_sound",
  4160. set_paused: "set_paused"
  4161. }
  4162. };
  4163. var gc = function () {};
  4164. f["flambe.subsystem.StageSystem"] = gc;
  4165. gc.__name__ = ["flambe", "subsystem", "StageSystem"];
  4166. gc.prototype = {
  4167. __class__: gc
  4168. };
  4169. var Ha = function (a) {
  4170. var b = this;
  4171. this._canvas = a;
  4172. this.resize = new oa;
  4173. this.scaleFactor = Ha.computeScaleFactor();
  4174. 1 != this.scaleFactor && (u.setVendorStyle(this._canvas, "transform-origin", "top left"), u.setVendorStyle(this._canvas,
  4175. "transform", "scale(" + 1 / this.scaleFactor + ")"));
  4176. u.SHOULD_HIDE_MOBILE_BROWSER && (window.addEventListener("orientationchange", function () {
  4177. u.callLater(ea(b, b.hideMobileBrowser), 200)
  4178. }, !1), this.hideMobileBrowser());
  4179. window.addEventListener("resize", ea(this, this.onWindowResize), !1);
  4180. this.onWindowResize(null);
  4181. this.orientation = new S(null);
  4182. null != window.orientation && (window.addEventListener("orientationchange", ea(this, this.onOrientationChange), !1), this.onOrientationChange(null));
  4183. this.fullscreen = new S(!1);
  4184. u.addVendorListener(window.document,
  4185. "fullscreenchange", function () {
  4186. b.updateFullscreen()
  4187. }, !1);
  4188. this.updateFullscreen()
  4189. };
  4190. f["flambe.platform.html.HtmlStage"] = Ha;
  4191. Ha.__name__ = ["flambe", "platform", "html", "HtmlStage"];
  4192. Ha.__interfaces__ = [gc];
  4193. Ha.computeScaleFactor = function () {
  4194. var a = window.devicePixelRatio;
  4195. null == a && (a = 1);
  4196. var b = window.document.createElement("canvas").getContext("2d"),
  4197. b = u.loadExtension("backingStorePixelRatio", b).value;
  4198. null == b && (b = 1);
  4199. a /= b;
  4200. b = window.screen.height;
  4201. return 1536 < a * window.screen.width || 1536 < a * b ? 1 : a
  4202. };
  4203. Ha.prototype = {
  4204. get_width: function () {
  4205. return this._canvas.width
  4206. },
  4207. get_height: function () {
  4208. return this._canvas.height
  4209. },
  4210. lockOrientation: function (a) {
  4211. var b = u.loadExtension("lockOrientation", window.screen).value;
  4212. if (null != b) {
  4213. var c;
  4214. switch (a[1]) {
  4215. case 0:
  4216. c = "portrait";
  4217. break;
  4218. case 1:
  4219. c = "landscape"
  4220. }
  4221. b.apply(window.screen, [c]) || null
  4222. }
  4223. },
  4224. requestFullscreen: function (a) {
  4225. null == a && (a = !0);
  4226. if (a) {
  4227. var a = window.document.documentElement,
  4228. b = u.loadFirstExtension(["requestFullscreen", "requestFullScreen"], a).value;
  4229. null != b && b.apply(a, [])
  4230. } else a = u.loadFirstExtension(["cancelFullscreen", "cancelFullScreen"],
  4231. window.document).value, null != a && F.callMethod(window.document, a, [])
  4232. },
  4233. onWindowResize: function () {
  4234. var a = this._canvas.parentElement.getBoundingClientRect();
  4235. this.resizeCanvas(a.width, a.height)
  4236. },
  4237. resizeCanvas: function (a, b) {
  4238. var c = this.scaleFactor * a,
  4239. e = this.scaleFactor * b;
  4240. if (this._canvas.width == c && this._canvas.height == e) return !1;
  4241. this._canvas.width = c | 0;
  4242. this._canvas.height = e | 0;
  4243. this.resize.emit();
  4244. return !0
  4245. },
  4246. hideMobileBrowser: function () {
  4247. var a = this,
  4248. b = window.document.documentElement.style;
  4249. b.height = window.innerHeight +
  4250. 100 + "px";
  4251. b.width = window.innerWidth + "px";
  4252. b.overflow = "visible";
  4253. u.callLater(function () {
  4254. u.hideMobileBrowser();
  4255. u.callLater(function () {
  4256. b.height = window.innerHeight + "px";
  4257. a.onWindowResize(null)
  4258. }, 100)
  4259. })
  4260. },
  4261. onOrientationChange: function () {
  4262. this.orientation.set__(u.orientation(window.orientation))
  4263. },
  4264. updateFullscreen: function () {
  4265. this.fullscreen.set__(!0 == u.loadFirstExtension(["fullscreen", "fullScreen", "isFullScreen"], window.document).value)
  4266. },
  4267. __class__: Ha,
  4268. __properties__: {
  4269. get_height: "get_height",
  4270. get_width: "get_width"
  4271. }
  4272. };
  4273. var jb = function (a) {
  4274. this._storage = a
  4275. };
  4276. f["flambe.platform.html.HtmlStorage"] = jb;
  4277. jb.__name__ = ["flambe", "platform", "html", "HtmlStorage"];
  4278. jb.__interfaces__ = [zb];
  4279. jb.prototype = {
  4280. set: function (a, b) {
  4281. var c;
  4282. try {
  4283. var e = new pa;
  4284. e.useCache = !0;
  4285. e.useEnumIndex = !1;
  4286. e.serialize(b);
  4287. c = e.toString()
  4288. } catch (d) {
  4289. return !1
  4290. }
  4291. try {
  4292. this._storage.setItem("flambe:" + a, c)
  4293. } catch (h) {
  4294. return !1
  4295. }
  4296. return !0
  4297. },
  4298. get: function (a, b) {
  4299. var c = null;
  4300. try {
  4301. c = this._storage.getItem("flambe:" + a)
  4302. } catch (e) {
  4303. null
  4304. }
  4305. if (null != c) try {
  4306. return V.run(c)
  4307. } catch (d) {
  4308. null
  4309. }
  4310. return b
  4311. },
  4312. __class__: jb
  4313. };
  4314. var u = function () {};
  4315. f["flambe.platform.html.HtmlUtil"] = u;
  4316. u.__name__ = ["flambe", "platform", "html", "HtmlUtil"];
  4317. u.callLater = function (a, b) {
  4318. null == b && (b = 0);
  4319. window.setTimeout(a, b)
  4320. };
  4321. u.hideMobileBrowser = function () {
  4322. window.scrollTo(1, 0)
  4323. };
  4324. u.loadExtension = function (a, b) {
  4325. null == b && (b = window);
  4326. var c = F.field(b, a);
  4327. if (null != c) return {
  4328. prefix: "",
  4329. field: a,
  4330. value: c
  4331. };
  4332. for (var c = a.charAt(0).toUpperCase() + p.substr(a, 1, null), e = 0, d = u.VENDOR_PREFIXES; e < d.length;) {
  4333. var h = d[e];
  4334. ++e;
  4335. var f = h + c,
  4336. j = F.field(b, f);
  4337. if (null != j) return {
  4338. prefix: h,
  4339. field: f,
  4340. value: j
  4341. }
  4342. }
  4343. return {
  4344. prefix: null,
  4345. field: null,
  4346. value: null
  4347. }
  4348. };
  4349. u.loadFirstExtension = function (a, b) {
  4350. for (var c = 0; c < a.length;) {
  4351. var e = a[c];
  4352. ++c;
  4353. e = u.loadExtension(e, b);
  4354. if (null != e.field) return e
  4355. }
  4356. return {
  4357. prefix: null,
  4358. field: null,
  4359. value: null
  4360. }
  4361. };
  4362. u.polyfill = function (a, b) {
  4363. null == b && (b = window);
  4364. var c = u.loadExtension(a, b).value;
  4365. if (null == c) return !1;
  4366. b[a] = c;
  4367. return !0
  4368. };
  4369. u.setVendorStyle = function (a, b, c) {
  4370. for (var a = a.style, e = 0, d = u.VENDOR_PREFIXES; e < d.length;) {
  4371. var h = d[e];
  4372. ++e;
  4373. a.setProperty("-" + h + "-" + b, c)
  4374. }
  4375. a.setProperty(b, c)
  4376. };
  4377. u.addVendorListener =
  4378. function (a, b, c, e) {
  4379. for (var d = 0, h = u.VENDOR_PREFIXES; d < h.length;) {
  4380. var f = h[d];
  4381. ++d;
  4382. a.addEventListener(f + b, c, e)
  4383. }
  4384. a.addEventListener(b, c, e)
  4385. };
  4386. u.orientation = function (a) {
  4387. switch (a) {
  4388. case -90:
  4389. case 90:
  4390. return ja.Landscape;
  4391. default:
  4392. return ja.Portrait
  4393. }
  4394. };
  4395. u.createEmptyCanvas = function (a, b) {
  4396. var c;
  4397. c = window.document.createElement("canvas");
  4398. c.width = a;
  4399. c.height = b;
  4400. return c
  4401. };
  4402. u.createCanvas = function (a) {
  4403. var b = u.createEmptyCanvas(a.width, a.height),
  4404. c = b.getContext("2d");
  4405. c.save();
  4406. c.globalCompositeOperation = "copy";
  4407. c.drawImage(a, 0, 0);
  4408. c.restore();
  4409. return b
  4410. };
  4411. u.fixAndroidMath = function () {
  4412. if (0 <= window.navigator.userAgent.indexOf("Linux; U; Android 4")) {
  4413. var a = Math.sin,
  4414. b = Math.cos;
  4415. Math.sin = function (b) {
  4416. return 0 == b ? 0 : a(b)
  4417. };
  4418. Math.cos = function (a) {
  4419. return 0 == a ? 1 : b(a)
  4420. }
  4421. }
  4422. };
  4423. var hc = function () {};
  4424. f["flambe.subsystem.WebSystem"] = hc;
  4425. hc.__name__ = ["flambe", "subsystem", "WebSystem"];
  4426. hc.prototype = {
  4427. __class__: hc
  4428. };
  4429. var lb = function (a) {
  4430. this._container = a
  4431. };
  4432. f["flambe.platform.html.HtmlWeb"] = lb;
  4433. lb.__name__ = ["flambe", "platform", "html", "HtmlWeb"];
  4434. lb.__interfaces__ = [hc];
  4435. lb.prototype = {
  4436. openBrowser: function (a) {
  4437. window.open(a, "_blank")
  4438. },
  4439. __class__: lb
  4440. };
  4441. var A = function (a) {
  4442. this._disposed = !1;
  4443. this.buffer = a
  4444. };
  4445. f["flambe.platform.html.WebAudioSound"] = A;
  4446. A.__name__ = ["flambe", "platform", "html", "WebAudioSound"];
  4447. A.__interfaces__ = [Oa];
  4448. A.__properties__ = {
  4449. get_supported: "get_supported"
  4450. };
  4451. A.get_supported = function () {
  4452. if (A._detectSupport) {
  4453. A._detectSupport = !1;
  4454. var a = u.loadExtension("AudioContext").value;
  4455. null != a && (A.ctx = new a, A.gain = A.createGain(), A.gain.connect(A.ctx.destination), l.volume.watch(function (a) {
  4456. A.gain.gain.value =
  4457. a
  4458. }))
  4459. }
  4460. return null != A.ctx
  4461. };
  4462. A.createGain = function () {
  4463. return null != A.ctx.createGain ? A.ctx.createGain() : A.ctx.createGainNode()
  4464. };
  4465. A.start = function (a, b) {
  4466. null != a.start ? a.start(b) : a.noteOn(b)
  4467. };
  4468. A.__super__ = U;
  4469. A.prototype = z(U.prototype, {
  4470. play: function (a) {
  4471. null == a && (a = 1);
  4472. return new $a(this, a, !1)
  4473. },
  4474. loop: function (a) {
  4475. null == a && (a = 1);
  4476. return new $a(this, a, !0)
  4477. },
  4478. get_duration: function () {
  4479. return this.buffer.duration
  4480. },
  4481. onDisposed: function () {
  4482. this.buffer = null
  4483. },
  4484. __class__: A,
  4485. __properties__: {
  4486. get_duration: "get_duration"
  4487. }
  4488. });
  4489. var $a = function (a,
  4490. b, c) {
  4491. var e = this;
  4492. this._sound = a;
  4493. this._head = A.gain;
  4494. this._complete = new S(!1);
  4495. this._sourceNode = A.ctx.createBufferSource();
  4496. this._sourceNode.buffer = a.buffer;
  4497. this._sourceNode.loop = c;
  4498. this._sourceNode.onended = function () {
  4499. e._complete.set__(!0)
  4500. };
  4501. A.start(this._sourceNode, 0);
  4502. this.playAudio();
  4503. this.volume = new n(b, function (a) {
  4504. e.setVolume(a)
  4505. });
  4506. 1 != b && this.setVolume(b);
  4507. l.hidden._value && this.set_paused(!0)
  4508. };
  4509. f["flambe.platform.html._WebAudioSound.WebAudioPlayback"] = $a;
  4510. $a.__name__ = ["flambe", "platform", "html", "_WebAudioSound",
  4511. "WebAudioPlayback"
  4512. ];
  4513. $a.__interfaces__ = [Cb, Pa];
  4514. $a.prototype = {
  4515. get_sound: function () {
  4516. return this._sound
  4517. },
  4518. set_paused: function (a) {
  4519. a != 0 <= this._pausedAt && (a ? (this._sourceNode.disconnect(), this._pausedAt = this.get_position()) : this.playAudio());
  4520. return a
  4521. },
  4522. get_position: function () {
  4523. return this._complete._value ? this._sound.get_duration() : 0 <= this._pausedAt ? this._pausedAt : (A.ctx.currentTime - this._startedAt) % this._sound.get_duration()
  4524. },
  4525. update: function (a) {
  4526. this.volume.update(a);
  4527. 3 == this._sourceNode.playbackState && this._complete.set__(!0);
  4528. return this._complete._value || 0 <= this._pausedAt ? (this._tickableAdded = !1, this._hideBinding.dispose(), !0) : !1
  4529. },
  4530. dispose: function () {
  4531. this.set_paused(!0);
  4532. this._complete.set__(!0)
  4533. },
  4534. setVolume: function (a) {
  4535. null == this._gainNode && (this._gainNode = A.createGain(), this.insertNode(this._gainNode));
  4536. this._gainNode.gain.value = a
  4537. },
  4538. insertNode: function (a) {
  4539. 0 <= this._pausedAt || (this._sourceNode.disconnect(), this._sourceNode.connect(a));
  4540. a.connect(this._head);
  4541. this._head = a
  4542. },
  4543. playAudio: function () {
  4544. var a = this;
  4545. this._sourceNode.connect(this._head);
  4546. this._startedAt = A.ctx.currentTime;
  4547. this._pausedAt = -1;
  4548. this._tickableAdded || (ta.instance.mainLoop.addTickable(this), this._tickableAdded = !0, this._hideBinding = l.hidden.get_changed().connect(function (b) {
  4549. b ? (a._wasPaused = 0 <= a._pausedAt, a.set_paused(!0)) : a.set_paused(a._wasPaused)
  4550. }))
  4551. },
  4552. __class__: $a,
  4553. __properties__: {
  4554. get_position: "get_position",
  4555. get_sound: "get_sound",
  4556. set_paused: "set_paused"
  4557. }
  4558. };
  4559. var Fb = function () {
  4560. this._width = this._height = -1;
  4561. this._transitor = null;
  4562. this.scenes = [];
  4563. this.occludedScenes = [];
  4564. this._root = new D
  4565. };
  4566. f["flambe.scene.Director"] = Fb;
  4567. Fb.__name__ = ["flambe", "scene", "Director"];
  4568. Fb.__super__ = E;
  4569. Fb.prototype = z(E.prototype, {
  4570. get_name: function () {
  4571. return "Director_5"
  4572. },
  4573. setSize: function (a, b) {
  4574. this._width = a;
  4575. this._height = b;
  4576. return this
  4577. },
  4578. pushScene: function (a, b) {
  4579. var c = this;
  4580. this.completeTransition();
  4581. var e = this.get_topScene();
  4582. null != e ? this.playTransition(e, a, b, function () {
  4583. c.hide(e)
  4584. }) : (this.add(a), this.invalidateVisibility())
  4585. },
  4586. popScene: function (a) {
  4587. var b = this;
  4588. this.completeTransition();
  4589. var c = this.get_topScene();
  4590. if (null != c) {
  4591. this.scenes.pop();
  4592. var e = this.get_topScene();
  4593. null != e ? this.playTransition(c, e, a, function () {
  4594. b.hideAndDispose(c)
  4595. }) : (this.hideAndDispose(c), this.invalidateVisibility())
  4596. }
  4597. },
  4598. unwindToScene: function (a, b) {
  4599. var c = this;
  4600. this.completeTransition();
  4601. var e = this.get_topScene();
  4602. if (null != e) {
  4603. if (e != a) {
  4604. for (this.scenes.pop(); 0 < this.scenes.length && this.scenes[this.scenes.length - 1] != a;) this.scenes.pop().dispose();
  4605. this.playTransition(e, a, b, function () {
  4606. c.hideAndDispose(e)
  4607. })
  4608. }
  4609. } else this.pushScene(a, b)
  4610. },
  4611. onAdded: function () {
  4612. this.owner.addChild(this._root)
  4613. },
  4614. onRemoved: function () {
  4615. this.completeTransition();
  4616. for (var a = 0, b = this.scenes; a < b.length;) {
  4617. var c = b[a];
  4618. ++a;
  4619. c.dispose()
  4620. }
  4621. this.scenes = [];
  4622. this.occludedScenes = [];
  4623. this._root.dispose()
  4624. },
  4625. onUpdate: function (a) {
  4626. null != this._transitor && this._transitor.update(a) && this.completeTransition()
  4627. },
  4628. get_topScene: function () {
  4629. var a = this.scenes.length;
  4630. return 0 < a ? this.scenes[a - 1] : null
  4631. },
  4632. add: function (a) {
  4633. var b = this.get_topScene();
  4634. null != b && this._root.removeChild(b);
  4635. p.remove(this.scenes, a);
  4636. this.scenes.push(a);
  4637. this._root.addChild(a)
  4638. },
  4639. hide: function (a) {
  4640. a =
  4641. a._compMap.Scene_4;
  4642. null != a && a.hidden.emit()
  4643. },
  4644. hideAndDispose: function (a) {
  4645. this.hide(a);
  4646. a.dispose()
  4647. },
  4648. show: function (a) {
  4649. a = a._compMap.Scene_4;
  4650. null != a && a.shown.emit()
  4651. },
  4652. invalidateVisibility: function () {
  4653. for (var a = this.scenes.length; 0 < a;) {
  4654. var b = this.scenes[--a]._compMap.Scene_4;
  4655. if (null == b || b.opaque) break
  4656. }
  4657. this.occludedScenes = 0 < this.scenes.length ? this.scenes.slice(a, this.scenes.length - 1) : [];
  4658. a = this.get_topScene();
  4659. null != a && this.show(a)
  4660. },
  4661. completeTransition: function () {
  4662. null != this._transitor && (this._transitor.complete(),
  4663. this._transitor = null, this.invalidateVisibility())
  4664. },
  4665. playTransition: function (a, b, c, e) {
  4666. this.completeTransition();
  4667. this.add(b);
  4668. null != c ? (this.occludedScenes.push(a), this._transitor = new ic(a, b, c, e), this._transitor.init(this)) : (e(), this.invalidateVisibility())
  4669. },
  4670. __class__: Fb,
  4671. __properties__: z(E.prototype.__properties__, {
  4672. get_topScene: "get_topScene"
  4673. })
  4674. });
  4675. var ic = function (a, b, c, e) {
  4676. this._from = a;
  4677. this._to = b;
  4678. this._transition = c;
  4679. this._onComplete = e
  4680. };
  4681. f["flambe.scene._Director.Transitor"] = ic;
  4682. ic.__name__ = ["flambe", "scene",
  4683. "_Director", "Transitor"
  4684. ];
  4685. ic.prototype = {
  4686. init: function (a) {
  4687. this._transition.init(a, this._from, this._to)
  4688. },
  4689. update: function (a) {
  4690. return this._transition.update(a)
  4691. },
  4692. complete: function () {
  4693. this._transition.complete();
  4694. this._onComplete()
  4695. },
  4696. __class__: ic
  4697. };
  4698. var ab = function () {};
  4699. f["flambe.scene.Transition"] = ab;
  4700. ab.__name__ = ["flambe", "scene", "Transition"];
  4701. ab.prototype = {
  4702. init: function (a, b, c) {
  4703. this._director = a;
  4704. this._from = b;
  4705. this._to = c
  4706. },
  4707. update: function () {
  4708. return !0
  4709. },
  4710. complete: function () {},
  4711. __class__: ab
  4712. };
  4713. var ua = function (a, b) {
  4714. this._duration =
  4715. a;
  4716. this._ease = null != b ? b : q.linear
  4717. };
  4718. f["flambe.scene.TweenTransition"] = ua;
  4719. ua.__name__ = ["flambe", "scene", "TweenTransition"];
  4720. ua.__super__ = ab;
  4721. ua.prototype = z(ab.prototype, {
  4722. init: function (a, b, c) {
  4723. ab.prototype.init.call(this, a, b, c);
  4724. this._elapsed = 0
  4725. },
  4726. update: function (a) {
  4727. this._elapsed += a;
  4728. return this._elapsed >= this._duration
  4729. },
  4730. interp: function (a, b) {
  4731. return a + (b - a) * this._ease(this._elapsed / this._duration)
  4732. },
  4733. __class__: ua
  4734. });
  4735. var Ea = function (a, b) {
  4736. ua.call(this, a, b)
  4737. };
  4738. f["flambe.scene.FadeTransition"] = Ea;
  4739. Ea.__name__ = ["flambe",
  4740. "scene", "FadeTransition"
  4741. ];
  4742. Ea.__super__ = ua;
  4743. Ea.prototype = z(ua.prototype, {
  4744. init: function (a, b, c) {
  4745. ua.prototype.init.call(this, a, b, c);
  4746. a = this._to._compMap.Sprite_0;
  4747. null == a && this._to.add(a = new r);
  4748. a.alpha.set__(0)
  4749. },
  4750. update: function (a) {
  4751. a = ua.prototype.update.call(this, a);
  4752. this._to._compMap.Sprite_0.alpha.set__(this.interp(0, 1));
  4753. return a
  4754. },
  4755. complete: function () {
  4756. this._to._compMap.Sprite_0.alpha.set__(1)
  4757. },
  4758. __class__: Ea
  4759. });
  4760. var ka = function (a) {
  4761. null == a && (a = !0);
  4762. this.opaque = a;
  4763. this.shown = new oa;
  4764. this.hidden = new oa
  4765. };
  4766. f["flambe.scene.Scene"] =
  4767. ka;
  4768. ka.__name__ = ["flambe", "scene", "Scene"];
  4769. ka.__super__ = E;
  4770. ka.prototype = z(E.prototype, {
  4771. get_name: function () {
  4772. return "Scene_4"
  4773. },
  4774. __class__: ka
  4775. });
  4776. var qa = function () {};
  4777. f["flambe.script.Action"] = qa;
  4778. qa.__name__ = ["flambe", "script", "Action"];
  4779. qa.prototype = {
  4780. __class__: qa
  4781. };
  4782. var Gb = function (a, b, c, e) {
  4783. this._value = a;
  4784. this._to = b;
  4785. this._seconds = c;
  4786. this._easing = e
  4787. };
  4788. f["flambe.script.AnimateTo"] = Gb;
  4789. Gb.__name__ = ["flambe", "script", "AnimateTo"];
  4790. Gb.__interfaces__ = [qa];
  4791. Gb.prototype = {
  4792. update: function (a) {
  4793. null == this._tween && (this._tween =
  4794. new La(this._value._value, this._to, this._seconds, this._easing), this._value.set_behavior(this._tween), this._value.update(a));
  4795. if (this._value._behavior != this._tween) {
  4796. var b = this._tween.elapsed - this._seconds;
  4797. this._tween = null;
  4798. return 0 < b ? a - b : 0
  4799. }
  4800. return -1
  4801. },
  4802. __class__: Gb
  4803. };
  4804. var ga = function (a) {
  4805. this._fn = a
  4806. };
  4807. f["flambe.script.CallFunction"] = ga;
  4808. ga.__name__ = ["flambe", "script", "CallFunction"];
  4809. ga.__interfaces__ = [qa];
  4810. ga.prototype = {
  4811. update: function () {
  4812. this._fn();
  4813. return 0
  4814. },
  4815. __class__: ga
  4816. };
  4817. var na = function (a) {
  4818. this._duration = a;
  4819. this._elapsed =
  4820. 0
  4821. };
  4822. f["flambe.script.Delay"] = na;
  4823. na.__name__ = ["flambe", "script", "Delay"];
  4824. na.__interfaces__ = [qa];
  4825. na.prototype = {
  4826. update: function (a) {
  4827. this._elapsed += a;
  4828. if (this._elapsed >= this._duration) {
  4829. var b = this._elapsed - this._duration;
  4830. this._elapsed = 0;
  4831. return a - b
  4832. }
  4833. return -1
  4834. },
  4835. __class__: na
  4836. };
  4837. var Hb = function (a) {
  4838. this._completedActions = [];
  4839. this._runningActions = null != a ? a.slice() : []
  4840. };
  4841. f["flambe.script.Parallel"] = Hb;
  4842. Hb.__name__ = ["flambe", "script", "Parallel"];
  4843. Hb.__interfaces__ = [qa];
  4844. Hb.prototype = {
  4845. update: function (a, b) {
  4846. for (var c = !0, e = 0,
  4847. d = 0, h = this._runningActions.length; d < h;) {
  4848. var f = d++,
  4849. j = this._runningActions[f];
  4850. if (null != j) {
  4851. var i = j.update(a, b);
  4852. 0 <= i ? (this._runningActions[f] = null, this._completedActions.push(j), i > e && (e = i)) : c = !1
  4853. }
  4854. }
  4855. return c ? (this._runningActions = this._completedActions, this._completedActions = [], e) : -1
  4856. },
  4857. __class__: Hb
  4858. };
  4859. var Ib = function (a, b) {
  4860. null == b && (b = -1);
  4861. this._action = a;
  4862. this._remaining = this._count = b
  4863. };
  4864. f["flambe.script.Repeat"] = Ib;
  4865. Ib.__name__ = ["flambe", "script", "Repeat"];
  4866. Ib.__interfaces__ = [qa];
  4867. Ib.prototype = {
  4868. update: function (a,
  4869. b) {
  4870. if (0 == this._count) return 0;
  4871. var c = this._action.update(a, b);
  4872. return 0 < this._count && 0 <= c && 0 == --this._remaining ? (this._remaining = this._count, c) : -1
  4873. },
  4874. __class__: Ib
  4875. };
  4876. var ma = function () {
  4877. this.stopAll()
  4878. };
  4879. f["flambe.script.Script"] = ma;
  4880. ma.__name__ = ["flambe", "script", "Script"];
  4881. ma.__super__ = E;
  4882. ma.prototype = z(E.prototype, {
  4883. get_name: function () {
  4884. return "Script_3"
  4885. },
  4886. run: function (a) {
  4887. a = new Jb(a);
  4888. this._handles.push(a);
  4889. return a
  4890. },
  4891. stopAll: function () {
  4892. this._handles = []
  4893. },
  4894. onUpdate: function (a) {
  4895. for (var b = 0; b < this._handles.length;) {
  4896. var c =
  4897. this._handles[b];
  4898. c.removed || 0 <= c.action.update(a, this.owner) ? this._handles.splice(b, 1) : ++b
  4899. }
  4900. },
  4901. __class__: ma
  4902. });
  4903. var Jb = function (a) {
  4904. this.removed = !1;
  4905. this.action = a
  4906. };
  4907. f["flambe.script._Script.Handle"] = Jb;
  4908. Jb.__name__ = ["flambe", "script", "_Script", "Handle"];
  4909. Jb.__interfaces__ = [ha];
  4910. Jb.prototype = {
  4911. dispose: function () {
  4912. this.removed = !0;
  4913. this.action = null
  4914. },
  4915. __class__: Jb
  4916. };
  4917. var xa = function (a) {
  4918. this._idx = 0;
  4919. this._runningActions = null != a ? a.slice() : []
  4920. };
  4921. f["flambe.script.Sequence"] = xa;
  4922. xa.__name__ = ["flambe", "script", "Sequence"];
  4923. xa.__interfaces__ = [qa];
  4924. xa.prototype = {
  4925. add: function (a) {
  4926. this._runningActions.push(a)
  4927. },
  4928. update: function (a, b) {
  4929. for (var c = 0;;) {
  4930. var e = this._runningActions[this._idx];
  4931. if (null != e)
  4932. if (e = e.update(a - c, b), 0 <= e) c += e;
  4933. else return -1;
  4934. ++this._idx;
  4935. if (this._idx >= this._runningActions.length) {
  4936. this._idx = 0;
  4937. break
  4938. } else if (c > a) return -1
  4939. }
  4940. return c
  4941. },
  4942. __class__: xa
  4943. };
  4944. var ya = function (a, b, c) {
  4945. this._strengthX = a;
  4946. this._strengthY = b;
  4947. this._duration = c;
  4948. this._elapsed = 0
  4949. };
  4950. f["flambe.script.Shake"] = ya;
  4951. ya.__name__ = ["flambe", "script", "Shake"];
  4952. ya.__interfaces__ = [qa];
  4953. ya.prototype = {
  4954. update: function (a, b) {
  4955. var c = b._compMap.Sprite_0;
  4956. null == this._jitterX && (this._jitterX = new Ta(c.x._value, this._strengthX), this._jitterY = new Ta(c.y._value, this._strengthY), c.x.set_behavior(this._jitterX), c.y.set_behavior(this._jitterY));
  4957. this._elapsed += a;
  4958. if (this._elapsed >= this._duration) {
  4959. var e = this._elapsed - this._duration;
  4960. c.x._behavior == this._jitterX && c.x.set__(this._jitterX.base);
  4961. c.y._behavior == this._jitterY && c.y.set__(this._jitterY.base);
  4962. this._jitterY = this._jitterX = null;
  4963. this._elapsed = 0;
  4964. return a - e
  4965. }
  4966. return -1
  4967. },
  4968. __class__: ya
  4969. };
  4970. var da = f["flambe.subsystem.RendererType"] = {
  4971. __ename__: ["flambe", "subsystem", "RendererType"],
  4972. __constructs__: ["Stage3D", "WebGL", "Canvas"]
  4973. };
  4974. da.Stage3D = ["Stage3D", 0];
  4975. da.Stage3D.toString = s;
  4976. da.Stage3D.__enum__ = da;
  4977. da.WebGL = ["WebGL", 1];
  4978. da.WebGL.toString = s;
  4979. da.WebGL.__enum__ = da;
  4980. da.Canvas = ["Canvas", 2];
  4981. da.Canvas.toString = s;
  4982. da.Canvas.__enum__ = da;
  4983. var Kb = function () {};
  4984. f["flambe.swf.Symbol"] = Kb;
  4985. Kb.__name__ = ["flambe", "swf", "Symbol"];
  4986. Kb.prototype = {
  4987. __class__: Kb
  4988. };
  4989. var kc = function (a, b) {
  4990. this.name = a;
  4991. var c = 1 /
  4992. b.length;
  4993. this.frames = [];
  4994. for (var e = 0; e < b.length;) {
  4995. var d = b[e];
  4996. ++e;
  4997. this.frames.push(new jc(d, c))
  4998. }
  4999. };
  5000. f["flambe.swf.Flipbook"] = kc;
  5001. kc.__name__ = ["flambe", "swf", "Flipbook"];
  5002. kc.prototype = {
  5003. setDuration: function (a) {
  5004. for (var a = a / this.frames.length, b = 0, c = this.frames; b < c.length;) {
  5005. var e = c[b];
  5006. ++b;
  5007. e.duration = a
  5008. }
  5009. return this
  5010. },
  5011. setAnchor: function (a, b) {
  5012. for (var c = 0, e = this.frames; c < e.length;) {
  5013. var d = e[c];
  5014. ++c;
  5015. d.anchorX = a;
  5016. d.anchorY = b
  5017. }
  5018. return this
  5019. },
  5020. __class__: kc
  5021. };
  5022. var jc = function (a, b) {
  5023. this.label = null;
  5024. this.anchorX = this.anchorY = 0;
  5025. this.texture =
  5026. a;
  5027. this.duration = b
  5028. };
  5029. f["flambe.swf.FlipbookFrame"] = jc;
  5030. jc.__name__ = ["flambe", "swf", "FlipbookFrame"];
  5031. jc.prototype = {
  5032. toSymbol: function () {
  5033. return new Lb(this)
  5034. },
  5035. __class__: jc
  5036. };
  5037. var Lb = function (a) {
  5038. this._texture = a.texture;
  5039. this._anchorX = a.anchorX;
  5040. this._anchorY = a.anchorY
  5041. };
  5042. f["flambe.swf._Flipbook.FrameSymbol"] = Lb;
  5043. Lb.__name__ = ["flambe", "swf", "_Flipbook", "FrameSymbol"];
  5044. Lb.__interfaces__ = [Kb];
  5045. Lb.prototype = {
  5046. createSprite: function () {
  5047. var a = new Ua(this._texture);
  5048. a.setAnchor(this._anchorX, this._anchorY);
  5049. return a
  5050. },
  5051. __class__: Lb
  5052. };
  5053. var bb = function () {};
  5054. f["flambe.swf.Library"] = bb;
  5055. bb.__name__ = ["flambe", "swf", "Library"];
  5056. bb.fromFlipbooks = function (a) {
  5057. var b = H.createEmptyInstance(bb);
  5058. b._symbols = new O;
  5059. b.frameRate = 60;
  5060. for (var c = 0; c < a.length;) {
  5061. var e = a[c];
  5062. ++c;
  5063. for (var d = [], h = 0, f = e.frames; h < f.length;) {
  5064. var j = f[h];
  5065. ++h;
  5066. d.push({
  5067. duration: j.duration * b.frameRate,
  5068. label: j.label,
  5069. pivot: [j.anchorX, j.anchorY],
  5070. ref: ""
  5071. })
  5072. }
  5073. d = new Mb(b, {
  5074. id: e.name,
  5075. layers: [{
  5076. name: "flipbook",
  5077. flipbook: !0,
  5078. keyframes: d
  5079. }]
  5080. });
  5081. b._symbols.set(e.name, d);
  5082. d = d.layers[0].keyframes;
  5083. h = 0;
  5084. for (f = e.frames.length; h <
  5085. f;) j = h++, d[j].setSymbol(e.frames[j].toSymbol())
  5086. }
  5087. return b
  5088. };
  5089. bb.prototype = {
  5090. createSprite: function (a, b) {
  5091. null == b && (b = !0);
  5092. var c = this._symbols.get(a);
  5093. if (null == c) {
  5094. if (b) throw M.withFields("Missing symbol", ["name", a]);
  5095. return null
  5096. }
  5097. return c.createSprite()
  5098. },
  5099. __class__: bb
  5100. };
  5101. var cb = function (a) {
  5102. this._looped = null;
  5103. r.call(this);
  5104. this.symbol = a;
  5105. this.speed = new n(1);
  5106. this._animators = Array(a.layers.length);
  5107. for (var b = 0, c = this._animators.length; b < c;) {
  5108. var e = b++;
  5109. this._animators[e] = new lc(a.layers[e])
  5110. }
  5111. this._position = this._frame = 0;
  5112. this["goto"](1)
  5113. };
  5114. f["flambe.swf.MovieSprite"] = cb;
  5115. cb.__name__ = ["flambe", "swf", "MovieSprite"];
  5116. cb.__super__ = r;
  5117. cb.prototype = z(r.prototype, {
  5118. onAdded: function () {
  5119. r.prototype.onAdded.call(this);
  5120. for (var a = 0, b = this._animators; a < b.length;) {
  5121. var c = b[a];
  5122. ++a;
  5123. this.owner.addChild(c.content)
  5124. }
  5125. },
  5126. onRemoved: function () {
  5127. r.prototype.onRemoved.call(this);
  5128. for (var a = 0, b = this._animators; a < b.length;) {
  5129. var c = b[a];
  5130. ++a;
  5131. this.owner.removeChild(c.content)
  5132. }
  5133. },
  5134. onUpdate: function (a) {
  5135. r.prototype.onUpdate.call(this, a);
  5136. this.speed.update(a);
  5137. switch (this._flags &
  5138. 48) {
  5139. case 0:
  5140. this._position += this.speed._value * a;
  5141. this._position > this.symbol.duration && (this._position %= this.symbol.duration, null != this._looped && this._looped.emit());
  5142. break;
  5143. case 32:
  5144. this._flags &= -33
  5145. }
  5146. this["goto"](this._position * this.symbol.frameRate)
  5147. },
  5148. "goto": function (a) {
  5149. if (this._frame != a) {
  5150. if (a < this._frame)
  5151. for (var b = 0, c = this._animators; b < c.length;) {
  5152. var e = c[b];
  5153. ++b;
  5154. e.needsKeyframeUpdate = !0;
  5155. e.keyframeIdx = 0
  5156. }
  5157. b = 0;
  5158. for (c = this._animators; b < c.length;) e = c[b], ++b, e.composeFrame(a);
  5159. this._frame = a
  5160. }
  5161. },
  5162. set_paused: function (a) {
  5163. this._flags =
  5164. pb.set(this._flags, 16, a);
  5165. return a
  5166. },
  5167. get_looped: function () {
  5168. null == this._looped && (this._looped = new oa);
  5169. return this._looped
  5170. },
  5171. rewind: function () {
  5172. this._position = 0;
  5173. this._flags |= 32
  5174. },
  5175. __class__: cb,
  5176. __properties__: z(r.prototype.__properties__, {
  5177. get_looped: "get_looped",
  5178. set_paused: "set_paused"
  5179. })
  5180. });
  5181. var lc = function (a) {
  5182. this.keyframeIdx = 0;
  5183. this.needsKeyframeUpdate = !1;
  5184. this.layer = a;
  5185. this.content = new D;
  5186. if (a.empty) this._sprites = null;
  5187. else {
  5188. this._sprites = Array(a.keyframes.length);
  5189. for (var b = 0, c = this._sprites.length; b < c;) {
  5190. var e =
  5191. b++,
  5192. d = a.keyframes[e];
  5193. this._sprites[e] = 0 < e && a.keyframes[e - 1].symbol == d.symbol ? this._sprites[e - 1] : null == d.symbol ? new r : d.symbol.createSprite()
  5194. }
  5195. this.content.add(this._sprites[0])
  5196. }
  5197. };
  5198. f["flambe.swf._MovieSprite.LayerAnimator"] = lc;
  5199. lc.__name__ = ["flambe", "swf", "_MovieSprite", "LayerAnimator"];
  5200. lc.prototype = {
  5201. composeFrame: function (a) {
  5202. if (null != this._sprites) {
  5203. var b = this.layer.keyframes,
  5204. c = b.length - 1;
  5205. if (a > this.layer.frames) this.content._compMap.Sprite_0.set_visible(!1), this.keyframeIdx = c, this.needsKeyframeUpdate = !0;
  5206. else {
  5207. for (; this.keyframeIdx < c && b[this.keyframeIdx + 1].index <= a;)++this.keyframeIdx, this.needsKeyframeUpdate = !0;
  5208. var e;
  5209. this.needsKeyframeUpdate ? (this.needsKeyframeUpdate = !1, e = this._sprites[this.keyframeIdx], e != this.content._compMap.Sprite_0 && (H.getClass(e) == cb && e.rewind(), this.content.add(e))) : e = this.content._compMap.Sprite_0;
  5210. var d = b[this.keyframeIdx],
  5211. h = d.visible && null != d.symbol;
  5212. e.set_visible(h);
  5213. if (h) {
  5214. var h = d.x,
  5215. f = d.y,
  5216. j = d.scaleX,
  5217. i = d.scaleY,
  5218. k = d.skewX,
  5219. m = d.skewY,
  5220. l = d.alpha;
  5221. if (d.tweened && this.keyframeIdx <
  5222. c) {
  5223. a = (a - d.index) / d.duration;
  5224. c = d.ease;
  5225. if (0 != c) {
  5226. var n;
  5227. 0 > c ? (n = 1 - a, n = 1 - n * n, c = -c) : n = a * a;
  5228. a = c * n + (1 - c) * a
  5229. }
  5230. b = b[this.keyframeIdx + 1];
  5231. h += (b.x - h) * a;
  5232. f += (b.y - f) * a;
  5233. j += (b.scaleX - j) * a;
  5234. i += (b.scaleY - i) * a;
  5235. k += (b.skewX - k) * a;
  5236. m += (b.skewY - m) * a;
  5237. l += (b.alpha - l) * a
  5238. }
  5239. b = e.getLocalMatrix();
  5240. a = Math.sin(k);
  5241. k = Math.cos(k);
  5242. c = Math.sin(m);
  5243. m = Math.cos(m);
  5244. b.set(m * j, c * j, -a * i, k * i, h, f);
  5245. b.translate(-d.pivotX, -d.pivotY);
  5246. e.alpha.set__(l)
  5247. }
  5248. }
  5249. }
  5250. },
  5251. __class__: lc
  5252. };
  5253. var Mb = function (a, b) {
  5254. this._name = b.id;
  5255. this.frameRate = a.frameRate;
  5256. this.frames = 0;
  5257. this.layers = Array(b.layers.length);
  5258. for (var c = 0, e = this.layers.length; c < e;) {
  5259. var d = c++,
  5260. h = new mc(b.layers[d]);
  5261. this.frames = Math.max(h.frames, this.frames);
  5262. this.layers[d] = h
  5263. }
  5264. this.duration = this.frames / this.frameRate
  5265. };
  5266. f["flambe.swf.MovieSymbol"] = Mb;
  5267. Mb.__name__ = ["flambe", "swf", "MovieSymbol"];
  5268. Mb.__interfaces__ = [Kb];
  5269. Mb.prototype = {
  5270. createSprite: function () {
  5271. return new cb(this)
  5272. },
  5273. __class__: Mb
  5274. };
  5275. var mc = function (a) {
  5276. this.empty = !0;
  5277. this.name = a.name;
  5278. var b = null;
  5279. this.keyframes = Array(a.keyframes.length);
  5280. for (var c = 0, e = this.keyframes.length; c < e;) {
  5281. var d = c++,
  5282. b = new nc(a.keyframes[d],
  5283. b);
  5284. this.keyframes[d] = b;
  5285. this.empty = this.empty && null == b.symbolName
  5286. }
  5287. this.frames = null != b ? b.index + b.duration : 0
  5288. };
  5289. f["flambe.swf.MovieLayer"] = mc;
  5290. mc.__name__ = ["flambe", "swf", "MovieLayer"];
  5291. mc.prototype = {
  5292. __class__: mc
  5293. };
  5294. var nc = function (a, b) {
  5295. this.ease = 0;
  5296. this.visible = this.tweened = !0;
  5297. this.alpha = 1;
  5298. this.skewX = this.skewY = this.pivotX = this.pivotY = 0;
  5299. this.scaleX = this.scaleY = 1;
  5300. this.x = this.y = 0;
  5301. this.symbol = null;
  5302. this.index = null != b ? b.index + b.duration : 0;
  5303. this.duration = a.duration;
  5304. this.label = a.label;
  5305. this.symbolName = a.ref;
  5306. var c =
  5307. a.loc;
  5308. null != c && (this.x = c[0], this.y = c[1]);
  5309. c = a.scale;
  5310. null != c && (this.scaleX = c[0], this.scaleY = c[1]);
  5311. c = a.skew;
  5312. null != c && (this.skewX = c[0], this.skewY = c[1]);
  5313. c = a.pivot;
  5314. null != c && (this.pivotX = c[0], this.pivotY = c[1]);
  5315. null != a.alpha && (this.alpha = a.alpha);
  5316. null != a.visible && (this.visible = a.visible);
  5317. null != a.tweened && (this.tweened = a.tweened);
  5318. null != a.ease && (this.ease = a.ease)
  5319. };
  5320. f["flambe.swf.MovieKeyframe"] = nc;
  5321. nc.__name__ = ["flambe", "swf", "MovieKeyframe"];
  5322. nc.prototype = {
  5323. setSymbol: function (a) {
  5324. this.symbol = a
  5325. },
  5326. __class__: nc
  5327. };
  5328. var wc =
  5329. function () {};
  5330. f["flambe.util.Assert"] = wc;
  5331. wc.__name__ = ["flambe", "util", "Assert"];
  5332. wc.that = function () {};
  5333. var pb = function () {};
  5334. f["flambe.util.BitSets"] = pb;
  5335. pb.__name__ = ["flambe", "util", "BitSets"];
  5336. pb.set = function (a, b, c) {
  5337. return c ? a | b : a & ~b
  5338. };
  5339. var db = function () {
  5340. this.mainSection = new O;
  5341. this.sections = new O
  5342. };
  5343. f["flambe.util.Config"] = db;
  5344. db.__name__ = ["flambe", "util", "Config"];
  5345. db.parse = function (a) {
  5346. for (var b = new db, c = new $("^\\s*;", ""), e = new $("^\\s*\\[\\s*([^\\]]*)\\s*\\]", ""), d = new $("^\\s*([\\w\\.\\-_]+)\\s*=\\s*(.*)",
  5347. ""), h = b.mainSection, f = 0, a = (new $("\r\n|\r|\n", "g")).split(a); f < a.length;) {
  5348. var j = a[f];
  5349. ++f;
  5350. if (!c.match(j))
  5351. if (e.match(j)) j = e.matched(1), b.sections.exists(j) ? h = b.sections.get(j) : (h = new O, b.sections.set(j, h));
  5352. else if (d.match(j)) {
  5353. var j = d.matched(1),
  5354. i = d.matched(2),
  5355. k = i.charCodeAt(0);
  5356. if ((34 == k || 39 == k) && i.charCodeAt(i.length - 1) == k) i = p.substr(i, 1, i.length - 2);
  5357. i = I.replace(I.replace(I.replace(I.replace(I.replace(I.replace(i, "\\n", "\n"), "\\r", "\r"), "\\t", "\t"), "\\'", "'"), '\\"', '"'), "\\\\", "\\");
  5358. h.set(j, i)
  5359. }
  5360. }
  5361. return b
  5362. };
  5363. db.prototype = {
  5364. get: function (a) {
  5365. var b = a.indexOf(".");
  5366. if (0 > b) return this.mainSection.get(a);
  5367. var c;
  5368. c = this.sections.get(p.substr(a, 0, b));
  5369. return null != c ? (a = p.substr(a, b + 1, null), c.get(a)) : null
  5370. },
  5371. __class__: db
  5372. };
  5373. var eb = function (a) {
  5374. this.config = a;
  5375. this.missingTranslation = new G
  5376. };
  5377. f["flambe.util.MessageBundle"] = eb;
  5378. eb.__name__ = ["flambe", "util", "MessageBundle"];
  5379. eb.parse = function (a) {
  5380. return new eb(db.parse(a))
  5381. };
  5382. eb.prototype = {
  5383. get: function (a, b) {
  5384. var c = this.config.get(a);
  5385. return null == c ? (this.missingTranslation.emit(a), a) :
  5386. null != b ? M.substitute(c, b) : c
  5387. },
  5388. __class__: eb
  5389. };
  5390. var wb = function () {
  5391. this.success = new G;
  5392. this.error = new G;
  5393. this.progressChanged = new oa;
  5394. this.hasResult = !1;
  5395. this._total = this._progress = 0
  5396. };
  5397. f["flambe.util.Promise"] = wb;
  5398. wb.__name__ = ["flambe", "util", "Promise"];
  5399. wb.prototype = {
  5400. set_result: function (a) {
  5401. if (this.hasResult) throw "Promise result already assigned";
  5402. this._result = a;
  5403. this.hasResult = !0;
  5404. this.success.emit(a);
  5405. return a
  5406. },
  5407. get: function (a) {
  5408. return this.hasResult ? (a(this._result), null) : this.success.connect(a).once()
  5409. },
  5410. set_progress: function (a) {
  5411. this._progress !=
  5412. a && (this._progress = a, this.progressChanged.emit());
  5413. return a
  5414. },
  5415. set_total: function (a) {
  5416. this._total != a && (this._total = a, this.progressChanged.emit());
  5417. return a
  5418. },
  5419. __class__: wb,
  5420. __properties__: {
  5421. set_total: "set_total",
  5422. set_progress: "set_progress",
  5423. set_result: "set_result"
  5424. }
  5425. };
  5426. var oa = function (a) {
  5427. P.call(this, a)
  5428. };
  5429. f["flambe.util.Signal0"] = oa;
  5430. oa.__name__ = ["flambe", "util", "Signal0"];
  5431. oa.__super__ = P;
  5432. oa.prototype = z(P.prototype, {
  5433. connect: function (a, b) {
  5434. null == b && (b = !1);
  5435. return this.connectImpl(a, b)
  5436. },
  5437. emit: function () {
  5438. var a = this;
  5439. this._head ==
  5440. P.DISPATCHING_SENTINEL ? this.defer(function () {
  5441. a.emitImpl()
  5442. }) : this.emitImpl()
  5443. },
  5444. emitImpl: function () {
  5445. for (var a = this.willEmit(), b = a; null != b;) b._listener(), b.stayInList || b.dispose(), b = b._next;
  5446. this.didEmit(a)
  5447. },
  5448. __class__: oa
  5449. });
  5450. var Sb = function (a) {
  5451. this.next = null;
  5452. this.fn = a
  5453. };
  5454. f["flambe.util._SignalBase.Task"] = Sb;
  5455. Sb.__name__ = ["flambe", "util", "_SignalBase", "Task"];
  5456. Sb.prototype = {
  5457. __class__: Sb
  5458. };
  5459. var M = function () {};
  5460. f["flambe.util.Strings"] = M;
  5461. M.__name__ = ["flambe", "util", "Strings"];
  5462. M.getFileExtension = function (a) {
  5463. var b =
  5464. a.lastIndexOf(".");
  5465. return 0 < b ? p.substr(a, b + 1, null) : null
  5466. };
  5467. M.removeFileExtension = function (a) {
  5468. var b = a.lastIndexOf(".");
  5469. return 0 < b ? p.substr(a, 0, b) : a
  5470. };
  5471. M.getUrlExtension = function (a) {
  5472. var b = a.lastIndexOf("?");
  5473. 0 <= b && (a = p.substr(a, 0, b));
  5474. b = a.lastIndexOf("/");
  5475. 0 <= b && (a = p.substr(a, b + 1, null));
  5476. return M.getFileExtension(a)
  5477. };
  5478. M.joinPath = function (a, b) {
  5479. 0 < a.length && 47 != a.charCodeAt(a.length - 1) && (a += "/");
  5480. return a + b
  5481. };
  5482. M.substitute = function (a, b) {
  5483. for (var c = 0, e = b.length; c < e;) var d = c++,
  5484. a = I.replace(a, "{" + d + "}", b[d]);
  5485. return a
  5486. };
  5487. M.withFields = function (a, b) {
  5488. var c = b.length;
  5489. if (0 < c) {
  5490. for (var a = 0 < a.length ? a + " [" : a + "[", e = 0; e < c;) {
  5491. 0 < e && (a += ", ");
  5492. var d = b[e],
  5493. h = b[e + 1];
  5494. if (x.is(h, Error)) {
  5495. var f = h.stack;
  5496. null != f && (h = f)
  5497. }
  5498. a += d + "=" + x.string(h);
  5499. e += 2
  5500. }
  5501. a += "]"
  5502. }
  5503. return a
  5504. };
  5505. var pa = function () {
  5506. this.buf = new Ga;
  5507. this.cache = [];
  5508. this.useCache = pa.USE_CACHE;
  5509. this.useEnumIndex = pa.USE_ENUM_INDEX;
  5510. this.shash = new O;
  5511. this.scount = 0
  5512. };
  5513. f["haxe.Serializer"] = pa;
  5514. pa.__name__ = ["haxe", "Serializer"];
  5515. pa.prototype = {
  5516. toString: function () {
  5517. return this.buf.b
  5518. },
  5519. serializeString: function (a) {
  5520. var b =
  5521. this.shash.get(a);
  5522. null != b ? (this.buf.b += "R", this.buf.b = null == b ? this.buf.b + "null" : this.buf.b + ("" + b)) : (this.shash.set(a, this.scount++), this.buf.b += "y", a = encodeURIComponent(a), this.buf.b = null == a.length ? this.buf.b + "null" : this.buf.b + ("" + a.length), this.buf.b += ":", this.buf.b = null == a ? this.buf.b + "null" : this.buf.b + ("" + a))
  5523. },
  5524. serializeRef: function (a) {
  5525. for (var b = typeof a, c = 0, e = this.cache.length; c < e;) {
  5526. var d = c++,
  5527. h = this.cache[d];
  5528. if (typeof h == b && h == a) return this.buf.b += "r", this.buf.b = null == d ? this.buf.b + "null" : this.buf.b +
  5529. ("" + d), !0
  5530. }
  5531. this.cache.push(a);
  5532. return !1
  5533. },
  5534. serializeFields: function (a) {
  5535. for (var b = 0, c = F.fields(a); b < c.length;) {
  5536. var e = c[b];
  5537. ++b;
  5538. this.serializeString(e);
  5539. this.serialize(F.field(a, e))
  5540. }
  5541. this.buf.b += "g"
  5542. },
  5543. serialize: function (a) {
  5544. var b = H["typeof"](a);
  5545. switch (b[1]) {
  5546. case 0:
  5547. this.buf.b += "n";
  5548. break;
  5549. case 1:
  5550. if (0 == a) {
  5551. this.buf.b += "z";
  5552. break
  5553. }
  5554. this.buf.b += "i";
  5555. this.buf.b = null == a ? this.buf.b + "null" : this.buf.b + ("" + a);
  5556. break;
  5557. case 2:
  5558. Math.isNaN(a) ? this.buf.b += "k" : Math.isFinite(a) ? (this.buf.b += "d", this.buf.b = null == a ? this.buf.b + "null" : this.buf.b +
  5559. ("" + a)) : this.buf.b = 0 > a ? this.buf.b + "m" : this.buf.b + "p";
  5560. break;
  5561. case 3:
  5562. this.buf.b = a ? this.buf.b + "t" : this.buf.b + "f";
  5563. break;
  5564. case 6:
  5565. b = b[2];
  5566. if (b == String) {
  5567. this.serializeString(a);
  5568. break
  5569. }
  5570. if (this.useCache && this.serializeRef(a)) break;
  5571. switch (b) {
  5572. case Array:
  5573. b = 0;
  5574. this.buf.b += "a";
  5575. for (var c = a.length, e = 0; e < c;) {
  5576. var d = e++;
  5577. null == a[d] ? b++ : (0 < b && (1 == b ? this.buf.b += "n" : (this.buf.b += "u", this.buf.b = null == b ? this.buf.b + "null" : this.buf.b + ("" + b)), b = 0), this.serialize(a[d]))
  5578. }
  5579. 0 < b && (1 == b ? this.buf.b += "n" : (this.buf.b += "u", this.buf.b = null ==
  5580. b ? this.buf.b + "null" : this.buf.b + ("" + b)));
  5581. this.buf.b += "h";
  5582. break;
  5583. case fb:
  5584. this.buf.b += "l";
  5585. for (a = a.iterator(); a.hasNext();) this.serialize(a.next());
  5586. this.buf.b += "h";
  5587. break;
  5588. case Date:
  5589. this.buf.b += "v";
  5590. this.buf.add(p.dateStr(a));
  5591. break;
  5592. case O:
  5593. this.buf.b += "b";
  5594. for (b = a.keys(); b.hasNext();) c = b.next(), this.serializeString(c), this.serialize(a.get(c));
  5595. this.buf.b += "h";
  5596. break;
  5597. case ba:
  5598. this.buf.b += "q";
  5599. for (b = a.keys(); b.hasNext();) c = b.next(), this.buf.b += ":", this.buf.b = null == c ? this.buf.b + "null" : this.buf.b + ("" + c), this.serialize(a.get(c));
  5600. this.buf.b += "h";
  5601. break;
  5602. case Fa:
  5603. this.buf.b += "M";
  5604. for (b = a.keys(); b.hasNext();) c = b.next(), e = F.field(c, "__id__"), F.deleteField(c, "__id__"), this.serialize(c), c.__id__ = e, this.serialize(a.h[c.__id__]);
  5605. this.buf.b += "h";
  5606. break;
  5607. case Qa:
  5608. e = 0;
  5609. d = a.length - 2;
  5610. b = new Ga;
  5611. for (c = pa.BASE64; e < d;) {
  5612. var h = a.get(e++),
  5613. f = a.get(e++),
  5614. j = a.get(e++);
  5615. b.add(c.charAt(h >> 2));
  5616. b.add(c.charAt((h << 4 | f >> 4) & 63));
  5617. b.add(c.charAt((f << 2 | j >> 6) & 63));
  5618. b.add(c.charAt(j & 63))
  5619. }
  5620. e == d ? (d = a.get(e++), a = a.get(e++), b.add(c.charAt(d >> 2)), b.add(c.charAt((d << 4 | a >> 4) &
  5621. 63)), b.add(c.charAt(a << 2 & 63))) : e == d + 1 && (a = a.get(e++), b.add(c.charAt(a >> 2)), b.add(c.charAt(a << 4 & 63)));
  5622. a = b.b;
  5623. this.buf.b += "s";
  5624. this.buf.b = null == a.length ? this.buf.b + "null" : this.buf.b + ("" + a.length);
  5625. this.buf.b += ":";
  5626. this.buf.b = null == a ? this.buf.b + "null" : this.buf.b + ("" + a);
  5627. break;
  5628. default:
  5629. this.useCache && this.cache.pop(), null != a.hxSerialize ? (this.buf.b += "C", this.serializeString(H.getClassName(b)), this.useCache && this.cache.push(a), a.hxSerialize(this), this.buf.b += "g") : (this.buf.b += "c", this.serializeString(H.getClassName(b)),
  5630. this.useCache && this.cache.push(a), this.serializeFields(a))
  5631. }
  5632. break;
  5633. case 4:
  5634. if (this.useCache && this.serializeRef(a)) break;
  5635. this.buf.b += "o";
  5636. this.serializeFields(a);
  5637. break;
  5638. case 7:
  5639. b = b[2];
  5640. if (this.useCache) {
  5641. if (this.serializeRef(a)) break;
  5642. this.cache.pop()
  5643. }
  5644. this.buf.b = this.useEnumIndex ? this.buf.b + "j" : this.buf.b + "w";
  5645. this.serializeString(H.getEnumName(b));
  5646. this.useEnumIndex ? (this.buf.b += ":", this.buf.b += x.string(a[1])) : this.serializeString(a[0]);
  5647. this.buf.b += ":";
  5648. b = a.length;
  5649. this.buf.b += x.string(b - 2);
  5650. for (c = 2; c < b;) e = c++,
  5651. this.serialize(a[e]);
  5652. this.useCache && this.cache.push(a);
  5653. break;
  5654. case 5:
  5655. throw "Cannot serialize function";
  5656. default:
  5657. throw "Cannot serialize " + x.string(a);
  5658. }
  5659. },
  5660. __class__: pa
  5661. };
  5662. var V = function (a) {
  5663. this.buf = a;
  5664. this.length = a.length;
  5665. this.pos = 0;
  5666. this.scache = [];
  5667. this.cache = [];
  5668. a = V.DEFAULT_RESOLVER;
  5669. null == a && (a = H, V.DEFAULT_RESOLVER = a);
  5670. this.setResolver(a)
  5671. };
  5672. f["haxe.Unserializer"] = V;
  5673. V.__name__ = ["haxe", "Unserializer"];
  5674. V.initCodes = function () {
  5675. for (var a = [], b = 0, c = V.BASE64.length; b < c;) {
  5676. var e = b++;
  5677. a[V.BASE64.charCodeAt(e)] = e
  5678. }
  5679. return a
  5680. };
  5681. V.run = function (a) {
  5682. return (new V(a)).unserialize()
  5683. };
  5684. V.prototype = {
  5685. setResolver: function (a) {
  5686. this.resolver = null == a ? {
  5687. resolveClass: function () {
  5688. return null
  5689. },
  5690. resolveEnum: function () {
  5691. return null
  5692. }
  5693. } : a
  5694. },
  5695. get: function (a) {
  5696. return this.buf.charCodeAt(a)
  5697. },
  5698. readDigits: function () {
  5699. for (var a = 0, b = !1, c = this.pos;;) {
  5700. var e = this.buf.charCodeAt(this.pos);
  5701. if (e != e) break;
  5702. if (45 == e) {
  5703. if (this.pos != c) break;
  5704. b = !0
  5705. } else {
  5706. if (48 > e || 57 < e) break;
  5707. a = 10 * a + (e - 48)
  5708. }
  5709. this.pos++
  5710. }
  5711. b && (a *= -1);
  5712. return a
  5713. },
  5714. unserializeObject: function (a) {
  5715. for (;;) {
  5716. if (this.pos >= this.length) throw "Invalid object";
  5717. if (103 == this.buf.charCodeAt(this.pos)) break;
  5718. var b = this.unserialize();
  5719. if ("string" != typeof b) throw "Invalid object key";
  5720. var c = this.unserialize();
  5721. a[b] = c
  5722. }
  5723. this.pos++
  5724. },
  5725. unserializeEnum: function (a, b) {
  5726. if (58 != this.get(this.pos++)) throw "Invalid enum format";
  5727. var c = this.readDigits();
  5728. if (0 == c) return H.createEnum(a, b);
  5729. for (var e = []; 0 < c--;) e.push(this.unserialize());
  5730. return H.createEnum(a, b, e)
  5731. },
  5732. unserialize: function () {
  5733. switch (this.get(this.pos++)) {
  5734. case 110:
  5735. return null;
  5736. case 116:
  5737. return !0;
  5738. case 102:
  5739. return !1;
  5740. case 122:
  5741. return 0;
  5742. case 105:
  5743. return this.readDigits();
  5744. case 100:
  5745. for (var a = this.pos;;) {
  5746. var b = this.buf.charCodeAt(this.pos);
  5747. if (43 <= b && 58 > b || 101 == b || 69 == b) this.pos++;
  5748. else break
  5749. }
  5750. return x.parseFloat(p.substr(this.buf, a, this.pos - a));
  5751. case 121:
  5752. a = this.readDigits();
  5753. if (58 != this.get(this.pos++) || this.length - this.pos < a) throw "Invalid string length";
  5754. b = p.substr(this.buf, this.pos, a);
  5755. this.pos += a;
  5756. b = decodeURIComponent(b.split("+").join(" "));
  5757. this.scache.push(b);
  5758. return b;
  5759. case 107:
  5760. return Math.NaN;
  5761. case 109:
  5762. return Math.NEGATIVE_INFINITY;
  5763. case 112:
  5764. return Math.POSITIVE_INFINITY;
  5765. case 97:
  5766. a = [];
  5767. for (this.cache.push(a);;) {
  5768. b = this.buf.charCodeAt(this.pos);
  5769. if (104 == b) {
  5770. this.pos++;
  5771. break
  5772. }
  5773. 117 == b ? (this.pos++, b = this.readDigits(), a[a.length + b - 1] = null) : a.push(this.unserialize())
  5774. }
  5775. return a;
  5776. case 111:
  5777. return a = {}, this.cache.push(a), this.unserializeObject(a), a;
  5778. case 114:
  5779. a = this.readDigits();
  5780. if (0 > a || a >= this.cache.length) throw "Invalid reference";
  5781. return this.cache[a];
  5782. case 82:
  5783. a = this.readDigits();
  5784. if (0 > a || a >= this.scache.length) throw "Invalid string reference";
  5785. return this.scache[a];
  5786. case 120:
  5787. throw this.unserialize();
  5788. case 99:
  5789. a = this.unserialize();
  5790. b = this.resolver.resolveClass(a);
  5791. if (null == b) throw "Class not found " + a;
  5792. a = H.createEmptyInstance(b);
  5793. this.cache.push(a);
  5794. this.unserializeObject(a);
  5795. return a;
  5796. case 119:
  5797. a = this.unserialize();
  5798. b = this.resolver.resolveEnum(a);
  5799. if (null == b) throw "Enum not found " + a;
  5800. a = this.unserializeEnum(b, this.unserialize());
  5801. this.cache.push(a);
  5802. return a;
  5803. case 106:
  5804. a = this.unserialize();
  5805. b = this.resolver.resolveEnum(a);
  5806. if (null == b) throw "Enum not found " + a;
  5807. this.pos++;
  5808. var c = this.readDigits(),
  5809. e = H.getEnumConstructs(b)[c];
  5810. if (null == e) throw "Unknown enum index " + a + "@" + c;
  5811. a = this.unserializeEnum(b, e);
  5812. this.cache.push(a);
  5813. return a;
  5814. case 108:
  5815. a = new fb;
  5816. for (this.cache.push(a); 104 != this.buf.charCodeAt(this.pos);) a.add(this.unserialize());
  5817. this.pos++;
  5818. return a;
  5819. case 98:
  5820. a = new O;
  5821. for (this.cache.push(a); 104 != this.buf.charCodeAt(this.pos);) b = this.unserialize(), a.set(b, this.unserialize());
  5822. this.pos++;
  5823. return a;
  5824. case 113:
  5825. a = new ba;
  5826. this.cache.push(a);
  5827. for (b = this.get(this.pos++); 58 == b;) b = this.readDigits(), a.set(b, this.unserialize()), b = this.get(this.pos++);
  5828. if (104 != b) throw "Invalid IntMap format";
  5829. return a;
  5830. case 77:
  5831. a = new Fa;
  5832. for (this.cache.push(a); 104 != this.buf.charCodeAt(this.pos);) b = this.unserialize(), a.set(b, this.unserialize());
  5833. this.pos++;
  5834. return a;
  5835. case 118:
  5836. return a = p.substr(this.buf, this.pos, 19), a = p.strDate(a), this.cache.push(a), this.pos += 19, a;
  5837. case 115:
  5838. a = this.readDigits();
  5839. e = this.buf;
  5840. if (58 != this.get(this.pos++) || this.length - this.pos < a) throw "Invalid bytes length";
  5841. var d = V.CODES;
  5842. null == d && (d = V.initCodes(), V.CODES = d);
  5843. for (var h = this.pos, f = a & 3, j = h + (a - f), b = Qa.alloc(3 *
  5844. (a >> 2) + (2 <= f ? f - 1 : 0)), c = 0; h < j;) {
  5845. var i = d[I.fastCodeAt(e, h++)],
  5846. k = d[I.fastCodeAt(e, h++)];
  5847. b.set(c++, i << 2 | k >> 4);
  5848. i = d[I.fastCodeAt(e, h++)];
  5849. b.set(c++, k << 4 | i >> 2);
  5850. k = d[I.fastCodeAt(e, h++)];
  5851. b.set(c++, i << 6 | k)
  5852. }
  5853. 2 <= f && (k = d[I.fastCodeAt(e, h++)], j = d[I.fastCodeAt(e, h++)], b.set(c++, k << 2 | j >> 4), 3 == f && (e = d[I.fastCodeAt(e, h++)], b.set(c++, j << 4 | e >> 2)));
  5854. this.pos += a;
  5855. this.cache.push(b);
  5856. return b;
  5857. case 67:
  5858. a = this.unserialize();
  5859. b = this.resolver.resolveClass(a);
  5860. if (null == b) throw "Class not found " + a;
  5861. a = H.createEmptyInstance(b);
  5862. this.cache.push(a);
  5863. a.hxUnserialize(this);
  5864. if (103 != this.get(this.pos++)) throw "Invalid custom data";
  5865. return a
  5866. }
  5867. this.pos--;
  5868. throw "Invalid char " + this.buf.charAt(this.pos) + " at position " + this.pos;
  5869. },
  5870. __class__: V
  5871. };
  5872. var ba = function () {
  5873. this.h = {}
  5874. };
  5875. f["haxe.ds.IntMap"] = ba;
  5876. ba.__name__ = ["haxe", "ds", "IntMap"];
  5877. ba.__interfaces__ = [Qb];
  5878. ba.prototype = {
  5879. set: function (a, b) {
  5880. this.h[a] = b
  5881. },
  5882. get: function (a) {
  5883. return this.h[a]
  5884. },
  5885. exists: function (a) {
  5886. return this.h.hasOwnProperty(a)
  5887. },
  5888. remove: function (a) {
  5889. if (!this.h.hasOwnProperty(a)) return !1;
  5890. delete this.h[a];
  5891. return !0
  5892. },
  5893. keys: function () {
  5894. var a = [],
  5895. b;
  5896. for (b in this.h) this.h.hasOwnProperty(b) && a.push(b | 0);
  5897. return p.iter(a)
  5898. },
  5899. __class__: ba
  5900. };
  5901. var Fa = function () {
  5902. this.h = {};
  5903. this.h.__keys__ = {}
  5904. };
  5905. f["haxe.ds.ObjectMap"] = Fa;
  5906. Fa.__name__ = ["haxe", "ds", "ObjectMap"];
  5907. Fa.__interfaces__ = [Qb];
  5908. Fa.prototype = {
  5909. set: function (a, b) {
  5910. var c = a.__id__ || (a.__id__ = ++Fa.count);
  5911. this.h[c] = b;
  5912. this.h.__keys__[c] = a
  5913. },
  5914. keys: function () {
  5915. var a = [],
  5916. b;
  5917. for (b in this.h.__keys__) this.h.hasOwnProperty(b) && a.push(this.h.__keys__[b]);
  5918. return p.iter(a)
  5919. },
  5920. __class__: Fa
  5921. };
  5922. var O = function () {
  5923. this.h = {}
  5924. };
  5925. f["haxe.ds.StringMap"] = O;
  5926. O.__name__ = ["haxe", "ds", "StringMap"];
  5927. O.__interfaces__ = [Qb];
  5928. O.prototype = {
  5929. set: function (a, b) {
  5930. this.h["$" + a] = b
  5931. },
  5932. get: function (a) {
  5933. return this.h["$" + a]
  5934. },
  5935. exists: function (a) {
  5936. return this.h.hasOwnProperty("$" + a)
  5937. },
  5938. keys: function () {
  5939. var a = [],
  5940. b;
  5941. for (b in this.h) this.h.hasOwnProperty(b) && a.push(b.substr(1));
  5942. return p.iter(a)
  5943. },
  5944. iterator: function () {
  5945. return {
  5946. ref: this.h,
  5947. it: this.keys(),
  5948. hasNext: function () {
  5949. return this.it.hasNext()
  5950. },
  5951. next: function () {
  5952. return this.ref["$" + this.it.next()]
  5953. }
  5954. }
  5955. },
  5956. __class__: O
  5957. };
  5958. var Qa = function (a, b) {
  5959. this.length = a;
  5960. this.b = b
  5961. };
  5962. f["haxe.io.Bytes"] = Qa;
  5963. Qa.__name__ = ["haxe", "io", "Bytes"];
  5964. Qa.alloc = function (a) {
  5965. for (var b = [], c = 0; c < a;) c++, b.push(0);
  5966. return new Qa(a, b)
  5967. };
  5968. Qa.prototype = {
  5969. get: function (a) {
  5970. return this.b[a]
  5971. },
  5972. set: function (a, b) {
  5973. this.b[a] = b & 255
  5974. },
  5975. __class__: Qa
  5976. };
  5977. var zc = function () {};
  5978. f["haxe.io.Eof"] = zc;
  5979. zc.__name__ = ["haxe", "io", "Eof"];
  5980. zc.prototype = {
  5981. toString: function () {
  5982. return "Eof"
  5983. },
  5984. __class__: zc
  5985. };
  5986. var vc = function () {};
  5987. f["haxe.rtti.Meta"] = vc;
  5988. vc.__name__ = ["haxe", "rtti", "Meta"];
  5989. vc.getType = function (a) {
  5990. a =
  5991. a.__meta__;
  5992. return null == a || null == a.obj ? {} : a.obj
  5993. };
  5994. var ra = function () {};
  5995. f["haxe.xml.Parser"] = ra;
  5996. ra.__name__ = ["haxe", "xml", "Parser"];
  5997. ra.parse = function (a) {
  5998. var b = o.createDocument();
  5999. ra.doParse(a, 0, b);
  6000. return b
  6001. };
  6002. ra.doParse = function (a, b, c) {
  6003. null == b && (b = 0);
  6004. for (var e = null, d = 1, h = 1, f = null, j = 0, i = 0, k = 0, m = a.charCodeAt(b), l = new Ga; m == m;) {
  6005. switch (d) {
  6006. case 0:
  6007. switch (m) {
  6008. case 10:
  6009. case 13:
  6010. case 9:
  6011. case 32:
  6012. break;
  6013. default:
  6014. d = h;
  6015. continue
  6016. }
  6017. break;
  6018. case 1:
  6019. switch (m) {
  6020. case 60:
  6021. d = 0;
  6022. h = 2;
  6023. break;
  6024. default:
  6025. j = b;
  6026. d = 13;
  6027. continue
  6028. }
  6029. break;
  6030. case 13:
  6031. 60 == m ? (h = o.createPCData(l.b +
  6032. p.substr(a, j, b - j)), l = new Ga, c.addChild(h), i++, d = 0, h = 2) : 38 == m && (l.addSub(a, j, b - j), d = 18, h = 13, j = b + 1);
  6033. break;
  6034. case 17:
  6035. 93 == m && 93 == a.charCodeAt(b + 1) && 62 == a.charCodeAt(b + 2) && (d = o.createCData(p.substr(a, j, b - j)), c.addChild(d), i++, b += 2, d = 1);
  6036. break;
  6037. case 2:
  6038. switch (m) {
  6039. case 33:
  6040. if (91 == a.charCodeAt(b + 1)) {
  6041. b += 2;
  6042. if ("CDATA[" != p.substr(a, b, 6).toUpperCase()) throw "Expected <![CDATA[";
  6043. b += 5;
  6044. d = 17
  6045. } else if (68 == a.charCodeAt(b + 1) || 100 == a.charCodeAt(b + 1)) {
  6046. if ("OCTYPE" != p.substr(a, b + 2, 6).toUpperCase()) throw "Expected <!DOCTYPE";
  6047. b += 8;
  6048. d = 16
  6049. } else {
  6050. if (45 != a.charCodeAt(b + 1) || 45 != a.charCodeAt(b + 2)) throw "Expected <\!--";
  6051. b += 2;
  6052. d = 15
  6053. }
  6054. j = b + 1;
  6055. break;
  6056. case 63:
  6057. d = 14;
  6058. j = b;
  6059. break;
  6060. case 47:
  6061. if (null == c) throw "Expected node name";
  6062. j = b + 1;
  6063. d = 0;
  6064. h = 10;
  6065. break;
  6066. default:
  6067. d = 3;
  6068. j = b;
  6069. continue
  6070. }
  6071. break;
  6072. case 3:
  6073. if (!(97 <= m && 122 >= m || 65 <= m && 90 >= m || 48 <= m && 57 >= m || 58 == m || 46 == m || 95 == m || 45 == m)) {
  6074. if (b == j) throw "Expected node name";
  6075. e = o.createElement(p.substr(a, j, b - j));
  6076. c.addChild(e);
  6077. d = 0;
  6078. h = 4;
  6079. continue
  6080. }
  6081. break;
  6082. case 4:
  6083. switch (m) {
  6084. case 47:
  6085. d = 11;
  6086. i++;
  6087. break;
  6088. case 62:
  6089. d = 9;
  6090. i++;
  6091. break;
  6092. default:
  6093. d = 5;
  6094. j = b;
  6095. continue
  6096. }
  6097. break;
  6098. case 5:
  6099. if (!(97 <= m && 122 >= m || 65 <= m && 90 >= m || 48 <= m && 57 >= m || 58 == m || 46 == m || 95 == m || 45 == m)) {
  6100. if (j == b) throw "Expected attribute name";
  6101. f = p.substr(a, j, b - j);
  6102. if (e.exists(f)) throw "Duplicate attribute";
  6103. d = 0;
  6104. h = 6;
  6105. continue
  6106. }
  6107. break;
  6108. case 6:
  6109. switch (m) {
  6110. case 61:
  6111. d = 0;
  6112. h = 7;
  6113. break;
  6114. default:
  6115. throw "Expected =";
  6116. }
  6117. break;
  6118. case 7:
  6119. switch (m) {
  6120. case 34:
  6121. case 39:
  6122. d = 8;
  6123. j = b;
  6124. break;
  6125. default:
  6126. throw 'Expected "';
  6127. }
  6128. break;
  6129. case 8:
  6130. m == a.charCodeAt(j) && (h = p.substr(a, j + 1, b - j - 1), e.set(f, h), d = 0, h = 4);
  6131. break;
  6132. case 9:
  6133. j = b = ra.doParse(a, b, e);
  6134. d = 1;
  6135. break;
  6136. case 11:
  6137. switch (m) {
  6138. case 62:
  6139. d =
  6140. 1;
  6141. break;
  6142. default:
  6143. throw "Expected >";
  6144. }
  6145. break;
  6146. case 12:
  6147. switch (m) {
  6148. case 62:
  6149. return 0 == i && c.addChild(o.createPCData("")), b;
  6150. default:
  6151. throw "Expected >";
  6152. }
  6153. case 10:
  6154. if (!(97 <= m && 122 >= m || 65 <= m && 90 >= m || 48 <= m && 57 >= m || 58 == m || 46 == m || 95 == m || 45 == m)) {
  6155. if (j == b) throw "Expected node name";
  6156. if (p.substr(a, j, b - j) != c.get_nodeName()) throw "Expected </" + c.get_nodeName() + ">";
  6157. d = 0;
  6158. h = 12;
  6159. continue
  6160. }
  6161. break;
  6162. case 15:
  6163. 45 == m && 45 == a.charCodeAt(b + 1) && 62 == a.charCodeAt(b + 2) && (c.addChild(o.createComment(p.substr(a, j, b - j))), b += 2, d = 1);
  6164. break;
  6165. case 16:
  6166. 91 == m ?
  6167. k++ : 93 == m ? k-- : 62 == m && 0 == k && (c.addChild(o.createDocType(p.substr(a, j, b - j))), d = 1);
  6168. break;
  6169. case 14:
  6170. 63 == m && 62 == a.charCodeAt(b + 1) && (b++, d = p.substr(a, j + 1, b - j - 2), c.addChild(o.createProcessingInstruction(d)), d = 1);
  6171. break;
  6172. case 18:
  6173. 59 == m && (j = p.substr(a, j, b - j), 35 == j.charCodeAt(0) ? (j = 120 == j.charCodeAt(1) ? x.parseInt("0" + p.substr(j, 1, j.length - 1)) : x.parseInt(p.substr(j, 1, j.length - 1)), l.add(String.fromCharCode(j))) : ra.escapes.exists(j) ? l.add(ra.escapes.get(j)) : l.b += x.string("&" + j + ";"), j = b + 1, d = h)
  6174. }
  6175. m = I.fastCodeAt(a, ++b)
  6176. }
  6177. 1 ==
  6178. d && (j = b, d = 13);
  6179. if (13 == d) return (b != j || 0 == i) && c.addChild(o.createPCData(l.b + p.substr(a, j, b - j))), b;
  6180. throw "Unexpected end";
  6181. };
  6182. var N = function () {};
  6183. f["js.Boot"] = N;
  6184. N.__name__ = ["js", "Boot"];
  6185. N.getClass = function (a) {
  6186. return a instanceof Array && null == a.__enum__ ? Array : a.__class__
  6187. };
  6188. N.__string_rec = function (a, b) {
  6189. if (null == a) return "null";
  6190. if (5 <= b.length) return "<...>";
  6191. var c = typeof a;
  6192. if ("function" == c && (a.__name__ || a.__ename__)) c = "object";
  6193. switch (c) {
  6194. case "object":
  6195. if (a instanceof Array) {
  6196. if (a.__enum__) {
  6197. if (2 == a.length) return a[0];
  6198. for (var c = a[0] + "(", b = b + "\t", e = 2, d = a.length; e < d;) var f = e++,
  6199. c = 2 != f ? c + ("," + N.__string_rec(a[f], b)) : c + N.__string_rec(a[f], b);
  6200. return c + ")"
  6201. }
  6202. c = a.length;
  6203. e = "[";
  6204. b += "\t";
  6205. for (d = 0; d < c;) f = d++, e += (0 < f ? "," : "") + N.__string_rec(a[f], b);
  6206. return e + "]"
  6207. }
  6208. try {
  6209. e = a.toString
  6210. } catch (i) {
  6211. return "???"
  6212. }
  6213. if (null != e && e != Object.toString && (c = a.toString(), "[object Object]" != c)) return c;
  6214. c = null;
  6215. e = "{\n";
  6216. b += "\t";
  6217. d = null != a.hasOwnProperty;
  6218. for (c in a)
  6219. if (!d || a.hasOwnProperty(c)) "prototype" == c || "__class__" == c || "__super__" == c || "__interfaces__" == c ||
  6220. "__properties__" == c || (2 != e.length && (e += ", \n"), e += b + c + " : " + N.__string_rec(a[c], b));
  6221. b = b.substring(1);
  6222. return e + ("\n" + b + "}");
  6223. case "function":
  6224. return "<function>";
  6225. case "string":
  6226. return a;
  6227. default:
  6228. return "" + a
  6229. }
  6230. };
  6231. N.__interfLoop = function (a, b) {
  6232. if (null == a) return !1;
  6233. if (a == b) return !0;
  6234. var c = a.__interfaces__;
  6235. if (null != c)
  6236. for (var e = 0, d = c.length; e < d;) {
  6237. var f = e++,
  6238. f = c[f];
  6239. if (f == b || N.__interfLoop(f, b)) return !0
  6240. }
  6241. return N.__interfLoop(a.__super__, b)
  6242. };
  6243. N.__instanceof = function (a, b) {
  6244. if (null == b) return !1;
  6245. switch (b) {
  6246. case Ec:
  6247. return (a | 0) ===
  6248. a;
  6249. case Bc:
  6250. return "number" == typeof a;
  6251. case Cc:
  6252. return "boolean" == typeof a;
  6253. case String:
  6254. return "string" == typeof a;
  6255. case Array:
  6256. return a instanceof Array && null == a.__enum__;
  6257. case Fc:
  6258. return !0;
  6259. default:
  6260. if (null != a) {
  6261. if ("function" == typeof b && (a instanceof b || N.__interfLoop(N.getClass(a), b))) return !0
  6262. } else return !1;
  6263. return b == Gc && null != a.__name__ || b == Hc && null != a.__ename__ ? !0 : a.__enum__ == b
  6264. }
  6265. };
  6266. N.__cast = function (a, b) {
  6267. if (N.__instanceof(a, b)) return a;
  6268. throw "Cannot cast " + x.string(a) + " to " + x.string(b);
  6269. };
  6270. var uc = function () {};
  6271. f["js.Browser"] =
  6272. uc;
  6273. uc.__name__ = ["js", "Browser"];
  6274. uc.getLocalStorage = function () {
  6275. try {
  6276. var a = window.localStorage;
  6277. a.getItem("");
  6278. return a
  6279. } catch (b) {
  6280. return null
  6281. }
  6282. };
  6283. var Nb = function (a, b) {
  6284. this.prevMarker1 = this.prevMarker2 = 0;
  6285. this.boosterBarCMax = 7E3;
  6286. this.gridLayer = a;
  6287. this.grid = b
  6288. };
  6289. f["objects.BoosterComp"] = Nb;
  6290. Nb.__name__ = ["objects", "BoosterComp"];
  6291. Nb.__super__ = E;
  6292. Nb.prototype = z(E.prototype, {
  6293. get_name: function () {
  6294. return "BoosterComp_9"
  6295. },
  6296. onAdded: function () {
  6297. var a = d.addImageSprite(this.owner, 92, d.height - 102, "booster_bar", 1, 1, !1);
  6298. this.boosterBarFillSprite =
  6299. d.addImageSprite(a, 0, 0, "booster_bar_fill", 1, 1, !1)._compMap.Sprite_0;
  6300. this.boosterBarC = 0;
  6301. this.boosterBarFillSpriteRect = new sb(0, 0, 0, this.boosterBarFillSprite.getNaturalHeight());
  6302. this.booster1Ent = d.addImageSprite(this.owner, 340, d.height - 60, "booster1_mrk");
  6303. d.addImageSprite(this.booster1Ent, this.booster1Ent._compMap.Sprite_0.anchorX._value, this.booster1Ent._compMap.Sprite_0.anchorY._value, "booster1_mrk2")._compMap.Sprite_0.set_visible(!1);
  6304. this.booster1Ent._compMap.Disposer_2.connect1(this.booster1Ent._compMap.Sprite_0.get_pointerDown(),
  6305. ea(this, this.onPointerDown));
  6306. this.marker1Ent = d.addImageSprite(this.owner, 0, 0, "booster1_mrk2");
  6307. this.marker1Sprite = this.marker1Ent._compMap.Sprite_0;
  6308. this.marker1Sprite.set_visible(!1);
  6309. this.booster2Ent = d.addImageSprite(this.owner, 500, d.height - 60, "booster2_mrk");
  6310. d.addImageSprite(this.booster2Ent, this.booster2Ent._compMap.Sprite_0.anchorX._value, this.booster2Ent._compMap.Sprite_0.anchorY._value, "booster2_mrk2")._compMap.Sprite_0.set_visible(!1);
  6311. this.booster2Ent._compMap.Disposer_2.connect1(this.booster2Ent._compMap.Sprite_0.get_pointerDown(),
  6312. ea(this, this.onPointerDown2));
  6313. this.marker2Ent = d.addImageSprite(this.owner, 0, 0, "booster2_mrk2");
  6314. this.marker2Sprite = this.marker2Ent._compMap.Sprite_0;
  6315. this.marker2Sprite.set_visible(!1);
  6316. this.offsetY = 80;
  6317. this.snapX = i.pieceWidth;
  6318. this.snapY = i.pieceHeight;
  6319. this.snapOffsetX = 40;
  6320. this.snapOffsetY = i.offsetY - 70;
  6321. this.updateBar(0)
  6322. },
  6323. onUpdate: function () {
  6324. if (this.dragging)
  6325. if (l._platform.getPointer().isDown()) C.gridIsActive = !1, 0 != (this.marker1Sprite._flags & 1) ? (this.marker1Sprite.setXY(d.localPointerX(), d.localPointerY() -
  6326. this.offsetY), this.snapMarker1()) : 0 != (this.marker2Sprite._flags & 1) && (this.marker2Sprite.setXY(d.localPointerX(), d.localPointerY() - this.offsetY), this.snapMarker2());
  6327. else if (this.dragging = !1, C.gridIsActive = !0, 0 != (this.marker1Sprite._flags & 1)) {
  6328. if (this.marker1Sprite.set_visible(!1), -1E3 != this.marker1)
  6329. for (var a = this.grid.getRow(this.marker1), b = 0, c = a.length; b < c;) {
  6330. var e = b++;
  6331. if (null != a[e] && 111 != a[e].type && 222 != a[e].type) {
  6332. a[e].activateBooster(this.marker1, "row", this.marker1Sprite.x._value, this.marker1Sprite.y._value);
  6333. this.markPieces(this.marker1, !1, "row");
  6334. this.boosterBarC = 0;
  6335. this.updateBar(0);
  6336. break
  6337. }
  6338. }
  6339. } else if (0 != (this.marker2Sprite._flags & 1) && (this.marker2Sprite.set_visible(!1), -1E3 != this.marker2)) {
  6340. a = this.grid.getColumn(this.marker2);
  6341. b = 0;
  6342. for (c = a.length; b < c;)
  6343. if (e = b++, null != a[e] && 111 != a[e].type && 222 != a[e].type) {
  6344. a[e].activateBooster(this.marker2, "column", this.marker2Sprite.x._value, this.marker2Sprite.y._value);
  6345. this.markPieces(this.marker2, !1, "column");
  6346. this.boosterBarC = 0;
  6347. this.updateBar(0);
  6348. break
  6349. }
  6350. }
  6351. },
  6352. updateBar: function (a) {
  6353. this.boosterBarC +=
  6354. a / 1 | 0;
  6355. this.boosterBarC > this.boosterBarCMax && (this.boosterBarC = this.boosterBarCMax);
  6356. this.boosterBarFillSpriteRect.width = this.boosterBarC / this.boosterBarCMax * this.boosterBarFillSprite.getNaturalWidth();
  6357. this.boosterBarFillSprite.scissor = this.boosterBarFillSpriteRect;
  6358. a = 100 * (this.boosterBarC / this.boosterBarCMax) | 0;
  6359. 60 < a ? (this.booster1Active = !0, this.booster1Ent._compMap.Sprite_0.setAlpha(1), this.booster1Ent.firstChild._compMap.Sprite_0.set_visible(!0)) : (this.booster1Active = !1, this.booster1Ent._compMap.Sprite_0.setAlpha(0.6),
  6360. this.booster1Ent.firstChild._compMap.Sprite_0.set_visible(!1));
  6361. 100 <= a ? (this.booster2Active = !0, this.booster2Ent._compMap.Sprite_0.setAlpha(1), this.booster2Ent.firstChild._compMap.Sprite_0.set_visible(!0)) : (this.booster2Active = !1, this.booster2Ent._compMap.Sprite_0.setAlpha(0.6), this.booster2Ent.firstChild._compMap.Sprite_0.set_visible(!1))
  6362. },
  6363. snapMarker1: function () {
  6364. 120 < this.marker1Sprite.y._value && 810 > this.marker1Sprite.y._value ? (this.marker1Sprite.y.set__(Math.round((this.marker1Sprite.y._value - this.snapOffsetY %
  6365. this.snapY) / this.snapY) * this.snapY + this.snapOffsetY % this.snapY), this.marker1 = Math.round(10 * (this.marker1Sprite.y._value / (i.initPlayingGridHeight * i.pieceWidth))) - 2 + (i.playingGridHeight - i.initPlayingGridHeight), this.prevMarker1 != this.marker1 && (this.markPieces(this.prevMarker1, !1, "row"), this.markPieces(this.marker1, !0, "row"))) : (this.markPieces(this.prevMarker1, !1, "row"), this.marker1 = -1E3);
  6366. this.prevMarker1 = this.marker1
  6367. },
  6368. snapMarker2: function () {
  6369. 32 < this.marker2Sprite.x._value && 630 > this.marker2Sprite.x._value &&
  6370. 120 < this.marker2Sprite.y._value && 810 > this.marker2Sprite.y._value ? (this.marker2Sprite.x.set__(Math.round((this.marker2Sprite.x._value - this.snapOffsetX % this.snapX) / this.snapX) * this.snapX + this.snapOffsetX % this.snapX), this.marker2 = Math.round(10 * (this.marker2Sprite.x._value / d.width)) - 1, this.prevMarker2 != this.marker2 && (this.markPieces(this.prevMarker2, !1, "column"), this.markPieces(this.marker2, !0, "column"))) : (this.markPieces(this.prevMarker2, !1, "column"), this.marker2 = -1E3);
  6371. this.prevMarker2 = this.marker2
  6372. },
  6373. markPieces: function (a, b, c) {
  6374. if (!(0 > a)) {
  6375. var e = [];
  6376. "row" == c ? e = i.ref.getRow(a) : "column" == c && (e = i.ref.getColumn(a));
  6377. a = 0;
  6378. for (c = e.length; a < c;) {
  6379. var d = a++;
  6380. null != e[d] && 111 != e[d].type && 222 != e[d].type && (b ? e[d].pieceEnt._compMap.Sprite_0.setAlpha(0.5) : b || e[d].pieceEnt._compMap.Sprite_0.setAlpha(1))
  6381. }
  6382. }
  6383. },
  6384. onPointerDown: function () {
  6385. this.booster1Active && (this.dragging = !0, C.gridIsActive = !1, this.marker1Sprite.set_visible(!0))
  6386. },
  6387. onPointerDown2: function () {
  6388. this.booster2Active && (this.dragging = !0, C.gridIsActive = !1, this.marker2Sprite.set_visible(!0))
  6389. },
  6390. __class__: Nb
  6391. });
  6392. var oc = function () {
  6393. this.root = (new D).add(new ka(!1));
  6394. d.addFillSprite(this.root, d.halfWidth, d.halfHeight, 0, d.width, d.height, 0.5);
  6395. d.addFillSprite(this.root, d.halfWidth, d.halfHeight, 0, d.width, 200, 0.4);
  6396. var a;
  6397. a = d.addLabel(this.root, d.halfWidth, d.halfHeight, d.settings.get(W.lang + ".gameend"), 1.2, 1)._compMap.Sprite_0;
  6398. a.setAlign(K.Center);
  6399. a.setWrapWidth(d.width - 40);
  6400. a.centerAnchor();
  6401. a.setAlign(K.Center);
  6402. d.addButton(this.root, d.halfWidth, d.height - 180, "home_btn", function () {
  6403. d.goToScene((new wa).root)
  6404. })
  6405. };
  6406. f["scenes.GameEndScene"] = oc;
  6407. oc.__name__ = ["scenes", "GameEndScene"];
  6408. oc.prototype = {
  6409. __class__: oc
  6410. };
  6411. var X = function () {
  6412. this.root = (new D).add(new ka);
  6413. this.gridLayer = (new D).add(new r).add(new ma);
  6414. X.sceneBg = d.addImageSprite(this.root, 0, 0, "game_scene_bg", 1, 1, !1);
  6415. this.root.addChild(this.gridLayer);
  6416. this.root.add(new Ob(this.gridLayer, X.cLevel));
  6417. d.addButton(this.root, 585, 60, "pause_btn", function () {
  6418. d.pushScene((new pc).root)
  6419. });
  6420. //SG_Hooks.start()
  6421. };
  6422. f["scenes.GameScene"] = X;
  6423. X.__name__ = ["scenes", "GameScene"];
  6424. X.prototype = {
  6425. __class__: X
  6426. };
  6427. var Ob = function (a, b) {
  6428. this.l27 = {
  6429. moves: 50,
  6430. petsToRescue: 3,
  6431. drop: [0, 0, 5, 0, 0],
  6432. grid: [
  6433. [-1, -1, -1, -1, 222, 222, 222, 222, 222],
  6434. [-1, -1, -1, 31, 32, 31, 30, 32, 111],
  6435. [-1, -1, -1, 34, 32, 31, 31, 33, 111],
  6436. [-1, -1, -1, 31, 30, 30, 33, 32, 111],
  6437. [-1, -1, -1, 32, 33, 33, 30, 31, 222],
  6438. [-1, -1, -1, 33, 31, 34, 34, 31, 222],
  6439. [-1, -1, -1, 34, 33, 34, 30, 34, 222],
  6440. [0, 0, -1, 33, 31, 30, 30, 34, 222],
  6441. [0, 0, -1, 34, 32, 30, 31, 31, 222],
  6442. [222, 222, 222, 33, 222, 222, 222, 222, 222]
  6443. ]
  6444. };
  6445. this.l26 = {
  6446. moves: 20,
  6447. petsToRescue: 1,
  6448. drop: [0, 1, 0, 0, 0],
  6449. grid: [
  6450. [-1, -1, -1, 222, 222, 222, -1, -1, -1],
  6451. [-1, -1, -1, 222,
  6452. 111, 222, -1, -1, -1
  6453. ],
  6454. [-1, -1, -1, 222, 32, 222, -1, -1, -1],
  6455. [-1, -1, -1, 222, 31, 222, -1, -1, -1],
  6456. [-1, -1, -1, 222, 34, 222, -1, -1, -1],
  6457. [-1, -1, -1, 222, 33, 222, -1, -1, -1],
  6458. [-1, -1, -1, 222, 32, 222, -1, -1, -1],
  6459. [-1, -1, -1, 222, 31, 222, -1, -1, -1],
  6460. [0, 0, -1, 32, 30, 34, -1, -1, -1],
  6461. [222, 222, 20, 31, 33, 31, 20, 222, 222]
  6462. ]
  6463. };
  6464. this.l25 = {
  6465. moves: 25,
  6466. petsToRescue: 5,
  6467. drop: [0, 0, 0, 0, 0],
  6468. grid: [
  6469. [222, 222, 222, 222, 222, 222, 222, 222, 222],
  6470. [0, 1, 4, 4, 3, 3, 3, 0, 0],
  6471. [0, 1, 1, 4, 0, 3, 2, 3, 0],
  6472. [2, 111, 4, 111, 0, 111, 2, 111, 2],
  6473. [0, 222, 3, 222, 4, 222, 1, 222, 2],
  6474. [2, 3, 2, 0, 111, 1, 2, 2, 3],
  6475. [1, 2, 31, 34, 222, 32, 31, 3,
  6476. 0
  6477. ],
  6478. [1, 1, 34, 33, 222, 31, 32, 0, 1],
  6479. [0, 0, 33, 32, 222, 30, 34, 0, 1],
  6480. [0, 20, 31, 31, 222, 33, 33, 20, 0]
  6481. ]
  6482. };
  6483. this.l24 = {
  6484. moves: 50,
  6485. petsToRescue: 3,
  6486. drop: [0, 0, 2, 0, 0],
  6487. grid: [
  6488. [3, -1, -1, 222, 222, 222, -1, -1, 0],
  6489. [4, -1, -1, 111, 111, 111, -1, -1, 4],
  6490. [4, -1, -1, 31, 32, 33, -1, -1, 4],
  6491. [2, -1, -1, 32, 30, 34, -1, -1, 3],
  6492. [2, -1, -1, 30, 31, 32, -1, -1, 3],
  6493. [0, -1, -1, 30, 32, 34, -1, -1, 1],
  6494. [0, -1, -1, 33, 30, 33, -1, -1, 1],
  6495. [222, -1, -1, 34, 32, 34, -1, -1, 222],
  6496. [222, 222, -1, 30, 31, 32, -1, 222, 222],
  6497. [222, 222, 222, 40, 40, 40, 222, 222, 222]
  6498. ]
  6499. };
  6500. this.l23 = {
  6501. moves: 90,
  6502. petsToRescue: 10,
  6503. drop: [3, 0, 3, 0, 3],
  6504. grid: [
  6505. [0, 0,
  6506. 0, 3, 111, 3, 1, 0, 0
  6507. ],
  6508. [1, 2, 2, 3, 4, 3, 1, 1, 0],
  6509. [1, 0, 0, 4, 2, 4, 4, 1, 0],
  6510. [31, 31, 32, 30, 31, 33, 33, 30, 30],
  6511. [30, 34, 32, 33, 30, 32, 32, 34, 34],
  6512. [33, 33, 32, 33, 30, 31, 33, 33, 30],
  6513. [34, 34, 33, 34, 33, 30, 34, 34, 31],
  6514. [31, 30, 31, 31, 30, 30, 32, 32, 31],
  6515. [30, 31, 34, 30, 31, 34, 34, 33, 30],
  6516. [34, 30, 32, 30, 34, 33, 33, 30, 33]
  6517. ]
  6518. };
  6519. this.l22 = {
  6520. moves: -1,
  6521. petsToRescue: 4,
  6522. grid: [
  6523. [0, 4, 1, 0, 4, 0, 1, 0, 111],
  6524. [4, 4, 4, 1, 1, 1, 1, 1, 222],
  6525. [1, 4, 0, 1, 4, 4, 0, 0, 0],
  6526. [0, 1, 222, 222, 40, 222, 222, 1, 222],
  6527. [4, 0, 1, 0, 20, 1, 0, 0, 111],
  6528. [4, 40, 4, 222, 222, 222, 4, 222, 222],
  6529. [4, 0, 0, 4, 0, 1, 1, 4, 0],
  6530. [1, 0, 222, 222, 40, 222, 222, 4, 222],
  6531. [1, 4, 0, 1, 20, 0, 0, 4, 111],
  6532. [0, 40, 0, 222, 222, 222, 0, 222, 222],
  6533. [0, 4, 0, 0, 1, 4, 4, 0, 5],
  6534. [1, 0, 222, 222, 40, 222, 222, 1, 222],
  6535. [1, 4, 1, 0, 4, 0, 0, 1, 111],
  6536. [0, 4, 0, 4, 0, 1, 1, 222, 222],
  6537. [1, 0, 4, 0, 4, 0, 1, 222, 222],
  6538. [1, 1, 0, 1, 4, 222, 222, 222, 222],
  6539. [1, 0, 1, 0, 4, 222, 222, 222, 222],
  6540. [0, 1, 0, 1, 0, 222, 222, 222, 222]
  6541. ]
  6542. };
  6543. this.l21 = {
  6544. moves: -1,
  6545. petsToRescue: 4,
  6546. grid: [
  6547. [-1, 111, -1, 111, -1, 111, -1, 111, -1],
  6548. [1, 0, 1, 0, 4, 4, 4, 1, 4],
  6549. [40, 4, 1, 1, 4, 0, 0, 4, 40],
  6550. [1, 0, 0, 4, 0, 1, 0, 1, 1],
  6551. [40, 1, 0, 222, 30, 222, 1, 4, 40],
  6552. [20, 4, 0, 31, 30, 31, 4, 0, 20],
  6553. [40, 0, 222, 31, 30, 31, 222, 4, 40],
  6554. [6, 1, 4, 34, 34, 31, 0, 4, 9],
  6555. [40,
  6556. 0, 1, 222, 1, 222, 0, 1, 40
  6557. ],
  6558. [1, 1, 1, 4, 1, 0, 0, 4, 4],
  6559. [1, 1, 4, 4, 1, 0, 1, 222, 222],
  6560. [4, 4, 0, 1, 4, 0, 0, 1, 1],
  6561. [0, 4, 4, 0, 1, 1, 222, 222, 222],
  6562. [0, 0, 0, 1, 0, 4, 1, 4, 4],
  6563. [4, 1, 0, 0, 4, 222, 222, 222, 222],
  6564. [4, 0, 4, 4, 0, 1, 1, 3, 3],
  6565. [3, 3, 3, 3, 222, 222, 222, 222, 222],
  6566. [3, 3, 3, 3, 222, 222, 222, 222, 222]
  6567. ]
  6568. };
  6569. this.l20 = {
  6570. moves: -1,
  6571. petsToRescue: 5,
  6572. grid: [
  6573. [111, -1, 111, -1, 111, -1, 111, -1, 111],
  6574. [0, 4, 4, 0, 1, 0, 4, 4, 0],
  6575. [0, 4, 4, 0, 1, 0, 4, 4, 0],
  6576. [0, 0, 0, 0, 1, 0, 0, 0, 0],
  6577. [3, 3, 3, 3, 1, 2, 2, 2, 2],
  6578. [40, 40, 40, 40, 40, 40, 40, 40, 40],
  6579. [4, 2, 2, 2, 2, 2, 2, 2, 4],
  6580. [4, 4, 1, 0, 2, 0, 1, 4, 4],
  6581. [4, 4, 1, 0, 2, 0, 1, 4, 4],
  6582. [4, 1, 1, 0, 2, 0, 1, 1,
  6583. 4
  6584. ],
  6585. [2, 2, 2, 0, 2, 0, 2, 2, 2],
  6586. [40, 40, 40, 40, 40, 40, 40, 40, 40],
  6587. [0, 0, 0, 0, 0, 2, 1, 1, 1],
  6588. [1, 1, 1, 1, 1, 2, 1, 1, 1],
  6589. [2, 2, 2, 2, 2, 2, 2, 2, 2],
  6590. [1, 1, 1, 1, 2, 1, 1, 1, 1],
  6591. [0, 0, 0, 0, 0, 3, 3, 3, 3],
  6592. [1, 1, 1, 1, 1, 1, 1, 1, 1]
  6593. ]
  6594. };
  6595. this.l19 = {
  6596. moves: 35,
  6597. petsToRescue: 7,
  6598. drop: [0, 2, 0, 0, 0],
  6599. grid: [
  6600. [4, 0, 2, 2, 4, 2, 2, 2, 111],
  6601. [4, 4, 2, 4, 4, 0, 111, 1, 1],
  6602. [0, 0, 3, 3, 111, 0, 222, 3, 3],
  6603. [0, 4, 111, 4, 222, 1, 3, 111, 4],
  6604. [4, 4, 222, 3, 0, 111, 20, 222, 4],
  6605. [2, 2, 2, 111, 20, 222, 3, 4, 4],
  6606. [3, 2, 20, 222, 2, 3, 4, 1, 0],
  6607. [0, 2, 1, 1, 3, 0, 0, 1, 0],
  6608. [32, 33, 32, 30, 32, 32, 34, 30, 34],
  6609. [31, 31, 32, 30, 32, 34, 34, 30, 30]
  6610. ]
  6611. };
  6612. this.l18 = {
  6613. moves: -1,
  6614. petsToRescue: 11,
  6615. grid: [
  6616. [31, 32, 0, 0, 111, 4, 2, 33, 30],
  6617. [31, 32, 0, 2, 222, 2, 2, 33, 30],
  6618. [32, 111, 1, 1, 1, 4, 4, 4, 111],
  6619. [3, 222, 2, 2, 0, 1, 1, 222, 222],
  6620. [30, 31, 3, 2, 111, 2, 0, 0, 0],
  6621. [30, 31, 3, 3, 222, 2, 3, 2, 2],
  6622. [3, 111, 1, 4, 1, 2, 3, 2, 111],
  6623. [3, 222, 4, 4, 31, 31, 31, 222, 222],
  6624. [32, 31, 1, 4, 111, 2, 2, 2, 1],
  6625. [32, 31, 1, 1, 222, 3, 20, 1, 1],
  6626. [0, 0, 0, 0, 3, 3, 3, 4, 4],
  6627. [0, 0, 0, 0, 0, 3, 2, 4, 4],
  6628. [20, 2, 31, 32, 33, 2, 2, 111, 111],
  6629. [0, 0, 31, 32, 33, 2, 111, 222, 222],
  6630. [0, 0, 33, 33, 20, 111, 222, 222, 222],
  6631. [2, 2, 30, 34, 34, 222, 222, 222, 222],
  6632. [2, 2, 30, 30, 30, 222, 222, 222, 222],
  6633. [2, 1, 2, 2, 2, 222, 222, 222, 222]
  6634. ]
  6635. };
  6636. this.l17 = {
  6637. moves: 70,
  6638. petsToRescue: 14,
  6639. drop: [0, 3, 2, 0, 5],
  6640. grid: [
  6641. [3, 3, 4, 2, 4, 0, 0, 0, 3],
  6642. [4, 1, 1, 2, 2, 4, 3, 4, 0],
  6643. [4, 2, 1, 1, 3, 3, 4, 4, 3],
  6644. [111, 2, 4, 111, 111, 111, 0, 0, 111],
  6645. [40, 0, 0, 222, 222, 222, 4, 2, 40],
  6646. [40, 2, 1, 222, 5, 222, 4, 2, 40],
  6647. [40, 2, 1, 222, 222, 222, 3, 3, 40],
  6648. [31, 34, 32, 30, 32, 34, 32, 30, 33],
  6649. [31, 32, 32, 30, 32, 34, 32, 33, 33],
  6650. [34, 34, 31, 33, 34, 33, 30, 30, 30]
  6651. ]
  6652. };
  6653. this.l16 = {
  6654. moves: 40,
  6655. petsToRescue: 10,
  6656. drop: [0, 3, 2, 0, 0],
  6657. grid: [
  6658. [3, 3, 0, 2, 222, 0, 0, 2, 1],
  6659. [4, 111, 111, 1, 222, 0, 111, 111, 1],
  6660. [4, 222, 222, 2, 222, 1, 222, 222, 2],
  6661. [3, 1, 111, 111, 222, 2, 1, 111, 111],
  6662. [4, 1, 222, 222, 222, 3, 2, 222, 222],
  6663. [4, 1, 111, 4, 222, 0,
  6664. 2, 111, 1
  6665. ],
  6666. [3, 3, 2, 2, 222, 1, 1, 2, 2],
  6667. [32, 31, 33, 34, 222, 32, 31, 30, 30],
  6668. [31, 32, 34, 33, 222, 34, 32, 31, 31],
  6669. [31, 32, 33, 34, 222, 32, 34, 30, 30]
  6670. ]
  6671. };
  6672. this.l15 = {
  6673. moves: -1,
  6674. petsToRescue: 5,
  6675. grid: [
  6676. [111, -1, 111, -1, 111, -1, 111, -1, 111],
  6677. [4, 1, 1, 3, 4, 3, 4, 3, 20],
  6678. [3, 1, 4, 4, 3, 1, 3, 3, 3],
  6679. [3, 1, 1, 1, 1, 0, 4, 4, 3],
  6680. [3, 1, 4, 1, 3, 0, 1, 0, 3],
  6681. [34, 33, 30, 31, 34, 31, 31, 30, 34],
  6682. [31, 30, 33, 30, 33, 34, 34, 33, 33],
  6683. [0, 1, 0, 3, 4, 0, 4, 4, 0],
  6684. [0, 3, 1, 1, 1, 3, 3, 3, 4],
  6685. [3, 4, 4, 3, 3, 0, 3, 0, 1]
  6686. ]
  6687. };
  6688. this.l14 = {
  6689. moves: -1,
  6690. petsToRescue: 5,
  6691. grid: [
  6692. [111, 111, -1, -1, 111, -1, -1, 111, 111],
  6693. [31, 31, 0, 2, 2, 4, 4, 34, 32],
  6694. [30, 31,
  6695. 0, 1, 1, 1, 3, 34, 32
  6696. ],
  6697. [30, 31, 2, 2, 1, 3, 3, 33, 33],
  6698. [30, 30, 0, 2, 20, 2, 2, 30, 30],
  6699. [33, 34, 0, 0, 3, 3, 4, 32, 30],
  6700. [33, 34, 3, 2, 1, 1, 4, 31, 31],
  6701. [32, 31, 3, 2, 1, 1, 0, 33, 33],
  6702. [32, 31, 32, 31, 33, 33, 34, 31, 31],
  6703. [32, 31, 32, 31, 31, 30, 30, 34, 34],
  6704. [20, 1, 20, 0, 20, 2, 20, 3, 20],
  6705. [1, 1, 0, 0, 2, 2, 3, 3, 2],
  6706. [3, 3, 3, 1, 1, 1, 2, 2, 2]
  6707. ]
  6708. };
  6709. this.l13 = {
  6710. moves: 40,
  6711. petsToRescue: 7,
  6712. drop: [0, 3, 0, 0, 0],
  6713. grid: [
  6714. [4, 1, 4, 1, 4, 2, 4, 222, 222],
  6715. [4, 4, 2, 0, 4, 2, 4, 222, 30],
  6716. [0, 1, 2, 4, 2, 1, 0, 222, 111],
  6717. [0, 0, 2, 1, 0, 4, 4, 222, 30],
  6718. [3, 3, 1, 2, 0, 0, 1, 222, 111],
  6719. [1, 3, 3, 2, 2, 2, 3, 222, 31],
  6720. [1, 0, 0, 2, 1, 3, 3, 222, 111],
  6721. [222, 222, 222, 222,
  6722. 222, 222, 222, 222, 31
  6723. ],
  6724. [-1, 32, 111, 32, 111, 33, 111, 33, 111],
  6725. [32, 222, 222, 222, 222, 222, 222, 222, 222]
  6726. ]
  6727. };
  6728. this.l12 = {
  6729. moves: -1,
  6730. petsToRescue: 3,
  6731. grid: [
  6732. [0, 0, 4, 111, 111, 111, 4, 2, 4],
  6733. [222, 0, 1, 32, 31, 30, 2, 2, 222],
  6734. [222, 1, 1, 32, 31, 30, 3, 3, 222],
  6735. [222, 222, 3, 3, 4, 4, 3, 222, 222],
  6736. [222, 222, 20, 0, 1, 4, 20, 222, 222],
  6737. [222, 222, 222, 1, 1, 2, 222, 222, 222],
  6738. [222, 222, 222, 4, 4, 0, 222, 222, 222],
  6739. [222, 222, 1, 4, 0, 0, 1, 222, 222],
  6740. [222, 222, 1, 30, 32, 32, 1, 222, 222],
  6741. [222, 1, 3, 30, 31, 31, 1, 1, 222],
  6742. [222, 1, 3, 2, 4, 4, 3, 3, 222],
  6743. [2, 2, 2, 0, 4, 0, 3, 0, 0],
  6744. [1, 0, 0, 1, 0, 1, 3, 1, 0],
  6745. [0, 3, 3, 3, 1, 4, 4, 4,
  6746. 3
  6747. ],
  6748. [0, 0, 2, 1, 1, 4, 2, 3, 3],
  6749. [0, 2, 2, 2, 1, 2, 2, 2, 3]
  6750. ]
  6751. };
  6752. this.l11 = {
  6753. moves: 50,
  6754. petsToRescue: 8,
  6755. drop: [0, 2, 2, 0, 3],
  6756. grid: [
  6757. [-1, -1, -1, 111, -1, -1, -1, 111, -1],
  6758. [0, 1, 222, 222, 3, 2, 222, 222, 3],
  6759. [0, 1, 1, 1, 3, 2, 0, 0, 3],
  6760. [0, 0, 3, 3, 3, 20, 2, 2, 3],
  6761. [31, 32, 32, 33, 34, 30, 34, 31, 31],
  6762. [31, 31, 33, 31, 30, 34, 30, 33, 33],
  6763. [1, 2, 20, 1, 0, 0, 0, 1, 1],
  6764. [1, 2, 3, 3, 1, 2, 2, 2, 20],
  6765. [33, 33, 31, 30, 32, 32, 33, 32, 31],
  6766. [30, 33, 30, 30, 31, 31, 32, 33, 32]
  6767. ]
  6768. };
  6769. this.l10 = {
  6770. moves: -1,
  6771. petsToRescue: 5,
  6772. grid: [
  6773. [0, 0, 111, 111, 111, 111, 111, 1, 4],
  6774. [31, 30, 30, 34, 30, 34, 30, 31, 34],
  6775. [0, 4, 1, 4, 0, 4, 0, 4, 4],
  6776. [34, 31, 30, 34, 34, 34, 31,
  6777. 34, 34
  6778. ],
  6779. [0, 4, 1, 4, 4, 4, 1, 1, 4],
  6780. [0, 1, 1, 0, 4, 4, 1, 0, 1],
  6781. [30, 34, 30, 0, 1, 30, 30, 34, 222],
  6782. [30, 30, 31, 0, 0, 34, 30, 30, 222],
  6783. [31, 222, 34, 4, 1, 222, 31, 222, 222],
  6784. [0, 0, 4, 1, 4, 0, 1, 0, 222],
  6785. [0, 1, 4, 4, 0, 0, 0, 4, 222],
  6786. [4, 1, 0, 0, 4, 0, 4, 4, 222],
  6787. [4, 1, 0, 4, 0, 4, 4, 0, 222]
  6788. ]
  6789. };
  6790. this.l9 = {
  6791. moves: 45,
  6792. petsToRescue: 2,
  6793. drop: [0, 0, 5, 0, 0],
  6794. grid: [
  6795. [222, 222, -1, -1, -1, -1, -1, 222, 222],
  6796. [111, 222, -1, -1, -1, -1, -1, 222, 111],
  6797. [3, 222, -1, -1, -1, -1, -1, 222, 0],
  6798. [1, 222, -1, -1, -1, -1, -1, 222, 2],
  6799. [3, 222, -1, -1, -1, -1, -1, 222, 0],
  6800. [1, 222, -1, -1, -1, -1, -1, 222, 2],
  6801. [33, 222, -1, -1, -1, -1, -1, 222, 30],
  6802. [1, 222, 0,
  6803. 0, 0, 0, 0, 222, 2
  6804. ],
  6805. [33, 222, 222, 1, 1, 1, 222, 222, 30],
  6806. [1, 222, 222, 222, 1, 222, 222, 222, 2]
  6807. ]
  6808. };
  6809. this.l8 = {
  6810. moves: -1,
  6811. petsToRescue: 4,
  6812. grid: [
  6813. [111, -1, -1, 111, -1, 111, -1, -1, 111],
  6814. [1, 30, 2, 2, 2, 30, 1, 222, 222],
  6815. [0, 1, 30, 2, 30, 1, 0, 222, 222],
  6816. [1, 0, 1, 30, 1, 0, 1, 222, 222],
  6817. [1, 1, 0, 0, 0, 1, 1, 1, 0],
  6818. [2, 2, 2, 222, 222, 2, 1, 0, 0],
  6819. [3, 3, 3, 222, 222, 0, 2, 3, 2],
  6820. [3, 2, 3, 222, 222, 2, 2, 2, 3],
  6821. [2, 2, 2, 33, 2, 33, 2, 33, 2],
  6822. [3, 2, 33, 2, 33, 2, 33, 222, 222],
  6823. [0, 0, 0, 1, 0, 1, 0, 222, 222],
  6824. [1, 1, 4, 1, 1, 1, 1, 222, 222],
  6825. [1, 4, 1, 4, 4, 2, 0, 2, 4],
  6826. [0, 2, 2, 2, 0, 2, 4, 2, 0],
  6827. [1, 1, 2, 1, 4, 2, 0, 2, 4],
  6828. [0, 4, 1, 4, 0, 2, 4, 2, 0],
  6829. [1,
  6830. 1, 4, 1, 4, 2, 0, 2, 4
  6831. ]
  6832. ]
  6833. };
  6834. this.l7 = {
  6835. moves: -1,
  6836. petsToRescue: 3,
  6837. grid: [
  6838. [4, 0, 4, 3, 0, 3, -1, 0, 1],
  6839. [4, 0, 4, 0, 3, 0, -1, 0, 1],
  6840. [4, 0, 4, 1, 1, 1, -1, 0, 3],
  6841. [0, 3, 0, 1, 1, 1, 111, 0, 2],
  6842. [3, 0, 3, 0, 3, 0, 222, 222, 4],
  6843. [0, 3, 0, 3, 0, 3, 222, 222, 4],
  6844. [4, 4, 4, 2, 2, 111, 2, 2, 2],
  6845. [0, 4, 0, 2, 2, 222, 222, 4, 2],
  6846. [0, 4, 0, 1, 0, 222, 222, 4, 3],
  6847. [0, 4, 0, 1, 1, 1, 1, 1, 1],
  6848. [3, 3, 3, 2, 111, 2, 2, 2, 0],
  6849. [1, 1, 1, 2, 222, 222, 2, 4, 0],
  6850. [2, 1, 2, 2, 222, 222, 4, 4, 0],
  6851. [2, 1, 2, 2, 4, 4, 4, 0, 0],
  6852. [3, 4, 3, 1, 3, 2, 0, 1, 2],
  6853. [0, 4, 0, 1, 0, 2, 0, 2, 3],
  6854. [3, 4, 3, 1, 3, 2, 0, 1, 2]
  6855. ]
  6856. };
  6857. this.l6 = {
  6858. moves: -1,
  6859. petsToRescue: 3,
  6860. grid: [
  6861. [0, 2, 0, 2, 0, 2, 0, 2, 0],
  6862. [2, 1, 1, 1,
  6863. 2, 2, 0, 0, 2
  6864. ],
  6865. [2, 2, 2, 0, 0, 2, 0, 0, 2],
  6866. [1, 1, 1, 1, 1, 0, 2, 2, 2],
  6867. [0, 2, 2, 2, 0, 1, 0, 0, 0],
  6868. [0, 0, 2, 0, 0, 1, 1, 1, 0],
  6869. [222, 222, 222, 222, 222, 222, 222, 222, 222],
  6870. [-1, 111, -1, -1, 111, -1, -1, 111, -1],
  6871. [-1, 0, -1, -1, 0, -1, -1, 0, -1],
  6872. [2, 1, 2, 1, 2, 1, 2, 1, 2]
  6873. ]
  6874. };
  6875. this.l5 = {
  6876. moves: -1,
  6877. petsToRescue: 3,
  6878. grid: [
  6879. [-1, -1, -1, 2, 111, 0, -1, -1, -1],
  6880. [-1, -1, 0, 2, 222, 0, 1, -1, -1],
  6881. [-1, 0, 0, 2, 222, 0, 1, 3, -1],
  6882. [2, 1, 3, 1, 222, 2, 2, 2, -1],
  6883. [2, 1, 1, 1, -1, 1, 1, 0, 111],
  6884. [3, 222, 222, 222, 111, 0, 222, 222, 222],
  6885. [2, -1, -1, -1, 20, 0, -1, -1, 3],
  6886. [2, -1, -1, 3, 222, 1, -1, -1, 0],
  6887. [2, -1, 0, 1, 222, 1, 3, -1, 1],
  6888. [1, 1, 3, 0, 222, 1, 1, 2,
  6889. 2
  6890. ],
  6891. [0, 1, 2, 2, 0, 0, 0, 1, 0],
  6892. [1, 1, 3, 2, 0, 2, 1, 2, 1],
  6893. [1, 2, 2, 0, 1, 1, 1, 2, 2]
  6894. ]
  6895. };
  6896. this.l4 = {
  6897. moves: 50,
  6898. petsToRescue: 5,
  6899. drop: [0, 0, 2, 0, 3],
  6900. grid: [
  6901. [-1, -1, 111, -1, -1, -1, 111, -1, -1],
  6902. [2, 3, 0, 1, 2, 2, 2, 3, 2],
  6903. [1, 0, 3, 1, 2, 3, 2, 0, 2],
  6904. [1, 4, 3, 3, 2, 1, 2, 0, 2],
  6905. [0, 4, 4, 3, 1, 2, 2, 3, 2],
  6906. [2, 0, 2, 1, 1, 3, 4, 2, 3],
  6907. [2, 1, 3, 4, 2, 1, 3, 3, 2]
  6908. ]
  6909. };
  6910. this.l3 = {
  6911. moves: -1,
  6912. petsToRescue: 2,
  6913. grid: [
  6914. [-1, -1, 111, -1, -1, -1, 111, -1, -1],
  6915. [1, 1, 1, 0, 0, 2, 2, 2, 0],
  6916. [2, 1, 2, 0, 1, 1, 2, 0, 0],
  6917. [1, 2, 1, 1, 0, 0, 0, 2, 2],
  6918. [0, 2, 2, 0, 1, 2, 2, 1, 2],
  6919. [2, 2, 2, 1, 1, 1, 2, 1, 1],
  6920. [1, 0, 1, 2, 0, 0, 222, 2, 2],
  6921. [1, 2, 0, 2, 0, 222, 0, 0, 0],
  6922. [1, 0, 1, 0, 222,
  6923. 0, 2, 2, 2
  6924. ],
  6925. [2, 2, 2, 1, 2, 2, 1, 1, 0],
  6926. [0, 0, 2, 1, 2, 2, 0, 1, 0],
  6927. [1, 0, 2, 1, 1, 1, 0, 1, 0],
  6928. [1, 0, 0, 1, 0, 0, 0, 1, 0]
  6929. ]
  6930. };
  6931. this.l2 = {
  6932. moves: -1,
  6933. petsToRescue: 2,
  6934. grid: [
  6935. [-1, -1, -1, 111, -1, 111, -1, -1, -1],
  6936. [1, 1, 1, 1, 2, 2, 2, 2, 0],
  6937. [2, 2, 0, 0, 2, 0, 1, 1, 0],
  6938. [2, 0, 1, 2, 0, 1, 1, 0, 0],
  6939. [0, 2, 0, 0, 1, 1, 2, 0, 1],
  6940. [0, 1, 0, 1, 2, 1, 1, 2, 1],
  6941. [2, 2, 1, 0, 0, 2, 2, 1, 1],
  6942. [0, 1, 1, 2, 0, 1, 2, 2, 0],
  6943. [2, 2, 1, 0, 0, 2, 2, 1, 1]
  6944. ]
  6945. };
  6946. this.l1 = {
  6947. moves: -1,
  6948. petsToRescue: 3,
  6949. grid: [
  6950. [-1, -1, 111, -1, -1, -1, 111, -1, -1],
  6951. [-1, -1, 0, -1, 111, -1, 0, -1, -1],
  6952. [2, 2, 2, 2, 0, 1, 1, 1, 1],
  6953. [2, 2, 2, 2, 0, 1, 1, 1, 1],
  6954. [3, 3, 3, 3, 0, 3, 3, 3, 3],
  6955. [3, 3, 3, 3, 0, 3, 3, 3, 3],
  6956. [4, 4, 4, 4, 0, 4, 4, 4, 4],
  6957. [4, 4, 4, 4, 0, 4, 4, 4, 4]
  6958. ]
  6959. };
  6960. this.helpStep = 0;
  6961. this.isLevelEnd = !1;
  6962. this.cLevelScore = 0;
  6963. this.gridLayer = a;
  6964. this.cLevel = b;
  6965. this.cRescuedPets = 0;
  6966. this.levels = [this.l1, this.l2, this.l3, this.l4, this.l5, this.l6, this.l7, this.l8, this.l9, this.l10, this.l11, this.l12, this.l13, this.l14, this.l15, this.l16, this.l17, this.l18, this.l19, this.l20, this.l21, this.l22, this.l23, this.l24, this.l25, this.l26, this.l27]
  6967. };
  6968. f["scenes.GameSceneComp"] = Ob;
  6969. Ob.__name__ = ["scenes", "GameSceneComp"];
  6970. Ob.__super__ = E;
  6971. Ob.prototype = z(E.prototype, {
  6972. get_name: function () {
  6973. return "GameSceneComp_8"
  6974. },
  6975. onAdded: function () {
  6976. this.lvData = this.levels[this.cLevel];
  6977. this.grid = new i(this.gridLayer, 9, this.lvData.grid.length);
  6978. this.grid.genGridFromArray(this.lvData.grid);
  6979. this.movesLeft = this.lvData.moves;
  6980. this.updateHelp();
  6981. this.showHUD();
  6982. this.showLevelObjective()
  6983. },
  6984. updateHelp: function () {
  6985. 0 == X.cLevel && (0 == this.helpStep && (this.help1 = d.addFillSprite(this.owner, 0, 0, 0, 285, d.height, 0.6, !1), d.addFillSprite(this.help1, 355, 0, 0, 285, d.height, 1, !1), this.help1Label = d.addLabel(this.owner,
  6986. d.halfWidth, 325, d.settings.get(W.lang + ".help1"), 1, 1, !1)._compMap.Sprite_0, this.help1Label.disablePointer(), this.help1Label.setWrapWidth(d.width - 40), this.help1Label.centerAnchor(), this.help1Label.setAlign(K.Center)), 1 == this.helpStep && (this.help1.dispose(), this.help1Label.dispose()), this.helpStep++)
  6987. },
  6988. showLevelObjective: function () {
  6989. var a;
  6990. a = d.addFillSprite(this.owner, d.halfWidth, d.halfHeight, 0, d.width, 100, 0)._compMap.Sprite_0;
  6991. var b = d.settings.get(W.lang + ".save") + " " + x.string(this.lvData.petsToRescue) +
  6992. " " + d.settings.get(W.lang + ".pets"),
  6993. c;
  6994. c = d.addLabel(this.owner, d.halfWidth, d.halfHeight, b, 1.1, 0, !0)._compMap.Sprite_0;
  6995. a.alpha.animateTo(0.8, 0.4, q.quadIn);
  6996. c.alpha.animateTo(1, 0.4, q.quadIn);
  6997. L.tween(a, 0.4, {
  6998. alpha: 0
  6999. }, 2, null, q.quadIn);
  7000. L.tween(c, 0.4, {
  7001. alpha: 0
  7002. }, 2, function () {
  7003. a.owner.dispose();
  7004. c.owner.dispose()
  7005. }, q.quadIn)
  7006. },
  7007. showHUD: function () {
  7008. this.hudLayer = (new D).add(new r);
  7009. this.owner.addChild(this.hudLayer);
  7010. var a;
  7011. a = d.addImageSprite(X.sceneBg, 180, -10, "blade")._compMap.Sprite_0;
  7012. d.addDelay(this.owner, 0.05, function () {
  7013. var b =
  7014. a.rotation;
  7015. b.set__(b._value + 1)
  7016. }, !0);
  7017. d.addImageSprite(this.hudLayer, 0, 10, "hud_top_bg", 1, 1, !1);
  7018. d.addImageSprite(this.hudLayer, 0, 830, "hud_bottom_bg", 1, 1, !1);
  7019. d.addMovieSprite(this.grid.gridLayer, 40, d.height - this.grid.gridLayer._compMap.Sprite_0.y._value - 110, "bottom_wheels", null);
  7020. d.addMovieSprite(this.grid.gridLayer, 110, d.height - this.grid.gridLayer._compMap.Sprite_0.y._value - 110, "bottom_wheels", null);
  7021. d.addMovieSprite(this.grid.gridLayer, 180, d.height - this.grid.gridLayer._compMap.Sprite_0.y._value - 110, "bottom_wheels",
  7022. null);
  7023. d.addMovieSprite(this.grid.gridLayer, 250, d.height - this.grid.gridLayer._compMap.Sprite_0.y._value - 110, "bottom_wheels", null);
  7024. d.addMovieSprite(this.grid.gridLayer, 320, d.height - this.grid.gridLayer._compMap.Sprite_0.y._value - 110, "bottom_wheels", null);
  7025. d.addMovieSprite(this.grid.gridLayer, 390, d.height - this.grid.gridLayer._compMap.Sprite_0.y._value - 110, "bottom_wheels", null);
  7026. d.addMovieSprite(this.grid.gridLayer, 460, d.height - this.grid.gridLayer._compMap.Sprite_0.y._value - 110, "bottom_wheels", null);
  7027. d.addMovieSprite(this.grid.gridLayer,
  7028. 530, d.height - this.grid.gridLayer._compMap.Sprite_0.y._value - 110, "bottom_wheels", null);
  7029. d.addMovieSprite(this.grid.gridLayer, 600, d.height - this.grid.gridLayer._compMap.Sprite_0.y._value - 110, "bottom_wheels", null);
  7030. this.petsLabel = d.addLabel(this.hudLayer, 95, 47, "0/" + x.string(this.lvData.petsToRescue), 1, 1, !1, "score_font")._compMap.Sprite_0;
  7031. this.petsLabel.setAlign(K.Center);
  7032. this.scoreLabel = d.addLabel(this.hudLayer, 245, 47, "000000", 1, 1, !1, "score_font")._compMap.Sprite_0;
  7033. this.scoreLabel.setAlign(K.Center);
  7034. this.movesLabel =
  7035. d.addLabel(this.hudLayer, 397, 47, "" + x.string(this.lvData.moves), 1, 1, !1, "score_font")._compMap.Sprite_0;
  7036. this.movesLabel.setAlign(K.Center); - 1 == this.lvData.moves && this.movesLabel.set_text("---");
  7037. this.rowsLabel = d.addLabel(this.hudLayer, 35, d.height - 122, "" + this.grid.getGridRowsBelow(), 1, 1, !1, "score_font")._compMap.Sprite_0;
  7038. this.rowsLabel.setAlign(K.Center);
  7039. this.boosterComp = new Nb(this.gridLayer, this.grid);
  7040. this.hudLayer.add(this.boosterComp)
  7041. },
  7042. updateGame: function () {
  7043. if (!this.isLevelEnd) {
  7044. this.updateHelp();
  7045. this.petsLabel.set_text(this.cRescuedPets + "/" + x.string(this.lvData.petsToRescue));
  7046. this.rowsLabel.set_text(x.string(this.grid.getGridRowsBelow()));
  7047. if (-1 != this.lvData.moves) {
  7048. this.movesLeft--;
  7049. this.movesLabel.set_text("" + this.movesLeft);
  7050. if (0 >= this.movesLeft && this.cRescuedPets < this.lvData.petsToRescue) {
  7051. this.makeLevelEnd(!0);
  7052. return
  7053. }
  7054. this.dropPieces()
  7055. }
  7056. this.cRescuedPets >= this.lvData.petsToRescue ? this.makeLevelEnd(!1) : 0 == this.grid.getDeepMatches().length && !this.boosterComp.booster1Active && 0 == this.grid.getAllBonuses().length &&
  7057. this.makeLevelEnd(!0)
  7058. }
  7059. },
  7060. dropPieces: function () {
  7061. for (var a = this.grid.getEmptySpaceAbove(), b = [], c = 0, e = a.length; c < e;) c++, b.push(d.rand(5));
  7062. if (2 < b.length) {
  7063. c = 0;
  7064. for (e = this.getNMaxPieceOfTypeOnGrid(0); c < e;) c++, b[d.rand(b.length)] = 30 + d.rand(5);
  7065. c = 0;
  7066. for (e = this.getNMaxPieceOfTypeOnGrid(1); c < e;) c++, b[d.rand(b.length)] = 5 + d.rand(5);
  7067. c = 0;
  7068. for (e = this.getNMaxPieceOfTypeOnGrid(2); c < e;) c++, b[d.rand(b.length)] = 20;
  7069. c = 0;
  7070. for (e = this.getNMaxPieceOfTypeOnGrid(3); c < e;) c++, b[d.rand(b.length)] = 40
  7071. }
  7072. c = 0;
  7073. for (e = this.getNMaxPieceOfTypeOnGrid(4); c <
  7074. e;) c++, b[d.rand(b.length)] = 111;
  7075. c = 0;
  7076. for (e = a.length; c < e;) {
  7077. var g = c++;
  7078. this.grid.grid[a[g][0]][a[g][1]] = new C(a[g][1], a[g][0], b[g], !0)
  7079. }
  7080. },
  7081. getNMaxPieceOfTypeOnGrid: function (a) {
  7082. var b = 0;
  7083. 0 == a && (b = (this.lvData.drop[a] | 0) - this.grid.getNOfTypes([30, 31, 32, 33, 34]), 0 > b && (b = 0));
  7084. 1 == a && (b = (this.lvData.drop[a] | 0) - this.grid.getNOfTypes([5, 6, 7, 8, 9]), 0 > b && (b = 0));
  7085. 2 == a && (b = (this.lvData.drop[a] | 0) - this.grid.getNOfTypes([20]), 0 > b && (b = 0));
  7086. 3 == a && (b = (this.lvData.drop[a] | 0) - this.grid.getNOfTypes([40]), 0 > b && (b = 0));
  7087. 4 == a && (b = (this.lvData.drop[a] |
  7088. 0) - this.grid.getNOfTypes([111]), 0 > b && (b = 0));
  7089. return b
  7090. },
  7091. makeLevelEnd: function (a) {
  7092. null == a && (a = !1);
  7093. var b = this;
  7094. this.isLevelEnd = !0;
  7095. d.addFillSprite(this.owner, 0, 0, 0, d.width, d.height, 0, !1);
  7096. this.cLevel == this.levels.length - 1 && !a ? d.addDelay(this.owner, 1, function () {
  7097. d.pushScene((new oc).root)
  7098. }, !1) : (a ? (t.muteSoundtrack(), t.playSfx("game_over_sfx", 0.5), console.log('')/*SG_Hooks.gameOver(this.cLevel, this.cLevelScore)*/) : t.playSfx("level_end_sfx"), a || (fa.unlockedLevels < this.cLevel + 1 && (fa.unlockedLevels = this.cLevel + 1, fa.saveData()),
  7099. /*SG_Hooks.levelUp(this.cLevel + 1, this.cLevelScore)*/console.log('api turned off')), d.addDelay(this.owner, 1, function () {
  7100. d.pushScene((new qc(b.cLevelScore, a,b.cLevel + 1)).root)
  7101. }, !1));
  7102. if(!a) dp_submitScore(this.cLevelScore,this.cLevel + 1);
  7103. },
  7104. updateScore: function (a) {
  7105. this.cLevelScore += a;
  7106. for (var b = x.string(this.cLevelScore), c = b.length, e = ""; 6 > c;) e += "0", c++;
  7107. this.scoreLabel.set_text(e + b);
  7108. this.boosterComp.updateBar(a)
  7109. },
  7110. __class__: Ob
  7111. });
  7112. var qc = function (a, b,c) {
  7113. this.root = (new D).add(new ka(!1));
  7114. d.addFillSprite(this.root, d.halfWidth, d.halfHeight, 0, d.width, d.height, 0.5);
  7115. if (b) {
  7116. d.addImageSprite(this.root, d.halfWidth, d.halfHeight -
  7117. 200, "game_over_icon");
  7118. d.addFillSprite(this.root, d.halfWidth, d.halfHeight, 0, d.width, 150, 0.4);
  7119. var c;
  7120. c = d.addLabel(this.root, d.halfWidth, d.halfHeight, d.settings.get(W.lang + ".gameover"), 1.2, 1, !1)._compMap.Sprite_0;
  7121. c.setWrapWidth(d.width - 40);
  7122. c.centerAnchor();
  7123. c.setAlign(K.Center);
  7124. setTimeout(dp_share,2000);
  7125. } else d.addImageSprite(this.root, d.halfWidth, 200, "level_end_flag"), d.addLabel(this.root, d.halfWidth, d.halfHeight + 120, "" + a, 1.2, 1, !0, "score_font"),d.addLabel(this.root, d.halfWidth, d.halfHeight + 170, ""+c, 1.2, 1, !0, "score_font"), d.addImageSprite(this.root, d.halfWidth, d.halfHeight - 30, "score_icon"), d.addButton(this.root,
  7126. d.halfWidth + 150, d.halfHeight + 280, "play_small_btn", function () {
  7127. X.cLevel += 1;
  7128. d.goToScene((new X).root)
  7129. }, "");
  7130. c = 0;
  7131. b && (c = 75);
  7132. d.addButton(this.root, d.halfWidth - 150 + c, d.halfHeight + 280, "home_btn", function () {
  7133. t.unmuteSoundtrack();
  7134. d.goToScene((new wa).root)
  7135. });
  7136. d.addButton(this.root, d.halfWidth + c, d.halfHeight + 280, "replay_btn", function () {
  7137. t.unmuteSoundtrack();
  7138. d.goToScene((new X).root)
  7139. })
  7140. /* d.addButton(this.root, d.halfWidth + c, d.halfHeight + 380, "sharebtn", function () {
  7141. dp_share();
  7142. })*/
  7143. };
  7144. f["scenes.LevelEndScene"] = qc;
  7145. qc.__name__ = ["scenes", "LevelEndScene"];
  7146. qc.prototype = {
  7147. __class__: qc
  7148. };
  7149. var rc = function () {
  7150. this.root = (new D).add(new ka);
  7151. this.levelSelectLayer = d.addFillSprite(this.root, 0, 0, 0, d.width, 1920, 1, !1);
  7152. this.levelSelectLayer._compMap.Sprite_0.y.set__(-960);
  7153. this.levelSelectLayer.add(new Pb(!0));
  7154. var a;
  7155. a = d.addImageSprite(this.levelSelectLayer, 0, 960, "game_scene_bg", 1, 1, !1)._compMap.Sprite_0;
  7156. a.setRotation(180);
  7157. a.setScaleXY(-1, 1);
  7158. d.addImageSprite(this.levelSelectLayer, 0, 960, "game_scene_bg", 1, 1, !1);
  7159. var b;
  7160. b = d.addImageSprite(this.levelSelectLayer, 650, 1900, "blade")._compMap.Sprite_0;
  7161. var c;
  7162. c = d.addImageSprite(this.levelSelectLayer, -48,
  7163. 1550, "blade")._compMap.Sprite_0;
  7164. var e;
  7165. e = d.addImageSprite(this.levelSelectLayer, 653, 1322, "blade")._compMap.Sprite_0;
  7166. var g;
  7167. g = d.addImageSprite(this.levelSelectLayer, 708, 885, "blade")._compMap.Sprite_0;
  7168. var f;
  7169. f = d.addImageSprite(this.levelSelectLayer, -63, 724, "blade")._compMap.Sprite_0;
  7170. var i;
  7171. i = d.addImageSprite(this.levelSelectLayer, 696, 328, "blade")._compMap.Sprite_0;
  7172. var j;
  7173. j = d.addImageSprite(this.levelSelectLayer, 77, 88, "blade")._compMap.Sprite_0;
  7174. d.addDelay(this.root, 0.05, function () {
  7175. var a = b.rotation;
  7176. a.set__(a._value +
  7177. 1);
  7178. a = c.rotation;
  7179. a.set__(a._value + 1.2);
  7180. a = e.rotation;
  7181. a.set__(a._value + 1.1);
  7182. a = g.rotation;
  7183. a.set__(a._value + 0.9);
  7184. a = f.rotation;
  7185. a.set__(a._value + 1.1);
  7186. a = i.rotation;
  7187. a.set__(a._value + 1.2);
  7188. a = j.rotation;
  7189. a.set__(a._value + 1)
  7190. }, !0);
  7191. this.initLevelSelectButton(136, 1820, "1");
  7192. this.initLevelSelectButton(290, 1771, "2");
  7193. this.initLevelSelectButton(427, 1705, "3");
  7194. this.initLevelSelectButton(518, 1579, "4");
  7195. this.initLevelSelectButton(410, 1479, "5");
  7196. this.initLevelSelectButton(272, 1427, "6");
  7197. this.initLevelSelectButton(190, 1301, "7");
  7198. this.initLevelSelectButton(286, 1191, "8");
  7199. this.initLevelSelectButton(436, 1167, "9");
  7200. this.initLevelSelectButton(545, 1071, "10");
  7201. this.initLevelSelectButton(441, 982, "11");
  7202. this.initLevelSelectButton(299, 994, "12");
  7203. this.initLevelSelectButton(175, 970, "13");
  7204. this.initLevelSelectButton(151, 836, "14");
  7205. this.initLevelSelectButton(275, 771, "15");
  7206. this.initLevelSelectButton(410, 772, "16");
  7207. this.initLevelSelectButton(523, 727, "17");
  7208. this.initLevelSelectButton(560, 607, "18");
  7209. this.initLevelSelectButton(495, 502, "19");
  7210. this.initLevelSelectButton(366,
  7211. 521, "20");
  7212. this.initLevelSelectButton(248, 600, "21");
  7213. this.initLevelSelectButton(124, 565, "22");
  7214. this.initLevelSelectButton(162, 445, "23");
  7215. this.initLevelSelectButton(286, 367, "24");
  7216. this.initLevelSelectButton(410, 315, "25");
  7217. this.initLevelSelectButton(466, 195, "26");
  7218. this.initLevelSelectButton(360, 109, "27");
  7219. d.addButton(this.root, 80, 80, "home_btn", function () {
  7220. d.goToScene((new wa).root)
  7221. })
  7222. };
  7223. f["scenes.LevelSelectScene"] = rc;
  7224. rc.__name__ = ["scenes", "LevelSelectScene"];
  7225. rc.prototype = {
  7226. initLevelSelectButton: function (a, b, c) {
  7227. var e =
  7228. x.parseInt(c) - 1,
  7229. a = d.addButton(this.levelSelectLayer, a, b, "btn_level_select", function () {
  7230. X.cLevel = e;
  7231. d.goToScene((new X).root)
  7232. });
  7233. e <= fa.unlockedLevels ? d.addLabel(a, 58, 50, c, 1, 1, !0, "score_font") : (a._compMap.Sprite_0.disablePointer(), d.addImageSprite(a, 62, 48, "lock_icon"))
  7234. },
  7235. __class__: rc
  7236. };
  7237. var wa = function () {
  7238. this.root = (new D).add(new ka);
  7239. t.playSoundtrack("soundtrack1", 0.4);
  7240. var a;
  7241. a = d.addImageSprite(this.root, d.halfWidth, d.halfHeight, "game_scene_bg")._compMap.Sprite_0;
  7242. this.gameTitleSprite = d.addImageSprite(this.root,
  7243. d.halfWidth, d.halfHeight - 150, "game_title", 1, 1)._compMap.Sprite_0;
  7244. d.addDelay(this.root, 1.2, function () {
  7245. var b;
  7246. b = d.addImageSprite(a.owner, d.rand(d.width), -100, "bl" + d.rand(5))._compMap.Sprite_0;
  7247. b.rotation.animateBy(100, 1, q.circInOut);
  7248. L.tween(b, 1, {
  7249. y: d.height + 100
  7250. }, 0, function () {
  7251. null != b.owner && b.owner.dispose()
  7252. }, q.quadIn)
  7253. }, !0);
  7254. var b;
  7255. b = d.addImageSprite(a.owner, 520, 1020, "blade")._compMap.Sprite_0;
  7256. var c;
  7257. c = d.addImageSprite(a.owner, -70, 600, "blade")._compMap.Sprite_0;
  7258. var e;
  7259. e = d.addImageSprite(a.owner, 650, -50, "blade")._compMap.Sprite_0;
  7260. d.addDelay(this.root, 0.05, function () {
  7261. var a = b.rotation;
  7262. a.set__(a._value + 1);
  7263. a = c.rotation;
  7264. a.set__(a._value + 1.2);
  7265. a = e.rotation;
  7266. a.set__(a._value + 1.1)
  7267. }, !0);
  7268. var g;
  7269. g = d.addButton(this.root, d.halfWidth, d.height - 200, "play_btn2", function () {
  7270. d.goToScene((new rc).root)
  7271. }, "", 1, 0)._compMap.Sprite_0;
  7272. g.alpha.animateTo(1, 1, q.quadOut);
  7273. g.y.animateTo(d.height - 230, 1, q.bounceOut);
  7274. g = d.addMuteButton(this.root, d.halfWidth + 220, d.height - 140, "sound_on_btn", "sound_off_btn", t.isMuted, 1, 0)._compMap.Sprite_0;
  7275. g.alpha.animateTo(1, 1, q.quadOut);
  7276. g.y.animateTo(d.height - 190, 1, q.bounceOut);
  7277. g = d.addButton(this.root, d.halfWidth - 220, d.height - 140, "more_games_btn", function () {
  7278. clickMore();
  7279. }, "", 1, 0)._compMap.Sprite_0;
  7280. g.alpha.animateTo(1, 1, q.quadOut);
  7281. g.y.animateTo(d.height - 190, 1, q.bounceOut)
  7282. };
  7283. f["scenes.MainScene"] = wa;
  7284. wa.__name__ = ["scenes", "MainScene"];
  7285. wa.prototype = {
  7286. __class__: wa
  7287. };
  7288. var pc = function () {
  7289. this.root = (new D).add(new ka(!1));
  7290. d.addFillSprite(this.root, d.halfWidth, d.halfHeight, 0, d.width, d.height, 0.5);
  7291. d.addButton(this.root, d.halfWidth,
  7292. d.halfHeight + 5, "play_btn2", function () {
  7293. d.popScene(new Ea(0))
  7294. });
  7295. d.addButton(this.root, d.halfWidth - 150, d.halfHeight + 200, "home_btn", function () {
  7296. d.goToScene((new wa).root)
  7297. });
  7298. d.addButton(this.root, d.halfWidth, d.halfHeight + 200, "replay_btn", function () {
  7299. d.goToScene((new X).root)
  7300. });
  7301. d.addMuteButton(this.root, d.halfWidth + 150, d.halfHeight + 200, "sound_on_btn", "sound_off_btn", t.isMuted)
  7302. };
  7303. f["scenes.PauseScene"] = pc;
  7304. pc.__name__ = ["scenes", "PauseScene"];
  7305. pc.prototype = {
  7306. __class__: pc
  7307. };
  7308. var t = function () {};
  7309. f["yzi.Sfx"] = t;
  7310. t.__name__ = ["yzi", "Sfx"];
  7311. t.playSfx = function (a, b) {
  7312. null == b && (b = 1);
  7313. return t.isMuted ? null : d.assets.getSound(t.soundsFolder + "/" + a).play(b)
  7314. };
  7315. t.playSoundtrack = function (a, b) {
  7316. null == b && (b = 1);
  7317. var c = d.assets.getSound(t.soundsFolder + "/" + a);
  7318. null != t.cSoundtrackPlayback ? t.cSoundtrackPlayback.get_sound() != c && (t.cSoundtrackVolume = b, t.cSoundtrackPlayback = c.loop(b)) : (t.cSoundtrackVolume = b, t.cSoundtrackPlayback = c.loop(b));
  7319. return t.cSoundtrackPlayback
  7320. };
  7321. t.muteSoundtrack = function () {
  7322. null != t.cSoundtrackPlayback && (t.cSoundtrackPlayback.volume.animateTo(0,
  7323. 1), d.addDelay(null, 0.8, function () {
  7324. t.cSoundtrackPlayback.set_paused(!0)
  7325. }, !1))
  7326. };
  7327. t.unmuteSoundtrack = function () {
  7328. null != t.cSoundtrackPlayback && !t.isMuted && (t.cSoundtrackPlayback.set_paused(!1), t.cSoundtrackPlayback.volume.animateTo(t.cSoundtrackVolume, 1))
  7329. };
  7330. t.muteAll = function () {
  7331. t.isMuted ? (t.isMuted = !1, t.unmuteSoundtrack(), l.volume.animateTo(1, 0)) : (t.isMuted = !0, t.muteSoundtrack(), l.volume.animateTo(0, 1))
  7332. };
  7333. var L = function () {};
  7334. f["yzi.Tweener"] = L;
  7335. L.__name__ = ["yzi", "Tweener"];
  7336. L.tween = function (a, b, c, e, d, f) {
  7337. null ==
  7338. e && (e = 0);
  7339. q;
  7340. var i = new xa;
  7341. 0 > e && (e = 0);
  7342. if (0 == b && 0 == e) L.apply(a, c, d);
  7343. else {
  7344. if (0 == b && 0 < e) {
  7345. var j = new D;
  7346. 0 != e && i.add(new na(e));
  7347. i.add(new ga(function () {
  7348. L.apply(a, c, d);
  7349. j.dispose()
  7350. }));
  7351. b = new ma;
  7352. l.root.addChild(j.add(b))
  7353. } else {
  7354. 0 < e && i.add(new na(e));
  7355. for (var e = [], k = 0, n = F.fields(c); k < n.length;) {
  7356. var m = n[k];
  7357. ++k;
  7358. var o = F.getProperty(a, m);
  7359. e.push(new Gb(o, F.field(c, m), b, f))
  7360. }
  7361. f = new Hb(e);
  7362. i.add(f);
  7363. var p = new D;
  7364. i.add(new na(b));
  7365. i.add(new ga(function () {
  7366. null != d && d();
  7367. p.dispose()
  7368. }));
  7369. b = new ma;
  7370. l.root.addChild(p.add(b))
  7371. }
  7372. b.run(i)
  7373. }
  7374. };
  7375. L.apply = function (a, b, c) {
  7376. for (var e = 0, d = F.fields(b); e < d.length;) {
  7377. var f = d[e];
  7378. ++e;
  7379. var i = F.getProperty(a, f);
  7380. N.__cast(i, n).set__(F.field(b, f))
  7381. }
  7382. null != c && c()
  7383. };
  7384. var d = function (a, b) {
  7385. this.init = new oa;
  7386. var c = this;
  7387. d.width = a;
  7388. d.height = b;
  7389. d.halfWidth = a / 2 | 0;
  7390. d.halfHeight = b / 2 | 0;
  7391. d.director = (new D).add(new r).add((new Fb).setSize(d.width, d.height));
  7392. l.root.addChild(d.director);
  7393. this.systemBg = d.initFillSpriteComp(0, 0, d.systemBgColor, 0, 0, 1, !1);
  7394. l.root.add(this.systemBg);
  7395. this.leftBorder = d.addFillSprite(l.root, 0, 0, d.systemBgColor,
  7396. 0, 0, 1, !1)._compMap.Sprite_0;
  7397. this.rightBorder = d.addFillSprite(l.root, 0, 0, d.systemBgColor, 0, 0, 1, !1)._compMap.Sprite_0;
  7398. this.topBorder = d.addFillSprite(l.root, 0, 0, d.systemBgColor, 0, 0, 1, !1)._compMap.Sprite_0;
  7399. this.bottomBorder = d.addFillSprite(l.root, 0, 0, d.systemBgColor, 0, 0, 1, !1)._compMap.Sprite_0;
  7400. l.loadAssetPack(Y.fromAssets("boot")).get(function (a) {
  7401. d.assets = a;
  7402. a = d.addFillSprite(l.root, 0, 0, 1118481, l._platform.getStage().get_width(), l._platform.getStage().get_height(), 1, !1);
  7403. c.rotPhonePrompt = a._compMap.Sprite_0;
  7404. a = d.addImageSprite(c.rotPhonePrompt.owner, 0, 0, "rot_phone")._compMap.Sprite_0;
  7405. d.defaultOrientation == ja.Landscape && a.setRotation(90);
  7406. (d.defaultOrientation == l._platform.getStage().orientation._value || null == l._platform.getStage().orientation._value) && c.rotPhonePrompt.set_visible(!1);
  7407. l._platform.getStage().lockOrientation(d.defaultOrientation);
  7408. l._platform.getStage().requestFullscreen(!0);
  7409. l._platform.getStage().orientation.get_changed().connect(ea(c, c.onOrientationChange));
  7410. l._platform.getStage().resize.connect(ea(c,
  7411. c.onResize));
  7412. c.onResize();
  7413. c.initPreloaderScene()
  7414. })
  7415. };
  7416. f["yzi.YZI"] = d;
  7417. d.__name__ = ["yzi", "YZI"];
  7418. d.onResizeCallback = function () {};
  7419. d.onOrientationChangeCallback = function () {};
  7420. d.goToScene = function (a, b) {
  7421. null == b && (b = new Ea(0.5, q.quadOut));
  7422. d.director._compMap.Director_5.unwindToScene(a, b)
  7423. };
  7424. d.pushScene = function (a, b) {
  7425. null == b && (b = new Ea(0.5, q.quadOut));
  7426. d.director._compMap.Director_5.pushScene(a, b)
  7427. };
  7428. d.popScene = function (a) {
  7429. null == a && (a = new Ea(0.5, q.quadOut));
  7430. d.director._compMap.Director_5.popScene(a)
  7431. };
  7432. d.saveData = function (a,
  7433. b) {
  7434. return l._platform.getStorage().set(a, b)
  7435. };
  7436. d.loadData = function (a) {
  7437. return l._platform.getStorage().get(a)
  7438. };
  7439. d.initFlipbooks = function (a) {
  7440. for (var b = [], c = 0, e = a.length; c < e;) {
  7441. var g = c++;
  7442. b.push((new kc(a[g][0], d.assets.getTexture(a[g][0]).split(a[g][1], a[g][2]))).setDuration(a[g][3]).setAnchor(a[g][4], a[g][5]))
  7443. }
  7444. d.lib = bb.fromFlipbooks(b)
  7445. };
  7446. d.initFillSpriteComp = function (a, b, c, e, d, f, i) {
  7447. null == i && (i = !0);
  7448. null == f && (f = 1);
  7449. c = new qb(c, e, d);
  7450. c.setXY(a, b);
  7451. c.setAlpha(f);
  7452. i && c.centerAnchor();
  7453. return c
  7454. };
  7455. d.initImageSpriteComp =
  7456. function (a, b, c, e, g, f) {
  7457. null == f && (f = !0);
  7458. null == g && (g = 1);
  7459. null == e && (e = 1);
  7460. c = new Ua(d.assets.getTexture(c));
  7461. c.setXY(a, b);
  7462. c.setScale(e);
  7463. c.setAlpha(g);
  7464. f && c.centerAnchor();
  7465. return c
  7466. };
  7467. d.initTextSpriteComp = function (a, b, c, e, g, f, i) {
  7468. null == i && (i = "");
  7469. null == f && (f = !1);
  7470. null == g && (g = 1);
  7471. null == e && (e = 1);
  7472. null == c && (c = "Label");
  7473. "" == i && (i = d.defaultFont);
  7474. c = new ub(new Ma(d.assets, i), c);
  7475. c.disablePointer();
  7476. c.setXY(a, b);
  7477. c.setScale(e);
  7478. c.setAlpha(g);
  7479. f && c.centerAnchor();
  7480. return c
  7481. };
  7482. d.initMovieSpriteComp = function (a, b, c, e, f, h) {
  7483. null == h && (h = !0);
  7484. null == f && (f = 1);
  7485. null == e && (e = 1);
  7486. c = d.lib.createSprite(c, !0);
  7487. c.setXY(a, b);
  7488. c.setScale(e);
  7489. c.setAlpha(f);
  7490. h && c.centerAnchor();
  7491. return c
  7492. };
  7493. d.addFillSprite = function (a, b, c, e, f, h, i, j) {
  7494. null == j && (j = !0);
  7495. null == i && (i = 1);
  7496. var k = new D;
  7497. k.add(new sa);
  7498. k.add(d.initFillSpriteComp(b, c, e, f, h, i, j));
  7499. null != a && a.addChild(k);
  7500. return k
  7501. };
  7502. d.addImageSprite = function (a, b, c, e, f, h, i) {
  7503. null == i && (i = !0);
  7504. null == h && (h = 1);
  7505. null == f && (f = 1);
  7506. var j = new D;
  7507. j.add(new sa);
  7508. j.add(d.initImageSpriteComp(b, c, e, f, h, i));
  7509. null != a && a.addChild(j);
  7510. return j
  7511. };
  7512. d.addLabel =
  7513. function (a, b, c, e, f, h, i, j) {
  7514. null == j && (j = "");
  7515. null == i && (i = !1);
  7516. null == h && (h = 1);
  7517. null == f && (f = 1);
  7518. null == e && (e = "Label");
  7519. var k = new D;
  7520. k.add(new sa);
  7521. k.add(d.initTextSpriteComp(b, c, e, f, h, i, j));
  7522. null != a && a.addChild(k);
  7523. return k
  7524. };
  7525. d.addButton = function (a, b, c, e, f, h, i, j) {
  7526. null == j && (j = 1);
  7527. null == i && (i = 1);
  7528. null == h && (h = "");
  7529. var k = d.addImageSprite(a, b, c, e, i, j, !0);
  7530. k.add(new ma);
  7531. "" != h && (d.addImageSprite(k, 0, 0, h, 1, 1, !1), k.firstChild._compMap.Sprite_0.set_visible(!1));
  7532. var l = i + 0.15,
  7533. m = new xa;
  7534. m.add(new ga(function () {
  7535. k._compMap.Sprite_0.scaleX.animateTo(l,
  7536. 0.2, q.backOut);
  7537. k._compMap.Sprite_0.scaleY.animateTo(l, 0.2, q.backOut)
  7538. }));
  7539. m.add(new na(0.2));
  7540. m.add(new ga(function () {
  7541. k._compMap.Sprite_0.scaleX.animateTo(i, 0.1, q.quadIn);
  7542. k._compMap.Sprite_0.scaleY.animateTo(i, 0.1, q.quadIn)
  7543. }));
  7544. k._compMap.Disposer_2.connect1(k._compMap.Sprite_0.get_pointerDown(), function () {
  7545. k._compMap.Script_3.run(m)
  7546. });
  7547. k._compMap.Disposer_2.connect1(k._compMap.Sprite_0.get_pointerUp(), function () {
  7548. "" != h && (0 == (k.firstChild._compMap.Sprite_0._flags & 1) ? k.firstChild._compMap.Sprite_0.set_visible(!0) :
  7549. k.firstChild._compMap.Sprite_0.set_visible(!1));
  7550. "" != d.buttonClickSfx && t.playSfx(d.buttonClickSfx);
  7551. null != f && f()
  7552. });
  7553. return k
  7554. };
  7555. d.addMovieSprite = function (a, b, c, e, f, h, i, j) {
  7556. null == j && (j = !0);
  7557. null == i && (i = 1);
  7558. null == h && (h = 1);
  7559. var k = new D;
  7560. k.add(new sa);
  7561. k.add(d.initMovieSpriteComp(b, c, e, h, i, j));
  7562. null != f && k._compMap.Disposer_2.connect0(k._compMap.Sprite_0.get_looped(), f);
  7563. null != a && a.addChild(k);
  7564. return k
  7565. };
  7566. d.addMuteButton = function (a, b, c, e, f, h, i, j) {
  7567. null == j && (j = 1);
  7568. null == i && (i = 1);
  7569. a = d.addButton(a, b, c, e, function () {
  7570. t.muteAll()
  7571. },
  7572. f, i, j);
  7573. a.firstChild._compMap.Sprite_0.set_visible(h);
  7574. return a
  7575. };
  7576. d.addDelay = function (a, b, c, e, d) {
  7577. null == d && (d = -1);
  7578. null == e && (e = !1);
  7579. var f = new D,
  7580. i = new xa;
  7581. i.add(new na(b));
  7582. i.add(new ga(function () {
  7583. null != c && c();
  7584. e || f.dispose()
  7585. }));
  7586. b = new ma;
  7587. f.add(new sa);
  7588. f.add(b);
  7589. null != a && a.addChild(f);
  7590. e ? b.run(new Ib(i, d)) : b.run(i);
  7591. return f
  7592. };
  7593. d.openUrl = function (a) {
  7594. //l._platform.getWeb().openBrowser("http://" + a)
  7595. };
  7596. d.rand = function (a) {
  7597. return x.random(a)
  7598. };
  7599. d.localPointerX = function () {
  7600. return (l._platform.getPointer().get_x() - (l._platform.getStage().get_width() -
  7601. d.width * d.scale) / 2) / d.scale
  7602. };
  7603. d.localPointerY = function () {
  7604. return (l._platform.getPointer().get_y() - (l._platform.getStage().get_height() - d.height * d.scale) / 2) / d.scale
  7605. };
  7606. d.prototype = {
  7607. onResize: function () {
  7608. var a = l._platform.getStage().get_width(),
  7609. b = l._platform.getStage().get_height();
  7610. d.scale = Math.min(a / d.width, b / d.height);
  7611. d.director._compMap.Sprite_0.setXY(0.5 * a - 0.5 * d.scale * d.width, 0.5 * b - 0.5 * d.scale * d.height);
  7612. d.director._compMap.Sprite_0.setScale(d.scale);
  7613. var c = d.director._compMap.Sprite_0.x._value,
  7614. e = d.director._compMap.Sprite_0.y._value;
  7615. this.systemBg.setXY(0, 0);
  7616. this.systemBg.setSize(a, b);
  7617. this.leftBorder.setXY(0, e);
  7618. this.leftBorder.setSize(c, b - 2 * e);
  7619. this.rightBorder.setXY(a - c, e);
  7620. this.rightBorder.setSize(c, b - 2 * e);
  7621. this.topBorder.setXY(0, 0);
  7622. this.topBorder.setSize(a, e);
  7623. this.bottomBorder.setXY(0, b - e);
  7624. this.bottomBorder.setSize(a, e);
  7625. d.onResizeCallback();
  7626. this.rotPhonePrompt.setXY(0, 0);
  7627. this.rotPhonePrompt.setSize(l._platform.getStage().get_width(), l._platform.getStage().get_height());
  7628. this.rotPhonePrompt.owner.firstChild._compMap.Sprite_0.setXY(this.rotPhonePrompt.width._value /
  7629. 2, this.rotPhonePrompt.height._value / 2);
  7630. this.rotPhonePrompt.owner.firstChild._compMap.Sprite_0.setScale(d.scale)
  7631. },
  7632. onOrientationChange: function (a) {
  7633. d.onOrientationChangeCallback();
  7634. d.defaultOrientation != a ? this.rotPhonePrompt.set_visible(!0) : this.rotPhonePrompt.set_visible(!1)
  7635. },
  7636. initPreloaderScene: function () {
  7637. var a = this,
  7638. b = d.width - 150,
  7639. c = (new D).add(new ka),
  7640. e = d.addFillSprite(c, 0, 0, 1118481, d.width, d.height, 1, !1),
  7641. f = d.addFillSprite(e, d.halfWidth, d.halfHeight, 16777215, b, 50),
  7642. h = d.addFillSprite(f, 4, 4, 1118481, 0, 42,
  7643. 1, !1),
  7644. i = l.loadAssetPack(Y.fromAssets("main"));
  7645. i.get(function (b) {
  7646. d.assets = b;
  7647. d.settings = eb.parse(b.getFile("settings.ini").toString());
  7648. c.removeChild(f);
  7649. a.init.emit()
  7650. });
  7651. i.progressChanged.connect(function () {
  7652. var a = i._progress / i._total;
  7653. 1 < a && (a = 1);
  7654. h._compMap.Sprite_0.width.set__(a * (b - 8))
  7655. });
  7656. d.goToScene(c)
  7657. },
  7658. __class__: d
  7659. };
  7660. var Pb = function (a, b, c) {
  7661. null == c && (c = 0.15);
  7662. null == b && (b = !1);
  7663. null == a && (a = !1);
  7664. this.ox = this.oy = 0;
  7665. this.swipeStart = new la(0, 0);
  7666. this.lockX = a;
  7667. this.lockY = b;
  7668. this.scrollSmooth = c
  7669. };
  7670. f["yzi.components.ScrollComp"] =
  7671. Pb;
  7672. Pb.__name__ = ["yzi", "components", "ScrollComp"];
  7673. Pb.__super__ = E;
  7674. Pb.prototype = z(E.prototype, {
  7675. get_name: function () {
  7676. return "ScrollComp_7"
  7677. },
  7678. onAdded: function () {
  7679. this.owner._compMap.Disposer_2.connect1(this.owner._compMap.Sprite_0.get_pointerDown(), ea(this, this.onPointerDown));
  7680. this.owner._compMap.Disposer_2.connect1(this.owner._compMap.Sprite_0.get_pointerMove(), ea(this, this.onPointerMove));
  7681. this.ownerSprite = this.owner._compMap.Sprite_0;
  7682. this.endX = this.ownerSprite.x._value;
  7683. this.endY = this.ownerSprite.y._value
  7684. },
  7685. onUpdate: function (a) {
  7686. if (this.dragging)
  7687. if (l._platform.getPointer().isDown()) {
  7688. if (!this.lockX) {
  7689. var b = this.ownerSprite.x;
  7690. b.set__(b._value + (d.localPointerX() - this.ownerSprite.x._value - this.ox) / this.scrollSmooth * a);
  7691. this.endX = d.localPointerX()
  7692. }
  7693. this.lockY || (b = this.ownerSprite.y, b.set__(b._value + (d.localPointerY() - this.ownerSprite.y._value - this.oy) / this.scrollSmooth * a), this.endY = d.localPointerY())
  7694. } else null != this.swipeHckEnt && (this.swipeHckEnt.dispose(), this.swipeHckEnt = null), this.dragging = !1;
  7695. else this.lockX ||
  7696. (b = this.ownerSprite.x, b.set__(b._value + (this.endX - this.ownerSprite.x._value - this.ox) / this.scrollSmooth * a)), this.lockY || (b = this.ownerSprite.y, b.set__(b._value + (this.endY - this.ownerSprite.y._value - this.oy) / this.scrollSmooth * a));
  7697. this.lockX || (0 < this.ownerSprite.x._value - this.ownerSprite.anchorX._value && this.ownerSprite.x.set__(this.ownerSprite.anchorX._value), this.ownerSprite.x._value - this.ownerSprite.anchorX._value < d.width - this.ownerSprite.getNaturalWidth() && this.ownerSprite.x.set__(d.width - this.ownerSprite.getNaturalWidth() +
  7698. this.ownerSprite.anchorX._value));
  7699. this.lockY || (0 < this.ownerSprite.y._value - this.ownerSprite.anchorY._value && this.ownerSprite.y.set__(this.ownerSprite.anchorY._value), this.ownerSprite.y._value - this.ownerSprite.anchorY._value < d.height - this.ownerSprite.getNaturalHeight() && this.ownerSprite.y.set__(d.height - this.ownerSprite.getNaturalHeight() + this.ownerSprite.anchorY._value))
  7700. },
  7701. onPointerDown: function (a) {
  7702. this.dragging = !0;
  7703. this.ox = d.localPointerX() - this.ownerSprite.x._value;
  7704. this.oy = d.localPointerY() - this.ownerSprite.y._value;
  7705. this.swipeStart.set(a.viewX, a.viewY)
  7706. },
  7707. onPointerMove: function (a) {
  7708. this.dragging && null == this.swipeHckEnt && 50 < this.swipeStart.distanceTo(a.viewX, a.viewY) && (this.swipeHckEnt = d.addFillSprite(this.owner, 0, 0, 0, this.ownerSprite.getNaturalWidth(), this.ownerSprite.getNaturalHeight(), 0, !1))
  7709. },
  7710. __class__: Pb
  7711. });
  7712. var Dc = 0;
  7713. Math.NaN = Number.NaN;
  7714. Math.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
  7715. Math.POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
  7716. f.Math = Math;
  7717. Math.isFinite = function (a) {
  7718. return isFinite(a)
  7719. };
  7720. Math.isNaN = function (a) {
  7721. return isNaN(a)
  7722. };
  7723. String.prototype.__class__ = f.String = String;
  7724. String.__name__ = ["String"];
  7725. f.Array = Array;
  7726. Array.__name__ = ["Array"];
  7727. Date.prototype.__class__ = f.Date = Date;
  7728. Date.__name__ = ["Date"];
  7729. var Ec = f.Int = {
  7730. __name__: ["Int"]
  7731. },
  7732. Fc = f.Dynamic = {
  7733. __name__: ["Dynamic"]
  7734. },
  7735. Bc = f.Float = Number;
  7736. Bc.__name__ = ["Float"];
  7737. var Cc = f.Bool = Boolean;
  7738. Cc.__ename__ = ["Bool"];
  7739. var Gc = f.Class = {
  7740. __name__: ["Class"]
  7741. },
  7742. Hc = {};
  7743. o.Element = "element";
  7744. o.PCData = "pcdata";
  7745. o.CData = "cdata";
  7746. o.Comment = "comment";
  7747. o.DocType = "doctype";
  7748. o.ProcessingInstruction = "processingInstruction";
  7749. o.Document = "document";
  7750. fa.unlockedLevels = 0;
  7751. i.dirs = [new la(0, -1), new la(0, 1), new la(1, 0), new la(-1, 0)];
  7752. i.pieceWidth = 70;
  7753. i.pieceHeight = 70;
  7754. i.gap = 0;
  7755. i.initPlayingGridHeight = 10;
  7756. C.gridIsActive = !0;
  7757. ta.instance = new ta;
  7758. P.DISPATCHING_SENTINEL = new Ka(null, null);
  7759. l.root = new D;
  7760. l.uncaughtError = new G;
  7761. l.hidden = new S(!1);
  7762. l.volume = new n(1);
  7763. l._platform = ta.instance;
  7764. l._calledInit = !1;
  7765. Y.__meta__ = {
  7766. obj: {
  7767. assets: [{
  7768. main: [{
  7769. bytes: 6989,
  7770. md5: "07581d6dd6561438a77469c018022c8c",
  7771. name: "bl0.png"
  7772. }, {
  7773. bytes: 7698,
  7774. md5: "5c9f32ab78682d5c70e1d872752bbf18",
  7775. name: "bl1.png"
  7776. }, {
  7777. bytes: 13554,
  7778. md5: "90dab077d38a874ec231ecb9bf12d95d",
  7779. name: "bl111.png"
  7780. }, {
  7781. bytes: 16754,
  7782. md5: "48d314a4cb7d2c75f94f4ef6d31b12b3",
  7783. name: "bl112.png"
  7784. }, {
  7785. bytes: 9354,
  7786. md5: "a13c76b799c0a91a1c6567632a9904f2",
  7787. name: "bl113.png"
  7788. }, {
  7789. bytes: 7412,
  7790. md5: "11d01efbe515a5b571573940e3f3ec67",
  7791. name: "bl2.png"
  7792. }, {
  7793. bytes: 8977,
  7794. md5: "439f547b7689d25042b7f7567b35c398",
  7795. name: "bl20.png"
  7796. }, {
  7797. bytes: 8414,
  7798. md5: "7d2d960a50fcb9fc7ea0e180d6ada829",
  7799. name: "bl222.png"
  7800. }, {
  7801. bytes: 7969,
  7802. md5: "6390ba436b77d612ef4abe140dc64b62",
  7803. name: "bl3.png"
  7804. }, {
  7805. bytes: 8727,
  7806. md5: "ea6704f9be4ee112bb1ef4c854c85ad3",
  7807. name: "bl4.png"
  7808. }, {
  7809. bytes: 7615,
  7810. md5: "225ef170e8897a2401c122d8e8490971",
  7811. name: "bl40.png"
  7812. }, {
  7813. bytes: 8283,
  7814. md5: "2ed273e7d84c647191712b8ab5a42b80",
  7815. name: "bl5.png"
  7816. }, {
  7817. bytes: 9070,
  7818. md5: "da9ccc86422bbb118afc064d70c9bbb5",
  7819. name: "bl6.png"
  7820. }, {
  7821. bytes: 8559,
  7822. md5: "0f0425bac9b4bde63c9da509bdf01284",
  7823. name: "bl7.png"
  7824. }, {
  7825. bytes: 9493,
  7826. md5: "92ca183bfdae3892ed056b1112adf564",
  7827. name: "bl8.png"
  7828. }, {
  7829. bytes: 9239,
  7830. md5: "c63468f89380053e964a2c49a13414b9",
  7831. name: "bl9.png"
  7832. }, {
  7833. bytes: 73986,
  7834. md5: "31a26964765f77ca6f33358f3211a438",
  7835. name: "blade.png"
  7836. }, {
  7837. bytes: 9228,
  7838. md5: "d4175a33d89c737f08071cc234e1a54b",
  7839. name: "booster1_mrk.png"
  7840. }, {
  7841. bytes: 9297,
  7842. md5: "57d9a56686d7b82e608ac7f2786fd5ef",
  7843. name: "booster1_mrk2.png"
  7844. }, {
  7845. bytes: 9229,
  7846. md5: "52f3cf2c2a45eced4b003c3edaa0e8a0",
  7847. name: "booster2_mrk.png"
  7848. }, {
  7849. bytes: 9286,
  7850. md5: "54aa351f6f653f8c4112624bfdc4f46f",
  7851. name: "booster2_mrk2.png"
  7852. }, {
  7853. bytes: 5763,
  7854. md5: "499f4e5cbdcfcfbc2e22ba548d78651a",
  7855. name: "booster_bar.png"
  7856. }, {
  7857. bytes: 14772,
  7858. md5: "04089e1482bdf1c45b76649b1a8f189c",
  7859. name: "booster_bar_fill.png"
  7860. }, {
  7861. bytes: 29493,
  7862. md5: "d87fe051241a00e706b7e4a948314182",
  7863. name: "bottom_wheels.png"
  7864. }, {
  7865. bytes: 14622,
  7866. md5: "0007ec85a82401040a8e47dce9f7f899",
  7867. name: "btn_level_select.png"
  7868. }, {
  7869. bytes: 7982,
  7870. md5: "b4232721cac5cf91c47ea93a61f7a5b5",
  7871. name: "cage.png"
  7872. }, {
  7873. bytes: 51233,
  7874. md5: "11640eebd32de45cf6e12b704b01e295",
  7875. name: "default_font1.fnt"
  7876. }, {
  7877. bytes: 372109,
  7878. md5: "0a010d9c624b845409d5c1c404407680",
  7879. name: "default_font1.png"
  7880. },{
  7881. bytes: 11456,
  7882. md5: "11640eebd32de45cf6e12b704b01e29590",
  7883. name: "default_font2.fnt"
  7884. }, {
  7885. bytes: 69226,
  7886. md5: "0a010d9c624b845409d5c1c40440768034",
  7887. name: "default_font2.png"
  7888. }, {
  7889. bytes: 43399,
  7890. md5: "d79756db6a9431852f94bffff23d80a6",
  7891. name: "fx/block_explosion.png"
  7892. }, {
  7893. bytes: 36222,
  7894. md5: "0e99aa76603201928b44c8efe29cbd3e",
  7895. name: "fx/block_explosion1.png"
  7896. }, {
  7897. bytes: 36633,
  7898. md5: "3f7fe8a95c67fba5502589eee4f2ceef",
  7899. name: "fx/booster_fx.png"
  7900. }, {
  7901. bytes: 1983,
  7902. md5: "677457a87b8d663eaba5b25411219b1f",
  7903. name: "fx/explode.pex"
  7904. }, {
  7905. bytes: 6987,
  7906. md5: "7f9e5fc0c1b333dfa95fa6cf177e2ba2",
  7907. name: "fx/explosion_0.png"
  7908. }, {
  7909. bytes: 17398,
  7910. md5: "87a4289f27903aa62eec1b1cc9d3d4d1",
  7911. name: "fx/explosion_1.png"
  7912. }, {
  7913. bytes: 23347,
  7914. md5: "7b8077233a5d9073938eecb0e99022ee",
  7915. name: "fx/explosion_2.png"
  7916. }, {
  7917. bytes: 23120,
  7918. md5: "2114df557b05d5965ce6b2335a143a51",
  7919. name: "fx/explosion_3.png"
  7920. }, {
  7921. bytes: 41186,
  7922. md5: "9d3c7302453d56c90d6625d3ff5cabdd",
  7923. name: "fx/explosion_4.png"
  7924. }, {
  7925. bytes: 20889,
  7926. md5: "55ea27871498de7d6c43f298db2c4ab9",
  7927. name: "fx/flash_fx.png"
  7928. }, {
  7929. bytes: 1216,
  7930. md5: "2283aa09c0d961595ef2cd2db75b9368",
  7931. name: "fx/spark.png"
  7932. }, {
  7933. bytes: 58055,
  7934. md5: "c43bb2d3b5b66dd8ec1dc944440bfd98",
  7935. name: "game_over_icon.png"
  7936. }, {
  7937. bytes: 197192,
  7938. md5: "5c32d5125b0753778401b4ad4353b4a4",
  7939. name: "game_scene_bg.png"
  7940. }, {
  7941. bytes: 246650,
  7942. md5: "489aa9c1fba064fc54285786b6f7a23a",
  7943. name: "game_title.png"
  7944. }, {
  7945. bytes: 11065,
  7946. md5: "c5abf54c5fe11c484f473df9074ee8ac",
  7947. name: "home_btn.png"
  7948. }, {
  7949. bytes: 15004,
  7950. md5: "36596867419c8ad039a90addd613bf99",
  7951. name: "hud_bottom_bg.png"
  7952. }, {
  7953. bytes: 27551,
  7954. md5: "5f5c2f78caf39398d5179db3ee8d11db",
  7955. name: "hud_top_bg.png"
  7956. }, {
  7957. bytes: 61062,
  7958. md5: "e980e348bb5dada5769985752058b16b",
  7959. name: "level_end_flag.png"
  7960. }, {
  7961. bytes: 6388,
  7962. md5: "87693264d7ad57984fc326d14066d2fb",
  7963. name: "lock_icon.png"
  7964. }, {
  7965. bytes: 12666,
  7966. md5: "9d5c276fa1d31c5ece4d14947f95d999",
  7967. name: "more_games_btn.png"
  7968. }, {
  7969. bytes: 9361,
  7970. md5: "f4317a026c970596afd43d77edb441c8",
  7971. name: "pause_btn.png"
  7972. }, {
  7973. bytes: 27022,
  7974. md5: "6077cfdd725bbe59431f07ac6f6393b7",
  7975. name: "play_btn2.png"
  7976. }, {
  7977. bytes: 12745,
  7978. md5: "34d22fce8212c8e392955291259bd9b1",
  7979. name: "play_small_btn.png"
  7980. }, {
  7981. bytes: 13010,
  7982. md5: "420e35f7a4613f0e0dd39769d3e2fe00",
  7983. name: "replay_btn.png"
  7984. },{
  7985. bytes: 5034,
  7986. md5: "a8e3774b162ffd6c5afa9ff59ff9ed8c",
  7987. name: "sharebtn.png"
  7988. }, {
  7989. bytes: 1785,
  7990. md5: "88737de50a6f56a9c73f39df040b7186",
  7991. name: "score_font.fnt"
  7992. }, {
  7993. bytes: 14651,
  7994. md5: "7a0ab850bade79468e93b4324e63ad9f",
  7995. name: "score_font.png"
  7996. }, {
  7997. bytes: 1348,
  7998. md5: "dcfd19599892609f43b01e60e097fd14",
  7999. name: "score_font2.fnt"
  8000. }, {
  8001. bytes: 10537,
  8002. md5: "a73c5aa23eb7aa495f33a2dd9b2592c1",
  8003. name: "score_font2.png"
  8004. }, {
  8005. bytes: 41816,
  8006. md5: "6bbb62c39c2b1116372068d0857fbe06",
  8007. name: "score_icon.png"
  8008. }, {
  8009. bytes: 2916,
  8010. md5: "8412ad845a54240fa63710048d43057a",
  8011. name: "settings.ini"
  8012. }, {
  8013. bytes: 12660,
  8014. md5: "ba05f1375e24c1c17f5178d9f14f8ce7",
  8015. name: "sound_off_btn.png"
  8016. }, {
  8017. bytes: 12759,
  8018. md5: "e3134f7b8948c1f2f8fcecec5deb171a",
  8019. name: "sound_on_btn.png"
  8020. }, {
  8021. bytes: 42607,
  8022. md5: "6d9943b488cfdcd9b0777b3207078e8b",
  8023. name: "sounds/bonus_sfx.mp3"
  8024. }, {
  8025. bytes: 10424,
  8026. md5: "516c4f0e0fa353ae20c8e158a95f169e",
  8027. name: "sounds/button_click_sfx.mp3"
  8028. }, {
  8029. bytes: 93313,
  8030. md5: "f4dbd00eb4d6424829c938d9def1d118",
  8031. name: "sounds/game_over_sfx.mp3"
  8032. }, {
  8033. bytes: 29315,
  8034. md5: "8abc0777a741956cce2a4f880f41b2ed",
  8035. name: "sounds/level_end_sfx.mp3"
  8036. }, {
  8037. bytes: 19634,
  8038. md5: "98877fac3c3a69a9b3e872e70f0bb438",
  8039. name: "sounds/no_match_sfx.mp3"
  8040. }, {
  8041. bytes: 9429,
  8042. md5: "bdef4466755b50f32182d22bbc0b1b2d",
  8043. name: "sounds/pop_sfx.mp3"
  8044. }, {
  8045. bytes: 248410,
  8046. md5: "12257e52dba56061f956eeaf9ce3a521",
  8047. name: "sounds/soundtrack1.mp3"
  8048. }],
  8049. boot: [{
  8050. bytes: 12539,
  8051. md5: "8ff68b1f9e1dc38d7cb46c0defb7539e",
  8052. name: "rot_phone.png"
  8053. }]
  8054. }]
  8055. }
  8056. };
  8057. Y._supportsCrossOrigin =
  8058. function () {
  8059. var a;
  8060. a = 0 <= window.navigator.userAgent.indexOf("Linux; U; Android") ? !1 : null != (new XMLHttpRequest).withCredentials;
  8061. a || null;
  8062. //todo, close the .orig support
  8063. return false;
  8064. return a
  8065. }();
  8066. r._scratchPoint = new la;
  8067. Ma.NEWLINE = new rb(10);
  8068. Z._sharedEvent = new Zb;
  8069. Q._sharedEvent = new $b;
  8070. Ja.CANVAS_TEXTURES = (new $("(iPhone|iPod|iPad)", "")).match(window.navigator.userAgent);
  8071. B._mediaRefCount = 0;
  8072. B._detectBlobSupport = !1;
  8073. u.VENDOR_PREFIXES = ["webkit", "moz", "ms", "o", "khtml"];
  8074. u.SHOULD_HIDE_MOBILE_BROWSER = window.top == window && (new $("Mobile(/.*)? Safari", "")).match(window.navigator.userAgent);
  8075. A._detectSupport = !0;
  8076. pa.USE_CACHE = !1;
  8077. pa.USE_ENUM_INDEX = !1;
  8078. pa.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
  8079. V.DEFAULT_RESOLVER = H;
  8080. V.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
  8081. Fa.count = 0;
  8082. ra.escapes = function () {
  8083. var a = new O;
  8084. a.set("lt", "<");
  8085. a.set("gt", ">");
  8086. a.set("amp", "&");
  8087. a.set("quot", '"');
  8088. a.set("apos", "'");
  8089. a.set("nbsp", String.fromCharCode(160));
  8090. return a
  8091. }(this);
  8092. X.cLevel = 0;
  8093. t.soundsFolder = "sounds";
  8094. t.isMuted = !1;
  8095. d.defaultOrientation = ja.Portrait;
  8096. d.defaultFont =
  8097. "default_font1";
  8098. d.systemBgColor = 0;
  8099. d.buttonClickSfx = "";
  8100. W.main()
  8101. })();