Нема описа
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

worker-coffee.js 335KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599
  1. "no use strict";
  2. ;(function(window) {
  3. if (typeof window.window != "undefined" && window.document) {
  4. return;
  5. }
  6. window.console = function() {
  7. var msgs = Array.prototype.slice.call(arguments, 0);
  8. postMessage({type: "log", data: msgs});
  9. };
  10. window.console.error =
  11. window.console.warn =
  12. window.console.log =
  13. window.console.trace = window.console;
  14. window.window = window;
  15. window.ace = window;
  16. window.onerror = function(message, file, line, col, err) {
  17. postMessage({type: "error", data: {
  18. message: message,
  19. file: file,
  20. line: line,
  21. col: col,
  22. stack: err.stack
  23. }});
  24. };
  25. window.normalizeModule = function(parentId, moduleName) {
  26. // normalize plugin requires
  27. if (moduleName.indexOf("!") !== -1) {
  28. var chunks = moduleName.split("!");
  29. return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
  30. }
  31. // normalize relative requires
  32. if (moduleName.charAt(0) == ".") {
  33. var base = parentId.split("/").slice(0, -1).join("/");
  34. moduleName = (base ? base + "/" : "") + moduleName;
  35. while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
  36. var previous = moduleName;
  37. moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
  38. }
  39. }
  40. return moduleName;
  41. };
  42. window.require = function(parentId, id) {
  43. if (!id) {
  44. id = parentId;
  45. parentId = null;
  46. }
  47. if (!id.charAt)
  48. throw new Error("worker.js require() accepts only (parentId, id) as arguments");
  49. id = window.normalizeModule(parentId, id);
  50. var module = window.require.modules[id];
  51. if (module) {
  52. if (!module.initialized) {
  53. module.initialized = true;
  54. module.exports = module.factory().exports;
  55. }
  56. return module.exports;
  57. }
  58. var chunks = id.split("/");
  59. if (!window.require.tlns)
  60. return console.log("unable to load " + id);
  61. chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
  62. var path = chunks.join("/") + ".js";
  63. window.require.id = id;
  64. importScripts(path);
  65. return window.require(parentId, id);
  66. };
  67. window.require.modules = {};
  68. window.require.tlns = {};
  69. window.define = function(id, deps, factory) {
  70. if (arguments.length == 2) {
  71. factory = deps;
  72. if (typeof id != "string") {
  73. deps = id;
  74. id = window.require.id;
  75. }
  76. } else if (arguments.length == 1) {
  77. factory = id;
  78. deps = [];
  79. id = window.require.id;
  80. }
  81. if (typeof factory != "function") {
  82. window.require.modules[id] = {
  83. exports: factory,
  84. initialized: true
  85. };
  86. return;
  87. }
  88. if (!deps.length)
  89. // If there is no dependencies, we inject 'require', 'exports' and
  90. // 'module' as dependencies, to provide CommonJS compatibility.
  91. deps = ['require', 'exports', 'module'];
  92. var req = function(childId) {
  93. return window.require(id, childId);
  94. };
  95. window.require.modules[id] = {
  96. exports: {},
  97. factory: function() {
  98. var module = this;
  99. var returnExports = factory.apply(this, deps.map(function(dep) {
  100. switch(dep) {
  101. // Because 'require', 'exports' and 'module' aren't actual
  102. // dependencies, we must handle them seperately.
  103. case 'require': return req;
  104. case 'exports': return module.exports;
  105. case 'module': return module;
  106. // But for all other dependencies, we can just go ahead and
  107. // require them.
  108. default: return req(dep);
  109. }
  110. }));
  111. if (returnExports)
  112. module.exports = returnExports;
  113. return module;
  114. }
  115. };
  116. };
  117. window.define.amd = {};
  118. window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
  119. require.tlns = topLevelNamespaces;
  120. };
  121. window.initSender = function initSender() {
  122. var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
  123. var oop = window.require("ace/lib/oop");
  124. var Sender = function() {};
  125. (function() {
  126. oop.implement(this, EventEmitter);
  127. this.callback = function(data, callbackId) {
  128. postMessage({
  129. type: "call",
  130. id: callbackId,
  131. data: data
  132. });
  133. };
  134. this.emit = function(name, data) {
  135. postMessage({
  136. type: "event",
  137. name: name,
  138. data: data
  139. });
  140. };
  141. }).call(Sender.prototype);
  142. return new Sender();
  143. };
  144. var main = window.main = null;
  145. var sender = window.sender = null;
  146. window.onmessage = function(e) {
  147. var msg = e.data;
  148. if (msg.command) {
  149. if (main[msg.command])
  150. main[msg.command].apply(main, msg.args);
  151. else
  152. throw new Error("Unknown command:" + msg.command);
  153. }
  154. else if (msg.init) {
  155. initBaseUrls(msg.tlns);
  156. require("ace/lib/es5-shim");
  157. sender = window.sender = initSender();
  158. var clazz = require(msg.module)[msg.classname];
  159. main = window.main = new clazz(sender);
  160. }
  161. else if (msg.event && sender) {
  162. sender._signal(msg.event, msg.data);
  163. }
  164. };
  165. })(this);
  166. ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
  167. "use strict";
  168. exports.inherits = function(ctor, superCtor) {
  169. ctor.super_ = superCtor;
  170. ctor.prototype = Object.create(superCtor.prototype, {
  171. constructor: {
  172. value: ctor,
  173. enumerable: false,
  174. writable: true,
  175. configurable: true
  176. }
  177. });
  178. };
  179. exports.mixin = function(obj, mixin) {
  180. for (var key in mixin) {
  181. obj[key] = mixin[key];
  182. }
  183. return obj;
  184. };
  185. exports.implement = function(proto, mixin) {
  186. exports.mixin(proto, mixin);
  187. };
  188. });
  189. ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
  190. "use strict";
  191. var EventEmitter = {};
  192. var stopPropagation = function() { this.propagationStopped = true; };
  193. var preventDefault = function() { this.defaultPrevented = true; };
  194. EventEmitter._emit =
  195. EventEmitter._dispatchEvent = function(eventName, e) {
  196. this._eventRegistry || (this._eventRegistry = {});
  197. this._defaultHandlers || (this._defaultHandlers = {});
  198. var listeners = this._eventRegistry[eventName] || [];
  199. var defaultHandler = this._defaultHandlers[eventName];
  200. if (!listeners.length && !defaultHandler)
  201. return;
  202. if (typeof e != "object" || !e)
  203. e = {};
  204. if (!e.type)
  205. e.type = eventName;
  206. if (!e.stopPropagation)
  207. e.stopPropagation = stopPropagation;
  208. if (!e.preventDefault)
  209. e.preventDefault = preventDefault;
  210. listeners = listeners.slice();
  211. for (var i=0; i<listeners.length; i++) {
  212. listeners[i](e, this);
  213. if (e.propagationStopped)
  214. break;
  215. }
  216. if (defaultHandler && !e.defaultPrevented)
  217. return defaultHandler(e, this);
  218. };
  219. EventEmitter._signal = function(eventName, e) {
  220. var listeners = (this._eventRegistry || {})[eventName];
  221. if (!listeners)
  222. return;
  223. listeners = listeners.slice();
  224. for (var i=0; i<listeners.length; i++)
  225. listeners[i](e, this);
  226. };
  227. EventEmitter.once = function(eventName, callback) {
  228. var _self = this;
  229. callback && this.addEventListener(eventName, function newCallback() {
  230. _self.removeEventListener(eventName, newCallback);
  231. callback.apply(null, arguments);
  232. });
  233. };
  234. EventEmitter.setDefaultHandler = function(eventName, callback) {
  235. var handlers = this._defaultHandlers
  236. if (!handlers)
  237. handlers = this._defaultHandlers = {_disabled_: {}};
  238. if (handlers[eventName]) {
  239. var old = handlers[eventName];
  240. var disabled = handlers._disabled_[eventName];
  241. if (!disabled)
  242. handlers._disabled_[eventName] = disabled = [];
  243. disabled.push(old);
  244. var i = disabled.indexOf(callback);
  245. if (i != -1)
  246. disabled.splice(i, 1);
  247. }
  248. handlers[eventName] = callback;
  249. };
  250. EventEmitter.removeDefaultHandler = function(eventName, callback) {
  251. var handlers = this._defaultHandlers
  252. if (!handlers)
  253. return;
  254. var disabled = handlers._disabled_[eventName];
  255. if (handlers[eventName] == callback) {
  256. var old = handlers[eventName];
  257. if (disabled)
  258. this.setDefaultHandler(eventName, disabled.pop());
  259. } else if (disabled) {
  260. var i = disabled.indexOf(callback);
  261. if (i != -1)
  262. disabled.splice(i, 1);
  263. }
  264. };
  265. EventEmitter.on =
  266. EventEmitter.addEventListener = function(eventName, callback, capturing) {
  267. this._eventRegistry = this._eventRegistry || {};
  268. var listeners = this._eventRegistry[eventName];
  269. if (!listeners)
  270. listeners = this._eventRegistry[eventName] = [];
  271. if (listeners.indexOf(callback) == -1)
  272. listeners[capturing ? "unshift" : "push"](callback);
  273. return callback;
  274. };
  275. EventEmitter.off =
  276. EventEmitter.removeListener =
  277. EventEmitter.removeEventListener = function(eventName, callback) {
  278. this._eventRegistry = this._eventRegistry || {};
  279. var listeners = this._eventRegistry[eventName];
  280. if (!listeners)
  281. return;
  282. var index = listeners.indexOf(callback);
  283. if (index !== -1)
  284. listeners.splice(index, 1);
  285. };
  286. EventEmitter.removeAllListeners = function(eventName) {
  287. if (this._eventRegistry) this._eventRegistry[eventName] = [];
  288. };
  289. exports.EventEmitter = EventEmitter;
  290. });
  291. ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
  292. "use strict";
  293. var comparePoints = function(p1, p2) {
  294. return p1.row - p2.row || p1.column - p2.column;
  295. };
  296. var Range = function(startRow, startColumn, endRow, endColumn) {
  297. this.start = {
  298. row: startRow,
  299. column: startColumn
  300. };
  301. this.end = {
  302. row: endRow,
  303. column: endColumn
  304. };
  305. };
  306. (function() {
  307. this.isEqual = function(range) {
  308. return this.start.row === range.start.row &&
  309. this.end.row === range.end.row &&
  310. this.start.column === range.start.column &&
  311. this.end.column === range.end.column;
  312. };
  313. this.toString = function() {
  314. return ("Range: [" + this.start.row + "/" + this.start.column +
  315. "] -> [" + this.end.row + "/" + this.end.column + "]");
  316. };
  317. this.contains = function(row, column) {
  318. return this.compare(row, column) == 0;
  319. };
  320. this.compareRange = function(range) {
  321. var cmp,
  322. end = range.end,
  323. start = range.start;
  324. cmp = this.compare(end.row, end.column);
  325. if (cmp == 1) {
  326. cmp = this.compare(start.row, start.column);
  327. if (cmp == 1) {
  328. return 2;
  329. } else if (cmp == 0) {
  330. return 1;
  331. } else {
  332. return 0;
  333. }
  334. } else if (cmp == -1) {
  335. return -2;
  336. } else {
  337. cmp = this.compare(start.row, start.column);
  338. if (cmp == -1) {
  339. return -1;
  340. } else if (cmp == 1) {
  341. return 42;
  342. } else {
  343. return 0;
  344. }
  345. }
  346. };
  347. this.comparePoint = function(p) {
  348. return this.compare(p.row, p.column);
  349. };
  350. this.containsRange = function(range) {
  351. return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
  352. };
  353. this.intersects = function(range) {
  354. var cmp = this.compareRange(range);
  355. return (cmp == -1 || cmp == 0 || cmp == 1);
  356. };
  357. this.isEnd = function(row, column) {
  358. return this.end.row == row && this.end.column == column;
  359. };
  360. this.isStart = function(row, column) {
  361. return this.start.row == row && this.start.column == column;
  362. };
  363. this.setStart = function(row, column) {
  364. if (typeof row == "object") {
  365. this.start.column = row.column;
  366. this.start.row = row.row;
  367. } else {
  368. this.start.row = row;
  369. this.start.column = column;
  370. }
  371. };
  372. this.setEnd = function(row, column) {
  373. if (typeof row == "object") {
  374. this.end.column = row.column;
  375. this.end.row = row.row;
  376. } else {
  377. this.end.row = row;
  378. this.end.column = column;
  379. }
  380. };
  381. this.inside = function(row, column) {
  382. if (this.compare(row, column) == 0) {
  383. if (this.isEnd(row, column) || this.isStart(row, column)) {
  384. return false;
  385. } else {
  386. return true;
  387. }
  388. }
  389. return false;
  390. };
  391. this.insideStart = function(row, column) {
  392. if (this.compare(row, column) == 0) {
  393. if (this.isEnd(row, column)) {
  394. return false;
  395. } else {
  396. return true;
  397. }
  398. }
  399. return false;
  400. };
  401. this.insideEnd = function(row, column) {
  402. if (this.compare(row, column) == 0) {
  403. if (this.isStart(row, column)) {
  404. return false;
  405. } else {
  406. return true;
  407. }
  408. }
  409. return false;
  410. };
  411. this.compare = function(row, column) {
  412. if (!this.isMultiLine()) {
  413. if (row === this.start.row) {
  414. return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
  415. };
  416. }
  417. if (row < this.start.row)
  418. return -1;
  419. if (row > this.end.row)
  420. return 1;
  421. if (this.start.row === row)
  422. return column >= this.start.column ? 0 : -1;
  423. if (this.end.row === row)
  424. return column <= this.end.column ? 0 : 1;
  425. return 0;
  426. };
  427. this.compareStart = function(row, column) {
  428. if (this.start.row == row && this.start.column == column) {
  429. return -1;
  430. } else {
  431. return this.compare(row, column);
  432. }
  433. };
  434. this.compareEnd = function(row, column) {
  435. if (this.end.row == row && this.end.column == column) {
  436. return 1;
  437. } else {
  438. return this.compare(row, column);
  439. }
  440. };
  441. this.compareInside = function(row, column) {
  442. if (this.end.row == row && this.end.column == column) {
  443. return 1;
  444. } else if (this.start.row == row && this.start.column == column) {
  445. return -1;
  446. } else {
  447. return this.compare(row, column);
  448. }
  449. };
  450. this.clipRows = function(firstRow, lastRow) {
  451. if (this.end.row > lastRow)
  452. var end = {row: lastRow + 1, column: 0};
  453. else if (this.end.row < firstRow)
  454. var end = {row: firstRow, column: 0};
  455. if (this.start.row > lastRow)
  456. var start = {row: lastRow + 1, column: 0};
  457. else if (this.start.row < firstRow)
  458. var start = {row: firstRow, column: 0};
  459. return Range.fromPoints(start || this.start, end || this.end);
  460. };
  461. this.extend = function(row, column) {
  462. var cmp = this.compare(row, column);
  463. if (cmp == 0)
  464. return this;
  465. else if (cmp == -1)
  466. var start = {row: row, column: column};
  467. else
  468. var end = {row: row, column: column};
  469. return Range.fromPoints(start || this.start, end || this.end);
  470. };
  471. this.isEmpty = function() {
  472. return (this.start.row === this.end.row && this.start.column === this.end.column);
  473. };
  474. this.isMultiLine = function() {
  475. return (this.start.row !== this.end.row);
  476. };
  477. this.clone = function() {
  478. return Range.fromPoints(this.start, this.end);
  479. };
  480. this.collapseRows = function() {
  481. if (this.end.column == 0)
  482. return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
  483. else
  484. return new Range(this.start.row, 0, this.end.row, 0)
  485. };
  486. this.toScreenRange = function(session) {
  487. var screenPosStart = session.documentToScreenPosition(this.start);
  488. var screenPosEnd = session.documentToScreenPosition(this.end);
  489. return new Range(
  490. screenPosStart.row, screenPosStart.column,
  491. screenPosEnd.row, screenPosEnd.column
  492. );
  493. };
  494. this.moveBy = function(row, column) {
  495. this.start.row += row;
  496. this.start.column += column;
  497. this.end.row += row;
  498. this.end.column += column;
  499. };
  500. }).call(Range.prototype);
  501. Range.fromPoints = function(start, end) {
  502. return new Range(start.row, start.column, end.row, end.column);
  503. };
  504. Range.comparePoints = comparePoints;
  505. Range.comparePoints = function(p1, p2) {
  506. return p1.row - p2.row || p1.column - p2.column;
  507. };
  508. exports.Range = Range;
  509. });
  510. ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
  511. "use strict";
  512. var oop = require("./lib/oop");
  513. var EventEmitter = require("./lib/event_emitter").EventEmitter;
  514. var Anchor = exports.Anchor = function(doc, row, column) {
  515. this.$onChange = this.onChange.bind(this);
  516. this.attach(doc);
  517. if (typeof column == "undefined")
  518. this.setPosition(row.row, row.column);
  519. else
  520. this.setPosition(row, column);
  521. };
  522. (function() {
  523. oop.implement(this, EventEmitter);
  524. this.getPosition = function() {
  525. return this.$clipPositionToDocument(this.row, this.column);
  526. };
  527. this.getDocument = function() {
  528. return this.document;
  529. };
  530. this.$insertRight = false;
  531. this.onChange = function(e) {
  532. var delta = e.data;
  533. var range = delta.range;
  534. if (range.start.row == range.end.row && range.start.row != this.row)
  535. return;
  536. if (range.start.row > this.row)
  537. return;
  538. if (range.start.row == this.row && range.start.column > this.column)
  539. return;
  540. var row = this.row;
  541. var column = this.column;
  542. var start = range.start;
  543. var end = range.end;
  544. if (delta.action === "insertText") {
  545. if (start.row === row && start.column <= column) {
  546. if (start.column === column && this.$insertRight) {
  547. } else if (start.row === end.row) {
  548. column += end.column - start.column;
  549. } else {
  550. column -= start.column;
  551. row += end.row - start.row;
  552. }
  553. } else if (start.row !== end.row && start.row < row) {
  554. row += end.row - start.row;
  555. }
  556. } else if (delta.action === "insertLines") {
  557. if (start.row === row && column === 0 && this.$insertRight) {
  558. }
  559. else if (start.row <= row) {
  560. row += end.row - start.row;
  561. }
  562. } else if (delta.action === "removeText") {
  563. if (start.row === row && start.column < column) {
  564. if (end.column >= column)
  565. column = start.column;
  566. else
  567. column = Math.max(0, column - (end.column - start.column));
  568. } else if (start.row !== end.row && start.row < row) {
  569. if (end.row === row)
  570. column = Math.max(0, column - end.column) + start.column;
  571. row -= (end.row - start.row);
  572. } else if (end.row === row) {
  573. row -= end.row - start.row;
  574. column = Math.max(0, column - end.column) + start.column;
  575. }
  576. } else if (delta.action == "removeLines") {
  577. if (start.row <= row) {
  578. if (end.row <= row)
  579. row -= end.row - start.row;
  580. else {
  581. row = start.row;
  582. column = 0;
  583. }
  584. }
  585. }
  586. this.setPosition(row, column, true);
  587. };
  588. this.setPosition = function(row, column, noClip) {
  589. var pos;
  590. if (noClip) {
  591. pos = {
  592. row: row,
  593. column: column
  594. };
  595. } else {
  596. pos = this.$clipPositionToDocument(row, column);
  597. }
  598. if (this.row == pos.row && this.column == pos.column)
  599. return;
  600. var old = {
  601. row: this.row,
  602. column: this.column
  603. };
  604. this.row = pos.row;
  605. this.column = pos.column;
  606. this._signal("change", {
  607. old: old,
  608. value: pos
  609. });
  610. };
  611. this.detach = function() {
  612. this.document.removeEventListener("change", this.$onChange);
  613. };
  614. this.attach = function(doc) {
  615. this.document = doc || this.document;
  616. this.document.on("change", this.$onChange);
  617. };
  618. this.$clipPositionToDocument = function(row, column) {
  619. var pos = {};
  620. if (row >= this.document.getLength()) {
  621. pos.row = Math.max(0, this.document.getLength() - 1);
  622. pos.column = this.document.getLine(pos.row).length;
  623. }
  624. else if (row < 0) {
  625. pos.row = 0;
  626. pos.column = 0;
  627. }
  628. else {
  629. pos.row = row;
  630. pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
  631. }
  632. if (column < 0)
  633. pos.column = 0;
  634. return pos;
  635. };
  636. }).call(Anchor.prototype);
  637. });
  638. ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
  639. "use strict";
  640. var oop = require("./lib/oop");
  641. var EventEmitter = require("./lib/event_emitter").EventEmitter;
  642. var Range = require("./range").Range;
  643. var Anchor = require("./anchor").Anchor;
  644. var Document = function(text) {
  645. this.$lines = [];
  646. if (text.length === 0) {
  647. this.$lines = [""];
  648. } else if (Array.isArray(text)) {
  649. this._insertLines(0, text);
  650. } else {
  651. this.insert({row: 0, column:0}, text);
  652. }
  653. };
  654. (function() {
  655. oop.implement(this, EventEmitter);
  656. this.setValue = function(text) {
  657. var len = this.getLength();
  658. this.remove(new Range(0, 0, len, this.getLine(len-1).length));
  659. this.insert({row: 0, column:0}, text);
  660. };
  661. this.getValue = function() {
  662. return this.getAllLines().join(this.getNewLineCharacter());
  663. };
  664. this.createAnchor = function(row, column) {
  665. return new Anchor(this, row, column);
  666. };
  667. if ("aaa".split(/a/).length === 0)
  668. this.$split = function(text) {
  669. return text.replace(/\r\n|\r/g, "\n").split("\n");
  670. };
  671. else
  672. this.$split = function(text) {
  673. return text.split(/\r\n|\r|\n/);
  674. };
  675. this.$detectNewLine = function(text) {
  676. var match = text.match(/^.*?(\r\n|\r|\n)/m);
  677. this.$autoNewLine = match ? match[1] : "\n";
  678. this._signal("changeNewLineMode");
  679. };
  680. this.getNewLineCharacter = function() {
  681. switch (this.$newLineMode) {
  682. case "windows":
  683. return "\r\n";
  684. case "unix":
  685. return "\n";
  686. default:
  687. return this.$autoNewLine || "\n";
  688. }
  689. };
  690. this.$autoNewLine = "";
  691. this.$newLineMode = "auto";
  692. this.setNewLineMode = function(newLineMode) {
  693. if (this.$newLineMode === newLineMode)
  694. return;
  695. this.$newLineMode = newLineMode;
  696. this._signal("changeNewLineMode");
  697. };
  698. this.getNewLineMode = function() {
  699. return this.$newLineMode;
  700. };
  701. this.isNewLine = function(text) {
  702. return (text == "\r\n" || text == "\r" || text == "\n");
  703. };
  704. this.getLine = function(row) {
  705. return this.$lines[row] || "";
  706. };
  707. this.getLines = function(firstRow, lastRow) {
  708. return this.$lines.slice(firstRow, lastRow + 1);
  709. };
  710. this.getAllLines = function() {
  711. return this.getLines(0, this.getLength());
  712. };
  713. this.getLength = function() {
  714. return this.$lines.length;
  715. };
  716. this.getTextRange = function(range) {
  717. if (range.start.row == range.end.row) {
  718. return this.getLine(range.start.row)
  719. .substring(range.start.column, range.end.column);
  720. }
  721. var lines = this.getLines(range.start.row, range.end.row);
  722. lines[0] = (lines[0] || "").substring(range.start.column);
  723. var l = lines.length - 1;
  724. if (range.end.row - range.start.row == l)
  725. lines[l] = lines[l].substring(0, range.end.column);
  726. return lines.join(this.getNewLineCharacter());
  727. };
  728. this.$clipPosition = function(position) {
  729. var length = this.getLength();
  730. if (position.row >= length) {
  731. position.row = Math.max(0, length - 1);
  732. position.column = this.getLine(length-1).length;
  733. } else if (position.row < 0)
  734. position.row = 0;
  735. return position;
  736. };
  737. this.insert = function(position, text) {
  738. if (!text || text.length === 0)
  739. return position;
  740. position = this.$clipPosition(position);
  741. if (this.getLength() <= 1)
  742. this.$detectNewLine(text);
  743. var lines = this.$split(text);
  744. var firstLine = lines.splice(0, 1)[0];
  745. var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
  746. position = this.insertInLine(position, firstLine);
  747. if (lastLine !== null) {
  748. position = this.insertNewLine(position); // terminate first line
  749. position = this._insertLines(position.row, lines);
  750. position = this.insertInLine(position, lastLine || "");
  751. }
  752. return position;
  753. };
  754. this.insertLines = function(row, lines) {
  755. if (row >= this.getLength())
  756. return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
  757. return this._insertLines(Math.max(row, 0), lines);
  758. };
  759. this._insertLines = function(row, lines) {
  760. if (lines.length == 0)
  761. return {row: row, column: 0};
  762. while (lines.length > 0xF000) {
  763. var end = this._insertLines(row, lines.slice(0, 0xF000));
  764. lines = lines.slice(0xF000);
  765. row = end.row;
  766. }
  767. var args = [row, 0];
  768. args.push.apply(args, lines);
  769. this.$lines.splice.apply(this.$lines, args);
  770. var range = new Range(row, 0, row + lines.length, 0);
  771. var delta = {
  772. action: "insertLines",
  773. range: range,
  774. lines: lines
  775. };
  776. this._signal("change", { data: delta });
  777. return range.end;
  778. };
  779. this.insertNewLine = function(position) {
  780. position = this.$clipPosition(position);
  781. var line = this.$lines[position.row] || "";
  782. this.$lines[position.row] = line.substring(0, position.column);
  783. this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
  784. var end = {
  785. row : position.row + 1,
  786. column : 0
  787. };
  788. var delta = {
  789. action: "insertText",
  790. range: Range.fromPoints(position, end),
  791. text: this.getNewLineCharacter()
  792. };
  793. this._signal("change", { data: delta });
  794. return end;
  795. };
  796. this.insertInLine = function(position, text) {
  797. if (text.length == 0)
  798. return position;
  799. var line = this.$lines[position.row] || "";
  800. this.$lines[position.row] = line.substring(0, position.column) + text
  801. + line.substring(position.column);
  802. var end = {
  803. row : position.row,
  804. column : position.column + text.length
  805. };
  806. var delta = {
  807. action: "insertText",
  808. range: Range.fromPoints(position, end),
  809. text: text
  810. };
  811. this._signal("change", { data: delta });
  812. return end;
  813. };
  814. this.remove = function(range) {
  815. if (!(range instanceof Range))
  816. range = Range.fromPoints(range.start, range.end);
  817. range.start = this.$clipPosition(range.start);
  818. range.end = this.$clipPosition(range.end);
  819. if (range.isEmpty())
  820. return range.start;
  821. var firstRow = range.start.row;
  822. var lastRow = range.end.row;
  823. if (range.isMultiLine()) {
  824. var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
  825. var lastFullRow = lastRow - 1;
  826. if (range.end.column > 0)
  827. this.removeInLine(lastRow, 0, range.end.column);
  828. if (lastFullRow >= firstFullRow)
  829. this._removeLines(firstFullRow, lastFullRow);
  830. if (firstFullRow != firstRow) {
  831. this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
  832. this.removeNewLine(range.start.row);
  833. }
  834. }
  835. else {
  836. this.removeInLine(firstRow, range.start.column, range.end.column);
  837. }
  838. return range.start;
  839. };
  840. this.removeInLine = function(row, startColumn, endColumn) {
  841. if (startColumn == endColumn)
  842. return;
  843. var range = new Range(row, startColumn, row, endColumn);
  844. var line = this.getLine(row);
  845. var removed = line.substring(startColumn, endColumn);
  846. var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
  847. this.$lines.splice(row, 1, newLine);
  848. var delta = {
  849. action: "removeText",
  850. range: range,
  851. text: removed
  852. };
  853. this._signal("change", { data: delta });
  854. return range.start;
  855. };
  856. this.removeLines = function(firstRow, lastRow) {
  857. if (firstRow < 0 || lastRow >= this.getLength())
  858. return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
  859. return this._removeLines(firstRow, lastRow);
  860. };
  861. this._removeLines = function(firstRow, lastRow) {
  862. var range = new Range(firstRow, 0, lastRow + 1, 0);
  863. var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
  864. var delta = {
  865. action: "removeLines",
  866. range: range,
  867. nl: this.getNewLineCharacter(),
  868. lines: removed
  869. };
  870. this._signal("change", { data: delta });
  871. return removed;
  872. };
  873. this.removeNewLine = function(row) {
  874. var firstLine = this.getLine(row);
  875. var secondLine = this.getLine(row+1);
  876. var range = new Range(row, firstLine.length, row+1, 0);
  877. var line = firstLine + secondLine;
  878. this.$lines.splice(row, 2, line);
  879. var delta = {
  880. action: "removeText",
  881. range: range,
  882. text: this.getNewLineCharacter()
  883. };
  884. this._signal("change", { data: delta });
  885. };
  886. this.replace = function(range, text) {
  887. if (!(range instanceof Range))
  888. range = Range.fromPoints(range.start, range.end);
  889. if (text.length == 0 && range.isEmpty())
  890. return range.start;
  891. if (text == this.getTextRange(range))
  892. return range.end;
  893. this.remove(range);
  894. if (text) {
  895. var end = this.insert(range.start, text);
  896. }
  897. else {
  898. end = range.start;
  899. }
  900. return end;
  901. };
  902. this.applyDeltas = function(deltas) {
  903. for (var i=0; i<deltas.length; i++) {
  904. var delta = deltas[i];
  905. var range = Range.fromPoints(delta.range.start, delta.range.end);
  906. if (delta.action == "insertLines")
  907. this.insertLines(range.start.row, delta.lines);
  908. else if (delta.action == "insertText")
  909. this.insert(range.start, delta.text);
  910. else if (delta.action == "removeLines")
  911. this._removeLines(range.start.row, range.end.row - 1);
  912. else if (delta.action == "removeText")
  913. this.remove(range);
  914. }
  915. };
  916. this.revertDeltas = function(deltas) {
  917. for (var i=deltas.length-1; i>=0; i--) {
  918. var delta = deltas[i];
  919. var range = Range.fromPoints(delta.range.start, delta.range.end);
  920. if (delta.action == "insertLines")
  921. this._removeLines(range.start.row, range.end.row - 1);
  922. else if (delta.action == "insertText")
  923. this.remove(range);
  924. else if (delta.action == "removeLines")
  925. this._insertLines(range.start.row, delta.lines);
  926. else if (delta.action == "removeText")
  927. this.insert(range.start, delta.text);
  928. }
  929. };
  930. this.indexToPosition = function(index, startRow) {
  931. var lines = this.$lines || this.getAllLines();
  932. var newlineLength = this.getNewLineCharacter().length;
  933. for (var i = startRow || 0, l = lines.length; i < l; i++) {
  934. index -= lines[i].length + newlineLength;
  935. if (index < 0)
  936. return {row: i, column: index + lines[i].length + newlineLength};
  937. }
  938. return {row: l-1, column: lines[l-1].length};
  939. };
  940. this.positionToIndex = function(pos, startRow) {
  941. var lines = this.$lines || this.getAllLines();
  942. var newlineLength = this.getNewLineCharacter().length;
  943. var index = 0;
  944. var row = Math.min(pos.row, lines.length);
  945. for (var i = startRow || 0; i < row; ++i)
  946. index += lines[i].length + newlineLength;
  947. return index + pos.column;
  948. };
  949. }).call(Document.prototype);
  950. exports.Document = Document;
  951. });
  952. ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
  953. "use strict";
  954. exports.last = function(a) {
  955. return a[a.length - 1];
  956. };
  957. exports.stringReverse = function(string) {
  958. return string.split("").reverse().join("");
  959. };
  960. exports.stringRepeat = function (string, count) {
  961. var result = '';
  962. while (count > 0) {
  963. if (count & 1)
  964. result += string;
  965. if (count >>= 1)
  966. string += string;
  967. }
  968. return result;
  969. };
  970. var trimBeginRegexp = /^\s\s*/;
  971. var trimEndRegexp = /\s\s*$/;
  972. exports.stringTrimLeft = function (string) {
  973. return string.replace(trimBeginRegexp, '');
  974. };
  975. exports.stringTrimRight = function (string) {
  976. return string.replace(trimEndRegexp, '');
  977. };
  978. exports.copyObject = function(obj) {
  979. var copy = {};
  980. for (var key in obj) {
  981. copy[key] = obj[key];
  982. }
  983. return copy;
  984. };
  985. exports.copyArray = function(array){
  986. var copy = [];
  987. for (var i=0, l=array.length; i<l; i++) {
  988. if (array[i] && typeof array[i] == "object")
  989. copy[i] = this.copyObject( array[i] );
  990. else
  991. copy[i] = array[i];
  992. }
  993. return copy;
  994. };
  995. exports.deepCopy = function (obj) {
  996. if (typeof obj !== "object" || !obj)
  997. return obj;
  998. var cons = obj.constructor;
  999. if (cons === RegExp)
  1000. return obj;
  1001. var copy = cons();
  1002. for (var key in obj) {
  1003. if (typeof obj[key] === "object") {
  1004. copy[key] = exports.deepCopy(obj[key]);
  1005. } else {
  1006. copy[key] = obj[key];
  1007. }
  1008. }
  1009. return copy;
  1010. };
  1011. exports.arrayToMap = function(arr) {
  1012. var map = {};
  1013. for (var i=0; i<arr.length; i++) {
  1014. map[arr[i]] = 1;
  1015. }
  1016. return map;
  1017. };
  1018. exports.createMap = function(props) {
  1019. var map = Object.create(null);
  1020. for (var i in props) {
  1021. map[i] = props[i];
  1022. }
  1023. return map;
  1024. };
  1025. exports.arrayRemove = function(array, value) {
  1026. for (var i = 0; i <= array.length; i++) {
  1027. if (value === array[i]) {
  1028. array.splice(i, 1);
  1029. }
  1030. }
  1031. };
  1032. exports.escapeRegExp = function(str) {
  1033. return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
  1034. };
  1035. exports.escapeHTML = function(str) {
  1036. return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
  1037. };
  1038. exports.getMatchOffsets = function(string, regExp) {
  1039. var matches = [];
  1040. string.replace(regExp, function(str) {
  1041. matches.push({
  1042. offset: arguments[arguments.length-2],
  1043. length: str.length
  1044. });
  1045. });
  1046. return matches;
  1047. };
  1048. exports.deferredCall = function(fcn) {
  1049. var timer = null;
  1050. var callback = function() {
  1051. timer = null;
  1052. fcn();
  1053. };
  1054. var deferred = function(timeout) {
  1055. deferred.cancel();
  1056. timer = setTimeout(callback, timeout || 0);
  1057. return deferred;
  1058. };
  1059. deferred.schedule = deferred;
  1060. deferred.call = function() {
  1061. this.cancel();
  1062. fcn();
  1063. return deferred;
  1064. };
  1065. deferred.cancel = function() {
  1066. clearTimeout(timer);
  1067. timer = null;
  1068. return deferred;
  1069. };
  1070. deferred.isPending = function() {
  1071. return timer;
  1072. };
  1073. return deferred;
  1074. };
  1075. exports.delayedCall = function(fcn, defaultTimeout) {
  1076. var timer = null;
  1077. var callback = function() {
  1078. timer = null;
  1079. fcn();
  1080. };
  1081. var _self = function(timeout) {
  1082. if (timer == null)
  1083. timer = setTimeout(callback, timeout || defaultTimeout);
  1084. };
  1085. _self.delay = function(timeout) {
  1086. timer && clearTimeout(timer);
  1087. timer = setTimeout(callback, timeout || defaultTimeout);
  1088. };
  1089. _self.schedule = _self;
  1090. _self.call = function() {
  1091. this.cancel();
  1092. fcn();
  1093. };
  1094. _self.cancel = function() {
  1095. timer && clearTimeout(timer);
  1096. timer = null;
  1097. };
  1098. _self.isPending = function() {
  1099. return timer;
  1100. };
  1101. return _self;
  1102. };
  1103. });
  1104. ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
  1105. "use strict";
  1106. var Document = require("../document").Document;
  1107. var lang = require("../lib/lang");
  1108. var Mirror = exports.Mirror = function(sender) {
  1109. this.sender = sender;
  1110. var doc = this.doc = new Document("");
  1111. var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
  1112. var _self = this;
  1113. sender.on("change", function(e) {
  1114. doc.applyDeltas(e.data);
  1115. if (_self.$timeout)
  1116. return deferredUpdate.schedule(_self.$timeout);
  1117. _self.onUpdate();
  1118. });
  1119. };
  1120. (function() {
  1121. this.$timeout = 500;
  1122. this.setTimeout = function(timeout) {
  1123. this.$timeout = timeout;
  1124. };
  1125. this.setValue = function(value) {
  1126. this.doc.setValue(value);
  1127. this.deferredUpdate.schedule(this.$timeout);
  1128. };
  1129. this.getValue = function(callbackId) {
  1130. this.sender.callback(this.doc.getValue(), callbackId);
  1131. };
  1132. this.onUpdate = function() {
  1133. };
  1134. this.isPending = function() {
  1135. return this.deferredUpdate.isPending();
  1136. };
  1137. }).call(Mirror.prototype);
  1138. });
  1139. ace.define("ace/mode/coffee/rewriter",["require","exports","module"], function(require, exports, module) {
  1140. var BALANCED_PAIRS, CALL_CLOSERS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref,
  1141. __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
  1142. __slice = [].slice;
  1143. generate = function(tag, value) {
  1144. var tok;
  1145. tok = [tag, value];
  1146. tok.generated = true;
  1147. return tok;
  1148. };
  1149. exports.Rewriter = (function() {
  1150. function Rewriter() {}
  1151. Rewriter.prototype.rewrite = function(tokens) {
  1152. this.tokens = tokens;
  1153. this.removeLeadingNewlines();
  1154. this.closeOpenCalls();
  1155. this.closeOpenIndexes();
  1156. this.normalizeLines();
  1157. this.tagPostfixConditionals();
  1158. this.addImplicitBracesAndParens();
  1159. this.addLocationDataToGeneratedTokens();
  1160. return this.tokens;
  1161. };
  1162. Rewriter.prototype.scanTokens = function(block) {
  1163. var i, token, tokens;
  1164. tokens = this.tokens;
  1165. i = 0;
  1166. while (token = tokens[i]) {
  1167. i += block.call(this, token, i, tokens);
  1168. }
  1169. return true;
  1170. };
  1171. Rewriter.prototype.detectEnd = function(i, condition, action) {
  1172. var levels, token, tokens, _ref, _ref1;
  1173. tokens = this.tokens;
  1174. levels = 0;
  1175. while (token = tokens[i]) {
  1176. if (levels === 0 && condition.call(this, token, i)) {
  1177. return action.call(this, token, i);
  1178. }
  1179. if (!token || levels < 0) {
  1180. return action.call(this, token, i - 1);
  1181. }
  1182. if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
  1183. levels += 1;
  1184. } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) {
  1185. levels -= 1;
  1186. }
  1187. i += 1;
  1188. }
  1189. return i - 1;
  1190. };
  1191. Rewriter.prototype.removeLeadingNewlines = function() {
  1192. var i, tag, _i, _len, _ref;
  1193. _ref = this.tokens;
  1194. for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
  1195. tag = _ref[i][0];
  1196. if (tag !== 'TERMINATOR') {
  1197. break;
  1198. }
  1199. }
  1200. if (i) {
  1201. return this.tokens.splice(0, i);
  1202. }
  1203. };
  1204. Rewriter.prototype.closeOpenCalls = function() {
  1205. var action, condition;
  1206. condition = function(token, i) {
  1207. var _ref;
  1208. return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')';
  1209. };
  1210. action = function(token, i) {
  1211. return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END';
  1212. };
  1213. return this.scanTokens(function(token, i) {
  1214. if (token[0] === 'CALL_START') {
  1215. this.detectEnd(i + 1, condition, action);
  1216. }
  1217. return 1;
  1218. });
  1219. };
  1220. Rewriter.prototype.closeOpenIndexes = function() {
  1221. var action, condition;
  1222. condition = function(token, i) {
  1223. var _ref;
  1224. return (_ref = token[0]) === ']' || _ref === 'INDEX_END';
  1225. };
  1226. action = function(token, i) {
  1227. return token[0] = 'INDEX_END';
  1228. };
  1229. return this.scanTokens(function(token, i) {
  1230. if (token[0] === 'INDEX_START') {
  1231. this.detectEnd(i + 1, condition, action);
  1232. }
  1233. return 1;
  1234. });
  1235. };
  1236. Rewriter.prototype.matchTags = function() {
  1237. var fuzz, i, j, pattern, _i, _ref, _ref1;
  1238. i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
  1239. fuzz = 0;
  1240. for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) {
  1241. while (this.tag(i + j + fuzz) === 'HERECOMMENT') {
  1242. fuzz += 2;
  1243. }
  1244. if (pattern[j] == null) {
  1245. continue;
  1246. }
  1247. if (typeof pattern[j] === 'string') {
  1248. pattern[j] = [pattern[j]];
  1249. }
  1250. if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) {
  1251. return false;
  1252. }
  1253. }
  1254. return true;
  1255. };
  1256. Rewriter.prototype.looksObjectish = function(j) {
  1257. return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':');
  1258. };
  1259. Rewriter.prototype.findTagsBackwards = function(i, tags) {
  1260. var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
  1261. backStack = [];
  1262. while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) {
  1263. if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) {
  1264. backStack.push(this.tag(i));
  1265. }
  1266. if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) {
  1267. backStack.pop();
  1268. }
  1269. i -= 1;
  1270. }
  1271. return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0;
  1272. };
  1273. Rewriter.prototype.addImplicitBracesAndParens = function() {
  1274. var stack;
  1275. stack = [];
  1276. return this.scanTokens(function(token, i, tokens) {
  1277. var endAllImplicitCalls, endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, prevToken, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
  1278. tag = token[0];
  1279. prevTag = (prevToken = i > 0 ? tokens[i - 1] : [])[0];
  1280. nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0];
  1281. stackTop = function() {
  1282. return stack[stack.length - 1];
  1283. };
  1284. startIdx = i;
  1285. forward = function(n) {
  1286. return i - startIdx + n;
  1287. };
  1288. inImplicit = function() {
  1289. var _ref, _ref1;
  1290. return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0;
  1291. };
  1292. inImplicitCall = function() {
  1293. var _ref;
  1294. return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '(';
  1295. };
  1296. inImplicitObject = function() {
  1297. var _ref;
  1298. return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{';
  1299. };
  1300. inImplicitControl = function() {
  1301. var _ref;
  1302. return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL';
  1303. };
  1304. startImplicitCall = function(j) {
  1305. var idx;
  1306. idx = j != null ? j : i;
  1307. stack.push([
  1308. '(', idx, {
  1309. ours: true
  1310. }
  1311. ]);
  1312. tokens.splice(idx, 0, generate('CALL_START', '('));
  1313. if (j == null) {
  1314. return i += 1;
  1315. }
  1316. };
  1317. endImplicitCall = function() {
  1318. stack.pop();
  1319. tokens.splice(i, 0, generate('CALL_END', ')'));
  1320. return i += 1;
  1321. };
  1322. endAllImplicitCalls = function() {
  1323. while (inImplicitCall()) {
  1324. endImplicitCall();
  1325. }
  1326. };
  1327. startImplicitObject = function(j, startsLine) {
  1328. var idx;
  1329. if (startsLine == null) {
  1330. startsLine = true;
  1331. }
  1332. idx = j != null ? j : i;
  1333. stack.push([
  1334. '{', idx, {
  1335. sameLine: true,
  1336. startsLine: startsLine,
  1337. ours: true
  1338. }
  1339. ]);
  1340. tokens.splice(idx, 0, generate('{', generate(new String('{'))));
  1341. if (j == null) {
  1342. return i += 1;
  1343. }
  1344. };
  1345. endImplicitObject = function(j) {
  1346. j = j != null ? j : i;
  1347. stack.pop();
  1348. tokens.splice(j, 0, generate('}', '}'));
  1349. return i += 1;
  1350. };
  1351. if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) {
  1352. stack.push([
  1353. 'CONTROL', i, {
  1354. ours: true
  1355. }
  1356. ]);
  1357. return forward(1);
  1358. }
  1359. if (tag === 'INDENT' && inImplicit()) {
  1360. if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') {
  1361. while (inImplicitCall()) {
  1362. endImplicitCall();
  1363. }
  1364. }
  1365. if (inImplicitControl()) {
  1366. stack.pop();
  1367. }
  1368. stack.push([tag, i]);
  1369. return forward(1);
  1370. }
  1371. if (__indexOf.call(EXPRESSION_START, tag) >= 0) {
  1372. stack.push([tag, i]);
  1373. return forward(1);
  1374. }
  1375. if (__indexOf.call(EXPRESSION_END, tag) >= 0) {
  1376. while (inImplicit()) {
  1377. if (inImplicitCall()) {
  1378. endImplicitCall();
  1379. } else if (inImplicitObject()) {
  1380. endImplicitObject();
  1381. } else {
  1382. stack.pop();
  1383. }
  1384. }
  1385. stack.pop();
  1386. }
  1387. if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) {
  1388. if (tag === '?') {
  1389. tag = token[0] = 'FUNC_EXIST';
  1390. }
  1391. startImplicitCall(i + 1);
  1392. return forward(2);
  1393. }
  1394. if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) {
  1395. startImplicitCall(i + 1);
  1396. stack.push(['INDENT', i + 2]);
  1397. return forward(3);
  1398. }
  1399. if (tag === ':') {
  1400. if (this.tag(i - 2) === '@') {
  1401. s = i - 2;
  1402. } else {
  1403. s = i - 1;
  1404. }
  1405. while (this.tag(s - 2) === 'HERECOMMENT') {
  1406. s -= 2;
  1407. }
  1408. startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine;
  1409. if (stackTop()) {
  1410. _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1];
  1411. if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) {
  1412. return forward(1);
  1413. }
  1414. }
  1415. startImplicitObject(s, !!startsLine);
  1416. return forward(2);
  1417. }
  1418. if (inImplicitCall() && __indexOf.call(CALL_CLOSERS, tag) >= 0) {
  1419. if (prevTag === 'OUTDENT') {
  1420. endImplicitCall();
  1421. return forward(1);
  1422. }
  1423. if (prevToken.newLine) {
  1424. endAllImplicitCalls();
  1425. return forward(1);
  1426. }
  1427. }
  1428. if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) {
  1429. stackTop()[2].sameLine = false;
  1430. }
  1431. if (__indexOf.call(IMPLICIT_END, tag) >= 0) {
  1432. while (inImplicit()) {
  1433. _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine);
  1434. if (inImplicitCall() && prevTag !== ',') {
  1435. endImplicitCall();
  1436. } else if (inImplicitObject() && sameLine && !startsLine) {
  1437. endImplicitObject();
  1438. } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) {
  1439. endImplicitObject();
  1440. } else {
  1441. break;
  1442. }
  1443. }
  1444. }
  1445. if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) {
  1446. offset = nextTag === 'OUTDENT' ? 1 : 0;
  1447. while (inImplicitObject()) {
  1448. endImplicitObject(i + offset);
  1449. }
  1450. }
  1451. return forward(1);
  1452. });
  1453. };
  1454. Rewriter.prototype.addLocationDataToGeneratedTokens = function() {
  1455. return this.scanTokens(function(token, i, tokens) {
  1456. var column, line, nextLocation, prevLocation, _ref, _ref1;
  1457. if (token[2]) {
  1458. return 1;
  1459. }
  1460. if (!(token.generated || token.explicit)) {
  1461. return 1;
  1462. }
  1463. if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) {
  1464. line = nextLocation.first_line, column = nextLocation.first_column;
  1465. } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) {
  1466. line = prevLocation.last_line, column = prevLocation.last_column;
  1467. } else {
  1468. line = column = 0;
  1469. }
  1470. token[2] = {
  1471. first_line: line,
  1472. first_column: column,
  1473. last_line: line,
  1474. last_column: column
  1475. };
  1476. return 1;
  1477. });
  1478. };
  1479. Rewriter.prototype.normalizeLines = function() {
  1480. var action, condition, indent, outdent, starter;
  1481. starter = indent = outdent = null;
  1482. condition = function(token, i) {
  1483. var _ref, _ref1, _ref2, _ref3;
  1484. return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'TERMINATOR' && (_ref1 = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref1) >= 0)) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref2 = token[0]) === 'CATCH' || _ref2 === 'FINALLY') && (starter === '->' || starter === '=>')) || (_ref3 = token[0], __indexOf.call(CALL_CLOSERS, _ref3) >= 0) && this.tokens[i - 1].newLine;
  1485. };
  1486. action = function(token, i) {
  1487. return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);
  1488. };
  1489. return this.scanTokens(function(token, i, tokens) {
  1490. var j, tag, _i, _ref, _ref1, _ref2;
  1491. tag = token[0];
  1492. if (tag === 'TERMINATOR') {
  1493. if (this.tag(i + 1) === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') {
  1494. tokens.splice.apply(tokens, [i, 1].concat(__slice.call(this.indentation())));
  1495. return 1;
  1496. }
  1497. if (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0) {
  1498. tokens.splice(i, 1);
  1499. return 0;
  1500. }
  1501. }
  1502. if (tag === 'CATCH') {
  1503. for (j = _i = 1; _i <= 2; j = ++_i) {
  1504. if (!((_ref1 = this.tag(i + j)) === 'OUTDENT' || _ref1 === 'TERMINATOR' || _ref1 === 'FINALLY')) {
  1505. continue;
  1506. }
  1507. tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation())));
  1508. return 2 + j;
  1509. }
  1510. }
  1511. if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) {
  1512. starter = tag;
  1513. _ref2 = this.indentation(true), indent = _ref2[0], outdent = _ref2[1];
  1514. if (starter === 'THEN') {
  1515. indent.fromThen = true;
  1516. }
  1517. tokens.splice(i + 1, 0, indent);
  1518. this.detectEnd(i + 2, condition, action);
  1519. if (tag === 'THEN') {
  1520. tokens.splice(i, 1);
  1521. }
  1522. return 1;
  1523. }
  1524. return 1;
  1525. });
  1526. };
  1527. Rewriter.prototype.tagPostfixConditionals = function() {
  1528. var action, condition, original;
  1529. original = null;
  1530. condition = function(token, i) {
  1531. var prevTag, tag;
  1532. tag = token[0];
  1533. prevTag = this.tokens[i - 1][0];
  1534. return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0);
  1535. };
  1536. action = function(token, i) {
  1537. if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) {
  1538. return original[0] = 'POST_' + original[0];
  1539. }
  1540. };
  1541. return this.scanTokens(function(token, i) {
  1542. if (token[0] !== 'IF') {
  1543. return 1;
  1544. }
  1545. original = token;
  1546. this.detectEnd(i + 1, condition, action);
  1547. return 1;
  1548. });
  1549. };
  1550. Rewriter.prototype.indentation = function(implicit) {
  1551. var indent, outdent;
  1552. if (implicit == null) {
  1553. implicit = false;
  1554. }
  1555. indent = ['INDENT', 2];
  1556. outdent = ['OUTDENT', 2];
  1557. if (implicit) {
  1558. indent.generated = outdent.generated = true;
  1559. }
  1560. if (!implicit) {
  1561. indent.explicit = outdent.explicit = true;
  1562. }
  1563. return [indent, outdent];
  1564. };
  1565. Rewriter.prototype.generate = generate;
  1566. Rewriter.prototype.tag = function(i) {
  1567. var _ref;
  1568. return (_ref = this.tokens[i]) != null ? _ref[0] : void 0;
  1569. };
  1570. return Rewriter;
  1571. })();
  1572. BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']];
  1573. exports.INVERSES = INVERSES = {};
  1574. EXPRESSION_START = [];
  1575. EXPRESSION_END = [];
  1576. for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) {
  1577. _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];
  1578. EXPRESSION_START.push(INVERSES[rite] = left);
  1579. EXPRESSION_END.push(INVERSES[left] = rite);
  1580. }
  1581. EXPRESSION_CLOSE = ['CATCH', 'THEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END);
  1582. IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];
  1583. IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++'];
  1584. IMPLICIT_UNSPACED_CALL = ['+', '-'];
  1585. IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR'];
  1586. SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN'];
  1587. SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN'];
  1588. LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];
  1589. CALL_CLOSERS = ['.', '?.', '::', '?::'];
  1590. });
  1591. ace.define("ace/mode/coffee/helpers",["require","exports","module"], function(require, exports, module) {
  1592. var buildLocationData, extend, flatten, last, repeat, syntaxErrorToString, _ref;
  1593. exports.starts = function(string, literal, start) {
  1594. return literal === string.substr(start, literal.length);
  1595. };
  1596. exports.ends = function(string, literal, back) {
  1597. var len;
  1598. len = literal.length;
  1599. return literal === string.substr(string.length - len - (back || 0), len);
  1600. };
  1601. exports.repeat = repeat = function(str, n) {
  1602. var res;
  1603. res = '';
  1604. while (n > 0) {
  1605. if (n & 1) {
  1606. res += str;
  1607. }
  1608. n >>>= 1;
  1609. str += str;
  1610. }
  1611. return res;
  1612. };
  1613. exports.compact = function(array) {
  1614. var item, _i, _len, _results;
  1615. _results = [];
  1616. for (_i = 0, _len = array.length; _i < _len; _i++) {
  1617. item = array[_i];
  1618. if (item) {
  1619. _results.push(item);
  1620. }
  1621. }
  1622. return _results;
  1623. };
  1624. exports.count = function(string, substr) {
  1625. var num, pos;
  1626. num = pos = 0;
  1627. if (!substr.length) {
  1628. return 1 / 0;
  1629. }
  1630. while (pos = 1 + string.indexOf(substr, pos)) {
  1631. num++;
  1632. }
  1633. return num;
  1634. };
  1635. exports.merge = function(options, overrides) {
  1636. return extend(extend({}, options), overrides);
  1637. };
  1638. extend = exports.extend = function(object, properties) {
  1639. var key, val;
  1640. for (key in properties) {
  1641. val = properties[key];
  1642. object[key] = val;
  1643. }
  1644. return object;
  1645. };
  1646. exports.flatten = flatten = function(array) {
  1647. var element, flattened, _i, _len;
  1648. flattened = [];
  1649. for (_i = 0, _len = array.length; _i < _len; _i++) {
  1650. element = array[_i];
  1651. if (element instanceof Array) {
  1652. flattened = flattened.concat(flatten(element));
  1653. } else {
  1654. flattened.push(element);
  1655. }
  1656. }
  1657. return flattened;
  1658. };
  1659. exports.del = function(obj, key) {
  1660. var val;
  1661. val = obj[key];
  1662. delete obj[key];
  1663. return val;
  1664. };
  1665. exports.last = last = function(array, back) {
  1666. return array[array.length - (back || 0) - 1];
  1667. };
  1668. exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) {
  1669. var e, _i, _len;
  1670. for (_i = 0, _len = this.length; _i < _len; _i++) {
  1671. e = this[_i];
  1672. if (fn(e)) {
  1673. return true;
  1674. }
  1675. }
  1676. return false;
  1677. };
  1678. exports.invertLiterate = function(code) {
  1679. var line, lines, maybe_code;
  1680. maybe_code = true;
  1681. lines = (function() {
  1682. var _i, _len, _ref1, _results;
  1683. _ref1 = code.split('\n');
  1684. _results = [];
  1685. for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
  1686. line = _ref1[_i];
  1687. if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) {
  1688. _results.push(line);
  1689. } else if (maybe_code = /^\s*$/.test(line)) {
  1690. _results.push(line);
  1691. } else {
  1692. _results.push('# ' + line);
  1693. }
  1694. }
  1695. return _results;
  1696. })();
  1697. return lines.join('\n');
  1698. };
  1699. buildLocationData = function(first, last) {
  1700. if (!last) {
  1701. return first;
  1702. } else {
  1703. return {
  1704. first_line: first.first_line,
  1705. first_column: first.first_column,
  1706. last_line: last.last_line,
  1707. last_column: last.last_column
  1708. };
  1709. }
  1710. };
  1711. exports.addLocationDataFn = function(first, last) {
  1712. return function(obj) {
  1713. if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) {
  1714. obj.updateLocationDataIfMissing(buildLocationData(first, last));
  1715. }
  1716. return obj;
  1717. };
  1718. };
  1719. exports.locationDataToString = function(obj) {
  1720. var locationData;
  1721. if (("2" in obj) && ("first_line" in obj[2])) {
  1722. locationData = obj[2];
  1723. } else if ("first_line" in obj) {
  1724. locationData = obj;
  1725. }
  1726. if (locationData) {
  1727. return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1));
  1728. } else {
  1729. return "No location data";
  1730. }
  1731. };
  1732. exports.baseFileName = function(file, stripExt, useWinPathSep) {
  1733. var parts, pathSep;
  1734. if (stripExt == null) {
  1735. stripExt = false;
  1736. }
  1737. if (useWinPathSep == null) {
  1738. useWinPathSep = false;
  1739. }
  1740. pathSep = useWinPathSep ? /\\|\// : /\//;
  1741. parts = file.split(pathSep);
  1742. file = parts[parts.length - 1];
  1743. if (!(stripExt && file.indexOf('.') >= 0)) {
  1744. return file;
  1745. }
  1746. parts = file.split('.');
  1747. parts.pop();
  1748. if (parts[parts.length - 1] === 'coffee' && parts.length > 1) {
  1749. parts.pop();
  1750. }
  1751. return parts.join('.');
  1752. };
  1753. exports.isCoffee = function(file) {
  1754. return /\.((lit)?coffee|coffee\.md)$/.test(file);
  1755. };
  1756. exports.isLiterate = function(file) {
  1757. return /\.(litcoffee|coffee\.md)$/.test(file);
  1758. };
  1759. exports.throwSyntaxError = function(message, location) {
  1760. var error;
  1761. if (location.last_line == null) {
  1762. location.last_line = location.first_line;
  1763. }
  1764. if (location.last_column == null) {
  1765. location.last_column = location.first_column;
  1766. }
  1767. error = new SyntaxError(message);
  1768. error.location = location;
  1769. error.toString = syntaxErrorToString;
  1770. error.stack = error.toString();
  1771. throw error;
  1772. };
  1773. exports.updateSyntaxError = function(error, code, filename) {
  1774. if (error.toString === syntaxErrorToString) {
  1775. error.code || (error.code = code);
  1776. error.filename || (error.filename = filename);
  1777. error.stack = error.toString();
  1778. }
  1779. return error;
  1780. };
  1781. syntaxErrorToString = function() {
  1782. var codeLine, colorize, colorsEnabled, end, filename, first_column, first_line, last_column, last_line, marker, start, _ref1, _ref2;
  1783. if (!(this.code && this.location)) {
  1784. return Error.prototype.toString.call(this);
  1785. }
  1786. _ref1 = this.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column;
  1787. if (last_line == null) {
  1788. last_line = first_line;
  1789. }
  1790. if (last_column == null) {
  1791. last_column = first_column;
  1792. }
  1793. filename = this.filename || '[stdin]';
  1794. codeLine = this.code.split('\n')[first_line];
  1795. start = first_column;
  1796. end = first_line === last_line ? last_column + 1 : codeLine.length;
  1797. marker = repeat(' ', start) + repeat('^', end - start);
  1798. if (typeof process !== "undefined" && process !== null) {
  1799. colorsEnabled = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS;
  1800. }
  1801. if ((_ref2 = this.colorful) != null ? _ref2 : colorsEnabled) {
  1802. colorize = function(str) {
  1803. return "\x1B[1;31m" + str + "\x1B[0m";
  1804. };
  1805. codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end);
  1806. marker = colorize(marker);
  1807. }
  1808. return "" + filename + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + this.message + "\n" + codeLine + "\n" + marker;
  1809. };
  1810. });
  1811. ace.define("ace/mode/coffee/lexer",["require","exports","module","ace/mode/coffee/rewriter","ace/mode/coffee/helpers"], function(require, exports, module) {
  1812. var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1,
  1813. __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
  1814. _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES;
  1815. _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError;
  1816. exports.Lexer = Lexer = (function() {
  1817. function Lexer() {}
  1818. Lexer.prototype.tokenize = function(code, opts) {
  1819. var consumed, i, tag, _ref2;
  1820. if (opts == null) {
  1821. opts = {};
  1822. }
  1823. this.literate = opts.literate;
  1824. this.indent = 0;
  1825. this.baseIndent = 0;
  1826. this.indebt = 0;
  1827. this.outdebt = 0;
  1828. this.indents = [];
  1829. this.ends = [];
  1830. this.tokens = [];
  1831. this.chunkLine = opts.line || 0;
  1832. this.chunkColumn = opts.column || 0;
  1833. code = this.clean(code);
  1834. i = 0;
  1835. while (this.chunk = code.slice(i)) {
  1836. consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken();
  1837. _ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = _ref2[0], this.chunkColumn = _ref2[1];
  1838. i += consumed;
  1839. }
  1840. this.closeIndentation();
  1841. if (tag = this.ends.pop()) {
  1842. this.error("missing " + tag);
  1843. }
  1844. if (opts.rewrite === false) {
  1845. return this.tokens;
  1846. }
  1847. return (new Rewriter).rewrite(this.tokens);
  1848. };
  1849. Lexer.prototype.clean = function(code) {
  1850. if (code.charCodeAt(0) === BOM) {
  1851. code = code.slice(1);
  1852. }
  1853. code = code.replace(/\r/g, '').replace(TRAILING_SPACES, '');
  1854. if (WHITESPACE.test(code)) {
  1855. code = "\n" + code;
  1856. this.chunkLine--;
  1857. }
  1858. if (this.literate) {
  1859. code = invertLiterate(code);
  1860. }
  1861. return code;
  1862. };
  1863. Lexer.prototype.identifierToken = function() {
  1864. var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4;
  1865. if (!(match = IDENTIFIER.exec(this.chunk))) {
  1866. return 0;
  1867. }
  1868. input = match[0], id = match[1], colon = match[2];
  1869. idLength = id.length;
  1870. poppedToken = void 0;
  1871. if (id === 'own' && this.tag() === 'FOR') {
  1872. this.token('OWN', id);
  1873. return id.length;
  1874. }
  1875. forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::' || _ref2 === '?::') || !prev.spaced && prev[0] === '@');
  1876. tag = 'IDENTIFIER';
  1877. if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) {
  1878. tag = id.toUpperCase();
  1879. if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) {
  1880. tag = 'LEADING_WHEN';
  1881. } else if (tag === 'FOR') {
  1882. this.seenFor = true;
  1883. } else if (tag === 'UNLESS') {
  1884. tag = 'IF';
  1885. } else if (__indexOf.call(UNARY, tag) >= 0) {
  1886. tag = 'UNARY';
  1887. } else if (__indexOf.call(RELATION, tag) >= 0) {
  1888. if (tag !== 'INSTANCEOF' && this.seenFor) {
  1889. tag = 'FOR' + tag;
  1890. this.seenFor = false;
  1891. } else {
  1892. tag = 'RELATION';
  1893. if (this.value() === '!') {
  1894. poppedToken = this.tokens.pop();
  1895. id = '!' + id;
  1896. }
  1897. }
  1898. }
  1899. }
  1900. if (__indexOf.call(JS_FORBIDDEN, id) >= 0) {
  1901. if (forcedIdentifier) {
  1902. tag = 'IDENTIFIER';
  1903. id = new String(id);
  1904. id.reserved = true;
  1905. } else if (__indexOf.call(RESERVED, id) >= 0) {
  1906. this.error("reserved word \"" + id + "\"");
  1907. }
  1908. }
  1909. if (!forcedIdentifier) {
  1910. if (__indexOf.call(COFFEE_ALIASES, id) >= 0) {
  1911. id = COFFEE_ALIAS_MAP[id];
  1912. }
  1913. tag = (function() {
  1914. switch (id) {
  1915. case '!':
  1916. return 'UNARY';
  1917. case '==':
  1918. case '!=':
  1919. return 'COMPARE';
  1920. case '&&':
  1921. case '||':
  1922. return 'LOGIC';
  1923. case 'true':
  1924. case 'false':
  1925. return 'BOOL';
  1926. case 'break':
  1927. case 'continue':
  1928. return 'STATEMENT';
  1929. default:
  1930. return tag;
  1931. }
  1932. })();
  1933. }
  1934. tagToken = this.token(tag, id, 0, idLength);
  1935. if (poppedToken) {
  1936. _ref4 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = _ref4[0], tagToken[2].first_column = _ref4[1];
  1937. }
  1938. if (colon) {
  1939. colonOffset = input.lastIndexOf(':');
  1940. this.token(':', ':', colonOffset, colon.length);
  1941. }
  1942. return input.length;
  1943. };
  1944. Lexer.prototype.numberToken = function() {
  1945. var binaryLiteral, lexedLength, match, number, octalLiteral;
  1946. if (!(match = NUMBER.exec(this.chunk))) {
  1947. return 0;
  1948. }
  1949. number = match[0];
  1950. if (/^0[BOX]/.test(number)) {
  1951. this.error("radix prefix '" + number + "' must be lowercase");
  1952. } else if (/E/.test(number) && !/^0x/.test(number)) {
  1953. this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'");
  1954. } else if (/^0\d*[89]/.test(number)) {
  1955. this.error("decimal literal '" + number + "' must not be prefixed with '0'");
  1956. } else if (/^0\d+/.test(number)) {
  1957. this.error("octal literal '" + number + "' must be prefixed with '0o'");
  1958. }
  1959. lexedLength = number.length;
  1960. if (octalLiteral = /^0o([0-7]+)/.exec(number)) {
  1961. number = '0x' + parseInt(octalLiteral[1], 8).toString(16);
  1962. }
  1963. if (binaryLiteral = /^0b([01]+)/.exec(number)) {
  1964. number = '0x' + parseInt(binaryLiteral[1], 2).toString(16);
  1965. }
  1966. this.token('NUMBER', number, 0, lexedLength);
  1967. return lexedLength;
  1968. };
  1969. Lexer.prototype.stringToken = function() {
  1970. var octalEsc, quote, string, trimmed;
  1971. switch (quote = this.chunk.charAt(0)) {
  1972. case "'":
  1973. string = SIMPLESTR.exec(this.chunk)[0];
  1974. break;
  1975. case '"':
  1976. string = this.balancedString(this.chunk, '"');
  1977. }
  1978. if (!string) {
  1979. return 0;
  1980. }
  1981. trimmed = this.removeNewlines(string.slice(1, -1));
  1982. if (quote === '"' && 0 < string.indexOf('#{', 1)) {
  1983. this.interpolateString(trimmed, {
  1984. strOffset: 1,
  1985. lexedLength: string.length
  1986. });
  1987. } else {
  1988. this.token('STRING', quote + this.escapeLines(trimmed) + quote, 0, string.length);
  1989. }
  1990. if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) {
  1991. this.error("octal escape sequences " + string + " are not allowed");
  1992. }
  1993. return string.length;
  1994. };
  1995. Lexer.prototype.heredocToken = function() {
  1996. var doc, heredoc, match, quote;
  1997. if (!(match = HEREDOC.exec(this.chunk))) {
  1998. return 0;
  1999. }
  2000. heredoc = match[0];
  2001. quote = heredoc.charAt(0);
  2002. doc = this.sanitizeHeredoc(match[2], {
  2003. quote: quote,
  2004. indent: null
  2005. });
  2006. if (quote === '"' && 0 <= doc.indexOf('#{')) {
  2007. this.interpolateString(doc, {
  2008. heredoc: true,
  2009. strOffset: 3,
  2010. lexedLength: heredoc.length
  2011. });
  2012. } else {
  2013. this.token('STRING', this.makeString(doc, quote, true), 0, heredoc.length);
  2014. }
  2015. return heredoc.length;
  2016. };
  2017. Lexer.prototype.commentToken = function() {
  2018. var comment, here, match;
  2019. if (!(match = this.chunk.match(COMMENT))) {
  2020. return 0;
  2021. }
  2022. comment = match[0], here = match[1];
  2023. if (here) {
  2024. this.token('HERECOMMENT', this.sanitizeHeredoc(here, {
  2025. herecomment: true,
  2026. indent: repeat(' ', this.indent)
  2027. }), 0, comment.length);
  2028. }
  2029. return comment.length;
  2030. };
  2031. Lexer.prototype.jsToken = function() {
  2032. var match, script;
  2033. if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) {
  2034. return 0;
  2035. }
  2036. this.token('JS', (script = match[0]).slice(1, -1), 0, script.length);
  2037. return script.length;
  2038. };
  2039. Lexer.prototype.regexToken = function() {
  2040. var flags, length, match, prev, regex, _ref2, _ref3;
  2041. if (this.chunk.charAt(0) !== '/') {
  2042. return 0;
  2043. }
  2044. if (match = HEREGEX.exec(this.chunk)) {
  2045. length = this.heregexToken(match);
  2046. return length;
  2047. }
  2048. prev = last(this.tokens);
  2049. if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) {
  2050. return 0;
  2051. }
  2052. if (!(match = REGEX.exec(this.chunk))) {
  2053. return 0;
  2054. }
  2055. _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2];
  2056. if (regex.slice(0, 2) === '/*') {
  2057. this.error('regular expressions cannot begin with `*`');
  2058. }
  2059. if (regex === '//') {
  2060. regex = '/(?:)/';
  2061. }
  2062. this.token('REGEX', "" + regex + flags, 0, match.length);
  2063. return match.length;
  2064. };
  2065. Lexer.prototype.heregexToken = function(match) {
  2066. var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4;
  2067. heregex = match[0], body = match[1], flags = match[2];
  2068. if (0 > body.indexOf('#{')) {
  2069. re = this.escapeLines(body.replace(HEREGEX_OMIT, '$1$2').replace(/\//g, '\\/'), true);
  2070. if (re.match(/^\*/)) {
  2071. this.error('regular expressions cannot begin with `*`');
  2072. }
  2073. this.token('REGEX', "/" + (re || '(?:)') + "/" + flags, 0, heregex.length);
  2074. return heregex.length;
  2075. }
  2076. this.token('IDENTIFIER', 'RegExp', 0, 0);
  2077. this.token('CALL_START', '(', 0, 0);
  2078. tokens = [];
  2079. _ref2 = this.interpolateString(body, {
  2080. regex: true
  2081. });
  2082. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  2083. token = _ref2[_i];
  2084. tag = token[0], value = token[1];
  2085. if (tag === 'TOKENS') {
  2086. tokens.push.apply(tokens, value);
  2087. } else if (tag === 'NEOSTRING') {
  2088. if (!(value = value.replace(HEREGEX_OMIT, '$1$2'))) {
  2089. continue;
  2090. }
  2091. value = value.replace(/\\/g, '\\\\');
  2092. token[0] = 'STRING';
  2093. token[1] = this.makeString(value, '"', true);
  2094. tokens.push(token);
  2095. } else {
  2096. this.error("Unexpected " + tag);
  2097. }
  2098. prev = last(this.tokens);
  2099. plusToken = ['+', '+'];
  2100. plusToken[2] = prev[2];
  2101. tokens.push(plusToken);
  2102. }
  2103. tokens.pop();
  2104. if (((_ref3 = tokens[0]) != null ? _ref3[0] : void 0) !== 'STRING') {
  2105. this.token('STRING', '""', 0, 0);
  2106. this.token('+', '+', 0, 0);
  2107. }
  2108. (_ref4 = this.tokens).push.apply(_ref4, tokens);
  2109. if (flags) {
  2110. flagsOffset = heregex.lastIndexOf(flags);
  2111. this.token(',', ',', flagsOffset, 0);
  2112. this.token('STRING', '"' + flags + '"', flagsOffset, flags.length);
  2113. }
  2114. this.token(')', ')', heregex.length - 1, 0);
  2115. return heregex.length;
  2116. };
  2117. Lexer.prototype.lineToken = function() {
  2118. var diff, indent, match, noNewlines, size;
  2119. if (!(match = MULTI_DENT.exec(this.chunk))) {
  2120. return 0;
  2121. }
  2122. indent = match[0];
  2123. this.seenFor = false;
  2124. size = indent.length - 1 - indent.lastIndexOf('\n');
  2125. noNewlines = this.unfinished();
  2126. if (size - this.indebt === this.indent) {
  2127. if (noNewlines) {
  2128. this.suppressNewlines();
  2129. } else {
  2130. this.newlineToken(0);
  2131. }
  2132. return indent.length;
  2133. }
  2134. if (size > this.indent) {
  2135. if (noNewlines) {
  2136. this.indebt = size - this.indent;
  2137. this.suppressNewlines();
  2138. return indent.length;
  2139. }
  2140. if (!this.tokens.length) {
  2141. this.baseIndent = this.indent = size;
  2142. return indent.length;
  2143. }
  2144. diff = size - this.indent + this.outdebt;
  2145. this.token('INDENT', diff, indent.length - size, size);
  2146. this.indents.push(diff);
  2147. this.ends.push('OUTDENT');
  2148. this.outdebt = this.indebt = 0;
  2149. } else if (size < this.baseIndent) {
  2150. this.error('missing indentation', indent.length);
  2151. } else {
  2152. this.indebt = 0;
  2153. this.outdentToken(this.indent - size, noNewlines, indent.length);
  2154. }
  2155. this.indent = size;
  2156. return indent.length;
  2157. };
  2158. Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) {
  2159. var dent, len;
  2160. while (moveOut > 0) {
  2161. len = this.indents.length - 1;
  2162. if (this.indents[len] === void 0) {
  2163. moveOut = 0;
  2164. } else if (this.indents[len] === this.outdebt) {
  2165. moveOut -= this.outdebt;
  2166. this.outdebt = 0;
  2167. } else if (this.indents[len] < this.outdebt) {
  2168. this.outdebt -= this.indents[len];
  2169. moveOut -= this.indents[len];
  2170. } else {
  2171. dent = this.indents.pop() + this.outdebt;
  2172. moveOut -= dent;
  2173. this.outdebt = 0;
  2174. this.pair('OUTDENT');
  2175. this.token('OUTDENT', dent, 0, outdentLength);
  2176. }
  2177. }
  2178. if (dent) {
  2179. this.outdebt -= moveOut;
  2180. }
  2181. while (this.value() === ';') {
  2182. this.tokens.pop();
  2183. }
  2184. if (!(this.tag() === 'TERMINATOR' || noNewlines)) {
  2185. this.token('TERMINATOR', '\n', outdentLength, 0);
  2186. }
  2187. return this;
  2188. };
  2189. Lexer.prototype.whitespaceToken = function() {
  2190. var match, nline, prev;
  2191. if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) {
  2192. return 0;
  2193. }
  2194. prev = last(this.tokens);
  2195. if (prev) {
  2196. prev[match ? 'spaced' : 'newLine'] = true;
  2197. }
  2198. if (match) {
  2199. return match[0].length;
  2200. } else {
  2201. return 0;
  2202. }
  2203. };
  2204. Lexer.prototype.newlineToken = function(offset) {
  2205. while (this.value() === ';') {
  2206. this.tokens.pop();
  2207. }
  2208. if (this.tag() !== 'TERMINATOR') {
  2209. this.token('TERMINATOR', '\n', offset, 0);
  2210. }
  2211. return this;
  2212. };
  2213. Lexer.prototype.suppressNewlines = function() {
  2214. if (this.value() === '\\') {
  2215. this.tokens.pop();
  2216. }
  2217. return this;
  2218. };
  2219. Lexer.prototype.literalToken = function() {
  2220. var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5;
  2221. if (match = OPERATOR.exec(this.chunk)) {
  2222. value = match[0];
  2223. if (CODE.test(value)) {
  2224. this.tagParameters();
  2225. }
  2226. } else {
  2227. value = this.chunk.charAt(0);
  2228. }
  2229. tag = value;
  2230. prev = last(this.tokens);
  2231. if (value === '=' && prev) {
  2232. if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) {
  2233. this.error("reserved word \"" + (this.value()) + "\" can't be assigned");
  2234. }
  2235. if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') {
  2236. prev[0] = 'COMPOUND_ASSIGN';
  2237. prev[1] += '=';
  2238. return value.length;
  2239. }
  2240. }
  2241. if (value === ';') {
  2242. this.seenFor = false;
  2243. tag = 'TERMINATOR';
  2244. } else if (__indexOf.call(MATH, value) >= 0) {
  2245. tag = 'MATH';
  2246. } else if (__indexOf.call(COMPARE, value) >= 0) {
  2247. tag = 'COMPARE';
  2248. } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) {
  2249. tag = 'COMPOUND_ASSIGN';
  2250. } else if (__indexOf.call(UNARY, value) >= 0) {
  2251. tag = 'UNARY';
  2252. } else if (__indexOf.call(SHIFT, value) >= 0) {
  2253. tag = 'SHIFT';
  2254. } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) {
  2255. tag = 'LOGIC';
  2256. } else if (prev && !prev.spaced) {
  2257. if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) {
  2258. if (prev[0] === '?') {
  2259. prev[0] = 'FUNC_EXIST';
  2260. }
  2261. tag = 'CALL_START';
  2262. } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) {
  2263. tag = 'INDEX_START';
  2264. switch (prev[0]) {
  2265. case '?':
  2266. prev[0] = 'INDEX_SOAK';
  2267. }
  2268. }
  2269. }
  2270. switch (value) {
  2271. case '(':
  2272. case '{':
  2273. case '[':
  2274. this.ends.push(INVERSES[value]);
  2275. break;
  2276. case ')':
  2277. case '}':
  2278. case ']':
  2279. this.pair(value);
  2280. }
  2281. this.token(tag, value);
  2282. return value.length;
  2283. };
  2284. Lexer.prototype.sanitizeHeredoc = function(doc, options) {
  2285. var attempt, herecomment, indent, match, _ref2;
  2286. indent = options.indent, herecomment = options.herecomment;
  2287. if (herecomment) {
  2288. if (HEREDOC_ILLEGAL.test(doc)) {
  2289. this.error("block comment cannot contain \"*/\", starting");
  2290. }
  2291. if (doc.indexOf('\n') < 0) {
  2292. return doc;
  2293. }
  2294. } else {
  2295. while (match = HEREDOC_INDENT.exec(doc)) {
  2296. attempt = match[1];
  2297. if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) {
  2298. indent = attempt;
  2299. }
  2300. }
  2301. }
  2302. if (indent) {
  2303. doc = doc.replace(RegExp("\\n" + indent, "g"), '\n');
  2304. }
  2305. if (!herecomment) {
  2306. doc = doc.replace(/^\n/, '');
  2307. }
  2308. return doc;
  2309. };
  2310. Lexer.prototype.tagParameters = function() {
  2311. var i, stack, tok, tokens;
  2312. if (this.tag() !== ')') {
  2313. return this;
  2314. }
  2315. stack = [];
  2316. tokens = this.tokens;
  2317. i = tokens.length;
  2318. tokens[--i][0] = 'PARAM_END';
  2319. while (tok = tokens[--i]) {
  2320. switch (tok[0]) {
  2321. case ')':
  2322. stack.push(tok);
  2323. break;
  2324. case '(':
  2325. case 'CALL_START':
  2326. if (stack.length) {
  2327. stack.pop();
  2328. } else if (tok[0] === '(') {
  2329. tok[0] = 'PARAM_START';
  2330. return this;
  2331. } else {
  2332. return this;
  2333. }
  2334. }
  2335. }
  2336. return this;
  2337. };
  2338. Lexer.prototype.closeIndentation = function() {
  2339. return this.outdentToken(this.indent);
  2340. };
  2341. Lexer.prototype.balancedString = function(str, end) {
  2342. var continueCount, i, letter, match, prev, stack, _i, _ref2;
  2343. continueCount = 0;
  2344. stack = [end];
  2345. for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) {
  2346. if (continueCount) {
  2347. --continueCount;
  2348. continue;
  2349. }
  2350. switch (letter = str.charAt(i)) {
  2351. case '\\':
  2352. ++continueCount;
  2353. continue;
  2354. case end:
  2355. stack.pop();
  2356. if (!stack.length) {
  2357. return str.slice(0, +i + 1 || 9e9);
  2358. }
  2359. end = stack[stack.length - 1];
  2360. continue;
  2361. }
  2362. if (end === '}' && (letter === '"' || letter === "'")) {
  2363. stack.push(end = letter);
  2364. } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) {
  2365. continueCount += match[0].length - 1;
  2366. } else if (end === '}' && letter === '{') {
  2367. stack.push(end = '}');
  2368. } else if (end === '"' && prev === '#' && letter === '{') {
  2369. stack.push(end = '}');
  2370. }
  2371. prev = letter;
  2372. }
  2373. return this.error("missing " + (stack.pop()) + ", starting");
  2374. };
  2375. Lexer.prototype.interpolateString = function(str, options) {
  2376. var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4;
  2377. if (options == null) {
  2378. options = {};
  2379. }
  2380. heredoc = options.heredoc, regex = options.regex, offsetInChunk = options.offsetInChunk, strOffset = options.strOffset, lexedLength = options.lexedLength;
  2381. offsetInChunk = offsetInChunk || 0;
  2382. strOffset = strOffset || 0;
  2383. lexedLength = lexedLength || str.length;
  2384. tokens = [];
  2385. pi = 0;
  2386. i = -1;
  2387. while (letter = str.charAt(i += 1)) {
  2388. if (letter === '\\') {
  2389. i += 1;
  2390. continue;
  2391. }
  2392. if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) {
  2393. continue;
  2394. }
  2395. if (pi < i) {
  2396. tokens.push(this.makeToken('NEOSTRING', str.slice(pi, i), strOffset + pi));
  2397. }
  2398. inner = expr.slice(1, -1);
  2399. if (inner.length) {
  2400. _ref2 = this.getLineAndColumnFromChunk(strOffset + i + 1), line = _ref2[0], column = _ref2[1];
  2401. nested = new Lexer().tokenize(inner, {
  2402. line: line,
  2403. column: column,
  2404. rewrite: false
  2405. });
  2406. popped = nested.pop();
  2407. if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') {
  2408. popped = nested.shift();
  2409. }
  2410. if (len = nested.length) {
  2411. if (len > 1) {
  2412. nested.unshift(this.makeToken('(', '(', strOffset + i + 1, 0));
  2413. nested.push(this.makeToken(')', ')', strOffset + i + 1 + inner.length, 0));
  2414. }
  2415. tokens.push(['TOKENS', nested]);
  2416. }
  2417. }
  2418. i += expr.length;
  2419. pi = i + 1;
  2420. }
  2421. if ((i > pi && pi < str.length)) {
  2422. tokens.push(this.makeToken('NEOSTRING', str.slice(pi), strOffset + pi));
  2423. }
  2424. if (regex) {
  2425. return tokens;
  2426. }
  2427. if (!tokens.length) {
  2428. return this.token('STRING', '""', offsetInChunk, lexedLength);
  2429. }
  2430. if (tokens[0][0] !== 'NEOSTRING') {
  2431. tokens.unshift(this.makeToken('NEOSTRING', '', offsetInChunk));
  2432. }
  2433. if (interpolated = tokens.length > 1) {
  2434. this.token('(', '(', offsetInChunk, 0);
  2435. }
  2436. for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) {
  2437. token = tokens[i];
  2438. tag = token[0], value = token[1];
  2439. if (i) {
  2440. if (i) {
  2441. plusToken = this.token('+', '+');
  2442. }
  2443. locationToken = tag === 'TOKENS' ? value[0] : token;
  2444. plusToken[2] = {
  2445. first_line: locationToken[2].first_line,
  2446. first_column: locationToken[2].first_column,
  2447. last_line: locationToken[2].first_line,
  2448. last_column: locationToken[2].first_column
  2449. };
  2450. }
  2451. if (tag === 'TOKENS') {
  2452. (_ref4 = this.tokens).push.apply(_ref4, value);
  2453. } else if (tag === 'NEOSTRING') {
  2454. token[0] = 'STRING';
  2455. token[1] = this.makeString(value, '"', heredoc);
  2456. this.tokens.push(token);
  2457. } else {
  2458. this.error("Unexpected " + tag);
  2459. }
  2460. }
  2461. if (interpolated) {
  2462. rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0);
  2463. rparen.stringEnd = true;
  2464. this.tokens.push(rparen);
  2465. }
  2466. return tokens;
  2467. };
  2468. Lexer.prototype.pair = function(tag) {
  2469. var size, wanted;
  2470. if (tag !== (wanted = last(this.ends))) {
  2471. if ('OUTDENT' !== wanted) {
  2472. this.error("unmatched " + tag);
  2473. }
  2474. this.indent -= size = last(this.indents);
  2475. this.outdentToken(size, true);
  2476. return this.pair(tag);
  2477. }
  2478. return this.ends.pop();
  2479. };
  2480. Lexer.prototype.getLineAndColumnFromChunk = function(offset) {
  2481. var column, lineCount, lines, string;
  2482. if (offset === 0) {
  2483. return [this.chunkLine, this.chunkColumn];
  2484. }
  2485. if (offset >= this.chunk.length) {
  2486. string = this.chunk;
  2487. } else {
  2488. string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9);
  2489. }
  2490. lineCount = count(string, '\n');
  2491. column = this.chunkColumn;
  2492. if (lineCount > 0) {
  2493. lines = string.split('\n');
  2494. column = last(lines).length;
  2495. } else {
  2496. column += string.length;
  2497. }
  2498. return [this.chunkLine + lineCount, column];
  2499. };
  2500. Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) {
  2501. var lastCharacter, locationData, token, _ref2, _ref3;
  2502. if (offsetInChunk == null) {
  2503. offsetInChunk = 0;
  2504. }
  2505. if (length == null) {
  2506. length = value.length;
  2507. }
  2508. locationData = {};
  2509. _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1];
  2510. lastCharacter = Math.max(0, length - 1);
  2511. _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1];
  2512. token = [tag, value, locationData];
  2513. return token;
  2514. };
  2515. Lexer.prototype.token = function(tag, value, offsetInChunk, length) {
  2516. var token;
  2517. token = this.makeToken(tag, value, offsetInChunk, length);
  2518. this.tokens.push(token);
  2519. return token;
  2520. };
  2521. Lexer.prototype.tag = function(index, tag) {
  2522. var tok;
  2523. return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]);
  2524. };
  2525. Lexer.prototype.value = function(index, val) {
  2526. var tok;
  2527. return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]);
  2528. };
  2529. Lexer.prototype.unfinished = function() {
  2530. var _ref2;
  2531. return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS');
  2532. };
  2533. Lexer.prototype.removeNewlines = function(str) {
  2534. return str.replace(/^\s*\n\s*/, '').replace(/([^\\]|\\\\)\s*\n\s*$/, '$1');
  2535. };
  2536. Lexer.prototype.escapeLines = function(str, heredoc) {
  2537. str = str.replace(/\\[^\S\n]*(\n|\\)\s*/g, function(escaped, character) {
  2538. if (character === '\n') {
  2539. return '';
  2540. } else {
  2541. return escaped;
  2542. }
  2543. });
  2544. if (heredoc) {
  2545. return str.replace(MULTILINER, '\\n');
  2546. } else {
  2547. return str.replace(/\s*\n\s*/g, ' ');
  2548. }
  2549. };
  2550. Lexer.prototype.makeString = function(body, quote, heredoc) {
  2551. if (!body) {
  2552. return quote + quote;
  2553. }
  2554. body = body.replace(RegExp("\\\\(" + quote + "|\\\\)", "g"), function(match, contents) {
  2555. if (contents === quote) {
  2556. return contents;
  2557. } else {
  2558. return match;
  2559. }
  2560. });
  2561. body = body.replace(RegExp("" + quote, "g"), '\\$&');
  2562. return quote + this.escapeLines(body, heredoc) + quote;
  2563. };
  2564. Lexer.prototype.error = function(message, offset) {
  2565. var first_column, first_line, _ref2;
  2566. if (offset == null) {
  2567. offset = 0;
  2568. }
  2569. _ref2 = this.getLineAndColumnFromChunk(offset), first_line = _ref2[0], first_column = _ref2[1];
  2570. return throwSyntaxError(message, {
  2571. first_line: first_line,
  2572. first_column: first_column
  2573. });
  2574. };
  2575. return Lexer;
  2576. })();
  2577. JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super'];
  2578. COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when'];
  2579. COFFEE_ALIAS_MAP = {
  2580. and: '&&',
  2581. or: '||',
  2582. is: '==',
  2583. isnt: '!=',
  2584. not: '!',
  2585. yes: 'true',
  2586. no: 'false',
  2587. on: 'true',
  2588. off: 'false'
  2589. };
  2590. COFFEE_ALIASES = (function() {
  2591. var _results;
  2592. _results = [];
  2593. for (key in COFFEE_ALIAS_MAP) {
  2594. _results.push(key);
  2595. }
  2596. return _results;
  2597. })();
  2598. COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES);
  2599. RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield'];
  2600. STRICT_PROSCRIBED = ['arguments', 'eval'];
  2601. JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED);
  2602. exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED);
  2603. exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED;
  2604. BOM = 65279;
  2605. IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/;
  2606. NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;
  2607. HEREDOC = /^("""|''')((?:\\[\s\S]|[^\\])*?)(?:\n[^\n\S]*)?\1/;
  2608. OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/;
  2609. WHITESPACE = /^[^\n\S]+/;
  2610. COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/;
  2611. CODE = /^[-=]>/;
  2612. MULTI_DENT = /^(?:\n[^\n\S]*)+/;
  2613. SIMPLESTR = /^'[^\\']*(?:\\[\s\S][^\\']*)*'/;
  2614. JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/;
  2615. REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/;
  2616. HEREGEX = /^\/{3}((?:\\?[\s\S])+?)\/{3}([imgy]{0,4})(?!\w)/;
  2617. HEREGEX_OMIT = /((?:\\\\)+)|\\(\s|\/)|\s+(?:#.*)?/g;
  2618. MULTILINER = /\n/g;
  2619. HEREDOC_INDENT = /\n+([^\n\S]*)/g;
  2620. HEREDOC_ILLEGAL = /\*\//;
  2621. LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/;
  2622. TRAILING_SPACES = /\s+$/;
  2623. COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='];
  2624. UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO'];
  2625. LOGIC = ['&&', '||', '&', '|', '^'];
  2626. SHIFT = ['<<', '>>', '>>>'];
  2627. COMPARE = ['==', '!=', '<', '>', '<=', '>='];
  2628. MATH = ['*', '/', '%'];
  2629. RELATION = ['IN', 'OF', 'INSTANCEOF'];
  2630. BOOL = ['TRUE', 'FALSE'];
  2631. NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--'];
  2632. NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']');
  2633. CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER'];
  2634. INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED');
  2635. LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR'];
  2636. });
  2637. ace.define("ace/mode/coffee/parser",["require","exports","module"], function(require, exports, module) {
  2638. var parser = {trace: function trace() { },
  2639. yy: {},
  2640. symbols_: {"error":2,"Root":3,"Body":4,"Line":5,"TERMINATOR":6,"Expression":7,"Statement":8,"Return":9,"Comment":10,"STATEMENT":11,"Value":12,"Invocation":13,"Code":14,"Operation":15,"Assign":16,"If":17,"Try":18,"While":19,"For":20,"Switch":21,"Class":22,"Throw":23,"Block":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1},
  2641. terminals_: {2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"},
  2642. productions_: [0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[16,3],[16,4],[16,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[9,2],[9,1],[10,1],[14,5],[14,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[12,1],[12,1],[12,1],[12,1],[12,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[18,2],[18,3],[18,4],[18,5],[97,3],[97,3],[97,2],[23,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[19,2],[19,2],[19,2],[19,1],[107,2],[107,2],[20,2],[20,2],[20,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[21,5],[21,7],[21,4],[21,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]],
  2643. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
  2644. var $0 = $$.length - 1;
  2645. switch (yystate) {
  2646. case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block);
  2647. break;
  2648. case 2:return this.$ = $$[$0];
  2649. break;
  2650. case 3:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]]));
  2651. break;
  2652. case 4:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0]));
  2653. break;
  2654. case 5:this.$ = $$[$0-1];
  2655. break;
  2656. case 6:this.$ = $$[$0];
  2657. break;
  2658. case 7:this.$ = $$[$0];
  2659. break;
  2660. case 8:this.$ = $$[$0];
  2661. break;
  2662. case 9:this.$ = $$[$0];
  2663. break;
  2664. case 10:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2665. break;
  2666. case 11:this.$ = $$[$0];
  2667. break;
  2668. case 12:this.$ = $$[$0];
  2669. break;
  2670. case 13:this.$ = $$[$0];
  2671. break;
  2672. case 14:this.$ = $$[$0];
  2673. break;
  2674. case 15:this.$ = $$[$0];
  2675. break;
  2676. case 16:this.$ = $$[$0];
  2677. break;
  2678. case 17:this.$ = $$[$0];
  2679. break;
  2680. case 18:this.$ = $$[$0];
  2681. break;
  2682. case 19:this.$ = $$[$0];
  2683. break;
  2684. case 20:this.$ = $$[$0];
  2685. break;
  2686. case 21:this.$ = $$[$0];
  2687. break;
  2688. case 22:this.$ = $$[$0];
  2689. break;
  2690. case 23:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block);
  2691. break;
  2692. case 24:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
  2693. break;
  2694. case 25:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2695. break;
  2696. case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2697. break;
  2698. case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2699. break;
  2700. case 28:this.$ = $$[$0];
  2701. break;
  2702. case 29:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2703. break;
  2704. case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2705. break;
  2706. case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
  2707. break;
  2708. case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined);
  2709. break;
  2710. case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null);
  2711. break;
  2712. case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0]));
  2713. break;
  2714. case 35:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0]));
  2715. break;
  2716. case 36:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0]));
  2717. break;
  2718. case 37:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1]));
  2719. break;
  2720. case 38:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2721. break;
  2722. case 39:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object'));
  2723. break;
  2724. case 40:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object'));
  2725. break;
  2726. case 41:this.$ = $$[$0];
  2727. break;
  2728. case 42:this.$ = $$[$0];
  2729. break;
  2730. case 43:this.$ = $$[$0];
  2731. break;
  2732. case 44:this.$ = $$[$0];
  2733. break;
  2734. case 45:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0]));
  2735. break;
  2736. case 46:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return);
  2737. break;
  2738. case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0]));
  2739. break;
  2740. case 48:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1]));
  2741. break;
  2742. case 49:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1]));
  2743. break;
  2744. case 50:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func');
  2745. break;
  2746. case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc');
  2747. break;
  2748. case 52:this.$ = $$[$0];
  2749. break;
  2750. case 53:this.$ = $$[$0];
  2751. break;
  2752. case 54:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
  2753. break;
  2754. case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
  2755. break;
  2756. case 56:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
  2757. break;
  2758. case 57:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
  2759. break;
  2760. case 58:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
  2761. break;
  2762. case 59:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0]));
  2763. break;
  2764. case 60:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true));
  2765. break;
  2766. case 61:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0]));
  2767. break;
  2768. case 62:this.$ = $$[$0];
  2769. break;
  2770. case 63:this.$ = $$[$0];
  2771. break;
  2772. case 64:this.$ = $$[$0];
  2773. break;
  2774. case 65:this.$ = $$[$0];
  2775. break;
  2776. case 66:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1]));
  2777. break;
  2778. case 67:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2779. break;
  2780. case 68:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0]));
  2781. break;
  2782. case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0])));
  2783. break;
  2784. case 70:this.$ = $$[$0];
  2785. break;
  2786. case 71:this.$ = $$[$0];
  2787. break;
  2788. case 72:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2789. break;
  2790. case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2791. break;
  2792. case 74:this.$ = $$[$0];
  2793. break;
  2794. case 75:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2795. break;
  2796. case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2797. break;
  2798. case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2799. break;
  2800. case 78:this.$ = $$[$0];
  2801. break;
  2802. case 79:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0]));
  2803. break;
  2804. case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak'));
  2805. break;
  2806. case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
  2807. break;
  2808. case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
  2809. break;
  2810. case 83:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype')));
  2811. break;
  2812. case 84:this.$ = $$[$0];
  2813. break;
  2814. case 85:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
  2815. break;
  2816. case 86:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], {
  2817. soak: true
  2818. }));
  2819. break;
  2820. case 87:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0]));
  2821. break;
  2822. case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0]));
  2823. break;
  2824. case 89:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated));
  2825. break;
  2826. case 90:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
  2827. break;
  2828. case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
  2829. break;
  2830. case 92:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
  2831. break;
  2832. case 93:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
  2833. break;
  2834. case 94:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
  2835. break;
  2836. case 95:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class);
  2837. break;
  2838. case 96:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0]));
  2839. break;
  2840. case 97:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0]));
  2841. break;
  2842. case 98:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0]));
  2843. break;
  2844. case 99:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0]));
  2845. break;
  2846. case 100:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0]));
  2847. break;
  2848. case 101:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0]));
  2849. break;
  2850. case 102:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0]));
  2851. break;
  2852. case 103:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
  2853. break;
  2854. case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
  2855. break;
  2856. case 105:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))]));
  2857. break;
  2858. case 106:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0]));
  2859. break;
  2860. case 107:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false);
  2861. break;
  2862. case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true);
  2863. break;
  2864. case 109:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]);
  2865. break;
  2866. case 110:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
  2867. break;
  2868. case 111:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
  2869. break;
  2870. case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
  2871. break;
  2872. case 113:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this'));
  2873. break;
  2874. case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([]));
  2875. break;
  2876. case 115:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2]));
  2877. break;
  2878. case 116:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive');
  2879. break;
  2880. case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive');
  2881. break;
  2882. case 118:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2]));
  2883. break;
  2884. case 119:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1]));
  2885. break;
  2886. case 120:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0]));
  2887. break;
  2888. case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1]));
  2889. break;
  2890. case 122:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0]));
  2891. break;
  2892. case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
  2893. break;
  2894. case 124:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
  2895. break;
  2896. case 125:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
  2897. break;
  2898. case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
  2899. break;
  2900. case 127:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
  2901. break;
  2902. case 128:this.$ = $$[$0];
  2903. break;
  2904. case 129:this.$ = $$[$0];
  2905. break;
  2906. case 130:this.$ = $$[$0];
  2907. break;
  2908. case 131:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0]));
  2909. break;
  2910. case 132:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0]));
  2911. break;
  2912. case 133:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1]));
  2913. break;
  2914. case 134:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0]));
  2915. break;
  2916. case 135:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]));
  2917. break;
  2918. case 136:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]);
  2919. break;
  2920. case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]);
  2921. break;
  2922. case 138:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]);
  2923. break;
  2924. case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0]));
  2925. break;
  2926. case 140:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1]));
  2927. break;
  2928. case 141:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2]));
  2929. break;
  2930. case 142:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0]));
  2931. break;
  2932. case 143:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
  2933. guard: $$[$0]
  2934. }));
  2935. break;
  2936. case 144:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], {
  2937. invert: true
  2938. }));
  2939. break;
  2940. case 145:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
  2941. invert: true,
  2942. guard: $$[$0]
  2943. }));
  2944. break;
  2945. case 146:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0]));
  2946. break;
  2947. case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
  2948. break;
  2949. case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
  2950. break;
  2951. case 149:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]);
  2952. break;
  2953. case 150:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0]));
  2954. break;
  2955. case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]]))));
  2956. break;
  2957. case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
  2958. break;
  2959. case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
  2960. break;
  2961. case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1]));
  2962. break;
  2963. case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
  2964. source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0]))
  2965. });
  2966. break;
  2967. case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () {
  2968. $$[$0].own = $$[$0-1].own;
  2969. $$[$0].name = $$[$0-1][0];
  2970. $$[$0].index = $$[$0-1][1];
  2971. return $$[$0];
  2972. }()));
  2973. break;
  2974. case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]);
  2975. break;
  2976. case 158:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
  2977. $$[$0].own = true;
  2978. return $$[$0];
  2979. }()));
  2980. break;
  2981. case 159:this.$ = $$[$0];
  2982. break;
  2983. case 160:this.$ = $$[$0];
  2984. break;
  2985. case 161:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2986. break;
  2987. case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
  2988. break;
  2989. case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
  2990. break;
  2991. case 164:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]);
  2992. break;
  2993. case 165:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
  2994. source: $$[$0]
  2995. });
  2996. break;
  2997. case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
  2998. source: $$[$0],
  2999. object: true
  3000. });
  3001. break;
  3002. case 167:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
  3003. source: $$[$0-2],
  3004. guard: $$[$0]
  3005. });
  3006. break;
  3007. case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
  3008. source: $$[$0-2],
  3009. guard: $$[$0],
  3010. object: true
  3011. });
  3012. break;
  3013. case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
  3014. source: $$[$0-2],
  3015. step: $$[$0]
  3016. });
  3017. break;
  3018. case 170:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
  3019. source: $$[$0-4],
  3020. guard: $$[$0-2],
  3021. step: $$[$0]
  3022. });
  3023. break;
  3024. case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
  3025. source: $$[$0-4],
  3026. step: $$[$0-2],
  3027. guard: $$[$0]
  3028. });
  3029. break;
  3030. case 172:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1]));
  3031. break;
  3032. case 173:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]));
  3033. break;
  3034. case 174:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1]));
  3035. break;
  3036. case 175:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1]));
  3037. break;
  3038. case 176:this.$ = $$[$0];
  3039. break;
  3040. case 177:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0]));
  3041. break;
  3042. case 178:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]);
  3043. break;
  3044. case 179:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]);
  3045. break;
  3046. case 180:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {
  3047. type: $$[$0-2]
  3048. }));
  3049. break;
  3050. case 181:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {
  3051. type: $$[$0-2]
  3052. }))));
  3053. break;
  3054. case 182:this.$ = $$[$0];
  3055. break;
  3056. case 183:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0]));
  3057. break;
  3058. case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
  3059. type: $$[$0-1],
  3060. statement: true
  3061. }));
  3062. break;
  3063. case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
  3064. type: $$[$0-1],
  3065. statement: true
  3066. }));
  3067. break;
  3068. case 186:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0]));
  3069. break;
  3070. case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0]));
  3071. break;
  3072. case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0]));
  3073. break;
  3074. case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0]));
  3075. break;
  3076. case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0]));
  3077. break;
  3078. case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true));
  3079. break;
  3080. case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true));
  3081. break;
  3082. case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1]));
  3083. break;
  3084. case 194:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0]));
  3085. break;
  3086. case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0]));
  3087. break;
  3088. case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
  3089. break;
  3090. case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
  3091. break;
  3092. case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
  3093. break;
  3094. case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
  3095. break;
  3096. case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
  3097. if ($$[$0-1].charAt(0) === '!') {
  3098. return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert();
  3099. } else {
  3100. return new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
  3101. }
  3102. }()));
  3103. break;
  3104. case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1]));
  3105. break;
  3106. case 202:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]));
  3107. break;
  3108. case 203:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2]));
  3109. break;
  3110. case 204:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0]));
  3111. break;
  3112. }
  3113. },
  3114. table: [{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[3]},{1:[2,2],6:[1,72]},{1:[2,3],6:[2,3],26:[2,3],102:[2,3]},{1:[2,6],6:[2,6],26:[2,6],102:[2,6],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,11],6:[2,11],25:[2,11],26:[2,11],49:[2,11],54:[2,11],57:[2,11],62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,11],74:[1,96],78:[2,11],81:87,84:[1,89],85:[2,107],86:[2,11],91:[2,11],93:[2,11],102:[2,11],104:[2,11],105:[2,11],106:[2,11],110:[2,11],118:[2,11],126:[2,11],128:[2,11],129:[2,11],132:[2,11],133:[2,11],134:[2,11],135:[2,11],136:[2,11],137:[2,11]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,12],74:[1,96],78:[2,12],81:97,84:[1,89],85:[2,107],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],73:[2,13],78:[2,13],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],104:[2,8],106:[2,8],110:[2,8],126:[2,8]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[1,99],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],82:100,84:[2,105],85:[1,101],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{6:[2,54],25:[2,54],27:105,28:[1,71],44:106,48:102,49:[2,54],54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{24:111,25:[1,112]},{7:113,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:115,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:116,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:117,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:121,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[1,125],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[1,122],131:[1,123],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[1,124]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,126],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{24:127,25:[1,112]},{24:128,25:[1,112]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{24:129,25:[1,112]},{7:130,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,131],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,95],6:[2,95],12:118,13:119,24:132,25:[1,112],26:[2,95],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,49:[2,95],54:[2,95],57:[2,95],58:45,59:46,61:134,63:23,64:24,65:25,73:[2,95],76:[1,68],78:[2,95],80:[1,133],83:[1,26],86:[2,95],88:[1,56],89:[1,57],90:[1,55],91:[2,95],93:[2,95],101:[1,54],102:[2,95],104:[2,95],105:[2,95],106:[2,95],110:[2,95],118:[2,95],126:[2,95],128:[2,95],129:[2,95],132:[2,95],133:[2,95],134:[2,95],135:[2,95],136:[2,95],137:[2,95]},{7:135,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,46],6:[2,46],7:136,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,46],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,46],103:37,104:[2,46],106:[2,46],107:38,108:[1,65],109:39,110:[2,46],111:67,119:[1,40],124:35,125:[1,62],126:[2,46],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,47],6:[2,47],25:[2,47],26:[2,47],54:[2,47],78:[2,47],102:[2,47],104:[2,47],106:[2,47],110:[2,47],126:[2,47]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{4:137,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,138],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:139,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],27:145,28:[1,71],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{25:[2,50]},{25:[2,51]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],40:[2,67],49:[2,67],54:[2,67],57:[2,67],66:[2,67],67:[2,67],68:[2,67],69:[2,67],71:[2,67],73:[2,67],74:[2,67],78:[2,67],80:[2,67],84:[2,67],85:[2,67],86:[2,67],91:[2,67],93:[2,67],102:[2,67],104:[2,67],105:[2,67],106:[2,67],110:[2,67],118:[2,67],126:[2,67],128:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67],135:[2,67],136:[2,67],137:[2,67],138:[2,67]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{7:146,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:147,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:148,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:150,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:149,25:[1,112],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{27:155,28:[1,71],44:156,58:157,59:158,64:151,76:[1,68],89:[1,109],90:[1,55],113:152,114:[1,153],115:154},{112:159,116:[1,160],117:[1,161]},{6:[2,90],10:165,25:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:162,78:[2,90],89:[1,109]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],40:[2,25],43:[2,25],49:[2,25],54:[2,25],57:[2,25],66:[2,25],67:[2,25],68:[2,25],69:[2,25],71:[2,25],73:[2,25],74:[2,25],78:[2,25],80:[2,25],84:[2,25],85:[2,25],86:[2,25],91:[2,25],93:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],116:[2,25],117:[2,25],118:[2,25],126:[2,25],128:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25],138:[2,25]},{1:[2,5],5:169,6:[2,5],7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,5],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,5],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{7:170,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:171,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:172,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:173,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:174,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:175,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:176,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:177,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{7:178,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:179,85:[1,101]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{85:[2,108]},{27:180,28:[1,71]},{27:181,28:[1,71]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],27:182,28:[1,71],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{27:183,28:[1,71]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{7:185,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],57:[1,189],58:45,59:46,61:34,63:23,64:24,65:25,72:184,75:186,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],92:187,93:[1,188],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{70:190,71:[1,95],74:[1,96]},{82:191,85:[1,101]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{6:[1,193],7:192,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,194],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],84:[2,106],85:[2,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[1,195],87:196,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],49:[1,198],53:200,54:[1,199]},{6:[2,55],25:[2,55],26:[2,55],49:[2,55],54:[2,55]},{6:[2,59],25:[2,59],26:[2,59],40:[1,202],49:[2,59],54:[2,59],57:[1,201]},{6:[2,62],25:[2,62],26:[2,62],40:[2,62],49:[2,62],54:[2,62],57:[2,62]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{27:145,28:[1,71]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{4:204,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,203],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:82,104:[2,186],105:[2,186],106:[2,186],109:83,110:[2,186],111:67,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,73],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:82,104:[2,187],105:[2,187],106:[2,187],109:83,110:[2,187],111:67,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,73],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:82,104:[2,188],105:[2,188],106:[2,188],109:83,110:[2,188],111:67,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,73],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,189],74:[2,71],78:[2,189],84:[2,71],85:[2,71],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:87,84:[1,89],85:[2,107]},{62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:97,84:[1,89],85:[2,107]},{66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],74:[2,74],84:[2,74],85:[2,74]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,190],74:[2,71],78:[2,190],84:[2,71],85:[2,71],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,207],7:205,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,206],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:208,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{24:209,25:[1,112],125:[1,210]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],49:[2,132],54:[2,132],57:[2,132],73:[2,132],78:[2,132],86:[2,132],91:[2,132],93:[2,132],97:211,98:[1,212],99:[1,213],102:[2,132],104:[2,132],105:[2,132],106:[2,132],110:[2,132],118:[2,132],126:[2,132],128:[2,132],129:[2,132],132:[2,132],133:[2,132],134:[2,132],135:[2,132],136:[2,132],137:[2,132]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,214],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{120:215,122:216,123:[1,217]},{1:[2,96],6:[2,96],25:[2,96],26:[2,96],49:[2,96],54:[2,96],57:[2,96],73:[2,96],78:[2,96],86:[2,96],91:[2,96],93:[2,96],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{7:218,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,99],6:[2,99],24:219,25:[1,112],26:[2,99],49:[2,99],54:[2,99],57:[2,99],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,99],74:[2,71],78:[2,99],80:[1,220],84:[2,71],85:[2,71],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:82,104:[2,139],105:[2,139],106:[2,139],109:83,110:[2,139],111:67,118:[2,139],126:[2,139],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,45],6:[2,45],26:[2,45],102:[2,45],103:82,104:[2,45],106:[2,45],109:83,110:[2,45],111:67,126:[2,45],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,72],102:[1,221]},{4:222,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,128],25:[2,128],54:[2,128],57:[1,224],91:[2,128],92:223,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114]},{6:[2,52],25:[2,52],53:225,54:[1,226],91:[2,52]},{6:[2,123],25:[2,123],26:[2,123],54:[2,123],86:[2,123],91:[2,123]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:227,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],86:[2,129],91:[2,129]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],40:[2,113],43:[2,113],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],80:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],116:[2,113],117:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113],138:[2,113]},{24:228,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:82,104:[1,63],105:[1,229],106:[1,64],109:83,110:[1,66],111:67,118:[2,142],126:[2,142],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:82,104:[1,63],105:[1,230],106:[1,64],109:83,110:[1,66],111:67,118:[2,144],126:[2,144],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:82,104:[1,63],105:[2,151],106:[1,64],109:83,110:[1,66],111:67,118:[2,151],126:[2,151],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],113:231,115:154},{54:[1,232],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{7:233,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:234,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],53:235,54:[1,236],78:[2,52]},{6:[2,91],25:[2,91],26:[2,91],54:[2,91],78:[2,91]},{6:[2,38],25:[2,38],26:[2,38],43:[1,237],54:[2,38],78:[2,38]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,42],25:[2,42],26:[2,42],43:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:82,104:[2,194],105:[2,194],106:[2,194],109:83,110:[2,194],111:67,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,73],133:[1,76],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:82,104:[2,195],105:[2,195],106:[2,195],109:83,110:[2,195],111:67,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,73],133:[1,76],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:82,104:[2,196],105:[2,196],106:[2,196],109:83,110:[2,196],111:67,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,73],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:82,104:[2,197],105:[2,197],106:[2,197],109:83,110:[2,197],111:67,118:[2,197],126:[2,197],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:82,104:[2,198],105:[2,198],106:[2,198],109:83,110:[2,198],111:67,118:[2,198],126:[2,198],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,198],136:[2,198],137:[1,80]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:82,104:[2,199],105:[2,199],106:[2,199],109:83,110:[2,199],111:67,118:[2,199],126:[2,199],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[2,199],137:[1,80]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:82,104:[2,200],105:[2,200],106:[2,200],109:83,110:[2,200],111:67,118:[2,200],126:[2,200],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:82,104:[1,63],105:[2,185],106:[1,64],109:83,110:[1,66],111:67,118:[2,185],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:82,104:[1,63],105:[2,184],106:[1,64],109:83,110:[1,66],111:67,118:[2,184],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],66:[2,103],67:[2,103],68:[2,103],69:[2,103],71:[2,103],73:[2,103],74:[2,103],78:[2,103],84:[2,103],85:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],40:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],80:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79],138:[2,79]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{73:[1,238]},{57:[1,189],73:[2,87],92:239,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{73:[2,88]},{7:240,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,122],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{11:[2,116],28:[2,116],30:[2,116],31:[2,116],33:[2,116],34:[2,116],35:[2,116],36:[2,116],37:[2,116],38:[2,116],45:[2,116],46:[2,116],47:[2,116],51:[2,116],52:[2,116],73:[2,116],76:[2,116],79:[2,116],83:[2,116],88:[2,116],89:[2,116],90:[2,116],96:[2,116],100:[2,116],101:[2,116],104:[2,116],106:[2,116],108:[2,116],110:[2,116],119:[2,116],125:[2,116],127:[2,116],128:[2,116],129:[2,116],130:[2,116],131:[2,116]},{11:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],73:[2,35],78:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],103:82,104:[2,35],105:[2,35],106:[2,35],109:83,110:[2,35],111:67,118:[2,35],126:[2,35],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:241,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:242,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],49:[2,109],54:[2,109],57:[2,109],66:[2,109],67:[2,109],68:[2,109],69:[2,109],71:[2,109],73:[2,109],74:[2,109],78:[2,109],84:[2,109],85:[2,109],86:[2,109],91:[2,109],93:[2,109],102:[2,109],104:[2,109],105:[2,109],106:[2,109],110:[2,109],118:[2,109],126:[2,109],128:[2,109],129:[2,109],132:[2,109],133:[2,109],134:[2,109],135:[2,109],136:[2,109],137:[2,109]},{6:[2,52],25:[2,52],53:243,54:[1,226],86:[2,52]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],57:[1,244],86:[2,128],91:[2,128],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{50:245,51:[1,58],52:[1,59]},{6:[2,53],25:[2,53],26:[2,53],27:105,28:[1,71],44:106,55:246,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[1,247],25:[1,248]},{6:[2,60],25:[2,60],26:[2,60],49:[2,60],54:[2,60]},{7:249,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],98:[2,23],99:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],121:[2,23],123:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{6:[1,72],26:[1,250]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:82,104:[2,201],105:[2,201],106:[2,201],109:83,110:[2,201],111:67,118:[2,201],126:[2,201],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:251,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:252,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:82,104:[2,204],105:[2,204],106:[2,204],109:83,110:[2,204],111:67,118:[2,204],126:[2,204],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{7:253,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],98:[1,254],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{24:255,25:[1,112]},{24:258,25:[1,112],27:256,28:[1,71],59:257,76:[1,68]},{120:259,122:216,123:[1,217]},{26:[1,260],121:[1,261],122:262,123:[1,217]},{26:[2,176],121:[2,176],123:[2,176]},{7:264,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],95:263,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,97],6:[2,97],24:265,25:[1,112],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],103:82,104:[1,63],105:[2,97],106:[1,64],109:83,110:[1,66],111:67,118:[2,97],126:[2,97],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],49:[2,100],54:[2,100],57:[2,100],73:[2,100],78:[2,100],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{7:266,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,72],26:[1,267]},{7:268,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,66],11:[2,117],25:[2,66],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],54:[2,66],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],91:[2,66],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{6:[1,270],25:[1,271],91:[1,269]},{6:[2,53],7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[2,53],26:[2,53],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[2,53],88:[1,56],89:[1,57],90:[1,55],91:[2,53],94:272,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],26:[2,52],53:273,54:[1,226]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{7:274,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:275,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{116:[2,158],117:[2,158]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],115:276},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:82,104:[2,165],105:[1,277],106:[2,165],109:83,110:[2,165],111:67,118:[1,278],126:[2,165],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:82,104:[2,166],105:[1,279],106:[2,166],109:83,110:[2,166],111:67,118:[2,166],126:[2,166],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,281],25:[1,282],78:[1,280]},{6:[2,53],10:165,25:[2,53],26:[2,53],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:283,42:164,44:168,46:[1,44],78:[2,53],89:[1,109]},{7:284,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,285],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{7:286,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,120],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,121],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:82,104:[2,36],105:[2,36],106:[2,36],109:83,110:[2,36],111:67,118:[2,36],126:[2,36],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{26:[1,287],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],86:[1,288]},{6:[2,66],25:[2,66],26:[2,66],54:[2,66],86:[2,66],91:[2,66]},{24:289,25:[1,112]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{27:105,28:[1,71],44:106,55:290,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,54],25:[2,54],26:[2,54],27:105,28:[1,71],44:106,48:291,54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{26:[1,292],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:82,104:[2,203],105:[2,203],106:[2,203],109:83,110:[2,203],111:67,118:[2,203],126:[2,203],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:293,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:294,25:[1,112]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{24:295,25:[1,112]},{24:296,25:[1,112]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{26:[1,297],121:[1,298],122:262,123:[1,217]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{24:299,25:[1,112]},{26:[2,177],121:[2,177],123:[2,177]},{24:300,25:[1,112],54:[1,301]},{25:[2,130],54:[2,130],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],104:[2,98],105:[2,98],106:[2,98],110:[2,98],118:[2,98],126:[2,98],128:[2,98],129:[2,98],132:[2,98],133:[2,98],134:[2,98],135:[2,98],136:[2,98],137:[2,98]},{1:[2,101],6:[2,101],24:302,25:[1,112],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],103:82,104:[1,63],105:[2,101],106:[1,64],109:83,110:[1,66],111:67,118:[2,101],126:[2,101],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{102:[1,303]},{91:[1,304],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],94:305,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:306,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{6:[1,270],25:[1,271],26:[1,307]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:82,104:[1,63],105:[2,143],106:[1,64],109:83,110:[1,66],111:67,118:[2,143],126:[2,143],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:82,104:[1,63],105:[2,145],106:[1,64],109:83,110:[1,66],111:67,118:[2,145],126:[2,145],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{116:[2,164],117:[2,164]},{7:308,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:309,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:310,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,89],6:[2,89],25:[2,89],26:[2,89],40:[2,89],49:[2,89],54:[2,89],57:[2,89],66:[2,89],67:[2,89],68:[2,89],69:[2,89],71:[2,89],73:[2,89],74:[2,89],78:[2,89],84:[2,89],85:[2,89],86:[2,89],91:[2,89],93:[2,89],102:[2,89],104:[2,89],105:[2,89],106:[2,89],110:[2,89],116:[2,89],117:[2,89],118:[2,89],126:[2,89],128:[2,89],129:[2,89],132:[2,89],133:[2,89],134:[2,89],135:[2,89],136:[2,89],137:[2,89]},{10:165,27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:311,42:164,44:168,46:[1,44],89:[1,109]},{6:[2,90],10:165,25:[2,90],26:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:312,89:[1,109]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],54:[2,39],78:[2,39],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:313,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,119],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],104:[2,37],105:[2,37],106:[2,37],110:[2,37],118:[2,37],126:[2,37],128:[2,37],129:[2,37],132:[2,37],133:[2,37],134:[2,37],135:[2,37],136:[2,37],137:[2,37]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],49:[2,48],54:[2,48],57:[2,48],73:[2,48],78:[2,48],86:[2,48],91:[2,48],93:[2,48],102:[2,48],104:[2,48],105:[2,48],106:[2,48],110:[2,48],118:[2,48],126:[2,48],128:[2,48],129:[2,48],132:[2,48],133:[2,48],134:[2,48],135:[2,48],136:[2,48],137:[2,48]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{6:[2,52],25:[2,52],26:[2,52],53:314,54:[1,199]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],98:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{24:315,25:[1,112]},{26:[1,316]},{6:[1,317],26:[2,178],121:[2,178],123:[2,178]},{7:318,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,102],6:[2,102],25:[2,102],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],104:[2,102],105:[2,102],106:[2,102],110:[2,102],118:[2,102],126:[2,102],128:[2,102],129:[2,102],132:[2,102],133:[2,102],134:[2,102],135:[2,102],136:[2,102],137:[2,102]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,118],6:[2,118],25:[2,118],26:[2,118],49:[2,118],54:[2,118],57:[2,118],66:[2,118],67:[2,118],68:[2,118],69:[2,118],71:[2,118],73:[2,118],74:[2,118],78:[2,118],84:[2,118],85:[2,118],86:[2,118],91:[2,118],93:[2,118],102:[2,118],104:[2,118],105:[2,118],106:[2,118],110:[2,118],118:[2,118],126:[2,118],128:[2,118],129:[2,118],132:[2,118],133:[2,118],134:[2,118],135:[2,118],136:[2,118],137:[2,118]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[2,52],25:[2,52],26:[2,52],53:319,54:[1,226]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:82,104:[2,167],105:[2,167],106:[2,167],109:83,110:[2,167],111:67,118:[1,320],126:[2,167],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:82,104:[2,169],105:[1,321],106:[2,169],109:83,110:[2,169],111:67,118:[2,169],126:[2,169],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:82,104:[2,168],105:[2,168],106:[2,168],109:83,110:[2,168],111:67,118:[2,168],126:[2,168],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,52],25:[2,52],26:[2,52],53:322,54:[1,236]},{26:[1,323],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,247],25:[1,248],26:[1,324]},{26:[1,325]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,131],54:[2,131],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],26:[1,326]},{7:327,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:328,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[1,281],25:[1,282],26:[1,329]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:82,104:[2,170],105:[2,170],106:[2,170],109:83,110:[2,170],111:67,118:[2,170],126:[2,170],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:82,104:[2,171],105:[2,171],106:[2,171],109:83,110:[2,171],111:67,118:[2,171],126:[2,171],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]}],
  3115. defaultActions: {58:[2,50],59:[2,51],89:[2,108],186:[2,88]},
  3116. parseError: function parseError(str, hash) {
  3117. if (hash.recoverable) {
  3118. this.trace(str);
  3119. } else {
  3120. var e = new Error(str)
  3121. e.location = hash.loc
  3122. throw e;
  3123. }
  3124. },
  3125. parse: function parse(input) {
  3126. var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
  3127. this.lexer.setInput(input);
  3128. this.lexer.yy = this.yy;
  3129. this.yy.lexer = this.lexer;
  3130. this.yy.parser = this;
  3131. if (typeof this.lexer.yylloc == 'undefined') {
  3132. this.lexer.yylloc = {};
  3133. }
  3134. var yyloc = this.lexer.yylloc;
  3135. lstack.push(yyloc);
  3136. var ranges = this.lexer.options && this.lexer.options.ranges;
  3137. if (typeof this.yy.parseError === 'function') {
  3138. this.parseError = this.yy.parseError;
  3139. } else {
  3140. this.parseError = Object.getPrototypeOf(this).parseError;
  3141. }
  3142. function popStack(n) {
  3143. stack.length = stack.length - 2 * n;
  3144. vstack.length = vstack.length - n;
  3145. lstack.length = lstack.length - n;
  3146. }
  3147. function lex() {
  3148. var token;
  3149. token = self.lexer.lex() || EOF;
  3150. if (typeof token !== 'number') {
  3151. token = self.symbols_[token] || token;
  3152. }
  3153. return token;
  3154. }
  3155. var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
  3156. while (true) {
  3157. state = stack[stack.length - 1];
  3158. if (this.defaultActions[state]) {
  3159. action = this.defaultActions[state];
  3160. } else {
  3161. if (symbol === null || typeof symbol == 'undefined') {
  3162. symbol = lex();
  3163. }
  3164. action = table[state] && table[state][symbol];
  3165. }
  3166. if (typeof action === 'undefined' || !action.length || !action[0]) {
  3167. var errStr = '';
  3168. expected = [];
  3169. for (p in table[state]) {
  3170. if (this.terminals_[p] && p > TERROR) {
  3171. expected.push('\'' + this.terminals_[p] + '\'');
  3172. }
  3173. }
  3174. if (this.lexer.showPosition) {
  3175. errStr = 'Expecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
  3176. } else {
  3177. errStr = 'Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
  3178. }
  3179. if (this.lexer.yylloc.first_line !== yyloc.first_line) yyloc = this.lexer.yylloc;
  3180. this.parseError(errStr, {
  3181. text: this.lexer.match,
  3182. token: this.terminals_[symbol] || symbol,
  3183. line: this.lexer.yylineno,
  3184. loc: yyloc,
  3185. expected: expected
  3186. });
  3187. }
  3188. if (action[0] instanceof Array && action.length > 1) {
  3189. throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
  3190. }
  3191. switch (action[0]) {
  3192. case 1:
  3193. stack.push(symbol);
  3194. vstack.push(this.lexer.yytext);
  3195. lstack.push(this.lexer.yylloc);
  3196. stack.push(action[1]);
  3197. symbol = null;
  3198. if (!preErrorSymbol) {
  3199. yyleng = this.lexer.yyleng;
  3200. yytext = this.lexer.yytext;
  3201. yylineno = this.lexer.yylineno;
  3202. yyloc = this.lexer.yylloc;
  3203. if (recovering > 0) {
  3204. recovering--;
  3205. }
  3206. } else {
  3207. symbol = preErrorSymbol;
  3208. preErrorSymbol = null;
  3209. }
  3210. break;
  3211. case 2:
  3212. len = this.productions_[action[1]][1];
  3213. yyval.$ = vstack[vstack.length - len];
  3214. yyval._$ = {
  3215. first_line: lstack[lstack.length - (len || 1)].first_line,
  3216. last_line: lstack[lstack.length - 1].last_line,
  3217. first_column: lstack[lstack.length - (len || 1)].first_column,
  3218. last_column: lstack[lstack.length - 1].last_column
  3219. };
  3220. if (ranges) {
  3221. yyval._$.range = [
  3222. lstack[lstack.length - (len || 1)].range[0],
  3223. lstack[lstack.length - 1].range[1]
  3224. ];
  3225. }
  3226. r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
  3227. if (typeof r !== 'undefined') {
  3228. return r;
  3229. }
  3230. if (len) {
  3231. stack = stack.slice(0, -1 * len * 2);
  3232. vstack = vstack.slice(0, -1 * len);
  3233. lstack = lstack.slice(0, -1 * len);
  3234. }
  3235. stack.push(this.productions_[action[1]][0]);
  3236. vstack.push(yyval.$);
  3237. lstack.push(yyval._$);
  3238. newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
  3239. stack.push(newState);
  3240. break;
  3241. case 3:
  3242. return true;
  3243. }
  3244. }
  3245. return true;
  3246. }};
  3247. undefined
  3248. function Parser () {
  3249. this.yy = {};
  3250. }
  3251. Parser.prototype = parser;parser.Parser = Parser;
  3252. module.exports = new Parser;
  3253. });
  3254. ace.define("ace/mode/coffee/scope",["require","exports","module","ace/mode/coffee/helpers"], function(require, exports, module) {
  3255. var Scope, extend, last, _ref;
  3256. _ref = require('./helpers'), extend = _ref.extend, last = _ref.last;
  3257. exports.Scope = Scope = (function() {
  3258. Scope.root = null;
  3259. function Scope(parent, expressions, method) {
  3260. this.parent = parent;
  3261. this.expressions = expressions;
  3262. this.method = method;
  3263. this.variables = [
  3264. {
  3265. name: 'arguments',
  3266. type: 'arguments'
  3267. }
  3268. ];
  3269. this.positions = {};
  3270. if (!this.parent) {
  3271. Scope.root = this;
  3272. }
  3273. }
  3274. Scope.prototype.add = function(name, type, immediate) {
  3275. if (this.shared && !immediate) {
  3276. return this.parent.add(name, type, immediate);
  3277. }
  3278. if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
  3279. return this.variables[this.positions[name]].type = type;
  3280. } else {
  3281. return this.positions[name] = this.variables.push({
  3282. name: name,
  3283. type: type
  3284. }) - 1;
  3285. }
  3286. };
  3287. Scope.prototype.namedMethod = function() {
  3288. var _ref1;
  3289. if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) {
  3290. return this.method;
  3291. }
  3292. return this.parent.namedMethod();
  3293. };
  3294. Scope.prototype.find = function(name) {
  3295. if (this.check(name)) {
  3296. return true;
  3297. }
  3298. this.add(name, 'var');
  3299. return false;
  3300. };
  3301. Scope.prototype.parameter = function(name) {
  3302. if (this.shared && this.parent.check(name, true)) {
  3303. return;
  3304. }
  3305. return this.add(name, 'param');
  3306. };
  3307. Scope.prototype.check = function(name) {
  3308. var _ref1;
  3309. return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0));
  3310. };
  3311. Scope.prototype.temporary = function(name, index) {
  3312. if (name.length > 1) {
  3313. return '_' + name + (index > 1 ? index - 1 : '');
  3314. } else {
  3315. return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a');
  3316. }
  3317. };
  3318. Scope.prototype.type = function(name) {
  3319. var v, _i, _len, _ref1;
  3320. _ref1 = this.variables;
  3321. for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
  3322. v = _ref1[_i];
  3323. if (v.name === name) {
  3324. return v.type;
  3325. }
  3326. }
  3327. return null;
  3328. };
  3329. Scope.prototype.freeVariable = function(name, reserve) {
  3330. var index, temp;
  3331. if (reserve == null) {
  3332. reserve = true;
  3333. }
  3334. index = 0;
  3335. while (this.check((temp = this.temporary(name, index)))) {
  3336. index++;
  3337. }
  3338. if (reserve) {
  3339. this.add(temp, 'var', true);
  3340. }
  3341. return temp;
  3342. };
  3343. Scope.prototype.assign = function(name, value) {
  3344. this.add(name, {
  3345. value: value,
  3346. assigned: true
  3347. }, true);
  3348. return this.hasAssignments = true;
  3349. };
  3350. Scope.prototype.hasDeclarations = function() {
  3351. return !!this.declaredVariables().length;
  3352. };
  3353. Scope.prototype.declaredVariables = function() {
  3354. var realVars, tempVars, v, _i, _len, _ref1;
  3355. realVars = [];
  3356. tempVars = [];
  3357. _ref1 = this.variables;
  3358. for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
  3359. v = _ref1[_i];
  3360. if (v.type === 'var') {
  3361. (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name);
  3362. }
  3363. }
  3364. return realVars.sort().concat(tempVars.sort());
  3365. };
  3366. Scope.prototype.assignedVariables = function() {
  3367. var v, _i, _len, _ref1, _results;
  3368. _ref1 = this.variables;
  3369. _results = [];
  3370. for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
  3371. v = _ref1[_i];
  3372. if (v.type.assigned) {
  3373. _results.push("" + v.name + " = " + v.type.value);
  3374. }
  3375. }
  3376. return _results;
  3377. };
  3378. return Scope;
  3379. })();
  3380. });
  3381. ace.define("ace/mode/coffee/nodes",["require","exports","module","ace/mode/coffee/scope","ace/mode/coffee/lexer","ace/mode/coffee/helpers"], function(require, exports, module) {
  3382. var Access, Arr, Assign, Base, Block, Call, Class, Code, CodeFragment, Comment, Existence, Extends, For, HEXNUM, IDENTIFIER, IDENTIFIER_STR, IS_REGEX, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, NUMBER, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isLiteralArguments, isLiteralThis, last, locationDataToString, merge, multident, parseNum, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1,
  3383. __hasProp = {}.hasOwnProperty,
  3384. __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  3385. __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
  3386. __slice = [].slice;
  3387. Error.stackTraceLimit = Infinity;
  3388. Scope = require('./scope').Scope;
  3389. _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED;
  3390. _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError;
  3391. exports.extend = extend;
  3392. exports.addLocationDataFn = addLocationDataFn;
  3393. YES = function() {
  3394. return true;
  3395. };
  3396. NO = function() {
  3397. return false;
  3398. };
  3399. THIS = function() {
  3400. return this;
  3401. };
  3402. NEGATE = function() {
  3403. this.negated = !this.negated;
  3404. return this;
  3405. };
  3406. exports.CodeFragment = CodeFragment = (function() {
  3407. function CodeFragment(parent, code) {
  3408. var _ref2;
  3409. this.code = "" + code;
  3410. this.locationData = parent != null ? parent.locationData : void 0;
  3411. this.type = (parent != null ? (_ref2 = parent.constructor) != null ? _ref2.name : void 0 : void 0) || 'unknown';
  3412. }
  3413. CodeFragment.prototype.toString = function() {
  3414. return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : '');
  3415. };
  3416. return CodeFragment;
  3417. })();
  3418. fragmentsToText = function(fragments) {
  3419. var fragment;
  3420. return ((function() {
  3421. var _i, _len, _results;
  3422. _results = [];
  3423. for (_i = 0, _len = fragments.length; _i < _len; _i++) {
  3424. fragment = fragments[_i];
  3425. _results.push(fragment.code);
  3426. }
  3427. return _results;
  3428. })()).join('');
  3429. };
  3430. exports.Base = Base = (function() {
  3431. function Base() {}
  3432. Base.prototype.compile = function(o, lvl) {
  3433. return fragmentsToText(this.compileToFragments(o, lvl));
  3434. };
  3435. Base.prototype.compileToFragments = function(o, lvl) {
  3436. var node;
  3437. o = extend({}, o);
  3438. if (lvl) {
  3439. o.level = lvl;
  3440. }
  3441. node = this.unfoldSoak(o) || this;
  3442. node.tab = o.indent;
  3443. if (o.level === LEVEL_TOP || !node.isStatement(o)) {
  3444. return node.compileNode(o);
  3445. } else {
  3446. return node.compileClosure(o);
  3447. }
  3448. };
  3449. Base.prototype.compileClosure = function(o) {
  3450. var args, argumentsNode, func, jumpNode, meth;
  3451. if (jumpNode = this.jumps()) {
  3452. jumpNode.error('cannot use a pure statement in an expression');
  3453. }
  3454. o.sharedScope = true;
  3455. func = new Code([], Block.wrap([this]));
  3456. args = [];
  3457. if ((argumentsNode = this.contains(isLiteralArguments)) || this.contains(isLiteralThis)) {
  3458. args = [new Literal('this')];
  3459. if (argumentsNode) {
  3460. meth = 'apply';
  3461. args.push(new Literal('arguments'));
  3462. } else {
  3463. meth = 'call';
  3464. }
  3465. func = new Value(func, [new Access(new Literal(meth))]);
  3466. }
  3467. return (new Call(func, args)).compileNode(o);
  3468. };
  3469. Base.prototype.cache = function(o, level, reused) {
  3470. var ref, sub;
  3471. if (!this.isComplex()) {
  3472. ref = level ? this.compileToFragments(o, level) : this;
  3473. return [ref, ref];
  3474. } else {
  3475. ref = new Literal(reused || o.scope.freeVariable('ref'));
  3476. sub = new Assign(ref, this);
  3477. if (level) {
  3478. return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]];
  3479. } else {
  3480. return [sub, ref];
  3481. }
  3482. }
  3483. };
  3484. Base.prototype.cacheToCodeFragments = function(cacheValues) {
  3485. return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])];
  3486. };
  3487. Base.prototype.makeReturn = function(res) {
  3488. var me;
  3489. me = this.unwrapAll();
  3490. if (res) {
  3491. return new Call(new Literal("" + res + ".push"), [me]);
  3492. } else {
  3493. return new Return(me);
  3494. }
  3495. };
  3496. Base.prototype.contains = function(pred) {
  3497. var node;
  3498. node = void 0;
  3499. this.traverseChildren(false, function(n) {
  3500. if (pred(n)) {
  3501. node = n;
  3502. return false;
  3503. }
  3504. });
  3505. return node;
  3506. };
  3507. Base.prototype.lastNonComment = function(list) {
  3508. var i;
  3509. i = list.length;
  3510. while (i--) {
  3511. if (!(list[i] instanceof Comment)) {
  3512. return list[i];
  3513. }
  3514. }
  3515. return null;
  3516. };
  3517. Base.prototype.toString = function(idt, name) {
  3518. var tree;
  3519. if (idt == null) {
  3520. idt = '';
  3521. }
  3522. if (name == null) {
  3523. name = this.constructor.name;
  3524. }
  3525. tree = '\n' + idt + name;
  3526. if (this.soak) {
  3527. tree += '?';
  3528. }
  3529. this.eachChild(function(node) {
  3530. return tree += node.toString(idt + TAB);
  3531. });
  3532. return tree;
  3533. };
  3534. Base.prototype.eachChild = function(func) {
  3535. var attr, child, _i, _j, _len, _len1, _ref2, _ref3;
  3536. if (!this.children) {
  3537. return this;
  3538. }
  3539. _ref2 = this.children;
  3540. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  3541. attr = _ref2[_i];
  3542. if (this[attr]) {
  3543. _ref3 = flatten([this[attr]]);
  3544. for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
  3545. child = _ref3[_j];
  3546. if (func(child) === false) {
  3547. return this;
  3548. }
  3549. }
  3550. }
  3551. }
  3552. return this;
  3553. };
  3554. Base.prototype.traverseChildren = function(crossScope, func) {
  3555. return this.eachChild(function(child) {
  3556. var recur;
  3557. recur = func(child);
  3558. if (recur !== false) {
  3559. return child.traverseChildren(crossScope, func);
  3560. }
  3561. });
  3562. };
  3563. Base.prototype.invert = function() {
  3564. return new Op('!', this);
  3565. };
  3566. Base.prototype.unwrapAll = function() {
  3567. var node;
  3568. node = this;
  3569. while (node !== (node = node.unwrap())) {
  3570. continue;
  3571. }
  3572. return node;
  3573. };
  3574. Base.prototype.children = [];
  3575. Base.prototype.isStatement = NO;
  3576. Base.prototype.jumps = NO;
  3577. Base.prototype.isComplex = YES;
  3578. Base.prototype.isChainable = NO;
  3579. Base.prototype.isAssignable = NO;
  3580. Base.prototype.unwrap = THIS;
  3581. Base.prototype.unfoldSoak = NO;
  3582. Base.prototype.assigns = NO;
  3583. Base.prototype.updateLocationDataIfMissing = function(locationData) {
  3584. if (this.locationData) {
  3585. return this;
  3586. }
  3587. this.locationData = locationData;
  3588. return this.eachChild(function(child) {
  3589. return child.updateLocationDataIfMissing(locationData);
  3590. });
  3591. };
  3592. Base.prototype.error = function(message) {
  3593. return throwSyntaxError(message, this.locationData);
  3594. };
  3595. Base.prototype.makeCode = function(code) {
  3596. return new CodeFragment(this, code);
  3597. };
  3598. Base.prototype.wrapInBraces = function(fragments) {
  3599. return [].concat(this.makeCode('('), fragments, this.makeCode(')'));
  3600. };
  3601. Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) {
  3602. var answer, fragments, i, _i, _len;
  3603. answer = [];
  3604. for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) {
  3605. fragments = fragmentsList[i];
  3606. if (i) {
  3607. answer.push(this.makeCode(joinStr));
  3608. }
  3609. answer = answer.concat(fragments);
  3610. }
  3611. return answer;
  3612. };
  3613. return Base;
  3614. })();
  3615. exports.Block = Block = (function(_super) {
  3616. __extends(Block, _super);
  3617. function Block(nodes) {
  3618. this.expressions = compact(flatten(nodes || []));
  3619. }
  3620. Block.prototype.children = ['expressions'];
  3621. Block.prototype.push = function(node) {
  3622. this.expressions.push(node);
  3623. return this;
  3624. };
  3625. Block.prototype.pop = function() {
  3626. return this.expressions.pop();
  3627. };
  3628. Block.prototype.unshift = function(node) {
  3629. this.expressions.unshift(node);
  3630. return this;
  3631. };
  3632. Block.prototype.unwrap = function() {
  3633. if (this.expressions.length === 1) {
  3634. return this.expressions[0];
  3635. } else {
  3636. return this;
  3637. }
  3638. };
  3639. Block.prototype.isEmpty = function() {
  3640. return !this.expressions.length;
  3641. };
  3642. Block.prototype.isStatement = function(o) {
  3643. var exp, _i, _len, _ref2;
  3644. _ref2 = this.expressions;
  3645. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  3646. exp = _ref2[_i];
  3647. if (exp.isStatement(o)) {
  3648. return true;
  3649. }
  3650. }
  3651. return false;
  3652. };
  3653. Block.prototype.jumps = function(o) {
  3654. var exp, jumpNode, _i, _len, _ref2;
  3655. _ref2 = this.expressions;
  3656. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  3657. exp = _ref2[_i];
  3658. if (jumpNode = exp.jumps(o)) {
  3659. return jumpNode;
  3660. }
  3661. }
  3662. };
  3663. Block.prototype.makeReturn = function(res) {
  3664. var expr, len;
  3665. len = this.expressions.length;
  3666. while (len--) {
  3667. expr = this.expressions[len];
  3668. if (!(expr instanceof Comment)) {
  3669. this.expressions[len] = expr.makeReturn(res);
  3670. if (expr instanceof Return && !expr.expression) {
  3671. this.expressions.splice(len, 1);
  3672. }
  3673. break;
  3674. }
  3675. }
  3676. return this;
  3677. };
  3678. Block.prototype.compileToFragments = function(o, level) {
  3679. if (o == null) {
  3680. o = {};
  3681. }
  3682. if (o.scope) {
  3683. return Block.__super__.compileToFragments.call(this, o, level);
  3684. } else {
  3685. return this.compileRoot(o);
  3686. }
  3687. };
  3688. Block.prototype.compileNode = function(o) {
  3689. var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2;
  3690. this.tab = o.indent;
  3691. top = o.level === LEVEL_TOP;
  3692. compiledNodes = [];
  3693. _ref2 = this.expressions;
  3694. for (index = _i = 0, _len = _ref2.length; _i < _len; index = ++_i) {
  3695. node = _ref2[index];
  3696. node = node.unwrapAll();
  3697. node = node.unfoldSoak(o) || node;
  3698. if (node instanceof Block) {
  3699. compiledNodes.push(node.compileNode(o));
  3700. } else if (top) {
  3701. node.front = true;
  3702. fragments = node.compileToFragments(o);
  3703. if (!node.isStatement(o)) {
  3704. fragments.unshift(this.makeCode("" + this.tab));
  3705. fragments.push(this.makeCode(";"));
  3706. }
  3707. compiledNodes.push(fragments);
  3708. } else {
  3709. compiledNodes.push(node.compileToFragments(o, LEVEL_LIST));
  3710. }
  3711. }
  3712. if (top) {
  3713. if (this.spaced) {
  3714. return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n"));
  3715. } else {
  3716. return this.joinFragmentArrays(compiledNodes, '\n');
  3717. }
  3718. }
  3719. if (compiledNodes.length) {
  3720. answer = this.joinFragmentArrays(compiledNodes, ', ');
  3721. } else {
  3722. answer = [this.makeCode("void 0")];
  3723. }
  3724. if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) {
  3725. return this.wrapInBraces(answer);
  3726. } else {
  3727. return answer;
  3728. }
  3729. };
  3730. Block.prototype.compileRoot = function(o) {
  3731. var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2;
  3732. o.indent = o.bare ? '' : TAB;
  3733. o.level = LEVEL_TOP;
  3734. this.spaced = true;
  3735. o.scope = new Scope(null, this, null);
  3736. _ref2 = o.locals || [];
  3737. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  3738. name = _ref2[_i];
  3739. o.scope.parameter(name);
  3740. }
  3741. prelude = [];
  3742. if (!o.bare) {
  3743. preludeExps = (function() {
  3744. var _j, _len1, _ref3, _results;
  3745. _ref3 = this.expressions;
  3746. _results = [];
  3747. for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) {
  3748. exp = _ref3[i];
  3749. if (!(exp.unwrap() instanceof Comment)) {
  3750. break;
  3751. }
  3752. _results.push(exp);
  3753. }
  3754. return _results;
  3755. }).call(this);
  3756. rest = this.expressions.slice(preludeExps.length);
  3757. this.expressions = preludeExps;
  3758. if (preludeExps.length) {
  3759. prelude = this.compileNode(merge(o, {
  3760. indent: ''
  3761. }));
  3762. prelude.push(this.makeCode("\n"));
  3763. }
  3764. this.expressions = rest;
  3765. }
  3766. fragments = this.compileWithDeclarations(o);
  3767. if (o.bare) {
  3768. return fragments;
  3769. }
  3770. return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n"));
  3771. };
  3772. Block.prototype.compileWithDeclarations = function(o) {
  3773. var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4;
  3774. fragments = [];
  3775. post = [];
  3776. _ref2 = this.expressions;
  3777. for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
  3778. exp = _ref2[i];
  3779. exp = exp.unwrap();
  3780. if (!(exp instanceof Comment || exp instanceof Literal)) {
  3781. break;
  3782. }
  3783. }
  3784. o = merge(o, {
  3785. level: LEVEL_TOP
  3786. });
  3787. if (i) {
  3788. rest = this.expressions.splice(i, 9e9);
  3789. _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1];
  3790. _ref4 = [this.compileNode(o), spaced], fragments = _ref4[0], this.spaced = _ref4[1];
  3791. this.expressions = rest;
  3792. }
  3793. post = this.compileNode(o);
  3794. scope = o.scope;
  3795. if (scope.expressions === this) {
  3796. declars = o.scope.hasDeclarations();
  3797. assigns = scope.hasAssignments;
  3798. if (declars || assigns) {
  3799. if (i) {
  3800. fragments.push(this.makeCode('\n'));
  3801. }
  3802. fragments.push(this.makeCode("" + this.tab + "var "));
  3803. if (declars) {
  3804. fragments.push(this.makeCode(scope.declaredVariables().join(', ')));
  3805. }
  3806. if (assigns) {
  3807. if (declars) {
  3808. fragments.push(this.makeCode(",\n" + (this.tab + TAB)));
  3809. }
  3810. fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB))));
  3811. }
  3812. fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : '')));
  3813. } else if (fragments.length && post.length) {
  3814. fragments.push(this.makeCode("\n"));
  3815. }
  3816. }
  3817. return fragments.concat(post);
  3818. };
  3819. Block.wrap = function(nodes) {
  3820. if (nodes.length === 1 && nodes[0] instanceof Block) {
  3821. return nodes[0];
  3822. }
  3823. return new Block(nodes);
  3824. };
  3825. return Block;
  3826. })(Base);
  3827. exports.Literal = Literal = (function(_super) {
  3828. __extends(Literal, _super);
  3829. function Literal(value) {
  3830. this.value = value;
  3831. }
  3832. Literal.prototype.makeReturn = function() {
  3833. if (this.isStatement()) {
  3834. return this;
  3835. } else {
  3836. return Literal.__super__.makeReturn.apply(this, arguments);
  3837. }
  3838. };
  3839. Literal.prototype.isAssignable = function() {
  3840. return IDENTIFIER.test(this.value);
  3841. };
  3842. Literal.prototype.isStatement = function() {
  3843. var _ref2;
  3844. return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger';
  3845. };
  3846. Literal.prototype.isComplex = NO;
  3847. Literal.prototype.assigns = function(name) {
  3848. return name === this.value;
  3849. };
  3850. Literal.prototype.jumps = function(o) {
  3851. if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) {
  3852. return this;
  3853. }
  3854. if (this.value === 'continue' && !(o != null ? o.loop : void 0)) {
  3855. return this;
  3856. }
  3857. };
  3858. Literal.prototype.compileNode = function(o) {
  3859. var answer, code, _ref2;
  3860. code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value;
  3861. answer = this.isStatement() ? "" + this.tab + code + ";" : code;
  3862. return [this.makeCode(answer)];
  3863. };
  3864. Literal.prototype.toString = function() {
  3865. return ' "' + this.value + '"';
  3866. };
  3867. return Literal;
  3868. })(Base);
  3869. exports.Undefined = (function(_super) {
  3870. __extends(Undefined, _super);
  3871. function Undefined() {
  3872. return Undefined.__super__.constructor.apply(this, arguments);
  3873. }
  3874. Undefined.prototype.isAssignable = NO;
  3875. Undefined.prototype.isComplex = NO;
  3876. Undefined.prototype.compileNode = function(o) {
  3877. return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')];
  3878. };
  3879. return Undefined;
  3880. })(Base);
  3881. exports.Null = (function(_super) {
  3882. __extends(Null, _super);
  3883. function Null() {
  3884. return Null.__super__.constructor.apply(this, arguments);
  3885. }
  3886. Null.prototype.isAssignable = NO;
  3887. Null.prototype.isComplex = NO;
  3888. Null.prototype.compileNode = function() {
  3889. return [this.makeCode("null")];
  3890. };
  3891. return Null;
  3892. })(Base);
  3893. exports.Bool = (function(_super) {
  3894. __extends(Bool, _super);
  3895. Bool.prototype.isAssignable = NO;
  3896. Bool.prototype.isComplex = NO;
  3897. Bool.prototype.compileNode = function() {
  3898. return [this.makeCode(this.val)];
  3899. };
  3900. function Bool(val) {
  3901. this.val = val;
  3902. }
  3903. return Bool;
  3904. })(Base);
  3905. exports.Return = Return = (function(_super) {
  3906. __extends(Return, _super);
  3907. function Return(expr) {
  3908. if (expr && !expr.unwrap().isUndefined) {
  3909. this.expression = expr;
  3910. }
  3911. }
  3912. Return.prototype.children = ['expression'];
  3913. Return.prototype.isStatement = YES;
  3914. Return.prototype.makeReturn = THIS;
  3915. Return.prototype.jumps = THIS;
  3916. Return.prototype.compileToFragments = function(o, level) {
  3917. var expr, _ref2;
  3918. expr = (_ref2 = this.expression) != null ? _ref2.makeReturn() : void 0;
  3919. if (expr && !(expr instanceof Return)) {
  3920. return expr.compileToFragments(o, level);
  3921. } else {
  3922. return Return.__super__.compileToFragments.call(this, o, level);
  3923. }
  3924. };
  3925. Return.prototype.compileNode = function(o) {
  3926. var answer;
  3927. answer = [];
  3928. answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : ""))));
  3929. if (this.expression) {
  3930. answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN));
  3931. }
  3932. answer.push(this.makeCode(";"));
  3933. return answer;
  3934. };
  3935. return Return;
  3936. })(Base);
  3937. exports.Value = Value = (function(_super) {
  3938. __extends(Value, _super);
  3939. function Value(base, props, tag) {
  3940. if (!props && base instanceof Value) {
  3941. return base;
  3942. }
  3943. this.base = base;
  3944. this.properties = props || [];
  3945. if (tag) {
  3946. this[tag] = true;
  3947. }
  3948. return this;
  3949. }
  3950. Value.prototype.children = ['base', 'properties'];
  3951. Value.prototype.add = function(props) {
  3952. this.properties = this.properties.concat(props);
  3953. return this;
  3954. };
  3955. Value.prototype.hasProperties = function() {
  3956. return !!this.properties.length;
  3957. };
  3958. Value.prototype.bareLiteral = function(type) {
  3959. return !this.properties.length && this.base instanceof type;
  3960. };
  3961. Value.prototype.isArray = function() {
  3962. return this.bareLiteral(Arr);
  3963. };
  3964. Value.prototype.isRange = function() {
  3965. return this.bareLiteral(Range);
  3966. };
  3967. Value.prototype.isComplex = function() {
  3968. return this.hasProperties() || this.base.isComplex();
  3969. };
  3970. Value.prototype.isAssignable = function() {
  3971. return this.hasProperties() || this.base.isAssignable();
  3972. };
  3973. Value.prototype.isSimpleNumber = function() {
  3974. return this.bareLiteral(Literal) && SIMPLENUM.test(this.base.value);
  3975. };
  3976. Value.prototype.isString = function() {
  3977. return this.bareLiteral(Literal) && IS_STRING.test(this.base.value);
  3978. };
  3979. Value.prototype.isRegex = function() {
  3980. return this.bareLiteral(Literal) && IS_REGEX.test(this.base.value);
  3981. };
  3982. Value.prototype.isAtomic = function() {
  3983. var node, _i, _len, _ref2;
  3984. _ref2 = this.properties.concat(this.base);
  3985. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  3986. node = _ref2[_i];
  3987. if (node.soak || node instanceof Call) {
  3988. return false;
  3989. }
  3990. }
  3991. return true;
  3992. };
  3993. Value.prototype.isNotCallable = function() {
  3994. return this.isSimpleNumber() || this.isString() || this.isRegex() || this.isArray() || this.isRange() || this.isSplice() || this.isObject();
  3995. };
  3996. Value.prototype.isStatement = function(o) {
  3997. return !this.properties.length && this.base.isStatement(o);
  3998. };
  3999. Value.prototype.assigns = function(name) {
  4000. return !this.properties.length && this.base.assigns(name);
  4001. };
  4002. Value.prototype.jumps = function(o) {
  4003. return !this.properties.length && this.base.jumps(o);
  4004. };
  4005. Value.prototype.isObject = function(onlyGenerated) {
  4006. if (this.properties.length) {
  4007. return false;
  4008. }
  4009. return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated);
  4010. };
  4011. Value.prototype.isSplice = function() {
  4012. return last(this.properties) instanceof Slice;
  4013. };
  4014. Value.prototype.looksStatic = function(className) {
  4015. var _ref2;
  4016. return this.base.value === className && this.properties.length && ((_ref2 = this.properties[0].name) != null ? _ref2.value : void 0) !== 'prototype';
  4017. };
  4018. Value.prototype.unwrap = function() {
  4019. if (this.properties.length) {
  4020. return this;
  4021. } else {
  4022. return this.base;
  4023. }
  4024. };
  4025. Value.prototype.cacheReference = function(o) {
  4026. var base, bref, name, nref;
  4027. name = last(this.properties);
  4028. if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) {
  4029. return [this, this];
  4030. }
  4031. base = new Value(this.base, this.properties.slice(0, -1));
  4032. if (base.isComplex()) {
  4033. bref = new Literal(o.scope.freeVariable('base'));
  4034. base = new Value(new Parens(new Assign(bref, base)));
  4035. }
  4036. if (!name) {
  4037. return [base, bref];
  4038. }
  4039. if (name.isComplex()) {
  4040. nref = new Literal(o.scope.freeVariable('name'));
  4041. name = new Index(new Assign(nref, name.index));
  4042. nref = new Index(nref);
  4043. }
  4044. return [base.add(name), new Value(bref || base.base, [nref || name])];
  4045. };
  4046. Value.prototype.compileNode = function(o) {
  4047. var fragments, prop, props, _i, _len;
  4048. this.base.front = this.front;
  4049. props = this.properties;
  4050. fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null));
  4051. if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(fragmentsToText(fragments))) {
  4052. fragments.push(this.makeCode('.'));
  4053. }
  4054. for (_i = 0, _len = props.length; _i < _len; _i++) {
  4055. prop = props[_i];
  4056. fragments.push.apply(fragments, prop.compileToFragments(o));
  4057. }
  4058. return fragments;
  4059. };
  4060. Value.prototype.unfoldSoak = function(o) {
  4061. return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function(_this) {
  4062. return function() {
  4063. var fst, i, ifn, prop, ref, snd, _i, _len, _ref2, _ref3;
  4064. if (ifn = _this.base.unfoldSoak(o)) {
  4065. (_ref2 = ifn.body.properties).push.apply(_ref2, _this.properties);
  4066. return ifn;
  4067. }
  4068. _ref3 = _this.properties;
  4069. for (i = _i = 0, _len = _ref3.length; _i < _len; i = ++_i) {
  4070. prop = _ref3[i];
  4071. if (!prop.soak) {
  4072. continue;
  4073. }
  4074. prop.soak = false;
  4075. fst = new Value(_this.base, _this.properties.slice(0, i));
  4076. snd = new Value(_this.base, _this.properties.slice(i));
  4077. if (fst.isComplex()) {
  4078. ref = new Literal(o.scope.freeVariable('ref'));
  4079. fst = new Parens(new Assign(ref, fst));
  4080. snd.base = ref;
  4081. }
  4082. return new If(new Existence(fst), snd, {
  4083. soak: true
  4084. });
  4085. }
  4086. return false;
  4087. };
  4088. })(this)();
  4089. };
  4090. return Value;
  4091. })(Base);
  4092. exports.Comment = Comment = (function(_super) {
  4093. __extends(Comment, _super);
  4094. function Comment(comment) {
  4095. this.comment = comment;
  4096. }
  4097. Comment.prototype.isStatement = YES;
  4098. Comment.prototype.makeReturn = THIS;
  4099. Comment.prototype.compileNode = function(o, level) {
  4100. var code, comment;
  4101. comment = this.comment.replace(/^(\s*)#/gm, "$1 *");
  4102. code = "/*" + (multident(comment, this.tab)) + (__indexOf.call(comment, '\n') >= 0 ? "\n" + this.tab : '') + " */";
  4103. if ((level || o.level) === LEVEL_TOP) {
  4104. code = o.indent + code;
  4105. }
  4106. return [this.makeCode("\n"), this.makeCode(code)];
  4107. };
  4108. return Comment;
  4109. })(Base);
  4110. exports.Call = Call = (function(_super) {
  4111. __extends(Call, _super);
  4112. function Call(variable, args, soak) {
  4113. this.args = args != null ? args : [];
  4114. this.soak = soak;
  4115. this.isNew = false;
  4116. this.isSuper = variable === 'super';
  4117. this.variable = this.isSuper ? null : variable;
  4118. if (variable instanceof Value && variable.isNotCallable()) {
  4119. variable.error("literal is not a function");
  4120. }
  4121. }
  4122. Call.prototype.children = ['variable', 'args'];
  4123. Call.prototype.newInstance = function() {
  4124. var base, _ref2;
  4125. base = ((_ref2 = this.variable) != null ? _ref2.base : void 0) || this.variable;
  4126. if (base instanceof Call && !base.isNew) {
  4127. base.newInstance();
  4128. } else {
  4129. this.isNew = true;
  4130. }
  4131. return this;
  4132. };
  4133. Call.prototype.superReference = function(o) {
  4134. var accesses, method;
  4135. method = o.scope.namedMethod();
  4136. if (method != null ? method.klass : void 0) {
  4137. accesses = [new Access(new Literal('__super__'))];
  4138. if (method["static"]) {
  4139. accesses.push(new Access(new Literal('constructor')));
  4140. }
  4141. accesses.push(new Access(new Literal(method.name)));
  4142. return (new Value(new Literal(method.klass), accesses)).compile(o);
  4143. } else if (method != null ? method.ctor : void 0) {
  4144. return "" + method.name + ".__super__.constructor";
  4145. } else {
  4146. return this.error('cannot call super outside of an instance method.');
  4147. }
  4148. };
  4149. Call.prototype.superThis = function(o) {
  4150. var method;
  4151. method = o.scope.method;
  4152. return (method && !method.klass && method.context) || "this";
  4153. };
  4154. Call.prototype.unfoldSoak = function(o) {
  4155. var call, ifn, left, list, rite, _i, _len, _ref2, _ref3;
  4156. if (this.soak) {
  4157. if (this.variable) {
  4158. if (ifn = unfoldSoak(o, this, 'variable')) {
  4159. return ifn;
  4160. }
  4161. _ref2 = new Value(this.variable).cacheReference(o), left = _ref2[0], rite = _ref2[1];
  4162. } else {
  4163. left = new Literal(this.superReference(o));
  4164. rite = new Value(left);
  4165. }
  4166. rite = new Call(rite, this.args);
  4167. rite.isNew = this.isNew;
  4168. left = new Literal("typeof " + (left.compile(o)) + " === \"function\"");
  4169. return new If(left, new Value(rite), {
  4170. soak: true
  4171. });
  4172. }
  4173. call = this;
  4174. list = [];
  4175. while (true) {
  4176. if (call.variable instanceof Call) {
  4177. list.push(call);
  4178. call = call.variable;
  4179. continue;
  4180. }
  4181. if (!(call.variable instanceof Value)) {
  4182. break;
  4183. }
  4184. list.push(call);
  4185. if (!((call = call.variable.base) instanceof Call)) {
  4186. break;
  4187. }
  4188. }
  4189. _ref3 = list.reverse();
  4190. for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
  4191. call = _ref3[_i];
  4192. if (ifn) {
  4193. if (call.variable instanceof Call) {
  4194. call.variable = ifn;
  4195. } else {
  4196. call.variable.base = ifn;
  4197. }
  4198. }
  4199. ifn = unfoldSoak(o, call, 'variable');
  4200. }
  4201. return ifn;
  4202. };
  4203. Call.prototype.compileNode = function(o) {
  4204. var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref2, _ref3;
  4205. if ((_ref2 = this.variable) != null) {
  4206. _ref2.front = this.front;
  4207. }
  4208. compiledArray = Splat.compileSplattedArray(o, this.args, true);
  4209. if (compiledArray.length) {
  4210. return this.compileSplat(o, compiledArray);
  4211. }
  4212. compiledArgs = [];
  4213. _ref3 = this.args;
  4214. for (argIndex = _i = 0, _len = _ref3.length; _i < _len; argIndex = ++_i) {
  4215. arg = _ref3[argIndex];
  4216. if (argIndex) {
  4217. compiledArgs.push(this.makeCode(", "));
  4218. }
  4219. compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST));
  4220. }
  4221. fragments = [];
  4222. if (this.isSuper) {
  4223. preface = this.superReference(o) + (".call(" + (this.superThis(o)));
  4224. if (compiledArgs.length) {
  4225. preface += ", ";
  4226. }
  4227. fragments.push(this.makeCode(preface));
  4228. } else {
  4229. if (this.isNew) {
  4230. fragments.push(this.makeCode('new '));
  4231. }
  4232. fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS));
  4233. fragments.push(this.makeCode("("));
  4234. }
  4235. fragments.push.apply(fragments, compiledArgs);
  4236. fragments.push(this.makeCode(")"));
  4237. return fragments;
  4238. };
  4239. Call.prototype.compileSplat = function(o, splatArgs) {
  4240. var answer, base, fun, idt, name, ref;
  4241. if (this.isSuper) {
  4242. return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")"));
  4243. }
  4244. if (this.isNew) {
  4245. idt = this.tab + TAB;
  4246. return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})"));
  4247. }
  4248. answer = [];
  4249. base = new Value(this.variable);
  4250. if ((name = base.properties.pop()) && base.isComplex()) {
  4251. ref = o.scope.freeVariable('ref');
  4252. answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o));
  4253. } else {
  4254. fun = base.compileToFragments(o, LEVEL_ACCESS);
  4255. if (SIMPLENUM.test(fragmentsToText(fun))) {
  4256. fun = this.wrapInBraces(fun);
  4257. }
  4258. if (name) {
  4259. ref = fragmentsToText(fun);
  4260. fun.push.apply(fun, name.compileToFragments(o));
  4261. } else {
  4262. ref = 'null';
  4263. }
  4264. answer = answer.concat(fun);
  4265. }
  4266. return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")"));
  4267. };
  4268. return Call;
  4269. })(Base);
  4270. exports.Extends = Extends = (function(_super) {
  4271. __extends(Extends, _super);
  4272. function Extends(child, parent) {
  4273. this.child = child;
  4274. this.parent = parent;
  4275. }
  4276. Extends.prototype.children = ['child', 'parent'];
  4277. Extends.prototype.compileToFragments = function(o) {
  4278. return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compileToFragments(o);
  4279. };
  4280. return Extends;
  4281. })(Base);
  4282. exports.Access = Access = (function(_super) {
  4283. __extends(Access, _super);
  4284. function Access(name, tag) {
  4285. this.name = name;
  4286. this.name.asKey = true;
  4287. this.soak = tag === 'soak';
  4288. }
  4289. Access.prototype.children = ['name'];
  4290. Access.prototype.compileToFragments = function(o) {
  4291. var name;
  4292. name = this.name.compileToFragments(o);
  4293. if (IDENTIFIER.test(fragmentsToText(name))) {
  4294. name.unshift(this.makeCode("."));
  4295. } else {
  4296. name.unshift(this.makeCode("["));
  4297. name.push(this.makeCode("]"));
  4298. }
  4299. return name;
  4300. };
  4301. Access.prototype.isComplex = NO;
  4302. return Access;
  4303. })(Base);
  4304. exports.Index = Index = (function(_super) {
  4305. __extends(Index, _super);
  4306. function Index(index) {
  4307. this.index = index;
  4308. }
  4309. Index.prototype.children = ['index'];
  4310. Index.prototype.compileToFragments = function(o) {
  4311. return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]"));
  4312. };
  4313. Index.prototype.isComplex = function() {
  4314. return this.index.isComplex();
  4315. };
  4316. return Index;
  4317. })(Base);
  4318. exports.Range = Range = (function(_super) {
  4319. __extends(Range, _super);
  4320. Range.prototype.children = ['from', 'to'];
  4321. function Range(from, to, tag) {
  4322. this.from = from;
  4323. this.to = to;
  4324. this.exclusive = tag === 'exclusive';
  4325. this.equals = this.exclusive ? '' : '=';
  4326. }
  4327. Range.prototype.compileVariables = function(o) {
  4328. var step, _ref2, _ref3, _ref4, _ref5;
  4329. o = merge(o, {
  4330. top: true
  4331. });
  4332. _ref2 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref2[0], this.fromVar = _ref2[1];
  4333. _ref3 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref3[0], this.toVar = _ref3[1];
  4334. if (step = del(o, 'step')) {
  4335. _ref4 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref4[0], this.stepVar = _ref4[1];
  4336. }
  4337. _ref5 = [this.fromVar.match(NUMBER), this.toVar.match(NUMBER)], this.fromNum = _ref5[0], this.toNum = _ref5[1];
  4338. if (this.stepVar) {
  4339. return this.stepNum = this.stepVar.match(NUMBER);
  4340. }
  4341. };
  4342. Range.prototype.compileNode = function(o) {
  4343. var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref2, _ref3;
  4344. if (!this.fromVar) {
  4345. this.compileVariables(o);
  4346. }
  4347. if (!o.index) {
  4348. return this.compileArray(o);
  4349. }
  4350. known = this.fromNum && this.toNum;
  4351. idx = del(o, 'index');
  4352. idxName = del(o, 'name');
  4353. namedIndex = idxName && idxName !== idx;
  4354. varPart = "" + idx + " = " + this.fromC;
  4355. if (this.toC !== this.toVar) {
  4356. varPart += ", " + this.toC;
  4357. }
  4358. if (this.step !== this.stepVar) {
  4359. varPart += ", " + this.step;
  4360. }
  4361. _ref2 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref2[0], gt = _ref2[1];
  4362. condPart = this.stepNum ? parseNum(this.stepNum[0]) > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [parseNum(this.fromNum[0]), parseNum(this.toNum[0])], from = _ref3[0], to = _ref3[1], _ref3), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar);
  4363. stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--";
  4364. if (namedIndex) {
  4365. varPart = "" + idxName + " = " + varPart;
  4366. }
  4367. if (namedIndex) {
  4368. stepPart = "" + idxName + " = " + stepPart;
  4369. }
  4370. return [this.makeCode("" + varPart + "; " + condPart + "; " + stepPart)];
  4371. };
  4372. Range.prototype.compileArray = function(o) {
  4373. var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results;
  4374. if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) {
  4375. range = (function() {
  4376. _results = [];
  4377. for (var _i = _ref2 = +this.fromNum, _ref3 = +this.toNum; _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); }
  4378. return _results;
  4379. }).apply(this);
  4380. if (this.exclusive) {
  4381. range.pop();
  4382. }
  4383. return [this.makeCode("[" + (range.join(', ')) + "]")];
  4384. }
  4385. idt = this.tab + TAB;
  4386. i = o.scope.freeVariable('i');
  4387. result = o.scope.freeVariable('results');
  4388. pre = "\n" + idt + result + " = [];";
  4389. if (this.fromNum && this.toNum) {
  4390. o.index = i;
  4391. body = fragmentsToText(this.compileNode(o));
  4392. } else {
  4393. vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : '');
  4394. cond = "" + this.fromVar + " <= " + this.toVar;
  4395. body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--";
  4396. }
  4397. post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent;
  4398. hasArgs = function(node) {
  4399. return node != null ? node.contains(isLiteralArguments) : void 0;
  4400. };
  4401. if (hasArgs(this.from) || hasArgs(this.to)) {
  4402. args = ', arguments';
  4403. }
  4404. return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")];
  4405. };
  4406. return Range;
  4407. })(Base);
  4408. exports.Slice = Slice = (function(_super) {
  4409. __extends(Slice, _super);
  4410. Slice.prototype.children = ['range'];
  4411. function Slice(range) {
  4412. this.range = range;
  4413. Slice.__super__.constructor.call(this);
  4414. }
  4415. Slice.prototype.compileNode = function(o) {
  4416. var compiled, compiledText, from, fromCompiled, to, toStr, _ref2;
  4417. _ref2 = this.range, to = _ref2.to, from = _ref2.from;
  4418. fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')];
  4419. if (to) {
  4420. compiled = to.compileToFragments(o, LEVEL_PAREN);
  4421. compiledText = fragmentsToText(compiled);
  4422. if (!(!this.range.exclusive && +compiledText === -1)) {
  4423. toStr = ', ' + (this.range.exclusive ? compiledText : SIMPLENUM.test(compiledText) ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9"));
  4424. }
  4425. }
  4426. return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")];
  4427. };
  4428. return Slice;
  4429. })(Base);
  4430. exports.Obj = Obj = (function(_super) {
  4431. __extends(Obj, _super);
  4432. function Obj(props, generated) {
  4433. this.generated = generated != null ? generated : false;
  4434. this.objects = this.properties = props || [];
  4435. }
  4436. Obj.prototype.children = ['properties'];
  4437. Obj.prototype.compileNode = function(o) {
  4438. var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1;
  4439. props = this.properties;
  4440. if (!props.length) {
  4441. return [this.makeCode(this.front ? '({})' : '{}')];
  4442. }
  4443. if (this.generated) {
  4444. for (_i = 0, _len = props.length; _i < _len; _i++) {
  4445. node = props[_i];
  4446. if (node instanceof Value) {
  4447. node.error('cannot have an implicit value in an implicit object');
  4448. }
  4449. }
  4450. }
  4451. idt = o.indent += TAB;
  4452. lastNoncom = this.lastNonComment(this.properties);
  4453. answer = [];
  4454. for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) {
  4455. prop = props[i];
  4456. join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n';
  4457. indent = prop instanceof Comment ? '' : idt;
  4458. if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) {
  4459. prop.variable.error('Invalid object key');
  4460. }
  4461. if (prop instanceof Value && prop["this"]) {
  4462. prop = new Assign(prop.properties[0].name, prop, 'object');
  4463. }
  4464. if (!(prop instanceof Comment)) {
  4465. if (!(prop instanceof Assign)) {
  4466. prop = new Assign(prop, prop, 'object');
  4467. }
  4468. (prop.variable.base || prop.variable).asKey = true;
  4469. }
  4470. if (indent) {
  4471. answer.push(this.makeCode(indent));
  4472. }
  4473. answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP));
  4474. if (join) {
  4475. answer.push(this.makeCode(join));
  4476. }
  4477. }
  4478. answer.unshift(this.makeCode("{" + (props.length && '\n')));
  4479. answer.push(this.makeCode("" + (props.length && '\n' + this.tab) + "}"));
  4480. if (this.front) {
  4481. return this.wrapInBraces(answer);
  4482. } else {
  4483. return answer;
  4484. }
  4485. };
  4486. Obj.prototype.assigns = function(name) {
  4487. var prop, _i, _len, _ref2;
  4488. _ref2 = this.properties;
  4489. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  4490. prop = _ref2[_i];
  4491. if (prop.assigns(name)) {
  4492. return true;
  4493. }
  4494. }
  4495. return false;
  4496. };
  4497. return Obj;
  4498. })(Base);
  4499. exports.Arr = Arr = (function(_super) {
  4500. __extends(Arr, _super);
  4501. function Arr(objs) {
  4502. this.objects = objs || [];
  4503. }
  4504. Arr.prototype.children = ['objects'];
  4505. Arr.prototype.compileNode = function(o) {
  4506. var answer, compiledObjs, fragments, index, obj, _i, _len;
  4507. if (!this.objects.length) {
  4508. return [this.makeCode('[]')];
  4509. }
  4510. o.indent += TAB;
  4511. answer = Splat.compileSplattedArray(o, this.objects);
  4512. if (answer.length) {
  4513. return answer;
  4514. }
  4515. answer = [];
  4516. compiledObjs = (function() {
  4517. var _i, _len, _ref2, _results;
  4518. _ref2 = this.objects;
  4519. _results = [];
  4520. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  4521. obj = _ref2[_i];
  4522. _results.push(obj.compileToFragments(o, LEVEL_LIST));
  4523. }
  4524. return _results;
  4525. }).call(this);
  4526. for (index = _i = 0, _len = compiledObjs.length; _i < _len; index = ++_i) {
  4527. fragments = compiledObjs[index];
  4528. if (index) {
  4529. answer.push(this.makeCode(", "));
  4530. }
  4531. answer.push.apply(answer, fragments);
  4532. }
  4533. if (fragmentsToText(answer).indexOf('\n') >= 0) {
  4534. answer.unshift(this.makeCode("[\n" + o.indent));
  4535. answer.push(this.makeCode("\n" + this.tab + "]"));
  4536. } else {
  4537. answer.unshift(this.makeCode("["));
  4538. answer.push(this.makeCode("]"));
  4539. }
  4540. return answer;
  4541. };
  4542. Arr.prototype.assigns = function(name) {
  4543. var obj, _i, _len, _ref2;
  4544. _ref2 = this.objects;
  4545. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  4546. obj = _ref2[_i];
  4547. if (obj.assigns(name)) {
  4548. return true;
  4549. }
  4550. }
  4551. return false;
  4552. };
  4553. return Arr;
  4554. })(Base);
  4555. exports.Class = Class = (function(_super) {
  4556. __extends(Class, _super);
  4557. function Class(variable, parent, body) {
  4558. this.variable = variable;
  4559. this.parent = parent;
  4560. this.body = body != null ? body : new Block;
  4561. this.boundFuncs = [];
  4562. this.body.classBody = true;
  4563. }
  4564. Class.prototype.children = ['variable', 'parent', 'body'];
  4565. Class.prototype.determineName = function() {
  4566. var decl, tail;
  4567. if (!this.variable) {
  4568. return null;
  4569. }
  4570. decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value;
  4571. if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) {
  4572. this.variable.error("class variable name may not be " + decl);
  4573. }
  4574. return decl && (decl = IDENTIFIER.test(decl) && decl);
  4575. };
  4576. Class.prototype.setContext = function(name) {
  4577. return this.body.traverseChildren(false, function(node) {
  4578. if (node.classBody) {
  4579. return false;
  4580. }
  4581. if (node instanceof Literal && node.value === 'this') {
  4582. return node.value = name;
  4583. } else if (node instanceof Code) {
  4584. node.klass = name;
  4585. if (node.bound) {
  4586. return node.context = name;
  4587. }
  4588. }
  4589. });
  4590. };
  4591. Class.prototype.addBoundFunctions = function(o) {
  4592. var bvar, lhs, _i, _len, _ref2;
  4593. _ref2 = this.boundFuncs;
  4594. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  4595. bvar = _ref2[_i];
  4596. lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o);
  4597. this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)"));
  4598. }
  4599. };
  4600. Class.prototype.addProperties = function(node, name, o) {
  4601. var assign, base, exprs, func, props;
  4602. props = node.base.properties.slice(0);
  4603. exprs = (function() {
  4604. var _results;
  4605. _results = [];
  4606. while (assign = props.shift()) {
  4607. if (assign instanceof Assign) {
  4608. base = assign.variable.base;
  4609. delete assign.context;
  4610. func = assign.value;
  4611. if (base.value === 'constructor') {
  4612. if (this.ctor) {
  4613. assign.error('cannot define more than one constructor in a class');
  4614. }
  4615. if (func.bound) {
  4616. assign.error('cannot define a constructor as a bound function');
  4617. }
  4618. if (func instanceof Code) {
  4619. assign = this.ctor = func;
  4620. } else {
  4621. this.externalCtor = o.classScope.freeVariable('class');
  4622. assign = new Assign(new Literal(this.externalCtor), func);
  4623. }
  4624. } else {
  4625. if (assign.variable["this"]) {
  4626. func["static"] = true;
  4627. } else {
  4628. assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]);
  4629. if (func instanceof Code && func.bound) {
  4630. this.boundFuncs.push(base);
  4631. func.bound = false;
  4632. }
  4633. }
  4634. }
  4635. }
  4636. _results.push(assign);
  4637. }
  4638. return _results;
  4639. }).call(this);
  4640. return compact(exprs);
  4641. };
  4642. Class.prototype.walkBody = function(name, o) {
  4643. return this.traverseChildren(false, (function(_this) {
  4644. return function(child) {
  4645. var cont, exps, i, node, _i, _len, _ref2;
  4646. cont = true;
  4647. if (child instanceof Class) {
  4648. return false;
  4649. }
  4650. if (child instanceof Block) {
  4651. _ref2 = exps = child.expressions;
  4652. for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
  4653. node = _ref2[i];
  4654. if (node instanceof Assign && node.variable.looksStatic(name)) {
  4655. node.value["static"] = true;
  4656. } else if (node instanceof Value && node.isObject(true)) {
  4657. cont = false;
  4658. exps[i] = _this.addProperties(node, name, o);
  4659. }
  4660. }
  4661. child.expressions = exps = flatten(exps);
  4662. }
  4663. return cont && !(child instanceof Class);
  4664. };
  4665. })(this));
  4666. };
  4667. Class.prototype.hoistDirectivePrologue = function() {
  4668. var expressions, index, node;
  4669. index = 0;
  4670. expressions = this.body.expressions;
  4671. while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) {
  4672. ++index;
  4673. }
  4674. return this.directives = expressions.splice(0, index);
  4675. };
  4676. Class.prototype.ensureConstructor = function(name) {
  4677. if (!this.ctor) {
  4678. this.ctor = new Code;
  4679. if (this.externalCtor) {
  4680. this.ctor.body.push(new Literal("" + this.externalCtor + ".apply(this, arguments)"));
  4681. } else if (this.parent) {
  4682. this.ctor.body.push(new Literal("" + name + ".__super__.constructor.apply(this, arguments)"));
  4683. }
  4684. this.ctor.body.makeReturn();
  4685. this.body.expressions.unshift(this.ctor);
  4686. }
  4687. this.ctor.ctor = this.ctor.name = name;
  4688. this.ctor.klass = null;
  4689. return this.ctor.noReturn = true;
  4690. };
  4691. Class.prototype.compileNode = function(o) {
  4692. var args, argumentsNode, func, jumpNode, klass, lname, name, superClass, _ref2;
  4693. if (jumpNode = this.body.jumps()) {
  4694. jumpNode.error('Class bodies cannot contain pure statements');
  4695. }
  4696. if (argumentsNode = this.body.contains(isLiteralArguments)) {
  4697. argumentsNode.error("Class bodies shouldn't reference arguments");
  4698. }
  4699. name = this.determineName() || '_Class';
  4700. if (name.reserved) {
  4701. name = "_" + name;
  4702. }
  4703. lname = new Literal(name);
  4704. func = new Code([], Block.wrap([this.body]));
  4705. args = [];
  4706. o.classScope = func.makeScope(o.scope);
  4707. this.hoistDirectivePrologue();
  4708. this.setContext(name);
  4709. this.walkBody(name, o);
  4710. this.ensureConstructor(name);
  4711. this.addBoundFunctions(o);
  4712. this.body.spaced = true;
  4713. this.body.expressions.push(lname);
  4714. if (this.parent) {
  4715. superClass = new Literal(o.classScope.freeVariable('super', false));
  4716. this.body.expressions.unshift(new Extends(lname, superClass));
  4717. func.params.push(new Param(superClass));
  4718. args.push(this.parent);
  4719. }
  4720. (_ref2 = this.body.expressions).unshift.apply(_ref2, this.directives);
  4721. klass = new Parens(new Call(func, args));
  4722. if (this.variable) {
  4723. klass = new Assign(this.variable, klass);
  4724. }
  4725. return klass.compileToFragments(o);
  4726. };
  4727. return Class;
  4728. })(Base);
  4729. exports.Assign = Assign = (function(_super) {
  4730. __extends(Assign, _super);
  4731. function Assign(variable, value, context, options) {
  4732. var forbidden, name, _ref2;
  4733. this.variable = variable;
  4734. this.value = value;
  4735. this.context = context;
  4736. this.param = options && options.param;
  4737. this.subpattern = options && options.subpattern;
  4738. forbidden = (_ref2 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0);
  4739. if (forbidden && this.context !== 'object') {
  4740. this.variable.error("variable name may not be \"" + name + "\"");
  4741. }
  4742. }
  4743. Assign.prototype.children = ['variable', 'value'];
  4744. Assign.prototype.isStatement = function(o) {
  4745. return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0;
  4746. };
  4747. Assign.prototype.assigns = function(name) {
  4748. return this[this.context === 'object' ? 'value' : 'variable'].assigns(name);
  4749. };
  4750. Assign.prototype.unfoldSoak = function(o) {
  4751. return unfoldSoak(o, this, 'variable');
  4752. };
  4753. Assign.prototype.compileNode = function(o) {
  4754. var answer, compiledName, isValue, match, name, val, varBase, _ref2, _ref3, _ref4;
  4755. if (isValue = this.variable instanceof Value) {
  4756. if (this.variable.isArray() || this.variable.isObject()) {
  4757. return this.compilePatternMatch(o);
  4758. }
  4759. if (this.variable.isSplice()) {
  4760. return this.compileSplice(o);
  4761. }
  4762. if ((_ref2 = this.context) === '||=' || _ref2 === '&&=' || _ref2 === '?=') {
  4763. return this.compileConditional(o);
  4764. }
  4765. }
  4766. compiledName = this.variable.compileToFragments(o, LEVEL_LIST);
  4767. name = fragmentsToText(compiledName);
  4768. if (!this.context) {
  4769. varBase = this.variable.unwrapAll();
  4770. if (!varBase.isAssignable()) {
  4771. this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned");
  4772. }
  4773. if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) {
  4774. if (this.param) {
  4775. o.scope.add(name, 'var');
  4776. } else {
  4777. o.scope.find(name);
  4778. }
  4779. }
  4780. }
  4781. if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) {
  4782. if (match[2]) {
  4783. this.value.klass = match[1];
  4784. }
  4785. this.value.name = (_ref3 = (_ref4 = match[3]) != null ? _ref4 : match[4]) != null ? _ref3 : match[5];
  4786. }
  4787. val = this.value.compileToFragments(o, LEVEL_LIST);
  4788. if (this.context === 'object') {
  4789. return compiledName.concat(this.makeCode(": "), val);
  4790. }
  4791. answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val);
  4792. if (o.level <= LEVEL_LIST) {
  4793. return answer;
  4794. } else {
  4795. return this.wrapInBraces(answer);
  4796. }
  4797. };
  4798. Assign.prototype.compilePatternMatch = function(o) {
  4799. var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
  4800. top = o.level === LEVEL_TOP;
  4801. value = this.value;
  4802. objects = this.variable.base.objects;
  4803. if (!(olen = objects.length)) {
  4804. code = value.compileToFragments(o);
  4805. if (o.level >= LEVEL_OP) {
  4806. return this.wrapInBraces(code);
  4807. } else {
  4808. return code;
  4809. }
  4810. }
  4811. isObject = this.variable.isObject();
  4812. if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) {
  4813. if (obj instanceof Assign) {
  4814. _ref2 = obj, (_ref3 = _ref2.variable, idx = _ref3.base), obj = _ref2.value;
  4815. } else {
  4816. idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0);
  4817. }
  4818. acc = IDENTIFIER.test(idx.unwrap().value || 0);
  4819. value = new Value(value);
  4820. value.properties.push(new (acc ? Access : Index)(idx));
  4821. if (_ref4 = obj.unwrap().value, __indexOf.call(RESERVED, _ref4) >= 0) {
  4822. obj.error("assignment to a reserved word: " + (obj.compile(o)));
  4823. }
  4824. return new Assign(obj, value, null, {
  4825. param: this.param
  4826. }).compileToFragments(o, LEVEL_TOP);
  4827. }
  4828. vvar = value.compileToFragments(o, LEVEL_LIST);
  4829. vvarText = fragmentsToText(vvar);
  4830. assigns = [];
  4831. splat = false;
  4832. if (!IDENTIFIER.test(vvarText) || this.variable.assigns(vvarText)) {
  4833. assigns.push([this.makeCode("" + (ref = o.scope.freeVariable('ref')) + " = ")].concat(__slice.call(vvar)));
  4834. vvar = [this.makeCode(ref)];
  4835. vvarText = ref;
  4836. }
  4837. for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) {
  4838. obj = objects[i];
  4839. idx = i;
  4840. if (isObject) {
  4841. if (obj instanceof Assign) {
  4842. _ref5 = obj, (_ref6 = _ref5.variable, idx = _ref6.base), obj = _ref5.value;
  4843. } else {
  4844. if (obj.base instanceof Parens) {
  4845. _ref7 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref7[0], idx = _ref7[1];
  4846. } else {
  4847. idx = obj["this"] ? obj.properties[0].name : obj;
  4848. }
  4849. }
  4850. }
  4851. if (!splat && obj instanceof Splat) {
  4852. name = obj.name.unwrap().value;
  4853. obj = obj.unwrap();
  4854. val = "" + olen + " <= " + vvarText + ".length ? " + (utility('slice')) + ".call(" + vvarText + ", " + i;
  4855. if (rest = olen - i - 1) {
  4856. ivar = o.scope.freeVariable('i');
  4857. val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])";
  4858. } else {
  4859. val += ") : []";
  4860. }
  4861. val = new Literal(val);
  4862. splat = "" + ivar + "++";
  4863. } else {
  4864. name = obj.unwrap().value;
  4865. if (obj instanceof Splat) {
  4866. obj.error("multiple splats are disallowed in an assignment");
  4867. }
  4868. if (typeof idx === 'number') {
  4869. idx = new Literal(splat || idx);
  4870. acc = false;
  4871. } else {
  4872. acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0);
  4873. }
  4874. val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]);
  4875. }
  4876. if ((name != null) && __indexOf.call(RESERVED, name) >= 0) {
  4877. obj.error("assignment to a reserved word: " + (obj.compile(o)));
  4878. }
  4879. assigns.push(new Assign(obj, val, null, {
  4880. param: this.param,
  4881. subpattern: true
  4882. }).compileToFragments(o, LEVEL_LIST));
  4883. }
  4884. if (!(top || this.subpattern)) {
  4885. assigns.push(vvar);
  4886. }
  4887. fragments = this.joinFragmentArrays(assigns, ', ');
  4888. if (o.level < LEVEL_LIST) {
  4889. return fragments;
  4890. } else {
  4891. return this.wrapInBraces(fragments);
  4892. }
  4893. };
  4894. Assign.prototype.compileConditional = function(o) {
  4895. var fragments, left, right, _ref2;
  4896. _ref2 = this.variable.cacheReference(o), left = _ref2[0], right = _ref2[1];
  4897. if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) {
  4898. this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before");
  4899. }
  4900. if (__indexOf.call(this.context, "?") >= 0) {
  4901. o.isExistentialEquals = true;
  4902. return new If(new Existence(left), right, {
  4903. type: 'if'
  4904. }).addElse(new Assign(right, this.value, '=')).compileToFragments(o);
  4905. } else {
  4906. fragments = new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o);
  4907. if (o.level <= LEVEL_LIST) {
  4908. return fragments;
  4909. } else {
  4910. return this.wrapInBraces(fragments);
  4911. }
  4912. }
  4913. };
  4914. Assign.prototype.compileSplice = function(o) {
  4915. var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref2, _ref3, _ref4;
  4916. _ref2 = this.variable.properties.pop().range, from = _ref2.from, to = _ref2.to, exclusive = _ref2.exclusive;
  4917. name = this.variable.compile(o);
  4918. if (from) {
  4919. _ref3 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref3[0], fromRef = _ref3[1];
  4920. } else {
  4921. fromDecl = fromRef = '0';
  4922. }
  4923. if (to) {
  4924. if (from instanceof Value && from.isSimpleNumber() && to instanceof Value && to.isSimpleNumber()) {
  4925. to = to.compile(o) - fromRef;
  4926. if (!exclusive) {
  4927. to += 1;
  4928. }
  4929. } else {
  4930. to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef;
  4931. if (!exclusive) {
  4932. to += ' + 1';
  4933. }
  4934. }
  4935. } else {
  4936. to = "9e9";
  4937. }
  4938. _ref4 = this.value.cache(o, LEVEL_LIST), valDef = _ref4[0], valRef = _ref4[1];
  4939. answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef);
  4940. if (o.level > LEVEL_TOP) {
  4941. return this.wrapInBraces(answer);
  4942. } else {
  4943. return answer;
  4944. }
  4945. };
  4946. return Assign;
  4947. })(Base);
  4948. exports.Code = Code = (function(_super) {
  4949. __extends(Code, _super);
  4950. function Code(params, body, tag) {
  4951. this.params = params || [];
  4952. this.body = body || new Block;
  4953. this.bound = tag === 'boundfunc';
  4954. }
  4955. Code.prototype.children = ['params', 'body'];
  4956. Code.prototype.isStatement = function() {
  4957. return !!this.ctor;
  4958. };
  4959. Code.prototype.jumps = NO;
  4960. Code.prototype.makeScope = function(parentScope) {
  4961. return new Scope(parentScope, this.body, this);
  4962. };
  4963. Code.prototype.compileNode = function(o) {
  4964. var answer, boundfunc, code, exprs, i, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, wrapper, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
  4965. if (this.bound && ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0)) {
  4966. this.context = o.scope.method.context;
  4967. }
  4968. if (this.bound && !this.context) {
  4969. this.context = '_this';
  4970. wrapper = new Code([new Param(new Literal(this.context))], new Block([this]));
  4971. boundfunc = new Call(wrapper, [new Literal('this')]);
  4972. boundfunc.updateLocationDataIfMissing(this.locationData);
  4973. return boundfunc.compileNode(o);
  4974. }
  4975. o.scope = del(o, 'classScope') || this.makeScope(o.scope);
  4976. o.scope.shared = del(o, 'sharedScope');
  4977. o.indent += TAB;
  4978. delete o.bare;
  4979. delete o.isExistentialEquals;
  4980. params = [];
  4981. exprs = [];
  4982. _ref3 = this.params;
  4983. for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
  4984. param = _ref3[_i];
  4985. o.scope.parameter(param.asReference(o));
  4986. }
  4987. _ref4 = this.params;
  4988. for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
  4989. param = _ref4[_j];
  4990. if (!param.splat) {
  4991. continue;
  4992. }
  4993. _ref5 = this.params;
  4994. for (_k = 0, _len2 = _ref5.length; _k < _len2; _k++) {
  4995. p = _ref5[_k].name;
  4996. if (p["this"]) {
  4997. p = p.properties[0].name;
  4998. }
  4999. if (p.value) {
  5000. o.scope.add(p.value, 'var', true);
  5001. }
  5002. }
  5003. splats = new Assign(new Value(new Arr((function() {
  5004. var _l, _len3, _ref6, _results;
  5005. _ref6 = this.params;
  5006. _results = [];
  5007. for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) {
  5008. p = _ref6[_l];
  5009. _results.push(p.asReference(o));
  5010. }
  5011. return _results;
  5012. }).call(this))), new Value(new Literal('arguments')));
  5013. break;
  5014. }
  5015. _ref6 = this.params;
  5016. for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) {
  5017. param = _ref6[_l];
  5018. if (param.isComplex()) {
  5019. val = ref = param.asReference(o);
  5020. if (param.value) {
  5021. val = new Op('?', ref, param.value);
  5022. }
  5023. exprs.push(new Assign(new Value(param.name), val, '=', {
  5024. param: true
  5025. }));
  5026. } else {
  5027. ref = param;
  5028. if (param.value) {
  5029. lit = new Literal(ref.name.value + ' == null');
  5030. val = new Assign(new Value(param.name), param.value, '=');
  5031. exprs.push(new If(lit, val));
  5032. }
  5033. }
  5034. if (!splats) {
  5035. params.push(ref);
  5036. }
  5037. }
  5038. wasEmpty = this.body.isEmpty();
  5039. if (splats) {
  5040. exprs.unshift(splats);
  5041. }
  5042. if (exprs.length) {
  5043. (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs);
  5044. }
  5045. for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) {
  5046. p = params[i];
  5047. params[i] = p.compileToFragments(o);
  5048. o.scope.parameter(fragmentsToText(params[i]));
  5049. }
  5050. uniqs = [];
  5051. this.eachParamName(function(name, node) {
  5052. if (__indexOf.call(uniqs, name) >= 0) {
  5053. node.error("multiple parameters named '" + name + "'");
  5054. }
  5055. return uniqs.push(name);
  5056. });
  5057. if (!(wasEmpty || this.noReturn)) {
  5058. this.body.makeReturn();
  5059. }
  5060. code = 'function';
  5061. if (this.ctor) {
  5062. code += ' ' + this.name;
  5063. }
  5064. code += '(';
  5065. answer = [this.makeCode(code)];
  5066. for (i = _n = 0, _len5 = params.length; _n < _len5; i = ++_n) {
  5067. p = params[i];
  5068. if (i) {
  5069. answer.push(this.makeCode(", "));
  5070. }
  5071. answer.push.apply(answer, p);
  5072. }
  5073. answer.push(this.makeCode(') {'));
  5074. if (!this.body.isEmpty()) {
  5075. answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab));
  5076. }
  5077. answer.push(this.makeCode('}'));
  5078. if (this.ctor) {
  5079. return [this.makeCode(this.tab)].concat(__slice.call(answer));
  5080. }
  5081. if (this.front || (o.level >= LEVEL_ACCESS)) {
  5082. return this.wrapInBraces(answer);
  5083. } else {
  5084. return answer;
  5085. }
  5086. };
  5087. Code.prototype.eachParamName = function(iterator) {
  5088. var param, _i, _len, _ref2, _results;
  5089. _ref2 = this.params;
  5090. _results = [];
  5091. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5092. param = _ref2[_i];
  5093. _results.push(param.eachName(iterator));
  5094. }
  5095. return _results;
  5096. };
  5097. Code.prototype.traverseChildren = function(crossScope, func) {
  5098. if (crossScope) {
  5099. return Code.__super__.traverseChildren.call(this, crossScope, func);
  5100. }
  5101. };
  5102. return Code;
  5103. })(Base);
  5104. exports.Param = Param = (function(_super) {
  5105. __extends(Param, _super);
  5106. function Param(name, value, splat) {
  5107. var _ref2;
  5108. this.name = name;
  5109. this.value = value;
  5110. this.splat = splat;
  5111. if (_ref2 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) {
  5112. this.name.error("parameter name \"" + name + "\" is not allowed");
  5113. }
  5114. }
  5115. Param.prototype.children = ['name', 'value'];
  5116. Param.prototype.compileToFragments = function(o) {
  5117. return this.name.compileToFragments(o, LEVEL_LIST);
  5118. };
  5119. Param.prototype.asReference = function(o) {
  5120. var node;
  5121. if (this.reference) {
  5122. return this.reference;
  5123. }
  5124. node = this.name;
  5125. if (node["this"]) {
  5126. node = node.properties[0].name;
  5127. if (node.value.reserved) {
  5128. node = new Literal(o.scope.freeVariable(node.value));
  5129. }
  5130. } else if (node.isComplex()) {
  5131. node = new Literal(o.scope.freeVariable('arg'));
  5132. }
  5133. node = new Value(node);
  5134. if (this.splat) {
  5135. node = new Splat(node);
  5136. }
  5137. node.updateLocationDataIfMissing(this.locationData);
  5138. return this.reference = node;
  5139. };
  5140. Param.prototype.isComplex = function() {
  5141. return this.name.isComplex();
  5142. };
  5143. Param.prototype.eachName = function(iterator, name) {
  5144. var atParam, node, obj, _i, _len, _ref2;
  5145. if (name == null) {
  5146. name = this.name;
  5147. }
  5148. atParam = function(obj) {
  5149. var node;
  5150. node = obj.properties[0].name;
  5151. if (!node.value.reserved) {
  5152. return iterator(node.value, node);
  5153. }
  5154. };
  5155. if (name instanceof Literal) {
  5156. return iterator(name.value, name);
  5157. }
  5158. if (name instanceof Value) {
  5159. return atParam(name);
  5160. }
  5161. _ref2 = name.objects;
  5162. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5163. obj = _ref2[_i];
  5164. if (obj instanceof Assign) {
  5165. this.eachName(iterator, obj.value.unwrap());
  5166. } else if (obj instanceof Splat) {
  5167. node = obj.name.unwrap();
  5168. iterator(node.value, node);
  5169. } else if (obj instanceof Value) {
  5170. if (obj.isArray() || obj.isObject()) {
  5171. this.eachName(iterator, obj.base);
  5172. } else if (obj["this"]) {
  5173. atParam(obj);
  5174. } else {
  5175. iterator(obj.base.value, obj.base);
  5176. }
  5177. } else {
  5178. obj.error("illegal parameter " + (obj.compile()));
  5179. }
  5180. }
  5181. };
  5182. return Param;
  5183. })(Base);
  5184. exports.Splat = Splat = (function(_super) {
  5185. __extends(Splat, _super);
  5186. Splat.prototype.children = ['name'];
  5187. Splat.prototype.isAssignable = YES;
  5188. function Splat(name) {
  5189. this.name = name.compile ? name : new Literal(name);
  5190. }
  5191. Splat.prototype.assigns = function(name) {
  5192. return this.name.assigns(name);
  5193. };
  5194. Splat.prototype.compileToFragments = function(o) {
  5195. return this.name.compileToFragments(o);
  5196. };
  5197. Splat.prototype.unwrap = function() {
  5198. return this.name;
  5199. };
  5200. Splat.compileSplattedArray = function(o, list, apply) {
  5201. var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len;
  5202. index = -1;
  5203. while ((node = list[++index]) && !(node instanceof Splat)) {
  5204. continue;
  5205. }
  5206. if (index >= list.length) {
  5207. return [];
  5208. }
  5209. if (list.length === 1) {
  5210. node = list[0];
  5211. fragments = node.compileToFragments(o, LEVEL_LIST);
  5212. if (apply) {
  5213. return fragments;
  5214. }
  5215. return [].concat(node.makeCode("" + (utility('slice')) + ".call("), fragments, node.makeCode(")"));
  5216. }
  5217. args = list.slice(index);
  5218. for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) {
  5219. node = args[i];
  5220. compiledNode = node.compileToFragments(o, LEVEL_LIST);
  5221. args[i] = node instanceof Splat ? [].concat(node.makeCode("" + (utility('slice')) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]"));
  5222. }
  5223. if (index === 0) {
  5224. node = list[0];
  5225. concatPart = node.joinFragmentArrays(args.slice(1), ', ');
  5226. return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")"));
  5227. }
  5228. base = (function() {
  5229. var _j, _len1, _ref2, _results;
  5230. _ref2 = list.slice(0, index);
  5231. _results = [];
  5232. for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
  5233. node = _ref2[_j];
  5234. _results.push(node.compileToFragments(o, LEVEL_LIST));
  5235. }
  5236. return _results;
  5237. })();
  5238. base = list[0].joinFragmentArrays(base, ', ');
  5239. concatPart = list[index].joinFragmentArrays(args, ', ');
  5240. return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last(list)).makeCode(")"));
  5241. };
  5242. return Splat;
  5243. })(Base);
  5244. exports.While = While = (function(_super) {
  5245. __extends(While, _super);
  5246. function While(condition, options) {
  5247. this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition;
  5248. this.guard = options != null ? options.guard : void 0;
  5249. }
  5250. While.prototype.children = ['condition', 'guard', 'body'];
  5251. While.prototype.isStatement = YES;
  5252. While.prototype.makeReturn = function(res) {
  5253. if (res) {
  5254. return While.__super__.makeReturn.apply(this, arguments);
  5255. } else {
  5256. this.returns = !this.jumps({
  5257. loop: true
  5258. });
  5259. return this;
  5260. }
  5261. };
  5262. While.prototype.addBody = function(body) {
  5263. this.body = body;
  5264. return this;
  5265. };
  5266. While.prototype.jumps = function() {
  5267. var expressions, jumpNode, node, _i, _len;
  5268. expressions = this.body.expressions;
  5269. if (!expressions.length) {
  5270. return false;
  5271. }
  5272. for (_i = 0, _len = expressions.length; _i < _len; _i++) {
  5273. node = expressions[_i];
  5274. if (jumpNode = node.jumps({
  5275. loop: true
  5276. })) {
  5277. return jumpNode;
  5278. }
  5279. }
  5280. return false;
  5281. };
  5282. While.prototype.compileNode = function(o) {
  5283. var answer, body, rvar, set;
  5284. o.indent += TAB;
  5285. set = '';
  5286. body = this.body;
  5287. if (body.isEmpty()) {
  5288. body = this.makeCode('');
  5289. } else {
  5290. if (this.returns) {
  5291. body.makeReturn(rvar = o.scope.freeVariable('results'));
  5292. set = "" + this.tab + rvar + " = [];\n";
  5293. }
  5294. if (this.guard) {
  5295. if (body.expressions.length > 1) {
  5296. body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
  5297. } else {
  5298. if (this.guard) {
  5299. body = Block.wrap([new If(this.guard, body)]);
  5300. }
  5301. }
  5302. }
  5303. body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab));
  5304. }
  5305. answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}"));
  5306. if (this.returns) {
  5307. answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";"));
  5308. }
  5309. return answer;
  5310. };
  5311. return While;
  5312. })(Base);
  5313. exports.Op = Op = (function(_super) {
  5314. var CONVERSIONS, INVERSIONS;
  5315. __extends(Op, _super);
  5316. function Op(op, first, second, flip) {
  5317. if (op === 'in') {
  5318. return new In(first, second);
  5319. }
  5320. if (op === 'do') {
  5321. return this.generateDo(first);
  5322. }
  5323. if (op === 'new') {
  5324. if (first instanceof Call && !first["do"] && !first.isNew) {
  5325. return first.newInstance();
  5326. }
  5327. if (first instanceof Code && first.bound || first["do"]) {
  5328. first = new Parens(first);
  5329. }
  5330. }
  5331. this.operator = CONVERSIONS[op] || op;
  5332. this.first = first;
  5333. this.second = second;
  5334. this.flip = !!flip;
  5335. return this;
  5336. }
  5337. CONVERSIONS = {
  5338. '==': '===',
  5339. '!=': '!==',
  5340. 'of': 'in'
  5341. };
  5342. INVERSIONS = {
  5343. '!==': '===',
  5344. '===': '!=='
  5345. };
  5346. Op.prototype.children = ['first', 'second'];
  5347. Op.prototype.isSimpleNumber = NO;
  5348. Op.prototype.isUnary = function() {
  5349. return !this.second;
  5350. };
  5351. Op.prototype.isComplex = function() {
  5352. var _ref2;
  5353. return !(this.isUnary() && ((_ref2 = this.operator) === '+' || _ref2 === '-')) || this.first.isComplex();
  5354. };
  5355. Op.prototype.isChainable = function() {
  5356. var _ref2;
  5357. return (_ref2 = this.operator) === '<' || _ref2 === '>' || _ref2 === '>=' || _ref2 === '<=' || _ref2 === '===' || _ref2 === '!==';
  5358. };
  5359. Op.prototype.invert = function() {
  5360. var allInvertable, curr, fst, op, _ref2;
  5361. if (this.isChainable() && this.first.isChainable()) {
  5362. allInvertable = true;
  5363. curr = this;
  5364. while (curr && curr.operator) {
  5365. allInvertable && (allInvertable = curr.operator in INVERSIONS);
  5366. curr = curr.first;
  5367. }
  5368. if (!allInvertable) {
  5369. return new Parens(this).invert();
  5370. }
  5371. curr = this;
  5372. while (curr && curr.operator) {
  5373. curr.invert = !curr.invert;
  5374. curr.operator = INVERSIONS[curr.operator];
  5375. curr = curr.first;
  5376. }
  5377. return this;
  5378. } else if (op = INVERSIONS[this.operator]) {
  5379. this.operator = op;
  5380. if (this.first.unwrap() instanceof Op) {
  5381. this.first.invert();
  5382. }
  5383. return this;
  5384. } else if (this.second) {
  5385. return new Parens(this).invert();
  5386. } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref2 = fst.operator) === '!' || _ref2 === 'in' || _ref2 === 'instanceof')) {
  5387. return fst;
  5388. } else {
  5389. return new Op('!', this);
  5390. }
  5391. };
  5392. Op.prototype.unfoldSoak = function(o) {
  5393. var _ref2;
  5394. return ((_ref2 = this.operator) === '++' || _ref2 === '--' || _ref2 === 'delete') && unfoldSoak(o, this, 'first');
  5395. };
  5396. Op.prototype.generateDo = function(exp) {
  5397. var call, func, param, passedParams, ref, _i, _len, _ref2;
  5398. passedParams = [];
  5399. func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp;
  5400. _ref2 = func.params || [];
  5401. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5402. param = _ref2[_i];
  5403. if (param.value) {
  5404. passedParams.push(param.value);
  5405. delete param.value;
  5406. } else {
  5407. passedParams.push(param);
  5408. }
  5409. }
  5410. call = new Call(exp, passedParams);
  5411. call["do"] = true;
  5412. return call;
  5413. };
  5414. Op.prototype.compileNode = function(o) {
  5415. var answer, isChain, _ref2, _ref3;
  5416. isChain = this.isChainable() && this.first.isChainable();
  5417. if (!isChain) {
  5418. this.first.front = this.front;
  5419. }
  5420. if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) {
  5421. this.error('delete operand may not be argument or var');
  5422. }
  5423. if (((_ref2 = this.operator) === '--' || _ref2 === '++') && (_ref3 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0)) {
  5424. this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\"");
  5425. }
  5426. if (this.isUnary()) {
  5427. return this.compileUnary(o);
  5428. }
  5429. if (isChain) {
  5430. return this.compileChain(o);
  5431. }
  5432. if (this.operator === '?') {
  5433. return this.compileExistence(o);
  5434. }
  5435. answer = [].concat(this.first.compileToFragments(o, LEVEL_OP), this.makeCode(' ' + this.operator + ' '), this.second.compileToFragments(o, LEVEL_OP));
  5436. if (o.level <= LEVEL_OP) {
  5437. return answer;
  5438. } else {
  5439. return this.wrapInBraces(answer);
  5440. }
  5441. };
  5442. Op.prototype.compileChain = function(o) {
  5443. var fragments, fst, shared, _ref2;
  5444. _ref2 = this.first.second.cache(o), this.first.second = _ref2[0], shared = _ref2[1];
  5445. fst = this.first.compileToFragments(o, LEVEL_OP);
  5446. fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP));
  5447. return this.wrapInBraces(fragments);
  5448. };
  5449. Op.prototype.compileExistence = function(o) {
  5450. var fst, ref;
  5451. if (this.first.isComplex()) {
  5452. ref = new Literal(o.scope.freeVariable('ref'));
  5453. fst = new Parens(new Assign(ref, this.first));
  5454. } else {
  5455. fst = this.first;
  5456. ref = fst;
  5457. }
  5458. return new If(new Existence(fst), ref, {
  5459. type: 'if'
  5460. }).addElse(this.second).compileToFragments(o);
  5461. };
  5462. Op.prototype.compileUnary = function(o) {
  5463. var op, parts, plusMinus;
  5464. parts = [];
  5465. op = this.operator;
  5466. parts.push([this.makeCode(op)]);
  5467. if (op === '!' && this.first instanceof Existence) {
  5468. this.first.negated = !this.first.negated;
  5469. return this.first.compileToFragments(o);
  5470. }
  5471. if (o.level >= LEVEL_ACCESS) {
  5472. return (new Parens(this)).compileToFragments(o);
  5473. }
  5474. plusMinus = op === '+' || op === '-';
  5475. if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) {
  5476. parts.push([this.makeCode(' ')]);
  5477. }
  5478. if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) {
  5479. this.first = new Parens(this.first);
  5480. }
  5481. parts.push(this.first.compileToFragments(o, LEVEL_OP));
  5482. if (this.flip) {
  5483. parts.reverse();
  5484. }
  5485. return this.joinFragmentArrays(parts, '');
  5486. };
  5487. Op.prototype.toString = function(idt) {
  5488. return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator);
  5489. };
  5490. return Op;
  5491. })(Base);
  5492. exports.In = In = (function(_super) {
  5493. __extends(In, _super);
  5494. function In(object, array) {
  5495. this.object = object;
  5496. this.array = array;
  5497. }
  5498. In.prototype.children = ['object', 'array'];
  5499. In.prototype.invert = NEGATE;
  5500. In.prototype.compileNode = function(o) {
  5501. var hasSplat, obj, _i, _len, _ref2;
  5502. if (this.array instanceof Value && this.array.isArray()) {
  5503. _ref2 = this.array.base.objects;
  5504. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5505. obj = _ref2[_i];
  5506. if (!(obj instanceof Splat)) {
  5507. continue;
  5508. }
  5509. hasSplat = true;
  5510. break;
  5511. }
  5512. if (!hasSplat) {
  5513. return this.compileOrTest(o);
  5514. }
  5515. }
  5516. return this.compileLoopTest(o);
  5517. };
  5518. In.prototype.compileOrTest = function(o) {
  5519. var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref2, _ref3, _ref4;
  5520. if (this.array.base.objects.length === 0) {
  5521. return [this.makeCode("" + (!!this.negated))];
  5522. }
  5523. _ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1];
  5524. _ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1];
  5525. tests = [];
  5526. _ref4 = this.array.base.objects;
  5527. for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) {
  5528. item = _ref4[i];
  5529. if (i) {
  5530. tests.push(this.makeCode(cnj));
  5531. }
  5532. tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS));
  5533. }
  5534. if (o.level < LEVEL_OP) {
  5535. return tests;
  5536. } else {
  5537. return this.wrapInBraces(tests);
  5538. }
  5539. };
  5540. In.prototype.compileLoopTest = function(o) {
  5541. var fragments, ref, sub, _ref2;
  5542. _ref2 = this.object.cache(o, LEVEL_LIST), sub = _ref2[0], ref = _ref2[1];
  5543. fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0')));
  5544. if (fragmentsToText(sub) === fragmentsToText(ref)) {
  5545. return fragments;
  5546. }
  5547. fragments = sub.concat(this.makeCode(', '), fragments);
  5548. if (o.level < LEVEL_LIST) {
  5549. return fragments;
  5550. } else {
  5551. return this.wrapInBraces(fragments);
  5552. }
  5553. };
  5554. In.prototype.toString = function(idt) {
  5555. return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : ''));
  5556. };
  5557. return In;
  5558. })(Base);
  5559. exports.Try = Try = (function(_super) {
  5560. __extends(Try, _super);
  5561. function Try(attempt, errorVariable, recovery, ensure) {
  5562. this.attempt = attempt;
  5563. this.errorVariable = errorVariable;
  5564. this.recovery = recovery;
  5565. this.ensure = ensure;
  5566. }
  5567. Try.prototype.children = ['attempt', 'recovery', 'ensure'];
  5568. Try.prototype.isStatement = YES;
  5569. Try.prototype.jumps = function(o) {
  5570. var _ref2;
  5571. return this.attempt.jumps(o) || ((_ref2 = this.recovery) != null ? _ref2.jumps(o) : void 0);
  5572. };
  5573. Try.prototype.makeReturn = function(res) {
  5574. if (this.attempt) {
  5575. this.attempt = this.attempt.makeReturn(res);
  5576. }
  5577. if (this.recovery) {
  5578. this.recovery = this.recovery.makeReturn(res);
  5579. }
  5580. return this;
  5581. };
  5582. Try.prototype.compileNode = function(o) {
  5583. var catchPart, ensurePart, placeholder, tryPart;
  5584. o.indent += TAB;
  5585. tryPart = this.attempt.compileToFragments(o, LEVEL_TOP);
  5586. catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : [];
  5587. ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : [];
  5588. return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart);
  5589. };
  5590. return Try;
  5591. })(Base);
  5592. exports.Throw = Throw = (function(_super) {
  5593. __extends(Throw, _super);
  5594. function Throw(expression) {
  5595. this.expression = expression;
  5596. }
  5597. Throw.prototype.children = ['expression'];
  5598. Throw.prototype.isStatement = YES;
  5599. Throw.prototype.jumps = NO;
  5600. Throw.prototype.makeReturn = THIS;
  5601. Throw.prototype.compileNode = function(o) {
  5602. return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";"));
  5603. };
  5604. return Throw;
  5605. })(Base);
  5606. exports.Existence = Existence = (function(_super) {
  5607. __extends(Existence, _super);
  5608. function Existence(expression) {
  5609. this.expression = expression;
  5610. }
  5611. Existence.prototype.children = ['expression'];
  5612. Existence.prototype.invert = NEGATE;
  5613. Existence.prototype.compileNode = function(o) {
  5614. var cmp, cnj, code, _ref2;
  5615. this.expression.front = this.front;
  5616. code = this.expression.compile(o, LEVEL_OP);
  5617. if (IDENTIFIER.test(code) && !o.scope.check(code)) {
  5618. _ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1];
  5619. code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null";
  5620. } else {
  5621. code = "" + code + " " + (this.negated ? '==' : '!=') + " null";
  5622. }
  5623. return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")];
  5624. };
  5625. return Existence;
  5626. })(Base);
  5627. exports.Parens = Parens = (function(_super) {
  5628. __extends(Parens, _super);
  5629. function Parens(body) {
  5630. this.body = body;
  5631. }
  5632. Parens.prototype.children = ['body'];
  5633. Parens.prototype.unwrap = function() {
  5634. return this.body;
  5635. };
  5636. Parens.prototype.isComplex = function() {
  5637. return this.body.isComplex();
  5638. };
  5639. Parens.prototype.compileNode = function(o) {
  5640. var bare, expr, fragments;
  5641. expr = this.body.unwrap();
  5642. if (expr instanceof Value && expr.isAtomic()) {
  5643. expr.front = this.front;
  5644. return expr.compileToFragments(o);
  5645. }
  5646. fragments = expr.compileToFragments(o, LEVEL_PAREN);
  5647. bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns));
  5648. if (bare) {
  5649. return fragments;
  5650. } else {
  5651. return this.wrapInBraces(fragments);
  5652. }
  5653. };
  5654. return Parens;
  5655. })(Base);
  5656. exports.For = For = (function(_super) {
  5657. __extends(For, _super);
  5658. function For(body, source) {
  5659. var _ref2;
  5660. this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index;
  5661. this.body = Block.wrap([body]);
  5662. this.own = !!source.own;
  5663. this.object = !!source.object;
  5664. if (this.object) {
  5665. _ref2 = [this.index, this.name], this.name = _ref2[0], this.index = _ref2[1];
  5666. }
  5667. if (this.index instanceof Value) {
  5668. this.index.error('index cannot be a pattern matching expression');
  5669. }
  5670. this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length;
  5671. this.pattern = this.name instanceof Value;
  5672. if (this.range && this.index) {
  5673. this.index.error('indexes do not apply to range loops');
  5674. }
  5675. if (this.range && this.pattern) {
  5676. this.name.error('cannot pattern match over range loops');
  5677. }
  5678. if (this.own && !this.object) {
  5679. this.name.error('cannot use own with for-in');
  5680. }
  5681. this.returns = false;
  5682. }
  5683. For.prototype.children = ['body', 'source', 'guard', 'step'];
  5684. For.prototype.compileNode = function(o) {
  5685. var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref2, _ref3;
  5686. body = Block.wrap([this.body]);
  5687. lastJumps = (_ref2 = last(body.expressions)) != null ? _ref2.jumps() : void 0;
  5688. if (lastJumps && lastJumps instanceof Return) {
  5689. this.returns = false;
  5690. }
  5691. source = this.range ? this.source.base : this.source;
  5692. scope = o.scope;
  5693. name = this.name && (this.name.compile(o, LEVEL_LIST));
  5694. index = this.index && (this.index.compile(o, LEVEL_LIST));
  5695. if (name && !this.pattern) {
  5696. scope.find(name);
  5697. }
  5698. if (index) {
  5699. scope.find(index);
  5700. }
  5701. if (this.returns) {
  5702. rvar = scope.freeVariable('results');
  5703. }
  5704. ivar = (this.object && index) || scope.freeVariable('i');
  5705. kvar = (this.range && name) || index || ivar;
  5706. kvarAssign = kvar !== ivar ? "" + kvar + " = " : "";
  5707. if (this.step && !this.range) {
  5708. _ref3 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref3[0], stepVar = _ref3[1];
  5709. stepNum = stepVar.match(NUMBER);
  5710. }
  5711. if (this.pattern) {
  5712. name = ivar;
  5713. }
  5714. varPart = '';
  5715. guardPart = '';
  5716. defPart = '';
  5717. idt1 = this.tab + TAB;
  5718. if (this.range) {
  5719. forPartFragments = source.compileToFragments(merge(o, {
  5720. index: ivar,
  5721. name: name,
  5722. step: this.step
  5723. }));
  5724. } else {
  5725. svar = this.source.compile(o, LEVEL_LIST);
  5726. if ((name || this.own) && !IDENTIFIER.test(svar)) {
  5727. defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n";
  5728. svar = ref;
  5729. }
  5730. if (name && !this.pattern) {
  5731. namePart = "" + name + " = " + svar + "[" + kvar + "]";
  5732. }
  5733. if (!this.object) {
  5734. if (step !== stepVar) {
  5735. defPart += "" + this.tab + step + ";\n";
  5736. }
  5737. if (!(this.step && stepNum && (down = parseNum(stepNum[0]) < 0))) {
  5738. lvar = scope.freeVariable('len');
  5739. }
  5740. declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length";
  5741. declareDown = "" + kvarAssign + ivar + " = " + svar + ".length - 1";
  5742. compare = "" + ivar + " < " + lvar;
  5743. compareDown = "" + ivar + " >= 0";
  5744. if (this.step) {
  5745. if (stepNum) {
  5746. if (down) {
  5747. compare = compareDown;
  5748. declare = declareDown;
  5749. }
  5750. } else {
  5751. compare = "" + stepVar + " > 0 ? " + compare + " : " + compareDown;
  5752. declare = "(" + stepVar + " > 0 ? (" + declare + ") : " + declareDown + ")";
  5753. }
  5754. increment = "" + ivar + " += " + stepVar;
  5755. } else {
  5756. increment = "" + (kvar !== ivar ? "++" + ivar : "" + ivar + "++");
  5757. }
  5758. forPartFragments = [this.makeCode("" + declare + "; " + compare + "; " + kvarAssign + increment)];
  5759. }
  5760. }
  5761. if (this.returns) {
  5762. resultPart = "" + this.tab + rvar + " = [];\n";
  5763. returnResult = "\n" + this.tab + "return " + rvar + ";";
  5764. body.makeReturn(rvar);
  5765. }
  5766. if (this.guard) {
  5767. if (body.expressions.length > 1) {
  5768. body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
  5769. } else {
  5770. if (this.guard) {
  5771. body = Block.wrap([new If(this.guard, body)]);
  5772. }
  5773. }
  5774. }
  5775. if (this.pattern) {
  5776. body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]")));
  5777. }
  5778. defPartFragments = [].concat(this.makeCode(defPart), this.pluckDirectCall(o, body));
  5779. if (namePart) {
  5780. varPart = "\n" + idt1 + namePart + ";";
  5781. }
  5782. if (this.object) {
  5783. forPartFragments = [this.makeCode("" + kvar + " in " + svar)];
  5784. if (this.own) {
  5785. guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;";
  5786. }
  5787. }
  5788. bodyFragments = body.compileToFragments(merge(o, {
  5789. indent: idt1
  5790. }), LEVEL_TOP);
  5791. if (bodyFragments && (bodyFragments.length > 0)) {
  5792. bodyFragments = [].concat(this.makeCode("\n"), bodyFragments, this.makeCode("\n"));
  5793. }
  5794. return [].concat(defPartFragments, this.makeCode("" + (resultPart || '') + this.tab + "for ("), forPartFragments, this.makeCode(") {" + guardPart + varPart), bodyFragments, this.makeCode("" + this.tab + "}" + (returnResult || '')));
  5795. };
  5796. For.prototype.pluckDirectCall = function(o, body) {
  5797. var base, defs, expr, fn, idx, ref, val, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
  5798. defs = [];
  5799. _ref2 = body.expressions;
  5800. for (idx = _i = 0, _len = _ref2.length; _i < _len; idx = ++_i) {
  5801. expr = _ref2[idx];
  5802. expr = expr.unwrapAll();
  5803. if (!(expr instanceof Call)) {
  5804. continue;
  5805. }
  5806. val = (_ref3 = expr.variable) != null ? _ref3.unwrapAll() : void 0;
  5807. if (!((val instanceof Code) || (val instanceof Value && ((_ref4 = val.base) != null ? _ref4.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref5 = (_ref6 = val.properties[0].name) != null ? _ref6.value : void 0) === 'call' || _ref5 === 'apply')))) {
  5808. continue;
  5809. }
  5810. fn = ((_ref7 = val.base) != null ? _ref7.unwrapAll() : void 0) || val;
  5811. ref = new Literal(o.scope.freeVariable('fn'));
  5812. base = new Value(ref);
  5813. if (val.base) {
  5814. _ref8 = [base, val], val.base = _ref8[0], base = _ref8[1];
  5815. }
  5816. body.expressions[idx] = new Call(base, expr.args);
  5817. defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n'));
  5818. }
  5819. return defs;
  5820. };
  5821. return For;
  5822. })(While);
  5823. exports.Switch = Switch = (function(_super) {
  5824. __extends(Switch, _super);
  5825. function Switch(subject, cases, otherwise) {
  5826. this.subject = subject;
  5827. this.cases = cases;
  5828. this.otherwise = otherwise;
  5829. }
  5830. Switch.prototype.children = ['subject', 'cases', 'otherwise'];
  5831. Switch.prototype.isStatement = YES;
  5832. Switch.prototype.jumps = function(o) {
  5833. var block, conds, jumpNode, _i, _len, _ref2, _ref3, _ref4;
  5834. if (o == null) {
  5835. o = {
  5836. block: true
  5837. };
  5838. }
  5839. _ref2 = this.cases;
  5840. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5841. _ref3 = _ref2[_i], conds = _ref3[0], block = _ref3[1];
  5842. if (jumpNode = block.jumps(o)) {
  5843. return jumpNode;
  5844. }
  5845. }
  5846. return (_ref4 = this.otherwise) != null ? _ref4.jumps(o) : void 0;
  5847. };
  5848. Switch.prototype.makeReturn = function(res) {
  5849. var pair, _i, _len, _ref2, _ref3;
  5850. _ref2 = this.cases;
  5851. for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
  5852. pair = _ref2[_i];
  5853. pair[1].makeReturn(res);
  5854. }
  5855. if (res) {
  5856. this.otherwise || (this.otherwise = new Block([new Literal('void 0')]));
  5857. }
  5858. if ((_ref3 = this.otherwise) != null) {
  5859. _ref3.makeReturn(res);
  5860. }
  5861. return this;
  5862. };
  5863. Switch.prototype.compileNode = function(o) {
  5864. var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref2, _ref3, _ref4;
  5865. idt1 = o.indent + TAB;
  5866. idt2 = o.indent = idt1 + TAB;
  5867. fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n"));
  5868. _ref2 = this.cases;
  5869. for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
  5870. _ref3 = _ref2[i], conditions = _ref3[0], block = _ref3[1];
  5871. _ref4 = flatten([conditions]);
  5872. for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
  5873. cond = _ref4[_j];
  5874. if (!this.subject) {
  5875. cond = cond.invert();
  5876. }
  5877. fragments = fragments.concat(this.makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), this.makeCode(":\n"));
  5878. }
  5879. if ((body = block.compileToFragments(o, LEVEL_TOP)).length > 0) {
  5880. fragments = fragments.concat(body, this.makeCode('\n'));
  5881. }
  5882. if (i === this.cases.length - 1 && !this.otherwise) {
  5883. break;
  5884. }
  5885. expr = this.lastNonComment(block.expressions);
  5886. if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) {
  5887. continue;
  5888. }
  5889. fragments.push(cond.makeCode(idt2 + 'break;\n'));
  5890. }
  5891. if (this.otherwise && this.otherwise.expressions.length) {
  5892. fragments.push.apply(fragments, [this.makeCode(idt1 + "default:\n")].concat(__slice.call(this.otherwise.compileToFragments(o, LEVEL_TOP)), [this.makeCode("\n")]));
  5893. }
  5894. fragments.push(this.makeCode(this.tab + '}'));
  5895. return fragments;
  5896. };
  5897. return Switch;
  5898. })(Base);
  5899. exports.If = If = (function(_super) {
  5900. __extends(If, _super);
  5901. function If(condition, body, options) {
  5902. this.body = body;
  5903. if (options == null) {
  5904. options = {};
  5905. }
  5906. this.condition = options.type === 'unless' ? condition.invert() : condition;
  5907. this.elseBody = null;
  5908. this.isChain = false;
  5909. this.soak = options.soak;
  5910. }
  5911. If.prototype.children = ['condition', 'body', 'elseBody'];
  5912. If.prototype.bodyNode = function() {
  5913. var _ref2;
  5914. return (_ref2 = this.body) != null ? _ref2.unwrap() : void 0;
  5915. };
  5916. If.prototype.elseBodyNode = function() {
  5917. var _ref2;
  5918. return (_ref2 = this.elseBody) != null ? _ref2.unwrap() : void 0;
  5919. };
  5920. If.prototype.addElse = function(elseBody) {
  5921. if (this.isChain) {
  5922. this.elseBodyNode().addElse(elseBody);
  5923. } else {
  5924. this.isChain = elseBody instanceof If;
  5925. this.elseBody = this.ensureBlock(elseBody);
  5926. this.elseBody.updateLocationDataIfMissing(elseBody.locationData);
  5927. }
  5928. return this;
  5929. };
  5930. If.prototype.isStatement = function(o) {
  5931. var _ref2;
  5932. return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref2 = this.elseBodyNode()) != null ? _ref2.isStatement(o) : void 0);
  5933. };
  5934. If.prototype.jumps = function(o) {
  5935. var _ref2;
  5936. return this.body.jumps(o) || ((_ref2 = this.elseBody) != null ? _ref2.jumps(o) : void 0);
  5937. };
  5938. If.prototype.compileNode = function(o) {
  5939. if (this.isStatement(o)) {
  5940. return this.compileStatement(o);
  5941. } else {
  5942. return this.compileExpression(o);
  5943. }
  5944. };
  5945. If.prototype.makeReturn = function(res) {
  5946. if (res) {
  5947. this.elseBody || (this.elseBody = new Block([new Literal('void 0')]));
  5948. }
  5949. this.body && (this.body = new Block([this.body.makeReturn(res)]));
  5950. this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)]));
  5951. return this;
  5952. };
  5953. If.prototype.ensureBlock = function(node) {
  5954. if (node instanceof Block) {
  5955. return node;
  5956. } else {
  5957. return new Block([node]);
  5958. }
  5959. };
  5960. If.prototype.compileStatement = function(o) {
  5961. var answer, body, child, cond, exeq, ifPart, indent;
  5962. child = del(o, 'chainChild');
  5963. exeq = del(o, 'isExistentialEquals');
  5964. if (exeq) {
  5965. return new If(this.condition.invert(), this.elseBodyNode(), {
  5966. type: 'if'
  5967. }).compileToFragments(o);
  5968. }
  5969. indent = o.indent + TAB;
  5970. cond = this.condition.compileToFragments(o, LEVEL_PAREN);
  5971. body = this.ensureBlock(this.body).compileToFragments(merge(o, {
  5972. indent: indent
  5973. }));
  5974. ifPart = [].concat(this.makeCode("if ("), cond, this.makeCode(") {\n"), body, this.makeCode("\n" + this.tab + "}"));
  5975. if (!child) {
  5976. ifPart.unshift(this.makeCode(this.tab));
  5977. }
  5978. if (!this.elseBody) {
  5979. return ifPart;
  5980. }
  5981. answer = ifPart.concat(this.makeCode(' else '));
  5982. if (this.isChain) {
  5983. o.chainChild = true;
  5984. answer = answer.concat(this.elseBody.unwrap().compileToFragments(o, LEVEL_TOP));
  5985. } else {
  5986. answer = answer.concat(this.makeCode("{\n"), this.elseBody.compileToFragments(merge(o, {
  5987. indent: indent
  5988. }), LEVEL_TOP), this.makeCode("\n" + this.tab + "}"));
  5989. }
  5990. return answer;
  5991. };
  5992. If.prototype.compileExpression = function(o) {
  5993. var alt, body, cond, fragments;
  5994. cond = this.condition.compileToFragments(o, LEVEL_COND);
  5995. body = this.bodyNode().compileToFragments(o, LEVEL_LIST);
  5996. alt = this.elseBodyNode() ? this.elseBodyNode().compileToFragments(o, LEVEL_LIST) : [this.makeCode('void 0')];
  5997. fragments = cond.concat(this.makeCode(" ? "), body, this.makeCode(" : "), alt);
  5998. if (o.level >= LEVEL_COND) {
  5999. return this.wrapInBraces(fragments);
  6000. } else {
  6001. return fragments;
  6002. }
  6003. };
  6004. If.prototype.unfoldSoak = function() {
  6005. return this.soak && this;
  6006. };
  6007. return If;
  6008. })(Base);
  6009. UTILITIES = {
  6010. "extends": function() {
  6011. return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }";
  6012. },
  6013. bind: function() {
  6014. return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }';
  6015. },
  6016. indexOf: function() {
  6017. return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }";
  6018. },
  6019. hasProp: function() {
  6020. return '{}.hasOwnProperty';
  6021. },
  6022. slice: function() {
  6023. return '[].slice';
  6024. }
  6025. };
  6026. LEVEL_TOP = 1;
  6027. LEVEL_PAREN = 2;
  6028. LEVEL_LIST = 3;
  6029. LEVEL_COND = 4;
  6030. LEVEL_OP = 5;
  6031. LEVEL_ACCESS = 6;
  6032. TAB = ' ';
  6033. IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
  6034. IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$");
  6035. SIMPLENUM = /^[+-]?\d+$/;
  6036. HEXNUM = /^[+-]?0x[\da-f]+/i;
  6037. NUMBER = /^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i;
  6038. METHOD_DEF = RegExp("^(" + IDENTIFIER_STR + ")(\\.prototype)?(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\])$");
  6039. IS_STRING = /^['"]/;
  6040. IS_REGEX = /^\//;
  6041. utility = function(name) {
  6042. var ref;
  6043. ref = "__" + name;
  6044. Scope.root.assign(ref, UTILITIES[name]());
  6045. return ref;
  6046. };
  6047. multident = function(code, tab) {
  6048. code = code.replace(/\n/g, '$&' + tab);
  6049. return code.replace(/\s+$/, '');
  6050. };
  6051. parseNum = function(x) {
  6052. if (x == null) {
  6053. return 0;
  6054. } else if (x.match(HEXNUM)) {
  6055. return parseInt(x, 16);
  6056. } else {
  6057. return parseFloat(x);
  6058. }
  6059. };
  6060. isLiteralArguments = function(node) {
  6061. return node instanceof Literal && node.value === 'arguments' && !node.asKey;
  6062. };
  6063. isLiteralThis = function(node) {
  6064. return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper);
  6065. };
  6066. unfoldSoak = function(o, parent, name) {
  6067. var ifn;
  6068. if (!(ifn = parent[name].unfoldSoak(o))) {
  6069. return;
  6070. }
  6071. parent[name] = ifn.body;
  6072. ifn.body = new Value(parent);
  6073. return ifn;
  6074. };
  6075. });
  6076. ace.define("ace/mode/coffee/coffee-script",["require","exports","module","ace/mode/coffee/lexer","ace/mode/coffee/parser","ace/mode/coffee/nodes"], function(require, exports, module) {
  6077. var Lexer = require("./lexer").Lexer;
  6078. var parser = require("./parser");
  6079. var lexer = new Lexer();
  6080. parser.lexer = {
  6081. lex: function() {
  6082. var tag, token;
  6083. token = this.tokens[this.pos++];
  6084. if (token) {
  6085. tag = token[0], this.yytext = token[1], this.yylloc = token[2];
  6086. this.yylineno = this.yylloc.first_line;
  6087. } else {
  6088. tag = '';
  6089. }
  6090. return tag;
  6091. },
  6092. setInput: function(tokens) {
  6093. this.tokens = tokens;
  6094. return this.pos = 0;
  6095. },
  6096. upcomingInput: function() {
  6097. return "";
  6098. }
  6099. };
  6100. parser.yy = require('./nodes');
  6101. exports.parse = function(code) {
  6102. return parser.parse(lexer.tokenize(code));
  6103. };
  6104. });
  6105. ace.define("ace/mode/coffee_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/coffee/coffee-script"], function(require, exports, module) {
  6106. "use strict";
  6107. var oop = require("../lib/oop");
  6108. var Mirror = require("../worker/mirror").Mirror;
  6109. var coffee = require("../mode/coffee/coffee-script");
  6110. window.addEventListener = function() {};
  6111. var Worker = exports.Worker = function(sender) {
  6112. Mirror.call(this, sender);
  6113. this.setTimeout(250);
  6114. };
  6115. oop.inherits(Worker, Mirror);
  6116. (function() {
  6117. this.onUpdate = function() {
  6118. var value = this.doc.getValue();
  6119. try {
  6120. coffee.parse(value).compile();
  6121. } catch(e) {
  6122. var loc = e.location;
  6123. if (loc) {
  6124. this.sender.emit("error", {
  6125. row: loc.first_line,
  6126. column: loc.first_column,
  6127. endRow: loc.last_line,
  6128. endColumn: loc.last_column,
  6129. text: e.message,
  6130. type: "error"
  6131. });
  6132. }
  6133. return;
  6134. }
  6135. this.sender.emit("ok");
  6136. };
  6137. }).call(Worker.prototype);
  6138. });
  6139. ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
  6140. function Empty() {}
  6141. if (!Function.prototype.bind) {
  6142. Function.prototype.bind = function bind(that) { // .length is 1
  6143. var target = this;
  6144. if (typeof target != "function") {
  6145. throw new TypeError("Function.prototype.bind called on incompatible " + target);
  6146. }
  6147. var args = slice.call(arguments, 1); // for normal call
  6148. var bound = function () {
  6149. if (this instanceof bound) {
  6150. var result = target.apply(
  6151. this,
  6152. args.concat(slice.call(arguments))
  6153. );
  6154. if (Object(result) === result) {
  6155. return result;
  6156. }
  6157. return this;
  6158. } else {
  6159. return target.apply(
  6160. that,
  6161. args.concat(slice.call(arguments))
  6162. );
  6163. }
  6164. };
  6165. if(target.prototype) {
  6166. Empty.prototype = target.prototype;
  6167. bound.prototype = new Empty();
  6168. Empty.prototype = null;
  6169. }
  6170. return bound;
  6171. };
  6172. }
  6173. var call = Function.prototype.call;
  6174. var prototypeOfArray = Array.prototype;
  6175. var prototypeOfObject = Object.prototype;
  6176. var slice = prototypeOfArray.slice;
  6177. var _toString = call.bind(prototypeOfObject.toString);
  6178. var owns = call.bind(prototypeOfObject.hasOwnProperty);
  6179. var defineGetter;
  6180. var defineSetter;
  6181. var lookupGetter;
  6182. var lookupSetter;
  6183. var supportsAccessors;
  6184. if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
  6185. defineGetter = call.bind(prototypeOfObject.__defineGetter__);
  6186. defineSetter = call.bind(prototypeOfObject.__defineSetter__);
  6187. lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
  6188. lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
  6189. }
  6190. if ([1,2].splice(0).length != 2) {
  6191. if(function() { // test IE < 9 to splice bug - see issue #138
  6192. function makeArray(l) {
  6193. var a = new Array(l+2);
  6194. a[0] = a[1] = 0;
  6195. return a;
  6196. }
  6197. var array = [], lengthBefore;
  6198. array.splice.apply(array, makeArray(20));
  6199. array.splice.apply(array, makeArray(26));
  6200. lengthBefore = array.length; //46
  6201. array.splice(5, 0, "XXX"); // add one element
  6202. lengthBefore + 1 == array.length
  6203. if (lengthBefore + 1 == array.length) {
  6204. return true;// has right splice implementation without bugs
  6205. }
  6206. }()) {//IE 6/7
  6207. var array_splice = Array.prototype.splice;
  6208. Array.prototype.splice = function(start, deleteCount) {
  6209. if (!arguments.length) {
  6210. return [];
  6211. } else {
  6212. return array_splice.apply(this, [
  6213. start === void 0 ? 0 : start,
  6214. deleteCount === void 0 ? (this.length - start) : deleteCount
  6215. ].concat(slice.call(arguments, 2)))
  6216. }
  6217. };
  6218. } else {//IE8
  6219. Array.prototype.splice = function(pos, removeCount){
  6220. var length = this.length;
  6221. if (pos > 0) {
  6222. if (pos > length)
  6223. pos = length;
  6224. } else if (pos == void 0) {
  6225. pos = 0;
  6226. } else if (pos < 0) {
  6227. pos = Math.max(length + pos, 0);
  6228. }
  6229. if (!(pos+removeCount < length))
  6230. removeCount = length - pos;
  6231. var removed = this.slice(pos, pos+removeCount);
  6232. var insert = slice.call(arguments, 2);
  6233. var add = insert.length;
  6234. if (pos === length) {
  6235. if (add) {
  6236. this.push.apply(this, insert);
  6237. }
  6238. } else {
  6239. var remove = Math.min(removeCount, length - pos);
  6240. var tailOldPos = pos + remove;
  6241. var tailNewPos = tailOldPos + add - remove;
  6242. var tailCount = length - tailOldPos;
  6243. var lengthAfterRemove = length - remove;
  6244. if (tailNewPos < tailOldPos) { // case A
  6245. for (var i = 0; i < tailCount; ++i) {
  6246. this[tailNewPos+i] = this[tailOldPos+i];
  6247. }
  6248. } else if (tailNewPos > tailOldPos) { // case B
  6249. for (i = tailCount; i--; ) {
  6250. this[tailNewPos+i] = this[tailOldPos+i];
  6251. }
  6252. } // else, add == remove (nothing to do)
  6253. if (add && pos === lengthAfterRemove) {
  6254. this.length = lengthAfterRemove; // truncate array
  6255. this.push.apply(this, insert);
  6256. } else {
  6257. this.length = lengthAfterRemove + add; // reserves space
  6258. for (i = 0; i < add; ++i) {
  6259. this[pos+i] = insert[i];
  6260. }
  6261. }
  6262. }
  6263. return removed;
  6264. };
  6265. }
  6266. }
  6267. if (!Array.isArray) {
  6268. Array.isArray = function isArray(obj) {
  6269. return _toString(obj) == "[object Array]";
  6270. };
  6271. }
  6272. var boxedString = Object("a"),
  6273. splitString = boxedString[0] != "a" || !(0 in boxedString);
  6274. if (!Array.prototype.forEach) {
  6275. Array.prototype.forEach = function forEach(fun /*, thisp*/) {
  6276. var object = toObject(this),
  6277. self = splitString && _toString(this) == "[object String]" ?
  6278. this.split("") :
  6279. object,
  6280. thisp = arguments[1],
  6281. i = -1,
  6282. length = self.length >>> 0;
  6283. if (_toString(fun) != "[object Function]") {
  6284. throw new TypeError(); // TODO message
  6285. }
  6286. while (++i < length) {
  6287. if (i in self) {
  6288. fun.call(thisp, self[i], i, object);
  6289. }
  6290. }
  6291. };
  6292. }
  6293. if (!Array.prototype.map) {
  6294. Array.prototype.map = function map(fun /*, thisp*/) {
  6295. var object = toObject(this),
  6296. self = splitString && _toString(this) == "[object String]" ?
  6297. this.split("") :
  6298. object,
  6299. length = self.length >>> 0,
  6300. result = Array(length),
  6301. thisp = arguments[1];
  6302. if (_toString(fun) != "[object Function]") {
  6303. throw new TypeError(fun + " is not a function");
  6304. }
  6305. for (var i = 0; i < length; i++) {
  6306. if (i in self)
  6307. result[i] = fun.call(thisp, self[i], i, object);
  6308. }
  6309. return result;
  6310. };
  6311. }
  6312. if (!Array.prototype.filter) {
  6313. Array.prototype.filter = function filter(fun /*, thisp */) {
  6314. var object = toObject(this),
  6315. self = splitString && _toString(this) == "[object String]" ?
  6316. this.split("") :
  6317. object,
  6318. length = self.length >>> 0,
  6319. result = [],
  6320. value,
  6321. thisp = arguments[1];
  6322. if (_toString(fun) != "[object Function]") {
  6323. throw new TypeError(fun + " is not a function");
  6324. }
  6325. for (var i = 0; i < length; i++) {
  6326. if (i in self) {
  6327. value = self[i];
  6328. if (fun.call(thisp, value, i, object)) {
  6329. result.push(value);
  6330. }
  6331. }
  6332. }
  6333. return result;
  6334. };
  6335. }
  6336. if (!Array.prototype.every) {
  6337. Array.prototype.every = function every(fun /*, thisp */) {
  6338. var object = toObject(this),
  6339. self = splitString && _toString(this) == "[object String]" ?
  6340. this.split("") :
  6341. object,
  6342. length = self.length >>> 0,
  6343. thisp = arguments[1];
  6344. if (_toString(fun) != "[object Function]") {
  6345. throw new TypeError(fun + " is not a function");
  6346. }
  6347. for (var i = 0; i < length; i++) {
  6348. if (i in self && !fun.call(thisp, self[i], i, object)) {
  6349. return false;
  6350. }
  6351. }
  6352. return true;
  6353. };
  6354. }
  6355. if (!Array.prototype.some) {
  6356. Array.prototype.some = function some(fun /*, thisp */) {
  6357. var object = toObject(this),
  6358. self = splitString && _toString(this) == "[object String]" ?
  6359. this.split("") :
  6360. object,
  6361. length = self.length >>> 0,
  6362. thisp = arguments[1];
  6363. if (_toString(fun) != "[object Function]") {
  6364. throw new TypeError(fun + " is not a function");
  6365. }
  6366. for (var i = 0; i < length; i++) {
  6367. if (i in self && fun.call(thisp, self[i], i, object)) {
  6368. return true;
  6369. }
  6370. }
  6371. return false;
  6372. };
  6373. }
  6374. if (!Array.prototype.reduce) {
  6375. Array.prototype.reduce = function reduce(fun /*, initial*/) {
  6376. var object = toObject(this),
  6377. self = splitString && _toString(this) == "[object String]" ?
  6378. this.split("") :
  6379. object,
  6380. length = self.length >>> 0;
  6381. if (_toString(fun) != "[object Function]") {
  6382. throw new TypeError(fun + " is not a function");
  6383. }
  6384. if (!length && arguments.length == 1) {
  6385. throw new TypeError("reduce of empty array with no initial value");
  6386. }
  6387. var i = 0;
  6388. var result;
  6389. if (arguments.length >= 2) {
  6390. result = arguments[1];
  6391. } else {
  6392. do {
  6393. if (i in self) {
  6394. result = self[i++];
  6395. break;
  6396. }
  6397. if (++i >= length) {
  6398. throw new TypeError("reduce of empty array with no initial value");
  6399. }
  6400. } while (true);
  6401. }
  6402. for (; i < length; i++) {
  6403. if (i in self) {
  6404. result = fun.call(void 0, result, self[i], i, object);
  6405. }
  6406. }
  6407. return result;
  6408. };
  6409. }
  6410. if (!Array.prototype.reduceRight) {
  6411. Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
  6412. var object = toObject(this),
  6413. self = splitString && _toString(this) == "[object String]" ?
  6414. this.split("") :
  6415. object,
  6416. length = self.length >>> 0;
  6417. if (_toString(fun) != "[object Function]") {
  6418. throw new TypeError(fun + " is not a function");
  6419. }
  6420. if (!length && arguments.length == 1) {
  6421. throw new TypeError("reduceRight of empty array with no initial value");
  6422. }
  6423. var result, i = length - 1;
  6424. if (arguments.length >= 2) {
  6425. result = arguments[1];
  6426. } else {
  6427. do {
  6428. if (i in self) {
  6429. result = self[i--];
  6430. break;
  6431. }
  6432. if (--i < 0) {
  6433. throw new TypeError("reduceRight of empty array with no initial value");
  6434. }
  6435. } while (true);
  6436. }
  6437. do {
  6438. if (i in this) {
  6439. result = fun.call(void 0, result, self[i], i, object);
  6440. }
  6441. } while (i--);
  6442. return result;
  6443. };
  6444. }
  6445. if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
  6446. Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
  6447. var self = splitString && _toString(this) == "[object String]" ?
  6448. this.split("") :
  6449. toObject(this),
  6450. length = self.length >>> 0;
  6451. if (!length) {
  6452. return -1;
  6453. }
  6454. var i = 0;
  6455. if (arguments.length > 1) {
  6456. i = toInteger(arguments[1]);
  6457. }
  6458. i = i >= 0 ? i : Math.max(0, length + i);
  6459. for (; i < length; i++) {
  6460. if (i in self && self[i] === sought) {
  6461. return i;
  6462. }
  6463. }
  6464. return -1;
  6465. };
  6466. }
  6467. if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
  6468. Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
  6469. var self = splitString && _toString(this) == "[object String]" ?
  6470. this.split("") :
  6471. toObject(this),
  6472. length = self.length >>> 0;
  6473. if (!length) {
  6474. return -1;
  6475. }
  6476. var i = length - 1;
  6477. if (arguments.length > 1) {
  6478. i = Math.min(i, toInteger(arguments[1]));
  6479. }
  6480. i = i >= 0 ? i : length - Math.abs(i);
  6481. for (; i >= 0; i--) {
  6482. if (i in self && sought === self[i]) {
  6483. return i;
  6484. }
  6485. }
  6486. return -1;
  6487. };
  6488. }
  6489. if (!Object.getPrototypeOf) {
  6490. Object.getPrototypeOf = function getPrototypeOf(object) {
  6491. return object.__proto__ || (
  6492. object.constructor ?
  6493. object.constructor.prototype :
  6494. prototypeOfObject
  6495. );
  6496. };
  6497. }
  6498. if (!Object.getOwnPropertyDescriptor) {
  6499. var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
  6500. "non-object: ";
  6501. Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
  6502. if ((typeof object != "object" && typeof object != "function") || object === null)
  6503. throw new TypeError(ERR_NON_OBJECT + object);
  6504. if (!owns(object, property))
  6505. return;
  6506. var descriptor, getter, setter;
  6507. descriptor = { enumerable: true, configurable: true };
  6508. if (supportsAccessors) {
  6509. var prototype = object.__proto__;
  6510. object.__proto__ = prototypeOfObject;
  6511. var getter = lookupGetter(object, property);
  6512. var setter = lookupSetter(object, property);
  6513. object.__proto__ = prototype;
  6514. if (getter || setter) {
  6515. if (getter) descriptor.get = getter;
  6516. if (setter) descriptor.set = setter;
  6517. return descriptor;
  6518. }
  6519. }
  6520. descriptor.value = object[property];
  6521. return descriptor;
  6522. };
  6523. }
  6524. if (!Object.getOwnPropertyNames) {
  6525. Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
  6526. return Object.keys(object);
  6527. };
  6528. }
  6529. if (!Object.create) {
  6530. var createEmpty;
  6531. if (Object.prototype.__proto__ === null) {
  6532. createEmpty = function () {
  6533. return { "__proto__": null };
  6534. };
  6535. } else {
  6536. createEmpty = function () {
  6537. var empty = {};
  6538. for (var i in empty)
  6539. empty[i] = null;
  6540. empty.constructor =
  6541. empty.hasOwnProperty =
  6542. empty.propertyIsEnumerable =
  6543. empty.isPrototypeOf =
  6544. empty.toLocaleString =
  6545. empty.toString =
  6546. empty.valueOf =
  6547. empty.__proto__ = null;
  6548. return empty;
  6549. }
  6550. }
  6551. Object.create = function create(prototype, properties) {
  6552. var object;
  6553. if (prototype === null) {
  6554. object = createEmpty();
  6555. } else {
  6556. if (typeof prototype != "object")
  6557. throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
  6558. var Type = function () {};
  6559. Type.prototype = prototype;
  6560. object = new Type();
  6561. object.__proto__ = prototype;
  6562. }
  6563. if (properties !== void 0)
  6564. Object.defineProperties(object, properties);
  6565. return object;
  6566. };
  6567. }
  6568. function doesDefinePropertyWork(object) {
  6569. try {
  6570. Object.defineProperty(object, "sentinel", {});
  6571. return "sentinel" in object;
  6572. } catch (exception) {
  6573. }
  6574. }
  6575. if (Object.defineProperty) {
  6576. var definePropertyWorksOnObject = doesDefinePropertyWork({});
  6577. var definePropertyWorksOnDom = typeof document == "undefined" ||
  6578. doesDefinePropertyWork(document.createElement("div"));
  6579. if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
  6580. var definePropertyFallback = Object.defineProperty;
  6581. }
  6582. }
  6583. if (!Object.defineProperty || definePropertyFallback) {
  6584. var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
  6585. var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
  6586. var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
  6587. "on this javascript engine";
  6588. Object.defineProperty = function defineProperty(object, property, descriptor) {
  6589. if ((typeof object != "object" && typeof object != "function") || object === null)
  6590. throw new TypeError(ERR_NON_OBJECT_TARGET + object);
  6591. if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
  6592. throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
  6593. if (definePropertyFallback) {
  6594. try {
  6595. return definePropertyFallback.call(Object, object, property, descriptor);
  6596. } catch (exception) {
  6597. }
  6598. }
  6599. if (owns(descriptor, "value")) {
  6600. if (supportsAccessors && (lookupGetter(object, property) ||
  6601. lookupSetter(object, property)))
  6602. {
  6603. var prototype = object.__proto__;
  6604. object.__proto__ = prototypeOfObject;
  6605. delete object[property];
  6606. object[property] = descriptor.value;
  6607. object.__proto__ = prototype;
  6608. } else {
  6609. object[property] = descriptor.value;
  6610. }
  6611. } else {
  6612. if (!supportsAccessors)
  6613. throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
  6614. if (owns(descriptor, "get"))
  6615. defineGetter(object, property, descriptor.get);
  6616. if (owns(descriptor, "set"))
  6617. defineSetter(object, property, descriptor.set);
  6618. }
  6619. return object;
  6620. };
  6621. }
  6622. if (!Object.defineProperties) {
  6623. Object.defineProperties = function defineProperties(object, properties) {
  6624. for (var property in properties) {
  6625. if (owns(properties, property))
  6626. Object.defineProperty(object, property, properties[property]);
  6627. }
  6628. return object;
  6629. };
  6630. }
  6631. if (!Object.seal) {
  6632. Object.seal = function seal(object) {
  6633. return object;
  6634. };
  6635. }
  6636. if (!Object.freeze) {
  6637. Object.freeze = function freeze(object) {
  6638. return object;
  6639. };
  6640. }
  6641. try {
  6642. Object.freeze(function () {});
  6643. } catch (exception) {
  6644. Object.freeze = (function freeze(freezeObject) {
  6645. return function freeze(object) {
  6646. if (typeof object == "function") {
  6647. return object;
  6648. } else {
  6649. return freezeObject(object);
  6650. }
  6651. };
  6652. })(Object.freeze);
  6653. }
  6654. if (!Object.preventExtensions) {
  6655. Object.preventExtensions = function preventExtensions(object) {
  6656. return object;
  6657. };
  6658. }
  6659. if (!Object.isSealed) {
  6660. Object.isSealed = function isSealed(object) {
  6661. return false;
  6662. };
  6663. }
  6664. if (!Object.isFrozen) {
  6665. Object.isFrozen = function isFrozen(object) {
  6666. return false;
  6667. };
  6668. }
  6669. if (!Object.isExtensible) {
  6670. Object.isExtensible = function isExtensible(object) {
  6671. if (Object(object) === object) {
  6672. throw new TypeError(); // TODO message
  6673. }
  6674. var name = '';
  6675. while (owns(object, name)) {
  6676. name += '?';
  6677. }
  6678. object[name] = true;
  6679. var returnValue = owns(object, name);
  6680. delete object[name];
  6681. return returnValue;
  6682. };
  6683. }
  6684. if (!Object.keys) {
  6685. var hasDontEnumBug = true,
  6686. dontEnums = [
  6687. "toString",
  6688. "toLocaleString",
  6689. "valueOf",
  6690. "hasOwnProperty",
  6691. "isPrototypeOf",
  6692. "propertyIsEnumerable",
  6693. "constructor"
  6694. ],
  6695. dontEnumsLength = dontEnums.length;
  6696. for (var key in {"toString": null}) {
  6697. hasDontEnumBug = false;
  6698. }
  6699. Object.keys = function keys(object) {
  6700. if (
  6701. (typeof object != "object" && typeof object != "function") ||
  6702. object === null
  6703. ) {
  6704. throw new TypeError("Object.keys called on a non-object");
  6705. }
  6706. var keys = [];
  6707. for (var name in object) {
  6708. if (owns(object, name)) {
  6709. keys.push(name);
  6710. }
  6711. }
  6712. if (hasDontEnumBug) {
  6713. for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
  6714. var dontEnum = dontEnums[i];
  6715. if (owns(object, dontEnum)) {
  6716. keys.push(dontEnum);
  6717. }
  6718. }
  6719. }
  6720. return keys;
  6721. };
  6722. }
  6723. if (!Date.now) {
  6724. Date.now = function now() {
  6725. return new Date().getTime();
  6726. };
  6727. }
  6728. var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
  6729. "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
  6730. "\u2029\uFEFF";
  6731. if (!String.prototype.trim || ws.trim()) {
  6732. ws = "[" + ws + "]";
  6733. var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
  6734. trimEndRegexp = new RegExp(ws + ws + "*$");
  6735. String.prototype.trim = function trim() {
  6736. return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
  6737. };
  6738. }
  6739. function toInteger(n) {
  6740. n = +n;
  6741. if (n !== n) { // isNaN
  6742. n = 0;
  6743. } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
  6744. n = (n > 0 || -1) * Math.floor(Math.abs(n));
  6745. }
  6746. return n;
  6747. }
  6748. function isPrimitive(input) {
  6749. var type = typeof input;
  6750. return (
  6751. input === null ||
  6752. type === "undefined" ||
  6753. type === "boolean" ||
  6754. type === "number" ||
  6755. type === "string"
  6756. );
  6757. }
  6758. function toPrimitive(input) {
  6759. var val, valueOf, toString;
  6760. if (isPrimitive(input)) {
  6761. return input;
  6762. }
  6763. valueOf = input.valueOf;
  6764. if (typeof valueOf === "function") {
  6765. val = valueOf.call(input);
  6766. if (isPrimitive(val)) {
  6767. return val;
  6768. }
  6769. }
  6770. toString = input.toString;
  6771. if (typeof toString === "function") {
  6772. val = toString.call(input);
  6773. if (isPrimitive(val)) {
  6774. return val;
  6775. }
  6776. }
  6777. throw new TypeError();
  6778. }
  6779. var toObject = function (o) {
  6780. if (o == null) { // this matches both null and undefined
  6781. throw new TypeError("can't convert "+o+" to object");
  6782. }
  6783. return Object(o);
  6784. };
  6785. });