2
0

server.js 393 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154
  1. /* ====================================================================
  2. |
  3. | Amber Smalltalk
  4. | http://amber-lang.net
  5. |
  6. ======================================================================
  7. ======================================================================
  8. |
  9. | Copyright (c) 2010-2011
  10. | Nicolas Petton <petton.nicolas@gmail.com>
  11. |
  12. | Amber is released under the MIT license
  13. |
  14. | Permission is hereby granted, free of charge, to any person obtaining
  15. | a copy of this software and associated documentation files (the
  16. | 'Software'), to deal in the Software without restriction, including
  17. | without limitation the rights to use, copy, modify, merge, publish,
  18. | distribute, sublicense, and/or sell copies of the Software, and to
  19. | permit persons to whom the Software is furnished to do so, subject to
  20. | the following conditions:
  21. |
  22. | The above copyright notice and this permission notice shall be
  23. | included in all copies or substantial portions of the Software.
  24. |
  25. | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
  26. | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  27. | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  28. | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  29. | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  30. | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  31. | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  32. |
  33. ==================================================================== */
  34. /* Make that console is defined */
  35. if (typeof console === "undefined") {
  36. this.console = {
  37. log: function() {},
  38. warn: function() {},
  39. info: function() {},
  40. debug: function() {},
  41. error: function() {}
  42. };
  43. }
  44. /* Smalltalk constructors definition */
  45. function SmalltalkObject(){};
  46. function SmalltalkBehavior(){};
  47. function SmalltalkClass(){};
  48. function SmalltalkPackage(){};
  49. function SmalltalkMetaclass(){
  50. this.meta = true;
  51. };
  52. function SmalltalkMethod(){};
  53. function SmalltalkNil(){};
  54. function Smalltalk(){
  55. var st = this;
  56. /* This is the current call context object. While it is publicly available,
  57. Use smalltalk.getThisContext() instead which will answer a safe copy of
  58. the current context */
  59. st.thisContext = undefined;
  60. /* List of all reserved words in JavaScript. They may not be used as variables
  61. in Smalltalk. */
  62. st.reservedWords = ['break', 'case', 'catch', 'class', 'continue', 'debugger',
  63. 'default', 'delete', 'do', 'else', 'finally', 'for', 'function',
  64. 'if', 'in', 'instanceof', 'new', 'private', 'protected',
  65. 'public', 'return', 'static', 'switch', 'this', 'throw',
  66. 'try', 'typeof', 'var', 'void', 'while', 'with', 'yield'];
  67. /* We hold all Packages in a separate Object */
  68. st.packages = {};
  69. /* Smalltalk package creation. To add a Package, use smalltalk.addPackage() */
  70. function pkg(spec) {
  71. var that = new SmalltalkPackage();
  72. that.pkgName = spec.pkgName;
  73. that.properties = spec.properties || [];
  74. return that;
  75. };
  76. /* Smalltalk class creation. A class is an instance of an automatically
  77. created metaclass object. Newly created classes (not their metaclass)
  78. should be added to the smalltalk object, see smalltalk.addClass().
  79. Superclass linking is *not* handled here, see smalltalk.init() */
  80. function klass(spec) {
  81. var spec = spec || {};
  82. var that;
  83. if(spec.meta) {
  84. that = new SmalltalkMetaclass();
  85. } else {
  86. that = new (klass({meta: true})).fn;
  87. that.klass.instanceClass = that;
  88. that.className = spec.className;
  89. that.klass.className = that.className + ' class';
  90. }
  91. that.fn = spec.fn || function(){};
  92. that.superclass = spec.superclass;
  93. that.iVarNames = spec.iVarNames || [];
  94. if(that.superclass) {
  95. that.klass.superclass = that.superclass.klass;
  96. }
  97. that.pkg = spec.pkg;
  98. that.fn.prototype.methods = {};
  99. that.fn.prototype.inheritedMethods = {};
  100. that.fn.prototype.klass = that;
  101. return that;
  102. };
  103. /* Smalltalk method object. To add a method to a class,
  104. use smalltalk.addMethod() */
  105. st.method = function(spec) {
  106. var that = new SmalltalkMethod();
  107. that.selector = spec.selector;
  108. that.jsSelector = spec.jsSelector;
  109. that.args = spec.args || {};
  110. that.category = spec.category;
  111. that.source = spec.source;
  112. that.messageSends = spec.messageSends || [];
  113. that.referencedClasses = spec.referencedClasses || [];
  114. that.fn = spec.fn;
  115. return that
  116. };
  117. /* Initialize a class in its class hierarchy. Handle both class and
  118. metaclasses. */
  119. st.init = function(klass) {
  120. var subclasses = st.subclasses(klass);
  121. var methods;
  122. if(klass.superclass && klass.superclass !== nil) {
  123. methods = st.methods(klass.superclass);
  124. //Methods linking
  125. for(var i in methods) {
  126. if(!klass.fn.prototype.methods[i]) {
  127. klass.fn.prototype.inheritedMethods[i] = methods[i];
  128. klass.fn.prototype[methods[i].jsSelector] = methods[i].fn;
  129. }
  130. }
  131. }
  132. for(var i=0;i<subclasses.length;i++) {
  133. st.init(subclasses[i]);
  134. }
  135. if(klass.klass && !klass.meta) {
  136. st.init(klass.klass);
  137. }
  138. };
  139. /* Answer all registered Packages as Array */
  140. st.packages.all = function() {
  141. var packages = [];
  142. for(var i in st.packages) {
  143. if (!st.packages.hasOwnProperty(i) || typeof(st.packages[i]) === "function") continue;
  144. packages.push(st.packages[i]);
  145. }
  146. return packages
  147. };
  148. /* Answer all registered Smalltalk classes */
  149. st.classes = function() {
  150. var classes = [];
  151. for(var i in st) {
  152. if(i.search(/^[A-Z]/g) != -1) {
  153. classes.push(st[i]);
  154. }
  155. }
  156. return classes
  157. };
  158. /* Answer all methods (included inherited ones) of klass. */
  159. st.methods = function(klass) {
  160. var methods = {};
  161. for(var i in klass.fn.prototype.methods) {
  162. methods[i] = klass.fn.prototype.methods[i]
  163. }
  164. for(var i in klass.fn.prototype.inheritedMethods) {
  165. methods[i] = klass.fn.prototype.inheritedMethods[i]
  166. }
  167. return methods;
  168. }
  169. /* Answer the direct subclasses of klass. */
  170. st.subclasses = function(klass) {
  171. var subclasses = [];
  172. var classes = st.classes();
  173. for(var i in classes) {
  174. if(classes[i].fn) {
  175. //Metaclasses
  176. if(classes[i].klass && classes[i].klass.superclass === klass) {
  177. subclasses.push(classes[i].klass);
  178. }
  179. //Classes
  180. if(classes[i].superclass === klass) {
  181. subclasses.push(classes[i]);
  182. }
  183. }
  184. }
  185. return subclasses;
  186. };
  187. /* Create a new class wrapping a JavaScript constructor, and add it to the
  188. global smalltalk object. Package is lazily created if it does not exist with given name. */
  189. st.mapClassName = function(className, pkgName, fn, superclass) {
  190. var pkg = st.addPackage(pkgName, null);
  191. st[className] = klass({
  192. className: className,
  193. superclass: superclass,
  194. pkg: pkg,
  195. fn: fn
  196. });
  197. };
  198. /* Add a package to the smalltalk.packages object, creating a new one if needed.
  199. If pkgName is null or empty we return nil, which is an allowed package for a class.
  200. If package already exists we still update the properties of it. */
  201. st.addPackage = function(pkgName, properties) {
  202. if(!pkgName) {return nil;}
  203. if(!(st.packages[pkgName])) {
  204. st.packages[pkgName] = pkg({
  205. pkgName: pkgName,
  206. properties: properties
  207. });
  208. } else {
  209. if(properties) {
  210. st.packages[pkgName].properties = properties;
  211. }
  212. }
  213. return st.packages[pkgName];
  214. };
  215. /* Add a class to the smalltalk object, creating a new one if needed.
  216. Package is lazily created if it does not exist with given name.*/
  217. st.addClass = function(className, superclass, iVarNames, pkgName) {
  218. var pkg = st.addPackage(pkgName, null);
  219. if(st[className]) {
  220. st[className].superclass = superclass;
  221. st[className].iVarNames = iVarNames;
  222. st[className].pkg = pkg || st[className].pkg;
  223. } else {
  224. st[className] = klass({
  225. className: className,
  226. superclass: superclass,
  227. pkg: pkg,
  228. iVarNames: iVarNames
  229. });
  230. }
  231. };
  232. /* Add a method to a class */
  233. st.addMethod = function(jsSelector, method, klass) {
  234. klass.fn.prototype[jsSelector] = method.fn;
  235. klass.fn.prototype.methods[method.selector] = method;
  236. method.methodClass = klass;
  237. method.jsSelector = jsSelector;
  238. };
  239. /* Handles Smalltalk message send. Automatically converts undefined to the nil object.
  240. If the receiver does not understand the selector, call its #doesNotUnderstand: method */
  241. sendWithoutContext = function(receiver, selector, args, klass) {
  242. if(receiver === undefined || receiver === null) {
  243. receiver = nil;
  244. }
  245. if(!klass && receiver.klass && receiver[selector]) {
  246. return receiver[selector].apply(receiver, args);
  247. } else if(klass && klass.fn.prototype[selector]) {
  248. return klass.fn.prototype[selector].apply(receiver, args)
  249. }
  250. return messageNotUnderstood(receiver, selector, args);
  251. };
  252. /* Handles unhandled errors during message sends */
  253. sendWithContext = function(receiver, selector, args, klass) {
  254. if(st.thisContext) {
  255. return withContextSend(receiver, selector, args, klass);
  256. } else {
  257. try {return withContextSend(receiver, selector, args, klass)}
  258. catch(error) {
  259. // Reset the context stack in any case
  260. st.thisContext = undefined;
  261. if(error.smalltalkError) {
  262. handleError(error);
  263. } else {
  264. throw(error);
  265. }
  266. }
  267. }
  268. };
  269. /* Same as sendWithoutContext but creates a methodContext. */
  270. withContextSend = function(receiver, selector, args, klass) {
  271. var call, context;
  272. if(receiver === undefined || receiver === null) {
  273. receiver = nil;
  274. }
  275. if(!klass && receiver.klass && receiver[selector]) {
  276. context = pushContext(receiver, selector, args);
  277. call = receiver[selector].apply(receiver, args);
  278. popContext(context);
  279. return call;
  280. } else if(klass && klass.fn.prototype[selector]) {
  281. context = pushContext(receiver, selector, args);
  282. call = klass.fn.prototype[selector].apply(receiver, args);
  283. popContext(context);
  284. return call;
  285. }
  286. return messageNotUnderstood(receiver, selector, args);
  287. };
  288. /* Handles Smalltalk errors. Triggers the registered ErrorHandler
  289. (See the Smalltalk class ErrorHandler and its subclasses */
  290. function handleError(error) {
  291. st.thisContext = undefined;
  292. smalltalk.ErrorHandler._current()._handleError_(error);
  293. }
  294. /* Handles #dnu: *and* JavaScript method calls.
  295. if the receiver has no klass, we consider it a JS object (outside of the
  296. Amber system). Else assume that the receiver understands #doesNotUnderstand: */
  297. function messageNotUnderstood(receiver, selector, args) {
  298. /* Handles JS method calls. */
  299. if(receiver.klass === undefined || receiver.allowJavaScriptCalls) {
  300. return callJavaScriptMethod(receiver, selector, args);
  301. }
  302. /* Handles not understood messages. Also see the Amber counter-part
  303. Object>>doesNotUnderstand: */
  304. return receiver._doesNotUnderstand_(
  305. st.Message._new()
  306. ._selector_(st.convertSelector(selector))
  307. ._arguments_(args)
  308. );
  309. };
  310. function callJavaScriptMethod(receiver, selector, args) {
  311. /* Call a method of a JS object, or answer a property if it exists.
  312. Else try wrapping a JSObjectProxy around the receiver.
  313. Converts keyword-based selectors by using the first
  314. keyword only, but keeping all message arguments.
  315. Example:
  316. "self do: aBlock with: anObject" -> "self.do(aBlock, anObject)" */
  317. var jsSelector = selector._asJavaScriptSelector();
  318. var jsProperty = receiver[jsSelector];
  319. if(typeof jsProperty === "function") {
  320. return jsProperty.apply(receiver, args);
  321. } else if(jsProperty !== undefined) {
  322. if(args[0]) {
  323. receiver[jsSelector] = args[0];
  324. return nil;
  325. } else {
  326. return jsProperty
  327. }
  328. }
  329. return st.send(st.JSObjectProxy._on_(receiver), selector, args);
  330. };
  331. /* Reuse old contexts stored in oldContexts */
  332. st.oldContexts = [];
  333. /* Handle thisContext pseudo variable */
  334. st.getThisContext = function() {
  335. if(st.thisContext) {
  336. return st.thisContext.copy();
  337. } else {
  338. return undefined;
  339. }
  340. }
  341. pushContext = function(receiver, selector, temps) {
  342. if(st.thisContext) {
  343. return st.thisContext = st.thisContext.newContext(receiver, selector, temps);
  344. } else {
  345. return st.thisContext = new SmalltalkMethodContext(receiver, selector, temps);
  346. }
  347. };
  348. popContext = function(context) {
  349. if(context) {
  350. context.removeYourself();
  351. }
  352. };
  353. /* Convert a string to a valid smalltalk selector.
  354. if you modify the following functions, also change String>>asSelector
  355. accordingly */
  356. st.convertSelector = function(selector) {
  357. if(selector.match(/__/)) {
  358. return convertBinarySelector(selector);
  359. } else {
  360. return convertKeywordSelector(selector);
  361. }
  362. };
  363. function convertKeywordSelector(selector) {
  364. return selector.replace(/^_/, '').replace(/_/g, ':');
  365. };
  366. function convertBinarySelector(selector) {
  367. return selector
  368. .replace(/^_/, '')
  369. .replace(/_plus/, '+')
  370. .replace(/_minus/, '-')
  371. .replace(/_star/, '*')
  372. .replace(/_slash/, '/')
  373. .replace(/_gt/, '>')
  374. .replace(/_lt/, '<')
  375. .replace(/_eq/, '=')
  376. .replace(/_comma/, ',')
  377. .replace(/_at/, '@')
  378. };
  379. /* Converts a JavaScript object to valid Smalltalk Object */
  380. st.readJSObject = function(js) {
  381. var object = js;
  382. var readObject = (js.constructor === Object);
  383. var readArray = (js.constructor === Array);
  384. if(readObject) {
  385. object = smalltalk.Dictionary._new();
  386. }
  387. for(var i in js) {
  388. if(readObject) {
  389. object._at_put_(i, st.readJSObject(js[i]));
  390. }
  391. if(readArray) {
  392. object[i] = st.readJSObject(js[i]);
  393. }
  394. }
  395. return object;
  396. };
  397. /* Toggle deployment mode (no context will be handled during message send */
  398. st.setDeploymentMode = function() {
  399. st.send = sendWithoutContext;
  400. };
  401. st.setDevelopmentMode = function() {
  402. st.send = sendWithContext;
  403. }
  404. /* Set development mode by default */
  405. st.setDevelopmentMode();
  406. }
  407. function SmalltalkMethodContext(receiver, selector, temps, home) {
  408. var that = this;
  409. that.receiver = receiver;
  410. that.selector = selector;
  411. that.temps = temps || {};
  412. that.homeContext = home;
  413. that.copy = function() {
  414. var home = that.homeContext;
  415. if(home) {home = home.copy()}
  416. return new SmalltalkMethodContext(
  417. that.receiver,
  418. that.selector,
  419. that.temps,
  420. home
  421. );
  422. }
  423. that.newContext = function(receiver, selector, temps) {
  424. var c = smalltalk.oldContexts.pop();
  425. if(c) {
  426. c.homeContext = that;
  427. c.receiver = receiver;
  428. c.selector = selector;
  429. c.temps = temps || {};
  430. } else {
  431. c = new SmalltalkMethodContext(receiver, selector, temps, that);
  432. }
  433. return c;
  434. }
  435. that.removeYourself = function() {
  436. smalltalk.thisContext = that.homeContext;
  437. that.homeContext = undefined;
  438. smalltalk.oldContexts.push(that);
  439. }
  440. }
  441. /* Global Smalltalk objects. */
  442. var nil = new SmalltalkNil();
  443. var smalltalk = new Smalltalk();
  444. if(this.jQuery) {
  445. this.jQuery.allowJavaScriptCalls = true;
  446. }
  447. /****************************************************************************************/
  448. /* Base classes mapping. If you edit this part, do not forget to set the superclass of the
  449. object metaclass to Class after the definition of Object */
  450. smalltalk.mapClassName("Object", "Kernel", SmalltalkObject);
  451. smalltalk.mapClassName("Smalltalk", "Kernel", Smalltalk, smalltalk.Object);
  452. smalltalk.mapClassName("Package", "Kernel", SmalltalkPackage, smalltalk.Object);
  453. smalltalk.mapClassName("Behavior", "Kernel", SmalltalkBehavior, smalltalk.Object);
  454. smalltalk.mapClassName("Class", "Kernel", SmalltalkClass, smalltalk.Behavior);
  455. smalltalk.mapClassName("Metaclass", "Kernel", SmalltalkMetaclass, smalltalk.Behavior);
  456. smalltalk.mapClassName("CompiledMethod", "Kernel", SmalltalkMethod, smalltalk.Object);
  457. smalltalk.Object.klass.superclass = smalltalk.Class;
  458. smalltalk.mapClassName("Number", "Kernel", Number, smalltalk.Object);
  459. smalltalk.mapClassName("BlockClosure", "Kernel", Function, smalltalk.Object);
  460. smalltalk.mapClassName("Boolean", "Kernel", Boolean, smalltalk.Object);
  461. smalltalk.mapClassName("Date", "Kernel", Date, smalltalk.Object);
  462. smalltalk.mapClassName("UndefinedObject", "Kernel", SmalltalkNil, smalltalk.Object);
  463. smalltalk.mapClassName("Collection", "Kernel", null, smalltalk.Object);
  464. smalltalk.mapClassName("SequenceableCollection", "Kernel", null, smalltalk.Collection);
  465. smalltalk.mapClassName("String", "Kernel", String, smalltalk.SequenceableCollection);
  466. smalltalk.mapClassName("Array", "Kernel", Array, smalltalk.SequenceableCollection);
  467. smalltalk.mapClassName("RegularExpression", "Kernel", RegExp, smalltalk.String);
  468. smalltalk.mapClassName("Error", "Kernel", Error, smalltalk.Object);
  469. smalltalk.mapClassName("MethodContext", "Kernel", SmalltalkMethodContext, smalltalk.Object);
  470. smalltalk.addPackage('Kernel', {});
  471. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel');
  472. smalltalk.addMethod(
  473. unescape('__eq'),
  474. smalltalk.method({
  475. selector: unescape('%3D'),
  476. category: 'comparing',
  477. fn: function (anObject){
  478. var self=this;
  479. return smalltalk.send(self, "__eq_eq", [anObject]);
  480. return self;},
  481. args: ["anObject"],
  482. source: unescape('%3D%20anObject%0A%09%5Eself%20%3D%3D%20anObject'),
  483. messageSends: [unescape("%3D%3D")],
  484. referencedClasses: []
  485. }),
  486. smalltalk.Object);
  487. smalltalk.addMethod(
  488. unescape('_%7E_eq'),
  489. smalltalk.method({
  490. selector: unescape('%7E%3D'),
  491. category: 'comparing',
  492. fn: function (anObject){
  493. var self=this;
  494. return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
  495. return self;},
  496. args: ["anObject"],
  497. source: unescape('%7E%3D%20anObject%0A%09%5E%28self%20%3D%20anObject%29%20%3D%20false'),
  498. messageSends: [unescape("%3D")],
  499. referencedClasses: []
  500. }),
  501. smalltalk.Object);
  502. smalltalk.addMethod(
  503. unescape('_initialize'),
  504. smalltalk.method({
  505. selector: unescape('initialize'),
  506. category: 'initialization',
  507. fn: function (){
  508. var self=this;
  509. return self;},
  510. args: [],
  511. source: unescape('initialize'),
  512. messageSends: [],
  513. referencedClasses: []
  514. }),
  515. smalltalk.Object);
  516. smalltalk.addMethod(
  517. unescape('_yourself'),
  518. smalltalk.method({
  519. selector: unescape('yourself'),
  520. category: 'accessing',
  521. fn: function (){
  522. var self=this;
  523. return self;
  524. return self;},
  525. args: [],
  526. source: unescape('yourself%0A%09%5Eself'),
  527. messageSends: [],
  528. referencedClasses: []
  529. }),
  530. smalltalk.Object);
  531. smalltalk.addMethod(
  532. unescape('_class'),
  533. smalltalk.method({
  534. selector: unescape('class'),
  535. category: 'accessing',
  536. fn: function (){
  537. var self=this;
  538. return self.klass;
  539. return self;},
  540. args: [],
  541. source: unescape('class%0A%09%3Creturn%20self.klass%3E'),
  542. messageSends: [],
  543. referencedClasses: []
  544. }),
  545. smalltalk.Object);
  546. smalltalk.addMethod(
  547. unescape('_size'),
  548. smalltalk.method({
  549. selector: unescape('size'),
  550. category: 'accessing',
  551. fn: function (){
  552. var self=this;
  553. smalltalk.send(self, "_error_", ["Object not indexable"]);
  554. return self;},
  555. args: [],
  556. source: unescape('size%0A%09self%20error%3A%20%27Object%20not%20indexable%27'),
  557. messageSends: ["error:"],
  558. referencedClasses: []
  559. }),
  560. smalltalk.Object);
  561. smalltalk.addMethod(
  562. unescape('_copy'),
  563. smalltalk.method({
  564. selector: unescape('copy'),
  565. category: 'copying',
  566. fn: function (){
  567. var self=this;
  568. return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
  569. return self;},
  570. args: [],
  571. source: unescape('copy%0A%09%5Eself%20shallowCopy%20postCopy'),
  572. messageSends: ["postCopy", "shallowCopy"],
  573. referencedClasses: []
  574. }),
  575. smalltalk.Object);
  576. smalltalk.addMethod(
  577. unescape('_shallowCopy'),
  578. smalltalk.method({
  579. selector: unescape('shallowCopy'),
  580. category: 'copying',
  581. fn: function (){
  582. var self=this;
  583. var copy = self.klass._new();
  584. for(var i in self) {
  585. if(/^@.+/.test(i)) {
  586. copy[i] = self[i];
  587. }
  588. }
  589. return copy;
  590. ;
  591. return self;},
  592. args: [],
  593. source: unescape('shallowCopy%0A%09%3C%0A%09%20%20%20%20var%20copy%20%3D%20self.klass._new%28%29%3B%0A%09%20%20%20%20for%28var%20i%20in%20self%29%20%7B%0A%09%09if%28/%5E@.+/.test%28i%29%29%20%7B%0A%09%09%20%20%20%20copy%5Bi%5D%20%3D%20self%5Bi%5D%3B%0A%09%09%7D%0A%09%20%20%20%20%7D%0A%09%20%20%20%20return%20copy%3B%0A%09%3E'),
  594. messageSends: [],
  595. referencedClasses: []
  596. }),
  597. smalltalk.Object);
  598. smalltalk.addMethod(
  599. unescape('_deepCopy'),
  600. smalltalk.method({
  601. selector: unescape('deepCopy'),
  602. category: 'copying',
  603. fn: function (){
  604. var self=this;
  605. var copy = self.klass._new();
  606. for(var i in self) {
  607. if(/^@.+/.test(i)) {
  608. copy[i] = self[i]._deepCopy();
  609. }
  610. }
  611. return copy;
  612. ;
  613. return self;},
  614. args: [],
  615. source: unescape('deepCopy%0A%09%3C%20%20%20%20%0A%09%20%20%20%20var%20copy%20%3D%20self.klass._new%28%29%3B%0A%09%20%20%20%20for%28var%20i%20in%20self%29%20%7B%0A%09%09if%28/%5E@.+/.test%28i%29%29%20%7B%0A%09%09%20%20%20%20copy%5Bi%5D%20%3D%20self%5Bi%5D._deepCopy%28%29%3B%0A%09%09%7D%0A%09%20%20%20%20%7D%0A%09%20%20%20%20return%20copy%3B%0A%09%3E'),
  616. messageSends: [],
  617. referencedClasses: []
  618. }),
  619. smalltalk.Object);
  620. smalltalk.addMethod(
  621. unescape('_postCopy'),
  622. smalltalk.method({
  623. selector: unescape('postCopy'),
  624. category: 'copying',
  625. fn: function (){
  626. var self=this;
  627. return self;},
  628. args: [],
  629. source: unescape('postCopy'),
  630. messageSends: [],
  631. referencedClasses: []
  632. }),
  633. smalltalk.Object);
  634. smalltalk.addMethod(
  635. unescape('__minus_gt'),
  636. smalltalk.method({
  637. selector: unescape('-%3E'),
  638. category: 'converting',
  639. fn: function (anObject){
  640. var self=this;
  641. return smalltalk.send((smalltalk.Association || Association), "_key_value_", [self, anObject]);
  642. return self;},
  643. args: ["anObject"],
  644. source: unescape('-%3E%20anObject%0A%09%5EAssociation%20key%3A%20self%20value%3A%20anObject'),
  645. messageSends: ["key:value:"],
  646. referencedClasses: [smalltalk.Association]
  647. }),
  648. smalltalk.Object);
  649. smalltalk.addMethod(
  650. unescape('_asString'),
  651. smalltalk.method({
  652. selector: unescape('asString'),
  653. category: 'converting',
  654. fn: function (){
  655. var self=this;
  656. return smalltalk.send(self, "_printString", []);
  657. return self;},
  658. args: [],
  659. source: unescape('asString%0A%09%5Eself%20printString'),
  660. messageSends: ["printString"],
  661. referencedClasses: []
  662. }),
  663. smalltalk.Object);
  664. smalltalk.addMethod(
  665. unescape('_asJavascript'),
  666. smalltalk.method({
  667. selector: unescape('asJavascript'),
  668. category: 'converting',
  669. fn: function (){
  670. var self=this;
  671. return smalltalk.send(self, "_asString", []);
  672. return self;},
  673. args: [],
  674. source: unescape('asJavascript%0A%09%5Eself%20asString'),
  675. messageSends: ["asString"],
  676. referencedClasses: []
  677. }),
  678. smalltalk.Object);
  679. smalltalk.addMethod(
  680. unescape('_perform_'),
  681. smalltalk.method({
  682. selector: unescape('perform%3A'),
  683. category: 'message handling',
  684. fn: function (aSymbol){
  685. var self=this;
  686. return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
  687. return self;},
  688. args: ["aSymbol"],
  689. source: unescape('perform%3A%20aSymbol%0A%09%5Eself%20perform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  690. messageSends: ["perform:withArguments:"],
  691. referencedClasses: []
  692. }),
  693. smalltalk.Object);
  694. smalltalk.addMethod(
  695. unescape('_perform_withArguments_'),
  696. smalltalk.method({
  697. selector: unescape('perform%3AwithArguments%3A'),
  698. category: 'message handling',
  699. fn: function (aSymbol, aCollection){
  700. var self=this;
  701. return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
  702. return self;},
  703. args: ["aSymbol", "aCollection"],
  704. source: unescape('perform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%5Eself%20basicPerform%3A%20aSymbol%20asSelector%20withArguments%3A%20aCollection'),
  705. messageSends: ["basicPerform:withArguments:", "asSelector"],
  706. referencedClasses: []
  707. }),
  708. smalltalk.Object);
  709. smalltalk.addMethod(
  710. unescape('_instVarAt_'),
  711. smalltalk.method({
  712. selector: unescape('instVarAt%3A'),
  713. category: 'accessing',
  714. fn: function (aString){
  715. var self=this;
  716. return self['@'+aString];
  717. return self;},
  718. args: ["aString"],
  719. source: unescape('instVarAt%3A%20aString%0A%09%3Creturn%20self%5B%27@%27+aString%5D%3E'),
  720. messageSends: [],
  721. referencedClasses: []
  722. }),
  723. smalltalk.Object);
  724. smalltalk.addMethod(
  725. unescape('_instVarAt_put_'),
  726. smalltalk.method({
  727. selector: unescape('instVarAt%3Aput%3A'),
  728. category: 'accessing',
  729. fn: function (aString, anObject){
  730. var self=this;
  731. self['@' + aString] = anObject;
  732. return self;},
  733. args: ["aString", "anObject"],
  734. source: unescape('instVarAt%3A%20aString%20put%3A%20anObject%0A%09%3Cself%5B%27@%27%20+%20aString%5D%20%3D%20anObject%3E'),
  735. messageSends: [],
  736. referencedClasses: []
  737. }),
  738. smalltalk.Object);
  739. smalltalk.addMethod(
  740. unescape('_basicAt_'),
  741. smalltalk.method({
  742. selector: unescape('basicAt%3A'),
  743. category: 'accessing',
  744. fn: function (aString){
  745. var self=this;
  746. return self[aString];
  747. return self;},
  748. args: ["aString"],
  749. source: unescape('basicAt%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  750. messageSends: [],
  751. referencedClasses: []
  752. }),
  753. smalltalk.Object);
  754. smalltalk.addMethod(
  755. unescape('_basicAt_put_'),
  756. smalltalk.method({
  757. selector: unescape('basicAt%3Aput%3A'),
  758. category: 'accessing',
  759. fn: function (aString, anObject){
  760. var self=this;
  761. return self[aString] = anObject;
  762. return self;},
  763. args: ["aString", "anObject"],
  764. source: unescape('basicAt%3A%20aString%20put%3A%20anObject%0A%09%3Creturn%20self%5BaString%5D%20%3D%20anObject%3E'),
  765. messageSends: [],
  766. referencedClasses: []
  767. }),
  768. smalltalk.Object);
  769. smalltalk.addMethod(
  770. unescape('_error_'),
  771. smalltalk.method({
  772. selector: unescape('error%3A'),
  773. category: 'error handling',
  774. fn: function (aString){
  775. var self=this;
  776. smalltalk.send((smalltalk.Error || Error), "_signal_", [aString]);
  777. return self;},
  778. args: ["aString"],
  779. source: unescape('error%3A%20aString%0A%09Error%20signal%3A%20aString'),
  780. messageSends: ["signal:"],
  781. referencedClasses: [smalltalk.Error]
  782. }),
  783. smalltalk.Object);
  784. smalltalk.addMethod(
  785. unescape('_subclassResponsibility'),
  786. smalltalk.method({
  787. selector: unescape('subclassResponsibility'),
  788. category: 'error handling',
  789. fn: function (){
  790. var self=this;
  791. smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
  792. return self;},
  793. args: [],
  794. source: unescape('subclassResponsibility%0A%09self%20error%3A%20%27This%20method%20is%20a%20responsibility%20of%20a%20subclass%27'),
  795. messageSends: ["error:"],
  796. referencedClasses: []
  797. }),
  798. smalltalk.Object);
  799. smalltalk.addMethod(
  800. unescape('_shouldNotImplement'),
  801. smalltalk.method({
  802. selector: unescape('shouldNotImplement'),
  803. category: 'error handling',
  804. fn: function (){
  805. var self=this;
  806. smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
  807. return self;},
  808. args: [],
  809. source: unescape('shouldNotImplement%0A%09self%20error%3A%20%27This%20method%20should%20not%20be%20implemented%20in%20%27%2C%20self%20class%20name'),
  810. messageSends: ["error:", unescape("%2C"), "name", "class"],
  811. referencedClasses: []
  812. }),
  813. smalltalk.Object);
  814. smalltalk.addMethod(
  815. unescape('_try_catch_'),
  816. smalltalk.method({
  817. selector: unescape('try%3Acatch%3A'),
  818. category: 'error handling',
  819. fn: function (aBlock, anotherBlock){
  820. var self=this;
  821. try{aBlock()} catch(e) {anotherBlock(e)};
  822. return self;},
  823. args: ["aBlock", "anotherBlock"],
  824. source: unescape('try%3A%20aBlock%20catch%3A%20anotherBlock%0A%09%3Ctry%7BaBlock%28%29%7D%20catch%28e%29%20%7BanotherBlock%28e%29%7D%3E'),
  825. messageSends: [],
  826. referencedClasses: []
  827. }),
  828. smalltalk.Object);
  829. smalltalk.addMethod(
  830. unescape('_printString'),
  831. smalltalk.method({
  832. selector: unescape('printString'),
  833. category: 'printing',
  834. fn: function (){
  835. var self=this;
  836. return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
  837. return self;},
  838. args: [],
  839. source: unescape('printString%0A%09%5E%27a%20%27%2C%20self%20class%20name'),
  840. messageSends: [unescape("%2C"), "name", "class"],
  841. referencedClasses: []
  842. }),
  843. smalltalk.Object);
  844. smalltalk.addMethod(
  845. unescape('_printNl'),
  846. smalltalk.method({
  847. selector: unescape('printNl'),
  848. category: 'printing',
  849. fn: function (){
  850. var self=this;
  851. console.log(self);
  852. return self;},
  853. args: [],
  854. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  855. messageSends: [],
  856. referencedClasses: []
  857. }),
  858. smalltalk.Object);
  859. smalltalk.addMethod(
  860. unescape('_isKindOf_'),
  861. smalltalk.method({
  862. selector: unescape('isKindOf%3A'),
  863. category: 'testing',
  864. fn: function (aClass){
  865. var self=this;
  866. return ((($receiver = smalltalk.send(self, "_isMemberOf_", [aClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return true;})() : (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return true;}), (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})]));
  867. return self;},
  868. args: ["aClass"],
  869. source: unescape('isKindOf%3A%20aClass%0A%09%5E%28self%20isMemberOf%3A%20aClass%29%0A%09%20%20%20%20ifTrue%3A%20%5Btrue%5D%0A%09%20%20%20%20ifFalse%3A%20%5Bself%20class%20inheritsFrom%3A%20aClass%5D'),
  870. messageSends: ["ifTrue:ifFalse:", "isMemberOf:", "inheritsFrom:", "class"],
  871. referencedClasses: []
  872. }),
  873. smalltalk.Object);
  874. smalltalk.addMethod(
  875. unescape('_isMemberOf_'),
  876. smalltalk.method({
  877. selector: unescape('isMemberOf%3A'),
  878. category: 'testing',
  879. fn: function (aClass){
  880. var self=this;
  881. return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
  882. return self;},
  883. args: ["aClass"],
  884. source: unescape('isMemberOf%3A%20aClass%0A%09%5Eself%20class%20%3D%20aClass'),
  885. messageSends: [unescape("%3D"), "class"],
  886. referencedClasses: []
  887. }),
  888. smalltalk.Object);
  889. smalltalk.addMethod(
  890. unescape('_ifNil_'),
  891. smalltalk.method({
  892. selector: unescape('ifNil%3A'),
  893. category: 'testing',
  894. fn: function (aBlock){
  895. var self=this;
  896. return self;
  897. return self;},
  898. args: ["aBlock"],
  899. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  900. messageSends: [],
  901. referencedClasses: []
  902. }),
  903. smalltalk.Object);
  904. smalltalk.addMethod(
  905. unescape('_ifNil_ifNotNil_'),
  906. smalltalk.method({
  907. selector: unescape('ifNil%3AifNotNil%3A'),
  908. category: 'testing',
  909. fn: function (aBlock, anotherBlock){
  910. var self=this;
  911. return smalltalk.send(anotherBlock, "_value", []);
  912. return self;},
  913. args: ["aBlock", "anotherBlock"],
  914. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  915. messageSends: ["value"],
  916. referencedClasses: []
  917. }),
  918. smalltalk.Object);
  919. smalltalk.addMethod(
  920. unescape('_ifNotNil_'),
  921. smalltalk.method({
  922. selector: unescape('ifNotNil%3A'),
  923. category: 'testing',
  924. fn: function (aBlock){
  925. var self=this;
  926. return smalltalk.send(aBlock, "_value", []);
  927. return self;},
  928. args: ["aBlock"],
  929. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  930. messageSends: ["value"],
  931. referencedClasses: []
  932. }),
  933. smalltalk.Object);
  934. smalltalk.addMethod(
  935. unescape('_ifNotNil_ifNil_'),
  936. smalltalk.method({
  937. selector: unescape('ifNotNil%3AifNil%3A'),
  938. category: 'testing',
  939. fn: function (aBlock, anotherBlock){
  940. var self=this;
  941. return smalltalk.send(aBlock, "_value", []);
  942. return self;},
  943. args: ["aBlock", "anotherBlock"],
  944. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  945. messageSends: ["value"],
  946. referencedClasses: []
  947. }),
  948. smalltalk.Object);
  949. smalltalk.addMethod(
  950. unescape('_isNil'),
  951. smalltalk.method({
  952. selector: unescape('isNil'),
  953. category: 'testing',
  954. fn: function (){
  955. var self=this;
  956. return false;
  957. return self;},
  958. args: [],
  959. source: unescape('isNil%0A%09%5Efalse'),
  960. messageSends: [],
  961. referencedClasses: []
  962. }),
  963. smalltalk.Object);
  964. smalltalk.addMethod(
  965. unescape('_notNil'),
  966. smalltalk.method({
  967. selector: unescape('notNil'),
  968. category: 'testing',
  969. fn: function (){
  970. var self=this;
  971. return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
  972. return self;},
  973. args: [],
  974. source: unescape('notNil%0A%09%5Eself%20isNil%20not'),
  975. messageSends: ["not", "isNil"],
  976. referencedClasses: []
  977. }),
  978. smalltalk.Object);
  979. smalltalk.addMethod(
  980. unescape('_isClass'),
  981. smalltalk.method({
  982. selector: unescape('isClass'),
  983. category: 'testing',
  984. fn: function (){
  985. var self=this;
  986. return false;
  987. return self;},
  988. args: [],
  989. source: unescape('isClass%0A%09%5Efalse'),
  990. messageSends: [],
  991. referencedClasses: []
  992. }),
  993. smalltalk.Object);
  994. smalltalk.addMethod(
  995. unescape('_isMetaclass'),
  996. smalltalk.method({
  997. selector: unescape('isMetaclass'),
  998. category: 'testing',
  999. fn: function (){
  1000. var self=this;
  1001. return false;
  1002. return self;},
  1003. args: [],
  1004. source: unescape('isMetaclass%0A%09%5Efalse'),
  1005. messageSends: [],
  1006. referencedClasses: []
  1007. }),
  1008. smalltalk.Object);
  1009. smalltalk.addMethod(
  1010. unescape('_isNumber'),
  1011. smalltalk.method({
  1012. selector: unescape('isNumber'),
  1013. category: 'testing',
  1014. fn: function (){
  1015. var self=this;
  1016. return false;
  1017. return self;},
  1018. args: [],
  1019. source: unescape('isNumber%0A%09%5Efalse'),
  1020. messageSends: [],
  1021. referencedClasses: []
  1022. }),
  1023. smalltalk.Object);
  1024. smalltalk.addMethod(
  1025. unescape('_isString'),
  1026. smalltalk.method({
  1027. selector: unescape('isString'),
  1028. category: 'testing',
  1029. fn: function (){
  1030. var self=this;
  1031. return false;
  1032. return self;},
  1033. args: [],
  1034. source: unescape('isString%0A%09%5Efalse'),
  1035. messageSends: [],
  1036. referencedClasses: []
  1037. }),
  1038. smalltalk.Object);
  1039. smalltalk.addMethod(
  1040. unescape('_isParseFailure'),
  1041. smalltalk.method({
  1042. selector: unescape('isParseFailure'),
  1043. category: 'testing',
  1044. fn: function (){
  1045. var self=this;
  1046. return false;
  1047. return self;},
  1048. args: [],
  1049. source: unescape('isParseFailure%0A%09%5Efalse'),
  1050. messageSends: [],
  1051. referencedClasses: []
  1052. }),
  1053. smalltalk.Object);
  1054. smalltalk.addMethod(
  1055. unescape('_basicPerform_'),
  1056. smalltalk.method({
  1057. selector: unescape('basicPerform%3A'),
  1058. category: 'message handling',
  1059. fn: function (aSymbol){
  1060. var self=this;
  1061. return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
  1062. return self;},
  1063. args: ["aSymbol"],
  1064. source: unescape('basicPerform%3A%20aSymbol%20%0A%09%5Eself%20basicPerform%3A%20aSymbol%20withArguments%3A%20%23%28%29'),
  1065. messageSends: ["basicPerform:withArguments:"],
  1066. referencedClasses: []
  1067. }),
  1068. smalltalk.Object);
  1069. smalltalk.addMethod(
  1070. unescape('_basicPerform_withArguments_'),
  1071. smalltalk.method({
  1072. selector: unescape('basicPerform%3AwithArguments%3A'),
  1073. category: 'message handling',
  1074. fn: function (aSymbol, aCollection){
  1075. var self=this;
  1076. return self[aSymbol].apply(self, aCollection);;
  1077. return self;},
  1078. args: ["aSymbol", "aCollection"],
  1079. source: unescape('basicPerform%3A%20aSymbol%20withArguments%3A%20aCollection%0A%09%3Creturn%20self%5BaSymbol%5D.apply%28self%2C%20aCollection%29%3B%3E'),
  1080. messageSends: [],
  1081. referencedClasses: []
  1082. }),
  1083. smalltalk.Object);
  1084. smalltalk.addMethod(
  1085. unescape('_basicDelete_'),
  1086. smalltalk.method({
  1087. selector: unescape('basicDelete%3A'),
  1088. category: 'accessing',
  1089. fn: function (aString){
  1090. var self=this;
  1091. delete self[aString];
  1092. return self;},
  1093. args: ["aString"],
  1094. source: unescape('basicDelete%3A%20aString%0A%20%20%20%20%3Cdelete%20self%5BaString%5D%3E'),
  1095. messageSends: [],
  1096. referencedClasses: []
  1097. }),
  1098. smalltalk.Object);
  1099. smalltalk.addMethod(
  1100. unescape('_doesNotUnderstand_'),
  1101. smalltalk.method({
  1102. selector: unescape('doesNotUnderstand%3A'),
  1103. category: 'error handling',
  1104. fn: function (aMessage){
  1105. var self=this;
  1106. (function($rec){smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.MessageNotUnderstood || MessageNotUnderstood), "_new", []));
  1107. return self;},
  1108. args: ["aMessage"],
  1109. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09MessageNotUnderstood%20new%0A%09%09receiver%3A%20self%3B%0A%09%09message%3A%20aMessage%3B%0A%09%09signal'),
  1110. messageSends: ["receiver:", "message:", "signal", "new"],
  1111. referencedClasses: [smalltalk.MessageNotUnderstood]
  1112. }),
  1113. smalltalk.Object);
  1114. smalltalk.addMethod(
  1115. unescape('_asJSON'),
  1116. smalltalk.method({
  1117. selector: unescape('asJSON'),
  1118. category: 'converting',
  1119. fn: function (){
  1120. var self=this;
  1121. return JSON.stringify(self._asJSONObject());
  1122. return self;},
  1123. args: [],
  1124. source: unescape('asJSON%0A%09%3Creturn%20JSON.stringify%28self._asJSONObject%28%29%29%3E'),
  1125. messageSends: [],
  1126. referencedClasses: []
  1127. }),
  1128. smalltalk.Object);
  1129. smalltalk.addMethod(
  1130. unescape('_asJSONObject'),
  1131. smalltalk.method({
  1132. selector: unescape('asJSONObject'),
  1133. category: 'converting',
  1134. fn: function (){
  1135. var self=this;
  1136. var object=nil;
  1137. object=smalltalk.send((smalltalk.Object || Object), "_new", []);
  1138. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [(function(each){return smalltalk.send(object, "_basicAt_put_", [each, smalltalk.send(smalltalk.send(self, "_instVarAt_", [each]), "_asJSONObject", [])]);})]);
  1139. return object;
  1140. return self;},
  1141. args: [],
  1142. source: unescape('asJSONObject%0A%09%7C%20object%20%7C%0A%09object%20%3A%3D%20Object%20new.%0A%09self%20class%20instanceVariableNames%20do%3A%20%5B%3Aeach%20%7C%0A%09%09object%20basicAt%3A%20each%20put%3A%20%28self%20instVarAt%3A%20each%29%20asJSONObject%5D.%0A%09%5Eobject'),
  1143. messageSends: ["new", "do:", "instanceVariableNames", "class", "basicAt:put:", "asJSONObject", "instVarAt:"],
  1144. referencedClasses: [smalltalk.Object]
  1145. }),
  1146. smalltalk.Object);
  1147. smalltalk.addMethod(
  1148. unescape('_halt'),
  1149. smalltalk.method({
  1150. selector: unescape('halt'),
  1151. category: 'error handling',
  1152. fn: function (){
  1153. var self=this;
  1154. smalltalk.send(self, "_error_", ["Halt encountered"]);
  1155. return self;},
  1156. args: [],
  1157. source: unescape('halt%0A%09self%20error%3A%20%27Halt%20encountered%27'),
  1158. messageSends: ["error:"],
  1159. referencedClasses: []
  1160. }),
  1161. smalltalk.Object);
  1162. smalltalk.addMethod(
  1163. unescape('_log_block_'),
  1164. smalltalk.method({
  1165. selector: unescape('log%3Ablock%3A'),
  1166. category: 'printing',
  1167. fn: function (aString, aBlock){
  1168. var self=this;
  1169. var result=nil;
  1170. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send(smalltalk.send(aString, "__comma", [" time: "]), "__comma", [smalltalk.send(smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return result=smalltalk.send(aBlock, "_value", []);})]), "_printString", [])])]);
  1171. return result;
  1172. return self;},
  1173. args: ["aString", "aBlock"],
  1174. source: unescape('log%3A%20aString%20block%3A%20aBlock%0A%0A%09%7C%20result%20%7C%0A%09console%20log%3A%20%20aString%2C%20%20%27%20time%3A%20%27%2C%20%28Date%20millisecondsToRun%3A%20%5Bresult%20%3A%3D%20aBlock%20value%5D%29%20printString.%0A%09%5Eresult'),
  1175. messageSends: ["log:", unescape("%2C"), "printString", "millisecondsToRun:", "value"],
  1176. referencedClasses: [smalltalk.Date]
  1177. }),
  1178. smalltalk.Object);
  1179. smalltalk.addMethod(
  1180. unescape('__eq_eq'),
  1181. smalltalk.method({
  1182. selector: unescape('%3D%3D'),
  1183. category: 'comparing',
  1184. fn: function (anObject){
  1185. var self=this;
  1186. return self === anObject;
  1187. return self;},
  1188. args: ["anObject"],
  1189. source: unescape('%3D%3D%20anObject%0A%09%3Creturn%20self%20%3D%3D%3D%20anObject%3E'),
  1190. messageSends: [],
  1191. referencedClasses: []
  1192. }),
  1193. smalltalk.Object);
  1194. smalltalk.addMethod(
  1195. unescape('_%7E%7E'),
  1196. smalltalk.method({
  1197. selector: unescape('%7E%7E'),
  1198. category: 'comparing',
  1199. fn: function (anObject){
  1200. var self=this;
  1201. return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
  1202. return self;},
  1203. args: ["anObject"],
  1204. source: unescape('%7E%7E%20anObject%0A%09%5E%28self%20%3D%3D%20anObject%29%20%3D%20false'),
  1205. messageSends: [unescape("%3D"), unescape("%3D%3D")],
  1206. referencedClasses: []
  1207. }),
  1208. smalltalk.Object);
  1209. smalltalk.addMethod(
  1210. unescape('_deprecatedAPI'),
  1211. smalltalk.method({
  1212. selector: unescape('deprecatedAPI'),
  1213. category: 'error handling',
  1214. fn: function (){
  1215. var self=this;
  1216. smalltalk.send((typeof console == 'undefined' ? nil : console), "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_asString", []), "__comma", [unescape("%20is%20deprecated%21")])]);
  1217. return self;},
  1218. args: [],
  1219. source: unescape('deprecatedAPI%0A%09%22Just%20a%20simple%20way%20to%20deprecate%20methods.%0A%09%23deprecatedAPI%20is%20in%20the%20%27error%20handling%27%20protocol%20even%20if%20it%20doesn%27t%20throw%20an%20error%2C%0A%09but%20it%20could%20in%20the%20future.%22%0A%09console%20warn%3A%20thisContext%20home%20asString%2C%20%27%20is%20deprecated%21%27'),
  1220. messageSends: ["warn:", unescape("%2C"), "asString", "home"],
  1221. referencedClasses: []
  1222. }),
  1223. smalltalk.Object);
  1224. smalltalk.addMethod(
  1225. unescape('_storeString'),
  1226. smalltalk.method({
  1227. selector: unescape('storeString'),
  1228. category: 'printing',
  1229. fn: function (){
  1230. var self=this;
  1231. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(self, "_storeOn_", [s]);})]);
  1232. return self;},
  1233. args: [],
  1234. source: unescape('storeString%0A%09%22Answer%20a%20String%20representation%20of%20the%20receiver%20from%20which%20the%20receiver%20%0A%09can%20be%20reconstructed.%22%0A%0A%09%5E%20String%20streamContents%3A%20%5B%3As%20%7C%20self%20storeOn%3A%20s%5D'),
  1235. messageSends: ["streamContents:", "storeOn:"],
  1236. referencedClasses: [smalltalk.String]
  1237. }),
  1238. smalltalk.Object);
  1239. smalltalk.addMethod(
  1240. unescape('_storeOn_'),
  1241. smalltalk.method({
  1242. selector: unescape('storeOn%3A'),
  1243. category: 'printing',
  1244. fn: function (aStream){
  1245. var self=this;
  1246. smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
  1247. return self;},
  1248. args: ["aStream"],
  1249. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20self%20printString'),
  1250. messageSends: ["nextPutAll:", "printString"],
  1251. referencedClasses: []
  1252. }),
  1253. smalltalk.Object);
  1254. smalltalk.addMethod(
  1255. unescape('_initialize'),
  1256. smalltalk.method({
  1257. selector: unescape('initialize'),
  1258. category: 'initialization',
  1259. fn: function (){
  1260. var self=this;
  1261. return self;},
  1262. args: [],
  1263. source: unescape('initialize%0A%09%22no%20op%22'),
  1264. messageSends: [],
  1265. referencedClasses: []
  1266. }),
  1267. smalltalk.Object.klass);
  1268. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel');
  1269. smalltalk.addMethod(
  1270. unescape('_classes'),
  1271. smalltalk.method({
  1272. selector: unescape('classes'),
  1273. category: 'accessing',
  1274. fn: function (){
  1275. var self=this;
  1276. return self.classes();
  1277. return self;},
  1278. args: [],
  1279. source: unescape('classes%0A%09%3Creturn%20self.classes%28%29%3E'),
  1280. messageSends: [],
  1281. referencedClasses: []
  1282. }),
  1283. smalltalk.Smalltalk);
  1284. smalltalk.addMethod(
  1285. unescape('_readJSON_'),
  1286. smalltalk.method({
  1287. selector: unescape('readJSON%3A'),
  1288. category: 'accessing',
  1289. fn: function (anObject){
  1290. var self=this;
  1291. return self.readJSObject(anObject);
  1292. return self;},
  1293. args: ["anObject"],
  1294. source: unescape('readJSON%3A%20anObject%0A%09%3Creturn%20self.readJSObject%28anObject%29%3E'),
  1295. messageSends: [],
  1296. referencedClasses: []
  1297. }),
  1298. smalltalk.Smalltalk);
  1299. smalltalk.addMethod(
  1300. unescape('_at_'),
  1301. smalltalk.method({
  1302. selector: unescape('at%3A'),
  1303. category: 'accessing',
  1304. fn: function (aString){
  1305. var self=this;
  1306. return self[aString];
  1307. return self;},
  1308. args: ["aString"],
  1309. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5BaString%5D%3E'),
  1310. messageSends: [],
  1311. referencedClasses: []
  1312. }),
  1313. smalltalk.Smalltalk);
  1314. smalltalk.addMethod(
  1315. unescape('_removeClass_'),
  1316. smalltalk.method({
  1317. selector: unescape('removeClass%3A'),
  1318. category: 'classes',
  1319. fn: function (aClass){
  1320. var self=this;
  1321. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})]));
  1322. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);})]);
  1323. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);})]);
  1324. smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
  1325. return self;},
  1326. args: ["aClass"],
  1327. source: unescape('removeClass%3A%20aClass%0A%09aClass%20isMetaclass%20ifTrue%3A%20%5Bself%20error%3A%20aClass%20asString%2C%20%27%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21%27%5D.%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09aClass%20removeCompiledMethod%3A%20each%5D.%0A%09aClass%20class%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09aClass%20class%20removeCompiledMethod%3A%20each%5D.%0A%09self%20basicDelete%3A%20aClass%20name'),
  1328. messageSends: ["ifTrue:", "isMetaclass", "error:", unescape("%2C"), "asString", "do:", "values", "methodDictionary", "removeCompiledMethod:", "class", "basicDelete:", "name"],
  1329. referencedClasses: []
  1330. }),
  1331. smalltalk.Smalltalk);
  1332. smalltalk.addMethod(
  1333. unescape('_basicParse_'),
  1334. smalltalk.method({
  1335. selector: unescape('basicParse%3A'),
  1336. category: 'accessing',
  1337. fn: function (aString){
  1338. var self=this;
  1339. return smalltalk.parser.parse(aString);
  1340. return self;},
  1341. args: ["aString"],
  1342. source: unescape('basicParse%3A%20aString%0A%09%3Creturn%20smalltalk.parser.parse%28aString%29%3E'),
  1343. messageSends: [],
  1344. referencedClasses: []
  1345. }),
  1346. smalltalk.Smalltalk);
  1347. smalltalk.addMethod(
  1348. unescape('_parse_'),
  1349. smalltalk.method({
  1350. selector: unescape('parse%3A'),
  1351. category: 'accessing',
  1352. fn: function (aString){
  1353. var self=this;
  1354. var result=nil;
  1355. smalltalk.send(self, "_try_catch_", [(function(){return result=smalltalk.send(self, "_basicParse_", [aString]);}), (function(ex){return smalltalk.send(smalltalk.send(self, "_parseError_parsing_", [ex, aString]), "_signal", []);})]);
  1356. return result;
  1357. return self;},
  1358. args: ["aString"],
  1359. source: unescape('parse%3A%20aString%0A%09%7C%20result%20%7C%20%0A%09self%20try%3A%20%5Bresult%20%3A%3D%20self%20basicParse%3A%20aString%5D%20catch%3A%20%5B%3Aex%20%7C%20%28self%20parseError%3A%20ex%20parsing%3A%20aString%29%20signal%5D.%0A%09%5Eresult'),
  1360. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"],
  1361. referencedClasses: []
  1362. }),
  1363. smalltalk.Smalltalk);
  1364. smalltalk.addMethod(
  1365. unescape('_parseError_parsing_'),
  1366. smalltalk.method({
  1367. selector: unescape('parseError%3Aparsing%3A'),
  1368. category: 'accessing',
  1369. fn: function (anException, aString){
  1370. var self=this;
  1371. var row=nil;
  1372. var col=nil;
  1373. var message=nil;
  1374. var lines=nil;
  1375. var badLine=nil;
  1376. var code=nil;
  1377. row = anException.line;
  1378. col = anException.column;
  1379. message = anException.message;;
  1380. lines=smalltalk.send(aString, "_lines", []);
  1381. badLine=smalltalk.send(lines, "_at_", [row]);
  1382. badLine=smalltalk.send(smalltalk.send(smalltalk.send(badLine, "_copyFrom_to_", [(1), ((($receiver = col).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]), "__comma", [unescape("%20%3D%3D%3D%3E")]), "__comma", [smalltalk.send(badLine, "_copyFrom_to_", [col, smalltalk.send(badLine, "_size", [])])]);
  1383. smalltalk.send(lines, "_at_put_", [row, badLine]);
  1384. code=smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(lines, "_withIndexDo_", [(function(l, i){return smalltalk.send(s, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(i, "_asString", []), "__comma", [": "]), "__comma", [l]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]);})]);
  1385. return smalltalk.send(smalltalk.send((smalltalk.Error || Error), "_new", []), "_messageText_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Parse error on line ", "__comma", [row]), "__comma", [" column "]), "__comma", [col]), "__comma", [" : "]), "__comma", [message]), "__comma", [unescape("%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A")]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", [code])]);
  1386. return self;},
  1387. args: ["anException", "aString"],
  1388. source: unescape('parseError%3A%20anException%20parsing%3A%20aString%0A%09%7C%20row%20col%20message%20lines%20badLine%20code%20%7C%0A%09%3Crow%20%3D%20anException.line%3B%0A%09col%20%3D%20anException.column%3B%0A%09message%20%3D%20anException.message%3B%3E.%0A%09lines%20%3A%3D%20aString%20lines.%0A%09badLine%20%3A%3D%20lines%20at%3A%20row.%0A%09badLine%20%3A%3D%20%28badLine%20copyFrom%3A%201%20to%3A%20col%20-%201%29%2C%20%27%20%3D%3D%3D%3E%27%2C%20%28badLine%20copyFrom%3A%20%20col%20to%3A%20badLine%20size%29.%0A%09lines%20at%3A%20row%20put%3A%20badLine.%0A%09code%20%3A%3D%20String%20streamContents%3A%20%5B%3As%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20lines%20withIndexDo%3A%20%5B%3Al%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20s%20nextPutAll%3A%20i%20asString%2C%20%27%3A%20%27%2C%20l%2C%20String%20lf%5D%5D.%0A%09%5E%20Error%20new%20messageText%3A%20%28%27Parse%20error%20on%20line%20%27%20%2C%20row%20%2C%20%27%20column%20%27%20%2C%20col%20%2C%20%27%20%3A%20%27%20%2C%20message%20%2C%20%27%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A%27%20%2C%20String%20lf%2C%20code%29'),
  1389. messageSends: ["lines", "at:", unescape("%2C"), "copyFrom:to:", unescape("-"), "size", "at:put:", "streamContents:", "withIndexDo:", "nextPutAll:", "asString", "lf", "messageText:", "new"],
  1390. referencedClasses: [smalltalk.String,smalltalk.Error]
  1391. }),
  1392. smalltalk.Smalltalk);
  1393. smalltalk.addMethod(
  1394. unescape('_packages'),
  1395. smalltalk.method({
  1396. selector: unescape('packages'),
  1397. category: 'packages',
  1398. fn: function (){
  1399. var self=this;
  1400. return self.packages.all();
  1401. return self;},
  1402. args: [],
  1403. source: unescape('packages%0A%09%22Return%20all%20Package%20instances%20in%20the%20system.%22%0A%0A%09%3Creturn%20self.packages.all%28%29%3E'),
  1404. messageSends: [],
  1405. referencedClasses: []
  1406. }),
  1407. smalltalk.Smalltalk);
  1408. smalltalk.addMethod(
  1409. unescape('_packageAt_'),
  1410. smalltalk.method({
  1411. selector: unescape('packageAt%3A'),
  1412. category: 'packages',
  1413. fn: function (packageName){
  1414. var self=this;
  1415. return self.packages[packageName];
  1416. return self;},
  1417. args: ["packageName"],
  1418. source: unescape('packageAt%3A%20packageName%0A%20%20%20%20%20%20%20%3Creturn%20self.packages%5BpackageName%5D%3E'),
  1419. messageSends: [],
  1420. referencedClasses: []
  1421. }),
  1422. smalltalk.Smalltalk);
  1423. smalltalk.addMethod(
  1424. unescape('_packageAt_ifAbsent_'),
  1425. smalltalk.method({
  1426. selector: unescape('packageAt%3AifAbsent%3A'),
  1427. category: 'packages',
  1428. fn: function (packageName, aBlock){
  1429. var self=this;
  1430. return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
  1431. return self;},
  1432. args: ["packageName", "aBlock"],
  1433. source: unescape('packageAt%3A%20packageName%20ifAbsent%3A%20aBlock%0A%20%20%20%20%20%20%20%5E%28self%20packageAt%3A%20packageName%29%20ifNil%3A%20aBlock'),
  1434. messageSends: ["ifNil:", "packageAt:"],
  1435. referencedClasses: []
  1436. }),
  1437. smalltalk.Smalltalk);
  1438. smalltalk.addMethod(
  1439. unescape('_createPackage_'),
  1440. smalltalk.method({
  1441. selector: unescape('createPackage%3A'),
  1442. category: 'private',
  1443. fn: function (packageName){
  1444. var self=this;
  1445. return smalltalk.addPackage(packageName, nil);
  1446. return self;},
  1447. args: ["packageName"],
  1448. source: unescape('createPackage%3A%20packageName%0A%09%22Create%20and%20bind%20a%20new%20package%20with%20given%20name%20and%20return%20it.%22%0A%0A%20%20%20%20%20%20%3Creturn%20smalltalk.addPackage%28packageName%2C%20nil%29%3E'),
  1449. messageSends: [],
  1450. referencedClasses: []
  1451. }),
  1452. smalltalk.Smalltalk);
  1453. smalltalk.addMethod(
  1454. unescape('_deletePackage_'),
  1455. smalltalk.method({
  1456. selector: unescape('deletePackage%3A'),
  1457. category: 'private',
  1458. fn: function (packageName){
  1459. var self=this;
  1460. delete smalltalk.packages[packageName];
  1461. return self;},
  1462. args: ["packageName"],
  1463. source: unescape('deletePackage%3A%20packageName%0A%09%22Deletes%20a%20package%20by%20deleting%20its%20binding%2C%20but%20does%20not%20check%20if%20it%20contains%20classes%20etc.%0A%09To%20remove%20a%20package%2C%20use%20%23removePackage%20instead.%22%0A%0A%20%20%20%20%20%20%20%3Cdelete%20smalltalk.packages%5BpackageName%5D%3E'),
  1464. messageSends: [],
  1465. referencedClasses: []
  1466. }),
  1467. smalltalk.Smalltalk);
  1468. smalltalk.addMethod(
  1469. unescape('_removePackage_'),
  1470. smalltalk.method({
  1471. selector: unescape('removePackage%3A'),
  1472. category: 'packages',
  1473. fn: function (packageName){
  1474. var self=this;
  1475. var pkg=nil;
  1476. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  1477. smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [(function(each){return smalltalk.send(self, "_removeClass_", [each]);})]);
  1478. smalltalk.send(self, "_deletePackage_", [packageName]);
  1479. return self;},
  1480. args: ["packageName"],
  1481. source: unescape('removePackage%3A%20packageName%0A%09%22Removes%20a%20package%20and%20all%20its%20classes.%22%0A%0A%09%7C%20pkg%20%7C%0A%09pkg%20%3A%3D%20self%20packageAt%3A%20packageName%20ifAbsent%3A%20%5Bself%20error%3A%20%27Missing%20package%3A%20%27%2C%20packageName%5D.%0A%09pkg%20classes%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%20%20%20%20%09self%20removeClass%3A%20each%5D.%0A%09self%20deletePackage%3A%20packageName'),
  1482. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "do:", "classes", "removeClass:", "deletePackage:"],
  1483. referencedClasses: []
  1484. }),
  1485. smalltalk.Smalltalk);
  1486. smalltalk.addMethod(
  1487. unescape('_renamePackage_to_'),
  1488. smalltalk.method({
  1489. selector: unescape('renamePackage%3Ato%3A'),
  1490. category: 'packages',
  1491. fn: function (packageName, newName){
  1492. var self=this;
  1493. var pkg=nil;
  1494. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  1495. (($receiver = smalltalk.send(self, "_packageAt_", [newName])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Already exists a package called: ", "__comma", [newName])]);})() : nil;
  1496. smalltalk.packages[newName] = smalltalk.packages[packageName];
  1497. smalltalk.send(pkg, "_name_", [newName]);
  1498. smalltalk.send(self, "_deletePackage_", [packageName]);
  1499. return self;},
  1500. args: ["packageName", "newName"],
  1501. source: unescape('renamePackage%3A%20packageName%20to%3A%20newName%0A%09%22Rename%20a%20package.%22%0A%0A%09%7C%20pkg%20%7C%0A%09pkg%20%3A%3D%20self%20packageAt%3A%20packageName%20ifAbsent%3A%20%5Bself%20error%3A%20%27Missing%20package%3A%20%27%2C%20packageName%5D.%0A%09%28self%20packageAt%3A%20newName%29%20ifNotNil%3A%20%5Bself%20error%3A%20%27Already%20exists%20a%20package%20called%3A%20%27%2C%20newName%5D.%0A%09%3Csmalltalk.packages%5BnewName%5D%20%3D%20smalltalk.packages%5BpackageName%5D%3E.%0A%09pkg%20name%3A%20newName.%0A%09self%20deletePackage%3A%20packageName.'),
  1502. messageSends: ["packageAt:ifAbsent:", "error:", unescape("%2C"), "ifNotNil:", "packageAt:", "name:", "deletePackage:"],
  1503. referencedClasses: []
  1504. }),
  1505. smalltalk.Smalltalk);
  1506. smalltalk.addMethod(
  1507. unescape('_reservedWords'),
  1508. smalltalk.method({
  1509. selector: unescape('reservedWords'),
  1510. category: 'accessing',
  1511. fn: function (){
  1512. var self=this;
  1513. return self.reservedWords;
  1514. return self;},
  1515. args: [],
  1516. source: unescape('reservedWords%0A%09%22JavaScript%20reserved%20words%22%0A%09%3Creturn%20self.reservedWords%3E'),
  1517. messageSends: [],
  1518. referencedClasses: []
  1519. }),
  1520. smalltalk.Smalltalk);
  1521. smalltalk.addMethod(
  1522. unescape('_createPackage_properties_'),
  1523. smalltalk.method({
  1524. selector: unescape('createPackage%3Aproperties%3A'),
  1525. category: 'private',
  1526. fn: function (packageName, aDict){
  1527. var self=this;
  1528. var object=nil;
  1529. object = {};;
  1530. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  1531. return smalltalk.addPackage(packageName, object);
  1532. return self;},
  1533. args: ["packageName", "aDict"],
  1534. source: unescape('createPackage%3A%20packageName%20properties%3A%20aDict%0A%09%22Create%20and%20bind%20a%20new%20package%20with%20given%20name%20and%20return%20it.%22%0A%0A%09%7C%20object%20%7C%0A%09%3Cobject%20%3D%20%7B%7D%3B%3E.%0A%09aDict%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09%3Cobject%5Bkey%5D%20%3D%20value%3E.%0A%09%5D.%0A%20%20%20%20%20%20%20%3Creturn%20smalltalk.addPackage%28packageName%2C%20object%29%3E'),
  1535. messageSends: ["keysAndValuesDo:"],
  1536. referencedClasses: []
  1537. }),
  1538. smalltalk.Smalltalk);
  1539. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  1540. smalltalk.addMethod(
  1541. unescape('_current'),
  1542. smalltalk.method({
  1543. selector: unescape('current'),
  1544. category: 'accessing',
  1545. fn: function (){
  1546. var self=this;
  1547. return smalltalk;
  1548. return self;},
  1549. args: [],
  1550. source: unescape('current%0A%09%3Creturn%20smalltalk%3E'),
  1551. messageSends: [],
  1552. referencedClasses: []
  1553. }),
  1554. smalltalk.Smalltalk.klass);
  1555. smalltalk.addClass('Package', smalltalk.Object, [], 'Kernel');
  1556. smalltalk.Package.comment=unescape('A%20Package%20is%20similar%20to%20a%20%22class%20category%22%20typically%20found%20in%20other%20Smalltalks%20like%20Pharo%20or%20Squeak.%20Amber%20does%20not%20have%20class%20categories%20anymore%2C%20it%20had%20in%20the%20beginning%20but%20now%20each%20class%20in%20the%20system%20knows%20which%20package%20it%20belongs%20to.%0A%0AA%20Package%20has%20a%20name%2C%20an%20Array%20of%20%22requires%22%2C%20a%20comment%20and%20a%20Dictionary%20with%20other%20optional%20key%20value%20attributes.%20A%20Package%20can%20also%20be%20queried%20for%20its%20classes%2C%20but%20it%20will%20then%20resort%20to%20a%20reverse%20scan%20of%20all%20classes%20to%20find%20them.%0APackages%20are%20manipulated%20through%20%22Smalltalk%20current%22%2C%20like%20for%20example%20finding%20one%20based%20on%20a%20name%3A%0A%0A%09Smalltalk%20current%20packageAt%3A%20%27Kernel%27%0A%0A...but%20you%20can%20also%20use%3A%0A%0A%09Package%20named%3A%20%27Kernel%27%0A%0AA%20Package%20differs%20slightly%20from%20a%20Monticello%20package%20which%20can%20span%20multiple%20class%20categories%20using%20a%20naming%20convention%20based%20on%20hyphenation.%20But%20just%20as%20in%20Monticello%20a%20Package%20supports%20%22class%20extensions%22%20so%20a%20Package%0Acan%20define%20behaviors%20in%20foreign%20classes%20using%20a%20naming%20convention%20for%20method%20categories%20where%20the%20category%20starts%20with%20an%20asterisk%20and%20then%20the%20name%20of%20the%20owning%20package%20follows.%20This%20can%20easily%20be%20seen%20in%20for%20example%20class%0AString%20where%20the%20method%20category%20%22*IDE%22%20defines%20%23inspectOn%3A%20which%20thus%20is%20a%20method%20belonging%20to%20the%20IDE%20package.')
  1557. smalltalk.addMethod(
  1558. unescape('_name'),
  1559. smalltalk.method({
  1560. selector: unescape('name'),
  1561. category: 'accessing',
  1562. fn: function (){
  1563. var self=this;
  1564. return self.pkgName || nil;
  1565. return self;},
  1566. args: [],
  1567. source: unescape('name%0A%09%3Creturn%20self.pkgName%20%7C%7C%20nil%3E'),
  1568. messageSends: [],
  1569. referencedClasses: []
  1570. }),
  1571. smalltalk.Package);
  1572. smalltalk.addMethod(
  1573. unescape('_name_'),
  1574. smalltalk.method({
  1575. selector: unescape('name%3A'),
  1576. category: 'accessing',
  1577. fn: function (aString){
  1578. var self=this;
  1579. return self.pkgName = aString;
  1580. return self;},
  1581. args: ["aString"],
  1582. source: unescape('name%3A%20aString%0A%09%3Creturn%20self.pkgName%20%3D%20aString%3E'),
  1583. messageSends: [],
  1584. referencedClasses: []
  1585. }),
  1586. smalltalk.Package);
  1587. smalltalk.addMethod(
  1588. unescape('_classes'),
  1589. smalltalk.method({
  1590. selector: unescape('classes'),
  1591. category: 'classes',
  1592. fn: function (){
  1593. var self=this;
  1594. return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_select_", [(function(c){return smalltalk.send(smalltalk.send(c, "_package", []), "__eq_eq", [self]);})]);
  1595. return self;},
  1596. args: [],
  1597. source: unescape('classes%0A%09%22We%20need%20to%20do%20a%20reverse%20scan.%22%0A%09%5ESmalltalk%20current%20classes%20select%3A%20%5B%3Ac%20%7C%20c%20package%20%3D%3D%20self%5D'),
  1598. messageSends: ["select:", "classes", "current", unescape("%3D%3D"), "package"],
  1599. referencedClasses: [smalltalk.Smalltalk]
  1600. }),
  1601. smalltalk.Package);
  1602. smalltalk.addMethod(
  1603. unescape('_printString'),
  1604. smalltalk.method({
  1605. selector: unescape('printString'),
  1606. category: 'printing',
  1607. fn: function (){
  1608. var self=this;
  1609. return smalltalk.send(self, "_name", []);
  1610. return self;},
  1611. args: [],
  1612. source: unescape('printString%0A%09%5Eself%20name'),
  1613. messageSends: ["name"],
  1614. referencedClasses: []
  1615. }),
  1616. smalltalk.Package);
  1617. smalltalk.addMethod(
  1618. unescape('_dependencies'),
  1619. smalltalk.method({
  1620. selector: unescape('dependencies'),
  1621. category: 'accessing',
  1622. fn: function (){
  1623. var self=this;
  1624. return smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies", (function(){return [];})]);
  1625. return self;},
  1626. args: [],
  1627. source: unescape('dependencies%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20ifAbsent%3A%20%5B%23%28%29%5D'),
  1628. messageSends: ["propertyAt:ifAbsent:"],
  1629. referencedClasses: []
  1630. }),
  1631. smalltalk.Package);
  1632. smalltalk.addMethod(
  1633. unescape('_dependencies_'),
  1634. smalltalk.method({
  1635. selector: unescape('dependencies%3A'),
  1636. category: 'accessing',
  1637. fn: function (anArray){
  1638. var self=this;
  1639. return smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
  1640. return self;},
  1641. args: ["anArray"],
  1642. source: unescape('dependencies%3A%20anArray%0A%09%5Eself%20propertyAt%3A%20%27dependencies%27%20put%3A%20anArray'),
  1643. messageSends: ["propertyAt:put:"],
  1644. referencedClasses: []
  1645. }),
  1646. smalltalk.Package);
  1647. smalltalk.addMethod(
  1648. unescape('_properties'),
  1649. smalltalk.method({
  1650. selector: unescape('properties'),
  1651. category: 'accessing',
  1652. fn: function (){
  1653. var self=this;
  1654. var result=nil;
  1655. result=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  1656. for (var i in self.properties) {
  1657. result._at_put_(i, self.properties[i]);
  1658. }
  1659. return result;;
  1660. return self;},
  1661. args: [],
  1662. source: unescape('properties%0A%09%22It%20is%20stored%20as%20a%20javascript%20object.%22%0A%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20Dictionary%20new.%0A%09%3Cfor%20%28var%20i%20in%20self.properties%29%20%7B%0A%09%09result._at_put_%28i%2C%20self.properties%5Bi%5D%29%3B%0A%09%7D%0A%09return%20result%3B%3E'),
  1663. messageSends: ["new"],
  1664. referencedClasses: [smalltalk.Dictionary]
  1665. }),
  1666. smalltalk.Package);
  1667. smalltalk.addMethod(
  1668. unescape('_propertiesAsJSON'),
  1669. smalltalk.method({
  1670. selector: unescape('propertiesAsJSON'),
  1671. category: 'private',
  1672. fn: function (){
  1673. var self=this;
  1674. return JSON.stringify(self.properties);
  1675. return self;},
  1676. args: [],
  1677. source: unescape('propertiesAsJSON%0A%09%3Creturn%20JSON.stringify%28self.properties%29%3E'),
  1678. messageSends: [],
  1679. referencedClasses: []
  1680. }),
  1681. smalltalk.Package);
  1682. smalltalk.addMethod(
  1683. unescape('_properties_'),
  1684. smalltalk.method({
  1685. selector: unescape('properties%3A'),
  1686. category: 'accessing',
  1687. fn: function (aDict){
  1688. var self=this;
  1689. var object=nil;
  1690. object = {};;
  1691. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  1692. return self.properties = object;
  1693. return self;},
  1694. args: ["aDict"],
  1695. source: unescape('properties%3A%20aDict%0A%09%22We%20store%20it%20as%20a%20javascript%20object.%22%0A%09%0A%09%7C%20object%20%7C%0A%09%3Cobject%20%3D%20%7B%7D%3B%3E.%0A%09aDict%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09%3Cobject%5Bkey%5D%20%3D%20value%3E.%0A%09%5D.%0A%09%3Creturn%20self.properties%20%3D%20object%3E'),
  1696. messageSends: ["keysAndValuesDo:"],
  1697. referencedClasses: []
  1698. }),
  1699. smalltalk.Package);
  1700. smalltalk.addMethod(
  1701. unescape('_jsProperties'),
  1702. smalltalk.method({
  1703. selector: unescape('jsProperties'),
  1704. category: 'private',
  1705. fn: function (){
  1706. var self=this;
  1707. return self.properties || nil;
  1708. return self;},
  1709. args: [],
  1710. source: unescape('jsProperties%0A%09%3Creturn%20self.properties%20%7C%7C%20nil%3E'),
  1711. messageSends: [],
  1712. referencedClasses: []
  1713. }),
  1714. smalltalk.Package);
  1715. smalltalk.addMethod(
  1716. unescape('_jsProperties_'),
  1717. smalltalk.method({
  1718. selector: unescape('jsProperties%3A'),
  1719. category: 'private',
  1720. fn: function (aJSObject){
  1721. var self=this;
  1722. return self.properties = aJSObject;
  1723. return self;},
  1724. args: ["aJSObject"],
  1725. source: unescape('jsProperties%3A%20aJSObject%0A%09%3Creturn%20self.properties%20%3D%20aJSObject%3E'),
  1726. messageSends: [],
  1727. referencedClasses: []
  1728. }),
  1729. smalltalk.Package);
  1730. smalltalk.addMethod(
  1731. unescape('_propertyAt_'),
  1732. smalltalk.method({
  1733. selector: unescape('propertyAt%3A'),
  1734. category: 'properties',
  1735. fn: function (key){
  1736. var self=this;
  1737. return self.properties[key];
  1738. return self;},
  1739. args: ["key"],
  1740. source: unescape('propertyAt%3A%20key%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%3E'),
  1741. messageSends: [],
  1742. referencedClasses: []
  1743. }),
  1744. smalltalk.Package);
  1745. smalltalk.addMethod(
  1746. unescape('_propertyAt_put_'),
  1747. smalltalk.method({
  1748. selector: unescape('propertyAt%3Aput%3A'),
  1749. category: 'properties',
  1750. fn: function (key, value){
  1751. var self=this;
  1752. return self.properties[key] = value;
  1753. return self;},
  1754. args: ["key", "value"],
  1755. source: unescape('propertyAt%3A%20key%20put%3A%20value%0A%0A%09%3Creturn%20self.properties%5Bkey%5D%20%3D%20value%3E'),
  1756. messageSends: [],
  1757. referencedClasses: []
  1758. }),
  1759. smalltalk.Package);
  1760. smalltalk.addMethod(
  1761. unescape('_propertyAt_ifAbsent_'),
  1762. smalltalk.method({
  1763. selector: unescape('propertyAt%3AifAbsent%3A'),
  1764. category: 'properties',
  1765. fn: function (key, block){
  1766. var self=this;
  1767. return (($receiver = smalltalk.send(self, "_propertyAt_", [key])) == nil || $receiver == undefined) ? (function(){return smalltalk.send(block, "_value", []);})() : $receiver;
  1768. return self;},
  1769. args: ["key", "block"],
  1770. source: unescape('propertyAt%3A%20key%20ifAbsent%3A%20block%0A%0A%09%5E%28self%20propertyAt%3A%20key%29%20ifNil%3A%20%5Bblock%20value%5D'),
  1771. messageSends: ["ifNil:", "propertyAt:", "value"],
  1772. referencedClasses: []
  1773. }),
  1774. smalltalk.Package);
  1775. smalltalk.addMethod(
  1776. unescape('_named_'),
  1777. smalltalk.method({
  1778. selector: unescape('named%3A'),
  1779. category: 'not yet classified',
  1780. fn: function (aPackageName){
  1781. var self=this;
  1782. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [aPackageName]);
  1783. return self;},
  1784. args: ["aPackageName"],
  1785. source: unescape('named%3A%20aPackageName%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName'),
  1786. messageSends: ["packageAt:", "current"],
  1787. referencedClasses: [smalltalk.Smalltalk]
  1788. }),
  1789. smalltalk.Package.klass);
  1790. smalltalk.addMethod(
  1791. unescape('_named_ifAbsent_'),
  1792. smalltalk.method({
  1793. selector: unescape('named%3AifAbsent%3A'),
  1794. category: 'not yet classified',
  1795. fn: function (aPackageName, aBlock){
  1796. var self=this;
  1797. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
  1798. return self;},
  1799. args: ["aPackageName", "aBlock"],
  1800. source: unescape('named%3A%20aPackageName%20ifAbsent%3A%20aBlock%0A%0A%09%5ESmalltalk%20current%20packageAt%3A%20aPackageName%20ifAbsent%3A%20aBlock'),
  1801. messageSends: ["packageAt:ifAbsent:", "current"],
  1802. referencedClasses: [smalltalk.Smalltalk]
  1803. }),
  1804. smalltalk.Package.klass);
  1805. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel');
  1806. smalltalk.addMethod(
  1807. unescape('_new'),
  1808. smalltalk.method({
  1809. selector: unescape('new'),
  1810. category: 'instance creation',
  1811. fn: function (){
  1812. var self=this;
  1813. return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  1814. return self;},
  1815. args: [],
  1816. source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
  1817. messageSends: ["initialize", "basicNew"],
  1818. referencedClasses: []
  1819. }),
  1820. smalltalk.Behavior);
  1821. smalltalk.addMethod(
  1822. unescape('_basicNew'),
  1823. smalltalk.method({
  1824. selector: unescape('basicNew'),
  1825. category: 'instance creation',
  1826. fn: function (){
  1827. var self=this;
  1828. return new self.fn();
  1829. return self;},
  1830. args: [],
  1831. source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
  1832. messageSends: [],
  1833. referencedClasses: []
  1834. }),
  1835. smalltalk.Behavior);
  1836. smalltalk.addMethod(
  1837. unescape('_name'),
  1838. smalltalk.method({
  1839. selector: unescape('name'),
  1840. category: 'accessing',
  1841. fn: function (){
  1842. var self=this;
  1843. return self.className || nil;
  1844. return self;},
  1845. args: [],
  1846. source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
  1847. messageSends: [],
  1848. referencedClasses: []
  1849. }),
  1850. smalltalk.Behavior);
  1851. smalltalk.addMethod(
  1852. unescape('_superclass'),
  1853. smalltalk.method({
  1854. selector: unescape('superclass'),
  1855. category: 'accessing',
  1856. fn: function (){
  1857. var self=this;
  1858. return self.superclass || nil;
  1859. return self;},
  1860. args: [],
  1861. source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
  1862. messageSends: [],
  1863. referencedClasses: []
  1864. }),
  1865. smalltalk.Behavior);
  1866. smalltalk.addMethod(
  1867. unescape('_subclasses'),
  1868. smalltalk.method({
  1869. selector: unescape('subclasses'),
  1870. category: 'accessing',
  1871. fn: function (){
  1872. var self=this;
  1873. return smalltalk.subclasses(self);
  1874. return self;},
  1875. args: [],
  1876. source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
  1877. messageSends: [],
  1878. referencedClasses: []
  1879. }),
  1880. smalltalk.Behavior);
  1881. smalltalk.addMethod(
  1882. unescape('_allSubclasses'),
  1883. smalltalk.method({
  1884. selector: unescape('allSubclasses'),
  1885. category: 'accessing',
  1886. fn: function (){
  1887. var self=this;
  1888. var result=nil;
  1889. result=smalltalk.send(self, "_subclasses", []);
  1890. smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
  1891. return result;
  1892. return self;},
  1893. args: [],
  1894. source: unescape('allSubclasses%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20subclasses.%0A%09self%20subclasses%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20result%20addAll%3A%20each%20allSubclasses%5D.%0A%09%5Eresult'),
  1895. messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
  1896. referencedClasses: []
  1897. }),
  1898. smalltalk.Behavior);
  1899. smalltalk.addMethod(
  1900. unescape('_withAllSubclasses'),
  1901. smalltalk.method({
  1902. selector: unescape('withAllSubclasses'),
  1903. category: 'accessing',
  1904. fn: function (){
  1905. var self=this;
  1906. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
  1907. return self;},
  1908. args: [],
  1909. source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
  1910. messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
  1911. referencedClasses: [smalltalk.Array]
  1912. }),
  1913. smalltalk.Behavior);
  1914. smalltalk.addMethod(
  1915. unescape('_prototype'),
  1916. smalltalk.method({
  1917. selector: unescape('prototype'),
  1918. category: 'accessing',
  1919. fn: function (){
  1920. var self=this;
  1921. return self.fn.prototype;
  1922. return self;},
  1923. args: [],
  1924. source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
  1925. messageSends: [],
  1926. referencedClasses: []
  1927. }),
  1928. smalltalk.Behavior);
  1929. smalltalk.addMethod(
  1930. unescape('_methodDictionary'),
  1931. smalltalk.method({
  1932. selector: unescape('methodDictionary'),
  1933. category: 'accessing',
  1934. fn: function (){
  1935. var self=this;
  1936. var dict = smalltalk.Dictionary._new();
  1937. var methods = self.fn.prototype.methods;
  1938. for(var i in methods) {
  1939. if(methods[i].selector) {
  1940. dict._at_put_(methods[i].selector, methods[i]);
  1941. }
  1942. };
  1943. return dict;
  1944. return self;},
  1945. args: [],
  1946. source: unescape('methodDictionary%0A%09%3Cvar%20dict%20%3D%20smalltalk.Dictionary._new%28%29%3B%0A%09var%20methods%20%3D%20self.fn.prototype.methods%3B%0A%09for%28var%20i%20in%20methods%29%20%7B%0A%09%09if%28methods%5Bi%5D.selector%29%20%7B%0A%09%09%09dict._at_put_%28methods%5Bi%5D.selector%2C%20methods%5Bi%5D%29%3B%0A%09%09%7D%0A%09%7D%3B%0A%09return%20dict%3E'),
  1947. messageSends: [],
  1948. referencedClasses: []
  1949. }),
  1950. smalltalk.Behavior);
  1951. smalltalk.addMethod(
  1952. unescape('_methodsFor_'),
  1953. smalltalk.method({
  1954. selector: unescape('methodsFor%3A'),
  1955. category: 'accessing',
  1956. fn: function (aString){
  1957. var self=this;
  1958. return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
  1959. return self;},
  1960. args: ["aString"],
  1961. source: unescape('methodsFor%3A%20aString%0A%09%5EClassCategoryReader%20new%0A%09%20%20%20%20class%3A%20self%20category%3A%20aString%3B%0A%09%20%20%20%20yourself'),
  1962. messageSends: ["class:category:", "yourself", "new"],
  1963. referencedClasses: [smalltalk.ClassCategoryReader]
  1964. }),
  1965. smalltalk.Behavior);
  1966. smalltalk.addMethod(
  1967. unescape('_addCompiledMethod_'),
  1968. smalltalk.method({
  1969. selector: unescape('addCompiledMethod%3A'),
  1970. category: 'accessing',
  1971. fn: function (aMethod){
  1972. var self=this;
  1973. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  1974. return self;},
  1975. args: ["aMethod"],
  1976. source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
  1977. messageSends: [],
  1978. referencedClasses: []
  1979. }),
  1980. smalltalk.Behavior);
  1981. smalltalk.addMethod(
  1982. unescape('_instanceVariableNames'),
  1983. smalltalk.method({
  1984. selector: unescape('instanceVariableNames'),
  1985. category: 'accessing',
  1986. fn: function (){
  1987. var self=this;
  1988. return self.iVarNames;
  1989. return self;},
  1990. args: [],
  1991. source: unescape('instanceVariableNames%0A%09%3Creturn%20self.iVarNames%3E'),
  1992. messageSends: [],
  1993. referencedClasses: []
  1994. }),
  1995. smalltalk.Behavior);
  1996. smalltalk.addMethod(
  1997. unescape('_comment'),
  1998. smalltalk.method({
  1999. selector: unescape('comment'),
  2000. category: 'accessing',
  2001. fn: function (){
  2002. var self=this;
  2003. return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  2004. return self;},
  2005. args: [],
  2006. source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
  2007. messageSends: ["ifNil:", "basicAt:"],
  2008. referencedClasses: []
  2009. }),
  2010. smalltalk.Behavior);
  2011. smalltalk.addMethod(
  2012. unescape('_comment_'),
  2013. smalltalk.method({
  2014. selector: unescape('comment%3A'),
  2015. category: 'accessing',
  2016. fn: function (aString){
  2017. var self=this;
  2018. smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
  2019. return self;},
  2020. args: ["aString"],
  2021. source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
  2022. messageSends: ["basicAt:put:"],
  2023. referencedClasses: []
  2024. }),
  2025. smalltalk.Behavior);
  2026. smalltalk.addMethod(
  2027. unescape('_commentStamp'),
  2028. smalltalk.method({
  2029. selector: unescape('commentStamp'),
  2030. category: 'accessing',
  2031. fn: function (){
  2032. var self=this;
  2033. return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
  2034. return self;},
  2035. args: [],
  2036. source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
  2037. messageSends: ["class:", "yourself", "new"],
  2038. referencedClasses: [smalltalk.ClassCommentReader]
  2039. }),
  2040. smalltalk.Behavior);
  2041. smalltalk.addMethod(
  2042. unescape('_removeCompiledMethod_'),
  2043. smalltalk.method({
  2044. selector: unescape('removeCompiledMethod%3A'),
  2045. category: 'accessing',
  2046. fn: function (aMethod){
  2047. var self=this;
  2048. delete self.fn.prototype[aMethod.selector._asSelector()];
  2049. delete self.fn.prototype.methods[aMethod.selector];
  2050. smalltalk.init(self);;
  2051. return self;},
  2052. args: ["aMethod"],
  2053. source: unescape('removeCompiledMethod%3A%20aMethod%0A%09%3Cdelete%20self.fn.prototype%5BaMethod.selector._asSelector%28%29%5D%3B%0A%09delete%20self.fn.prototype.methods%5BaMethod.selector%5D%3B%0A%09smalltalk.init%28self%29%3B%3E'),
  2054. messageSends: [],
  2055. referencedClasses: []
  2056. }),
  2057. smalltalk.Behavior);
  2058. smalltalk.addMethod(
  2059. unescape('_inheritsFrom_'),
  2060. smalltalk.method({
  2061. selector: unescape('inheritsFrom%3A'),
  2062. category: 'instance creation',
  2063. fn: function (aClass){
  2064. var self=this;
  2065. return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
  2066. return self;},
  2067. args: ["aClass"],
  2068. source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
  2069. messageSends: ["includes:", "allSubclasses"],
  2070. referencedClasses: []
  2071. }),
  2072. smalltalk.Behavior);
  2073. smalltalk.addMethod(
  2074. unescape('_protocols'),
  2075. smalltalk.method({
  2076. selector: unescape('protocols'),
  2077. category: 'accessing',
  2078. fn: function (){
  2079. var self=this;
  2080. var protocols=nil;
  2081. protocols=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2082. smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(protocols, "_includes_", [smalltalk.send(each, "_category", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})]));})]);
  2083. return smalltalk.send(protocols, "_sort", []);
  2084. return self;},
  2085. args: [],
  2086. source: unescape('protocols%0A%20%20%20%20%7C%20protocols%20%7C%0A%20%20%20%20protocols%20%3A%3D%20Array%20new.%0A%20%20%20%20self%20methodDictionary%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20%28protocols%20includes%3A%20each%20category%29%20ifFalse%3A%20%5B%0A%09%09protocols%20add%3A%20each%20category%5D%5D.%0A%20%20%20%20%5Eprotocols%20sort'),
  2087. messageSends: ["new", "do:", "methodDictionary", "ifFalse:", "includes:", "category", "add:", "sort"],
  2088. referencedClasses: [smalltalk.Array]
  2089. }),
  2090. smalltalk.Behavior);
  2091. smalltalk.addMethod(
  2092. unescape('_protocolsDo_'),
  2093. smalltalk.method({
  2094. selector: unescape('protocolsDo%3A'),
  2095. category: 'accessing',
  2096. fn: function (aBlock){
  2097. var self=this;
  2098. var methodsByCategory=nil;
  2099. methodsByCategory=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  2100. smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_values", []), "_do_", [(function(m){return smalltalk.send(smalltalk.send(methodsByCategory, "_at_ifAbsentPut_", [smalltalk.send(m, "_category", []), (function(){return smalltalk.send((smalltalk.Array || Array), "_new", []);})]), "_add_", [m]);})]);
  2101. smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
  2102. return self;},
  2103. args: ["aBlock"],
  2104. source: unescape('protocolsDo%3A%20aBlock%0A%09%22Execute%20aBlock%20for%20each%20method%20category%20with%0A%09its%20collection%20of%20methods%20in%20the%20sort%20order%20of%20category%20name.%22%0A%0A%09%7C%20methodsByCategory%20%7C%0A%09methodsByCategory%20%3A%3D%20Dictionary%20new.%0A%09self%20methodDictionary%20values%20do%3A%20%5B%3Am%20%7C%0A%09%09%28methodsByCategory%20at%3A%20m%20category%20ifAbsentPut%3A%20%5BArray%20new%5D%29%0A%20%09%09%09add%3A%20m%5D.%20%0A%09self%20protocols%20do%3A%20%5B%3Acategory%20%7C%0A%09%09aBlock%20value%3A%20category%20value%3A%20%28methodsByCategory%20at%3A%20category%29%5D'),
  2105. messageSends: ["new", "do:", "values", "methodDictionary", "add:", "at:ifAbsentPut:", "category", "protocols", "value:value:", "at:"],
  2106. referencedClasses: [smalltalk.Dictionary,smalltalk.Array]
  2107. }),
  2108. smalltalk.Behavior);
  2109. smalltalk.addMethod(
  2110. unescape('_allInstanceVariableNames'),
  2111. smalltalk.method({
  2112. selector: unescape('allInstanceVariableNames'),
  2113. category: 'accessing',
  2114. fn: function (){
  2115. var self=this;
  2116. var result=nil;
  2117. result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []);
  2118. (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
  2119. return result;
  2120. return self;},
  2121. args: [],
  2122. source: unescape('allInstanceVariableNames%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20instanceVariableNames%20copy.%0A%09self%20superclass%20ifNotNil%3A%20%5B%0A%09%20%20%20%20result%20addAll%3A%20self%20superclass%20allInstanceVariableNames%5D.%0A%09%5Eresult'),
  2123. messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
  2124. referencedClasses: []
  2125. }),
  2126. smalltalk.Behavior);
  2127. smalltalk.addMethod(
  2128. unescape('_methodAt_'),
  2129. smalltalk.method({
  2130. selector: unescape('methodAt%3A'),
  2131. category: 'accessing',
  2132. fn: function (aString){
  2133. var self=this;
  2134. return smalltalk.methods(self)[aString];
  2135. return self;},
  2136. args: ["aString"],
  2137. source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
  2138. messageSends: [],
  2139. referencedClasses: []
  2140. }),
  2141. smalltalk.Behavior);
  2142. smalltalk.addMethod(
  2143. unescape('_methodsFor_stamp_'),
  2144. smalltalk.method({
  2145. selector: unescape('methodsFor%3Astamp%3A'),
  2146. category: 'accessing',
  2147. fn: function (aString, aStamp){
  2148. var self=this;
  2149. return smalltalk.send(self, "_methodsFor_", [aString]);
  2150. return self;},
  2151. args: ["aString", "aStamp"],
  2152. source: unescape('methodsFor%3A%20aString%20stamp%3A%20aStamp%0A%09%22Added%20for%20compatibility%2C%20right%20now%20ignores%20stamp.%22%0A%09%5Eself%20methodsFor%3A%20aString'),
  2153. messageSends: ["methodsFor:"],
  2154. referencedClasses: []
  2155. }),
  2156. smalltalk.Behavior);
  2157. smalltalk.addMethod(
  2158. unescape('_commentStamp_prior_'),
  2159. smalltalk.method({
  2160. selector: unescape('commentStamp%3Aprior%3A'),
  2161. category: 'accessing',
  2162. fn: function (aStamp, prior){
  2163. var self=this;
  2164. return smalltalk.send(self, "_commentStamp", []);
  2165. return self;},
  2166. args: ["aStamp", "prior"],
  2167. source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
  2168. messageSends: ["commentStamp"],
  2169. referencedClasses: []
  2170. }),
  2171. smalltalk.Behavior);
  2172. smalltalk.addMethod(
  2173. unescape('_compile_'),
  2174. smalltalk.method({
  2175. selector: unescape('compile%3A'),
  2176. category: 'compiling',
  2177. fn: function (aString){
  2178. var self=this;
  2179. smalltalk.send(self, "_compile_category_", [aString, ""]);
  2180. return self;},
  2181. args: ["aString"],
  2182. source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
  2183. messageSends: ["compile:category:"],
  2184. referencedClasses: []
  2185. }),
  2186. smalltalk.Behavior);
  2187. smalltalk.addMethod(
  2188. unescape('_compile_category_'),
  2189. smalltalk.method({
  2190. selector: unescape('compile%3Acategory%3A'),
  2191. category: 'compiling',
  2192. fn: function (aString, anotherString){
  2193. var self=this;
  2194. var method=nil;
  2195. method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]);
  2196. smalltalk.send(method, "_category_", [anotherString]);
  2197. smalltalk.send(self, "_addCompiledMethod_", [method]);
  2198. return self;},
  2199. args: ["aString", "anotherString"],
  2200. source: unescape('compile%3A%20aString%20category%3A%20anotherString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20self.%0A%09method%20category%3A%20anotherString.%0A%09self%20addCompiledMethod%3A%20method'),
  2201. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  2202. referencedClasses: [smalltalk.Compiler]
  2203. }),
  2204. smalltalk.Behavior);
  2205. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel');
  2206. smalltalk.addMethod(
  2207. unescape('_category'),
  2208. smalltalk.method({
  2209. selector: unescape('category'),
  2210. category: 'accessing',
  2211. fn: function (){
  2212. var self=this;
  2213. return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
  2214. return self;},
  2215. args: [],
  2216. source: unescape('category%0A%09%5Eself%20package%20ifNil%3A%20%5B%27Unclassified%27%5D%20ifNotNil%3A%20%5Bself%20package%20name%5D'),
  2217. messageSends: ["ifNil:ifNotNil:", "package", "name"],
  2218. referencedClasses: []
  2219. }),
  2220. smalltalk.Class);
  2221. smalltalk.addMethod(
  2222. unescape('_subclass_instanceVariableNames_'),
  2223. smalltalk.method({
  2224. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  2225. category: 'class creation',
  2226. fn: function (aString, anotherString){
  2227. var self=this;
  2228. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  2229. return self;},
  2230. args: ["aString", "anotherString"],
  2231. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  2232. messageSends: ["subclass:instanceVariableNames:package:"],
  2233. referencedClasses: []
  2234. }),
  2235. smalltalk.Class);
  2236. smalltalk.addMethod(
  2237. unescape('_subclass_instanceVariableNames_category_'),
  2238. smalltalk.method({
  2239. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  2240. category: 'class creation',
  2241. fn: function (aString, aString2, aString3){
  2242. var self=this;
  2243. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  2244. return self;},
  2245. args: ["aString", "aString2", "aString3"],
  2246. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  2247. messageSends: ["subclass:instanceVariableNames:package:"],
  2248. referencedClasses: []
  2249. }),
  2250. smalltalk.Class);
  2251. smalltalk.addMethod(
  2252. unescape('_isClass'),
  2253. smalltalk.method({
  2254. selector: unescape('isClass'),
  2255. category: 'testing',
  2256. fn: function (){
  2257. var self=this;
  2258. return true;
  2259. return self;},
  2260. args: [],
  2261. source: unescape('isClass%0A%09%5Etrue'),
  2262. messageSends: [],
  2263. referencedClasses: []
  2264. }),
  2265. smalltalk.Class);
  2266. smalltalk.addMethod(
  2267. unescape('_printString'),
  2268. smalltalk.method({
  2269. selector: unescape('printString'),
  2270. category: 'printing',
  2271. fn: function (){
  2272. var self=this;
  2273. return smalltalk.send(self, "_name", []);
  2274. return self;},
  2275. args: [],
  2276. source: unescape('printString%0A%09%5Eself%20name'),
  2277. messageSends: ["name"],
  2278. referencedClasses: []
  2279. }),
  2280. smalltalk.Class);
  2281. smalltalk.addMethod(
  2282. unescape('_rename_'),
  2283. smalltalk.method({
  2284. selector: unescape('rename%3A'),
  2285. category: 'accessing',
  2286. fn: function (aString){
  2287. var self=this;
  2288. smalltalk[aString] = self;
  2289. delete smalltalk[self.className];
  2290. self.className = aString;
  2291. ;
  2292. return self;},
  2293. args: ["aString"],
  2294. source: unescape('rename%3A%20aString%0A%09%3C%0A%09%09smalltalk%5BaString%5D%20%3D%20self%3B%0A%09%09delete%20smalltalk%5Bself.className%5D%3B%0A%09%09self.className%20%3D%20aString%3B%0A%09%3E'),
  2295. messageSends: [],
  2296. referencedClasses: []
  2297. }),
  2298. smalltalk.Class);
  2299. smalltalk.addMethod(
  2300. unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
  2301. smalltalk.method({
  2302. selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
  2303. category: 'class creation',
  2304. fn: function (aString, aString2, classVars, pools, aString3){
  2305. var self=this;
  2306. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  2307. return self;},
  2308. args: ["aString", "aString2", "classVars", "pools", "aString3"],
  2309. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20classVariableNames%3A%20classVars%20poolDictionaries%3A%20pools%20category%3A%20aString3%0A%09%22Just%20ignore%20class%20variables%20and%20pools.%20Added%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  2310. messageSends: ["subclass:instanceVariableNames:package:"],
  2311. referencedClasses: []
  2312. }),
  2313. smalltalk.Class);
  2314. smalltalk.addMethod(
  2315. unescape('_package'),
  2316. smalltalk.method({
  2317. selector: unescape('package'),
  2318. category: 'accessing',
  2319. fn: function (){
  2320. var self=this;
  2321. return self.pkg;
  2322. return self;},
  2323. args: [],
  2324. source: unescape('package%0A%09%3Creturn%20self.pkg%3E'),
  2325. messageSends: [],
  2326. referencedClasses: []
  2327. }),
  2328. smalltalk.Class);
  2329. smalltalk.addMethod(
  2330. unescape('_package_'),
  2331. smalltalk.method({
  2332. selector: unescape('package%3A'),
  2333. category: 'accessing',
  2334. fn: function (aPackage){
  2335. var self=this;
  2336. self.pkg = aPackage;
  2337. return self;},
  2338. args: ["aPackage"],
  2339. source: unescape('package%3A%20aPackage%0A%09%3Cself.pkg%20%3D%20aPackage%3E'),
  2340. messageSends: [],
  2341. referencedClasses: []
  2342. }),
  2343. smalltalk.Class);
  2344. smalltalk.addMethod(
  2345. unescape('_subclass_instanceVariableNames_package_'),
  2346. smalltalk.method({
  2347. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  2348. category: 'class creation',
  2349. fn: function (aString, aString2, aString3){
  2350. var self=this;
  2351. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  2352. return self;},
  2353. args: ["aString", "aString2", "aString3"],
  2354. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  2355. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  2356. referencedClasses: [smalltalk.ClassBuilder]
  2357. }),
  2358. smalltalk.Class);
  2359. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel');
  2360. smalltalk.addMethod(
  2361. unescape('_instanceClass'),
  2362. smalltalk.method({
  2363. selector: unescape('instanceClass'),
  2364. category: 'accessing',
  2365. fn: function (){
  2366. var self=this;
  2367. return self.instanceClass;
  2368. return self;},
  2369. args: [],
  2370. source: unescape('instanceClass%0A%09%3Creturn%20self.instanceClass%3E'),
  2371. messageSends: [],
  2372. referencedClasses: []
  2373. }),
  2374. smalltalk.Metaclass);
  2375. smalltalk.addMethod(
  2376. unescape('_instanceVariableNames_'),
  2377. smalltalk.method({
  2378. selector: unescape('instanceVariableNames%3A'),
  2379. category: 'accessing',
  2380. fn: function (aCollection){
  2381. var self=this;
  2382. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
  2383. return self;},
  2384. args: ["aCollection"],
  2385. source: unescape('instanceVariableNames%3A%20aCollection%0A%09ClassBuilder%20new%0A%09%20%20%20%20class%3A%20self%20instanceVariableNames%3A%20aCollection'),
  2386. messageSends: ["class:instanceVariableNames:", "new"],
  2387. referencedClasses: [smalltalk.ClassBuilder]
  2388. }),
  2389. smalltalk.Metaclass);
  2390. smalltalk.addMethod(
  2391. unescape('_isMetaclass'),
  2392. smalltalk.method({
  2393. selector: unescape('isMetaclass'),
  2394. category: 'testing',
  2395. fn: function (){
  2396. var self=this;
  2397. return true;
  2398. return self;},
  2399. args: [],
  2400. source: unescape('isMetaclass%0A%09%5Etrue'),
  2401. messageSends: [],
  2402. referencedClasses: []
  2403. }),
  2404. smalltalk.Metaclass);
  2405. smalltalk.addMethod(
  2406. unescape('_printString'),
  2407. smalltalk.method({
  2408. selector: unescape('printString'),
  2409. category: 'printing',
  2410. fn: function (){
  2411. var self=this;
  2412. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
  2413. return self;},
  2414. args: [],
  2415. source: unescape('printString%0A%09%5Eself%20instanceClass%20name%2C%20%27%20class%27'),
  2416. messageSends: [unescape("%2C"), "name", "instanceClass"],
  2417. referencedClasses: []
  2418. }),
  2419. smalltalk.Metaclass);
  2420. smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel');
  2421. smalltalk.addMethod(
  2422. unescape('_source'),
  2423. smalltalk.method({
  2424. selector: unescape('source'),
  2425. category: 'accessing',
  2426. fn: function (){
  2427. var self=this;
  2428. return (($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  2429. return self;},
  2430. args: [],
  2431. source: unescape('source%0A%09%5E%28self%20basicAt%3A%20%27source%27%29%20ifNil%3A%20%5B%27%27%5D'),
  2432. messageSends: ["ifNil:", "basicAt:"],
  2433. referencedClasses: []
  2434. }),
  2435. smalltalk.CompiledMethod);
  2436. smalltalk.addMethod(
  2437. unescape('_source_'),
  2438. smalltalk.method({
  2439. selector: unescape('source%3A'),
  2440. category: 'accessing',
  2441. fn: function (aString){
  2442. var self=this;
  2443. smalltalk.send(self, "_basicAt_put_", ["source", aString]);
  2444. return self;},
  2445. args: ["aString"],
  2446. source: unescape('source%3A%20aString%0A%09self%20basicAt%3A%20%27source%27%20put%3A%20aString'),
  2447. messageSends: ["basicAt:put:"],
  2448. referencedClasses: []
  2449. }),
  2450. smalltalk.CompiledMethod);
  2451. smalltalk.addMethod(
  2452. unescape('_category'),
  2453. smalltalk.method({
  2454. selector: unescape('category'),
  2455. category: 'accessing',
  2456. fn: function (){
  2457. var self=this;
  2458. return (($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  2459. return self;},
  2460. args: [],
  2461. source: unescape('category%0A%09%5E%28self%20basicAt%3A%20%27category%27%29%20ifNil%3A%20%5B%27%27%5D'),
  2462. messageSends: ["ifNil:", "basicAt:"],
  2463. referencedClasses: []
  2464. }),
  2465. smalltalk.CompiledMethod);
  2466. smalltalk.addMethod(
  2467. unescape('_category_'),
  2468. smalltalk.method({
  2469. selector: unescape('category%3A'),
  2470. category: 'accessing',
  2471. fn: function (aString){
  2472. var self=this;
  2473. smalltalk.send(self, "_basicAt_put_", ["category", aString]);
  2474. return self;},
  2475. args: ["aString"],
  2476. source: unescape('category%3A%20aString%0A%09self%20basicAt%3A%20%27category%27%20put%3A%20aString'),
  2477. messageSends: ["basicAt:put:"],
  2478. referencedClasses: []
  2479. }),
  2480. smalltalk.CompiledMethod);
  2481. smalltalk.addMethod(
  2482. unescape('_selector'),
  2483. smalltalk.method({
  2484. selector: unescape('selector'),
  2485. category: 'accessing',
  2486. fn: function (){
  2487. var self=this;
  2488. return smalltalk.send(self, "_basicAt_", ["selector"]);
  2489. return self;},
  2490. args: [],
  2491. source: unescape('selector%0A%09%5Eself%20basicAt%3A%20%27selector%27'),
  2492. messageSends: ["basicAt:"],
  2493. referencedClasses: []
  2494. }),
  2495. smalltalk.CompiledMethod);
  2496. smalltalk.addMethod(
  2497. unescape('_selector_'),
  2498. smalltalk.method({
  2499. selector: unescape('selector%3A'),
  2500. category: 'accessing',
  2501. fn: function (aString){
  2502. var self=this;
  2503. smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
  2504. return self;},
  2505. args: ["aString"],
  2506. source: unescape('selector%3A%20aString%0A%09self%20basicAt%3A%20%27selector%27%20put%3A%20aString'),
  2507. messageSends: ["basicAt:put:"],
  2508. referencedClasses: []
  2509. }),
  2510. smalltalk.CompiledMethod);
  2511. smalltalk.addMethod(
  2512. unescape('_fn'),
  2513. smalltalk.method({
  2514. selector: unescape('fn'),
  2515. category: 'accessing',
  2516. fn: function (){
  2517. var self=this;
  2518. return smalltalk.send(self, "_basicAt_", ["fn"]);
  2519. return self;},
  2520. args: [],
  2521. source: unescape('fn%0A%09%5Eself%20basicAt%3A%20%27fn%27'),
  2522. messageSends: ["basicAt:"],
  2523. referencedClasses: []
  2524. }),
  2525. smalltalk.CompiledMethod);
  2526. smalltalk.addMethod(
  2527. unescape('_fn_'),
  2528. smalltalk.method({
  2529. selector: unescape('fn%3A'),
  2530. category: 'accessing',
  2531. fn: function (aBlock){
  2532. var self=this;
  2533. smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
  2534. return self;},
  2535. args: ["aBlock"],
  2536. source: unescape('fn%3A%20aBlock%0A%09self%20basicAt%3A%20%27fn%27%20put%3A%20aBlock'),
  2537. messageSends: ["basicAt:put:"],
  2538. referencedClasses: []
  2539. }),
  2540. smalltalk.CompiledMethod);
  2541. smalltalk.addMethod(
  2542. unescape('_messageSends'),
  2543. smalltalk.method({
  2544. selector: unescape('messageSends'),
  2545. category: 'accessing',
  2546. fn: function (){
  2547. var self=this;
  2548. return smalltalk.send(self, "_basicAt_", ["messageSends"]);
  2549. return self;},
  2550. args: [],
  2551. source: unescape('messageSends%0A%09%5Eself%20basicAt%3A%20%27messageSends%27'),
  2552. messageSends: ["basicAt:"],
  2553. referencedClasses: []
  2554. }),
  2555. smalltalk.CompiledMethod);
  2556. smalltalk.addMethod(
  2557. unescape('_methodClass'),
  2558. smalltalk.method({
  2559. selector: unescape('methodClass'),
  2560. category: 'accessing',
  2561. fn: function (){
  2562. var self=this;
  2563. return smalltalk.send(self, "_basicAt_", ["methodClass"]);
  2564. return self;},
  2565. args: [],
  2566. source: unescape('methodClass%0A%09%5Eself%20basicAt%3A%20%27methodClass%27'),
  2567. messageSends: ["basicAt:"],
  2568. referencedClasses: []
  2569. }),
  2570. smalltalk.CompiledMethod);
  2571. smalltalk.addMethod(
  2572. unescape('_referencedClasses'),
  2573. smalltalk.method({
  2574. selector: unescape('referencedClasses'),
  2575. category: 'accessing',
  2576. fn: function (){
  2577. var self=this;
  2578. return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
  2579. return self;},
  2580. args: [],
  2581. source: unescape('referencedClasses%0A%09%5Eself%20basicAt%3A%20%27referencedClasses%27'),
  2582. messageSends: ["basicAt:"],
  2583. referencedClasses: []
  2584. }),
  2585. smalltalk.CompiledMethod);
  2586. smalltalk.addMethod(
  2587. unescape('_arguments'),
  2588. smalltalk.method({
  2589. selector: unescape('arguments'),
  2590. category: 'accessing',
  2591. fn: function (){
  2592. var self=this;
  2593. return self.args || [];
  2594. return self;},
  2595. args: [],
  2596. source: unescape('arguments%0A%09%3Creturn%20self.args%20%7C%7C%20%5B%5D%3E'),
  2597. messageSends: [],
  2598. referencedClasses: []
  2599. }),
  2600. smalltalk.CompiledMethod);
  2601. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel');
  2602. smalltalk.addMethod(
  2603. unescape('__eq'),
  2604. smalltalk.method({
  2605. selector: unescape('%3D'),
  2606. category: 'comparing',
  2607. fn: function (aNumber){
  2608. var self=this;
  2609. try{((($receiver = smalltalk.send(smalltalk.send(aNumber, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  2610. return Number(self) == aNumber;
  2611. return self;
  2612. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  2613. args: ["aNumber"],
  2614. source: unescape('%3D%20aNumber%0A%09aNumber%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%20aNumber%3E'),
  2615. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  2616. referencedClasses: []
  2617. }),
  2618. smalltalk.Number);
  2619. smalltalk.addMethod(
  2620. unescape('__gt'),
  2621. smalltalk.method({
  2622. selector: unescape('%3E'),
  2623. category: 'comparing',
  2624. fn: function (aNumber){
  2625. var self=this;
  2626. return self > aNumber;
  2627. return self;},
  2628. args: ["aNumber"],
  2629. source: unescape('%3E%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%20aNumber%3E'),
  2630. messageSends: [],
  2631. referencedClasses: []
  2632. }),
  2633. smalltalk.Number);
  2634. smalltalk.addMethod(
  2635. unescape('__lt'),
  2636. smalltalk.method({
  2637. selector: unescape('%3C'),
  2638. category: 'comparing',
  2639. fn: function (aNumber){
  2640. var self=this;
  2641. return self < aNumber;
  2642. return self;},
  2643. args: ["aNumber"],
  2644. source: unescape('%3C%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%20aNumber%3E'),
  2645. messageSends: [],
  2646. referencedClasses: []
  2647. }),
  2648. smalltalk.Number);
  2649. smalltalk.addMethod(
  2650. unescape('__gt_eq'),
  2651. smalltalk.method({
  2652. selector: unescape('%3E%3D'),
  2653. category: 'comparing',
  2654. fn: function (aNumber){
  2655. var self=this;
  2656. return self >= aNumber;
  2657. return self;},
  2658. args: ["aNumber"],
  2659. source: unescape('%3E%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3E%3E%3D%20aNumber%3E'),
  2660. messageSends: [],
  2661. referencedClasses: []
  2662. }),
  2663. smalltalk.Number);
  2664. smalltalk.addMethod(
  2665. unescape('__lt_eq'),
  2666. smalltalk.method({
  2667. selector: unescape('%3C%3D'),
  2668. category: 'comparing',
  2669. fn: function (aNumber){
  2670. var self=this;
  2671. return self <= aNumber;
  2672. return self;},
  2673. args: ["aNumber"],
  2674. source: unescape('%3C%3D%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20%3C%3D%20aNumber%3E'),
  2675. messageSends: [],
  2676. referencedClasses: []
  2677. }),
  2678. smalltalk.Number);
  2679. smalltalk.addMethod(
  2680. unescape('__plus'),
  2681. smalltalk.method({
  2682. selector: unescape('+'),
  2683. category: 'arithmetic',
  2684. fn: function (aNumber){
  2685. var self=this;
  2686. return self + aNumber;
  2687. return self;},
  2688. args: ["aNumber"],
  2689. source: unescape('+%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20+%20aNumber%3E'),
  2690. messageSends: [],
  2691. referencedClasses: []
  2692. }),
  2693. smalltalk.Number);
  2694. smalltalk.addMethod(
  2695. unescape('__minus'),
  2696. smalltalk.method({
  2697. selector: unescape('-'),
  2698. category: 'arithmetic',
  2699. fn: function (aNumber){
  2700. var self=this;
  2701. return self - aNumber;
  2702. return self;},
  2703. args: ["aNumber"],
  2704. source: unescape('-%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20-%20aNumber%3E'),
  2705. messageSends: [],
  2706. referencedClasses: []
  2707. }),
  2708. smalltalk.Number);
  2709. smalltalk.addMethod(
  2710. unescape('__star'),
  2711. smalltalk.method({
  2712. selector: unescape('*'),
  2713. category: 'arithmetic',
  2714. fn: function (aNumber){
  2715. var self=this;
  2716. return self * aNumber;
  2717. return self;},
  2718. args: ["aNumber"],
  2719. source: unescape('*%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20*%20aNumber%3E'),
  2720. messageSends: [],
  2721. referencedClasses: []
  2722. }),
  2723. smalltalk.Number);
  2724. smalltalk.addMethod(
  2725. unescape('__slash'),
  2726. smalltalk.method({
  2727. selector: unescape('/'),
  2728. category: 'arithmetic',
  2729. fn: function (aNumber){
  2730. var self=this;
  2731. return self / aNumber;
  2732. return self;},
  2733. args: ["aNumber"],
  2734. source: unescape('/%20aNumber%0A%09%22Inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%20/%20aNumber%3E'),
  2735. messageSends: [],
  2736. referencedClasses: []
  2737. }),
  2738. smalltalk.Number);
  2739. smalltalk.addMethod(
  2740. unescape('_max_'),
  2741. smalltalk.method({
  2742. selector: unescape('max%3A'),
  2743. category: 'arithmetic',
  2744. fn: function (aNumber){
  2745. var self=this;
  2746. return Math.max(self, aNumber);;
  2747. return self;},
  2748. args: ["aNumber"],
  2749. source: unescape('max%3A%20aNumber%0A%09%3Creturn%20Math.max%28self%2C%20aNumber%29%3B%3E'),
  2750. messageSends: [],
  2751. referencedClasses: []
  2752. }),
  2753. smalltalk.Number);
  2754. smalltalk.addMethod(
  2755. unescape('_min_'),
  2756. smalltalk.method({
  2757. selector: unescape('min%3A'),
  2758. category: 'arithmetic',
  2759. fn: function (aNumber){
  2760. var self=this;
  2761. return Math.min(self, aNumber);;
  2762. return self;},
  2763. args: ["aNumber"],
  2764. source: unescape('min%3A%20aNumber%0A%09%3Creturn%20Math.min%28self%2C%20aNumber%29%3B%3E'),
  2765. messageSends: [],
  2766. referencedClasses: []
  2767. }),
  2768. smalltalk.Number);
  2769. smalltalk.addMethod(
  2770. unescape('_rounded'),
  2771. smalltalk.method({
  2772. selector: unescape('rounded'),
  2773. category: 'converting',
  2774. fn: function (){
  2775. var self=this;
  2776. return Math.round(self);;
  2777. return self;},
  2778. args: [],
  2779. source: unescape('rounded%0A%09%3Creturn%20Math.round%28self%29%3B%3E'),
  2780. messageSends: [],
  2781. referencedClasses: []
  2782. }),
  2783. smalltalk.Number);
  2784. smalltalk.addMethod(
  2785. unescape('_truncated'),
  2786. smalltalk.method({
  2787. selector: unescape('truncated'),
  2788. category: 'converting',
  2789. fn: function (){
  2790. var self=this;
  2791. var result=nil;
  2792. ((($receiver = self >= (0)).klass === smalltalk.Boolean) ? ($receiver ? (function(){return result = Math.floor(self);;})() : (function(){return result = (Math.floor(self * (-1)) * (-1));;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return result = Math.floor(self);;}), (function(){return result = (Math.floor(self * (-1)) * (-1));;})]));
  2793. return result;
  2794. return self;},
  2795. args: [],
  2796. source: unescape('truncated%0A%7Cresult%7C%0A%0A%20%20%20%20self%20%3E%3D%200%20%0A%20%20%20%20%20%20%20%20ifTrue%3A%20%5B%3Cresult%20%3D%20Math.floor%28self%29%3B%3E%5D%0A%20%20%20%20%20%20%20%20ifFalse%3A%20%5B%3Cresult%20%3D%20%28Math.floor%28self%20*%20%28-1%29%29%20*%20%28-1%29%29%3B%3E%5D.%0A%0A%20%20%20%20%5E%20result'),
  2797. messageSends: ["ifTrue:ifFalse:", unescape("%3E%3D")],
  2798. referencedClasses: []
  2799. }),
  2800. smalltalk.Number);
  2801. smalltalk.addMethod(
  2802. unescape('_to_'),
  2803. smalltalk.method({
  2804. selector: unescape('to%3A'),
  2805. category: 'converting',
  2806. fn: function (aNumber){
  2807. var self=this;
  2808. var array=nil;
  2809. var first=nil;
  2810. var last=nil;
  2811. var count=nil;
  2812. first=smalltalk.send(self, "_truncated", []);
  2813. last=((($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  2814. count=(1);
  2815. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  2816. smalltalk.send(((($receiver = last).klass === smalltalk.Number) ? $receiver -first : smalltalk.send($receiver, "__minus", [first])), "_timesRepeat_", [(function(){smalltalk.send(array, "_at_put_", [count, first]);count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return first=((($receiver = first).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})]);
  2817. return array;
  2818. return self;},
  2819. args: ["aNumber"],
  2820. source: unescape('to%3A%20aNumber%0A%09%7C%20array%20first%20last%20count%20%7C%0A%09first%20%3A%3D%20self%20truncated.%0A%09last%20%3A%3D%20aNumber%20truncated%20+%201.%0A%09count%20%3A%3D%201.%0A%09array%20%3A%3D%20Array%20new.%0A%09%28last%20-%20first%29%20timesRepeat%3A%20%5B%0A%09%20%20%20%20array%20at%3A%20count%20put%3A%20first.%0A%09%20%20%20%20count%20%3A%3D%20count%20+%201.%0A%09%20%20%20%20first%20%3A%3D%20first%20+%201%5D.%0A%09%5Earray'),
  2821. messageSends: ["truncated", unescape("+"), "new", "timesRepeat:", unescape("-"), "at:put:"],
  2822. referencedClasses: [smalltalk.Array]
  2823. }),
  2824. smalltalk.Number);
  2825. smalltalk.addMethod(
  2826. unescape('_timesRepeat_'),
  2827. smalltalk.method({
  2828. selector: unescape('timesRepeat%3A'),
  2829. category: 'enumerating',
  2830. fn: function (aBlock){
  2831. var self=this;
  2832. var integer=nil;
  2833. var count=nil;
  2834. integer=smalltalk.send(self, "_truncated", []);
  2835. count=(1);
  2836. (function(){while(!(function(){return ((($receiver = count).klass === smalltalk.Number) ? $receiver >self : smalltalk.send($receiver, "__gt", [self]));})()) {(function(){smalltalk.send(aBlock, "_value", []);return count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()}})();
  2837. return self;},
  2838. args: ["aBlock"],
  2839. source: unescape('timesRepeat%3A%20aBlock%0A%09%7C%20integer%20count%20%7C%0A%09integer%20%3A%3D%20self%20truncated.%0A%09count%20%3A%3D%201.%0A%09%5Bcount%20%3E%20self%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20aBlock%20value.%0A%09%20%20%20%20count%20%3A%3D%20count%20+%201%5D'),
  2840. messageSends: ["truncated", "whileFalse:", unescape("%3E"), "value", unescape("+")],
  2841. referencedClasses: []
  2842. }),
  2843. smalltalk.Number);
  2844. smalltalk.addMethod(
  2845. unescape('_to_do_'),
  2846. smalltalk.method({
  2847. selector: unescape('to%3Ado%3A'),
  2848. category: 'enumerating',
  2849. fn: function (stop, aBlock){
  2850. var self=this;
  2851. var nextValue=nil;
  2852. nextValue=self;
  2853. (function(){while((function(){return ((($receiver = nextValue).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [nextValue]);return nextValue=((($receiver = nextValue).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()}})();
  2854. return self;},
  2855. args: ["stop", "aBlock"],
  2856. source: unescape('to%3A%20stop%20do%3A%20aBlock%0A%09%22Evaluate%20aBlock%20for%20each%20number%20from%20self%20to%20aNumber.%22%0A%09%7C%20nextValue%20%7C%0A%09nextValue%20%3A%3D%20self.%0A%09%5BnextValue%20%3C%3D%20stop%5D%0A%09%09whileTrue%3A%20%0A%09%09%09%5BaBlock%20value%3A%20nextValue.%0A%09%09%09nextValue%20%3A%3D%20nextValue%20+%201%5D'),
  2857. messageSends: ["whileTrue:", unescape("%3C%3D"), "value:", unescape("+")],
  2858. referencedClasses: []
  2859. }),
  2860. smalltalk.Number);
  2861. smalltalk.addMethod(
  2862. unescape('_asString'),
  2863. smalltalk.method({
  2864. selector: unescape('asString'),
  2865. category: 'converting',
  2866. fn: function (){
  2867. var self=this;
  2868. return smalltalk.send(self, "_printString", []);
  2869. return self;},
  2870. args: [],
  2871. source: unescape('asString%0A%09%5Eself%20printString'),
  2872. messageSends: ["printString"],
  2873. referencedClasses: []
  2874. }),
  2875. smalltalk.Number);
  2876. smalltalk.addMethod(
  2877. unescape('_asJavascript'),
  2878. smalltalk.method({
  2879. selector: unescape('asJavascript'),
  2880. category: 'converting',
  2881. fn: function (){
  2882. var self=this;
  2883. return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
  2884. return self;},
  2885. args: [],
  2886. source: unescape('asJavascript%0A%09%5E%27%28%27%2C%20self%20printString%2C%20%27%29%27'),
  2887. messageSends: [unescape("%2C"), "printString"],
  2888. referencedClasses: []
  2889. }),
  2890. smalltalk.Number);
  2891. smalltalk.addMethod(
  2892. unescape('_printString'),
  2893. smalltalk.method({
  2894. selector: unescape('printString'),
  2895. category: 'printing',
  2896. fn: function (){
  2897. var self=this;
  2898. return String(self);
  2899. return self;},
  2900. args: [],
  2901. source: unescape('printString%0A%09%3Creturn%20String%28self%29%3E'),
  2902. messageSends: [],
  2903. referencedClasses: []
  2904. }),
  2905. smalltalk.Number);
  2906. smalltalk.addMethod(
  2907. unescape('_isNumber'),
  2908. smalltalk.method({
  2909. selector: unescape('isNumber'),
  2910. category: 'testing',
  2911. fn: function (){
  2912. var self=this;
  2913. return true;
  2914. return self;},
  2915. args: [],
  2916. source: unescape('isNumber%0A%09%5Etrue'),
  2917. messageSends: [],
  2918. referencedClasses: []
  2919. }),
  2920. smalltalk.Number);
  2921. smalltalk.addMethod(
  2922. unescape('_atRandom'),
  2923. smalltalk.method({
  2924. selector: unescape('atRandom'),
  2925. category: 'converting',
  2926. fn: function (){
  2927. var self=this;
  2928. return ((($receiver = smalltalk.send(((($receiver = smalltalk.send(smalltalk.send((smalltalk.Random || Random), "_new", []), "_next", [])).klass === smalltalk.Number) ? $receiver *self : smalltalk.send($receiver, "__star", [self])), "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  2929. return self;},
  2930. args: [],
  2931. source: unescape('atRandom%0A%20%20%20%20%5E%28Random%20new%20next%20*%20self%29%20truncated%20+%201'),
  2932. messageSends: [unescape("+"), "truncated", unescape("*"), "next", "new"],
  2933. referencedClasses: [smalltalk.Random]
  2934. }),
  2935. smalltalk.Number);
  2936. smalltalk.addMethod(
  2937. unescape('__at'),
  2938. smalltalk.method({
  2939. selector: unescape('@'),
  2940. category: 'converting',
  2941. fn: function (aNumber){
  2942. var self=this;
  2943. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, aNumber]);
  2944. return self;},
  2945. args: ["aNumber"],
  2946. source: unescape('@%20aNumber%0A%09%5EPoint%20x%3A%20self%20y%3A%20aNumber'),
  2947. messageSends: ["x:y:"],
  2948. referencedClasses: [smalltalk.Point]
  2949. }),
  2950. smalltalk.Number);
  2951. smalltalk.addMethod(
  2952. unescape('_asPoint'),
  2953. smalltalk.method({
  2954. selector: unescape('asPoint'),
  2955. category: 'converting',
  2956. fn: function (){
  2957. var self=this;
  2958. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, self]);
  2959. return self;},
  2960. args: [],
  2961. source: unescape('asPoint%0A%09%5EPoint%20x%3A%20self%20y%3A%20self'),
  2962. messageSends: ["x:y:"],
  2963. referencedClasses: [smalltalk.Point]
  2964. }),
  2965. smalltalk.Number);
  2966. smalltalk.addMethod(
  2967. unescape('_clearInterval'),
  2968. smalltalk.method({
  2969. selector: unescape('clearInterval'),
  2970. category: 'timeouts/intervals',
  2971. fn: function (){
  2972. var self=this;
  2973. clearInterval(Number(self));
  2974. return self;},
  2975. args: [],
  2976. source: unescape('clearInterval%0A%09%3CclearInterval%28Number%28self%29%29%3E'),
  2977. messageSends: [],
  2978. referencedClasses: []
  2979. }),
  2980. smalltalk.Number);
  2981. smalltalk.addMethod(
  2982. unescape('_asJSONObject'),
  2983. smalltalk.method({
  2984. selector: unescape('asJSONObject'),
  2985. category: 'converting',
  2986. fn: function (){
  2987. var self=this;
  2988. return self;
  2989. return self;},
  2990. args: [],
  2991. source: unescape('asJSONObject%0A%09%5Eself'),
  2992. messageSends: [],
  2993. referencedClasses: []
  2994. }),
  2995. smalltalk.Number);
  2996. smalltalk.addMethod(
  2997. unescape('_clearTimeout'),
  2998. smalltalk.method({
  2999. selector: unescape('clearTimeout'),
  3000. category: 'timeouts/intervals',
  3001. fn: function (){
  3002. var self=this;
  3003. clearTimeout(Number(self));
  3004. return self;},
  3005. args: [],
  3006. source: unescape('clearTimeout%0A%09%3CclearTimeout%28Number%28self%29%29%3E'),
  3007. messageSends: [],
  3008. referencedClasses: []
  3009. }),
  3010. smalltalk.Number);
  3011. smalltalk.addMethod(
  3012. unescape('_even'),
  3013. smalltalk.method({
  3014. selector: unescape('even'),
  3015. category: 'testing',
  3016. fn: function (){
  3017. var self=this;
  3018. return smalltalk.send((0), "__eq", [smalltalk.send(self, "_\\\\", [(2)])]);
  3019. return self;},
  3020. args: [],
  3021. source: unescape('even%0A%09%5E%200%20%3D%20%28self%20%5C%5C%202%29'),
  3022. messageSends: [unescape("%3D"), unescape("%5C%5C%5C%5C")],
  3023. referencedClasses: []
  3024. }),
  3025. smalltalk.Number);
  3026. smalltalk.addMethod(
  3027. unescape('_odd'),
  3028. smalltalk.method({
  3029. selector: unescape('odd'),
  3030. category: 'testing',
  3031. fn: function (){
  3032. var self=this;
  3033. return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
  3034. return self;},
  3035. args: [],
  3036. source: unescape('odd%0A%09%5E%20self%20even%20not'),
  3037. messageSends: ["not", "even"],
  3038. referencedClasses: []
  3039. }),
  3040. smalltalk.Number);
  3041. smalltalk.addMethod(
  3042. unescape('_negated'),
  3043. smalltalk.method({
  3044. selector: unescape('negated'),
  3045. category: 'arithmetic',
  3046. fn: function (){
  3047. var self=this;
  3048. return (0) - self;
  3049. return self;},
  3050. args: [],
  3051. source: unescape('negated%0A%09%5E0%20-%20self'),
  3052. messageSends: [unescape("-")],
  3053. referencedClasses: []
  3054. }),
  3055. smalltalk.Number);
  3056. smalltalk.addMethod(
  3057. unescape('__eq_eq'),
  3058. smalltalk.method({
  3059. selector: unescape('%3D%3D'),
  3060. category: 'comparing',
  3061. fn: function (aNumber){
  3062. var self=this;
  3063. try{((($receiver = smalltalk.send(smalltalk.send(aNumber, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  3064. return Number(self) === Number(aNumber);
  3065. return self;
  3066. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  3067. args: ["aNumber"],
  3068. source: unescape('%3D%3D%20aNumber%0A%09aNumber%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%20%0A%09%3Creturn%20Number%28self%29%20%3D%3D%3D%20Number%28aNumber%29%3E'),
  3069. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3070. referencedClasses: []
  3071. }),
  3072. smalltalk.Number);
  3073. smalltalk.addMethod(
  3074. unescape('_printShowingDecimalPlaces_'),
  3075. smalltalk.method({
  3076. selector: unescape('printShowingDecimalPlaces%3A'),
  3077. category: 'printing',
  3078. fn: function (placesDesired){
  3079. var self=this;
  3080. return self.toFixed(placesDesired);
  3081. return self;},
  3082. args: ["placesDesired"],
  3083. source: unescape('printShowingDecimalPlaces%3A%20placesDesired%0A%09%3Creturn%20self.toFixed%28placesDesired%29%3E'),
  3084. messageSends: [],
  3085. referencedClasses: []
  3086. }),
  3087. smalltalk.Number);
  3088. smalltalk.addMethod(
  3089. unescape('_%5C%5C'),
  3090. smalltalk.method({
  3091. selector: unescape('%5C%5C'),
  3092. category: 'arithmetic',
  3093. fn: function (aNumber){
  3094. var self=this;
  3095. return self % aNumber;
  3096. return self;},
  3097. args: ["aNumber"],
  3098. source: unescape('%5C%5C%20aNumber%0A%09%3Creturn%20self%20%25%20aNumber%3E'),
  3099. messageSends: [],
  3100. referencedClasses: []
  3101. }),
  3102. smalltalk.Number);
  3103. smalltalk.addMethod(
  3104. unescape('_to_by_'),
  3105. smalltalk.method({
  3106. selector: unescape('to%3Aby%3A'),
  3107. category: 'converting',
  3108. fn: function (stop, step){
  3109. var self=this;
  3110. var array=nil;
  3111. var value=nil;
  3112. var pos=nil;
  3113. value=self;
  3114. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  3115. pos=(1);
  3116. ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})]));
  3117. ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})]));
  3118. return array;
  3119. return self;},
  3120. args: ["stop", "step"],
  3121. source: unescape('to%3A%20stop%20by%3A%20step%0A%09%7C%20array%20value%20pos%20%7C%0A%09value%20%3A%3D%20self.%0A%09array%20%3A%3D%20Array%20new.%0A%09pos%20%3A%3D%201.%0A%09step%20%3D%200%20ifTrue%3A%20%5Bself%20error%3A%20%27step%20must%20be%20non-zero%27%5D.%0A%09step%20%3C%200%0A%09%09ifTrue%3A%20%5B%5B%20value%20%3E%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09array%20at%3A%20pos%20put%3A%20value.%0A%09%20%20%20%20%09%09%09pos%20%3A%3D%20pos%20+%201.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D%0A%09%09ifFalse%3A%20%5B%5B%20value%20%3C%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09array%20at%3A%20pos%20put%3A%20value.%0A%09%20%20%09%09%09pos%20%3A%3D%20pos%20+%201.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D.%0A%09%5Earray'),
  3122. messageSends: ["new", "ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "at:put:", unescape("+"), unescape("%3C%3D")],
  3123. referencedClasses: [smalltalk.Array]
  3124. }),
  3125. smalltalk.Number);
  3126. smalltalk.addMethod(
  3127. unescape('_to_by_do_'),
  3128. smalltalk.method({
  3129. selector: unescape('to%3Aby%3Ado%3A'),
  3130. category: 'enumerating',
  3131. fn: function (stop, step, aBlock){
  3132. var self=this;
  3133. var value=nil;
  3134. value=self;
  3135. ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})]));
  3136. ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})]));
  3137. return self;},
  3138. args: ["stop", "step", "aBlock"],
  3139. source: unescape('to%3A%20stop%20by%3A%20step%20do%3A%20aBlock%0A%09%7C%20value%20%7C%0A%09value%20%3A%3D%20self.%0A%09step%20%3D%200%20ifTrue%3A%20%5Bself%20error%3A%20%27step%20must%20be%20non-zero%27%5D.%0A%09step%20%3C%200%0A%09%09ifTrue%3A%20%5B%5B%20value%20%3E%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09aBlock%20value%3A%20value.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D%0A%09%09ifFalse%3A%20%5B%5B%20value%20%3C%3D%20stop%20%5D%20whileTrue%3A%20%5B%0A%09%20%20%20%20%09%09%09aBlock%20value%3A%20value.%0A%09%20%20%20%20%09%09%09value%20%3A%3D%20value%20+%20step%5D%5D'),
  3140. messageSends: ["ifTrue:", unescape("%3D"), "error:", "ifTrue:ifFalse:", unescape("%3C"), "whileTrue:", unescape("%3E%3D"), "value:", unescape("+"), unescape("%3C%3D")],
  3141. referencedClasses: []
  3142. }),
  3143. smalltalk.Number);
  3144. smalltalk.addMethod(
  3145. unescape('_deepCopy'),
  3146. smalltalk.method({
  3147. selector: unescape('deepCopy'),
  3148. category: 'copying',
  3149. fn: function (){
  3150. var self=this;
  3151. return smalltalk.send(self, "_copy", []);
  3152. return self;},
  3153. args: [],
  3154. source: unescape('deepCopy%0A%09%5Eself%20copy'),
  3155. messageSends: ["copy"],
  3156. referencedClasses: []
  3157. }),
  3158. smalltalk.Number);
  3159. smalltalk.addMethod(
  3160. unescape('_copy'),
  3161. smalltalk.method({
  3162. selector: unescape('copy'),
  3163. category: 'copying',
  3164. fn: function (){
  3165. var self=this;
  3166. return self;
  3167. return self;},
  3168. args: [],
  3169. source: unescape('copy%0A%09%5Eself'),
  3170. messageSends: [],
  3171. referencedClasses: []
  3172. }),
  3173. smalltalk.Number);
  3174. smalltalk.addMethod(
  3175. unescape('_pi'),
  3176. smalltalk.method({
  3177. selector: unescape('pi'),
  3178. category: 'instance creation',
  3179. fn: function (){
  3180. var self=this;
  3181. return Math.PI;
  3182. return self;},
  3183. args: [],
  3184. source: unescape('pi%0A%09%3Creturn%20Math.PI%3E'),
  3185. messageSends: [],
  3186. referencedClasses: []
  3187. }),
  3188. smalltalk.Number.klass);
  3189. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel');
  3190. smalltalk.addMethod(
  3191. unescape('_compiledSource'),
  3192. smalltalk.method({
  3193. selector: unescape('compiledSource'),
  3194. category: 'accessing',
  3195. fn: function (){
  3196. var self=this;
  3197. return self.toString();
  3198. return self;},
  3199. args: [],
  3200. source: unescape('compiledSource%0A%09%3Creturn%20self.toString%28%29%3E'),
  3201. messageSends: [],
  3202. referencedClasses: []
  3203. }),
  3204. smalltalk.BlockClosure);
  3205. smalltalk.addMethod(
  3206. unescape('_whileTrue_'),
  3207. smalltalk.method({
  3208. selector: unescape('whileTrue%3A'),
  3209. category: 'controlling',
  3210. fn: function (aBlock){
  3211. var self=this;
  3212. while(self()) {aBlock()};
  3213. return self;},
  3214. args: ["aBlock"],
  3215. source: unescape('whileTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Cwhile%28self%28%29%29%20%7BaBlock%28%29%7D%3E'),
  3216. messageSends: [],
  3217. referencedClasses: []
  3218. }),
  3219. smalltalk.BlockClosure);
  3220. smalltalk.addMethod(
  3221. unescape('_whileFalse_'),
  3222. smalltalk.method({
  3223. selector: unescape('whileFalse%3A'),
  3224. category: 'controlling',
  3225. fn: function (aBlock){
  3226. var self=this;
  3227. while(!self()) {aBlock()};
  3228. return self;},
  3229. args: ["aBlock"],
  3230. source: unescape('whileFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Cwhile%28%21self%28%29%29%20%7BaBlock%28%29%7D%3E'),
  3231. messageSends: [],
  3232. referencedClasses: []
  3233. }),
  3234. smalltalk.BlockClosure);
  3235. smalltalk.addMethod(
  3236. unescape('_value'),
  3237. smalltalk.method({
  3238. selector: unescape('value'),
  3239. category: 'evaluating',
  3240. fn: function (){
  3241. var self=this;
  3242. return self();;
  3243. return self;},
  3244. args: [],
  3245. source: unescape('value%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28%29%3B%3E'),
  3246. messageSends: [],
  3247. referencedClasses: []
  3248. }),
  3249. smalltalk.BlockClosure);
  3250. smalltalk.addMethod(
  3251. unescape('_value_'),
  3252. smalltalk.method({
  3253. selector: unescape('value%3A'),
  3254. category: 'evaluating',
  3255. fn: function (anArg){
  3256. var self=this;
  3257. return self(anArg);;
  3258. return self;},
  3259. args: ["anArg"],
  3260. source: unescape('value%3A%20anArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28anArg%29%3B%3E'),
  3261. messageSends: [],
  3262. referencedClasses: []
  3263. }),
  3264. smalltalk.BlockClosure);
  3265. smalltalk.addMethod(
  3266. unescape('_value_value_'),
  3267. smalltalk.method({
  3268. selector: unescape('value%3Avalue%3A'),
  3269. category: 'evaluating',
  3270. fn: function (firstArg, secondArg){
  3271. var self=this;
  3272. return self(firstArg, secondArg);;
  3273. return self;},
  3274. args: ["firstArg", "secondArg"],
  3275. source: unescape('value%3A%20firstArg%20value%3A%20secondArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28firstArg%2C%20secondArg%29%3B%3E'),
  3276. messageSends: [],
  3277. referencedClasses: []
  3278. }),
  3279. smalltalk.BlockClosure);
  3280. smalltalk.addMethod(
  3281. unescape('_value_value_value_'),
  3282. smalltalk.method({
  3283. selector: unescape('value%3Avalue%3Avalue%3A'),
  3284. category: 'evaluating',
  3285. fn: function (firstArg, secondArg, thirdArg){
  3286. var self=this;
  3287. return self(firstArg, secondArg, thirdArg);;
  3288. return self;},
  3289. args: ["firstArg", "secondArg", "thirdArg"],
  3290. source: unescape('value%3A%20firstArg%20value%3A%20secondArg%20value%3A%20thirdArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28firstArg%2C%20secondArg%2C%20thirdArg%29%3B%3E'),
  3291. messageSends: [],
  3292. referencedClasses: []
  3293. }),
  3294. smalltalk.BlockClosure);
  3295. smalltalk.addMethod(
  3296. unescape('_valueWithPossibleArguments_'),
  3297. smalltalk.method({
  3298. selector: unescape('valueWithPossibleArguments%3A'),
  3299. category: 'evaluating',
  3300. fn: function (aCollection){
  3301. var self=this;
  3302. return self.apply(null, aCollection);;
  3303. return self;},
  3304. args: ["aCollection"],
  3305. source: unescape('valueWithPossibleArguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28null%2C%20aCollection%29%3B%3E'),
  3306. messageSends: [],
  3307. referencedClasses: []
  3308. }),
  3309. smalltalk.BlockClosure);
  3310. smalltalk.addMethod(
  3311. unescape('_on_do_'),
  3312. smalltalk.method({
  3313. selector: unescape('on%3Ado%3A'),
  3314. category: 'error handling',
  3315. fn: function (anErrorClass, aBlock){
  3316. var self=this;
  3317. smalltalk.send(self, "_try_catch_", [self, (function(error){return ((($receiver = smalltalk.send(error, "_isKindOf_", [anErrorClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aBlock, "_value_", [error]);})() : (function(){return smalltalk.send(error, "_signal", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value_", [error]);}), (function(){return smalltalk.send(error, "_signal", []);})]));})]);
  3318. return self;},
  3319. args: ["anErrorClass", "aBlock"],
  3320. source: unescape('on%3A%20anErrorClass%20do%3A%20aBlock%0A%09self%20try%3A%20self%20catch%3A%20%5B%3Aerror%20%7C%0A%09%20%20%20%20%28error%20isKindOf%3A%20anErrorClass%29%20%0A%09%20%20%20%20%20ifTrue%3A%20%5BaBlock%20value%3A%20error%5D%0A%09%20%20%20%20%20ifFalse%3A%20%5Berror%20signal%5D%5D'),
  3321. messageSends: ["try:catch:", "ifTrue:ifFalse:", "isKindOf:", "value:", "signal"],
  3322. referencedClasses: []
  3323. }),
  3324. smalltalk.BlockClosure);
  3325. smalltalk.addMethod(
  3326. unescape('_valueWithTimeout_'),
  3327. smalltalk.method({
  3328. selector: unescape('valueWithTimeout%3A'),
  3329. category: 'timeout/interval',
  3330. fn: function (aNumber){
  3331. var self=this;
  3332. return setTimeout(self, aNumber);
  3333. return self;},
  3334. args: ["aNumber"],
  3335. source: unescape('valueWithTimeout%3A%20aNumber%0A%09%3Creturn%20setTimeout%28self%2C%20aNumber%29%3E'),
  3336. messageSends: [],
  3337. referencedClasses: []
  3338. }),
  3339. smalltalk.BlockClosure);
  3340. smalltalk.addMethod(
  3341. unescape('_valueWithInterval_'),
  3342. smalltalk.method({
  3343. selector: unescape('valueWithInterval%3A'),
  3344. category: 'timeout/interval',
  3345. fn: function (aNumber){
  3346. var self=this;
  3347. return setInterval(self, aNumber);
  3348. return self;},
  3349. args: ["aNumber"],
  3350. source: unescape('valueWithInterval%3A%20aNumber%0A%09%3Creturn%20setInterval%28self%2C%20aNumber%29%3E'),
  3351. messageSends: [],
  3352. referencedClasses: []
  3353. }),
  3354. smalltalk.BlockClosure);
  3355. smalltalk.addMethod(
  3356. unescape('_whileFalse'),
  3357. smalltalk.method({
  3358. selector: unescape('whileFalse'),
  3359. category: 'controlling',
  3360. fn: function (){
  3361. var self=this;
  3362. smalltalk.send(self, "_whileFalse_", [(function(){return nil;})]);
  3363. return self;},
  3364. args: [],
  3365. source: unescape('whileFalse%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileFalse%3A%20%5B%5D'),
  3366. messageSends: ["whileFalse:"],
  3367. referencedClasses: []
  3368. }),
  3369. smalltalk.BlockClosure);
  3370. smalltalk.addMethod(
  3371. unescape('_whileTrue'),
  3372. smalltalk.method({
  3373. selector: unescape('whileTrue'),
  3374. category: 'controlling',
  3375. fn: function (){
  3376. var self=this;
  3377. smalltalk.send(self, "_whileTrue_", [(function(){return nil;})]);
  3378. return self;},
  3379. args: [],
  3380. source: unescape('whileTrue%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileTrue%3A%20%5B%5D'),
  3381. messageSends: ["whileTrue:"],
  3382. referencedClasses: []
  3383. }),
  3384. smalltalk.BlockClosure);
  3385. smalltalk.addMethod(
  3386. unescape('_new'),
  3387. smalltalk.method({
  3388. selector: unescape('new'),
  3389. category: 'evaluating',
  3390. fn: function (){
  3391. var self=this;
  3392. return new self();
  3393. return self;},
  3394. args: [],
  3395. source: unescape('new%0A%09%22Use%20the%20receiver%20as%20a%20JS%20constructor.%20%0A%09*Do%20not*%20use%20this%20method%20to%20instanciate%20Smalltalk%20objects%21%22%0A%09%3Creturn%20new%20self%28%29%3E'),
  3396. messageSends: [],
  3397. referencedClasses: []
  3398. }),
  3399. smalltalk.BlockClosure);
  3400. smalltalk.addMethod(
  3401. unescape('_applyTo_arguments_'),
  3402. smalltalk.method({
  3403. selector: unescape('applyTo%3Aarguments%3A'),
  3404. category: 'evaluating',
  3405. fn: function (anObject, aCollection){
  3406. var self=this;
  3407. return self.apply(anObject, aCollection);
  3408. return self;},
  3409. args: ["anObject", "aCollection"],
  3410. source: unescape('applyTo%3A%20anObject%20arguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28anObject%2C%20aCollection%29%3E'),
  3411. messageSends: [],
  3412. referencedClasses: []
  3413. }),
  3414. smalltalk.BlockClosure);
  3415. smalltalk.addMethod(
  3416. unescape('_timeToRun'),
  3417. smalltalk.method({
  3418. selector: unescape('timeToRun'),
  3419. category: 'evaluating',
  3420. fn: function (){
  3421. var self=this;
  3422. return smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [self]);
  3423. return self;},
  3424. args: [],
  3425. source: unescape('timeToRun%0A%09%22Answer%20the%20number%20of%20milliseconds%20taken%20to%20execute%20this%20block.%22%0A%0A%09%5E%20Date%20millisecondsToRun%3A%20self'),
  3426. messageSends: ["millisecondsToRun:"],
  3427. referencedClasses: [smalltalk.Date]
  3428. }),
  3429. smalltalk.BlockClosure);
  3430. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel');
  3431. smalltalk.addMethod(
  3432. unescape('__eq'),
  3433. smalltalk.method({
  3434. selector: unescape('%3D'),
  3435. category: 'comparing',
  3436. fn: function (aBoolean){
  3437. var self=this;
  3438. try{((($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  3439. return Boolean(self == true) == aBoolean;
  3440. return self;
  3441. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  3442. args: ["aBoolean"],
  3443. source: unescape('%3D%20aBoolean%0A%09aBoolean%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20Boolean%28self%20%3D%3D%20true%29%20%3D%3D%20aBoolean%3E'),
  3444. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3445. referencedClasses: []
  3446. }),
  3447. smalltalk.Boolean);
  3448. smalltalk.addMethod(
  3449. unescape('_shallowCopy'),
  3450. smalltalk.method({
  3451. selector: unescape('shallowCopy'),
  3452. category: 'copying',
  3453. fn: function (){
  3454. var self=this;
  3455. return self;
  3456. return self;},
  3457. args: [],
  3458. source: unescape('shallowCopy%0A%09%5Eself'),
  3459. messageSends: [],
  3460. referencedClasses: []
  3461. }),
  3462. smalltalk.Boolean);
  3463. smalltalk.addMethod(
  3464. unescape('_deepCopy'),
  3465. smalltalk.method({
  3466. selector: unescape('deepCopy'),
  3467. category: 'copying',
  3468. fn: function (){
  3469. var self=this;
  3470. return self;
  3471. return self;},
  3472. args: [],
  3473. source: unescape('deepCopy%0A%09%5Eself'),
  3474. messageSends: [],
  3475. referencedClasses: []
  3476. }),
  3477. smalltalk.Boolean);
  3478. smalltalk.addMethod(
  3479. unescape('_ifTrue_'),
  3480. smalltalk.method({
  3481. selector: unescape('ifTrue%3A'),
  3482. category: 'controlling',
  3483. fn: function (aBlock){
  3484. var self=this;
  3485. return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, (function(){return nil;})]);
  3486. return self;},
  3487. args: ["aBlock"],
  3488. source: unescape('ifTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20aBlock%20ifFalse%3A%20%5B%5D'),
  3489. messageSends: ["ifTrue:ifFalse:"],
  3490. referencedClasses: []
  3491. }),
  3492. smalltalk.Boolean);
  3493. smalltalk.addMethod(
  3494. unescape('_ifFalse_'),
  3495. smalltalk.method({
  3496. selector: unescape('ifFalse%3A'),
  3497. category: 'controlling',
  3498. fn: function (aBlock){
  3499. var self=this;
  3500. return smalltalk.send(self, "_ifTrue_ifFalse_", [(function(){return nil;}), aBlock]);
  3501. return self;},
  3502. args: ["aBlock"],
  3503. source: unescape('ifFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20%5B%5D%20ifFalse%3A%20aBlock'),
  3504. messageSends: ["ifTrue:ifFalse:"],
  3505. referencedClasses: []
  3506. }),
  3507. smalltalk.Boolean);
  3508. smalltalk.addMethod(
  3509. unescape('_ifFalse_ifTrue_'),
  3510. smalltalk.method({
  3511. selector: unescape('ifFalse%3AifTrue%3A'),
  3512. category: 'controlling',
  3513. fn: function (aBlock, anotherBlock){
  3514. var self=this;
  3515. return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
  3516. return self;},
  3517. args: ["aBlock", "anotherBlock"],
  3518. source: unescape('ifFalse%3A%20aBlock%20ifTrue%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifTrue%3A%20anotherBlock%20ifFalse%3A%20aBlock'),
  3519. messageSends: ["ifTrue:ifFalse:"],
  3520. referencedClasses: []
  3521. }),
  3522. smalltalk.Boolean);
  3523. smalltalk.addMethod(
  3524. unescape('_ifTrue_ifFalse_'),
  3525. smalltalk.method({
  3526. selector: unescape('ifTrue%3AifFalse%3A'),
  3527. category: 'controlling',
  3528. fn: function (aBlock, anotherBlock){
  3529. var self=this;
  3530. if(self == true) {
  3531. return aBlock();
  3532. } else {
  3533. return anotherBlock();
  3534. }
  3535. ;
  3536. return self;},
  3537. args: ["aBlock", "anotherBlock"],
  3538. source: unescape('ifTrue%3A%20aBlock%20ifFalse%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20aBlock%28%29%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20anotherBlock%28%29%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3539. messageSends: [],
  3540. referencedClasses: []
  3541. }),
  3542. smalltalk.Boolean);
  3543. smalltalk.addMethod(
  3544. unescape('_and_'),
  3545. smalltalk.method({
  3546. selector: unescape('and%3A'),
  3547. category: 'controlling',
  3548. fn: function (aBlock){
  3549. var self=this;
  3550. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, (function(){return false;})]);
  3551. return self;},
  3552. args: ["aBlock"],
  3553. source: unescape('and%3A%20aBlock%0A%09%5Eself%20%3D%20true%0A%09%20%20%20%20ifTrue%3A%20aBlock%0A%09%20%20%20%20ifFalse%3A%20%5Bfalse%5D'),
  3554. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  3555. referencedClasses: []
  3556. }),
  3557. smalltalk.Boolean);
  3558. smalltalk.addMethod(
  3559. unescape('_or_'),
  3560. smalltalk.method({
  3561. selector: unescape('or%3A'),
  3562. category: 'controlling',
  3563. fn: function (aBlock){
  3564. var self=this;
  3565. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [(function(){return true;}), aBlock]);
  3566. return self;},
  3567. args: ["aBlock"],
  3568. source: unescape('or%3A%20aBlock%0A%09%5Eself%20%3D%20true%0A%09%20%20%20%20ifTrue%3A%20%5Btrue%5D%0A%09%20%20%20%20ifFalse%3A%20aBlock'),
  3569. messageSends: ["ifTrue:ifFalse:", unescape("%3D")],
  3570. referencedClasses: []
  3571. }),
  3572. smalltalk.Boolean);
  3573. smalltalk.addMethod(
  3574. unescape('_not'),
  3575. smalltalk.method({
  3576. selector: unescape('not'),
  3577. category: 'controlling',
  3578. fn: function (){
  3579. var self=this;
  3580. return smalltalk.send(self, "__eq", [false]);
  3581. return self;},
  3582. args: [],
  3583. source: unescape('not%0A%09%5Eself%20%3D%20false'),
  3584. messageSends: [unescape("%3D")],
  3585. referencedClasses: []
  3586. }),
  3587. smalltalk.Boolean);
  3588. smalltalk.addMethod(
  3589. unescape('_printString'),
  3590. smalltalk.method({
  3591. selector: unescape('printString'),
  3592. category: 'printing',
  3593. fn: function (){
  3594. var self=this;
  3595. return self.toString();
  3596. return self;},
  3597. args: [],
  3598. source: unescape('printString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3599. messageSends: [],
  3600. referencedClasses: []
  3601. }),
  3602. smalltalk.Boolean);
  3603. smalltalk.addMethod(
  3604. unescape('_asJSONObject'),
  3605. smalltalk.method({
  3606. selector: unescape('asJSONObject'),
  3607. category: 'converting',
  3608. fn: function (){
  3609. var self=this;
  3610. return self;
  3611. return self;},
  3612. args: [],
  3613. source: unescape('asJSONObject%0A%09%5Eself'),
  3614. messageSends: [],
  3615. referencedClasses: []
  3616. }),
  3617. smalltalk.Boolean);
  3618. smalltalk.addMethod(
  3619. unescape('_%26'),
  3620. smalltalk.method({
  3621. selector: unescape('%26'),
  3622. category: 'controlling',
  3623. fn: function (aBoolean){
  3624. var self=this;
  3625. if(self == true) {
  3626. return aBoolean;
  3627. } else {
  3628. return false;
  3629. }
  3630. ;
  3631. return self;},
  3632. args: ["aBoolean"],
  3633. source: unescape('%26%20aBoolean%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20aBoolean%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20false%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3634. messageSends: [],
  3635. referencedClasses: []
  3636. }),
  3637. smalltalk.Boolean);
  3638. smalltalk.addMethod(
  3639. unescape('_%7C'),
  3640. smalltalk.method({
  3641. selector: unescape('%7C'),
  3642. category: 'controlling',
  3643. fn: function (aBoolean){
  3644. var self=this;
  3645. if(self == true) {
  3646. return true;
  3647. } else {
  3648. return aBoolean;
  3649. }
  3650. ;
  3651. return self;},
  3652. args: ["aBoolean"],
  3653. source: unescape('%7C%20aBoolean%0A%09%3C%0A%09%20%20%20%20if%28self%20%3D%3D%20true%29%20%7B%0A%09%09return%20true%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20aBoolean%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  3654. messageSends: [],
  3655. referencedClasses: []
  3656. }),
  3657. smalltalk.Boolean);
  3658. smalltalk.addMethod(
  3659. unescape('__eq_eq'),
  3660. smalltalk.method({
  3661. selector: unescape('%3D%3D'),
  3662. category: 'comparing',
  3663. fn: function (aBoolean){
  3664. var self=this;
  3665. try{((($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  3666. return Boolean(self == true) === Boolean(aBoolean == true);
  3667. return self;
  3668. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  3669. args: ["aBoolean"],
  3670. source: unescape('%3D%3D%20aBoolean%0A%09aBoolean%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20Boolean%28self%20%3D%3D%20true%29%20%3D%3D%3D%20Boolean%28aBoolean%20%3D%3D%20true%29%3E'),
  3671. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  3672. referencedClasses: []
  3673. }),
  3674. smalltalk.Boolean);
  3675. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel');
  3676. smalltalk.Date.comment=unescape('The%20Date%20class%20is%20used%20to%20work%20with%20dates%20and%20times.')
  3677. smalltalk.addMethod(
  3678. unescape('_year'),
  3679. smalltalk.method({
  3680. selector: unescape('year'),
  3681. category: 'accessing',
  3682. fn: function (){
  3683. var self=this;
  3684. return self.getFullYear();
  3685. return self;},
  3686. args: [],
  3687. source: unescape('year%0A%09%3Creturn%20self.getFullYear%28%29%3E'),
  3688. messageSends: [],
  3689. referencedClasses: []
  3690. }),
  3691. smalltalk.Date);
  3692. smalltalk.addMethod(
  3693. unescape('_month'),
  3694. smalltalk.method({
  3695. selector: unescape('month'),
  3696. category: 'accessing',
  3697. fn: function (){
  3698. var self=this;
  3699. return self.getMonth() + 1;
  3700. return self;},
  3701. args: [],
  3702. source: unescape('month%0A%09%3Creturn%20self.getMonth%28%29%20+%201%3E'),
  3703. messageSends: [],
  3704. referencedClasses: []
  3705. }),
  3706. smalltalk.Date);
  3707. smalltalk.addMethod(
  3708. unescape('_month_'),
  3709. smalltalk.method({
  3710. selector: unescape('month%3A'),
  3711. category: 'accessing',
  3712. fn: function (aNumber){
  3713. var self=this;
  3714. self.setMonth(aNumber - 1);
  3715. return self;},
  3716. args: ["aNumber"],
  3717. source: unescape('month%3A%20aNumber%0A%09%3Cself.setMonth%28aNumber%20-%201%29%3E'),
  3718. messageSends: [],
  3719. referencedClasses: []
  3720. }),
  3721. smalltalk.Date);
  3722. smalltalk.addMethod(
  3723. unescape('_day'),
  3724. smalltalk.method({
  3725. selector: unescape('day'),
  3726. category: 'accessing',
  3727. fn: function (){
  3728. var self=this;
  3729. return smalltalk.send(self, "_dayOfWeek", []);
  3730. return self;},
  3731. args: [],
  3732. source: unescape('day%0A%09%5Eself%20dayOfWeek'),
  3733. messageSends: ["dayOfWeek"],
  3734. referencedClasses: []
  3735. }),
  3736. smalltalk.Date);
  3737. smalltalk.addMethod(
  3738. unescape('_dayOfWeek'),
  3739. smalltalk.method({
  3740. selector: unescape('dayOfWeek'),
  3741. category: 'accessing',
  3742. fn: function (){
  3743. var self=this;
  3744. return self.getDay() + 1;
  3745. return self;},
  3746. args: [],
  3747. source: unescape('dayOfWeek%0A%09%3Creturn%20self.getDay%28%29%20+%201%3E'),
  3748. messageSends: [],
  3749. referencedClasses: []
  3750. }),
  3751. smalltalk.Date);
  3752. smalltalk.addMethod(
  3753. unescape('_dayOfWeek_'),
  3754. smalltalk.method({
  3755. selector: unescape('dayOfWeek%3A'),
  3756. category: 'accessing',
  3757. fn: function (aNumber){
  3758. var self=this;
  3759. return self.setDay(aNumber - 1);
  3760. return self;},
  3761. args: ["aNumber"],
  3762. source: unescape('dayOfWeek%3A%20aNumber%0A%09%3Creturn%20self.setDay%28aNumber%20-%201%29%3E'),
  3763. messageSends: [],
  3764. referencedClasses: []
  3765. }),
  3766. smalltalk.Date);
  3767. smalltalk.addMethod(
  3768. unescape('_day_'),
  3769. smalltalk.method({
  3770. selector: unescape('day%3A'),
  3771. category: 'accessing',
  3772. fn: function (aNumber){
  3773. var self=this;
  3774. smalltalk.send(self, "_day_", [aNumber]);
  3775. return self;},
  3776. args: ["aNumber"],
  3777. source: unescape('day%3A%20aNumber%0A%09self%20day%3A%20aNumber'),
  3778. messageSends: ["day:"],
  3779. referencedClasses: []
  3780. }),
  3781. smalltalk.Date);
  3782. smalltalk.addMethod(
  3783. unescape('_year_'),
  3784. smalltalk.method({
  3785. selector: unescape('year%3A'),
  3786. category: 'accessing',
  3787. fn: function (aNumber){
  3788. var self=this;
  3789. self.setFullYear(aNumber);
  3790. return self;},
  3791. args: ["aNumber"],
  3792. source: unescape('year%3A%20aNumber%0A%09%3Cself.setFullYear%28aNumber%29%3E'),
  3793. messageSends: [],
  3794. referencedClasses: []
  3795. }),
  3796. smalltalk.Date);
  3797. smalltalk.addMethod(
  3798. unescape('_dayOfMonth'),
  3799. smalltalk.method({
  3800. selector: unescape('dayOfMonth'),
  3801. category: 'accessing',
  3802. fn: function (){
  3803. var self=this;
  3804. return self.getDate();
  3805. return self;},
  3806. args: [],
  3807. source: unescape('dayOfMonth%0A%09%3Creturn%20self.getDate%28%29%3E'),
  3808. messageSends: [],
  3809. referencedClasses: []
  3810. }),
  3811. smalltalk.Date);
  3812. smalltalk.addMethod(
  3813. unescape('_dayOfMonth_'),
  3814. smalltalk.method({
  3815. selector: unescape('dayOfMonth%3A'),
  3816. category: 'accessing',
  3817. fn: function (aNumber){
  3818. var self=this;
  3819. self.setDate(aNumber);
  3820. return self;},
  3821. args: ["aNumber"],
  3822. source: unescape('dayOfMonth%3A%20aNumber%0A%09%3Cself.setDate%28aNumber%29%3E'),
  3823. messageSends: [],
  3824. referencedClasses: []
  3825. }),
  3826. smalltalk.Date);
  3827. smalltalk.addMethod(
  3828. unescape('_asString'),
  3829. smalltalk.method({
  3830. selector: unescape('asString'),
  3831. category: 'converting',
  3832. fn: function (){
  3833. var self=this;
  3834. return self.toString();
  3835. return self;},
  3836. args: [],
  3837. source: unescape('asString%0A%09%3Creturn%20self.toString%28%29%3E'),
  3838. messageSends: [],
  3839. referencedClasses: []
  3840. }),
  3841. smalltalk.Date);
  3842. smalltalk.addMethod(
  3843. unescape('_printString'),
  3844. smalltalk.method({
  3845. selector: unescape('printString'),
  3846. category: 'printing',
  3847. fn: function (){
  3848. var self=this;
  3849. return smalltalk.send(self, "_asString", []);
  3850. return self;},
  3851. args: [],
  3852. source: unescape('printString%0A%09%5Eself%20asString'),
  3853. messageSends: ["asString"],
  3854. referencedClasses: []
  3855. }),
  3856. smalltalk.Date);
  3857. smalltalk.addMethod(
  3858. unescape('_asMilliseconds'),
  3859. smalltalk.method({
  3860. selector: unescape('asMilliseconds'),
  3861. category: 'converting',
  3862. fn: function (){
  3863. var self=this;
  3864. return smalltalk.send(self, "_time", []);
  3865. return self;},
  3866. args: [],
  3867. source: unescape('asMilliseconds%0A%09%5Eself%20time'),
  3868. messageSends: ["time"],
  3869. referencedClasses: []
  3870. }),
  3871. smalltalk.Date);
  3872. smalltalk.addMethod(
  3873. unescape('_time'),
  3874. smalltalk.method({
  3875. selector: unescape('time'),
  3876. category: 'accessing',
  3877. fn: function (){
  3878. var self=this;
  3879. return self.getTime();
  3880. return self;},
  3881. args: [],
  3882. source: unescape('time%0A%09%3Creturn%20self.getTime%28%29%3E'),
  3883. messageSends: [],
  3884. referencedClasses: []
  3885. }),
  3886. smalltalk.Date);
  3887. smalltalk.addMethod(
  3888. unescape('_time_'),
  3889. smalltalk.method({
  3890. selector: unescape('time%3A'),
  3891. category: 'accessing',
  3892. fn: function (aNumber){
  3893. var self=this;
  3894. self.setTime(aNumber);
  3895. return self;},
  3896. args: ["aNumber"],
  3897. source: unescape('time%3A%20aNumber%0A%09%3Cself.setTime%28aNumber%29%3E'),
  3898. messageSends: [],
  3899. referencedClasses: []
  3900. }),
  3901. smalltalk.Date);
  3902. smalltalk.addMethod(
  3903. unescape('_asDateString'),
  3904. smalltalk.method({
  3905. selector: unescape('asDateString'),
  3906. category: 'converting',
  3907. fn: function (){
  3908. var self=this;
  3909. return self.toDateString();
  3910. return self;},
  3911. args: [],
  3912. source: unescape('asDateString%0A%09%3Creturn%20self.toDateString%28%29%3E'),
  3913. messageSends: [],
  3914. referencedClasses: []
  3915. }),
  3916. smalltalk.Date);
  3917. smalltalk.addMethod(
  3918. unescape('_asTimeString'),
  3919. smalltalk.method({
  3920. selector: unescape('asTimeString'),
  3921. category: 'converting',
  3922. fn: function (){
  3923. var self=this;
  3924. return self.toTimeString();
  3925. return self;},
  3926. args: [],
  3927. source: unescape('asTimeString%0A%09%3Creturn%20self.toTimeString%28%29%3E'),
  3928. messageSends: [],
  3929. referencedClasses: []
  3930. }),
  3931. smalltalk.Date);
  3932. smalltalk.addMethod(
  3933. unescape('_asLocaleString'),
  3934. smalltalk.method({
  3935. selector: unescape('asLocaleString'),
  3936. category: 'converting',
  3937. fn: function (){
  3938. var self=this;
  3939. return self.toLocaleString();
  3940. return self;},
  3941. args: [],
  3942. source: unescape('asLocaleString%0A%09%3Creturn%20self.toLocaleString%28%29%3E'),
  3943. messageSends: [],
  3944. referencedClasses: []
  3945. }),
  3946. smalltalk.Date);
  3947. smalltalk.addMethod(
  3948. unescape('_asNumber'),
  3949. smalltalk.method({
  3950. selector: unescape('asNumber'),
  3951. category: 'converting',
  3952. fn: function (){
  3953. var self=this;
  3954. return smalltalk.send(self, "_asMilliseconds", []);
  3955. return self;},
  3956. args: [],
  3957. source: unescape('asNumber%0A%09%5Eself%20asMilliseconds'),
  3958. messageSends: ["asMilliseconds"],
  3959. referencedClasses: []
  3960. }),
  3961. smalltalk.Date);
  3962. smalltalk.addMethod(
  3963. unescape('_hours_'),
  3964. smalltalk.method({
  3965. selector: unescape('hours%3A'),
  3966. category: 'accessing',
  3967. fn: function (aNumber){
  3968. var self=this;
  3969. self.setHours(aNumber);
  3970. return self;},
  3971. args: ["aNumber"],
  3972. source: unescape('hours%3A%20aNumber%0A%09%3Cself.setHours%28aNumber%29%3E'),
  3973. messageSends: [],
  3974. referencedClasses: []
  3975. }),
  3976. smalltalk.Date);
  3977. smalltalk.addMethod(
  3978. unescape('_minutes_'),
  3979. smalltalk.method({
  3980. selector: unescape('minutes%3A'),
  3981. category: 'accessing',
  3982. fn: function (aNumber){
  3983. var self=this;
  3984. self.setMinutes(aNumber);
  3985. return self;},
  3986. args: ["aNumber"],
  3987. source: unescape('minutes%3A%20aNumber%0A%09%3Cself.setMinutes%28aNumber%29%3E'),
  3988. messageSends: [],
  3989. referencedClasses: []
  3990. }),
  3991. smalltalk.Date);
  3992. smalltalk.addMethod(
  3993. unescape('_seconds_'),
  3994. smalltalk.method({
  3995. selector: unescape('seconds%3A'),
  3996. category: 'accessing',
  3997. fn: function (aNumber){
  3998. var self=this;
  3999. self.setSeconds(aNumber);
  4000. return self;},
  4001. args: ["aNumber"],
  4002. source: unescape('seconds%3A%20aNumber%0A%09%3Cself.setSeconds%28aNumber%29%3E'),
  4003. messageSends: [],
  4004. referencedClasses: []
  4005. }),
  4006. smalltalk.Date);
  4007. smalltalk.addMethod(
  4008. unescape('_milliseconds_'),
  4009. smalltalk.method({
  4010. selector: unescape('milliseconds%3A'),
  4011. category: 'accessing',
  4012. fn: function (aNumber){
  4013. var self=this;
  4014. self.setMilliseconds(aNumber);
  4015. return self;},
  4016. args: ["aNumber"],
  4017. source: unescape('milliseconds%3A%20aNumber%0A%09%3Cself.setMilliseconds%28aNumber%29%3E'),
  4018. messageSends: [],
  4019. referencedClasses: []
  4020. }),
  4021. smalltalk.Date);
  4022. smalltalk.addMethod(
  4023. unescape('_hours'),
  4024. smalltalk.method({
  4025. selector: unescape('hours'),
  4026. category: 'accessing',
  4027. fn: function (){
  4028. var self=this;
  4029. return self.getHours();
  4030. return self;},
  4031. args: [],
  4032. source: unescape('hours%0A%09%3Creturn%20self.getHours%28%29%3E'),
  4033. messageSends: [],
  4034. referencedClasses: []
  4035. }),
  4036. smalltalk.Date);
  4037. smalltalk.addMethod(
  4038. unescape('_minutes'),
  4039. smalltalk.method({
  4040. selector: unescape('minutes'),
  4041. category: 'accessing',
  4042. fn: function (){
  4043. var self=this;
  4044. return self.getMinutes();
  4045. return self;},
  4046. args: [],
  4047. source: unescape('minutes%0A%09%3Creturn%20self.getMinutes%28%29%3E'),
  4048. messageSends: [],
  4049. referencedClasses: []
  4050. }),
  4051. smalltalk.Date);
  4052. smalltalk.addMethod(
  4053. unescape('_seconds'),
  4054. smalltalk.method({
  4055. selector: unescape('seconds'),
  4056. category: 'accessing',
  4057. fn: function (){
  4058. var self=this;
  4059. return self.getSeconds();
  4060. return self;},
  4061. args: [],
  4062. source: unescape('seconds%0A%09%3Creturn%20self.getSeconds%28%29%3E'),
  4063. messageSends: [],
  4064. referencedClasses: []
  4065. }),
  4066. smalltalk.Date);
  4067. smalltalk.addMethod(
  4068. unescape('_milliseconds'),
  4069. smalltalk.method({
  4070. selector: unescape('milliseconds'),
  4071. category: 'accessing',
  4072. fn: function (){
  4073. var self=this;
  4074. return self.getMilliseconds();
  4075. return self;},
  4076. args: [],
  4077. source: unescape('milliseconds%0A%09%3Creturn%20self.getMilliseconds%28%29%3E'),
  4078. messageSends: [],
  4079. referencedClasses: []
  4080. }),
  4081. smalltalk.Date);
  4082. smalltalk.addMethod(
  4083. unescape('__lt'),
  4084. smalltalk.method({
  4085. selector: unescape('%3C'),
  4086. category: 'comparing',
  4087. fn: function (aDate){
  4088. var self=this;
  4089. return self < aDate;
  4090. return self;},
  4091. args: ["aDate"],
  4092. source: unescape('%3C%20aDate%0A%09%3Creturn%20self%20%3C%20aDate%3E'),
  4093. messageSends: [],
  4094. referencedClasses: []
  4095. }),
  4096. smalltalk.Date);
  4097. smalltalk.addMethod(
  4098. unescape('__gt'),
  4099. smalltalk.method({
  4100. selector: unescape('%3E'),
  4101. category: 'comparing',
  4102. fn: function (aDate){
  4103. var self=this;
  4104. return self > aDate;
  4105. return self;},
  4106. args: ["aDate"],
  4107. source: unescape('%3E%20aDate%0A%09%3Creturn%20self%20%3E%3E%20aDate%3E'),
  4108. messageSends: [],
  4109. referencedClasses: []
  4110. }),
  4111. smalltalk.Date);
  4112. smalltalk.addMethod(
  4113. unescape('__lt_eq'),
  4114. smalltalk.method({
  4115. selector: unescape('%3C%3D'),
  4116. category: 'comparing',
  4117. fn: function (aDate){
  4118. var self=this;
  4119. return self <= aDate;
  4120. return self;},
  4121. args: ["aDate"],
  4122. source: unescape('%3C%3D%20aDate%0A%09%3Creturn%20self%20%3C%3D%20aDate%3E'),
  4123. messageSends: [],
  4124. referencedClasses: []
  4125. }),
  4126. smalltalk.Date);
  4127. smalltalk.addMethod(
  4128. unescape('__gt_eq'),
  4129. smalltalk.method({
  4130. selector: unescape('%3E%3D'),
  4131. category: 'comparing',
  4132. fn: function (aDate){
  4133. var self=this;
  4134. return self >= aDate;
  4135. return self;},
  4136. args: ["aDate"],
  4137. source: unescape('%3E%3D%20aDate%0A%09%3Creturn%20self%20%3E%3E%3D%20aDate%3E'),
  4138. messageSends: [],
  4139. referencedClasses: []
  4140. }),
  4141. smalltalk.Date);
  4142. smalltalk.addMethod(
  4143. unescape('__minus'),
  4144. smalltalk.method({
  4145. selector: unescape('-'),
  4146. category: 'arithmetic',
  4147. fn: function (aDate){
  4148. var self=this;
  4149. return self - aDate;
  4150. return self;},
  4151. args: ["aDate"],
  4152. source: unescape('-%20aDate%0A%09%3Creturn%20self%20-%20aDate%3E'),
  4153. messageSends: [],
  4154. referencedClasses: []
  4155. }),
  4156. smalltalk.Date);
  4157. smalltalk.addMethod(
  4158. unescape('__plus'),
  4159. smalltalk.method({
  4160. selector: unescape('+'),
  4161. category: 'arithmetic',
  4162. fn: function (aDate){
  4163. var self=this;
  4164. return self + aDate;
  4165. return self;},
  4166. args: ["aDate"],
  4167. source: unescape('+%20aDate%0A%09%3Creturn%20self%20+%20aDate%3E'),
  4168. messageSends: [],
  4169. referencedClasses: []
  4170. }),
  4171. smalltalk.Date);
  4172. smalltalk.addMethod(
  4173. unescape('_asJSONObject'),
  4174. smalltalk.method({
  4175. selector: unescape('asJSONObject'),
  4176. category: 'converting',
  4177. fn: function (){
  4178. var self=this;
  4179. return self;
  4180. return self;},
  4181. args: [],
  4182. source: unescape('asJSONObject%0A%09%5Eself'),
  4183. messageSends: [],
  4184. referencedClasses: []
  4185. }),
  4186. smalltalk.Date);
  4187. smalltalk.addMethod(
  4188. unescape('_new_'),
  4189. smalltalk.method({
  4190. selector: unescape('new%3A'),
  4191. category: 'instance creation',
  4192. fn: function (anObject){
  4193. var self=this;
  4194. return new Date(anObject);
  4195. return self;},
  4196. args: ["anObject"],
  4197. source: unescape('new%3A%20anObject%0A%09%3Creturn%20new%20Date%28anObject%29%3E'),
  4198. messageSends: [],
  4199. referencedClasses: []
  4200. }),
  4201. smalltalk.Date.klass);
  4202. smalltalk.addMethod(
  4203. unescape('_fromString_'),
  4204. smalltalk.method({
  4205. selector: unescape('fromString%3A'),
  4206. category: 'instance creation',
  4207. fn: function (aString){
  4208. var self=this;
  4209. return smalltalk.send(self, "_new_", [aString]);
  4210. return self;},
  4211. args: ["aString"],
  4212. source: unescape('fromString%3A%20aString%0A%09%22Example%3A%20Date%20fromString%28%272011/04/15%2000%3A00%3A00%27%29%22%0A%09%5Eself%20new%3A%20aString'),
  4213. messageSends: ["new:"],
  4214. referencedClasses: []
  4215. }),
  4216. smalltalk.Date.klass);
  4217. smalltalk.addMethod(
  4218. unescape('_fromSeconds_'),
  4219. smalltalk.method({
  4220. selector: unescape('fromSeconds%3A'),
  4221. category: 'instance creation',
  4222. fn: function (aNumber){
  4223. var self=this;
  4224. return smalltalk.send(self, "_fromMilliseconds_", [((($receiver = aNumber).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))]);
  4225. return self;},
  4226. args: ["aNumber"],
  4227. source: unescape('fromSeconds%3A%20aNumber%0A%09%5Eself%20fromMilliseconds%3A%20aNumber%20*%201000'),
  4228. messageSends: ["fromMilliseconds:", unescape("*")],
  4229. referencedClasses: []
  4230. }),
  4231. smalltalk.Date.klass);
  4232. smalltalk.addMethod(
  4233. unescape('_fromMilliseconds_'),
  4234. smalltalk.method({
  4235. selector: unescape('fromMilliseconds%3A'),
  4236. category: 'instance creation',
  4237. fn: function (aNumber){
  4238. var self=this;
  4239. return smalltalk.send(self, "_new_", [aNumber]);
  4240. return self;},
  4241. args: ["aNumber"],
  4242. source: unescape('fromMilliseconds%3A%20aNumber%0A%09%5Eself%20new%3A%20aNumber'),
  4243. messageSends: ["new:"],
  4244. referencedClasses: []
  4245. }),
  4246. smalltalk.Date.klass);
  4247. smalltalk.addMethod(
  4248. unescape('_today'),
  4249. smalltalk.method({
  4250. selector: unescape('today'),
  4251. category: 'instance creation',
  4252. fn: function (){
  4253. var self=this;
  4254. return smalltalk.send(self, "_new", []);
  4255. return self;},
  4256. args: [],
  4257. source: unescape('today%0A%09%5Eself%20new'),
  4258. messageSends: ["new"],
  4259. referencedClasses: []
  4260. }),
  4261. smalltalk.Date.klass);
  4262. smalltalk.addMethod(
  4263. unescape('_now'),
  4264. smalltalk.method({
  4265. selector: unescape('now'),
  4266. category: 'instance creation',
  4267. fn: function (){
  4268. var self=this;
  4269. return smalltalk.send(self, "_today", []);
  4270. return self;},
  4271. args: [],
  4272. source: unescape('now%0A%09%5Eself%20today'),
  4273. messageSends: ["today"],
  4274. referencedClasses: []
  4275. }),
  4276. smalltalk.Date.klass);
  4277. smalltalk.addMethod(
  4278. unescape('_millisecondsToRun_'),
  4279. smalltalk.method({
  4280. selector: unescape('millisecondsToRun%3A'),
  4281. category: 'instance creation',
  4282. fn: function (aBlock){
  4283. var self=this;
  4284. var t=nil;
  4285. t=smalltalk.send((smalltalk.Date || Date), "_now", []);
  4286. smalltalk.send(aBlock, "_value", []);
  4287. return ((($receiver = smalltalk.send((smalltalk.Date || Date), "_now", [])).klass === smalltalk.Number) ? $receiver -t : smalltalk.send($receiver, "__minus", [t]));
  4288. return self;},
  4289. args: ["aBlock"],
  4290. source: unescape('millisecondsToRun%3A%20aBlock%0A%09%7C%20t%20%7C%0A%09t%20%3A%3D%20Date%20now.%0A%09aBlock%20value.%0A%09%5EDate%20now%20-%20t'),
  4291. messageSends: ["now", "value", unescape("-")],
  4292. referencedClasses: [smalltalk.Date]
  4293. }),
  4294. smalltalk.Date.klass);
  4295. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel');
  4296. smalltalk.addMethod(
  4297. unescape('_subclass_instanceVariableNames_'),
  4298. smalltalk.method({
  4299. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  4300. category: 'class creation',
  4301. fn: function (aString, anotherString){
  4302. var self=this;
  4303. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  4304. return self;},
  4305. args: ["aString", "anotherString"],
  4306. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
  4307. messageSends: ["subclass:instanceVariableNames:package:"],
  4308. referencedClasses: []
  4309. }),
  4310. smalltalk.UndefinedObject);
  4311. smalltalk.addMethod(
  4312. unescape('_subclass_instanceVariableNames_category_'),
  4313. smalltalk.method({
  4314. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  4315. category: 'class creation',
  4316. fn: function (aString, aString2, aString3){
  4317. var self=this;
  4318. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  4319. return self;},
  4320. args: ["aString", "aString2", "aString3"],
  4321. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  4322. messageSends: ["subclass:instanceVariableNames:package:"],
  4323. referencedClasses: []
  4324. }),
  4325. smalltalk.UndefinedObject);
  4326. smalltalk.addMethod(
  4327. unescape('_shallowCopy'),
  4328. smalltalk.method({
  4329. selector: unescape('shallowCopy'),
  4330. category: 'copying',
  4331. fn: function (){
  4332. var self=this;
  4333. return self;
  4334. return self;},
  4335. args: [],
  4336. source: unescape('shallowCopy%0A%09%5Eself'),
  4337. messageSends: [],
  4338. referencedClasses: []
  4339. }),
  4340. smalltalk.UndefinedObject);
  4341. smalltalk.addMethod(
  4342. unescape('_deepCopy'),
  4343. smalltalk.method({
  4344. selector: unescape('deepCopy'),
  4345. category: 'copying',
  4346. fn: function (){
  4347. var self=this;
  4348. return self;
  4349. return self;},
  4350. args: [],
  4351. source: unescape('deepCopy%0A%09%5Eself'),
  4352. messageSends: [],
  4353. referencedClasses: []
  4354. }),
  4355. smalltalk.UndefinedObject);
  4356. smalltalk.addMethod(
  4357. unescape('_ifNil_'),
  4358. smalltalk.method({
  4359. selector: unescape('ifNil%3A'),
  4360. category: 'testing',
  4361. fn: function (aBlock){
  4362. var self=this;
  4363. return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, (function(){return nil;})]);
  4364. return self;},
  4365. args: ["aBlock"],
  4366. source: unescape('ifNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself%20ifNil%3A%20aBlock%20ifNotNil%3A%20%5B%5D'),
  4367. messageSends: ["ifNil:ifNotNil:"],
  4368. referencedClasses: []
  4369. }),
  4370. smalltalk.UndefinedObject);
  4371. smalltalk.addMethod(
  4372. unescape('_ifNotNil_'),
  4373. smalltalk.method({
  4374. selector: unescape('ifNotNil%3A'),
  4375. category: 'testing',
  4376. fn: function (aBlock){
  4377. var self=this;
  4378. return self;
  4379. return self;},
  4380. args: ["aBlock"],
  4381. source: unescape('ifNotNil%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5Eself'),
  4382. messageSends: [],
  4383. referencedClasses: []
  4384. }),
  4385. smalltalk.UndefinedObject);
  4386. smalltalk.addMethod(
  4387. unescape('_ifNil_ifNotNil_'),
  4388. smalltalk.method({
  4389. selector: unescape('ifNil%3AifNotNil%3A'),
  4390. category: 'testing',
  4391. fn: function (aBlock, anotherBlock){
  4392. var self=this;
  4393. return smalltalk.send(aBlock, "_value", []);
  4394. return self;},
  4395. args: ["aBlock", "anotherBlock"],
  4396. source: unescape('ifNil%3A%20aBlock%20ifNotNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EaBlock%20value'),
  4397. messageSends: ["value"],
  4398. referencedClasses: []
  4399. }),
  4400. smalltalk.UndefinedObject);
  4401. smalltalk.addMethod(
  4402. unescape('_ifNotNil_ifNil_'),
  4403. smalltalk.method({
  4404. selector: unescape('ifNotNil%3AifNil%3A'),
  4405. category: 'testing',
  4406. fn: function (aBlock, anotherBlock){
  4407. var self=this;
  4408. return smalltalk.send(anotherBlock, "_value", []);
  4409. return self;},
  4410. args: ["aBlock", "anotherBlock"],
  4411. source: unescape('ifNotNil%3A%20aBlock%20ifNil%3A%20anotherBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%5EanotherBlock%20value'),
  4412. messageSends: ["value"],
  4413. referencedClasses: []
  4414. }),
  4415. smalltalk.UndefinedObject);
  4416. smalltalk.addMethod(
  4417. unescape('_isNil'),
  4418. smalltalk.method({
  4419. selector: unescape('isNil'),
  4420. category: 'testing',
  4421. fn: function (){
  4422. var self=this;
  4423. return true;
  4424. return self;},
  4425. args: [],
  4426. source: unescape('isNil%0A%09%5Etrue'),
  4427. messageSends: [],
  4428. referencedClasses: []
  4429. }),
  4430. smalltalk.UndefinedObject);
  4431. smalltalk.addMethod(
  4432. unescape('_notNil'),
  4433. smalltalk.method({
  4434. selector: unescape('notNil'),
  4435. category: 'testing',
  4436. fn: function (){
  4437. var self=this;
  4438. return false;
  4439. return self;},
  4440. args: [],
  4441. source: unescape('notNil%0A%09%5Efalse'),
  4442. messageSends: [],
  4443. referencedClasses: []
  4444. }),
  4445. smalltalk.UndefinedObject);
  4446. smalltalk.addMethod(
  4447. unescape('_printString'),
  4448. smalltalk.method({
  4449. selector: unescape('printString'),
  4450. category: 'printing',
  4451. fn: function (){
  4452. var self=this;
  4453. return "nil";
  4454. return self;},
  4455. args: [],
  4456. source: unescape('printString%0A%20%20%20%20%5E%27nil%27'),
  4457. messageSends: [],
  4458. referencedClasses: []
  4459. }),
  4460. smalltalk.UndefinedObject);
  4461. smalltalk.addMethod(
  4462. unescape('_subclass_instanceVariableNames_package_'),
  4463. smalltalk.method({
  4464. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  4465. category: 'class creation',
  4466. fn: function (aString, aString2, aString3){
  4467. var self=this;
  4468. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  4469. return self;},
  4470. args: ["aString", "aString2", "aString3"],
  4471. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  4472. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new"],
  4473. referencedClasses: [smalltalk.ClassBuilder]
  4474. }),
  4475. smalltalk.UndefinedObject);
  4476. smalltalk.addMethod(
  4477. unescape('_new'),
  4478. smalltalk.method({
  4479. selector: unescape('new'),
  4480. category: 'instance creation',
  4481. fn: function (){
  4482. var self=this;
  4483. smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
  4484. return self;},
  4485. args: [],
  4486. source: unescape('new%0A%09%20%20%20%20self%20error%3A%20%27You%20cannot%20create%20new%20instances%20of%20UndefinedObject.%20Use%20nil%27'),
  4487. messageSends: ["error:"],
  4488. referencedClasses: []
  4489. }),
  4490. smalltalk.UndefinedObject.klass);
  4491. smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel');
  4492. smalltalk.addMethod(
  4493. unescape('_size'),
  4494. smalltalk.method({
  4495. selector: unescape('size'),
  4496. category: 'accessing',
  4497. fn: function (){
  4498. var self=this;
  4499. smalltalk.send(self, "_subclassResponsibility", []);
  4500. return self;},
  4501. args: [],
  4502. source: unescape('size%0A%09self%20subclassResponsibility'),
  4503. messageSends: ["subclassResponsibility"],
  4504. referencedClasses: []
  4505. }),
  4506. smalltalk.Collection);
  4507. smalltalk.addMethod(
  4508. unescape('_readStream'),
  4509. smalltalk.method({
  4510. selector: unescape('readStream'),
  4511. category: 'accessing',
  4512. fn: function (){
  4513. var self=this;
  4514. return smalltalk.send(self, "_stream", []);
  4515. return self;},
  4516. args: [],
  4517. source: unescape('readStream%0A%09%5Eself%20stream'),
  4518. messageSends: ["stream"],
  4519. referencedClasses: []
  4520. }),
  4521. smalltalk.Collection);
  4522. smalltalk.addMethod(
  4523. unescape('_writeStream'),
  4524. smalltalk.method({
  4525. selector: unescape('writeStream'),
  4526. category: 'accessing',
  4527. fn: function (){
  4528. var self=this;
  4529. return smalltalk.send(self, "_stream", []);
  4530. return self;},
  4531. args: [],
  4532. source: unescape('writeStream%0A%09%5Eself%20stream'),
  4533. messageSends: ["stream"],
  4534. referencedClasses: []
  4535. }),
  4536. smalltalk.Collection);
  4537. smalltalk.addMethod(
  4538. unescape('_stream'),
  4539. smalltalk.method({
  4540. selector: unescape('stream'),
  4541. category: 'accessing',
  4542. fn: function (){
  4543. var self=this;
  4544. return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
  4545. return self;},
  4546. args: [],
  4547. source: unescape('stream%0A%09%5Eself%20streamClass%20on%3A%20self'),
  4548. messageSends: ["on:", "streamClass"],
  4549. referencedClasses: []
  4550. }),
  4551. smalltalk.Collection);
  4552. smalltalk.addMethod(
  4553. unescape('_streamClass'),
  4554. smalltalk.method({
  4555. selector: unescape('streamClass'),
  4556. category: 'accessing',
  4557. fn: function (){
  4558. var self=this;
  4559. return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
  4560. return self;},
  4561. args: [],
  4562. source: unescape('streamClass%0A%09%5Eself%20class%20streamClass'),
  4563. messageSends: ["streamClass", "class"],
  4564. referencedClasses: []
  4565. }),
  4566. smalltalk.Collection);
  4567. smalltalk.addMethod(
  4568. unescape('_add_'),
  4569. smalltalk.method({
  4570. selector: unescape('add%3A'),
  4571. category: 'adding/removing',
  4572. fn: function (anObject){
  4573. var self=this;
  4574. smalltalk.send(self, "_subclassResponsibility", []);
  4575. return self;},
  4576. args: ["anObject"],
  4577. source: unescape('add%3A%20anObject%0A%09self%20subclassResponsibility'),
  4578. messageSends: ["subclassResponsibility"],
  4579. referencedClasses: []
  4580. }),
  4581. smalltalk.Collection);
  4582. smalltalk.addMethod(
  4583. unescape('_addAll_'),
  4584. smalltalk.method({
  4585. selector: unescape('addAll%3A'),
  4586. category: 'adding/removing',
  4587. fn: function (aCollection){
  4588. var self=this;
  4589. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
  4590. return aCollection;
  4591. return self;},
  4592. args: ["aCollection"],
  4593. source: unescape('addAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20add%3A%20each%5D.%0A%09%5EaCollection'),
  4594. messageSends: ["do:", "add:"],
  4595. referencedClasses: []
  4596. }),
  4597. smalltalk.Collection);
  4598. smalltalk.addMethod(
  4599. unescape('__comma'),
  4600. smalltalk.method({
  4601. selector: unescape('%2C'),
  4602. category: 'copying',
  4603. fn: function (aCollection){
  4604. var self=this;
  4605. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4606. return self;},
  4607. args: ["aCollection"],
  4608. source: unescape('%2C%20aCollection%0A%09%5Eself%20copy%20%0A%09%20%20%20%20addAll%3A%20aCollection%3B%20%0A%09%20%20%20%20yourself'),
  4609. messageSends: ["addAll:", "yourself", "copy"],
  4610. referencedClasses: []
  4611. }),
  4612. smalltalk.Collection);
  4613. smalltalk.addMethod(
  4614. unescape('_copyWith_'),
  4615. smalltalk.method({
  4616. selector: unescape('copyWith%3A'),
  4617. category: 'copying',
  4618. fn: function (anObject){
  4619. var self=this;
  4620. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4621. return self;},
  4622. args: ["anObject"],
  4623. source: unescape('copyWith%3A%20anObject%0A%09%5Eself%20copy%20add%3A%20anObject%3B%20yourself'),
  4624. messageSends: ["add:", "yourself", "copy"],
  4625. referencedClasses: []
  4626. }),
  4627. smalltalk.Collection);
  4628. smalltalk.addMethod(
  4629. unescape('_copyWithAll_'),
  4630. smalltalk.method({
  4631. selector: unescape('copyWithAll%3A'),
  4632. category: 'copying',
  4633. fn: function (aCollection){
  4634. var self=this;
  4635. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  4636. return self;},
  4637. args: ["aCollection"],
  4638. source: unescape('copyWithAll%3A%20aCollection%0A%09%5Eself%20copy%20addAll%3A%20aCollection%3B%20yourself'),
  4639. messageSends: ["addAll:", "yourself", "copy"],
  4640. referencedClasses: []
  4641. }),
  4642. smalltalk.Collection);
  4643. smalltalk.addMethod(
  4644. unescape('_asArray'),
  4645. smalltalk.method({
  4646. selector: unescape('asArray'),
  4647. category: 'converting',
  4648. fn: function (){
  4649. var self=this;
  4650. var array=nil;
  4651. var index=nil;
  4652. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  4653. index=(0);
  4654. smalltalk.send(self, "_do_", [(function(each){index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return smalltalk.send(array, "_at_put_", [index, each]);})]);
  4655. return array;
  4656. return self;},
  4657. args: [],
  4658. source: unescape('asArray%0A%09%7C%20array%20index%20%7C%0A%09array%20%3A%3D%20Array%20new.%0A%09index%20%3A%3D%200.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20index%20%3A%3D%20index%20+%201.%0A%09%20%20%20%20array%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Earray'),
  4659. messageSends: ["new", "do:", unescape("+"), "at:put:"],
  4660. referencedClasses: [smalltalk.Array]
  4661. }),
  4662. smalltalk.Collection);
  4663. smalltalk.addMethod(
  4664. unescape('_do_'),
  4665. smalltalk.method({
  4666. selector: unescape('do%3A'),
  4667. category: 'enumerating',
  4668. fn: function (aBlock){
  4669. var self=this;
  4670. for(var i=0;i<self.length;i++){aBlock(self[i]);};
  4671. return self;},
  4672. args: ["aBlock"],
  4673. source: unescape('do%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%29%3B%7D%3E'),
  4674. messageSends: [],
  4675. referencedClasses: []
  4676. }),
  4677. smalltalk.Collection);
  4678. smalltalk.addMethod(
  4679. unescape('_collect_'),
  4680. smalltalk.method({
  4681. selector: unescape('collect%3A'),
  4682. category: 'enumerating',
  4683. fn: function (aBlock){
  4684. var self=this;
  4685. var newCollection=nil;
  4686. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  4687. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(aBlock, "_value_", [each])]);})]);
  4688. return newCollection;
  4689. return self;},
  4690. args: ["aBlock"],
  4691. source: unescape('collect%3A%20aBlock%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20newCollection%20add%3A%20%28aBlock%20value%3A%20each%29%5D.%0A%09%5EnewCollection'),
  4692. messageSends: ["new", "class", "do:", "add:", "value:"],
  4693. referencedClasses: []
  4694. }),
  4695. smalltalk.Collection);
  4696. smalltalk.addMethod(
  4697. unescape('_detect_'),
  4698. smalltalk.method({
  4699. selector: unescape('detect%3A'),
  4700. category: 'enumerating',
  4701. fn: function (aBlock){
  4702. var self=this;
  4703. return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  4704. return self;},
  4705. args: ["aBlock"],
  4706. source: unescape('detect%3A%20aBlock%0A%09%5Eself%20detect%3A%20aBlock%20ifNone%3A%20%5Bself%20errorNotFound%5D'),
  4707. messageSends: ["detect:ifNone:", "errorNotFound"],
  4708. referencedClasses: []
  4709. }),
  4710. smalltalk.Collection);
  4711. smalltalk.addMethod(
  4712. unescape('_detect_ifNone_'),
  4713. smalltalk.method({
  4714. selector: unescape('detect%3AifNone%3A'),
  4715. category: 'enumerating',
  4716. fn: function (aBlock, anotherBlock){
  4717. var self=this;
  4718. for(var i = 0; i < self.length; i++)
  4719. if(aBlock(self[i]))
  4720. return self[i];
  4721. return anotherBlock();
  4722. ;
  4723. return self;},
  4724. args: ["aBlock", "anotherBlock"],
  4725. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%3C%0A%09%09for%28var%20i%20%3D%200%3B%20i%20%3C%20self.length%3B%20i++%29%0A%09%09%09if%28aBlock%28self%5Bi%5D%29%29%0A%09%09%09%09return%20self%5Bi%5D%3B%0A%09%09return%20anotherBlock%28%29%3B%0A%09%3E'),
  4726. messageSends: [],
  4727. referencedClasses: []
  4728. }),
  4729. smalltalk.Collection);
  4730. smalltalk.addMethod(
  4731. unescape('_do_separatedBy_'),
  4732. smalltalk.method({
  4733. selector: unescape('do%3AseparatedBy%3A'),
  4734. category: 'enumerating',
  4735. fn: function (aBlock, anotherBlock){
  4736. var self=this;
  4737. var first=nil;
  4738. first=true;
  4739. smalltalk.send(self, "_do_", [(function(each){((($receiver = first).klass === smalltalk.Boolean) ? ($receiver ? (function(){return first=false;})() : (function(){return smalltalk.send(anotherBlock, "_value", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return first=false;}), (function(){return smalltalk.send(anotherBlock, "_value", []);})]));return smalltalk.send(aBlock, "_value_", [each]);})]);
  4740. return self;},
  4741. args: ["aBlock", "anotherBlock"],
  4742. source: unescape('do%3A%20aBlock%20separatedBy%3A%20anotherBlock%0A%20%20%20%20%09%7C%20first%20%7C%0A%20%20%20%20%09first%20%3A%3D%20true.%0A%20%20%20%20%09self%20do%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%09%20%20%20%20first%0A%20%20%20%20%09%09ifTrue%3A%20%5Bfirst%20%3A%3D%20false%5D%0A%20%20%20%20%09%09ifFalse%3A%20%5BanotherBlock%20value%5D.%0A%20%20%20%20%09%20%20%20%20aBlock%20value%3A%20each%5D'),
  4743. messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
  4744. referencedClasses: []
  4745. }),
  4746. smalltalk.Collection);
  4747. smalltalk.addMethod(
  4748. unescape('_inject_into_'),
  4749. smalltalk.method({
  4750. selector: unescape('inject%3Ainto%3A'),
  4751. category: 'enumerating',
  4752. fn: function (anObject, aBlock){
  4753. var self=this;
  4754. var result=nil;
  4755. result=anObject;
  4756. smalltalk.send(self, "_do_", [(function(each){return result=smalltalk.send(aBlock, "_value_value_", [result, each]);})]);
  4757. return result;
  4758. return self;},
  4759. args: ["anObject", "aBlock"],
  4760. source: unescape('inject%3A%20anObject%20into%3A%20aBlock%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20anObject.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20%0A%09%20%20%20%20result%20%3A%3D%20aBlock%20value%3A%20result%20value%3A%20each%5D.%0A%09%5Eresult'),
  4761. messageSends: ["do:", "value:value:"],
  4762. referencedClasses: []
  4763. }),
  4764. smalltalk.Collection);
  4765. smalltalk.addMethod(
  4766. unescape('_reject_'),
  4767. smalltalk.method({
  4768. selector: unescape('reject%3A'),
  4769. category: 'enumerating',
  4770. fn: function (aBlock){
  4771. var self=this;
  4772. return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
  4773. return self;},
  4774. args: ["aBlock"],
  4775. source: unescape('reject%3A%20aBlock%0A%09%5Eself%20select%3A%20%5B%3Aeach%20%7C%20%28aBlock%20value%3A%20each%29%20%3D%20false%5D'),
  4776. messageSends: ["select:", unescape("%3D"), "value:"],
  4777. referencedClasses: []
  4778. }),
  4779. smalltalk.Collection);
  4780. smalltalk.addMethod(
  4781. unescape('_select_'),
  4782. smalltalk.method({
  4783. selector: unescape('select%3A'),
  4784. category: 'enumerating',
  4785. fn: function (aBlock){
  4786. var self=this;
  4787. var stream=nil;
  4788. stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []);
  4789. smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(stream, "_nextPut_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(stream, "_nextPut_", [each]);})]));})]);
  4790. return smalltalk.send(stream, "_contents", []);
  4791. return self;},
  4792. args: ["aBlock"],
  4793. source: unescape('select%3A%20aBlock%0A%09%7C%20stream%20%7C%0A%09stream%20%3A%3D%20self%20class%20new%20writeStream.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20%28aBlock%20value%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09stream%20nextPut%3A%20each%5D%5D.%0A%09%5Estream%20contents'),
  4794. messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
  4795. referencedClasses: []
  4796. }),
  4797. smalltalk.Collection);
  4798. smalltalk.addMethod(
  4799. unescape('_errorNotFound'),
  4800. smalltalk.method({
  4801. selector: unescape('errorNotFound'),
  4802. category: 'error handling',
  4803. fn: function (){
  4804. var self=this;
  4805. smalltalk.send(self, "_error_", ["Object is not in the collection"]);
  4806. return self;},
  4807. args: [],
  4808. source: unescape('errorNotFound%0A%09self%20error%3A%20%27Object%20is%20not%20in%20the%20collection%27'),
  4809. messageSends: ["error:"],
  4810. referencedClasses: []
  4811. }),
  4812. smalltalk.Collection);
  4813. smalltalk.addMethod(
  4814. unescape('_includes_'),
  4815. smalltalk.method({
  4816. selector: unescape('includes%3A'),
  4817. category: 'testing',
  4818. fn: function (anObject){
  4819. var self=this;
  4820. var i = self.length;
  4821. while (i--) {
  4822. if (smalltalk.send(self[i], "__eq", [anObject])) {return true;}
  4823. }
  4824. return false
  4825. ;
  4826. return self;},
  4827. args: ["anObject"],
  4828. source: unescape('includes%3A%20anObject%0A%09%3C%0A%09%09var%20i%20%3D%20self.length%3B%0A%09%09while%20%28i--%29%20%7B%0A%09%09%09if%20%28smalltalk.send%28self%5Bi%5D%2C%20%22__eq%22%2C%20%5BanObject%5D%29%29%20%7Breturn%20true%3B%7D%09%0A%09%09%7D%0A%09%09return%20false%0A%09%3E'),
  4829. messageSends: [],
  4830. referencedClasses: []
  4831. }),
  4832. smalltalk.Collection);
  4833. smalltalk.addMethod(
  4834. unescape('_notEmpty'),
  4835. smalltalk.method({
  4836. selector: unescape('notEmpty'),
  4837. category: 'testing',
  4838. fn: function (){
  4839. var self=this;
  4840. return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
  4841. return self;},
  4842. args: [],
  4843. source: unescape('notEmpty%0A%09%5Eself%20isEmpty%20not'),
  4844. messageSends: ["not", "isEmpty"],
  4845. referencedClasses: []
  4846. }),
  4847. smalltalk.Collection);
  4848. smalltalk.addMethod(
  4849. unescape('_isEmpty'),
  4850. smalltalk.method({
  4851. selector: unescape('isEmpty'),
  4852. category: 'testing',
  4853. fn: function (){
  4854. var self=this;
  4855. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  4856. return self;},
  4857. args: [],
  4858. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  4859. messageSends: [unescape("%3D"), "size"],
  4860. referencedClasses: []
  4861. }),
  4862. smalltalk.Collection);
  4863. smalltalk.addMethod(
  4864. unescape('_remove_'),
  4865. smalltalk.method({
  4866. selector: unescape('remove%3A'),
  4867. category: 'adding/removing',
  4868. fn: function (anObject){
  4869. var self=this;
  4870. smalltalk.send(self, "_subclassResponsibility", []);
  4871. return self;},
  4872. args: ["anObject"],
  4873. source: unescape('remove%3A%20anObject%0A%20%20%20%20self%20subclassResponsibility'),
  4874. messageSends: ["subclassResponsibility"],
  4875. referencedClasses: []
  4876. }),
  4877. smalltalk.Collection);
  4878. smalltalk.addMethod(
  4879. unescape('_asSet'),
  4880. smalltalk.method({
  4881. selector: unescape('asSet'),
  4882. category: 'converting',
  4883. fn: function (){
  4884. var self=this;
  4885. return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
  4886. return self;},
  4887. args: [],
  4888. source: unescape('asSet%0A%09%5ESet%20withAll%3A%20self'),
  4889. messageSends: ["withAll:"],
  4890. referencedClasses: [smalltalk.Set]
  4891. }),
  4892. smalltalk.Collection);
  4893. smalltalk.addMethod(
  4894. unescape('_ifNotEmpty_'),
  4895. smalltalk.method({
  4896. selector: unescape('ifNotEmpty%3A'),
  4897. category: 'testing',
  4898. fn: function (aBlock){
  4899. var self=this;
  4900. smalltalk.send(smalltalk.send(self, "_notEmpty", []), "_ifTrue_", [aBlock]);
  4901. return self;},
  4902. args: ["aBlock"],
  4903. source: unescape('ifNotEmpty%3A%20aBlock%0A%09self%20notEmpty%20ifTrue%3A%20aBlock.'),
  4904. messageSends: ["ifTrue:", "notEmpty"],
  4905. referencedClasses: []
  4906. }),
  4907. smalltalk.Collection);
  4908. smalltalk.addMethod(
  4909. unescape('_ifEmpty_'),
  4910. smalltalk.method({
  4911. selector: unescape('ifEmpty%3A'),
  4912. category: 'testing',
  4913. fn: function (aBlock){
  4914. var self=this;
  4915. smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_ifTrue_", [aBlock]);
  4916. return self;},
  4917. args: ["aBlock"],
  4918. source: unescape('ifEmpty%3A%20aBlock%0A%09self%20isEmpty%20ifTrue%3A%20aBlock.'),
  4919. messageSends: ["ifTrue:", "isEmpty"],
  4920. referencedClasses: []
  4921. }),
  4922. smalltalk.Collection);
  4923. smalltalk.addMethod(
  4924. unescape('_copyWithoutAll_'),
  4925. smalltalk.method({
  4926. selector: unescape('copyWithoutAll%3A'),
  4927. category: 'copying',
  4928. fn: function (aCollection){
  4929. var self=this;
  4930. return smalltalk.send(self, "_reject_", [(function(each){return smalltalk.send(aCollection, "_includes_", [each]);})]);
  4931. return self;},
  4932. args: ["aCollection"],
  4933. source: unescape('copyWithoutAll%3A%20aCollection%0A%09%22Answer%20a%20copy%20of%20the%20receiver%20that%20does%20not%20contain%20any%20elements%20%0A%09equal%20to%20those%20in%20aCollection.%22%0A%0A%09%5E%20self%20reject%3A%20%5B%3Aeach%20%7C%20aCollection%20includes%3A%20each%5D'),
  4934. messageSends: ["reject:", "includes:"],
  4935. referencedClasses: []
  4936. }),
  4937. smalltalk.Collection);
  4938. smalltalk.addMethod(
  4939. unescape('_streamClass'),
  4940. smalltalk.method({
  4941. selector: unescape('streamClass'),
  4942. category: 'accessing',
  4943. fn: function (){
  4944. var self=this;
  4945. return (smalltalk.Stream || Stream);
  4946. return self;},
  4947. args: [],
  4948. source: unescape('streamClass%0A%09%20%20%20%20%5EStream'),
  4949. messageSends: [],
  4950. referencedClasses: [smalltalk.Stream]
  4951. }),
  4952. smalltalk.Collection.klass);
  4953. smalltalk.addMethod(
  4954. unescape('_with_'),
  4955. smalltalk.method({
  4956. selector: unescape('with%3A'),
  4957. category: 'instance creation',
  4958. fn: function (anObject){
  4959. var self=this;
  4960. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4961. return self;},
  4962. args: ["anObject"],
  4963. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09yourself'),
  4964. messageSends: ["add:", "yourself", "new"],
  4965. referencedClasses: []
  4966. }),
  4967. smalltalk.Collection.klass);
  4968. smalltalk.addMethod(
  4969. unescape('_with_with_'),
  4970. smalltalk.method({
  4971. selector: unescape('with%3Awith%3A'),
  4972. category: 'instance creation',
  4973. fn: function (anObject, anotherObject){
  4974. var self=this;
  4975. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4976. return self;},
  4977. args: ["anObject", "anotherObject"],
  4978. source: unescape('with%3A%20anObject%20with%3A%20anotherObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09add%3A%20anotherObject%3B%0A%09%09yourself'),
  4979. messageSends: ["add:", "yourself", "new"],
  4980. referencedClasses: []
  4981. }),
  4982. smalltalk.Collection.klass);
  4983. smalltalk.addMethod(
  4984. unescape('_with_with_with_'),
  4985. smalltalk.method({
  4986. selector: unescape('with%3Awith%3Awith%3A'),
  4987. category: 'instance creation',
  4988. fn: function (firstObject, secondObject, thirdObject){
  4989. var self=this;
  4990. return (function($rec){smalltalk.send($rec, "_add_", [firstObject]);smalltalk.send($rec, "_add_", [secondObject]);smalltalk.send($rec, "_add_", [thirdObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  4991. return self;},
  4992. args: ["firstObject", "secondObject", "thirdObject"],
  4993. source: unescape('with%3A%20firstObject%20with%3A%20secondObject%20with%3A%20thirdObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20firstObject%3B%0A%09%09add%3A%20secondObject%3B%0A%09%09add%3A%20thirdObject%3B%0A%09%09yourself'),
  4994. messageSends: ["add:", "yourself", "new"],
  4995. referencedClasses: []
  4996. }),
  4997. smalltalk.Collection.klass);
  4998. smalltalk.addMethod(
  4999. unescape('_withAll_'),
  5000. smalltalk.method({
  5001. selector: unescape('withAll%3A'),
  5002. category: 'instance creation',
  5003. fn: function (aCollection){
  5004. var self=this;
  5005. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  5006. return self;},
  5007. args: ["aCollection"],
  5008. source: unescape('withAll%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%0A%09%09addAll%3A%20aCollection%3B%0A%09%09yourself'),
  5009. messageSends: ["addAll:", "yourself", "new"],
  5010. referencedClasses: []
  5011. }),
  5012. smalltalk.Collection.klass);
  5013. smalltalk.addClass('SequenceableCollection', smalltalk.Collection, [], 'Kernel');
  5014. smalltalk.addMethod(
  5015. unescape('_at_'),
  5016. smalltalk.method({
  5017. selector: unescape('at%3A'),
  5018. category: 'accessing',
  5019. fn: function (anIndex){
  5020. var self=this;
  5021. return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  5022. return self;},
  5023. args: ["anIndex"],
  5024. source: unescape('at%3A%20anIndex%0A%09%5Eself%20at%3A%20anIndex%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20errorNotFound%5D'),
  5025. messageSends: ["at:ifAbsent:", "errorNotFound"],
  5026. referencedClasses: []
  5027. }),
  5028. smalltalk.SequenceableCollection);
  5029. smalltalk.addMethod(
  5030. unescape('_at_ifAbsent_'),
  5031. smalltalk.method({
  5032. selector: unescape('at%3AifAbsent%3A'),
  5033. category: 'accessing',
  5034. fn: function (anIndex, aBlock){
  5035. var self=this;
  5036. smalltalk.send(self, "_subclassResponsibility", []);
  5037. return self;},
  5038. args: ["anIndex", "aBlock"],
  5039. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09self%20subclassResponsibility'),
  5040. messageSends: ["subclassResponsibility"],
  5041. referencedClasses: []
  5042. }),
  5043. smalltalk.SequenceableCollection);
  5044. smalltalk.addMethod(
  5045. unescape('_at_put_'),
  5046. smalltalk.method({
  5047. selector: unescape('at%3Aput%3A'),
  5048. category: 'accessing',
  5049. fn: function (anIndex, anObject){
  5050. var self=this;
  5051. smalltalk.send(self, "_subclassResponsibility", []);
  5052. return self;},
  5053. args: ["anIndex", "anObject"],
  5054. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20subclassResponsibility'),
  5055. messageSends: ["subclassResponsibility"],
  5056. referencedClasses: []
  5057. }),
  5058. smalltalk.SequenceableCollection);
  5059. smalltalk.addMethod(
  5060. unescape('_copyFrom_to_'),
  5061. smalltalk.method({
  5062. selector: unescape('copyFrom%3Ato%3A'),
  5063. category: 'copying',
  5064. fn: function (anIndex, anotherIndex){
  5065. var self=this;
  5066. smalltalk.send(self, "_subclassResponsibility", []);
  5067. return self;},
  5068. args: ["anIndex", "anotherIndex"],
  5069. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20subclassResponsibility'),
  5070. messageSends: ["subclassResponsibility"],
  5071. referencedClasses: []
  5072. }),
  5073. smalltalk.SequenceableCollection);
  5074. smalltalk.addMethod(
  5075. unescape('_first'),
  5076. smalltalk.method({
  5077. selector: unescape('first'),
  5078. category: 'accessing',
  5079. fn: function (){
  5080. var self=this;
  5081. return smalltalk.send(self, "_at_", [(1)]);
  5082. return self;},
  5083. args: [],
  5084. source: unescape('first%0A%09%5Eself%20at%3A%201'),
  5085. messageSends: ["at:"],
  5086. referencedClasses: []
  5087. }),
  5088. smalltalk.SequenceableCollection);
  5089. smalltalk.addMethod(
  5090. unescape('_fourth'),
  5091. smalltalk.method({
  5092. selector: unescape('fourth'),
  5093. category: 'accessing',
  5094. fn: function (){
  5095. var self=this;
  5096. return smalltalk.send(self, "_at_", [(4)]);
  5097. return self;},
  5098. args: [],
  5099. source: unescape('fourth%0A%09%5Eself%20at%3A%204'),
  5100. messageSends: ["at:"],
  5101. referencedClasses: []
  5102. }),
  5103. smalltalk.SequenceableCollection);
  5104. smalltalk.addMethod(
  5105. unescape('_last'),
  5106. smalltalk.method({
  5107. selector: unescape('last'),
  5108. category: 'accessing',
  5109. fn: function (){
  5110. var self=this;
  5111. return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
  5112. return self;},
  5113. args: [],
  5114. source: unescape('last%0A%09%5Eself%20at%3A%20self%20size'),
  5115. messageSends: ["at:", "size"],
  5116. referencedClasses: []
  5117. }),
  5118. smalltalk.SequenceableCollection);
  5119. smalltalk.addMethod(
  5120. unescape('_second'),
  5121. smalltalk.method({
  5122. selector: unescape('second'),
  5123. category: 'accessing',
  5124. fn: function (){
  5125. var self=this;
  5126. return smalltalk.send(self, "_at_", [(2)]);
  5127. return self;},
  5128. args: [],
  5129. source: unescape('second%0A%09%5Eself%20at%3A%202'),
  5130. messageSends: ["at:"],
  5131. referencedClasses: []
  5132. }),
  5133. smalltalk.SequenceableCollection);
  5134. smalltalk.addMethod(
  5135. unescape('_third'),
  5136. smalltalk.method({
  5137. selector: unescape('third'),
  5138. category: 'accessing',
  5139. fn: function (){
  5140. var self=this;
  5141. return smalltalk.send(self, "_at_", [(3)]);
  5142. return self;},
  5143. args: [],
  5144. source: unescape('third%0A%09%5Eself%20at%3A%203'),
  5145. messageSends: ["at:"],
  5146. referencedClasses: []
  5147. }),
  5148. smalltalk.SequenceableCollection);
  5149. smalltalk.addMethod(
  5150. unescape('_removeLast'),
  5151. smalltalk.method({
  5152. selector: unescape('removeLast'),
  5153. category: 'adding',
  5154. fn: function (){
  5155. var self=this;
  5156. smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
  5157. return self;},
  5158. args: [],
  5159. source: unescape('removeLast%0A%09self%20remove%3A%20self%20last'),
  5160. messageSends: ["remove:", "last"],
  5161. referencedClasses: []
  5162. }),
  5163. smalltalk.SequenceableCollection);
  5164. smalltalk.addMethod(
  5165. unescape('_addLast_'),
  5166. smalltalk.method({
  5167. selector: unescape('addLast%3A'),
  5168. category: 'adding',
  5169. fn: function (anObject){
  5170. var self=this;
  5171. smalltalk.send(self, "_add_", [anObject]);
  5172. return self;},
  5173. args: ["anObject"],
  5174. source: unescape('addLast%3A%20anObject%0A%09self%20add%3A%20anObject'),
  5175. messageSends: ["add:"],
  5176. referencedClasses: []
  5177. }),
  5178. smalltalk.SequenceableCollection);
  5179. smalltalk.addMethod(
  5180. unescape('_withIndexDo_'),
  5181. smalltalk.method({
  5182. selector: unescape('withIndexDo%3A'),
  5183. category: 'enumerating',
  5184. fn: function (aBlock){
  5185. var self=this;
  5186. for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
  5187. return self;},
  5188. args: ["aBlock"],
  5189. source: unescape('withIndexDo%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%2C%20i+1%29%3B%7D%3E'),
  5190. messageSends: [],
  5191. referencedClasses: []
  5192. }),
  5193. smalltalk.SequenceableCollection);
  5194. smalltalk.addMethod(
  5195. unescape('_allButFirst'),
  5196. smalltalk.method({
  5197. selector: unescape('allButFirst'),
  5198. category: 'accessing',
  5199. fn: function (){
  5200. var self=this;
  5201. return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
  5202. return self;},
  5203. args: [],
  5204. source: unescape('allButFirst%0A%09%5Eself%20copyFrom%3A%202%20to%3A%20self%20size'),
  5205. messageSends: ["copyFrom:to:", "size"],
  5206. referencedClasses: []
  5207. }),
  5208. smalltalk.SequenceableCollection);
  5209. smalltalk.addMethod(
  5210. unescape('_allButLast'),
  5211. smalltalk.method({
  5212. selector: unescape('allButLast'),
  5213. category: 'accessing',
  5214. fn: function (){
  5215. var self=this;
  5216. return smalltalk.send(self, "_copyFrom_to_", [(1), ((($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]);
  5217. return self;},
  5218. args: [],
  5219. source: unescape('allButLast%0A%09%5Eself%20copyFrom%3A%201%20to%3A%20self%20size%20-%201'),
  5220. messageSends: ["copyFrom:to:", unescape("-"), "size"],
  5221. referencedClasses: []
  5222. }),
  5223. smalltalk.SequenceableCollection);
  5224. smalltalk.addMethod(
  5225. unescape('_indexOf_'),
  5226. smalltalk.method({
  5227. selector: unescape('indexOf%3A'),
  5228. category: 'accessing',
  5229. fn: function (anObject){
  5230. var self=this;
  5231. return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  5232. return self;},
  5233. args: ["anObject"],
  5234. source: unescape('indexOf%3A%20anObject%0A%09%5Eself%20indexOf%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  5235. messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
  5236. referencedClasses: []
  5237. }),
  5238. smalltalk.SequenceableCollection);
  5239. smalltalk.addMethod(
  5240. unescape('_indexOf_ifAbsent_'),
  5241. smalltalk.method({
  5242. selector: unescape('indexOf%3AifAbsent%3A'),
  5243. category: 'accessing',
  5244. fn: function (anObject, aBlock){
  5245. var self=this;
  5246. for(var i=0;i<self.length;i++){
  5247. if(self[i].__eq(anObject)) {return i+1}
  5248. }
  5249. return aBlock();
  5250. ;
  5251. return self;},
  5252. args: ["anObject", "aBlock"],
  5253. source: unescape('indexOf%3A%20anObject%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
  5254. messageSends: [],
  5255. referencedClasses: []
  5256. }),
  5257. smalltalk.SequenceableCollection);
  5258. smalltalk.addMethod(
  5259. unescape('_indexOf_startingAt_ifAbsent_'),
  5260. smalltalk.method({
  5261. selector: unescape('indexOf%3AstartingAt%3AifAbsent%3A'),
  5262. category: 'accessing',
  5263. fn: function (anObject, start, aBlock){
  5264. var self=this;
  5265. for(var i=start-1;i<self.length;i++){
  5266. if(self[i].__eq(anObject)) {return i+1}
  5267. }
  5268. return aBlock();
  5269. ;
  5270. return self;},
  5271. args: ["anObject", "start", "aBlock"],
  5272. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3Dstart-1%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
  5273. messageSends: [],
  5274. referencedClasses: []
  5275. }),
  5276. smalltalk.SequenceableCollection);
  5277. smalltalk.addMethod(
  5278. unescape('_indexOf_startingAt_'),
  5279. smalltalk.method({
  5280. selector: unescape('indexOf%3AstartingAt%3A'),
  5281. category: 'accessing',
  5282. fn: function (anObject, start){
  5283. var self=this;
  5284. return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
  5285. return self;},
  5286. args: ["anObject", "start"],
  5287. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%0A%09%22Answer%20the%20index%20of%20the%20first%20occurence%20of%20anElement%20after%20start%0A%09within%20the%20receiver.%20If%20the%20receiver%20does%20not%20contain%20anElement%2C%20%0A%09answer%200.%22%0A%09%5Eself%20indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20%5B0%5D'),
  5288. messageSends: ["indexOf:startingAt:ifAbsent:"],
  5289. referencedClasses: []
  5290. }),
  5291. smalltalk.SequenceableCollection);
  5292. smalltalk.addMethod(
  5293. unescape('_reversed'),
  5294. smalltalk.method({
  5295. selector: unescape('reversed'),
  5296. category: 'converting',
  5297. fn: function (){
  5298. var self=this;
  5299. smalltalk.send(self, "_subclassResponsibility", []);
  5300. return self;},
  5301. args: [],
  5302. source: unescape('reversed%0A%09self%20subclassResponsibility'),
  5303. messageSends: ["subclassResponsibility"],
  5304. referencedClasses: []
  5305. }),
  5306. smalltalk.SequenceableCollection);
  5307. smalltalk.addMethod(
  5308. unescape('_atRandom'),
  5309. smalltalk.method({
  5310. selector: unescape('atRandom'),
  5311. category: 'accessing',
  5312. fn: function (){
  5313. var self=this;
  5314. return smalltalk.send(self, "_at_", [smalltalk.send(smalltalk.send(self, "_size", []), "_atRandom", [])]);
  5315. return self;},
  5316. args: [],
  5317. source: unescape('atRandom%0A%09%5E%20self%20at%3A%20self%20size%20atRandom'),
  5318. messageSends: ["at:", "atRandom", "size"],
  5319. referencedClasses: []
  5320. }),
  5321. smalltalk.SequenceableCollection);
  5322. smalltalk.addClass('String', smalltalk.SequenceableCollection, [], 'Kernel');
  5323. smalltalk.addMethod(
  5324. unescape('__eq'),
  5325. smalltalk.method({
  5326. selector: unescape('%3D'),
  5327. category: 'comparing',
  5328. fn: function (aString){
  5329. var self=this;
  5330. try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  5331. return String(self) == aString;
  5332. return self;
  5333. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  5334. args: ["aString"],
  5335. source: unescape('%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%20aString%3E'),
  5336. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  5337. referencedClasses: []
  5338. }),
  5339. smalltalk.String);
  5340. smalltalk.addMethod(
  5341. unescape('_size'),
  5342. smalltalk.method({
  5343. selector: unescape('size'),
  5344. category: 'accessing',
  5345. fn: function (){
  5346. var self=this;
  5347. return self.length;
  5348. return self;},
  5349. args: [],
  5350. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  5351. messageSends: [],
  5352. referencedClasses: []
  5353. }),
  5354. smalltalk.String);
  5355. smalltalk.addMethod(
  5356. unescape('_at_'),
  5357. smalltalk.method({
  5358. selector: unescape('at%3A'),
  5359. category: 'accessing',
  5360. fn: function (anIndex){
  5361. var self=this;
  5362. return self[anIndex - 1];
  5363. return self;},
  5364. args: ["anIndex"],
  5365. source: unescape('at%3A%20anIndex%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%3E'),
  5366. messageSends: [],
  5367. referencedClasses: []
  5368. }),
  5369. smalltalk.String);
  5370. smalltalk.addMethod(
  5371. unescape('_at_put_'),
  5372. smalltalk.method({
  5373. selector: unescape('at%3Aput%3A'),
  5374. category: 'accessing',
  5375. fn: function (anIndex, anObject){
  5376. var self=this;
  5377. smalltalk.send(self, "_errorReadOnly", []);
  5378. return self;},
  5379. args: ["anIndex", "anObject"],
  5380. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%20%20%20%20%09self%20errorReadOnly'),
  5381. messageSends: ["errorReadOnly"],
  5382. referencedClasses: []
  5383. }),
  5384. smalltalk.String);
  5385. smalltalk.addMethod(
  5386. unescape('_at_ifAbsent_'),
  5387. smalltalk.method({
  5388. selector: unescape('at%3AifAbsent%3A'),
  5389. category: 'accessing',
  5390. fn: function (anIndex, aBlock){
  5391. var self=this;
  5392. (($receiver = smalltalk.send(self, "_at_", [anIndex])) == nil || $receiver == undefined) ? (function(){return aBlock;})() : $receiver;
  5393. return self;},
  5394. args: ["anIndex", "aBlock"],
  5395. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%20%20%20%20%09%28self%20at%3A%20anIndex%29%20ifNil%3A%20%5BaBlock%5D'),
  5396. messageSends: ["ifNil:", "at:"],
  5397. referencedClasses: []
  5398. }),
  5399. smalltalk.String);
  5400. smalltalk.addMethod(
  5401. unescape('_escaped'),
  5402. smalltalk.method({
  5403. selector: unescape('escaped'),
  5404. category: 'accessing',
  5405. fn: function (){
  5406. var self=this;
  5407. return escape(self);
  5408. return self;},
  5409. args: [],
  5410. source: unescape('escaped%0A%09%3Creturn%20escape%28self%29%3E'),
  5411. messageSends: [],
  5412. referencedClasses: []
  5413. }),
  5414. smalltalk.String);
  5415. smalltalk.addMethod(
  5416. unescape('_unescaped'),
  5417. smalltalk.method({
  5418. selector: unescape('unescaped'),
  5419. category: 'accessing',
  5420. fn: function (){
  5421. var self=this;
  5422. return unescape(self);
  5423. return self;},
  5424. args: [],
  5425. source: unescape('unescaped%0A%09%3Creturn%20unescape%28self%29%3E'),
  5426. messageSends: [],
  5427. referencedClasses: []
  5428. }),
  5429. smalltalk.String);
  5430. smalltalk.addMethod(
  5431. unescape('_add_'),
  5432. smalltalk.method({
  5433. selector: unescape('add%3A'),
  5434. category: 'adding',
  5435. fn: function (anObject){
  5436. var self=this;
  5437. smalltalk.send(self, "_errorReadOnly", []);
  5438. return self;},
  5439. args: ["anObject"],
  5440. source: unescape('add%3A%20anObject%0A%20%20%20%20%09self%20errorReadOnly'),
  5441. messageSends: ["errorReadOnly"],
  5442. referencedClasses: []
  5443. }),
  5444. smalltalk.String);
  5445. smalltalk.addMethod(
  5446. unescape('__comma'),
  5447. smalltalk.method({
  5448. selector: unescape('%2C'),
  5449. category: 'copying',
  5450. fn: function (aString){
  5451. var self=this;
  5452. return self + aString;
  5453. return self;},
  5454. args: ["aString"],
  5455. source: unescape('%2C%20aString%0A%09%3Creturn%20self%20+%20aString%3E'),
  5456. messageSends: [],
  5457. referencedClasses: []
  5458. }),
  5459. smalltalk.String);
  5460. smalltalk.addMethod(
  5461. unescape('_copyFrom_to_'),
  5462. smalltalk.method({
  5463. selector: unescape('copyFrom%3Ato%3A'),
  5464. category: 'copying',
  5465. fn: function (anIndex, anotherIndex){
  5466. var self=this;
  5467. return self.substring(anIndex - 1, anotherIndex);
  5468. return self;},
  5469. args: ["anIndex", "anotherIndex"],
  5470. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%3Creturn%20self.substring%28anIndex%20-%201%2C%20anotherIndex%29%3E'),
  5471. messageSends: [],
  5472. referencedClasses: []
  5473. }),
  5474. smalltalk.String);
  5475. smalltalk.addMethod(
  5476. unescape('_shallowCopy'),
  5477. smalltalk.method({
  5478. selector: unescape('shallowCopy'),
  5479. category: 'copying',
  5480. fn: function (){
  5481. var self=this;
  5482. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
  5483. return self;},
  5484. args: [],
  5485. source: unescape('shallowCopy%0A%20%20%20%20%09%5Eself%20class%20fromString%3A%20self'),
  5486. messageSends: ["fromString:", "class"],
  5487. referencedClasses: []
  5488. }),
  5489. smalltalk.String);
  5490. smalltalk.addMethod(
  5491. unescape('_deepCopy'),
  5492. smalltalk.method({
  5493. selector: unescape('deepCopy'),
  5494. category: 'copying',
  5495. fn: function (){
  5496. var self=this;
  5497. return smalltalk.send(self, "_shallowCopy", []);
  5498. return self;},
  5499. args: [],
  5500. source: unescape('deepCopy%0A%20%20%20%20%09%5Eself%20shallowCopy'),
  5501. messageSends: ["shallowCopy"],
  5502. referencedClasses: []
  5503. }),
  5504. smalltalk.String);
  5505. smalltalk.addMethod(
  5506. unescape('_asSelector'),
  5507. smalltalk.method({
  5508. selector: unescape('asSelector'),
  5509. category: 'converting',
  5510. fn: function (){
  5511. var self=this;
  5512. var selector=nil;
  5513. selector=smalltalk.send("_", "__comma", [self]);
  5514. selector=smalltalk.send(selector, "_replace_with_", [":", "_"]);
  5515. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B+%5D"), "_plus"]);
  5516. selector=smalltalk.send(selector, "_replace_with_", [unescape("-"), "_minus"]);
  5517. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B*%5D"), "_star"]);
  5518. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B/%5D"), "_slash"]);
  5519. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3E"), "_gt"]);
  5520. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3C"), "_lt"]);
  5521. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3D"), "_eq"]);
  5522. selector=smalltalk.send(selector, "_replace_with_", [unescape("%2C"), "_comma"]);
  5523. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B@%5D"), "_at"]);
  5524. return selector;
  5525. return self;},
  5526. args: [],
  5527. source: unescape('asSelector%0A%09%22If%20you%20change%20this%20method%2C%20change%20smalltalk.convertSelector%20too%20%28see%20js/boot.js%20file%29%22%0A%0A%09%7C%20selector%20%7C%0A%09selector%20%3A%3D%20%27_%27%2C%20self.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3A%27%20with%3A%20%27_%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B+%5D%27%20with%3A%20%27_plus%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27-%27%20with%3A%20%27_minus%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B*%5D%27%20with%3A%20%27_star%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B/%5D%27%20with%3A%20%27_slash%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3E%27%20with%3A%20%27_gt%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3C%27%20with%3A%20%27_lt%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%3D%27%20with%3A%20%27_eq%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%2C%27%20with%3A%20%27_comma%27.%0A%20%20%20%20%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B@%5D%27%20with%3A%20%27_at%27.%0A%09%5Eselector'),
  5528. messageSends: [unescape("%2C"), "replace:with:"],
  5529. referencedClasses: []
  5530. }),
  5531. smalltalk.String);
  5532. smalltalk.addMethod(
  5533. unescape('_asJavascript'),
  5534. smalltalk.method({
  5535. selector: unescape('asJavascript'),
  5536. category: 'converting',
  5537. fn: function (){
  5538. var self=this;
  5539. if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
  5540. return "unescape(\"" + escape(self) + "\")";
  5541. else
  5542. return "\"" + self + "\"";
  5543. ;
  5544. return self;},
  5545. args: [],
  5546. source: unescape('asJavascript%0A%09%3C%0A%09%09if%28self.search%28/%5E%5Ba-zA-Z0-9_%3A.%24%20%5D*%24/%29%20%3D%3D%20-1%29%0A%09%09%09return%20%22unescape%28%5C%22%22%20+%20escape%28self%29%20+%20%22%5C%22%29%22%3B%0A%09%09else%0A%09%09%09return%20%22%5C%22%22%20+%20self%20+%20%22%5C%22%22%3B%0A%09%3E'),
  5547. messageSends: [],
  5548. referencedClasses: []
  5549. }),
  5550. smalltalk.String);
  5551. smalltalk.addMethod(
  5552. unescape('_replace_with_'),
  5553. smalltalk.method({
  5554. selector: unescape('replace%3Awith%3A'),
  5555. category: 'regular expressions',
  5556. fn: function (aString, anotherString){
  5557. var self=this;
  5558. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
  5559. return self;},
  5560. args: ["aString", "anotherString"],
  5561. source: unescape('replace%3A%20aString%20with%3A%20anotherString%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20aString%20flag%3A%20%27g%27%29%20with%3A%20anotherString'),
  5562. messageSends: ["replaceRegexp:with:", "fromString:flag:"],
  5563. referencedClasses: [smalltalk.RegularExpression]
  5564. }),
  5565. smalltalk.String);
  5566. smalltalk.addMethod(
  5567. unescape('_replaceRegexp_with_'),
  5568. smalltalk.method({
  5569. selector: unescape('replaceRegexp%3Awith%3A'),
  5570. category: 'regular expressions',
  5571. fn: function (aRegexp, aString){
  5572. var self=this;
  5573. return self.replace(aRegexp, aString);
  5574. return self;},
  5575. args: ["aRegexp", "aString"],
  5576. source: unescape('replaceRegexp%3A%20aRegexp%20with%3A%20aString%0A%09%3Creturn%20self.replace%28aRegexp%2C%20aString%29%3E'),
  5577. messageSends: [],
  5578. referencedClasses: []
  5579. }),
  5580. smalltalk.String);
  5581. smalltalk.addMethod(
  5582. unescape('_tokenize_'),
  5583. smalltalk.method({
  5584. selector: unescape('tokenize%3A'),
  5585. category: 'converting',
  5586. fn: function (aString){
  5587. var self=this;
  5588. return self.split(aString);
  5589. return self;},
  5590. args: ["aString"],
  5591. source: unescape('tokenize%3A%20aString%0A%09%3Creturn%20self.split%28aString%29%3E'),
  5592. messageSends: [],
  5593. referencedClasses: []
  5594. }),
  5595. smalltalk.String);
  5596. smalltalk.addMethod(
  5597. unescape('_match_'),
  5598. smalltalk.method({
  5599. selector: unescape('match%3A'),
  5600. category: 'regular expressions',
  5601. fn: function (aRegexp){
  5602. var self=this;
  5603. return self.search(aRegexp) != -1;
  5604. return self;},
  5605. args: ["aRegexp"],
  5606. source: unescape('match%3A%20aRegexp%0A%09%3Creturn%20self.search%28aRegexp%29%20%21%3D%20-1%3E'),
  5607. messageSends: [],
  5608. referencedClasses: []
  5609. }),
  5610. smalltalk.String);
  5611. smalltalk.addMethod(
  5612. unescape('_asString'),
  5613. smalltalk.method({
  5614. selector: unescape('asString'),
  5615. category: 'converting',
  5616. fn: function (){
  5617. var self=this;
  5618. return self;
  5619. return self;},
  5620. args: [],
  5621. source: unescape('asString%0A%20%20%20%20%09%5Eself'),
  5622. messageSends: [],
  5623. referencedClasses: []
  5624. }),
  5625. smalltalk.String);
  5626. smalltalk.addMethod(
  5627. unescape('_asNumber'),
  5628. smalltalk.method({
  5629. selector: unescape('asNumber'),
  5630. category: 'converting',
  5631. fn: function (){
  5632. var self=this;
  5633. return Number(self);
  5634. return self;},
  5635. args: [],
  5636. source: unescape('asNumber%0A%09%3Creturn%20Number%28self%29%3E'),
  5637. messageSends: [],
  5638. referencedClasses: []
  5639. }),
  5640. smalltalk.String);
  5641. smalltalk.addMethod(
  5642. unescape('_errorReadOnly'),
  5643. smalltalk.method({
  5644. selector: unescape('errorReadOnly'),
  5645. category: 'error handling',
  5646. fn: function (){
  5647. var self=this;
  5648. smalltalk.send(self, "_error_", [unescape("Object%20is%20read-only")]);
  5649. return self;},
  5650. args: [],
  5651. source: unescape('errorReadOnly%0A%20%20%20%20%09self%20error%3A%20%27Object%20is%20read-only%27'),
  5652. messageSends: ["error:"],
  5653. referencedClasses: []
  5654. }),
  5655. smalltalk.String);
  5656. smalltalk.addMethod(
  5657. unescape('_printString'),
  5658. smalltalk.method({
  5659. selector: unescape('printString'),
  5660. category: 'printing',
  5661. fn: function (){
  5662. var self=this;
  5663. return smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [self]), "__comma", [unescape("%27")]);
  5664. return self;},
  5665. args: [],
  5666. source: unescape('printString%0A%20%20%20%20%09%5E%27%27%27%27%2C%20self%2C%20%27%27%27%27'),
  5667. messageSends: [unescape("%2C")],
  5668. referencedClasses: []
  5669. }),
  5670. smalltalk.String);
  5671. smalltalk.addMethod(
  5672. unescape('_printNl'),
  5673. smalltalk.method({
  5674. selector: unescape('printNl'),
  5675. category: 'printing',
  5676. fn: function (){
  5677. var self=this;
  5678. console.log(self);
  5679. return self;},
  5680. args: [],
  5681. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  5682. messageSends: [],
  5683. referencedClasses: []
  5684. }),
  5685. smalltalk.String);
  5686. smalltalk.addMethod(
  5687. unescape('_isString'),
  5688. smalltalk.method({
  5689. selector: unescape('isString'),
  5690. category: 'testing',
  5691. fn: function (){
  5692. var self=this;
  5693. return true;
  5694. return self;},
  5695. args: [],
  5696. source: unescape('isString%0A%20%20%20%20%09%5Etrue'),
  5697. messageSends: [],
  5698. referencedClasses: []
  5699. }),
  5700. smalltalk.String);
  5701. smalltalk.addMethod(
  5702. unescape('__gt'),
  5703. smalltalk.method({
  5704. selector: unescape('%3E'),
  5705. category: 'comparing',
  5706. fn: function (aString){
  5707. var self=this;
  5708. return String(self) > aString;
  5709. return self;},
  5710. args: ["aString"],
  5711. source: unescape('%3E%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%20aString%3E'),
  5712. messageSends: [],
  5713. referencedClasses: []
  5714. }),
  5715. smalltalk.String);
  5716. smalltalk.addMethod(
  5717. unescape('__lt'),
  5718. smalltalk.method({
  5719. selector: unescape('%3C'),
  5720. category: 'comparing',
  5721. fn: function (aString){
  5722. var self=this;
  5723. return String(self) < aString;
  5724. return self;},
  5725. args: ["aString"],
  5726. source: unescape('%3C%20aString%0A%09%3Creturn%20String%28self%29%20%3C%20aString%3E'),
  5727. messageSends: [],
  5728. referencedClasses: []
  5729. }),
  5730. smalltalk.String);
  5731. smalltalk.addMethod(
  5732. unescape('__gt_eq'),
  5733. smalltalk.method({
  5734. selector: unescape('%3E%3D'),
  5735. category: 'comparing',
  5736. fn: function (aString){
  5737. var self=this;
  5738. return String(self) >= aString;
  5739. return self;},
  5740. args: ["aString"],
  5741. source: unescape('%3E%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%3D%20aString%3E'),
  5742. messageSends: [],
  5743. referencedClasses: []
  5744. }),
  5745. smalltalk.String);
  5746. smalltalk.addMethod(
  5747. unescape('__lt_eq'),
  5748. smalltalk.method({
  5749. selector: unescape('%3C%3D'),
  5750. category: 'comparing',
  5751. fn: function (aString){
  5752. var self=this;
  5753. return String(self) <= aString;
  5754. return self;},
  5755. args: ["aString"],
  5756. source: unescape('%3C%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3C%3D%20aString%3E'),
  5757. messageSends: [],
  5758. referencedClasses: []
  5759. }),
  5760. smalltalk.String);
  5761. smalltalk.addMethod(
  5762. unescape('_remove_'),
  5763. smalltalk.method({
  5764. selector: unescape('remove%3A'),
  5765. category: 'adding',
  5766. fn: function (anObject){
  5767. var self=this;
  5768. smalltalk.send(self, "_errorReadOnly", []);
  5769. return self;},
  5770. args: ["anObject"],
  5771. source: unescape('remove%3A%20anObject%0A%09self%20errorReadOnly'),
  5772. messageSends: ["errorReadOnly"],
  5773. referencedClasses: []
  5774. }),
  5775. smalltalk.String);
  5776. smalltalk.addMethod(
  5777. unescape('_asJSONObject'),
  5778. smalltalk.method({
  5779. selector: unescape('asJSONObject'),
  5780. category: 'converting',
  5781. fn: function (){
  5782. var self=this;
  5783. return self;
  5784. return self;},
  5785. args: [],
  5786. source: unescape('asJSONObject%0A%09%5Eself'),
  5787. messageSends: [],
  5788. referencedClasses: []
  5789. }),
  5790. smalltalk.String);
  5791. smalltalk.addMethod(
  5792. unescape('_trimLeft_'),
  5793. smalltalk.method({
  5794. selector: unescape('trimLeft%3A'),
  5795. category: 'regular expressions',
  5796. fn: function (separators){
  5797. var self=this;
  5798. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5E%5B"), "__comma", [separators]), "__comma", [unescape("%5D+")]), "g"]), ""]);
  5799. return self;},
  5800. args: ["separators"],
  5801. source: unescape('trimLeft%3A%20separators%0A%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5E%5B%27%2C%20separators%2C%20%27%5D+%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
  5802. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  5803. referencedClasses: [smalltalk.RegularExpression]
  5804. }),
  5805. smalltalk.String);
  5806. smalltalk.addMethod(
  5807. unescape('_trimRight_'),
  5808. smalltalk.method({
  5809. selector: unescape('trimRight%3A'),
  5810. category: 'regular expressions',
  5811. fn: function (separators){
  5812. var self=this;
  5813. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [separators]), "__comma", [unescape("%5D+%24")]), "g"]), ""]);
  5814. return self;},
  5815. args: ["separators"],
  5816. source: unescape('trimRight%3A%20separators%0A%0A%20%20%20%20%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5B%27%2C%20separators%2C%20%27%5D+%24%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
  5817. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  5818. referencedClasses: [smalltalk.RegularExpression]
  5819. }),
  5820. smalltalk.String);
  5821. smalltalk.addMethod(
  5822. unescape('_trimLeft'),
  5823. smalltalk.method({
  5824. selector: unescape('trimLeft'),
  5825. category: 'regular expressions',
  5826. fn: function (){
  5827. var self=this;
  5828. return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
  5829. return self;},
  5830. args: [],
  5831. source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'),
  5832. messageSends: ["trimLeft:"],
  5833. referencedClasses: []
  5834. }),
  5835. smalltalk.String);
  5836. smalltalk.addMethod(
  5837. unescape('_trimRight'),
  5838. smalltalk.method({
  5839. selector: unescape('trimRight'),
  5840. category: 'regular expressions',
  5841. fn: function (){
  5842. var self=this;
  5843. return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
  5844. return self;},
  5845. args: [],
  5846. source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'),
  5847. messageSends: ["trimRight:"],
  5848. referencedClasses: []
  5849. }),
  5850. smalltalk.String);
  5851. smalltalk.addMethod(
  5852. unescape('_trimBoth'),
  5853. smalltalk.method({
  5854. selector: unescape('trimBoth'),
  5855. category: 'regular expressions',
  5856. fn: function (){
  5857. var self=this;
  5858. return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
  5859. return self;},
  5860. args: [],
  5861. source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'),
  5862. messageSends: ["trimBoth:"],
  5863. referencedClasses: []
  5864. }),
  5865. smalltalk.String);
  5866. smalltalk.addMethod(
  5867. unescape('_trimBoth_'),
  5868. smalltalk.method({
  5869. selector: unescape('trimBoth%3A'),
  5870. category: 'regular expressions',
  5871. fn: function (separators){
  5872. var self=this;
  5873. return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
  5874. return self;},
  5875. args: ["separators"],
  5876. source: unescape('trimBoth%3A%20separators%0A%0A%20%20%20%20%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators'),
  5877. messageSends: ["trimRight:", "trimLeft:"],
  5878. referencedClasses: []
  5879. }),
  5880. smalltalk.String);
  5881. smalltalk.addMethod(
  5882. unescape('_asLowercase'),
  5883. smalltalk.method({
  5884. selector: unescape('asLowercase'),
  5885. category: 'converting',
  5886. fn: function (){
  5887. var self=this;
  5888. return self.toLowerCase();
  5889. return self;},
  5890. args: [],
  5891. source: unescape('asLowercase%0A%09%3Creturn%20self.toLowerCase%28%29%3E'),
  5892. messageSends: [],
  5893. referencedClasses: []
  5894. }),
  5895. smalltalk.String);
  5896. smalltalk.addMethod(
  5897. unescape('_asUppercase'),
  5898. smalltalk.method({
  5899. selector: unescape('asUppercase'),
  5900. category: 'converting',
  5901. fn: function (){
  5902. var self=this;
  5903. return self.toUpperCase();
  5904. return self;},
  5905. args: [],
  5906. source: unescape('asUppercase%0A%09%3Creturn%20self.toUpperCase%28%29%3E'),
  5907. messageSends: [],
  5908. referencedClasses: []
  5909. }),
  5910. smalltalk.String);
  5911. smalltalk.addMethod(
  5912. unescape('_join_'),
  5913. smalltalk.method({
  5914. selector: unescape('join%3A'),
  5915. category: 'split join',
  5916. fn: function (aCollection){
  5917. var self=this;
  5918. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(each, "_asString", [])]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [self]);})]);})]);
  5919. return self;},
  5920. args: ["aCollection"],
  5921. source: unescape('join%3A%20aCollection%20%0A%09%5E%20String%0A%09%09streamContents%3A%20%5B%3Astream%20%7C%20aCollection%0A%09%09%09%09do%3A%20%5B%3Aeach%20%7C%20stream%20nextPutAll%3A%20each%20asString%5D%20%0A%09%09%09%09separatedBy%3A%20%5Bstream%20nextPutAll%3A%20self%5D%5D'),
  5922. messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
  5923. referencedClasses: [smalltalk.String]
  5924. }),
  5925. smalltalk.String);
  5926. smalltalk.addMethod(
  5927. unescape('_includesSubString_'),
  5928. smalltalk.method({
  5929. selector: unescape('includesSubString%3A'),
  5930. category: 'testing',
  5931. fn: function (subString){
  5932. var self=this;
  5933. return self.indexOf(subString) != -1 ;
  5934. return self;},
  5935. args: ["subString"],
  5936. source: unescape('includesSubString%3A%20subString%0A%09%3C%20return%20self.indexOf%28subString%29%20%21%3D%20-1%20%3E'),
  5937. messageSends: [],
  5938. referencedClasses: []
  5939. }),
  5940. smalltalk.String);
  5941. smalltalk.addMethod(
  5942. unescape('_asciiValue'),
  5943. smalltalk.method({
  5944. selector: unescape('asciiValue'),
  5945. category: 'accessing',
  5946. fn: function (){
  5947. var self=this;
  5948. return self.charCodeAt(0);;
  5949. return self;},
  5950. args: [],
  5951. source: unescape('asciiValue%0A%09%3Creturn%20self.charCodeAt%280%29%3B%3E'),
  5952. messageSends: [],
  5953. referencedClasses: []
  5954. }),
  5955. smalltalk.String);
  5956. smalltalk.addMethod(
  5957. unescape('_lineIndicesDo_'),
  5958. smalltalk.method({
  5959. selector: unescape('lineIndicesDo%3A'),
  5960. category: 'split join',
  5961. fn: function (aBlock){
  5962. var self=this;
  5963. try{var cr=nil;
  5964. var lf=nil;
  5965. var start=nil;
  5966. var sz=nil;
  5967. var nextLF=nil;
  5968. var nextCR=nil;
  5969. start=(1);
  5970. sz=smalltalk.send(self, "_size", []);
  5971. cr=smalltalk.send((smalltalk.String || String), "_cr", []);
  5972. nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]);
  5973. lf=smalltalk.send((smalltalk.String || String), "_lf", []);
  5974. nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]);
  5975. (function(){while((function(){return ((($receiver = start).klass === smalltalk.Number) ? $receiver <=sz : smalltalk.send($receiver, "__lt_eq", [sz]));})()) {(function(){((($receiver = smalltalk.send(smalltalk.send(nextLF, "__eq", [(0)]), "_and_", [(function(){return smalltalk.send(nextCR, "__eq", [(0)]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})]));return ((($receiver = smalltalk.send(smalltalk.send(nextCR, "__eq", [(0)]), "_or_", [(function(){return smalltalk.send((0) < nextLF, "_and_", [(function(){return ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver <nextCR : smalltalk.send($receiver, "__lt", [nextCR]));})]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})]));})]));})()}})();
  5976. return self;
  5977. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineIndicesDo_'){return e.fn()} throw(e)}},
  5978. args: ["aBlock"],
  5979. source: unescape('lineIndicesDo%3A%20aBlock%0A%09%22execute%20aBlock%20with%203%20arguments%20for%20each%20line%3A%0A%09-%20start%20index%20of%20line%0A%09-%20end%20index%20of%20line%20without%20line%20delimiter%0A%09-%20end%20index%20of%20line%20including%20line%20delimiter%28s%29%20CR%2C%20LF%20or%20CRLF%22%0A%09%0A%09%7C%20cr%20lf%20start%20sz%20nextLF%20nextCR%20%7C%0A%09start%20%3A%3D%201.%0A%09sz%20%3A%3D%20self%20size.%0A%09cr%20%3A%3D%20String%20cr.%0A%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%201.%0A%09lf%20%3A%3D%20String%20lf.%0A%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%201.%0A%09%5B%20start%20%3C%3D%20sz%20%5D%20whileTrue%3A%20%5B%0A%09%09%28nextLF%20%3D%200%20and%3A%20%5B%20nextCR%20%3D%200%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22No%20more%20CR%2C%20nor%20LF%2C%20the%20string%20is%20over%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20sz%20value%3A%20sz.%0A%09%09%09%09%09%5Eself%20%5D.%0A%09%09%28nextCR%20%3D%200%20or%3A%20%5B%200%20%3C%20nextLF%20and%3A%20%5B%20nextLF%20%3C%20nextCR%20%5D%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20LF%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextLF%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09ifFalse%3A%20%5B%201%20+%20nextCR%20%3D%20nextLF%0A%09%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20CR-LF%20pair%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09%09ifFalse%3A%20%5B%20%22Found%20a%20CR%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextCR.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextCR.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start%20%5D%5D%5D'),
  5980. messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", unescape("%3C%3D"), "ifTrue:", "and:", unescape("%3D"), "value:value:value:", "ifTrue:ifFalse:", "or:", unescape("%3C"), unescape("-"), unescape("+")],
  5981. referencedClasses: [smalltalk.String]
  5982. }),
  5983. smalltalk.String);
  5984. smalltalk.addMethod(
  5985. unescape('_linesDo_'),
  5986. smalltalk.method({
  5987. selector: unescape('linesDo%3A'),
  5988. category: 'split join',
  5989. fn: function (aBlock){
  5990. var self=this;
  5991. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
  5992. return self;},
  5993. args: ["aBlock"],
  5994. source: unescape('linesDo%3A%20aBlock%0A%09%22Execute%20aBlock%20with%20each%20line%20in%20this%20string.%20The%20terminating%20line%0A%09delimiters%20CR%2C%20LF%20or%20CRLF%20pairs%20are%20not%20included%20in%20what%20is%20passed%20to%20aBlock%22%0A%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09aBlock%20value%3A%20%28self%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%29%5D'),
  5995. messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
  5996. referencedClasses: []
  5997. }),
  5998. smalltalk.String);
  5999. smalltalk.addMethod(
  6000. unescape('_lines'),
  6001. smalltalk.method({
  6002. selector: unescape('lines'),
  6003. category: 'split join',
  6004. fn: function (){
  6005. var self=this;
  6006. var lines=nil;
  6007. lines=smalltalk.send((smalltalk.Array || Array), "_new", []);
  6008. smalltalk.send(self, "_linesDo_", [(function(aLine){return smalltalk.send(lines, "_add_", [aLine]);})]);
  6009. return lines;
  6010. return self;},
  6011. args: [],
  6012. source: unescape('lines%0A%09%22Answer%20an%20array%20of%20lines%20composing%20this%20receiver%20without%20the%20line%20ending%20delimiters.%22%0A%0A%09%7C%20lines%20%7C%0A%09lines%20%3A%3D%20Array%20new.%0A%09self%20linesDo%3A%20%5B%3AaLine%20%7C%20lines%20add%3A%20aLine%5D.%0A%09%5Elines'),
  6013. messageSends: ["new", "linesDo:", "add:"],
  6014. referencedClasses: [smalltalk.Array]
  6015. }),
  6016. smalltalk.String);
  6017. smalltalk.addMethod(
  6018. unescape('_lineNumber_'),
  6019. smalltalk.method({
  6020. selector: unescape('lineNumber%3A'),
  6021. category: 'split join',
  6022. fn: function (anIndex){
  6023. var self=this;
  6024. try{var lineCount=nil;
  6025. lineCount=(0);
  6026. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return ((($receiver = smalltalk.send(lineCount=((($receiver = lineCount).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])), "__eq", [anIndex])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})]));})]);
  6027. (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return nil}})})();
  6028. return self;
  6029. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineNumber_'){return e.fn()} throw(e)}},
  6030. args: ["anIndex"],
  6031. source: unescape('lineNumber%3A%20anIndex%0A%09%22Answer%20a%20string%20containing%20the%20characters%20in%20the%20given%20line%20number.%22%0A%0A%09%7C%20lineCount%20%7C%0A%09lineCount%20%3A%3D%200.%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09%28lineCount%20%3A%3D%20lineCount%20+%201%29%20%3D%20anIndex%20ifTrue%3A%20%5B%5Eself%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%5D%5D.%0A%09%5Enil'),
  6032. messageSends: ["lineIndicesDo:", "ifTrue:", unescape("%3D"), unescape("+"), "copyFrom:to:"],
  6033. referencedClasses: []
  6034. }),
  6035. smalltalk.String);
  6036. smalltalk.addMethod(
  6037. unescape('_reversed'),
  6038. smalltalk.method({
  6039. selector: unescape('reversed'),
  6040. category: 'converting',
  6041. fn: function (){
  6042. var self=this;
  6043. return self.split("").reverse().join("");
  6044. return self;},
  6045. args: [],
  6046. source: unescape('reversed%0A%09%3Creturn%20self.split%28%22%22%29.reverse%28%29.join%28%22%22%29%3E'),
  6047. messageSends: [],
  6048. referencedClasses: []
  6049. }),
  6050. smalltalk.String);
  6051. smalltalk.addMethod(
  6052. unescape('__eq_eq'),
  6053. smalltalk.method({
  6054. selector: unescape('%3D%3D'),
  6055. category: 'comparing',
  6056. fn: function (aString){
  6057. var self=this;
  6058. try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq_eq', fn: function(){return false}})})();})]));
  6059. return String(self) === String(aString);
  6060. return self;
  6061. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq_eq'){return e.fn()} throw(e)}},
  6062. args: ["aString"],
  6063. source: unescape('%3D%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%3D%20String%28aString%29%3E'),
  6064. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  6065. referencedClasses: []
  6066. }),
  6067. smalltalk.String);
  6068. smalltalk.addMethod(
  6069. unescape('_asJavaScriptSelector'),
  6070. smalltalk.method({
  6071. selector: unescape('asJavaScriptSelector'),
  6072. category: 'converting',
  6073. fn: function (){
  6074. var self=this;
  6075. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asSelector", []), "_replace_with_", [unescape("%5E_"), ""]), "_replace_with_", [unescape("_.*"), ""]);
  6076. return self;},
  6077. args: [],
  6078. source: unescape('asJavaScriptSelector%0A%09%5E%28self%20asSelector%20replace%3A%20%27%5E_%27%20with%3A%20%27%27%29%20replace%3A%20%27_.*%27%20with%3A%20%27%27.'),
  6079. messageSends: ["replace:with:", "asSelector"],
  6080. referencedClasses: []
  6081. }),
  6082. smalltalk.String);
  6083. smalltalk.addMethod(
  6084. unescape('_streamClass'),
  6085. smalltalk.method({
  6086. selector: unescape('streamClass'),
  6087. category: 'accessing',
  6088. fn: function (){
  6089. var self=this;
  6090. return (smalltalk.StringStream || StringStream);
  6091. return self;},
  6092. args: [],
  6093. source: unescape('streamClass%0A%09%20%20%20%20%5EStringStream'),
  6094. messageSends: [],
  6095. referencedClasses: [smalltalk.StringStream]
  6096. }),
  6097. smalltalk.String.klass);
  6098. smalltalk.addMethod(
  6099. unescape('_fromString_'),
  6100. smalltalk.method({
  6101. selector: unescape('fromString%3A'),
  6102. category: 'instance creation',
  6103. fn: function (aString){
  6104. var self=this;
  6105. return new self.fn(aString);
  6106. return self;},
  6107. args: ["aString"],
  6108. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%3Creturn%20new%20self.fn%28aString%29%3E'),
  6109. messageSends: [],
  6110. referencedClasses: []
  6111. }),
  6112. smalltalk.String.klass);
  6113. smalltalk.addMethod(
  6114. unescape('_cr'),
  6115. smalltalk.method({
  6116. selector: unescape('cr'),
  6117. category: 'accessing',
  6118. fn: function (){
  6119. var self=this;
  6120. return '\r';
  6121. return self;},
  6122. args: [],
  6123. source: unescape('cr%0A%09%3Creturn%20%27%5Cr%27%3E'),
  6124. messageSends: [],
  6125. referencedClasses: []
  6126. }),
  6127. smalltalk.String.klass);
  6128. smalltalk.addMethod(
  6129. unescape('_lf'),
  6130. smalltalk.method({
  6131. selector: unescape('lf'),
  6132. category: 'accessing',
  6133. fn: function (){
  6134. var self=this;
  6135. return '\n';
  6136. return self;},
  6137. args: [],
  6138. source: unescape('lf%0A%09%3Creturn%20%27%5Cn%27%3E'),
  6139. messageSends: [],
  6140. referencedClasses: []
  6141. }),
  6142. smalltalk.String.klass);
  6143. smalltalk.addMethod(
  6144. unescape('_space'),
  6145. smalltalk.method({
  6146. selector: unescape('space'),
  6147. category: 'accessing',
  6148. fn: function (){
  6149. var self=this;
  6150. return ' ';
  6151. return self;},
  6152. args: [],
  6153. source: unescape('space%0A%09%3Creturn%20%27%20%27%3E'),
  6154. messageSends: [],
  6155. referencedClasses: []
  6156. }),
  6157. smalltalk.String.klass);
  6158. smalltalk.addMethod(
  6159. unescape('_tab'),
  6160. smalltalk.method({
  6161. selector: unescape('tab'),
  6162. category: 'accessing',
  6163. fn: function (){
  6164. var self=this;
  6165. return '\t';
  6166. return self;},
  6167. args: [],
  6168. source: unescape('tab%0A%09%3Creturn%20%27%5Ct%27%3E'),
  6169. messageSends: [],
  6170. referencedClasses: []
  6171. }),
  6172. smalltalk.String.klass);
  6173. smalltalk.addMethod(
  6174. unescape('_crlf'),
  6175. smalltalk.method({
  6176. selector: unescape('crlf'),
  6177. category: 'accessing',
  6178. fn: function (){
  6179. var self=this;
  6180. return '\r\n';
  6181. return self;},
  6182. args: [],
  6183. source: unescape('crlf%0A%09%3Creturn%20%27%5Cr%5Cn%27%3E'),
  6184. messageSends: [],
  6185. referencedClasses: []
  6186. }),
  6187. smalltalk.String.klass);
  6188. smalltalk.addMethod(
  6189. unescape('_streamContents_'),
  6190. smalltalk.method({
  6191. selector: unescape('streamContents%3A'),
  6192. category: 'instance creation',
  6193. fn: function (blockWithArg){
  6194. var self=this;
  6195. var stream=nil;
  6196. stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]);
  6197. smalltalk.send(blockWithArg, "_value_", [stream]);
  6198. return smalltalk.send(stream, "_contents", []);
  6199. return self;},
  6200. args: ["blockWithArg"],
  6201. source: unescape('streamContents%3A%20blockWithArg%0A%09%7Cstream%7C%0A%09stream%20%3A%3D%20%28self%20streamClass%20on%3A%20String%20new%29.%0A%09blockWithArg%20value%3A%20stream.%0A%09%5E%20stream%20contents'),
  6202. messageSends: ["on:", "streamClass", "new", "value:", "contents"],
  6203. referencedClasses: [smalltalk.String]
  6204. }),
  6205. smalltalk.String.klass);
  6206. smalltalk.addMethod(
  6207. unescape('_value_'),
  6208. smalltalk.method({
  6209. selector: unescape('value%3A'),
  6210. category: 'instance creation',
  6211. fn: function (aUTFCharCode){
  6212. var self=this;
  6213. return String.fromCharCode(aUTFCharCode);;
  6214. return self;},
  6215. args: ["aUTFCharCode"],
  6216. source: unescape('value%3A%20aUTFCharCode%0A%0A%09%3Creturn%20String.fromCharCode%28aUTFCharCode%29%3B%3E'),
  6217. messageSends: [],
  6218. referencedClasses: []
  6219. }),
  6220. smalltalk.String.klass);
  6221. smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel');
  6222. smalltalk.addMethod(
  6223. unescape('_size'),
  6224. smalltalk.method({
  6225. selector: unescape('size'),
  6226. category: 'accessing',
  6227. fn: function (){
  6228. var self=this;
  6229. return self.length;
  6230. return self;},
  6231. args: [],
  6232. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  6233. messageSends: [],
  6234. referencedClasses: []
  6235. }),
  6236. smalltalk.Array);
  6237. smalltalk.addMethod(
  6238. unescape('_at_put_'),
  6239. smalltalk.method({
  6240. selector: unescape('at%3Aput%3A'),
  6241. category: 'accessing',
  6242. fn: function (anIndex, anObject){
  6243. var self=this;
  6244. return self[anIndex - 1] = anObject;
  6245. return self;},
  6246. args: ["anIndex", "anObject"],
  6247. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  6248. messageSends: [],
  6249. referencedClasses: []
  6250. }),
  6251. smalltalk.Array);
  6252. smalltalk.addMethod(
  6253. unescape('_at_ifAbsent_'),
  6254. smalltalk.method({
  6255. selector: unescape('at%3AifAbsent%3A'),
  6256. category: 'accessing',
  6257. fn: function (anIndex, aBlock){
  6258. var self=this;
  6259. var value = self[anIndex - 1];
  6260. if(value === undefined) {
  6261. return aBlock();
  6262. } else {
  6263. return value;
  6264. }
  6265. ;
  6266. return self;},
  6267. args: ["anIndex", "aBlock"],
  6268. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%20%20%20%20var%20value%20%3D%20self%5BanIndex%20-%201%5D%3B%0A%09%20%20%20%20if%28value%20%3D%3D%3D%20undefined%29%20%7B%0A%09%09return%20aBlock%28%29%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20value%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  6269. messageSends: [],
  6270. referencedClasses: []
  6271. }),
  6272. smalltalk.Array);
  6273. smalltalk.addMethod(
  6274. unescape('_add_'),
  6275. smalltalk.method({
  6276. selector: unescape('add%3A'),
  6277. category: 'adding/removing',
  6278. fn: function (anObject){
  6279. var self=this;
  6280. self.push(anObject); return anObject;;
  6281. return self;},
  6282. args: ["anObject"],
  6283. source: unescape('add%3A%20anObject%0A%09%3Cself.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  6284. messageSends: [],
  6285. referencedClasses: []
  6286. }),
  6287. smalltalk.Array);
  6288. smalltalk.addMethod(
  6289. unescape('_shallowCopy'),
  6290. smalltalk.method({
  6291. selector: unescape('shallowCopy'),
  6292. category: 'copying',
  6293. fn: function (){
  6294. var self=this;
  6295. var newCollection=nil;
  6296. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6297. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [each]);})]);
  6298. return newCollection;
  6299. return self;},
  6300. args: [],
  6301. source: unescape('shallowCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20newCollection%20add%3A%20each%5D.%0A%09%5EnewCollection'),
  6302. messageSends: ["new", "class", "do:", "add:"],
  6303. referencedClasses: []
  6304. }),
  6305. smalltalk.Array);
  6306. smalltalk.addMethod(
  6307. unescape('_deepCopy'),
  6308. smalltalk.method({
  6309. selector: unescape('deepCopy'),
  6310. category: 'copying',
  6311. fn: function (){
  6312. var self=this;
  6313. var newCollection=nil;
  6314. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6315. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(each, "_deepCopy", [])]);})]);
  6316. return newCollection;
  6317. return self;},
  6318. args: [],
  6319. source: unescape('deepCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20newCollection%20add%3A%20each%20deepCopy%5D.%0A%09%5EnewCollection'),
  6320. messageSends: ["new", "class", "do:", "add:", "deepCopy"],
  6321. referencedClasses: []
  6322. }),
  6323. smalltalk.Array);
  6324. smalltalk.addMethod(
  6325. unescape('_copyFrom_to_'),
  6326. smalltalk.method({
  6327. selector: unescape('copyFrom%3Ato%3A'),
  6328. category: 'copying',
  6329. fn: function (anIndex, anotherIndex){
  6330. var self=this;
  6331. var array=nil;
  6332. array=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6333. smalltalk.send(anIndex, "_to_do_", [anotherIndex, (function(each){return smalltalk.send(array, "_add_", [smalltalk.send(self, "_at_", [each])]);})]);
  6334. return array;
  6335. return self;},
  6336. args: ["anIndex", "anotherIndex"],
  6337. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%7C%20array%20%7C%0A%09array%20%3A%3D%20self%20class%20new.%0A%09anIndex%20to%3A%20anotherIndex%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20array%20add%3A%20%28self%20at%3A%20each%29%5D.%0A%09%5Earray'),
  6338. messageSends: ["new", "class", "to:do:", "add:", "at:"],
  6339. referencedClasses: []
  6340. }),
  6341. smalltalk.Array);
  6342. smalltalk.addMethod(
  6343. unescape('_join_'),
  6344. smalltalk.method({
  6345. selector: unescape('join%3A'),
  6346. category: 'enumerating',
  6347. fn: function (aString){
  6348. var self=this;
  6349. return self.join(aString);
  6350. return self;},
  6351. args: ["aString"],
  6352. source: unescape('join%3A%20aString%0A%09%3Creturn%20self.join%28aString%29%3E'),
  6353. messageSends: [],
  6354. referencedClasses: []
  6355. }),
  6356. smalltalk.Array);
  6357. smalltalk.addMethod(
  6358. unescape('_asJavascript'),
  6359. smalltalk.method({
  6360. selector: unescape('asJavascript'),
  6361. category: 'converting',
  6362. fn: function (){
  6363. var self=this;
  6364. return smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [smalltalk.send(smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJavascript", []);})]), "_join_", [unescape("%2C%20")])]), "__comma", [unescape("%5D")]);
  6365. return self;},
  6366. args: [],
  6367. source: unescape('asJavascript%0A%09%5E%27%5B%27%2C%20%28%28self%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJavascript%5D%29%20join%3A%20%27%2C%20%27%29%2C%20%20%27%5D%27'),
  6368. messageSends: [unescape("%2C"), "join:", "collect:", "asJavascript"],
  6369. referencedClasses: []
  6370. }),
  6371. smalltalk.Array);
  6372. smalltalk.addMethod(
  6373. unescape('_sort'),
  6374. smalltalk.method({
  6375. selector: unescape('sort'),
  6376. category: 'enumerating',
  6377. fn: function (){
  6378. var self=this;
  6379. return smalltalk.send(self, "_basicPerform_", ["sort"]);
  6380. return self;},
  6381. args: [],
  6382. source: unescape('sort%0A%20%20%20%20%5Eself%20basicPerform%3A%20%27sort%27'),
  6383. messageSends: ["basicPerform:"],
  6384. referencedClasses: []
  6385. }),
  6386. smalltalk.Array);
  6387. smalltalk.addMethod(
  6388. unescape('_sort_'),
  6389. smalltalk.method({
  6390. selector: unescape('sort%3A'),
  6391. category: 'enumerating',
  6392. fn: function (aBlock){
  6393. var self=this;
  6394. return self.sort(function(a, b) {
  6395. if(aBlock(a,b)) {return -1} else {return 1}
  6396. })
  6397. ;
  6398. return self;},
  6399. args: ["aBlock"],
  6400. source: unescape('sort%3A%20aBlock%0A%09%3C%0A%09%09return%20self.sort%28function%28a%2C%20b%29%20%7B%0A%09%09%09if%28aBlock%28a%2Cb%29%29%20%7Breturn%20-1%7D%20else%20%7Breturn%201%7D%0A%09%09%7D%29%0A%09%3E'),
  6401. messageSends: [],
  6402. referencedClasses: []
  6403. }),
  6404. smalltalk.Array);
  6405. smalltalk.addMethod(
  6406. unescape('_remove_'),
  6407. smalltalk.method({
  6408. selector: unescape('remove%3A'),
  6409. category: 'adding/removing',
  6410. fn: function (anObject){
  6411. var self=this;
  6412. for(var i=0;i<self.length;i++) {
  6413. if(self[i] == anObject) {
  6414. self.splice(i,1);
  6415. break;
  6416. }
  6417. }
  6418. ;
  6419. return self;},
  6420. args: ["anObject"],
  6421. source: unescape('remove%3A%20anObject%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%20%7B%0A%09%09%09if%28self%5Bi%5D%20%3D%3D%20anObject%29%20%7B%0A%09%09%09%09self.splice%28i%2C1%29%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%3E'),
  6422. messageSends: [],
  6423. referencedClasses: []
  6424. }),
  6425. smalltalk.Array);
  6426. smalltalk.addMethod(
  6427. unescape('_sorted'),
  6428. smalltalk.method({
  6429. selector: unescape('sorted'),
  6430. category: 'enumerating',
  6431. fn: function (){
  6432. var self=this;
  6433. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  6434. return self;},
  6435. args: [],
  6436. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  6437. messageSends: ["sort", "copy"],
  6438. referencedClasses: []
  6439. }),
  6440. smalltalk.Array);
  6441. smalltalk.addMethod(
  6442. unescape('_sorted_'),
  6443. smalltalk.method({
  6444. selector: unescape('sorted%3A'),
  6445. category: 'enumerating',
  6446. fn: function (aBlock){
  6447. var self=this;
  6448. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  6449. return self;},
  6450. args: ["aBlock"],
  6451. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  6452. messageSends: ["sort:", "copy"],
  6453. referencedClasses: []
  6454. }),
  6455. smalltalk.Array);
  6456. smalltalk.addMethod(
  6457. unescape('_asJSONObject'),
  6458. smalltalk.method({
  6459. selector: unescape('asJSONObject'),
  6460. category: 'converting',
  6461. fn: function (){
  6462. var self=this;
  6463. return smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJSONObject", []);})]);
  6464. return self;},
  6465. args: [],
  6466. source: unescape('asJSONObject%0A%09%5Eself%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJSONObject%5D'),
  6467. messageSends: ["collect:", "asJSONObject"],
  6468. referencedClasses: []
  6469. }),
  6470. smalltalk.Array);
  6471. smalltalk.addMethod(
  6472. unescape('_removeFrom_to_'),
  6473. smalltalk.method({
  6474. selector: unescape('removeFrom%3Ato%3A'),
  6475. category: 'adding/removing',
  6476. fn: function (aNumber, anotherNumber){
  6477. var self=this;
  6478. self.splice(aNumber - 1,anotherNumber - 1);
  6479. return self;},
  6480. args: ["aNumber", "anotherNumber"],
  6481. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  6482. messageSends: [],
  6483. referencedClasses: []
  6484. }),
  6485. smalltalk.Array);
  6486. smalltalk.addMethod(
  6487. unescape('_printString'),
  6488. smalltalk.method({
  6489. selector: unescape('printString'),
  6490. category: 'enumerating',
  6491. fn: function (){
  6492. var self=this;
  6493. var str=nil;
  6494. str=smalltalk.send("", "_writeStream", []);
  6495. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.SequenceableCollection), "__comma", [unescape("%20%28")])]);
  6496. smalltalk.send(self, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [" "]);})]);
  6497. smalltalk.send(str, "_nextPutAll_", [unescape("%29")]);
  6498. return smalltalk.send(str, "_contents", []);
  6499. return self;},
  6500. args: [],
  6501. source: unescape('printString%0A%09%7C%20str%20%7C%0A%09str%20%3A%3D%20%27%27%20writeStream.%0A%09str%20nextPutAll%3A%20super%20printString%2C%20%27%20%28%27.%0A%09self%20%0A%09%09do%3A%20%5B%3Aeach%20%7C%20str%20nextPutAll%3A%20each%20printString%5D%0A%09%09separatedBy%3A%20%5Bstr%20nextPutAll%3A%20%27%20%27%5D.%0A%09str%20nextPutAll%3A%20%27%29%27.%0A%09%5Estr%20contents'),
  6502. messageSends: ["writeStream", "nextPutAll:", unescape("%2C"), "printString", "do:separatedBy:", "contents"],
  6503. referencedClasses: []
  6504. }),
  6505. smalltalk.Array);
  6506. smalltalk.addMethod(
  6507. unescape('_reversed'),
  6508. smalltalk.method({
  6509. selector: unescape('reversed'),
  6510. category: 'converting',
  6511. fn: function (){
  6512. var self=this;
  6513. return self._copy().reverse();
  6514. return self;},
  6515. args: [],
  6516. source: unescape('reversed%0A%09%3Creturn%20self._copy%28%29.reverse%28%29%3E'),
  6517. messageSends: [],
  6518. referencedClasses: []
  6519. }),
  6520. smalltalk.Array);
  6521. smalltalk.addMethod(
  6522. unescape('__eq'),
  6523. smalltalk.method({
  6524. selector: unescape('%3D'),
  6525. category: 'comparing',
  6526. fn: function (aCollection){
  6527. var self=this;
  6528. try{((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aCollection, "_size", [])]);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  6529. smalltalk.send(self, "_withIndexDo_", [(function(each, i){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_at_", [i]), "__eq", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));})]);
  6530. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return true}})})();
  6531. return self;
  6532. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6533. args: ["aCollection"],
  6534. source: unescape('%3D%20aCollection%0A%09%28self%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%09self%20size%20%3D%20aCollection%20size%5D%29%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28aCollection%20at%3A%20i%29%20%3D%20each%20ifFalse%3A%20%5B%5Efalse%5D%5D.%0A%09%5Etrue'),
  6535. messageSends: ["ifFalse:", "and:", unescape("%3D"), "class", "size", "withIndexDo:", "at:"],
  6536. referencedClasses: []
  6537. }),
  6538. smalltalk.Array);
  6539. smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel');
  6540. smalltalk.addMethod(
  6541. unescape('_compile_'),
  6542. smalltalk.method({
  6543. selector: unescape('compile%3A'),
  6544. category: 'evaluating',
  6545. fn: function (aString){
  6546. var self=this;
  6547. return self.compile(aString);
  6548. return self;},
  6549. args: ["aString"],
  6550. source: unescape('compile%3A%20aString%0A%09%3Creturn%20self.compile%28aString%29%3E'),
  6551. messageSends: [],
  6552. referencedClasses: []
  6553. }),
  6554. smalltalk.RegularExpression);
  6555. smalltalk.addMethod(
  6556. unescape('_exec_'),
  6557. smalltalk.method({
  6558. selector: unescape('exec%3A'),
  6559. category: 'evaluating',
  6560. fn: function (aString){
  6561. var self=this;
  6562. return self.exec(aString) || nil;
  6563. return self;},
  6564. args: ["aString"],
  6565. source: unescape('exec%3A%20aString%0A%09%3Creturn%20self.exec%28aString%29%20%7C%7C%20nil%3E'),
  6566. messageSends: [],
  6567. referencedClasses: []
  6568. }),
  6569. smalltalk.RegularExpression);
  6570. smalltalk.addMethod(
  6571. unescape('_test_'),
  6572. smalltalk.method({
  6573. selector: unescape('test%3A'),
  6574. category: 'evaluating',
  6575. fn: function (aString){
  6576. var self=this;
  6577. return self.test(aString);
  6578. return self;},
  6579. args: ["aString"],
  6580. source: unescape('test%3A%20aString%0A%09%3Creturn%20self.test%28aString%29%3E'),
  6581. messageSends: [],
  6582. referencedClasses: []
  6583. }),
  6584. smalltalk.RegularExpression);
  6585. smalltalk.addMethod(
  6586. unescape('_fromString_flag_'),
  6587. smalltalk.method({
  6588. selector: unescape('fromString%3Aflag%3A'),
  6589. category: 'instance creation',
  6590. fn: function (aString, anotherString){
  6591. var self=this;
  6592. return new RegExp(aString, anotherString);
  6593. return self;},
  6594. args: ["aString", "anotherString"],
  6595. source: unescape('fromString%3A%20aString%20flag%3A%20anotherString%0A%09%3Creturn%20new%20RegExp%28aString%2C%20anotherString%29%3E'),
  6596. messageSends: [],
  6597. referencedClasses: []
  6598. }),
  6599. smalltalk.RegularExpression.klass);
  6600. smalltalk.addMethod(
  6601. unescape('_fromString_'),
  6602. smalltalk.method({
  6603. selector: unescape('fromString%3A'),
  6604. category: 'instance creation',
  6605. fn: function (aString){
  6606. var self=this;
  6607. return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
  6608. return self;},
  6609. args: ["aString"],
  6610. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%5Eself%20fromString%3A%20aString%20flag%3A%20%27%27'),
  6611. messageSends: ["fromString:flag:"],
  6612. referencedClasses: []
  6613. }),
  6614. smalltalk.RegularExpression.klass);
  6615. smalltalk.addClass('Error', smalltalk.Object, ['messageText'], 'Kernel');
  6616. smalltalk.addMethod(
  6617. unescape('_messageText'),
  6618. smalltalk.method({
  6619. selector: unescape('messageText'),
  6620. category: 'accessing',
  6621. fn: function (){
  6622. var self=this;
  6623. return self['@messageText'];
  6624. return self;},
  6625. args: [],
  6626. source: unescape('messageText%0A%09%5EmessageText'),
  6627. messageSends: [],
  6628. referencedClasses: []
  6629. }),
  6630. smalltalk.Error);
  6631. smalltalk.addMethod(
  6632. unescape('_messageText_'),
  6633. smalltalk.method({
  6634. selector: unescape('messageText%3A'),
  6635. category: 'accessing',
  6636. fn: function (aString){
  6637. var self=this;
  6638. self['@messageText']=aString;
  6639. return self;},
  6640. args: ["aString"],
  6641. source: unescape('messageText%3A%20aString%0A%09messageText%20%3A%3D%20aString'),
  6642. messageSends: [],
  6643. referencedClasses: []
  6644. }),
  6645. smalltalk.Error);
  6646. smalltalk.addMethod(
  6647. unescape('_signal'),
  6648. smalltalk.method({
  6649. selector: unescape('signal'),
  6650. category: 'signaling',
  6651. fn: function (){
  6652. var self=this;
  6653. self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
  6654. return self;},
  6655. args: [],
  6656. source: unescape('signal%0A%09%3Cself.context%20%3D%20smalltalk.getThisContext%28%29%3B%20self.smalltalkError%20%3D%20true%3B%20throw%28self%29%3E'),
  6657. messageSends: [],
  6658. referencedClasses: []
  6659. }),
  6660. smalltalk.Error);
  6661. smalltalk.addMethod(
  6662. unescape('_context'),
  6663. smalltalk.method({
  6664. selector: unescape('context'),
  6665. category: 'accessing',
  6666. fn: function (){
  6667. var self=this;
  6668. return self.context;
  6669. return self;},
  6670. args: [],
  6671. source: unescape('context%0A%09%3Creturn%20self.context%3E'),
  6672. messageSends: [],
  6673. referencedClasses: []
  6674. }),
  6675. smalltalk.Error);
  6676. smalltalk.addMethod(
  6677. unescape('_signal_'),
  6678. smalltalk.method({
  6679. selector: unescape('signal%3A'),
  6680. category: 'instance creation',
  6681. fn: function (aString){
  6682. var self=this;
  6683. return (function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send(self, "_new", []));
  6684. return self;},
  6685. args: ["aString"],
  6686. source: unescape('signal%3A%20aString%0A%09%20%20%20%20%5Eself%20new%0A%09%09messageText%3A%20aString%3B%0A%09%09signal'),
  6687. messageSends: ["messageText:", "signal", "new"],
  6688. referencedClasses: []
  6689. }),
  6690. smalltalk.Error.klass);
  6691. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel');
  6692. smalltalk.addMethod(
  6693. unescape('_receiver'),
  6694. smalltalk.method({
  6695. selector: unescape('receiver'),
  6696. category: 'accessing',
  6697. fn: function (){
  6698. var self=this;
  6699. return self.receiver;
  6700. return self;},
  6701. args: [],
  6702. source: unescape('receiver%0A%09%3Creturn%20self.receiver%3E'),
  6703. messageSends: [],
  6704. referencedClasses: []
  6705. }),
  6706. smalltalk.MethodContext);
  6707. smalltalk.addMethod(
  6708. unescape('_selector'),
  6709. smalltalk.method({
  6710. selector: unescape('selector'),
  6711. category: 'accessing',
  6712. fn: function (){
  6713. var self=this;
  6714. return smalltalk.convertSelector(self.selector);
  6715. return self;},
  6716. args: [],
  6717. source: unescape('selector%0A%09%3Creturn%20smalltalk.convertSelector%28self.selector%29%3E'),
  6718. messageSends: [],
  6719. referencedClasses: []
  6720. }),
  6721. smalltalk.MethodContext);
  6722. smalltalk.addMethod(
  6723. unescape('_home'),
  6724. smalltalk.method({
  6725. selector: unescape('home'),
  6726. category: 'accessing',
  6727. fn: function (){
  6728. var self=this;
  6729. return self.homeContext;
  6730. return self;},
  6731. args: [],
  6732. source: unescape('home%0A%09%3Creturn%20self.homeContext%3E'),
  6733. messageSends: [],
  6734. referencedClasses: []
  6735. }),
  6736. smalltalk.MethodContext);
  6737. smalltalk.addMethod(
  6738. unescape('_temps'),
  6739. smalltalk.method({
  6740. selector: unescape('temps'),
  6741. category: 'accessing',
  6742. fn: function (){
  6743. var self=this;
  6744. return self.temps;
  6745. return self;},
  6746. args: [],
  6747. source: unescape('temps%0A%09%3Creturn%20self.temps%3E'),
  6748. messageSends: [],
  6749. referencedClasses: []
  6750. }),
  6751. smalltalk.MethodContext);
  6752. smalltalk.addMethod(
  6753. unescape('_printString'),
  6754. smalltalk.method({
  6755. selector: unescape('printString'),
  6756. category: 'accessing',
  6757. fn: function (){
  6758. var self=this;
  6759. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Object), "__comma", [unescape("%28")]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%29")]);
  6760. return self;},
  6761. args: [],
  6762. source: unescape('printString%0A%09%5Esuper%20printString%2C%20%27%28%27%2C%20self%20asString%2C%20%27%29%27'),
  6763. messageSends: [unescape("%2C"), "printString", "asString"],
  6764. referencedClasses: []
  6765. }),
  6766. smalltalk.MethodContext);
  6767. smalltalk.addMethod(
  6768. unescape('_asString'),
  6769. smalltalk.method({
  6770. selector: unescape('asString'),
  6771. category: 'accessing',
  6772. fn: function (){
  6773. var self=this;
  6774. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_printString", []), "__comma", [unescape("%20%3E%3E%20")]), "__comma", [smalltalk.send(self, "_selector", [])]);
  6775. return self;},
  6776. args: [],
  6777. source: unescape('asString%0A%09%5Eself%20receiver%20class%20printString%2C%20%27%20%3E%3E%20%27%2C%20self%20selector'),
  6778. messageSends: [unescape("%2C"), "printString", "class", "receiver", "selector"],
  6779. referencedClasses: []
  6780. }),
  6781. smalltalk.MethodContext);
  6782. smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel');
  6783. smalltalk.addMethod(
  6784. unescape('__eq'),
  6785. smalltalk.method({
  6786. selector: unescape('%3D'),
  6787. category: 'comparing',
  6788. fn: function (anAssociation){
  6789. var self=this;
  6790. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(anAssociation, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_key", []), "__eq", [smalltalk.send(anAssociation, "_key", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_value", []), "__eq", [smalltalk.send(anAssociation, "_value", [])]);})]);})]);
  6791. return self;},
  6792. args: ["anAssociation"],
  6793. source: unescape('%3D%20anAssociation%0A%09%5Eself%20class%20%3D%20anAssociation%20class%20and%3A%20%5B%0A%09%20%20%20%20self%20key%20%3D%20anAssociation%20key%20and%3A%20%5B%0A%09%09self%20value%20%3D%20anAssociation%20value%5D%5D'),
  6794. messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
  6795. referencedClasses: []
  6796. }),
  6797. smalltalk.Association);
  6798. smalltalk.addMethod(
  6799. unescape('_key_'),
  6800. smalltalk.method({
  6801. selector: unescape('key%3A'),
  6802. category: 'accessing',
  6803. fn: function (aKey){
  6804. var self=this;
  6805. self['@key']=aKey;
  6806. return self;},
  6807. args: ["aKey"],
  6808. source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
  6809. messageSends: [],
  6810. referencedClasses: []
  6811. }),
  6812. smalltalk.Association);
  6813. smalltalk.addMethod(
  6814. unescape('_key'),
  6815. smalltalk.method({
  6816. selector: unescape('key'),
  6817. category: 'accessing',
  6818. fn: function (){
  6819. var self=this;
  6820. return self['@key'];
  6821. return self;},
  6822. args: [],
  6823. source: unescape('key%0A%09%5Ekey'),
  6824. messageSends: [],
  6825. referencedClasses: []
  6826. }),
  6827. smalltalk.Association);
  6828. smalltalk.addMethod(
  6829. unescape('_value_'),
  6830. smalltalk.method({
  6831. selector: unescape('value%3A'),
  6832. category: 'accessing',
  6833. fn: function (aValue){
  6834. var self=this;
  6835. self['@value']=aValue;
  6836. return self;},
  6837. args: ["aValue"],
  6838. source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
  6839. messageSends: [],
  6840. referencedClasses: []
  6841. }),
  6842. smalltalk.Association);
  6843. smalltalk.addMethod(
  6844. unescape('_value'),
  6845. smalltalk.method({
  6846. selector: unescape('value'),
  6847. category: 'accessing',
  6848. fn: function (){
  6849. var self=this;
  6850. return self['@value'];
  6851. return self;},
  6852. args: [],
  6853. source: unescape('value%0A%09%5Evalue'),
  6854. messageSends: [],
  6855. referencedClasses: []
  6856. }),
  6857. smalltalk.Association);
  6858. smalltalk.addMethod(
  6859. unescape('_storeOn_'),
  6860. smalltalk.method({
  6861. selector: unescape('storeOn%3A'),
  6862. category: 'comparing',
  6863. fn: function (aStream){
  6864. var self=this;
  6865. smalltalk.send(self['@key'], "_storeOn_", [aStream]);
  6866. smalltalk.send(aStream, "_nextPutAll_", [unescape("-%3E")]);
  6867. smalltalk.send(self['@value'], "_storeOn_", [aStream]);
  6868. return self;},
  6869. args: ["aStream"],
  6870. source: unescape('storeOn%3A%20aStream%0A%09%22Store%20in%20the%20format%20%28key-%3Evalue%29%22%0A%0A%09%22aStream%20nextPutAll%3A%20%27%28%27.%22%0A%09key%20storeOn%3A%20aStream.%0A%09aStream%20nextPutAll%3A%20%27-%3E%27.%0A%09value%20storeOn%3A%20aStream.%0A%09%22aStream%20nextPutAll%3A%20%27%29%27%22'),
  6871. messageSends: ["storeOn:", "nextPutAll:"],
  6872. referencedClasses: []
  6873. }),
  6874. smalltalk.Association);
  6875. smalltalk.addMethod(
  6876. unescape('_key_value_'),
  6877. smalltalk.method({
  6878. selector: unescape('key%3Avalue%3A'),
  6879. category: 'instance creation',
  6880. fn: function (aKey, aValue){
  6881. var self=this;
  6882. return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  6883. return self;},
  6884. args: ["aKey", "aValue"],
  6885. source: unescape('key%3A%20aKey%20value%3A%20aValue%0A%09%20%20%20%20%5Eself%20new%0A%09%09key%3A%20aKey%3B%0A%09%09value%3A%20aValue%3B%0A%09%09yourself'),
  6886. messageSends: ["key:", "value:", "yourself", "new"],
  6887. referencedClasses: []
  6888. }),
  6889. smalltalk.Association.klass);
  6890. smalltalk.addClass('Dictionary', smalltalk.Collection, ['keys'], 'Kernel');
  6891. smalltalk.addMethod(
  6892. unescape('__eq'),
  6893. smalltalk.method({
  6894. selector: unescape('%3D'),
  6895. category: 'comparing',
  6896. fn: function (aDictionary){
  6897. var self=this;
  6898. try{((($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aDictionary, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  6899. ((($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aDictionary, "_size", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  6900. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_associations", []), "__eq", [smalltalk.send(aDictionary, "_associations", [])])}})})();
  6901. return self;
  6902. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  6903. args: ["aDictionary"],
  6904. source: unescape('%3D%20aDictionary%0A%09self%20class%20%3D%20aDictionary%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20size%20%3D%20aDictionary%20size%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20associations%20%3D%20aDictionary%20associations'),
  6905. messageSends: ["ifFalse:", unescape("%3D"), "class", "size", "associations"],
  6906. referencedClasses: []
  6907. }),
  6908. smalltalk.Dictionary);
  6909. smalltalk.addMethod(
  6910. unescape('_shallowCopy'),
  6911. smalltalk.method({
  6912. selector: unescape('shallowCopy'),
  6913. category: 'copying',
  6914. fn: function (){
  6915. var self=this;
  6916. var copy=nil;
  6917. copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  6918. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  6919. return copy;
  6920. return self;},
  6921. args: [],
  6922. source: unescape('shallowCopy%0A%09%7C%20copy%20%7C%0A%09copy%20%3A%3D%20self%20class%20new.%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20copy%20at%3A%20each%20key%20%20put%3A%20each%20value%5D.%0A%09%5Ecopy'),
  6923. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
  6924. referencedClasses: []
  6925. }),
  6926. smalltalk.Dictionary);
  6927. smalltalk.addMethod(
  6928. unescape('_initialize'),
  6929. smalltalk.method({
  6930. selector: unescape('initialize'),
  6931. category: 'initialization',
  6932. fn: function (){
  6933. var self=this;
  6934. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  6935. self['@keys']=[];
  6936. return self;},
  6937. args: [],
  6938. source: unescape('initialize%0A%20%20%20%20%09super%20initialize.%0A%20%20%20%20%09keys%20%3A%3D%20%23%28%29'),
  6939. messageSends: ["initialize"],
  6940. referencedClasses: []
  6941. }),
  6942. smalltalk.Dictionary);
  6943. smalltalk.addMethod(
  6944. unescape('_size'),
  6945. smalltalk.method({
  6946. selector: unescape('size'),
  6947. category: 'accessing',
  6948. fn: function (){
  6949. var self=this;
  6950. return smalltalk.send(self['@keys'], "_size", []);
  6951. return self;},
  6952. args: [],
  6953. source: unescape('size%0A%09%5Ekeys%20size'),
  6954. messageSends: ["size"],
  6955. referencedClasses: []
  6956. }),
  6957. smalltalk.Dictionary);
  6958. smalltalk.addMethod(
  6959. unescape('_associations'),
  6960. smalltalk.method({
  6961. selector: unescape('associations'),
  6962. category: 'accessing',
  6963. fn: function (){
  6964. var self=this;
  6965. var associations=nil;
  6966. associations=[];
  6967. smalltalk.send(self['@keys'], "_do_", [(function(each){return smalltalk.send(associations, "_add_", [smalltalk.send((smalltalk.Association || Association), "_key_value_", [each, smalltalk.send(self, "_at_", [each])])]);})]);
  6968. return associations;
  6969. return self;},
  6970. args: [],
  6971. source: unescape('associations%0A%09%7C%20associations%20%7C%0A%09associations%20%3A%3D%20%23%28%29.%0A%09keys%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20associations%20add%3A%20%28Association%20key%3A%20each%20value%3A%20%28self%20at%3A%20each%29%29%5D.%0A%09%5Eassociations'),
  6972. messageSends: ["do:", "add:", "key:value:", "at:"],
  6973. referencedClasses: [smalltalk.Association]
  6974. }),
  6975. smalltalk.Dictionary);
  6976. smalltalk.addMethod(
  6977. unescape('_keys'),
  6978. smalltalk.method({
  6979. selector: unescape('keys'),
  6980. category: 'accessing',
  6981. fn: function (){
  6982. var self=this;
  6983. return smalltalk.send(self['@keys'], "_copy", []);
  6984. return self;},
  6985. args: [],
  6986. source: unescape('keys%0A%09%5Ekeys%20copy'),
  6987. messageSends: ["copy"],
  6988. referencedClasses: []
  6989. }),
  6990. smalltalk.Dictionary);
  6991. smalltalk.addMethod(
  6992. unescape('_values'),
  6993. smalltalk.method({
  6994. selector: unescape('values'),
  6995. category: 'accessing',
  6996. fn: function (){
  6997. var self=this;
  6998. return smalltalk.send(self['@keys'], "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
  6999. return self;},
  7000. args: [],
  7001. source: unescape('values%0A%20%20%20%20%09%5Ekeys%20collect%3A%20%5B%3Aeach%20%7C%20self%20at%3A%20each%5D'),
  7002. messageSends: ["collect:", "at:"],
  7003. referencedClasses: []
  7004. }),
  7005. smalltalk.Dictionary);
  7006. smalltalk.addMethod(
  7007. unescape('_at_put_'),
  7008. smalltalk.method({
  7009. selector: unescape('at%3Aput%3A'),
  7010. category: 'accessing',
  7011. fn: function (aKey, aValue){
  7012. var self=this;
  7013. ((($receiver = smalltalk.send(self['@keys'], "_includes_", [aKey])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self['@keys'], "_add_", [aKey]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self['@keys'], "_add_", [aKey]);})]));
  7014. return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
  7015. return self;},
  7016. args: ["aKey", "aValue"],
  7017. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%28keys%20includes%3A%20aKey%29%20ifFalse%3A%20%5Bkeys%20add%3A%20aKey%5D.%0A%09%5Eself%20basicAt%3A%20aKey%20put%3A%20aValue'),
  7018. messageSends: ["ifFalse:", "includes:", "add:", "basicAt:put:"],
  7019. referencedClasses: []
  7020. }),
  7021. smalltalk.Dictionary);
  7022. smalltalk.addMethod(
  7023. unescape('_at_ifAbsent_'),
  7024. smalltalk.method({
  7025. selector: unescape('at%3AifAbsent%3A'),
  7026. category: 'accessing',
  7027. fn: function (aKey, aBlock){
  7028. var self=this;
  7029. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_keys", []), "_includes_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
  7030. return self;},
  7031. args: ["aKey", "aBlock"],
  7032. source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20keys%20includes%3A%20aKey%29%0A%09%09ifTrue%3A%20%5Bself%20basicAt%3A%20aKey%5D%0A%09%09ifFalse%3A%20aBlock'),
  7033. messageSends: ["ifTrue:ifFalse:", "includes:", "keys", "basicAt:"],
  7034. referencedClasses: []
  7035. }),
  7036. smalltalk.Dictionary);
  7037. smalltalk.addMethod(
  7038. unescape('_at_ifAbsentPut_'),
  7039. smalltalk.method({
  7040. selector: unescape('at%3AifAbsentPut%3A'),
  7041. category: 'accessing',
  7042. fn: function (aKey, aBlock){
  7043. var self=this;
  7044. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
  7045. return self;},
  7046. args: ["aKey", "aBlock"],
  7047. source: unescape('at%3A%20aKey%20ifAbsentPut%3A%20aBlock%0A%20%20%20%20%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5B%0A%20%20%20%20%09%20%20%20%20self%20at%3A%20aKey%20put%3A%20aBlock%20value%5D'),
  7048. messageSends: ["at:ifAbsent:", "at:put:", "value"],
  7049. referencedClasses: []
  7050. }),
  7051. smalltalk.Dictionary);
  7052. smalltalk.addMethod(
  7053. unescape('_at_ifPresent_'),
  7054. smalltalk.method({
  7055. selector: unescape('at%3AifPresent%3A'),
  7056. category: 'accessing',
  7057. fn: function (aKey, aBlock){
  7058. var self=this;
  7059. return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
  7060. return self;},
  7061. args: ["aKey", "aBlock"],
  7062. source: unescape('at%3A%20aKey%20ifPresent%3A%20aBlock%0A%09%5E%28self%20basicAt%3A%20aKey%29%20ifNotNil%3A%20%5BaBlock%20value%3A%20%28self%20at%3A%20aKey%29%5D'),
  7063. messageSends: ["ifNotNil:", "basicAt:", "value:", "at:"],
  7064. referencedClasses: []
  7065. }),
  7066. smalltalk.Dictionary);
  7067. smalltalk.addMethod(
  7068. unescape('_at_ifPresent_ifAbsent_'),
  7069. smalltalk.method({
  7070. selector: unescape('at%3AifPresent%3AifAbsent%3A'),
  7071. category: 'accessing',
  7072. fn: function (aKey, aBlock, anotherBlock){
  7073. var self=this;
  7074. return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
  7075. return self;},
  7076. args: ["aKey", "aBlock", "anotherBlock"],
  7077. source: unescape('at%3A%20aKey%20ifPresent%3A%20aBlock%20ifAbsent%3A%20anotherBlock%0A%09%5E%28self%20basicAt%3A%20aKey%29%0A%09%20%20%20%20ifNil%3A%20anotherBlock%0A%09%20%20%20%20ifNotNil%3A%20%5BaBlock%20value%3A%20%28self%20at%3A%20aKey%29%5D'),
  7078. messageSends: ["ifNil:ifNotNil:", "basicAt:", "value:", "at:"],
  7079. referencedClasses: []
  7080. }),
  7081. smalltalk.Dictionary);
  7082. smalltalk.addMethod(
  7083. unescape('_add_'),
  7084. smalltalk.method({
  7085. selector: unescape('add%3A'),
  7086. category: 'adding/removing',
  7087. fn: function (anAssociation){
  7088. var self=this;
  7089. smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
  7090. return self;},
  7091. args: ["anAssociation"],
  7092. source: unescape('add%3A%20anAssociation%0A%20%20%20%20%09self%20at%3A%20anAssociation%20key%20put%3A%20anAssociation%20value'),
  7093. messageSends: ["at:put:", "key", "value"],
  7094. referencedClasses: []
  7095. }),
  7096. smalltalk.Dictionary);
  7097. smalltalk.addMethod(
  7098. unescape('_addAll_'),
  7099. smalltalk.method({
  7100. selector: unescape('addAll%3A'),
  7101. category: 'adding/removing',
  7102. fn: function (aDictionary){
  7103. var self=this;
  7104. smalltalk.send(self, "_addAll_", [smalltalk.send(aDictionary, "_associations", [])], smalltalk.Collection);
  7105. return aDictionary;
  7106. return self;},
  7107. args: ["aDictionary"],
  7108. source: unescape('addAll%3A%20aDictionary%0A%20%20%20%20%09super%20addAll%3A%20aDictionary%20associations.%0A%20%20%20%20%09%5EaDictionary'),
  7109. messageSends: ["addAll:", "associations"],
  7110. referencedClasses: []
  7111. }),
  7112. smalltalk.Dictionary);
  7113. smalltalk.addMethod(
  7114. unescape('__comma'),
  7115. smalltalk.method({
  7116. selector: unescape('%2C'),
  7117. category: 'copying',
  7118. fn: function (aCollection){
  7119. var self=this;
  7120. smalltalk.send(self, "_shouldNotImplement", []);
  7121. return self;},
  7122. args: ["aCollection"],
  7123. source: unescape('%2C%20aCollection%0A%09self%20shouldNotImplement'),
  7124. messageSends: ["shouldNotImplement"],
  7125. referencedClasses: []
  7126. }),
  7127. smalltalk.Dictionary);
  7128. smalltalk.addMethod(
  7129. unescape('_copyFrom_to_'),
  7130. smalltalk.method({
  7131. selector: unescape('copyFrom%3Ato%3A'),
  7132. category: 'copying',
  7133. fn: function (anIndex, anotherIndex){
  7134. var self=this;
  7135. smalltalk.send(self, "_shouldNotImplement", []);
  7136. return self;},
  7137. args: ["anIndex", "anotherIndex"],
  7138. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20shouldNotImplement'),
  7139. messageSends: ["shouldNotImplement"],
  7140. referencedClasses: []
  7141. }),
  7142. smalltalk.Dictionary);
  7143. smalltalk.addMethod(
  7144. unescape('_associationsDo_'),
  7145. smalltalk.method({
  7146. selector: unescape('associationsDo%3A'),
  7147. category: 'enumerating',
  7148. fn: function (aBlock){
  7149. var self=this;
  7150. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
  7151. return self;},
  7152. args: ["aBlock"],
  7153. source: unescape('associationsDo%3A%20aBlock%0A%20%20%20%20%09self%20associations%20do%3A%20aBlock'),
  7154. messageSends: ["do:", "associations"],
  7155. referencedClasses: []
  7156. }),
  7157. smalltalk.Dictionary);
  7158. smalltalk.addMethod(
  7159. unescape('_keysAndValuesDo_'),
  7160. smalltalk.method({
  7161. selector: unescape('keysAndValuesDo%3A'),
  7162. category: 'enumerating',
  7163. fn: function (aBlock){
  7164. var self=this;
  7165. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  7166. return self;},
  7167. args: ["aBlock"],
  7168. source: unescape('keysAndValuesDo%3A%20aBlock%0A%20%20%20%20%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%20%20%20%20%09%20%20%20%20aBlock%20value%3A%20each%20key%20value%3A%20each%20value%5D'),
  7169. messageSends: ["associationsDo:", "value:value:", "key", "value"],
  7170. referencedClasses: []
  7171. }),
  7172. smalltalk.Dictionary);
  7173. smalltalk.addMethod(
  7174. unescape('_do_'),
  7175. smalltalk.method({
  7176. selector: unescape('do%3A'),
  7177. category: 'enumerating',
  7178. fn: function (aBlock){
  7179. var self=this;
  7180. smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
  7181. return self;},
  7182. args: ["aBlock"],
  7183. source: unescape('do%3A%20aBlock%0A%20%20%20%20%09self%20values%20do%3A%20aBlock'),
  7184. messageSends: ["do:", "values"],
  7185. referencedClasses: []
  7186. }),
  7187. smalltalk.Dictionary);
  7188. smalltalk.addMethod(
  7189. unescape('_select_'),
  7190. smalltalk.method({
  7191. selector: unescape('select%3A'),
  7192. category: 'enumerating',
  7193. fn: function (aBlock){
  7194. var self=this;
  7195. var newDict=nil;
  7196. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  7197. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return ((($receiver = smalltalk.send(aBlock, "_value_", [value])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})]));})]);
  7198. return newDict;
  7199. return self;},
  7200. args: ["aBlock"],
  7201. source: unescape('select%3A%20aBlock%0A%20%20%20%20%09%7C%20newDict%20%7C%0A%20%20%20%20%09newDict%20%3A%3D%20self%20class%20new.%0A%20%20%20%20%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%20%20%20%20%09%20%20%20%20%28aBlock%20value%3A%20value%29%20ifTrue%3A%20%5BnewDict%20at%3A%20key%20put%3A%20value%5D%5D.%0A%20%20%20%20%09%5EnewDict'),
  7202. messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
  7203. referencedClasses: []
  7204. }),
  7205. smalltalk.Dictionary);
  7206. smalltalk.addMethod(
  7207. unescape('_collect_'),
  7208. smalltalk.method({
  7209. selector: unescape('collect%3A'),
  7210. category: 'enumerating',
  7211. fn: function (aBlock){
  7212. var self=this;
  7213. var newDict=nil;
  7214. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  7215. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(newDict, "_at_put_", [key, smalltalk.send(aBlock, "_value_", [value])]);})]);
  7216. return newDict;
  7217. return self;},
  7218. args: ["aBlock"],
  7219. source: unescape('collect%3A%20aBlock%0A%20%20%20%20%09%7C%20newDict%20%7C%0A%20%20%20%20%09newDict%20%3A%3D%20self%20class%20new.%0A%20%20%20%20%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%20%20%20%20%09%20%20%20%20newDict%20at%3A%20key%20put%3A%20%28aBlock%20value%3A%20value%29%5D.%0A%20%20%20%20%09%5EnewDict'),
  7220. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
  7221. referencedClasses: []
  7222. }),
  7223. smalltalk.Dictionary);
  7224. smalltalk.addMethod(
  7225. unescape('_detect_ifNone_'),
  7226. smalltalk.method({
  7227. selector: unescape('detect%3AifNone%3A'),
  7228. category: 'enumerating',
  7229. fn: function (aBlock, anotherBlock){
  7230. var self=this;
  7231. return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
  7232. return self;},
  7233. args: ["aBlock", "anotherBlock"],
  7234. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eself%20values%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  7235. messageSends: ["detect:ifNone:", "values"],
  7236. referencedClasses: []
  7237. }),
  7238. smalltalk.Dictionary);
  7239. smalltalk.addMethod(
  7240. unescape('_includes_'),
  7241. smalltalk.method({
  7242. selector: unescape('includes%3A'),
  7243. category: 'enumerating',
  7244. fn: function (anObject){
  7245. var self=this;
  7246. return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
  7247. return self;},
  7248. args: ["anObject"],
  7249. source: unescape('includes%3A%20anObject%0A%09%5Eself%20values%20includes%3A%20anObject'),
  7250. messageSends: ["includes:", "values"],
  7251. referencedClasses: []
  7252. }),
  7253. smalltalk.Dictionary);
  7254. smalltalk.addMethod(
  7255. unescape('_remove_'),
  7256. smalltalk.method({
  7257. selector: unescape('remove%3A'),
  7258. category: 'adding/removing',
  7259. fn: function (aKey){
  7260. var self=this;
  7261. smalltalk.send(self, "_removeKey_", [aKey]);
  7262. return self;},
  7263. args: ["aKey"],
  7264. source: unescape('remove%3A%20aKey%0A%20%20%20%20self%20removeKey%3A%20aKey'),
  7265. messageSends: ["removeKey:"],
  7266. referencedClasses: []
  7267. }),
  7268. smalltalk.Dictionary);
  7269. smalltalk.addMethod(
  7270. unescape('_removeKey_'),
  7271. smalltalk.method({
  7272. selector: unescape('removeKey%3A'),
  7273. category: 'adding/removing',
  7274. fn: function (aKey){
  7275. var self=this;
  7276. smalltalk.send(self['@keys'], "_remove_", [aKey]);
  7277. return self;},
  7278. args: ["aKey"],
  7279. source: unescape('removeKey%3A%20aKey%0A%20%20%20%20keys%20remove%3A%20aKey'),
  7280. messageSends: ["remove:"],
  7281. referencedClasses: []
  7282. }),
  7283. smalltalk.Dictionary);
  7284. smalltalk.addMethod(
  7285. unescape('_at_'),
  7286. smalltalk.method({
  7287. selector: unescape('at%3A'),
  7288. category: 'accessing',
  7289. fn: function (aKey){
  7290. var self=this;
  7291. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  7292. return self;},
  7293. args: ["aKey"],
  7294. source: unescape('at%3A%20aKey%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  7295. messageSends: ["at:ifAbsent:", "errorNotFound"],
  7296. referencedClasses: []
  7297. }),
  7298. smalltalk.Dictionary);
  7299. smalltalk.addMethod(
  7300. unescape('_asJSONObject'),
  7301. smalltalk.method({
  7302. selector: unescape('asJSONObject'),
  7303. category: 'converting',
  7304. fn: function (){
  7305. var self=this;
  7306. var object=nil;
  7307. object=smalltalk.send((smalltalk.Object || Object), "_new", []);
  7308. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(object, "_basicAt_put_", [key, smalltalk.send(value, "_asJSONObject", [])]);})]);
  7309. return object;
  7310. return self;},
  7311. args: [],
  7312. source: unescape('asJSONObject%0A%09%7C%20object%20%7C%0A%09object%20%3A%3D%20Object%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%09object%20basicAt%3A%20key%20put%3A%20value%20asJSONObject%5D.%0A%09%5Eobject'),
  7313. messageSends: ["new", "keysAndValuesDo:", "basicAt:put:", "asJSONObject"],
  7314. referencedClasses: [smalltalk.Object]
  7315. }),
  7316. smalltalk.Dictionary);
  7317. smalltalk.addMethod(
  7318. unescape('_printString'),
  7319. smalltalk.method({
  7320. selector: unescape('printString'),
  7321. category: 'printing',
  7322. fn: function (){
  7323. var self=this;
  7324. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Collection)]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);})(aStream);smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(anAssociation){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_key", []), "_printString", [])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%20-%3E%20")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_value", []), "_printString", [])]);})(aStream);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%20%2C%20")]);})]);return smalltalk.send(aStream, "_nextPutAll_", [unescape("%29")]);})]);
  7325. return self;},
  7326. args: [],
  7327. source: unescape('printString%0A%09%5E%20String%20streamContents%3A%20%5B%3AaStream%7C%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09aStream%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09nextPutAll%3A%20super%20printString%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09nextPutAll%3A%20%27%28%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09self%20associations%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09do%3A%20%5B%3AanAssociation%7C%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09aStream%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09nextPutAll%3A%20anAssociation%20key%20printString%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09nextPutAll%3A%20%27%20-%3E%20%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09nextPutAll%3A%20anAssociation%20value%20printString%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%2C%20%27%5D.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09aStream%20nextPutAll%3A%20%27%29%27.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D'),
  7328. messageSends: ["streamContents:", "nextPutAll:", "printString", "do:separatedBy:", "associations", "key", "value"],
  7329. referencedClasses: [smalltalk.String]
  7330. }),
  7331. smalltalk.Dictionary);
  7332. smalltalk.addMethod(
  7333. unescape('_storeOn_'),
  7334. smalltalk.method({
  7335. selector: unescape('storeOn%3A'),
  7336. category: 'printing',
  7337. fn: function (aStream){
  7338. var self=this;
  7339. smalltalk.send(aStream, "_nextPutAll_", [unescape("%23%7B")]);
  7340. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(each){return smalltalk.send(each, "_storeOn_", [aStream]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [". "]);})]);
  7341. smalltalk.send(aStream, "_nextPutAll_", [unescape("%7D")]);
  7342. return self;},
  7343. args: ["aStream"],
  7344. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20%27%23%7B%27.%0A%09self%20associations%0A%09%09do%3A%20%5B%3Aeach%20%7C%20each%20storeOn%3A%20aStream%5D%0A%09%09separatedBy%3A%20%5B%20aStream%20nextPutAll%3A%20%27.%20%27%5D.%0A%09aStream%20nextPutAll%3A%20%27%7D%27'),
  7345. messageSends: ["nextPutAll:", "do:separatedBy:", "associations", "storeOn:"],
  7346. referencedClasses: []
  7347. }),
  7348. smalltalk.Dictionary);
  7349. smalltalk.addMethod(
  7350. unescape('_fromPairs_'),
  7351. smalltalk.method({
  7352. selector: unescape('fromPairs%3A'),
  7353. category: 'instance creation',
  7354. fn: function (aCollection){
  7355. var self=this;
  7356. var dict=nil;
  7357. dict=smalltalk.send(self, "_new", []);
  7358. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(dict, "_add_", [each]);})]);
  7359. return dict;
  7360. return self;},
  7361. args: ["aCollection"],
  7362. source: unescape('fromPairs%3A%20aCollection%0A%09%7C%20dict%20%7C%0A%09dict%20%3A%3D%20self%20new.%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%20dict%20add%3A%20each%5D.%0A%09%5Edict'),
  7363. messageSends: ["new", "do:", "add:"],
  7364. referencedClasses: []
  7365. }),
  7366. smalltalk.Dictionary.klass);
  7367. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel');
  7368. smalltalk.addMethod(
  7369. unescape('_superclass_subclass_'),
  7370. smalltalk.method({
  7371. selector: unescape('superclass%3Asubclass%3A'),
  7372. category: 'class creation',
  7373. fn: function (aClass, aString){
  7374. var self=this;
  7375. return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
  7376. return self;},
  7377. args: ["aClass", "aString"],
  7378. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%0A%09%5Eself%20superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20%27%27%20package%3A%20nil'),
  7379. messageSends: ["superclass:subclass:instanceVariableNames:package:"],
  7380. referencedClasses: []
  7381. }),
  7382. smalltalk.ClassBuilder);
  7383. smalltalk.addMethod(
  7384. unescape('_class_instanceVariableNames_'),
  7385. smalltalk.method({
  7386. selector: unescape('class%3AinstanceVariableNames%3A'),
  7387. category: 'class creation',
  7388. fn: function (aClass, aString){
  7389. var self=this;
  7390. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})]));
  7391. smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
  7392. smalltalk.send(self, "_setupClass_", [aClass]);
  7393. return self;},
  7394. args: ["aClass", "aString"],
  7395. source: unescape('class%3A%20aClass%20instanceVariableNames%3A%20aString%0A%09aClass%20isMetaclass%20ifFalse%3A%20%5Bself%20error%3A%20aClass%20name%2C%20%27%20is%20not%20a%20metaclass%27%5D.%0A%09aClass%20basicAt%3A%20%27iVarNames%27%20put%3A%20%28self%20instanceVariableNamesFor%3A%20aString%29.%0A%09self%20setupClass%3A%20aClass'),
  7396. messageSends: ["ifFalse:", "isMetaclass", "error:", unescape("%2C"), "name", "basicAt:put:", "instanceVariableNamesFor:", "setupClass:"],
  7397. referencedClasses: []
  7398. }),
  7399. smalltalk.ClassBuilder);
  7400. smalltalk.addMethod(
  7401. unescape('_instanceVariableNamesFor_'),
  7402. smalltalk.method({
  7403. selector: unescape('instanceVariableNamesFor%3A'),
  7404. category: 'private',
  7405. fn: function (aString){
  7406. var self=this;
  7407. return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
  7408. return self;},
  7409. args: ["aString"],
  7410. source: unescape('instanceVariableNamesFor%3A%20aString%0A%09%5E%28aString%20tokenize%3A%20%27%20%27%29%20reject%3A%20%5B%3Aeach%20%7C%20each%20isEmpty%5D'),
  7411. messageSends: ["reject:", "tokenize:", "isEmpty"],
  7412. referencedClasses: []
  7413. }),
  7414. smalltalk.ClassBuilder);
  7415. smalltalk.addMethod(
  7416. unescape('_addSubclassOf_named_instanceVariableNames_'),
  7417. smalltalk.method({
  7418. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
  7419. category: 'private',
  7420. fn: function (aClass, aString, aCollection){
  7421. var self=this;
  7422. smalltalk.addClass(aString, aClass, aCollection);
  7423. return smalltalk[aString];
  7424. return self;},
  7425. args: ["aClass", "aString", "aCollection"],
  7426. source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
  7427. messageSends: [],
  7428. referencedClasses: []
  7429. }),
  7430. smalltalk.ClassBuilder);
  7431. smalltalk.addMethod(
  7432. unescape('_setupClass_'),
  7433. smalltalk.method({
  7434. selector: unescape('setupClass%3A'),
  7435. category: 'private',
  7436. fn: function (aClass){
  7437. var self=this;
  7438. smalltalk.init(aClass);;
  7439. return self;},
  7440. args: ["aClass"],
  7441. source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
  7442. messageSends: [],
  7443. referencedClasses: []
  7444. }),
  7445. smalltalk.ClassBuilder);
  7446. smalltalk.addMethod(
  7447. unescape('_superclass_subclass_instanceVariableNames_package_'),
  7448. smalltalk.method({
  7449. selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
  7450. category: 'class creation',
  7451. fn: function (aClass, aString, aString2, aString3){
  7452. var self=this;
  7453. var newClass=nil;
  7454. newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]);
  7455. smalltalk.send(self, "_setupClass_", [newClass]);
  7456. return newClass;
  7457. return self;},
  7458. args: ["aClass", "aString", "aString2", "aString3"],
  7459. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%7C%20newClass%20%7C%0A%09newClass%20%3A%3D%20self%20addSubclassOf%3A%20aClass%0A%09%09%09%09named%3A%20aString%20instanceVariableNames%3A%20%28self%20instanceVariableNamesFor%3A%20aString2%29%0A%09%09%09%09package%3A%20%28aString3%20ifNil%3A%20%5B%27unclassified%27%5D%29.%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
  7460. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "instanceVariableNamesFor:", "ifNil:", "setupClass:"],
  7461. referencedClasses: []
  7462. }),
  7463. smalltalk.ClassBuilder);
  7464. smalltalk.addMethod(
  7465. unescape('_addSubclassOf_named_instanceVariableNames_package_'),
  7466. smalltalk.method({
  7467. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
  7468. category: 'private',
  7469. fn: function (aClass, aString, aCollection, packageName){
  7470. var self=this;
  7471. smalltalk.addClass(aString, aClass, aCollection, packageName);
  7472. return smalltalk[aString];
  7473. return self;},
  7474. args: ["aClass", "aString", "aCollection", "packageName"],
  7475. source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%20package%3A%20packageName%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%2C%20packageName%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
  7476. messageSends: [],
  7477. referencedClasses: []
  7478. }),
  7479. smalltalk.ClassBuilder);
  7480. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel');
  7481. smalltalk.addMethod(
  7482. unescape('_initialize'),
  7483. smalltalk.method({
  7484. selector: unescape('initialize'),
  7485. category: 'initialization',
  7486. fn: function (){
  7487. var self=this;
  7488. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  7489. self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []);
  7490. return self;},
  7491. args: [],
  7492. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  7493. messageSends: ["initialize", "new"],
  7494. referencedClasses: [smalltalk.ChunkParser]
  7495. }),
  7496. smalltalk.ClassCategoryReader);
  7497. smalltalk.addMethod(
  7498. unescape('_class_category_'),
  7499. smalltalk.method({
  7500. selector: unescape('class%3Acategory%3A'),
  7501. category: 'accessing',
  7502. fn: function (aClass, aString){
  7503. var self=this;
  7504. self['@class']=aClass;
  7505. self['@category']=aString;
  7506. return self;},
  7507. args: ["aClass", "aString"],
  7508. source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
  7509. messageSends: [],
  7510. referencedClasses: []
  7511. }),
  7512. smalltalk.ClassCategoryReader);
  7513. smalltalk.addMethod(
  7514. unescape('_scanFrom_'),
  7515. smalltalk.method({
  7516. selector: unescape('scanFrom%3A'),
  7517. category: 'fileIn',
  7518. fn: function (aChunkParser){
  7519. var self=this;
  7520. var chunk=nil;
  7521. (function(){while(!(function(){chunk=smalltalk.send(aChunkParser, "_nextChunk", []);return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
  7522. return self;},
  7523. args: ["aChunkParser"],
  7524. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09%5Bchunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20self%20compileMethod%3A%20chunk%5D'),
  7525. messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:"],
  7526. referencedClasses: []
  7527. }),
  7528. smalltalk.ClassCategoryReader);
  7529. smalltalk.addMethod(
  7530. unescape('_compileMethod_'),
  7531. smalltalk.method({
  7532. selector: unescape('compileMethod%3A'),
  7533. category: 'private',
  7534. fn: function (aString){
  7535. var self=this;
  7536. var method=nil;
  7537. method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self['@class']]);
  7538. smalltalk.send(method, "_category_", [self['@category']]);
  7539. smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
  7540. return self;},
  7541. args: ["aString"],
  7542. source: unescape('compileMethod%3A%20aString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20class.%0A%09method%20category%3A%20category.%0A%09class%20addCompiledMethod%3A%20method'),
  7543. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  7544. referencedClasses: [smalltalk.Compiler]
  7545. }),
  7546. smalltalk.ClassCategoryReader);
  7547. smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel');
  7548. smalltalk.addMethod(
  7549. unescape('_collection'),
  7550. smalltalk.method({
  7551. selector: unescape('collection'),
  7552. category: 'accessing',
  7553. fn: function (){
  7554. var self=this;
  7555. return self['@collection'];
  7556. return self;},
  7557. args: [],
  7558. source: unescape('collection%0A%09%5Ecollection'),
  7559. messageSends: [],
  7560. referencedClasses: []
  7561. }),
  7562. smalltalk.Stream);
  7563. smalltalk.addMethod(
  7564. unescape('_setCollection_'),
  7565. smalltalk.method({
  7566. selector: unescape('setCollection%3A'),
  7567. category: 'accessing',
  7568. fn: function (aCollection){
  7569. var self=this;
  7570. self['@collection']=aCollection;
  7571. return self;},
  7572. args: ["aCollection"],
  7573. source: unescape('setCollection%3A%20aCollection%0A%09collection%20%3A%3D%20aCollection'),
  7574. messageSends: [],
  7575. referencedClasses: []
  7576. }),
  7577. smalltalk.Stream);
  7578. smalltalk.addMethod(
  7579. unescape('_position'),
  7580. smalltalk.method({
  7581. selector: unescape('position'),
  7582. category: 'accessing',
  7583. fn: function (){
  7584. var self=this;
  7585. return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return self['@position']=(0);})() : $receiver;
  7586. return self;},
  7587. args: [],
  7588. source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5Bposition%20%3A%3D%200%5D'),
  7589. messageSends: ["ifNil:"],
  7590. referencedClasses: []
  7591. }),
  7592. smalltalk.Stream);
  7593. smalltalk.addMethod(
  7594. unescape('_position_'),
  7595. smalltalk.method({
  7596. selector: unescape('position%3A'),
  7597. category: 'accessing',
  7598. fn: function (anInteger){
  7599. var self=this;
  7600. self['@position']=anInteger;
  7601. return self;},
  7602. args: ["anInteger"],
  7603. source: unescape('position%3A%20anInteger%0A%09position%20%3A%3D%20anInteger'),
  7604. messageSends: [],
  7605. referencedClasses: []
  7606. }),
  7607. smalltalk.Stream);
  7608. smalltalk.addMethod(
  7609. unescape('_streamSize'),
  7610. smalltalk.method({
  7611. selector: unescape('streamSize'),
  7612. category: 'accessing',
  7613. fn: function (){
  7614. var self=this;
  7615. return self['@streamSize'];
  7616. return self;},
  7617. args: [],
  7618. source: unescape('streamSize%0A%09%5EstreamSize'),
  7619. messageSends: [],
  7620. referencedClasses: []
  7621. }),
  7622. smalltalk.Stream);
  7623. smalltalk.addMethod(
  7624. unescape('_setStreamSize_'),
  7625. smalltalk.method({
  7626. selector: unescape('setStreamSize%3A'),
  7627. category: 'accessing',
  7628. fn: function (anInteger){
  7629. var self=this;
  7630. self['@streamSize']=anInteger;
  7631. return self;},
  7632. args: ["anInteger"],
  7633. source: unescape('setStreamSize%3A%20anInteger%0A%09streamSize%20%3A%3D%20anInteger'),
  7634. messageSends: [],
  7635. referencedClasses: []
  7636. }),
  7637. smalltalk.Stream);
  7638. smalltalk.addMethod(
  7639. unescape('_contents'),
  7640. smalltalk.method({
  7641. selector: unescape('contents'),
  7642. category: 'accessing',
  7643. fn: function (){
  7644. var self=this;
  7645. return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
  7646. return self;},
  7647. args: [],
  7648. source: unescape('contents%0A%09%5Eself%20collection%0A%09%20%20%20%20copyFrom%3A%201%20%0A%09%20%20%20%20to%3A%20self%20streamSize'),
  7649. messageSends: ["copyFrom:to:", "collection", "streamSize"],
  7650. referencedClasses: []
  7651. }),
  7652. smalltalk.Stream);
  7653. smalltalk.addMethod(
  7654. unescape('_size'),
  7655. smalltalk.method({
  7656. selector: unescape('size'),
  7657. category: 'accessing',
  7658. fn: function (){
  7659. var self=this;
  7660. return smalltalk.send(self, "_streamSize", []);
  7661. return self;},
  7662. args: [],
  7663. source: unescape('size%0A%09%5Eself%20streamSize'),
  7664. messageSends: ["streamSize"],
  7665. referencedClasses: []
  7666. }),
  7667. smalltalk.Stream);
  7668. smalltalk.addMethod(
  7669. unescape('_reset'),
  7670. smalltalk.method({
  7671. selector: unescape('reset'),
  7672. category: 'actions',
  7673. fn: function (){
  7674. var self=this;
  7675. smalltalk.send(self, "_position_", [(0)]);
  7676. return self;},
  7677. args: [],
  7678. source: unescape('reset%0A%09self%20position%3A%200'),
  7679. messageSends: ["position:"],
  7680. referencedClasses: []
  7681. }),
  7682. smalltalk.Stream);
  7683. smalltalk.addMethod(
  7684. unescape('_close'),
  7685. smalltalk.method({
  7686. selector: unescape('close'),
  7687. category: 'actions',
  7688. fn: function (){
  7689. var self=this;
  7690. return self;},
  7691. args: [],
  7692. source: unescape('close'),
  7693. messageSends: [],
  7694. referencedClasses: []
  7695. }),
  7696. smalltalk.Stream);
  7697. smalltalk.addMethod(
  7698. unescape('_flush'),
  7699. smalltalk.method({
  7700. selector: unescape('flush'),
  7701. category: 'actions',
  7702. fn: function (){
  7703. var self=this;
  7704. return self;},
  7705. args: [],
  7706. source: unescape('flush'),
  7707. messageSends: [],
  7708. referencedClasses: []
  7709. }),
  7710. smalltalk.Stream);
  7711. smalltalk.addMethod(
  7712. unescape('_resetContents'),
  7713. smalltalk.method({
  7714. selector: unescape('resetContents'),
  7715. category: 'actions',
  7716. fn: function (){
  7717. var self=this;
  7718. smalltalk.send(self, "_reset", []);
  7719. smalltalk.send(self, "_setStreamSize_", [(0)]);
  7720. return self;},
  7721. args: [],
  7722. source: unescape('resetContents%0A%09self%20reset.%0A%09self%20setStreamSize%3A%200'),
  7723. messageSends: ["reset", "setStreamSize:"],
  7724. referencedClasses: []
  7725. }),
  7726. smalltalk.Stream);
  7727. smalltalk.addMethod(
  7728. unescape('_do_'),
  7729. smalltalk.method({
  7730. selector: unescape('do%3A'),
  7731. category: 'enumerating',
  7732. fn: function (aBlock){
  7733. var self=this;
  7734. (function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
  7735. return self;},
  7736. args: ["aBlock"],
  7737. source: unescape('do%3A%20aBlock%0A%09%5Bself%20atEnd%5D%20whileFalse%3A%20%5BaBlock%20value%3A%20self%20next%5D'),
  7738. messageSends: ["whileFalse:", "atEnd", "value:", "next"],
  7739. referencedClasses: []
  7740. }),
  7741. smalltalk.Stream);
  7742. smalltalk.addMethod(
  7743. unescape('_setToEnd'),
  7744. smalltalk.method({
  7745. selector: unescape('setToEnd'),
  7746. category: 'positioning',
  7747. fn: function (){
  7748. var self=this;
  7749. smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
  7750. return self;},
  7751. args: [],
  7752. source: unescape('setToEnd%0A%09self%20position%3A%20self%20size'),
  7753. messageSends: ["position:", "size"],
  7754. referencedClasses: []
  7755. }),
  7756. smalltalk.Stream);
  7757. smalltalk.addMethod(
  7758. unescape('_skip_'),
  7759. smalltalk.method({
  7760. selector: unescape('skip%3A'),
  7761. category: 'positioning',
  7762. fn: function (anInteger){
  7763. var self=this;
  7764. smalltalk.send(self, "_position_", [smalltalk.send(((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +anInteger : smalltalk.send($receiver, "__plus", [anInteger])), "_min_max_", [smalltalk.send(self, "_size", []), (0)])]);
  7765. return self;},
  7766. args: ["anInteger"],
  7767. source: unescape('skip%3A%20anInteger%0A%09self%20position%3A%20%28%28self%20position%20+%20anInteger%29%20min%3A%20self%20size%20max%3A%200%29'),
  7768. messageSends: ["position:", "min:max:", unescape("+"), "position", "size"],
  7769. referencedClasses: []
  7770. }),
  7771. smalltalk.Stream);
  7772. smalltalk.addMethod(
  7773. unescape('_next'),
  7774. smalltalk.method({
  7775. selector: unescape('next'),
  7776. category: 'reading',
  7777. fn: function (){
  7778. var self=this;
  7779. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  7780. return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);
  7781. return self;},
  7782. args: [],
  7783. source: unescape('next%0A%09self%20position%3A%20self%20position%20+%201.%20%0A%09%5Ecollection%20at%3A%20self%20position'),
  7784. messageSends: ["position:", unescape("+"), "position", "at:"],
  7785. referencedClasses: []
  7786. }),
  7787. smalltalk.Stream);
  7788. smalltalk.addMethod(
  7789. unescape('_next_'),
  7790. smalltalk.method({
  7791. selector: unescape('next%3A'),
  7792. category: 'reading',
  7793. fn: function (anInteger){
  7794. var self=this;
  7795. var tempCollection=nil;
  7796. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  7797. smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})]));})]);
  7798. return tempCollection;
  7799. return self;},
  7800. args: ["anInteger"],
  7801. source: unescape('next%3A%20anInteger%0A%09%7C%20tempCollection%20%7C%0A%09tempCollection%20%3A%3D%20self%20collection%20class%20new.%0A%09anInteger%20timesRepeat%3A%20%5B%0A%09%20%20%20%20self%20atEnd%20ifFalse%3A%20%5B%0A%09%09tempCollection%20add%3A%20self%20next%5D%5D.%0A%09%5EtempCollection'),
  7802. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
  7803. referencedClasses: []
  7804. }),
  7805. smalltalk.Stream);
  7806. smalltalk.addMethod(
  7807. unescape('_nextPut_'),
  7808. smalltalk.method({
  7809. selector: unescape('nextPut%3A'),
  7810. category: 'writing',
  7811. fn: function (anObject){
  7812. var self=this;
  7813. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  7814. smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
  7815. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  7816. return self;},
  7817. args: ["anObject"],
  7818. source: unescape('nextPut%3A%20anObject%0A%09self%20position%3A%20self%20position%20+%201.%0A%09self%20collection%20at%3A%20self%20position%20put%3A%20anObject.%0A%09self%20setStreamSize%3A%20%28self%20streamSize%20max%3A%20self%20position%29'),
  7819. messageSends: ["position:", unescape("+"), "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
  7820. referencedClasses: []
  7821. }),
  7822. smalltalk.Stream);
  7823. smalltalk.addMethod(
  7824. unescape('_nextPutAll_'),
  7825. smalltalk.method({
  7826. selector: unescape('nextPutAll%3A'),
  7827. category: 'writing',
  7828. fn: function (aCollection){
  7829. var self=this;
  7830. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
  7831. return self;},
  7832. args: ["aCollection"],
  7833. source: unescape('nextPutAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20nextPut%3A%20each%5D'),
  7834. messageSends: ["do:", "nextPut:"],
  7835. referencedClasses: []
  7836. }),
  7837. smalltalk.Stream);
  7838. smalltalk.addMethod(
  7839. unescape('_peek'),
  7840. smalltalk.method({
  7841. selector: unescape('peek'),
  7842. category: 'reading',
  7843. fn: function (){
  7844. var self=this;
  7845. return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]));
  7846. return self;},
  7847. args: [],
  7848. source: unescape('peek%0A%09%5Eself%20atEnd%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20collection%20at%3A%20self%20position%20+%201%5D'),
  7849. messageSends: ["ifFalse:", "atEnd", "at:", "collection", unescape("+"), "position"],
  7850. referencedClasses: []
  7851. }),
  7852. smalltalk.Stream);
  7853. smalltalk.addMethod(
  7854. unescape('_atEnd'),
  7855. smalltalk.method({
  7856. selector: unescape('atEnd'),
  7857. category: 'testing',
  7858. fn: function (){
  7859. var self=this;
  7860. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
  7861. return self;},
  7862. args: [],
  7863. source: unescape('atEnd%0A%09%5Eself%20position%20%3D%20self%20size'),
  7864. messageSends: [unescape("%3D"), "position", "size"],
  7865. referencedClasses: []
  7866. }),
  7867. smalltalk.Stream);
  7868. smalltalk.addMethod(
  7869. unescape('_atStart'),
  7870. smalltalk.method({
  7871. selector: unescape('atStart'),
  7872. category: 'testing',
  7873. fn: function (){
  7874. var self=this;
  7875. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
  7876. return self;},
  7877. args: [],
  7878. source: unescape('atStart%0A%09%5Eself%20position%20%3D%200'),
  7879. messageSends: [unescape("%3D"), "position"],
  7880. referencedClasses: []
  7881. }),
  7882. smalltalk.Stream);
  7883. smalltalk.addMethod(
  7884. unescape('_isEmpty'),
  7885. smalltalk.method({
  7886. selector: unescape('isEmpty'),
  7887. category: 'testing',
  7888. fn: function (){
  7889. var self=this;
  7890. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  7891. return self;},
  7892. args: [],
  7893. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  7894. messageSends: [unescape("%3D"), "size"],
  7895. referencedClasses: []
  7896. }),
  7897. smalltalk.Stream);
  7898. smalltalk.addMethod(
  7899. unescape('_on_'),
  7900. smalltalk.method({
  7901. selector: unescape('on%3A'),
  7902. category: 'instance creation',
  7903. fn: function (aCollection){
  7904. var self=this;
  7905. return (function($rec){smalltalk.send($rec, "_setCollection_", [aCollection]);smalltalk.send($rec, "_setStreamSize_", [smalltalk.send(aCollection, "_size", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  7906. return self;},
  7907. args: ["aCollection"],
  7908. source: unescape('on%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%20%0A%09%09setCollection%3A%20aCollection%3B%0A%09%09setStreamSize%3A%20aCollection%20size%3B%0A%09%09yourself'),
  7909. messageSends: ["setCollection:", "setStreamSize:", "size", "yourself", "new"],
  7910. referencedClasses: []
  7911. }),
  7912. smalltalk.Stream.klass);
  7913. smalltalk.addClass('StringStream', smalltalk.Stream, [], 'Kernel');
  7914. smalltalk.addMethod(
  7915. unescape('_next_'),
  7916. smalltalk.method({
  7917. selector: unescape('next%3A'),
  7918. category: 'reading',
  7919. fn: function (anInteger){
  7920. var self=this;
  7921. var tempCollection=nil;
  7922. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  7923. smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]);})]));})]);
  7924. return tempCollection;
  7925. return self;},
  7926. args: ["anInteger"],
  7927. source: unescape('next%3A%20anInteger%0A%09%7C%20tempCollection%20%7C%0A%09tempCollection%20%3A%3D%20self%20collection%20class%20new.%0A%09anInteger%20timesRepeat%3A%20%5B%0A%09%20%20%20%20self%20atEnd%20ifFalse%3A%20%5B%0A%09%09tempCollection%20%3A%3D%20tempCollection%2C%20self%20next%5D%5D.%0A%09%5EtempCollection'),
  7928. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", unescape("%2C"), "next"],
  7929. referencedClasses: []
  7930. }),
  7931. smalltalk.StringStream);
  7932. smalltalk.addMethod(
  7933. unescape('_nextPut_'),
  7934. smalltalk.method({
  7935. selector: unescape('nextPut%3A'),
  7936. category: 'writing',
  7937. fn: function (aString){
  7938. var self=this;
  7939. smalltalk.send(self, "_nextPutAll_", [aString]);
  7940. return self;},
  7941. args: ["aString"],
  7942. source: unescape('nextPut%3A%20aString%0A%09self%20nextPutAll%3A%20aString'),
  7943. messageSends: ["nextPutAll:"],
  7944. referencedClasses: []
  7945. }),
  7946. smalltalk.StringStream);
  7947. smalltalk.addMethod(
  7948. unescape('_nextPutAll_'),
  7949. smalltalk.method({
  7950. selector: unescape('nextPutAll%3A'),
  7951. category: 'writing',
  7952. fn: function (aString){
  7953. var self=this;
  7954. smalltalk.send(self, "_setCollection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_position", [])]), "__comma", [aString]), "__comma", [smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [((($receiver = ((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])])), smalltalk.send(smalltalk.send(self, "_collection", []), "_size", [])])])]);
  7955. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])]))]);
  7956. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  7957. return self;},
  7958. args: ["aString"],
  7959. source: unescape('nextPutAll%3A%20aString%0A%09self%20setCollection%3A%20%0A%09%20%20%20%20%28self%20collection%20copyFrom%3A%201%20to%3A%20self%20position%29%2C%0A%09%20%20%20%20aString%2C%0A%09%20%20%20%20%28self%20collection%20copyFrom%3A%20%28self%20position%20+%201%20+%20aString%20size%29%20to%3A%20self%20collection%20size%29.%0A%09self%20position%3A%20self%20position%20+%20aString%20size.%0A%09self%20setStreamSize%3A%20%28self%20streamSize%20max%3A%20self%20position%29'),
  7960. messageSends: ["setCollection:", unescape("%2C"), "copyFrom:to:", "collection", "position", unescape("+"), "size", "position:", "setStreamSize:", "max:", "streamSize"],
  7961. referencedClasses: []
  7962. }),
  7963. smalltalk.StringStream);
  7964. smalltalk.addMethod(
  7965. unescape('_cr'),
  7966. smalltalk.method({
  7967. selector: unescape('cr'),
  7968. category: 'writing',
  7969. fn: function (){
  7970. var self=this;
  7971. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  7972. return self;},
  7973. args: [],
  7974. source: unescape('cr%0A%09%5Eself%20nextPutAll%3A%20String%20cr'),
  7975. messageSends: ["nextPutAll:", "cr"],
  7976. referencedClasses: [smalltalk.String]
  7977. }),
  7978. smalltalk.StringStream);
  7979. smalltalk.addMethod(
  7980. unescape('_crlf'),
  7981. smalltalk.method({
  7982. selector: unescape('crlf'),
  7983. category: 'writing',
  7984. fn: function (){
  7985. var self=this;
  7986. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
  7987. return self;},
  7988. args: [],
  7989. source: unescape('crlf%0A%09%5Eself%20nextPutAll%3A%20String%20crlf'),
  7990. messageSends: ["nextPutAll:", "crlf"],
  7991. referencedClasses: [smalltalk.String]
  7992. }),
  7993. smalltalk.StringStream);
  7994. smalltalk.addMethod(
  7995. unescape('_lf'),
  7996. smalltalk.method({
  7997. selector: unescape('lf'),
  7998. category: 'writing',
  7999. fn: function (){
  8000. var self=this;
  8001. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
  8002. return self;},
  8003. args: [],
  8004. source: unescape('lf%0A%09%5Eself%20nextPutAll%3A%20String%20lf'),
  8005. messageSends: ["nextPutAll:", "lf"],
  8006. referencedClasses: [smalltalk.String]
  8007. }),
  8008. smalltalk.StringStream);
  8009. smalltalk.addMethod(
  8010. unescape('_space'),
  8011. smalltalk.method({
  8012. selector: unescape('space'),
  8013. category: 'writing',
  8014. fn: function (){
  8015. var self=this;
  8016. smalltalk.send(self, "_nextPut_", [" "]);
  8017. return self;},
  8018. args: [],
  8019. source: unescape('space%0A%09self%20nextPut%3A%20%27%20%27'),
  8020. messageSends: ["nextPut:"],
  8021. referencedClasses: []
  8022. }),
  8023. smalltalk.StringStream);
  8024. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel');
  8025. smalltalk.addMethod(
  8026. unescape('_class_'),
  8027. smalltalk.method({
  8028. selector: unescape('class%3A'),
  8029. category: 'accessing',
  8030. fn: function (aClass){
  8031. var self=this;
  8032. self['@class']=aClass;
  8033. return self;},
  8034. args: ["aClass"],
  8035. source: unescape('class%3A%20aClass%0A%09class%20%3A%3D%20aClass'),
  8036. messageSends: [],
  8037. referencedClasses: []
  8038. }),
  8039. smalltalk.ClassCommentReader);
  8040. smalltalk.addMethod(
  8041. unescape('_scanFrom_'),
  8042. smalltalk.method({
  8043. selector: unescape('scanFrom%3A'),
  8044. category: 'fileIn',
  8045. fn: function (aChunkParser){
  8046. var self=this;
  8047. var chunk=nil;
  8048. chunk=smalltalk.send(aChunkParser, "_nextChunk", []);
  8049. ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_setComment_", [chunk]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_setComment_", [chunk]);})]));
  8050. return self;},
  8051. args: ["aChunkParser"],
  8052. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09chunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20setComment%3A%20chunk%5D.'),
  8053. messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
  8054. referencedClasses: []
  8055. }),
  8056. smalltalk.ClassCommentReader);
  8057. smalltalk.addMethod(
  8058. unescape('_initialize'),
  8059. smalltalk.method({
  8060. selector: unescape('initialize'),
  8061. category: 'initialization',
  8062. fn: function (){
  8063. var self=this;
  8064. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  8065. self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []);
  8066. return self;},
  8067. args: [],
  8068. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  8069. messageSends: ["initialize", "new"],
  8070. referencedClasses: [smalltalk.ChunkParser]
  8071. }),
  8072. smalltalk.ClassCommentReader);
  8073. smalltalk.addMethod(
  8074. unescape('_setComment_'),
  8075. smalltalk.method({
  8076. selector: unescape('setComment%3A'),
  8077. category: 'private',
  8078. fn: function (aString){
  8079. var self=this;
  8080. smalltalk.send(self['@class'], "_comment_", [aString]);
  8081. return self;},
  8082. args: ["aString"],
  8083. source: unescape('setComment%3A%20aString%0A%20%20%20%20class%20comment%3A%20aString'),
  8084. messageSends: ["comment:"],
  8085. referencedClasses: []
  8086. }),
  8087. smalltalk.ClassCommentReader);
  8088. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel');
  8089. smalltalk.addMethod(
  8090. unescape('_next'),
  8091. smalltalk.method({
  8092. selector: unescape('next'),
  8093. category: 'accessing',
  8094. fn: function (){
  8095. var self=this;
  8096. return Math.random();
  8097. return self;},
  8098. args: [],
  8099. source: unescape('next%0A%09%3Creturn%20Math.random%28%29%3E'),
  8100. messageSends: [],
  8101. referencedClasses: []
  8102. }),
  8103. smalltalk.Random);
  8104. smalltalk.addMethod(
  8105. unescape('_next_'),
  8106. smalltalk.method({
  8107. selector: unescape('next%3A'),
  8108. category: 'accessing',
  8109. fn: function (anInteger){
  8110. var self=this;
  8111. return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
  8112. return self;},
  8113. args: ["anInteger"],
  8114. source: unescape('next%3A%20anInteger%0A%20%20%20%20%5E%281%20to%3A%20anInteger%29%20collect%3A%20%5B%3Aeach%20%7C%20self%20next%5D'),
  8115. messageSends: ["collect:", "to:", "next"],
  8116. referencedClasses: []
  8117. }),
  8118. smalltalk.Random);
  8119. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel');
  8120. smalltalk.addMethod(
  8121. unescape('_x'),
  8122. smalltalk.method({
  8123. selector: unescape('x'),
  8124. category: 'accessing',
  8125. fn: function (){
  8126. var self=this;
  8127. return self['@x'];
  8128. return self;},
  8129. args: [],
  8130. source: unescape('x%0A%09%5Ex'),
  8131. messageSends: [],
  8132. referencedClasses: []
  8133. }),
  8134. smalltalk.Point);
  8135. smalltalk.addMethod(
  8136. unescape('_y'),
  8137. smalltalk.method({
  8138. selector: unescape('y'),
  8139. category: 'accessing',
  8140. fn: function (){
  8141. var self=this;
  8142. return self['@y'];
  8143. return self;},
  8144. args: [],
  8145. source: unescape('y%0A%09%5Ey'),
  8146. messageSends: [],
  8147. referencedClasses: []
  8148. }),
  8149. smalltalk.Point);
  8150. smalltalk.addMethod(
  8151. unescape('_y_'),
  8152. smalltalk.method({
  8153. selector: unescape('y%3A'),
  8154. category: 'accessing',
  8155. fn: function (aNumber){
  8156. var self=this;
  8157. self['@y']=aNumber;
  8158. return self;},
  8159. args: ["aNumber"],
  8160. source: unescape('y%3A%20aNumber%0A%09y%20%3A%3D%20aNumber'),
  8161. messageSends: [],
  8162. referencedClasses: []
  8163. }),
  8164. smalltalk.Point);
  8165. smalltalk.addMethod(
  8166. unescape('_x_'),
  8167. smalltalk.method({
  8168. selector: unescape('x%3A'),
  8169. category: 'accessing',
  8170. fn: function (aNumber){
  8171. var self=this;
  8172. self['@x']=aNumber;
  8173. return self;},
  8174. args: ["aNumber"],
  8175. source: unescape('x%3A%20aNumber%0A%09x%20%3A%3D%20aNumber'),
  8176. messageSends: [],
  8177. referencedClasses: []
  8178. }),
  8179. smalltalk.Point);
  8180. smalltalk.addMethod(
  8181. unescape('__star'),
  8182. smalltalk.method({
  8183. selector: unescape('*'),
  8184. category: 'arithmetic',
  8185. fn: function (aPoint){
  8186. var self=this;
  8187. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  8188. return self;},
  8189. args: ["aPoint"],
  8190. source: unescape('*%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20*%20aPoint%20asPoint%20x%20y%3A%20self%20y%20*%20aPoint%20asPoint%20y'),
  8191. messageSends: ["x:y:", unescape("*"), "x", "asPoint", "y"],
  8192. referencedClasses: [smalltalk.Point]
  8193. }),
  8194. smalltalk.Point);
  8195. smalltalk.addMethod(
  8196. unescape('__plus'),
  8197. smalltalk.method({
  8198. selector: unescape('+'),
  8199. category: 'arithmetic',
  8200. fn: function (aPoint){
  8201. var self=this;
  8202. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  8203. return self;},
  8204. args: ["aPoint"],
  8205. source: unescape('+%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20+%20aPoint%20asPoint%20x%20y%3A%20self%20y%20+%20aPoint%20asPoint%20y'),
  8206. messageSends: ["x:y:", unescape("+"), "x", "asPoint", "y"],
  8207. referencedClasses: [smalltalk.Point]
  8208. }),
  8209. smalltalk.Point);
  8210. smalltalk.addMethod(
  8211. unescape('__minus'),
  8212. smalltalk.method({
  8213. selector: unescape('-'),
  8214. category: 'arithmetic',
  8215. fn: function (aPoint){
  8216. var self=this;
  8217. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  8218. return self;},
  8219. args: ["aPoint"],
  8220. source: unescape('-%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20-%20aPoint%20asPoint%20x%20y%3A%20self%20y%20-%20aPoint%20asPoint%20y'),
  8221. messageSends: ["x:y:", unescape("-"), "x", "asPoint", "y"],
  8222. referencedClasses: [smalltalk.Point]
  8223. }),
  8224. smalltalk.Point);
  8225. smalltalk.addMethod(
  8226. unescape('__slash'),
  8227. smalltalk.method({
  8228. selector: unescape('/'),
  8229. category: 'arithmetic',
  8230. fn: function (aPoint){
  8231. var self=this;
  8232. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  8233. return self;},
  8234. args: ["aPoint"],
  8235. source: unescape('/%20aPoint%0A%09%5EPoint%20x%3A%20self%20x%20/%20aPoint%20asPoint%20x%20y%3A%20self%20y%20/%20aPoint%20asPoint%20y'),
  8236. messageSends: ["x:y:", unescape("/"), "x", "asPoint", "y"],
  8237. referencedClasses: [smalltalk.Point]
  8238. }),
  8239. smalltalk.Point);
  8240. smalltalk.addMethod(
  8241. unescape('_asPoint'),
  8242. smalltalk.method({
  8243. selector: unescape('asPoint'),
  8244. category: 'converting',
  8245. fn: function (){
  8246. var self=this;
  8247. return self;
  8248. return self;},
  8249. args: [],
  8250. source: unescape('asPoint%0A%09%5Eself'),
  8251. messageSends: [],
  8252. referencedClasses: []
  8253. }),
  8254. smalltalk.Point);
  8255. smalltalk.addMethod(
  8256. unescape('__eq'),
  8257. smalltalk.method({
  8258. selector: unescape('%3D'),
  8259. category: 'arithmetic',
  8260. fn: function (aPoint){
  8261. var self=this;
  8262. return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_class", []), "__eq", [smalltalk.send(self, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_x", []), "__eq", [smalltalk.send(self, "_x", [])]), "_&", [smalltalk.send(smalltalk.send(aPoint, "_y", []), "__eq", [smalltalk.send(self, "_y", [])])]);})]);
  8263. return self;},
  8264. args: ["aPoint"],
  8265. source: unescape('%3D%20aPoint%0A%09%5EaPoint%20class%20%3D%20self%20class%20and%3A%20%5B%0A%09%09%28aPoint%20x%20%3D%20self%20x%29%20%26%20%28aPoint%20y%20%3D%20self%20y%29%5D'),
  8266. messageSends: ["and:", unescape("%3D"), "class", unescape("%26"), "x", "y"],
  8267. referencedClasses: []
  8268. }),
  8269. smalltalk.Point);
  8270. smalltalk.addMethod(
  8271. unescape('_x_y_'),
  8272. smalltalk.method({
  8273. selector: unescape('x%3Ay%3A'),
  8274. category: 'instance creation',
  8275. fn: function (aNumber, anotherNumber){
  8276. var self=this;
  8277. return (function($rec){smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  8278. return self;},
  8279. args: ["aNumber", "anotherNumber"],
  8280. source: unescape('x%3A%20aNumber%20y%3A%20anotherNumber%0A%09%5Eself%20new%0A%09%09x%3A%20aNumber%3B%0A%09%09y%3A%20anotherNumber%3B%0A%09%09yourself'),
  8281. messageSends: ["x:", "y:", "yourself", "new"],
  8282. referencedClasses: []
  8283. }),
  8284. smalltalk.Point.klass);
  8285. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel');
  8286. smalltalk.addMethod(
  8287. unescape('_selector'),
  8288. smalltalk.method({
  8289. selector: unescape('selector'),
  8290. category: 'accessing',
  8291. fn: function (){
  8292. var self=this;
  8293. return self['@selector'];
  8294. return self;},
  8295. args: [],
  8296. source: unescape('selector%0A%09%5Eselector'),
  8297. messageSends: [],
  8298. referencedClasses: []
  8299. }),
  8300. smalltalk.Message);
  8301. smalltalk.addMethod(
  8302. unescape('_selector_'),
  8303. smalltalk.method({
  8304. selector: unescape('selector%3A'),
  8305. category: 'accessing',
  8306. fn: function (aString){
  8307. var self=this;
  8308. self['@selector']=aString;
  8309. return self;},
  8310. args: ["aString"],
  8311. source: unescape('selector%3A%20aString%0A%09selector%20%3A%3D%20aString'),
  8312. messageSends: [],
  8313. referencedClasses: []
  8314. }),
  8315. smalltalk.Message);
  8316. smalltalk.addMethod(
  8317. unescape('_arguments_'),
  8318. smalltalk.method({
  8319. selector: unescape('arguments%3A'),
  8320. category: 'accessing',
  8321. fn: function (anArray){
  8322. var self=this;
  8323. self['@arguments']=anArray;
  8324. return self;},
  8325. args: ["anArray"],
  8326. source: unescape('arguments%3A%20anArray%0A%09arguments%20%3A%3D%20anArray'),
  8327. messageSends: [],
  8328. referencedClasses: []
  8329. }),
  8330. smalltalk.Message);
  8331. smalltalk.addMethod(
  8332. unescape('_arguments'),
  8333. smalltalk.method({
  8334. selector: unescape('arguments'),
  8335. category: 'accessing',
  8336. fn: function (){
  8337. var self=this;
  8338. return self['@arguments'];
  8339. return self;},
  8340. args: [],
  8341. source: unescape('arguments%0A%09%5Earguments'),
  8342. messageSends: [],
  8343. referencedClasses: []
  8344. }),
  8345. smalltalk.Message);
  8346. smalltalk.addMethod(
  8347. unescape('_printString'),
  8348. smalltalk.method({
  8349. selector: unescape('printString'),
  8350. category: 'printing',
  8351. fn: function (){
  8352. var self=this;
  8353. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Object)]);smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);smalltalk.send($rec, "_nextPutAll_", [self['@selector']]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%29")]);})(aStream);})]);
  8354. return self;},
  8355. args: [],
  8356. source: unescape('printString%0A%09%5E%20String%20streamContents%3A%20%5B%3AaStream%7C%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09aStream%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20super%20printString%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27%28%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20selector%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27%29%27%20%09%09%09%09%5D'),
  8357. messageSends: ["streamContents:", "nextPutAll:", "printString"],
  8358. referencedClasses: [smalltalk.String]
  8359. }),
  8360. smalltalk.Message);
  8361. smalltalk.addMethod(
  8362. unescape('_selector_arguments_'),
  8363. smalltalk.method({
  8364. selector: unescape('selector%3Aarguments%3A'),
  8365. category: 'instance creation',
  8366. fn: function (aString, anArray){
  8367. var self=this;
  8368. return (function($rec){smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  8369. return self;},
  8370. args: ["aString", "anArray"],
  8371. source: unescape('selector%3A%20aString%20arguments%3A%20anArray%0A%09%5Eself%20new%0A%09%09selector%3A%20aString%3B%0A%09%09arguments%3A%20anArray%3B%0A%09%09yourself'),
  8372. messageSends: ["selector:", "arguments:", "yourself", "new"],
  8373. referencedClasses: []
  8374. }),
  8375. smalltalk.Message.klass);
  8376. smalltalk.addClass('MessageNotUnderstood', smalltalk.Error, ['message', 'receiver'], 'Kernel');
  8377. smalltalk.addMethod(
  8378. unescape('_message'),
  8379. smalltalk.method({
  8380. selector: unescape('message'),
  8381. category: 'accessing',
  8382. fn: function (){
  8383. var self=this;
  8384. return self['@message'];
  8385. return self;},
  8386. args: [],
  8387. source: unescape('message%0A%09%5Emessage'),
  8388. messageSends: [],
  8389. referencedClasses: []
  8390. }),
  8391. smalltalk.MessageNotUnderstood);
  8392. smalltalk.addMethod(
  8393. unescape('_message_'),
  8394. smalltalk.method({
  8395. selector: unescape('message%3A'),
  8396. category: 'accessing',
  8397. fn: function (aMessage){
  8398. var self=this;
  8399. self['@message']=aMessage;
  8400. return self;},
  8401. args: ["aMessage"],
  8402. source: unescape('message%3A%20aMessage%0A%09message%20%3A%3D%20aMessage'),
  8403. messageSends: [],
  8404. referencedClasses: []
  8405. }),
  8406. smalltalk.MessageNotUnderstood);
  8407. smalltalk.addMethod(
  8408. unescape('_receiver'),
  8409. smalltalk.method({
  8410. selector: unescape('receiver'),
  8411. category: 'accessing',
  8412. fn: function (){
  8413. var self=this;
  8414. return self['@receiver'];
  8415. return self;},
  8416. args: [],
  8417. source: unescape('receiver%0A%09%5Ereceiver'),
  8418. messageSends: [],
  8419. referencedClasses: []
  8420. }),
  8421. smalltalk.MessageNotUnderstood);
  8422. smalltalk.addMethod(
  8423. unescape('_receiver_'),
  8424. smalltalk.method({
  8425. selector: unescape('receiver%3A'),
  8426. category: 'accessing',
  8427. fn: function (anObject){
  8428. var self=this;
  8429. self['@receiver']=anObject;
  8430. return self;},
  8431. args: ["anObject"],
  8432. source: unescape('receiver%3A%20anObject%0A%09receiver%20%3A%3D%20anObject'),
  8433. messageSends: [],
  8434. referencedClasses: []
  8435. }),
  8436. smalltalk.MessageNotUnderstood);
  8437. smalltalk.addMethod(
  8438. unescape('_messageText'),
  8439. smalltalk.method({
  8440. selector: unescape('messageText'),
  8441. category: 'accessing',
  8442. fn: function (){
  8443. var self=this;
  8444. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_asString", []), "__comma", [unescape("%20does%20not%20understand%20%23")]), "__comma", [smalltalk.send(smalltalk.send(self, "_message", []), "_selector", [])]);
  8445. return self;},
  8446. args: [],
  8447. source: unescape('messageText%0A%09%5Eself%20receiver%20asString%2C%20%27%20does%20not%20understand%20%23%27%2C%20self%20message%20selector'),
  8448. messageSends: [unescape("%2C"), "asString", "receiver", "selector", "message"],
  8449. referencedClasses: []
  8450. }),
  8451. smalltalk.MessageNotUnderstood);
  8452. smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel');
  8453. smalltalk.addMethod(
  8454. unescape('_handleError_'),
  8455. smalltalk.method({
  8456. selector: unescape('handleError%3A'),
  8457. category: 'error handling',
  8458. fn: function (anError){
  8459. var self=this;
  8460. (($receiver = smalltalk.send(anError, "_context", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logErrorContext_", [smalltalk.send(anError, "_context", [])]);})() : nil;
  8461. smalltalk.send(self, "_logError_", [anError]);
  8462. return self;},
  8463. args: ["anError"],
  8464. source: unescape('handleError%3A%20anError%0A%09anError%20context%20ifNotNil%3A%20%5Bself%20logErrorContext%3A%20anError%20context%5D.%0A%09self%20logError%3A%20anError'),
  8465. messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
  8466. referencedClasses: []
  8467. }),
  8468. smalltalk.ErrorHandler);
  8469. smalltalk.addMethod(
  8470. unescape('_logContext_'),
  8471. smalltalk.method({
  8472. selector: unescape('logContext%3A'),
  8473. category: 'private',
  8474. fn: function (aContext){
  8475. var self=this;
  8476. (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
  8477. smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [unescape("%3E%3E")]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
  8478. return self;},
  8479. args: ["aContext"],
  8480. source: unescape('logContext%3A%20aContext%0A%09aContext%20home%20ifNotNil%3A%20%5B%0A%09%09self%20logContext%3A%20aContext%20home%5D.%0A%09self%20log%3A%20aContext%20receiver%20asString%2C%20%27%3E%3E%27%2C%20aContext%20selector'),
  8481. messageSends: ["ifNotNil:", "home", "logContext:", "log:", unescape("%2C"), "asString", "receiver", "selector"],
  8482. referencedClasses: []
  8483. }),
  8484. smalltalk.ErrorHandler);
  8485. smalltalk.addMethod(
  8486. unescape('_logErrorContext_'),
  8487. smalltalk.method({
  8488. selector: unescape('logErrorContext%3A'),
  8489. category: 'private',
  8490. fn: function (aContext){
  8491. var self=this;
  8492. (($receiver = aContext) != nil && $receiver != undefined) ? (function(){return (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;})() : nil;
  8493. return self;},
  8494. args: ["aContext"],
  8495. source: unescape('logErrorContext%3A%20aContext%0A%09aContext%20ifNotNil%3A%20%5B%0A%09%09aContext%20home%20ifNotNil%3A%20%5B%0A%09%09%09self%20logContext%3A%20aContext%20home%5D%5D'),
  8496. messageSends: ["ifNotNil:", "home", "logContext:"],
  8497. referencedClasses: []
  8498. }),
  8499. smalltalk.ErrorHandler);
  8500. smalltalk.addMethod(
  8501. unescape('_logError_'),
  8502. smalltalk.method({
  8503. selector: unescape('logError%3A'),
  8504. category: 'private',
  8505. fn: function (anError){
  8506. var self=this;
  8507. smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
  8508. return self;},
  8509. args: ["anError"],
  8510. source: unescape('logError%3A%20anError%0A%09self%20log%3A%20anError%20messageText'),
  8511. messageSends: ["log:", "messageText"],
  8512. referencedClasses: []
  8513. }),
  8514. smalltalk.ErrorHandler);
  8515. smalltalk.addMethod(
  8516. unescape('_log_'),
  8517. smalltalk.method({
  8518. selector: unescape('log%3A'),
  8519. category: 'private',
  8520. fn: function (aString){
  8521. var self=this;
  8522. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
  8523. return self;},
  8524. args: ["aString"],
  8525. source: unescape('log%3A%20aString%0A%09console%20log%3A%20aString'),
  8526. messageSends: ["log:"],
  8527. referencedClasses: []
  8528. }),
  8529. smalltalk.ErrorHandler);
  8530. smalltalk.ErrorHandler.klass.iVarNames = ['current'];
  8531. smalltalk.addMethod(
  8532. unescape('_current'),
  8533. smalltalk.method({
  8534. selector: unescape('current'),
  8535. category: 'accessing',
  8536. fn: function (){
  8537. var self=this;
  8538. return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return self['@current']=smalltalk.send(self, "_new", []);})() : $receiver;
  8539. return self;},
  8540. args: [],
  8541. source: unescape('current%0A%09%5Ecurrent%20ifNil%3A%20%5Bcurrent%20%3A%3D%20self%20new%5D'),
  8542. messageSends: ["ifNil:", "new"],
  8543. referencedClasses: []
  8544. }),
  8545. smalltalk.ErrorHandler.klass);
  8546. smalltalk.addMethod(
  8547. unescape('_initialize'),
  8548. smalltalk.method({
  8549. selector: unescape('initialize'),
  8550. category: 'initialization',
  8551. fn: function (){
  8552. var self=this;
  8553. smalltalk.send(self, "_register", []);
  8554. return self;},
  8555. args: [],
  8556. source: unescape('initialize%0A%09self%20register'),
  8557. messageSends: ["register"],
  8558. referencedClasses: []
  8559. }),
  8560. smalltalk.ErrorHandler.klass);
  8561. smalltalk.addMethod(
  8562. unescape('_register'),
  8563. smalltalk.method({
  8564. selector: unescape('register'),
  8565. category: 'initialization',
  8566. fn: function (){
  8567. var self=this;
  8568. smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
  8569. return self;},
  8570. args: [],
  8571. source: unescape('register%0A%09ErrorHandler%20setCurrent%3A%20self%20new'),
  8572. messageSends: ["setCurrent:", "new"],
  8573. referencedClasses: [smalltalk.ErrorHandler]
  8574. }),
  8575. smalltalk.ErrorHandler.klass);
  8576. smalltalk.addMethod(
  8577. unescape('_setCurrent_'),
  8578. smalltalk.method({
  8579. selector: unescape('setCurrent%3A'),
  8580. category: 'accessing',
  8581. fn: function (anHandler){
  8582. var self=this;
  8583. self['@current']=anHandler;
  8584. return self;},
  8585. args: ["anHandler"],
  8586. source: unescape('setCurrent%3A%20anHandler%0A%09current%20%3A%3D%20anHandler'),
  8587. messageSends: [],
  8588. referencedClasses: []
  8589. }),
  8590. smalltalk.ErrorHandler.klass);
  8591. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel');
  8592. smalltalk.addMethod(
  8593. unescape('_jsObject_'),
  8594. smalltalk.method({
  8595. selector: unescape('jsObject%3A'),
  8596. category: 'accessing',
  8597. fn: function (aJSObject){
  8598. var self=this;
  8599. self['@jsObject']=aJSObject;
  8600. return self;},
  8601. args: ["aJSObject"],
  8602. source: unescape('jsObject%3A%20aJSObject%0A%09jsObject%20%3A%3D%20aJSObject'),
  8603. messageSends: [],
  8604. referencedClasses: []
  8605. }),
  8606. smalltalk.JSObjectProxy);
  8607. smalltalk.addMethod(
  8608. unescape('_jsObject'),
  8609. smalltalk.method({
  8610. selector: unescape('jsObject'),
  8611. category: 'accessing',
  8612. fn: function (){
  8613. var self=this;
  8614. return self['@jsObject'];
  8615. return self;},
  8616. args: [],
  8617. source: unescape('jsObject%0A%09%5EjsObject'),
  8618. messageSends: [],
  8619. referencedClasses: []
  8620. }),
  8621. smalltalk.JSObjectProxy);
  8622. smalltalk.addMethod(
  8623. unescape('_printString'),
  8624. smalltalk.method({
  8625. selector: unescape('printString'),
  8626. category: 'proxy',
  8627. fn: function (){
  8628. var self=this;
  8629. return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
  8630. return self;},
  8631. args: [],
  8632. source: unescape('printString%0A%09%5Eself%20jsObject%20toString'),
  8633. messageSends: ["toString", "jsObject"],
  8634. referencedClasses: []
  8635. }),
  8636. smalltalk.JSObjectProxy);
  8637. smalltalk.addMethod(
  8638. unescape('_inspectOn_'),
  8639. smalltalk.method({
  8640. selector: unescape('inspectOn%3A'),
  8641. category: 'proxy',
  8642. fn: function (anInspector){
  8643. var self=this;
  8644. var variables=nil;
  8645. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  8646. smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
  8647. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  8648. for(var i in self['@jsObject']) {
  8649. variables._at_put_(i, self['@jsObject'][i]);
  8650. };
  8651. smalltalk.send(anInspector, "_setVariables_", [variables]);
  8652. return self;},
  8653. args: ["anInspector"],
  8654. source: unescape('inspectOn%3A%20anInspector%0A%09%7C%20variables%20%7C%0A%09variables%20%3A%3D%20Dictionary%20new.%0A%09variables%20at%3A%20%27%23self%27%20put%3A%20self%20jsObject.%0A%09anInspector%20setLabel%3A%20self%20printString.%0A%09%3Cfor%28var%20i%20in%20self%5B%27@jsObject%27%5D%29%20%7B%0A%09%09variables._at_put_%28i%2C%20self%5B%27@jsObject%27%5D%5Bi%5D%29%3B%0A%09%7D%3E.%0A%09anInspector%20setVariables%3A%20variables'),
  8655. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "setVariables:"],
  8656. referencedClasses: [smalltalk.Dictionary]
  8657. }),
  8658. smalltalk.JSObjectProxy);
  8659. smalltalk.addMethod(
  8660. unescape('_doesNotUnderstand_'),
  8661. smalltalk.method({
  8662. selector: unescape('doesNotUnderstand%3A'),
  8663. category: 'proxy',
  8664. fn: function (aMessage){
  8665. var self=this;
  8666. var obj=nil;
  8667. var selector=nil;
  8668. var jsSelector=nil;
  8669. var arguments=nil;
  8670. obj=smalltalk.send(self, "_jsObject", []);
  8671. selector=smalltalk.send(aMessage, "_selector", []);
  8672. jsSelector=smalltalk.send(selector, "_asJavaScriptSelector", []);
  8673. arguments=smalltalk.send(aMessage, "_arguments", []);
  8674. if(obj[jsSelector] != undefined) {return smalltalk.send(obj, jsSelector, arguments)};
  8675. smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
  8676. return self;},
  8677. args: ["aMessage"],
  8678. source: unescape('doesNotUnderstand%3A%20aMessage%0A%09%7C%20obj%20selector%20jsSelector%20arguments%20%7C%0A%09obj%20%3A%3D%20self%20jsObject.%0A%09selector%20%3A%3D%20aMessage%20selector.%0A%09jsSelector%20%3A%3D%20selector%20asJavaScriptSelector.%0A%09arguments%20%3A%3D%20aMessage%20arguments.%0A%09%3Cif%28obj%5BjsSelector%5D%20%21%3D%20undefined%29%20%7Breturn%20smalltalk.send%28obj%2C%20jsSelector%2C%20arguments%29%7D%3E.%0A%09super%20doesNotUnderstand%3A%20aMessage'),
  8679. messageSends: ["jsObject", "selector", "asJavaScriptSelector", "arguments", "doesNotUnderstand:"],
  8680. referencedClasses: []
  8681. }),
  8682. smalltalk.JSObjectProxy);
  8683. smalltalk.addMethod(
  8684. unescape('_at_'),
  8685. smalltalk.method({
  8686. selector: unescape('at%3A'),
  8687. category: 'accessing',
  8688. fn: function (aString){
  8689. var self=this;
  8690. return self['@jsObject'][aString];
  8691. return self;},
  8692. args: ["aString"],
  8693. source: unescape('at%3A%20aString%0A%09%3Creturn%20self%5B%27@jsObject%27%5D%5BaString%5D%3E'),
  8694. messageSends: [],
  8695. referencedClasses: []
  8696. }),
  8697. smalltalk.JSObjectProxy);
  8698. smalltalk.addMethod(
  8699. unescape('_at_put_'),
  8700. smalltalk.method({
  8701. selector: unescape('at%3Aput%3A'),
  8702. category: 'accessing',
  8703. fn: function (aString, anObject){
  8704. var self=this;
  8705. self['@jsObject'][aString] = anObject;
  8706. return self;},
  8707. args: ["aString", "anObject"],
  8708. source: unescape('at%3A%20aString%20put%3A%20anObject%0A%09%3Cself%5B%27@jsObject%27%5D%5BaString%5D%20%3D%20anObject%3E'),
  8709. messageSends: [],
  8710. referencedClasses: []
  8711. }),
  8712. smalltalk.JSObjectProxy);
  8713. smalltalk.addMethod(
  8714. unescape('_on_'),
  8715. smalltalk.method({
  8716. selector: unescape('on%3A'),
  8717. category: 'instance creation',
  8718. fn: function (aJSObject){
  8719. var self=this;
  8720. return (function($rec){smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  8721. return self;},
  8722. args: ["aJSObject"],
  8723. source: unescape('on%3A%20aJSObject%0A%09%5Eself%20new%0A%09%09jsObject%3A%20aJSObject%3B%0A%09%09yourself'),
  8724. messageSends: ["jsObject:", "yourself", "new"],
  8725. referencedClasses: []
  8726. }),
  8727. smalltalk.JSObjectProxy.klass);
  8728. smalltalk.addClass('Set', smalltalk.Collection, ['elements'], 'Kernel');
  8729. smalltalk.addMethod(
  8730. unescape('_add_'),
  8731. smalltalk.method({
  8732. selector: unescape('add%3A'),
  8733. category: 'adding/removing',
  8734. fn: function (anObject){
  8735. var self=this;
  8736. var found;
  8737. for(var i in self['@elements']) {
  8738. if(anObject == self['@elements'][i]) {
  8739. found = true;
  8740. break;
  8741. }
  8742. }
  8743. if(!found) {self['@elements'].push(anObject)}
  8744. ;
  8745. return self;},
  8746. args: ["anObject"],
  8747. source: unescape('add%3A%20anObject%0A%09%3C%0A%09%09var%20found%3B%0A%09%09for%28var%20i%20in%20self%5B%27@elements%27%5D%29%20%7B%0A%09%09%09if%28anObject%20%3D%3D%20self%5B%27@elements%27%5D%5Bi%5D%29%20%7B%0A%09%09%09%09found%20%3D%20true%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if%28%21found%29%20%7Bself%5B%27@elements%27%5D.push%28anObject%29%7D%0A%09%3E'),
  8748. messageSends: [],
  8749. referencedClasses: []
  8750. }),
  8751. smalltalk.Set);
  8752. smalltalk.addMethod(
  8753. unescape('_remove_'),
  8754. smalltalk.method({
  8755. selector: unescape('remove%3A'),
  8756. category: 'adding/removing',
  8757. fn: function (anObject){
  8758. var self=this;
  8759. smalltalk.send(self['@elements'], "_remove_", [anObject]);
  8760. return self;},
  8761. args: ["anObject"],
  8762. source: unescape('remove%3A%20anObject%0A%09elements%20remove%3A%20anObject'),
  8763. messageSends: ["remove:"],
  8764. referencedClasses: []
  8765. }),
  8766. smalltalk.Set);
  8767. smalltalk.addMethod(
  8768. unescape('_initialize'),
  8769. smalltalk.method({
  8770. selector: unescape('initialize'),
  8771. category: 'initialization',
  8772. fn: function (){
  8773. var self=this;
  8774. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  8775. self['@elements']=[];
  8776. return self;},
  8777. args: [],
  8778. source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
  8779. messageSends: ["initialize"],
  8780. referencedClasses: []
  8781. }),
  8782. smalltalk.Set);
  8783. smalltalk.addMethod(
  8784. unescape('_size'),
  8785. smalltalk.method({
  8786. selector: unescape('size'),
  8787. category: 'accessing',
  8788. fn: function (){
  8789. var self=this;
  8790. return smalltalk.send(self['@elements'], "_size", []);
  8791. return self;},
  8792. args: [],
  8793. source: unescape('size%0A%09%5Eelements%20size'),
  8794. messageSends: ["size"],
  8795. referencedClasses: []
  8796. }),
  8797. smalltalk.Set);
  8798. smalltalk.addMethod(
  8799. unescape('_asArray'),
  8800. smalltalk.method({
  8801. selector: unescape('asArray'),
  8802. category: 'converting',
  8803. fn: function (){
  8804. var self=this;
  8805. return smalltalk.send(self['@elements'], "_copy", []);
  8806. return self;},
  8807. args: [],
  8808. source: unescape('asArray%0A%09%5Eelements%20copy'),
  8809. messageSends: ["copy"],
  8810. referencedClasses: []
  8811. }),
  8812. smalltalk.Set);
  8813. smalltalk.addMethod(
  8814. unescape('_detect_ifNone_'),
  8815. smalltalk.method({
  8816. selector: unescape('detect%3AifNone%3A'),
  8817. category: 'enumerating',
  8818. fn: function (aBlock, anotherBlock){
  8819. var self=this;
  8820. return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
  8821. return self;},
  8822. args: ["aBlock", "anotherBlock"],
  8823. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  8824. messageSends: ["detect:ifNone:"],
  8825. referencedClasses: []
  8826. }),
  8827. smalltalk.Set);
  8828. smalltalk.addMethod(
  8829. unescape('_do_'),
  8830. smalltalk.method({
  8831. selector: unescape('do%3A'),
  8832. category: 'enumerating',
  8833. fn: function (aBlock){
  8834. var self=this;
  8835. smalltalk.send(self['@elements'], "_do_", [aBlock]);
  8836. return self;},
  8837. args: ["aBlock"],
  8838. source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
  8839. messageSends: ["do:"],
  8840. referencedClasses: []
  8841. }),
  8842. smalltalk.Set);
  8843. smalltalk.addMethod(
  8844. unescape('_includes_'),
  8845. smalltalk.method({
  8846. selector: unescape('includes%3A'),
  8847. category: 'testing',
  8848. fn: function (anObject){
  8849. var self=this;
  8850. return smalltalk.send(self['@elements'], "_includes_", [anObject]);
  8851. return self;},
  8852. args: ["anObject"],
  8853. source: unescape('includes%3A%20anObject%0A%09%5Eelements%20includes%3A%20anObject'),
  8854. messageSends: ["includes:"],
  8855. referencedClasses: []
  8856. }),
  8857. smalltalk.Set);
  8858. smalltalk.addMethod(
  8859. unescape('__eq'),
  8860. smalltalk.method({
  8861. selector: unescape('%3D'),
  8862. category: 'comparing',
  8863. fn: function (aCollection){
  8864. var self=this;
  8865. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(self['@elements'], "__eq", [smalltalk.send(aCollection, "_asArray", [])]);})]);
  8866. return self;},
  8867. args: ["aCollection"],
  8868. source: unescape('%3D%20aCollection%0A%09%5Eself%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%20%20%20%20%20%20%20%20%09elements%20%3D%20aCollection%20asArray%5D'),
  8869. messageSends: ["and:", unescape("%3D"), "class", "asArray"],
  8870. referencedClasses: []
  8871. }),
  8872. smalltalk.Set);
  8873. smalltalk.addClass('Transcript', smalltalk.Object, ['textarea'], 'Kernel');
  8874. smalltalk.Transcript.klass.iVarNames = ['current'];
  8875. smalltalk.addMethod(
  8876. unescape('_open'),
  8877. smalltalk.method({
  8878. selector: unescape('open'),
  8879. category: 'instance creation',
  8880. fn: function (){
  8881. var self=this;
  8882. smalltalk.send(smalltalk.send(self, "_current", []), "_open", []);
  8883. return self;},
  8884. args: [],
  8885. source: unescape('open%0A%20%20%20%20self%20current%20open'),
  8886. messageSends: ["open", "current"],
  8887. referencedClasses: []
  8888. }),
  8889. smalltalk.Transcript.klass);
  8890. smalltalk.addMethod(
  8891. unescape('_new'),
  8892. smalltalk.method({
  8893. selector: unescape('new'),
  8894. category: 'instance creation',
  8895. fn: function (){
  8896. var self=this;
  8897. smalltalk.send(self, "_shouldNotImplement", []);
  8898. return self;},
  8899. args: [],
  8900. source: unescape('new%0A%20%20%20%20self%20shouldNotImplement'),
  8901. messageSends: ["shouldNotImplement"],
  8902. referencedClasses: []
  8903. }),
  8904. smalltalk.Transcript.klass);
  8905. smalltalk.addMethod(
  8906. unescape('_current'),
  8907. smalltalk.method({
  8908. selector: unescape('current'),
  8909. category: 'instance creation',
  8910. fn: function (){
  8911. var self=this;
  8912. return self['@current'];
  8913. return self;},
  8914. args: [],
  8915. source: unescape('current%0A%20%20%20%20%5Ecurrent'),
  8916. messageSends: [],
  8917. referencedClasses: []
  8918. }),
  8919. smalltalk.Transcript.klass);
  8920. smalltalk.addMethod(
  8921. unescape('_show_'),
  8922. smalltalk.method({
  8923. selector: unescape('show%3A'),
  8924. category: 'printing',
  8925. fn: function (anObject){
  8926. var self=this;
  8927. smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [anObject]);
  8928. return self;},
  8929. args: ["anObject"],
  8930. source: unescape('show%3A%20anObject%0A%20%20%20%20self%20current%20show%3A%20anObject'),
  8931. messageSends: ["show:", "current"],
  8932. referencedClasses: []
  8933. }),
  8934. smalltalk.Transcript.klass);
  8935. smalltalk.addMethod(
  8936. unescape('_cr'),
  8937. smalltalk.method({
  8938. selector: unescape('cr'),
  8939. category: 'printing',
  8940. fn: function (){
  8941. var self=this;
  8942. smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  8943. return self;},
  8944. args: [],
  8945. source: unescape('cr%0A%20%20%20%20self%20current%20show%3A%20String%20cr'),
  8946. messageSends: ["show:", "current", "cr"],
  8947. referencedClasses: [smalltalk.String]
  8948. }),
  8949. smalltalk.Transcript.klass);
  8950. smalltalk.addMethod(
  8951. unescape('_clear'),
  8952. smalltalk.method({
  8953. selector: unescape('clear'),
  8954. category: 'printing',
  8955. fn: function (){
  8956. var self=this;
  8957. smalltalk.send(smalltalk.send(self, "_current", []), "_clear", []);
  8958. return self;},
  8959. args: [],
  8960. source: unescape('clear%0A%20%20%20%20self%20current%20clear'),
  8961. messageSends: ["clear", "current"],
  8962. referencedClasses: []
  8963. }),
  8964. smalltalk.Transcript.klass);
  8965. smalltalk.addMethod(
  8966. unescape('_register_'),
  8967. smalltalk.method({
  8968. selector: unescape('register%3A'),
  8969. category: 'instance creation',
  8970. fn: function (aTranscript){
  8971. var self=this;
  8972. self['@current']=aTranscript;
  8973. return self;},
  8974. args: ["aTranscript"],
  8975. source: unescape('register%3A%20aTranscript%0A%09current%20%3A%3D%20aTranscript'),
  8976. messageSends: [],
  8977. referencedClasses: []
  8978. }),
  8979. smalltalk.Transcript.klass);
  8980. smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel');
  8981. smalltalk.addMethod(
  8982. unescape('_clear'),
  8983. smalltalk.method({
  8984. selector: unescape('clear'),
  8985. category: 'printing',
  8986. fn: function (){
  8987. var self=this;
  8988. return self;},
  8989. args: [],
  8990. source: unescape('clear%0A%09%22no%20op%22'),
  8991. messageSends: [],
  8992. referencedClasses: []
  8993. }),
  8994. smalltalk.ConsoleTranscript);
  8995. smalltalk.addMethod(
  8996. unescape('_cr'),
  8997. smalltalk.method({
  8998. selector: unescape('cr'),
  8999. category: 'printing',
  9000. fn: function (){
  9001. var self=this;
  9002. return self;},
  9003. args: [],
  9004. source: unescape('cr%0A%09%22no%20op%22'),
  9005. messageSends: [],
  9006. referencedClasses: []
  9007. }),
  9008. smalltalk.ConsoleTranscript);
  9009. smalltalk.addMethod(
  9010. unescape('_show_'),
  9011. smalltalk.method({
  9012. selector: unescape('show%3A'),
  9013. category: 'printing',
  9014. fn: function (anObject){
  9015. var self=this;
  9016. console.log(String(anObject._asString()));
  9017. return self;},
  9018. args: ["anObject"],
  9019. source: unescape('show%3A%20anObject%0A%09%3Cconsole.log%28String%28anObject._asString%28%29%29%29%3E'),
  9020. messageSends: [],
  9021. referencedClasses: []
  9022. }),
  9023. smalltalk.ConsoleTranscript);
  9024. smalltalk.addMethod(
  9025. unescape('_open'),
  9026. smalltalk.method({
  9027. selector: unescape('open'),
  9028. category: 'actions',
  9029. fn: function (){
  9030. var self=this;
  9031. return self;},
  9032. args: [],
  9033. source: unescape('open'),
  9034. messageSends: [],
  9035. referencedClasses: []
  9036. }),
  9037. smalltalk.ConsoleTranscript);
  9038. smalltalk.addMethod(
  9039. unescape('_initialize'),
  9040. smalltalk.method({
  9041. selector: unescape('initialize'),
  9042. category: 'initialization',
  9043. fn: function (){
  9044. var self=this;
  9045. smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_new", [])]);
  9046. return self;},
  9047. args: [],
  9048. source: unescape('initialize%0A%09Transcript%20register%3A%20self%20new'),
  9049. messageSends: ["register:", "new"],
  9050. referencedClasses: [smalltalk.Transcript]
  9051. }),
  9052. smalltalk.ConsoleTranscript.klass);
  9053. smalltalk.addPackage('FileServer', []);
  9054. smalltalk.addClass('FileServer', smalltalk.Object, ['path', 'http', 'fs', 'url', 'port', 'basePath', 'sys'], 'FileServer');
  9055. smalltalk.addMethod(
  9056. unescape('_basePath'),
  9057. smalltalk.method({
  9058. selector: unescape('basePath'),
  9059. category: 'accessing',
  9060. fn: function (){
  9061. var self=this;
  9062. return (($receiver = self['@basePath']) == nil || $receiver == undefined) ? (function(){return unescape("./");})() : $receiver;
  9063. return self;},
  9064. args: [],
  9065. source: unescape('basePath%0A%09%5EbasePath%20ifNil%3A%20%5B%27./%27%5D'),
  9066. messageSends: ["ifNil:"],
  9067. referencedClasses: []
  9068. }),
  9069. smalltalk.FileServer);
  9070. smalltalk.addMethod(
  9071. unescape('_basePath_'),
  9072. smalltalk.method({
  9073. selector: unescape('basePath%3A'),
  9074. category: 'accessing',
  9075. fn: function (aString){
  9076. var self=this;
  9077. self['@basePath']=aString;
  9078. return self;},
  9079. args: ["aString"],
  9080. source: unescape('basePath%3A%20aString%0A%09basePath%20%3A%3D%20aString'),
  9081. messageSends: [],
  9082. referencedClasses: []
  9083. }),
  9084. smalltalk.FileServer);
  9085. smalltalk.addMethod(
  9086. unescape('_port'),
  9087. smalltalk.method({
  9088. selector: unescape('port'),
  9089. category: 'accessing',
  9090. fn: function (){
  9091. var self=this;
  9092. return smalltalk.send(smalltalk.send(self, "_class", []), "_port", []);
  9093. return self;},
  9094. args: [],
  9095. source: unescape('port%0A%09%5Eself%20class%20port'),
  9096. messageSends: ["port", "class"],
  9097. referencedClasses: []
  9098. }),
  9099. smalltalk.FileServer);
  9100. smalltalk.addMethod(
  9101. unescape('_initialize'),
  9102. smalltalk.method({
  9103. selector: unescape('initialize'),
  9104. category: 'initialization',
  9105. fn: function (){
  9106. var self=this;
  9107. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  9108. self['@path']=smalltalk.send(self, "_require_", ["path"]);
  9109. self['@http']=smalltalk.send(self, "_require_", ["http"]);
  9110. self['@fs']=smalltalk.send(self, "_require_", ["fs"]);
  9111. self['@sys']=smalltalk.send(self, "_require_", ["sys"]);
  9112. self['@url']=smalltalk.send(self, "_require_", ["url"]);
  9113. return self;},
  9114. args: [],
  9115. source: unescape('initialize%0A%09super%20initialize.%0A%09path%20%3A%3D%20self%20require%3A%20%27path%27.%0A%09http%20%3A%3D%20self%20require%3A%20%27http%27.%0A%09fs%20%3A%3D%20self%20require%3A%20%27fs%27.%0A%09sys%20%3A%3D%20self%20require%3A%20%27sys%27.%0A%09url%20%3A%3D%20self%20require%3A%20%27url%27'),
  9116. messageSends: ["initialize", "require:"],
  9117. referencedClasses: []
  9118. }),
  9119. smalltalk.FileServer);
  9120. smalltalk.addMethod(
  9121. unescape('_require_'),
  9122. smalltalk.method({
  9123. selector: unescape('require%3A'),
  9124. category: 'private',
  9125. fn: function (aModuleString){
  9126. var self=this;
  9127. return smalltalk.send((typeof require == 'undefined' ? nil : require), "_value_", [aModuleString]);
  9128. return self;},
  9129. args: ["aModuleString"],
  9130. source: unescape('require%3A%20aModuleString%0A%09%22call%20to%20the%20require%20function%22%0A%09%5Erequire%20value%3A%20aModuleString'),
  9131. messageSends: ["value:"],
  9132. referencedClasses: []
  9133. }),
  9134. smalltalk.FileServer);
  9135. smalltalk.addMethod(
  9136. unescape('_writeData_toFileNamed_'),
  9137. smalltalk.method({
  9138. selector: unescape('writeData%3AtoFileNamed%3A'),
  9139. category: 'private',
  9140. fn: function (data, aFilename){
  9141. var self=this;
  9142. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aFilename]);
  9143. return self;},
  9144. args: ["data", "aFilename"],
  9145. source: unescape('writeData%3A%20data%20toFileNamed%3A%20aFilename%0A%09console%20log%3A%20aFilename'),
  9146. messageSends: ["log:"],
  9147. referencedClasses: []
  9148. }),
  9149. smalltalk.FileServer);
  9150. smalltalk.addMethod(
  9151. unescape('_respondNotFoundTo_'),
  9152. smalltalk.method({
  9153. selector: unescape('respondNotFoundTo%3A'),
  9154. category: 'request handling',
  9155. fn: function (aResponse){
  9156. var self=this;
  9157. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(404), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")])])]);smalltalk.send($rec, "_write_", ["404 Not found"]);return smalltalk.send($rec, "_end", []);})(aResponse);
  9158. return self;},
  9159. args: ["aResponse"],
  9160. source: unescape('respondNotFoundTo%3A%20aResponse%0A%09aResponse%20%0A%09%09writeHead%3A%20404%20options%3A%20%23%7B%27Content-Type%27%20-%3E%20%27text/plain%27%7D%3B%0A%09%09write%3A%20%27404%20Not%20found%27%3B%0A%09%09end'),
  9161. messageSends: ["writeHead:options:", unescape("-%3E"), "write:", "end"],
  9162. referencedClasses: []
  9163. }),
  9164. smalltalk.FileServer);
  9165. smalltalk.addMethod(
  9166. unescape('_handleRequest_respondTo_'),
  9167. smalltalk.method({
  9168. selector: unescape('handleRequest%3ArespondTo%3A'),
  9169. category: 'request handling',
  9170. fn: function (aRequest, aResponse){
  9171. var self=this;
  9172. ((($receiver = smalltalk.send(smalltalk.send(aRequest, "_method", []), "__eq", ["PUT"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_handlePUTRequest_respondTo_", [aRequest, aResponse]);})() : (function(){return smalltalk.send(self, "_handleGETRequest_respondTo_", [aRequest, aResponse]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_handlePUTRequest_respondTo_", [aRequest, aResponse]);}), (function(){return smalltalk.send(self, "_handleGETRequest_respondTo_", [aRequest, aResponse]);})]));
  9173. return self;},
  9174. args: ["aRequest", "aResponse"],
  9175. source: unescape('handleRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09aRequest%20method%20%3D%20%27PUT%27%0A%09%09ifTrue%3A%20%5Bself%20handlePUTRequest%3A%20aRequest%20respondTo%3A%20aResponse%5D%0A%09%09ifFalse%3A%20%5Bself%20handleGETRequest%3A%20aRequest%20respondTo%3A%20aResponse%5D'),
  9176. messageSends: ["ifTrue:ifFalse:", unescape("%3D"), "method", "handlePUTRequest:respondTo:", "handleGETRequest:respondTo:"],
  9177. referencedClasses: []
  9178. }),
  9179. smalltalk.FileServer);
  9180. smalltalk.addMethod(
  9181. unescape('_handleGETRequest_respondTo_'),
  9182. smalltalk.method({
  9183. selector: unescape('handleGETRequest%3ArespondTo%3A'),
  9184. category: 'request handling',
  9185. fn: function (aRequest, aResponse){
  9186. var self=this;
  9187. var uri=nil;
  9188. var filename=nil;
  9189. uri=smalltalk.send(smalltalk.send(self['@url'], "_parse_", [smalltalk.send(aRequest, "_url", [])]), "_pathname", []);
  9190. filename=smalltalk.send(self['@path'], "_join_with_", [smalltalk.send(self, "_basePath", []), uri]);
  9191. smalltalk.send(self['@path'], "_exists_do_", [filename, (function(boolean){return ((($receiver = boolean).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_respondNotFoundTo_", [aResponse]);})() : (function(){return smalltalk.send(self, "_respondFileNamed_to_", [filename, aResponse]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self, "_respondNotFoundTo_", [aResponse]);}), (function(){return smalltalk.send(self, "_respondFileNamed_to_", [filename, aResponse]);})]));})]);
  9192. return self;},
  9193. args: ["aRequest", "aResponse"],
  9194. source: unescape('handleGETRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09%7C%20uri%20filename%20%7C%0A%09uri%20%3A%3D%20%28url%20parse%3A%20aRequest%20url%29%20pathname.%0A%09filename%20%3A%3D%20path%20join%3A%20self%20basePath%20with%3A%20uri.%0A%09path%20exists%3A%20filename%20do%3A%20%5B%3Aboolean%20%7C%20%0A%09%09boolean%20%0A%09%09%09ifFalse%3A%20%5Bself%20respondNotFoundTo%3A%20aResponse%5D%0A%09%09%09ifTrue%3A%20%5Bself%20respondFileNamed%3A%20filename%20to%3A%20aResponse%5D%5D'),
  9195. messageSends: ["pathname", "parse:", "url", "join:with:", "basePath", "exists:do:", "ifFalse:ifTrue:", "respondNotFoundTo:", "respondFileNamed:to:"],
  9196. referencedClasses: []
  9197. }),
  9198. smalltalk.FileServer);
  9199. smalltalk.addMethod(
  9200. unescape('_handlePUTRequest_respondTo_'),
  9201. smalltalk.method({
  9202. selector: unescape('handlePUTRequest%3ArespondTo%3A'),
  9203. category: 'request handling',
  9204. fn: function (aRequest, aResponse){
  9205. var self=this;
  9206. var stream=nil;
  9207. stream=smalltalk.send(self['@fs'], "_createWriteStream_", [smalltalk.send(".", "__comma", [smalltalk.send(aRequest, "_url", [])])]);
  9208. smalltalk.send(aRequest, "_setEncoding_", ["utf8"]);
  9209. smalltalk.send(aRequest, "_on_do_", ["data", (function(data){return smalltalk.send(stream, "_write_", [data]);})]);
  9210. smalltalk.send(aRequest, "_on_do_", ["end", (function(){smalltalk.send(stream, "_end", []);return smalltalk.send(self, "_respondOKTo_", [aResponse]);})]);
  9211. return self;},
  9212. args: ["aRequest", "aResponse"],
  9213. source: unescape('handlePUTRequest%3A%20aRequest%20respondTo%3A%20aResponse%0A%09%7C%20stream%20%7C%0A%09stream%20%3A%3D%20fs%20createWriteStream%3A%20%27.%27%2C%20aRequest%20url.%0A%0A%09aRequest%20setEncoding%3A%20%27utf8%27.%0A%09aRequest%20on%3A%20%23data%20do%3A%20%5B%3Adata%20%7C%20stream%20write%3A%20data%5D.%0A%0A%09aRequest%20on%3A%20%23end%20do%3A%20%5B%0A%09%09stream%20end.%0A%09%09self%20respondOKTo%3A%20aResponse%5D'),
  9214. messageSends: ["createWriteStream:", unescape("%2C"), "url", "setEncoding:", "on:do:", "write:", "end", "respondOKTo:"],
  9215. referencedClasses: []
  9216. }),
  9217. smalltalk.FileServer);
  9218. smalltalk.addMethod(
  9219. unescape('_respondFileNamed_to_'),
  9220. smalltalk.method({
  9221. selector: unescape('respondFileNamed%3Ato%3A'),
  9222. category: 'request handling',
  9223. fn: function (aFilename, aResponse){
  9224. var self=this;
  9225. var type=nil;
  9226. var filename=nil;
  9227. filename=aFilename;
  9228. ((($receiver = smalltalk.send(smalltalk.send(self['@fs'], "_statSync_", [aFilename]), "_isDirectory", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return filename=smalltalk.send(filename, "__comma", ["index.html"]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return filename=smalltalk.send(filename, "__comma", ["index.html"]);})]));
  9229. smalltalk.send(self['@fs'], "_readFile_do_", [filename, (function(ex, file){return ((($receiver = smalltalk.send(ex, "_notNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_respondInternalErrorTo_", [aResponse]);})() : (function(){type=smalltalk.send(smalltalk.send(self, "_class", []), "_mimeTypeFor_", [filename]);return (function($rec){smalltalk.send($rec, "_writeHead_options_", [(200), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [type])])]);smalltalk.send($rec, "_write_binary_", [file, "binary"]);return smalltalk.send($rec, "_end", []);})(aResponse);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_respondInternalErrorTo_", [aResponse]);}), (function(){type=smalltalk.send(smalltalk.send(self, "_class", []), "_mimeTypeFor_", [filename]);return (function($rec){smalltalk.send($rec, "_writeHead_options_", [(200), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [type])])]);smalltalk.send($rec, "_write_binary_", [file, "binary"]);return smalltalk.send($rec, "_end", []);})(aResponse);})]));})]);
  9230. return self;},
  9231. args: ["aFilename", "aResponse"],
  9232. source: unescape('respondFileNamed%3A%20aFilename%20to%3A%20aResponse%0A%09%7C%20type%20filename%20%7C%0A%0A%09filename%20%3A%3D%20aFilename.%0A%09%28fs%20statSync%3A%20aFilename%29%20isDirectory%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20%09filename%20%3A%3D%20filename%2C%20%27index.html%27%5D.%0A%0A%09fs%20readFile%3A%20filename%20do%3A%20%5B%3Aex%20%3Afile%20%7C%0A%09%09ex%20notNil%20%0A%09%09%09ifTrue%3A%20%5Bself%20respondInternalErrorTo%3A%20aResponse%5D%0A%09%09%09ifFalse%3A%20%5B%0A%20%20%20%20%20%20%20%20%09%09%09type%20%3A%3D%20self%20class%20mimeTypeFor%3A%20filename.%0A%09%09%09%09aResponse%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09writeHead%3A%20200%20options%3A%20%20%23%7B%27Content-Type%27%20-%3E%20type%7D%3B%0A%09%09%09%09%09write%3A%20file%20binary%3A%20%27binary%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09end%5D%5D'),
  9233. messageSends: ["ifTrue:", "isDirectory", "statSync:", unescape("%2C"), "readFile:do:", "ifTrue:ifFalse:", "notNil", "respondInternalErrorTo:", "mimeTypeFor:", "class", "writeHead:options:", unescape("-%3E"), "write:binary:", "end"],
  9234. referencedClasses: []
  9235. }),
  9236. smalltalk.FileServer);
  9237. smalltalk.addMethod(
  9238. unescape('_respondInternalErrorTo_'),
  9239. smalltalk.method({
  9240. selector: unescape('respondInternalErrorTo%3A'),
  9241. category: 'request handling',
  9242. fn: function (aResponse){
  9243. var self=this;
  9244. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(500), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")])])]);smalltalk.send($rec, "_write_", ["500 Internal server error"]);return smalltalk.send($rec, "_end", []);})(aResponse);
  9245. return self;},
  9246. args: ["aResponse"],
  9247. source: unescape('respondInternalErrorTo%3A%20aResponse%0A%09aResponse%20%0A%09%09writeHead%3A%20500%20options%3A%20%23%7B%27Content-Type%27%20-%3E%20%27text/plain%27%7D%3B%0A%09%09write%3A%20%27500%20Internal%20server%20error%27%3B%0A%09%09end'),
  9248. messageSends: ["writeHead:options:", unescape("-%3E"), "write:", "end"],
  9249. referencedClasses: []
  9250. }),
  9251. smalltalk.FileServer);
  9252. smalltalk.addMethod(
  9253. unescape('_respondOKTo_'),
  9254. smalltalk.method({
  9255. selector: unescape('respondOKTo%3A'),
  9256. category: 'request handling',
  9257. fn: function (aResponse){
  9258. var self=this;
  9259. (function($rec){smalltalk.send($rec, "_writeHead_options_", [(200), smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("Content-Type"), "__minus_gt", [unescape("text/plain")])])]);return smalltalk.send($rec, "_end", []);})(aResponse);
  9260. return self;},
  9261. args: ["aResponse"],
  9262. source: unescape('respondOKTo%3A%20aResponse%0A%09aResponse%20%0A%09%09writeHead%3A%20200%20options%3A%20%23%7B%27Content-Type%27%20-%3E%20%27text/plain%27%7D%3B%0A%09%09end'),
  9263. messageSends: ["writeHead:options:", unescape("-%3E"), "end"],
  9264. referencedClasses: []
  9265. }),
  9266. smalltalk.FileServer);
  9267. smalltalk.addMethod(
  9268. unescape('_startOn_'),
  9269. smalltalk.method({
  9270. selector: unescape('startOn%3A'),
  9271. category: 'starting',
  9272. fn: function (aPort){
  9273. var self=this;
  9274. self['@port']=aPort;
  9275. smalltalk.send(self, "_start", []);
  9276. return self;},
  9277. args: ["aPort"],
  9278. source: unescape('startOn%3A%20aPort%0A%09port%20%3A%3D%20aPort.%0A%09self%20start'),
  9279. messageSends: ["start"],
  9280. referencedClasses: []
  9281. }),
  9282. smalltalk.FileServer);
  9283. smalltalk.addMethod(
  9284. unescape('_start'),
  9285. smalltalk.method({
  9286. selector: unescape('start'),
  9287. category: 'starting',
  9288. fn: function (){
  9289. var self=this;
  9290. smalltalk.send(smalltalk.send(self['@http'], "_createServer_", [(function(request, response){return smalltalk.send(self, "_handleRequest_respondTo_", [request, response]);})]), "_listen_", [smalltalk.send(self, "_port", [])]);
  9291. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send("Starting file server on port ", "__comma", [smalltalk.send(smalltalk.send(self, "_port", []), "_asString", [])])]);
  9292. return self;},
  9293. args: [],
  9294. source: unescape('start%0A%09%28http%20createServer%3A%20%5B%3Arequest%20%3Aresponse%20%7C%0A%09%20%09self%20handleRequest%3A%20request%20respondTo%3A%20response%5D%29%20listen%3A%20self%20port.%0A%09console%20log%3A%20%27Starting%20file%20server%20on%20port%20%27%2C%20self%20port%20asString'),
  9295. messageSends: ["listen:", "createServer:", "handleRequest:respondTo:", "port", "log:", unescape("%2C"), "asString"],
  9296. referencedClasses: []
  9297. }),
  9298. smalltalk.FileServer);
  9299. smalltalk.FileServer.klass.iVarNames = ['port','mimeTypes'];
  9300. smalltalk.addMethod(
  9301. unescape('_port'),
  9302. smalltalk.method({
  9303. selector: unescape('port'),
  9304. category: 'accessing',
  9305. fn: function (){
  9306. var self=this;
  9307. return (($receiver = self['@port']) == nil || $receiver == undefined) ? (function(){return (4000);})() : $receiver;
  9308. return self;},
  9309. args: [],
  9310. source: unescape('port%0A%09%5Eport%20ifNil%3A%20%5B4000%5D'),
  9311. messageSends: ["ifNil:"],
  9312. referencedClasses: []
  9313. }),
  9314. smalltalk.FileServer.klass);
  9315. smalltalk.addMethod(
  9316. unescape('_port_'),
  9317. smalltalk.method({
  9318. selector: unescape('port%3A'),
  9319. category: 'accessing',
  9320. fn: function (aNumber){
  9321. var self=this;
  9322. self['@port']=aNumber;
  9323. return self;},
  9324. args: ["aNumber"],
  9325. source: unescape('port%3A%20aNumber%0A%09port%20%3A%3D%20aNumber'),
  9326. messageSends: [],
  9327. referencedClasses: []
  9328. }),
  9329. smalltalk.FileServer.klass);
  9330. smalltalk.addMethod(
  9331. unescape('_defaultMimeTypes'),
  9332. smalltalk.method({
  9333. selector: unescape('defaultMimeTypes'),
  9334. category: 'accessing',
  9335. fn: function (){
  9336. var self=this;
  9337. return smalltalk.Dictionary._fromPairs_([smalltalk.send(unescape("%25"), "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("323", "__minus_gt", [unescape("text/h323")]),smalltalk.send("abw", "__minus_gt", [unescape("application/x-abiword")]),smalltalk.send("ai", "__minus_gt", [unescape("application/postscript")]),smalltalk.send("aif", "__minus_gt", [unescape("audio/x-aiff")]),smalltalk.send("aifc", "__minus_gt", [unescape("audio/x-aiff")]),smalltalk.send("aiff", "__minus_gt", [unescape("audio/x-aiff")]),smalltalk.send("alc", "__minus_gt", [unescape("chemical/x-alchemy")]),smalltalk.send("art", "__minus_gt", [unescape("image/x-jg")]),smalltalk.send("asc", "__minus_gt", [unescape("text/plain")]),smalltalk.send("asf", "__minus_gt", [unescape("video/x-ms-asf")]),smalltalk.send("asn", "__minus_gt", [unescape("chemical/x-ncbi-asn1-spec")]),smalltalk.send("aso", "__minus_gt", [unescape("chemical/x-ncbi-asn1-binary")]),smalltalk.send("asx", "__minus_gt", [unescape("video/x-ms-asf")]),smalltalk.send("au", "__minus_gt", [unescape("audio/basic")]),smalltalk.send("avi", "__minus_gt", [unescape("video/x-msvideo")]),smalltalk.send("b", "__minus_gt", [unescape("chemical/x-molconn-Z")]),smalltalk.send("bak", "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("bat", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("bcpio", "__minus_gt", [unescape("application/x-bcpio")]),smalltalk.send("bib", "__minus_gt", [unescape("text/x-bibtex")]),smalltalk.send("bin", "__minus_gt", [unescape("application/octet-stream")]),smalltalk.send("bmp", "__minus_gt", [unescape("image/x-ms-bmp")]),smalltalk.send("book", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("bsd", "__minus_gt", [unescape("chemical/x-crossfire")]),smalltalk.send("c", "__minus_gt", [unescape("text/x-csrc")]),smalltalk.send(unescape("c++"), "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("c3d", "__minus_gt", [unescape("chemical/x-chem3d")]),smalltalk.send("cac", "__minus_gt", [unescape("chemical/x-cache")]),smalltalk.send("cache", "__minus_gt", [unescape("chemical/x-cache")]),smalltalk.send("cascii", "__minus_gt", [unescape("chemical/x-cactvs-binary")]),smalltalk.send("cat", "__minus_gt", [unescape("application/vnd.ms-pki.seccat")]),smalltalk.send("cbin", "__minus_gt", [unescape("chemical/x-cactvs-binary")]),smalltalk.send("cc", "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("cdf", "__minus_gt", [unescape("application/x-cdf")]),smalltalk.send("cdr", "__minus_gt", [unescape("image/x-coreldraw")]),smalltalk.send("cdt", "__minus_gt", [unescape("image/x-coreldrawtemplate")]),smalltalk.send("cdx", "__minus_gt", [unescape("chemical/x-cdx")]),smalltalk.send("cdy", "__minus_gt", [unescape("application/vnd.cinderella")]),smalltalk.send("cef", "__minus_gt", [unescape("chemical/x-cxf")]),smalltalk.send("cer", "__minus_gt", [unescape("chemical/x-cerius")]),smalltalk.send("chm", "__minus_gt", [unescape("chemical/x-chemdraw")]),smalltalk.send("chrt", "__minus_gt", [unescape("application/x-kchart")]),smalltalk.send("cif", "__minus_gt", [unescape("chemical/x-cif")]),smalltalk.send("class", "__minus_gt", [unescape("application/java-vm")]),smalltalk.send("cls", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("cmdf", "__minus_gt", [unescape("chemical/x-cmdf")]),smalltalk.send("cml", "__minus_gt", [unescape("chemical/x-cml")]),smalltalk.send("cod", "__minus_gt", [unescape("application/vnd.rim.cod")]),smalltalk.send("com", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("cpa", "__minus_gt", [unescape("chemical/x-compass")]),smalltalk.send("cpio", "__minus_gt", [unescape("application/x-cpio")]),smalltalk.send("cpp", "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("cpt", "__minus_gt", [unescape("image/x-corelphotopaint")]),smalltalk.send("crl", "__minus_gt", [unescape("application/x-pkcs7-crl")]),smalltalk.send("crt", "__minus_gt", [unescape("application/x-x509-ca-cert")]),smalltalk.send("csf", "__minus_gt", [unescape("chemical/x-cache-csf")]),smalltalk.send("csh", "__minus_gt", [unescape("text/x-csh")]),smalltalk.send("csm", "__minus_gt", [unescape("chemical/x-csml")]),smalltalk.send("csml", "__minus_gt", [unescape("chemical/x-csml")]),smalltalk.send("css", "__minus_gt", [unescape("text/css")]),smalltalk.send("csv", "__minus_gt", [unescape("text/comma-separated-values")]),smalltalk.send("ctab", "__minus_gt", [unescape("chemical/x-cactvs-binary")]),smalltalk.send("ctx", "__minus_gt", [unescape("chemical/x-ctx")]),smalltalk.send("cu", "__minus_gt", [unescape("application/cu-seeme")]),smalltalk.send("cub", "__minus_gt", [unescape("chemical/x-gaussian-cube")]),smalltalk.send("cxf", "__minus_gt", [unescape("chemical/x-cxf")]),smalltalk.send("cxx", "__minus_gt", [unescape("text/x-c++src")]),smalltalk.send("dat", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("dcr", "__minus_gt", [unescape("application/x-director")]),smalltalk.send("deb", "__minus_gt", [unescape("application/x-debian-package")]),smalltalk.send("dif", "__minus_gt", [unescape("video/dv")]),smalltalk.send("diff", "__minus_gt", [unescape("text/plain")]),smalltalk.send("dir", "__minus_gt", [unescape("application/x-director")]),smalltalk.send("djv", "__minus_gt", [unescape("image/vnd.djvu")]),smalltalk.send("djvu", "__minus_gt", [unescape("image/vnd.djvu")]),smalltalk.send("dl", "__minus_gt", [unescape("video/dl")]),smalltalk.send("dll", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("dmg", "__minus_gt", [unescape("application/x-apple-diskimage")]),smalltalk.send("dms", "__minus_gt", [unescape("application/x-dms")]),smalltalk.send("doc", "__minus_gt", [unescape("application/msword")]),smalltalk.send("dot", "__minus_gt", [unescape("application/msword")]),smalltalk.send("dv", "__minus_gt", [unescape("video/dv")]),smalltalk.send("dvi", "__minus_gt", [unescape("application/x-dvi")]),smalltalk.send("dx", "__minus_gt", [unescape("chemical/x-jcamp-dx")]),smalltalk.send("dxr", "__minus_gt", [unescape("application/x-director")]),smalltalk.send("emb", "__minus_gt", [unescape("chemical/x-embl-dl-nucleotide")]),smalltalk.send("embl", "__minus_gt", [unescape("chemical/x-embl-dl-nucleotide")]),smalltalk.send("ent", "__minus_gt", [unescape("chemical/x-pdb")]),smalltalk.send("eps", "__minus_gt", [unescape("application/postscript")]),smalltalk.send("etx", "__minus_gt", [unescape("text/x-setext")]),smalltalk.send("exe", "__minus_gt", [unescape("application/x-msdos-program")]),smalltalk.send("ez", "__minus_gt", [unescape("application/andrew-inset")]),smalltalk.send("fb", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("fbdoc", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("fch", "__minus_gt", [unescape("chemical/x-gaussian-checkpoint")]),smalltalk.send("fchk", "__minus_gt", [unescape("chemical/x-gaussian-checkpoint")]),smalltalk.send("fig", "__minus_gt", [unescape("application/x-xfig")]),smalltalk.send("flac", "__minus_gt", [unescape("application/x-flac")]),smalltalk.send("fli", "__minus_gt", [unescape("video/fli")]),smalltalk.send("fm", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("frame", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("frm", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("gal", "__minus_gt", [unescape("chemical/x-gaussian-log")]),smalltalk.send("gam", "__minus_gt", [unescape("chemical/x-gamess-input")]),smalltalk.send("gamin", "__minus_gt", [unescape("chemical/x-gamess-input")]),smalltalk.send("gau", "__minus_gt", [unescape("chemical/x-gaussian-input")]),smalltalk.send("gcd", "__minus_gt", [unescape("text/x-pcs-gcd")]),smalltalk.send("gcf", "__minus_gt", [unescape("application/x-graphing-calculator")]),smalltalk.send("gcg", "__minus_gt", [unescape("chemical/x-gcg8-sequence")]),smalltalk.send("gen", "__minus_gt", [unescape("chemical/x-genbank")]),smalltalk.send("gf", "__minus_gt", [unescape("application/x-tex-gf")]),smalltalk.send("gif", "__minus_gt", [unescape("image/gif")]),smalltalk.send("gjc", "__minus_gt", [unescape("chemical/x-gaussian-input")]),smalltalk.send("gjf", "__minus_gt", [unescape("chemical/x-gaussian-input")]),smalltalk.send("gl", "__minus_gt", [unescape("video/gl")]),smalltalk.send("gnumeric", "__minus_gt", [unescape("application/x-gnumeric")]),smalltalk.send("gpt", "__minus_gt", [unescape("chemical/x-mopac-graph")]),smalltalk.send("gsf", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("gsm", "__minus_gt", [unescape("audio/x-gsm")]),smalltalk.send("gtar", "__minus_gt", [unescape("application/x-gtar")]),smalltalk.send("h", "__minus_gt", [unescape("text/x-chdr")]),smalltalk.send(unescape("h++"), "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("hdf", "__minus_gt", [unescape("application/x-hdf")]),smalltalk.send("hh", "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("hin", "__minus_gt", [unescape("chemical/x-hin")]),smalltalk.send("hpp", "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("hqx", "__minus_gt", [unescape("application/mac-binhex40")]),smalltalk.send("hs", "__minus_gt", [unescape("text/x-haskell")]),smalltalk.send("hta", "__minus_gt", [unescape("application/hta")]),smalltalk.send("htc", "__minus_gt", [unescape("text/x-component")]),smalltalk.send("htm", "__minus_gt", [unescape("text/html")]),smalltalk.send("html", "__minus_gt", [unescape("text/html")]),smalltalk.send("hxx", "__minus_gt", [unescape("text/x-c++hdr")]),smalltalk.send("ica", "__minus_gt", [unescape("application/x-ica")]),smalltalk.send("ice", "__minus_gt", [unescape("x-conference/x-cooltalk")]),smalltalk.send("ico", "__minus_gt", [unescape("image/x-icon")]),smalltalk.send("ics", "__minus_gt", [unescape("text/calendar")]),smalltalk.send("icz", "__minus_gt", [unescape("text/calendar")]),smalltalk.send("ief", "__minus_gt", [unescape("image/ief")]),smalltalk.send("iges", "__minus_gt", [unescape("model/iges")]),smalltalk.send("igs", "__minus_gt", [unescape("model/iges")]),smalltalk.send("iii", "__minus_gt", [unescape("application/x-iphone")]),smalltalk.send("inp", "__minus_gt", [unescape("chemical/x-gamess-input")]),smalltalk.send("ins", "__minus_gt", [unescape("application/x-internet-signup")]),smalltalk.send("iso", "__minus_gt", [unescape("application/x-iso9660-image")]),smalltalk.send("isp", "__minus_gt", [unescape("application/x-internet-signup")]),smalltalk.send("ist", "__minus_gt", [unescape("chemical/x-isostar")]),smalltalk.send("istr", "__minus_gt", [unescape("chemical/x-isostar")]),smalltalk.send("jad", "__minus_gt", [unescape("text/vnd.sun.j2me.app-descriptor")]),smalltalk.send("jar", "__minus_gt", [unescape("application/java-archive")]),smalltalk.send("java", "__minus_gt", [unescape("text/x-java")]),smalltalk.send("jdx", "__minus_gt", [unescape("chemical/x-jcamp-dx")]),smalltalk.send("jmz", "__minus_gt", [unescape("application/x-jmol")]),smalltalk.send("jng", "__minus_gt", [unescape("image/x-jng")]),smalltalk.send("jnlp", "__minus_gt", [unescape("application/x-java-jnlp-file")]),smalltalk.send("jpe", "__minus_gt", [unescape("image/jpeg")]),smalltalk.send("jpeg", "__minus_gt", [unescape("image/jpeg")]),smalltalk.send("jpg", "__minus_gt", [unescape("image/jpeg")]),smalltalk.send("js", "__minus_gt", [unescape("application/javascript")]),smalltalk.send("kar", "__minus_gt", [unescape("audio/midi")]),smalltalk.send("key", "__minus_gt", [unescape("application/pgp-keys")]),smalltalk.send("kil", "__minus_gt", [unescape("application/x-killustrator")]),smalltalk.send("kin", "__minus_gt", [unescape("chemical/x-kinemage")]),smalltalk.send("kpr", "__minus_gt", [unescape("application/x-kpresenter")]),smalltalk.send("kpt", "__minus_gt", [unescape("application/x-kpresenter")]),smalltalk.send("ksp", "__minus_gt", [unescape("application/x-kspread")]),smalltalk.send("kwd", "__minus_gt", [unescape("application/x-kword")]),smalltalk.send("kwt", "__minus_gt", [unescape("application/x-kword")]),smalltalk.send("latex", "__minus_gt", [unescape("application/x-latex")]),smalltalk.send("lha", "__minus_gt", [unescape("application/x-lha")]),smalltalk.send("lhs", "__minus_gt", [unescape("text/x-literate-haskell")]),smalltalk.send("lsf", "__minus_gt", [unescape("video/x-la-asf")]),smalltalk.send("lsx", "__minus_gt", [unescape("video/x-la-asf")]),smalltalk.send("ltx", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("lzh", "__minus_gt", [unescape("application/x-lzh")]),smalltalk.send("lzx", "__minus_gt", [unescape("application/x-lzx")]),smalltalk.send("m3u", "__minus_gt", [unescape("audio/x-mpegurl")]),smalltalk.send("m4a", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("maker", "__minus_gt", [unescape("application/x-maker")]),smalltalk.send("man", "__minus_gt", [unescape("application/x-troff-man")]),smalltalk.send("mcif", "__minus_gt", [unescape("chemical/x-mmcif")]),smalltalk.send("mcm", "__minus_gt", [unescape("chemical/x-macmolecule")]),smalltalk.send("mdb", "__minus_gt", [unescape("application/msaccess")]),smalltalk.send("me", "__minus_gt", [unescape("application/x-troff-me")]),smalltalk.send("mesh", "__minus_gt", [unescape("model/mesh")]),smalltalk.send("mid", "__minus_gt", [unescape("audio/midi")]),smalltalk.send("midi", "__minus_gt", [unescape("audio/midi")]),smalltalk.send("mif", "__minus_gt", [unescape("application/x-mif")]),smalltalk.send("mm", "__minus_gt", [unescape("application/x-freemind")]),smalltalk.send("mmd", "__minus_gt", [unescape("chemical/x-macromodel-input")]),smalltalk.send("mmf", "__minus_gt", [unescape("application/vnd.smaf")]),smalltalk.send("mml", "__minus_gt", [unescape("text/mathml")]),smalltalk.send("mmod", "__minus_gt", [unescape("chemical/x-macromodel-input")]),smalltalk.send("mng", "__minus_gt", [unescape("video/x-mng")]),smalltalk.send("moc", "__minus_gt", [unescape("text/x-moc")]),smalltalk.send("mol", "__minus_gt", [unescape("chemical/x-mdl-molfile")]),smalltalk.send("mol2", "__minus_gt", [unescape("chemical/x-mol2")]),smalltalk.send("moo", "__minus_gt", [unescape("chemical/x-mopac-out")]),smalltalk.send("mop", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("mopcrt", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("mov", "__minus_gt", [unescape("video/quicktime")]),smalltalk.send("movie", "__minus_gt", [unescape("video/x-sgi-movie")]),smalltalk.send("mp2", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("mp3", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("mp4", "__minus_gt", [unescape("video/mp4")]),smalltalk.send("mpc", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send("mpe", "__minus_gt", [unescape("video/mpeg")]),smalltalk.send("mpeg", "__minus_gt", [unescape("video/mpeg")]),smalltalk.send("mpega", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("mpg", "__minus_gt", [unescape("video/mpeg")]),smalltalk.send("mpga", "__minus_gt", [unescape("audio/mpeg")]),smalltalk.send("ms", "__minus_gt", [unescape("application/x-troff-ms")]),smalltalk.send("msh", "__minus_gt", [unescape("model/mesh")]),smalltalk.send("msi", "__minus_gt", [unescape("application/x-msi")]),smalltalk.send("mvb", "__minus_gt", [unescape("chemical/x-mopac-vib")]),smalltalk.send("mxu", "__minus_gt", [unescape("video/vnd.mpegurl")]),smalltalk.send("nb", "__minus_gt", [unescape("application/mathematica")]),smalltalk.send("nc", "__minus_gt", [unescape("application/x-netcdf")]),smalltalk.send("nwc", "__minus_gt", [unescape("application/x-nwc")]),smalltalk.send("o", "__minus_gt", [unescape("application/x-object")]),smalltalk.send("oda", "__minus_gt", [unescape("application/oda")]),smalltalk.send("odb", "__minus_gt", [unescape("application/vnd.oasis.opendocument.database")]),smalltalk.send("odc", "__minus_gt", [unescape("application/vnd.oasis.opendocument.chart")]),smalltalk.send("odf", "__minus_gt", [unescape("application/vnd.oasis.opendocument.formula")]),smalltalk.send("odg", "__minus_gt", [unescape("application/vnd.oasis.opendocument.graphics")]),smalltalk.send("odi", "__minus_gt", [unescape("application/vnd.oasis.opendocument.image")]),smalltalk.send("odm", "__minus_gt", [unescape("application/vnd.oasis.opendocument.text-master")]),smalltalk.send("odp", "__minus_gt", [unescape("application/vnd.oasis.opendocument.presentation")]),smalltalk.send("ods", "__minus_gt", [unescape("application/vnd.oasis.opendocument.spreadsheet")]),smalltalk.send("odt", "__minus_gt", [unescape("application/vnd.oasis.opendocument.text")]),smalltalk.send("ogg", "__minus_gt", [unescape("application/ogg")]),smalltalk.send("old", "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("oth", "__minus_gt", [unescape("application/vnd.oasis.opendocument.text-web")]),smalltalk.send("oza", "__minus_gt", [unescape("application/x-oz-application")]),smalltalk.send("p", "__minus_gt", [unescape("text/x-pascal")]),smalltalk.send("p7r", "__minus_gt", [unescape("application/x-pkcs7-certreqresp")]),smalltalk.send("pac", "__minus_gt", [unescape("application/x-ns-proxy-autoconfig")]),smalltalk.send("pas", "__minus_gt", [unescape("text/x-pascal")]),smalltalk.send("pat", "__minus_gt", [unescape("image/x-coreldrawpattern")]),smalltalk.send("pbm", "__minus_gt", [unescape("image/x-portable-bitmap")]),smalltalk.send("pcf", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pcf.Z", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pcx", "__minus_gt", [unescape("image/pcx")]),smalltalk.send("pdb", "__minus_gt", [unescape("chemical/x-pdb")]),smalltalk.send("pdf", "__minus_gt", [unescape("application/pdf")]),smalltalk.send("pfa", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pfb", "__minus_gt", [unescape("application/x-font")]),smalltalk.send("pgm", "__minus_gt", [unescape("image/x-portable-graymap")]),smalltalk.send("pgn", "__minus_gt", [unescape("application/x-chess-pgn")]),smalltalk.send("pgp", "__minus_gt", [unescape("application/pgp-signature")]),smalltalk.send("pk", "__minus_gt", [unescape("application/x-tex-pk")]),smalltalk.send("pl", "__minus_gt", [unescape("text/x-perl")]),smalltalk.send("pls", "__minus_gt", [unescape("audio/x-scpls")]),smalltalk.send("pm", "__minus_gt", [unescape("text/x-perl")]),smalltalk.send("png", "__minus_gt", [unescape("image/png")]),smalltalk.send("pnm", "__minus_gt", [unescape("image/x-portable-anymap")]),smalltalk.send("pot", "__minus_gt", [unescape("text/plain")]),smalltalk.send("ppm", "__minus_gt", [unescape("image/x-portable-pixmap")]),smalltalk.send("pps", "__minus_gt", [unescape("application/vnd.ms-powerpoint")]),smalltalk.send("ppt", "__minus_gt", [unescape("application/vnd.ms-powerpoint")]),smalltalk.send("prf", "__minus_gt", [unescape("application/pics-rules")]),smalltalk.send("prt", "__minus_gt", [unescape("chemical/x-ncbi-asn1-ascii")]),smalltalk.send("ps", "__minus_gt", [unescape("application/postscript")]),smalltalk.send("psd", "__minus_gt", [unescape("image/x-photoshop")]),smalltalk.send("psp", "__minus_gt", [unescape("text/x-psp")]),smalltalk.send("py", "__minus_gt", [unescape("text/x-python")]),smalltalk.send("pyc", "__minus_gt", [unescape("application/x-python-code")]),smalltalk.send("pyo", "__minus_gt", [unescape("application/x-python-code")]),smalltalk.send("qt", "__minus_gt", [unescape("video/quicktime")]),smalltalk.send("qtl", "__minus_gt", [unescape("application/x-quicktimeplayer")]),smalltalk.send("ra", "__minus_gt", [unescape("audio/x-realaudio")]),smalltalk.send("ram", "__minus_gt", [unescape("audio/x-pn-realaudio")]),smalltalk.send("rar", "__minus_gt", [unescape("application/rar")]),smalltalk.send("ras", "__minus_gt", [unescape("image/x-cmu-raster")]),smalltalk.send("rd", "__minus_gt", [unescape("chemical/x-mdl-rdfile")]),smalltalk.send("rdf", "__minus_gt", [unescape("application/rdf+xml")]),smalltalk.send("rgb", "__minus_gt", [unescape("image/x-rgb")]),smalltalk.send("rm", "__minus_gt", [unescape("audio/x-pn-realaudio")]),smalltalk.send("roff", "__minus_gt", [unescape("application/x-troff")]),smalltalk.send("ros", "__minus_gt", [unescape("chemical/x-rosdal")]),smalltalk.send("rpm", "__minus_gt", [unescape("application/x-redhat-package-manager")]),smalltalk.send("rss", "__minus_gt", [unescape("application/rss+xml")]),smalltalk.send("rtf", "__minus_gt", [unescape("text/rtf")]),smalltalk.send("rtx", "__minus_gt", [unescape("text/richtext")]),smalltalk.send("rxn", "__minus_gt", [unescape("chemical/x-mdl-rxnfile")]),smalltalk.send("sct", "__minus_gt", [unescape("text/scriptlet")]),smalltalk.send("sd", "__minus_gt", [unescape("chemical/x-mdl-sdfile")]),smalltalk.send("sd2", "__minus_gt", [unescape("audio/x-sd2")]),smalltalk.send("sda", "__minus_gt", [unescape("application/vnd.stardivision.draw")]),smalltalk.send("sdc", "__minus_gt", [unescape("application/vnd.stardivision.calc")]),smalltalk.send("sdd", "__minus_gt", [unescape("application/vnd.stardivision.impress")]),smalltalk.send("sdf", "__minus_gt", [unescape("chemical/x-mdl-sdfile")]),smalltalk.send("sdp", "__minus_gt", [unescape("application/vnd.stardivision.impress")]),smalltalk.send("sdw", "__minus_gt", [unescape("application/vnd.stardivision.writer")]),smalltalk.send("ser", "__minus_gt", [unescape("application/java-serialized-object")]),smalltalk.send("sgf", "__minus_gt", [unescape("application/x-go-sgf")]),smalltalk.send("sgl", "__minus_gt", [unescape("application/vnd.stardivision.writer-global")]),smalltalk.send("sh", "__minus_gt", [unescape("text/x-sh")]),smalltalk.send("shar", "__minus_gt", [unescape("application/x-shar")]),smalltalk.send("shtml", "__minus_gt", [unescape("text/html")]),smalltalk.send("sid", "__minus_gt", [unescape("audio/prs.sid")]),smalltalk.send("sik", "__minus_gt", [unescape("application/x-trash")]),smalltalk.send("silo", "__minus_gt", [unescape("model/mesh")]),smalltalk.send("sis", "__minus_gt", [unescape("application/vnd.symbian.install")]),smalltalk.send("sit", "__minus_gt", [unescape("application/x-stuffit")]),smalltalk.send("skd", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("skm", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("skp", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("skt", "__minus_gt", [unescape("application/x-koan")]),smalltalk.send("smf", "__minus_gt", [unescape("application/vnd.stardivision.math")]),smalltalk.send("smi", "__minus_gt", [unescape("application/smil")]),smalltalk.send("smil", "__minus_gt", [unescape("application/smil")]),smalltalk.send("snd", "__minus_gt", [unescape("audio/basic")]),smalltalk.send("spc", "__minus_gt", [unescape("chemical/x-galactic-spc")]),smalltalk.send("spl", "__minus_gt", [unescape("application/x-futuresplash")]),smalltalk.send("src", "__minus_gt", [unescape("application/x-wais-source")]),smalltalk.send("stc", "__minus_gt", [unescape("application/vnd.sun.xml.calc.template")]),smalltalk.send("std", "__minus_gt", [unescape("application/vnd.sun.xml.draw.template")]),smalltalk.send("sti", "__minus_gt", [unescape("application/vnd.sun.xml.impress.template")]),smalltalk.send("stl", "__minus_gt", [unescape("application/vnd.ms-pki.stl")]),smalltalk.send("stw", "__minus_gt", [unescape("application/vnd.sun.xml.writer.template")]),smalltalk.send("sty", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("sv4cpio", "__minus_gt", [unescape("application/x-sv4cpio")]),smalltalk.send("sv4crc", "__minus_gt", [unescape("application/x-sv4crc")]),smalltalk.send("svg", "__minus_gt", [unescape("image/svg+xml")]),smalltalk.send("svgz", "__minus_gt", [unescape("image/svg+xml")]),smalltalk.send("sw", "__minus_gt", [unescape("chemical/x-swissprot")]),smalltalk.send("swf", "__minus_gt", [unescape("application/x-shockwave-flash")]),smalltalk.send("swfl", "__minus_gt", [unescape("application/x-shockwave-flash")]),smalltalk.send("sxc", "__minus_gt", [unescape("application/vnd.sun.xml.calc")]),smalltalk.send("sxd", "__minus_gt", [unescape("application/vnd.sun.xml.draw")]),smalltalk.send("sxg", "__minus_gt", [unescape("application/vnd.sun.xml.writer.global")]),smalltalk.send("sxi", "__minus_gt", [unescape("application/vnd.sun.xml.impress")]),smalltalk.send("sxm", "__minus_gt", [unescape("application/vnd.sun.xml.math")]),smalltalk.send("sxw", "__minus_gt", [unescape("application/vnd.sun.xml.writer")]),smalltalk.send("t", "__minus_gt", [unescape("application/x-troff")]),smalltalk.send("tar", "__minus_gt", [unescape("application/x-tar")]),smalltalk.send("taz", "__minus_gt", [unescape("application/x-gtar")]),smalltalk.send("tcl", "__minus_gt", [unescape("text/x-tcl")]),smalltalk.send("tex", "__minus_gt", [unescape("text/x-tex")]),smalltalk.send("texi", "__minus_gt", [unescape("application/x-texinfo")]),smalltalk.send("texinfo", "__minus_gt", [unescape("application/x-texinfo")]),smalltalk.send("text", "__minus_gt", [unescape("text/plain")]),smalltalk.send("tgf", "__minus_gt", [unescape("chemical/x-mdl-tgf")]),smalltalk.send("tgz", "__minus_gt", [unescape("application/x-gtar")]),smalltalk.send("tif", "__minus_gt", [unescape("image/tiff")]),smalltalk.send("tiff", "__minus_gt", [unescape("image/tiff")]),smalltalk.send("tk", "__minus_gt", [unescape("text/x-tcl")]),smalltalk.send("tm", "__minus_gt", [unescape("text/texmacs")]),smalltalk.send("torrent", "__minus_gt", [unescape("application/x-bittorrent")]),smalltalk.send("tr", "__minus_gt", [unescape("application/x-troff")]),smalltalk.send("ts", "__minus_gt", [unescape("text/texmacs")]),smalltalk.send("tsp", "__minus_gt", [unescape("application/dsptype")]),smalltalk.send("tsv", "__minus_gt", [unescape("text/tab-separated-values")]),smalltalk.send("txt", "__minus_gt", [unescape("text/plain")]),smalltalk.send("udeb", "__minus_gt", [unescape("application/x-debian-package")]),smalltalk.send("uls", "__minus_gt", [unescape("text/iuls")]),smalltalk.send("ustar", "__minus_gt", [unescape("application/x-ustar")]),smalltalk.send("val", "__minus_gt", [unescape("chemical/x-ncbi-asn1-binary")]),smalltalk.send("vcd", "__minus_gt", [unescape("application/x-cdlink")]),smalltalk.send("vcf", "__minus_gt", [unescape("text/x-vcard")]),smalltalk.send("vcs", "__minus_gt", [unescape("text/x-vcalendar")]),smalltalk.send("vmd", "__minus_gt", [unescape("chemical/x-vmd")]),smalltalk.send("vms", "__minus_gt", [unescape("chemical/x-vamas-iso14976")]),smalltalk.send("vor", "__minus_gt", [unescape("application/vnd.stardivision.writer")]),smalltalk.send("vrm", "__minus_gt", [unescape("x-world/x-vrml")]),smalltalk.send("vrml", "__minus_gt", [unescape("x-world/x-vrml")]),smalltalk.send("vsd", "__minus_gt", [unescape("application/vnd.visio")]),smalltalk.send("wad", "__minus_gt", [unescape("application/x-doom")]),smalltalk.send("wav", "__minus_gt", [unescape("audio/x-wav")]),smalltalk.send("wax", "__minus_gt", [unescape("audio/x-ms-wax")]),smalltalk.send("wbmp", "__minus_gt", [unescape("image/vnd.wap.wbmp")]),smalltalk.send("wbxml", "__minus_gt", [unescape("application/vnd.wap.wbxml")]),smalltalk.send("wk", "__minus_gt", [unescape("application/x-123")]),smalltalk.send("wm", "__minus_gt", [unescape("video/x-ms-wm")]),smalltalk.send("wma", "__minus_gt", [unescape("audio/x-ms-wma")]),smalltalk.send("wmd", "__minus_gt", [unescape("application/x-ms-wmd")]),smalltalk.send("wml", "__minus_gt", [unescape("text/vnd.wap.wml")]),smalltalk.send("wmlc", "__minus_gt", [unescape("application/vnd.wap.wmlc")]),smalltalk.send("wmls", "__minus_gt", [unescape("text/vnd.wap.wmlscript")]),smalltalk.send("wmlsc", "__minus_gt", [unescape("application/vnd.wap.wmlscriptc")]),smalltalk.send("wmv", "__minus_gt", [unescape("video/x-ms-wmv")]),smalltalk.send("wmx", "__minus_gt", [unescape("video/x-ms-wmx")]),smalltalk.send("wmz", "__minus_gt", [unescape("application/x-ms-wmz")]),smalltalk.send("wp5", "__minus_gt", [unescape("application/wordperfect5.1")]),smalltalk.send("wpd", "__minus_gt", [unescape("application/wordperfect")]),smalltalk.send("wrl", "__minus_gt", [unescape("x-world/x-vrml")]),smalltalk.send("wsc", "__minus_gt", [unescape("text/scriptlet")]),smalltalk.send("wvx", "__minus_gt", [unescape("video/x-ms-wvx")]),smalltalk.send("wz", "__minus_gt", [unescape("application/x-wingz")]),smalltalk.send("xbm", "__minus_gt", [unescape("image/x-xbitmap")]),smalltalk.send("xcf", "__minus_gt", [unescape("application/x-xcf")]),smalltalk.send("xht", "__minus_gt", [unescape("application/xhtml+xml")]),smalltalk.send("xhtml", "__minus_gt", [unescape("application/xhtml+xml")]),smalltalk.send("xlb", "__minus_gt", [unescape("application/vnd.ms-excel")]),smalltalk.send("xls", "__minus_gt", [unescape("application/vnd.ms-excel")]),smalltalk.send("xlt", "__minus_gt", [unescape("application/vnd.ms-excel")]),smalltalk.send("xml", "__minus_gt", [unescape("application/xml")]),smalltalk.send("xpi", "__minus_gt", [unescape("application/x-xpinstall")]),smalltalk.send("xpm", "__minus_gt", [unescape("image/x-xpixmap")]),smalltalk.send("xsl", "__minus_gt", [unescape("application/xml")]),smalltalk.send("xtel", "__minus_gt", [unescape("chemical/x-xtel")]),smalltalk.send("xul", "__minus_gt", [unescape("application/vnd.mozilla.xul+xml")]),smalltalk.send("xwd", "__minus_gt", [unescape("image/x-xwindowdump")]),smalltalk.send("xyz", "__minus_gt", [unescape("chemical/x-xyz")]),smalltalk.send("zip", "__minus_gt", [unescape("application/zip")]),smalltalk.send("zmt", "__minus_gt", [unescape("chemical/x-mopac-input")]),smalltalk.send(unescape("%7E"), "__minus_gt", [unescape("application/x-trash")])]);
  9338. return self;},
  9339. args: [],
  9340. source: unescape('defaultMimeTypes%0A%09%5E%20%23%7B%0A%09%09%27%25%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27323%27%20-%3E%20%27text/h323%27.%0A%09%09%27abw%27%20-%3E%20%27application/x-abiword%27.%0A%09%09%27ai%27%20-%3E%20%27application/postscript%27.%0A%09%09%27aif%27%20-%3E%20%27audio/x-aiff%27.%0A%09%09%27aifc%27%20-%3E%20%27audio/x-aiff%27.%0A%09%09%27aiff%27%20-%3E%20%27audio/x-aiff%27.%0A%09%09%27alc%27%20-%3E%20%27chemical/x-alchemy%27.%0A%09%09%27art%27%20-%3E%20%27image/x-jg%27.%0A%09%09%27asc%27%20-%3E%20%27text/plain%27.%0A%09%09%27asf%27%20-%3E%20%27video/x-ms-asf%27.%0A%09%09%27asn%27%20-%3E%20%27chemical/x-ncbi-asn1-spec%27.%0A%09%09%27aso%27%20-%3E%20%27chemical/x-ncbi-asn1-binary%27.%0A%09%09%27asx%27%20-%3E%20%27video/x-ms-asf%27.%0A%09%09%27au%27%20-%3E%20%27audio/basic%27.%0A%09%09%27avi%27%20-%3E%20%27video/x-msvideo%27.%0A%09%09%27b%27%20-%3E%20%27chemical/x-molconn-Z%27.%0A%09%09%27bak%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27bat%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27bcpio%27%20-%3E%20%27application/x-bcpio%27.%0A%09%09%27bib%27%20-%3E%20%27text/x-bibtex%27.%0A%09%09%27bin%27%20-%3E%20%27application/octet-stream%27.%0A%09%09%27bmp%27%20-%3E%20%27image/x-ms-bmp%27.%0A%09%09%27book%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27bsd%27%20-%3E%20%27chemical/x-crossfire%27.%0A%09%09%27c%27%20-%3E%20%27text/x-csrc%27.%0A%09%09%27c++%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27c3d%27%20-%3E%20%27chemical/x-chem3d%27.%0A%09%09%27cac%27%20-%3E%20%27chemical/x-cache%27.%0A%09%09%27cache%27%20-%3E%20%27chemical/x-cache%27.%0A%09%09%27cascii%27%20-%3E%20%27chemical/x-cactvs-binary%27.%0A%09%09%27cat%27%20-%3E%20%27application/vnd.ms-pki.seccat%27.%0A%09%09%27cbin%27%20-%3E%20%27chemical/x-cactvs-binary%27.%0A%09%09%27cc%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27cdf%27%20-%3E%20%27application/x-cdf%27.%0A%09%09%27cdr%27%20-%3E%20%27image/x-coreldraw%27.%0A%09%09%27cdt%27%20-%3E%20%27image/x-coreldrawtemplate%27.%0A%09%09%27cdx%27%20-%3E%20%27chemical/x-cdx%27.%0A%09%09%27cdy%27%20-%3E%20%27application/vnd.cinderella%27.%0A%09%09%27cef%27%20-%3E%20%27chemical/x-cxf%27.%0A%09%09%27cer%27%20-%3E%20%27chemical/x-cerius%27.%0A%09%09%27chm%27%20-%3E%20%27chemical/x-chemdraw%27.%0A%09%09%27chrt%27%20-%3E%20%27application/x-kchart%27.%0A%09%09%27cif%27%20-%3E%20%27chemical/x-cif%27.%0A%09%09%27class%27%20-%3E%20%27application/java-vm%27.%0A%09%09%27cls%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27cmdf%27%20-%3E%20%27chemical/x-cmdf%27.%0A%09%09%27cml%27%20-%3E%20%27chemical/x-cml%27.%0A%09%09%27cod%27%20-%3E%20%27application/vnd.rim.cod%27.%0A%09%09%27com%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27cpa%27%20-%3E%20%27chemical/x-compass%27.%0A%09%09%27cpio%27%20-%3E%20%27application/x-cpio%27.%0A%09%09%27cpp%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27cpt%27%20-%3E%20%27image/x-corelphotopaint%27.%0A%09%09%27crl%27%20-%3E%20%27application/x-pkcs7-crl%27.%0A%09%09%27crt%27%20-%3E%20%27application/x-x509-ca-cert%27.%0A%09%09%27csf%27%20-%3E%20%27chemical/x-cache-csf%27.%0A%09%09%27csh%27%20-%3E%20%27text/x-csh%27.%0A%09%09%27csm%27%20-%3E%20%27chemical/x-csml%27.%0A%09%09%27csml%27%20-%3E%20%27chemical/x-csml%27.%0A%09%09%27css%27%20-%3E%20%27text/css%27.%0A%09%09%27csv%27%20-%3E%20%27text/comma-separated-values%27.%0A%09%09%27ctab%27%20-%3E%20%27chemical/x-cactvs-binary%27.%0A%09%09%27ctx%27%20-%3E%20%27chemical/x-ctx%27.%0A%09%09%27cu%27%20-%3E%20%27application/cu-seeme%27.%0A%09%09%27cub%27%20-%3E%20%27chemical/x-gaussian-cube%27.%0A%09%09%27cxf%27%20-%3E%20%27chemical/x-cxf%27.%0A%09%09%27cxx%27%20-%3E%20%27text/x-c++src%27.%0A%09%09%27dat%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27dcr%27%20-%3E%20%27application/x-director%27.%0A%09%09%27deb%27%20-%3E%20%27application/x-debian-package%27.%0A%09%09%27dif%27%20-%3E%20%27video/dv%27.%0A%09%09%27diff%27%20-%3E%20%27text/plain%27.%0A%09%09%27dir%27%20-%3E%20%27application/x-director%27.%0A%09%09%27djv%27%20-%3E%20%27image/vnd.djvu%27.%0A%09%09%27djvu%27%20-%3E%20%27image/vnd.djvu%27.%0A%09%09%27dl%27%20-%3E%20%27video/dl%27.%0A%09%09%27dll%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27dmg%27%20-%3E%20%27application/x-apple-diskimage%27.%0A%09%09%27dms%27%20-%3E%20%27application/x-dms%27.%0A%09%09%27doc%27%20-%3E%20%27application/msword%27.%0A%09%09%27dot%27%20-%3E%20%27application/msword%27.%0A%09%09%27dv%27%20-%3E%20%27video/dv%27.%0A%09%09%27dvi%27%20-%3E%20%27application/x-dvi%27.%0A%09%09%27dx%27%20-%3E%20%27chemical/x-jcamp-dx%27.%0A%09%09%27dxr%27%20-%3E%20%27application/x-director%27.%0A%09%09%27emb%27%20-%3E%20%27chemical/x-embl-dl-nucleotide%27.%0A%09%09%27embl%27%20-%3E%20%27chemical/x-embl-dl-nucleotide%27.%0A%09%09%27ent%27%20-%3E%20%27chemical/x-pdb%27.%0A%09%09%27eps%27%20-%3E%20%27application/postscript%27.%0A%09%09%27etx%27%20-%3E%20%27text/x-setext%27.%0A%09%09%27exe%27%20-%3E%20%27application/x-msdos-program%27.%0A%09%09%27ez%27%20-%3E%20%27application/andrew-inset%27.%0A%09%09%27fb%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27fbdoc%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27fch%27%20-%3E%20%27chemical/x-gaussian-checkpoint%27.%0A%09%09%27fchk%27%20-%3E%20%27chemical/x-gaussian-checkpoint%27.%0A%09%09%27fig%27%20-%3E%20%27application/x-xfig%27.%0A%09%09%27flac%27%20-%3E%20%27application/x-flac%27.%0A%09%09%27fli%27%20-%3E%20%27video/fli%27.%0A%09%09%27fm%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27frame%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27frm%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27gal%27%20-%3E%20%27chemical/x-gaussian-log%27.%0A%09%09%27gam%27%20-%3E%20%27chemical/x-gamess-input%27.%0A%09%09%27gamin%27%20-%3E%20%27chemical/x-gamess-input%27.%0A%09%09%27gau%27%20-%3E%20%27chemical/x-gaussian-input%27.%0A%09%09%27gcd%27%20-%3E%20%27text/x-pcs-gcd%27.%0A%09%09%27gcf%27%20-%3E%20%27application/x-graphing-calculator%27.%0A%09%09%27gcg%27%20-%3E%20%27chemical/x-gcg8-sequence%27.%0A%09%09%27gen%27%20-%3E%20%27chemical/x-genbank%27.%0A%09%09%27gf%27%20-%3E%20%27application/x-tex-gf%27.%0A%09%09%27gif%27%20-%3E%20%27image/gif%27.%0A%09%09%27gjc%27%20-%3E%20%27chemical/x-gaussian-input%27.%0A%09%09%27gjf%27%20-%3E%20%27chemical/x-gaussian-input%27.%0A%09%09%27gl%27%20-%3E%20%27video/gl%27.%0A%09%09%27gnumeric%27%20-%3E%20%27application/x-gnumeric%27.%0A%09%09%27gpt%27%20-%3E%20%27chemical/x-mopac-graph%27.%0A%09%09%27gsf%27%20-%3E%20%27application/x-font%27.%0A%09%09%27gsm%27%20-%3E%20%27audio/x-gsm%27.%0A%09%09%27gtar%27%20-%3E%20%27application/x-gtar%27.%0A%09%09%27h%27%20-%3E%20%27text/x-chdr%27.%0A%09%09%27h++%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27hdf%27%20-%3E%20%27application/x-hdf%27.%0A%09%09%27hh%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27hin%27%20-%3E%20%27chemical/x-hin%27.%0A%09%09%27hpp%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27hqx%27%20-%3E%20%27application/mac-binhex40%27.%0A%09%09%27hs%27%20-%3E%20%27text/x-haskell%27.%0A%09%09%27hta%27%20-%3E%20%27application/hta%27.%0A%09%09%27htc%27%20-%3E%20%27text/x-component%27.%0A%09%09%27htm%27%20-%3E%20%27text/html%27.%0A%09%09%27html%27%20-%3E%20%27text/html%27.%0A%09%09%27hxx%27%20-%3E%20%27text/x-c++hdr%27.%0A%09%09%27ica%27%20-%3E%20%27application/x-ica%27.%0A%09%09%27ice%27%20-%3E%20%27x-conference/x-cooltalk%27.%0A%09%09%27ico%27%20-%3E%20%27image/x-icon%27.%0A%09%09%27ics%27%20-%3E%20%27text/calendar%27.%0A%09%09%27icz%27%20-%3E%20%27text/calendar%27.%0A%09%09%27ief%27%20-%3E%20%27image/ief%27.%0A%09%09%27iges%27%20-%3E%20%27model/iges%27.%0A%09%09%27igs%27%20-%3E%20%27model/iges%27.%0A%09%09%27iii%27%20-%3E%20%27application/x-iphone%27.%0A%09%09%27inp%27%20-%3E%20%27chemical/x-gamess-input%27.%0A%09%09%27ins%27%20-%3E%20%27application/x-internet-signup%27.%0A%09%09%27iso%27%20-%3E%20%27application/x-iso9660-image%27.%0A%09%09%27isp%27%20-%3E%20%27application/x-internet-signup%27.%0A%09%09%27ist%27%20-%3E%20%27chemical/x-isostar%27.%0A%09%09%27istr%27%20-%3E%20%27chemical/x-isostar%27.%0A%09%09%27jad%27%20-%3E%20%27text/vnd.sun.j2me.app-descriptor%27.%0A%09%09%27jar%27%20-%3E%20%27application/java-archive%27.%0A%09%09%27java%27%20-%3E%20%27text/x-java%27.%0A%09%09%27jdx%27%20-%3E%20%27chemical/x-jcamp-dx%27.%0A%09%09%27jmz%27%20-%3E%20%27application/x-jmol%27.%0A%09%09%27jng%27%20-%3E%20%27image/x-jng%27.%0A%09%09%27jnlp%27%20-%3E%20%27application/x-java-jnlp-file%27.%0A%09%09%27jpe%27%20-%3E%20%27image/jpeg%27.%0A%09%09%27jpeg%27%20-%3E%20%27image/jpeg%27.%0A%09%09%27jpg%27%20-%3E%20%27image/jpeg%27.%0A%09%09%27js%27%20-%3E%20%27application/javascript%27.%0A%09%09%27kar%27%20-%3E%20%27audio/midi%27.%0A%09%09%27key%27%20-%3E%20%27application/pgp-keys%27.%0A%09%09%27kil%27%20-%3E%20%27application/x-killustrator%27.%0A%09%09%27kin%27%20-%3E%20%27chemical/x-kinemage%27.%0A%09%09%27kpr%27%20-%3E%20%27application/x-kpresenter%27.%0A%09%09%27kpt%27%20-%3E%20%27application/x-kpresenter%27.%0A%09%09%27ksp%27%20-%3E%20%27application/x-kspread%27.%0A%09%09%27kwd%27%20-%3E%20%27application/x-kword%27.%0A%09%09%27kwt%27%20-%3E%20%27application/x-kword%27.%0A%09%09%27latex%27%20-%3E%20%27application/x-latex%27.%0A%09%09%27lha%27%20-%3E%20%27application/x-lha%27.%0A%09%09%27lhs%27%20-%3E%20%27text/x-literate-haskell%27.%0A%09%09%27lsf%27%20-%3E%20%27video/x-la-asf%27.%0A%09%09%27lsx%27%20-%3E%20%27video/x-la-asf%27.%0A%09%09%27ltx%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27lzh%27%20-%3E%20%27application/x-lzh%27.%0A%09%09%27lzx%27%20-%3E%20%27application/x-lzx%27.%0A%09%09%27m3u%27%20-%3E%20%27audio/x-mpegurl%27.%0A%09%09%27m4a%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27maker%27%20-%3E%20%27application/x-maker%27.%0A%09%09%27man%27%20-%3E%20%27application/x-troff-man%27.%0A%09%09%27mcif%27%20-%3E%20%27chemical/x-mmcif%27.%0A%09%09%27mcm%27%20-%3E%20%27chemical/x-macmolecule%27.%0A%09%09%27mdb%27%20-%3E%20%27application/msaccess%27.%0A%09%09%27me%27%20-%3E%20%27application/x-troff-me%27.%0A%09%09%27mesh%27%20-%3E%20%27model/mesh%27.%0A%09%09%27mid%27%20-%3E%20%27audio/midi%27.%0A%09%09%27midi%27%20-%3E%20%27audio/midi%27.%0A%09%09%27mif%27%20-%3E%20%27application/x-mif%27.%0A%09%09%27mm%27%20-%3E%20%27application/x-freemind%27.%0A%09%09%27mmd%27%20-%3E%20%27chemical/x-macromodel-input%27.%0A%09%09%27mmf%27%20-%3E%20%27application/vnd.smaf%27.%0A%09%09%27mml%27%20-%3E%20%27text/mathml%27.%0A%09%09%27mmod%27%20-%3E%20%27chemical/x-macromodel-input%27.%0A%09%09%27mng%27%20-%3E%20%27video/x-mng%27.%0A%09%09%27moc%27%20-%3E%20%27text/x-moc%27.%0A%09%09%27mol%27%20-%3E%20%27chemical/x-mdl-molfile%27.%0A%09%09%27mol2%27%20-%3E%20%27chemical/x-mol2%27.%0A%09%09%27moo%27%20-%3E%20%27chemical/x-mopac-out%27.%0A%09%09%27mop%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27mopcrt%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27mov%27%20-%3E%20%27video/quicktime%27.%0A%09%09%27movie%27%20-%3E%20%27video/x-sgi-movie%27.%0A%09%09%27mp2%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27mp3%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27mp4%27%20-%3E%20%27video/mp4%27.%0A%09%09%27mpc%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27mpe%27%20-%3E%20%27video/mpeg%27.%0A%09%09%27mpeg%27%20-%3E%20%27video/mpeg%27.%0A%09%09%27mpega%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27mpg%27%20-%3E%20%27video/mpeg%27.%0A%09%09%27mpga%27%20-%3E%20%27audio/mpeg%27.%0A%09%09%27ms%27%20-%3E%20%27application/x-troff-ms%27.%0A%09%09%27msh%27%20-%3E%20%27model/mesh%27.%0A%09%09%27msi%27%20-%3E%20%27application/x-msi%27.%0A%09%09%27mvb%27%20-%3E%20%27chemical/x-mopac-vib%27.%0A%09%09%27mxu%27%20-%3E%20%27video/vnd.mpegurl%27.%0A%09%09%27nb%27%20-%3E%20%27application/mathematica%27.%0A%09%09%27nc%27%20-%3E%20%27application/x-netcdf%27.%0A%09%09%27nwc%27%20-%3E%20%27application/x-nwc%27.%0A%09%09%27o%27%20-%3E%20%27application/x-object%27.%0A%09%09%27oda%27%20-%3E%20%27application/oda%27.%0A%09%09%27odb%27%20-%3E%20%27application/vnd.oasis.opendocument.database%27.%0A%09%09%27odc%27%20-%3E%20%27application/vnd.oasis.opendocument.chart%27.%0A%09%09%27odf%27%20-%3E%20%27application/vnd.oasis.opendocument.formula%27.%0A%09%09%27odg%27%20-%3E%20%27application/vnd.oasis.opendocument.graphics%27.%0A%09%09%27odi%27%20-%3E%20%27application/vnd.oasis.opendocument.image%27.%0A%09%09%27odm%27%20-%3E%20%27application/vnd.oasis.opendocument.text-master%27.%0A%09%09%27odp%27%20-%3E%20%27application/vnd.oasis.opendocument.presentation%27.%0A%09%09%27ods%27%20-%3E%20%27application/vnd.oasis.opendocument.spreadsheet%27.%0A%09%09%27odt%27%20-%3E%20%27application/vnd.oasis.opendocument.text%27.%0A%09%09%27ogg%27%20-%3E%20%27application/ogg%27.%0A%09%09%27old%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27oth%27%20-%3E%20%27application/vnd.oasis.opendocument.text-web%27.%0A%09%09%27oza%27%20-%3E%20%27application/x-oz-application%27.%0A%09%09%27p%27%20-%3E%20%27text/x-pascal%27.%0A%09%09%27p7r%27%20-%3E%20%27application/x-pkcs7-certreqresp%27.%0A%09%09%27pac%27%20-%3E%20%27application/x-ns-proxy-autoconfig%27.%0A%09%09%27pas%27%20-%3E%20%27text/x-pascal%27.%0A%09%09%27pat%27%20-%3E%20%27image/x-coreldrawpattern%27.%0A%09%09%27pbm%27%20-%3E%20%27image/x-portable-bitmap%27.%0A%09%09%27pcf%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pcf.Z%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pcx%27%20-%3E%20%27image/pcx%27.%0A%09%09%27pdb%27%20-%3E%20%27chemical/x-pdb%27.%0A%09%09%27pdf%27%20-%3E%20%27application/pdf%27.%0A%09%09%27pfa%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pfb%27%20-%3E%20%27application/x-font%27.%0A%09%09%27pgm%27%20-%3E%20%27image/x-portable-graymap%27.%0A%09%09%27pgn%27%20-%3E%20%27application/x-chess-pgn%27.%0A%09%09%27pgp%27%20-%3E%20%27application/pgp-signature%27.%0A%09%09%27pk%27%20-%3E%20%27application/x-tex-pk%27.%0A%09%09%27pl%27%20-%3E%20%27text/x-perl%27.%0A%09%09%27pls%27%20-%3E%20%27audio/x-scpls%27.%0A%09%09%27pm%27%20-%3E%20%27text/x-perl%27.%0A%09%09%27png%27%20-%3E%20%27image/png%27.%0A%09%09%27pnm%27%20-%3E%20%27image/x-portable-anymap%27.%0A%09%09%27pot%27%20-%3E%20%27text/plain%27.%0A%09%09%27ppm%27%20-%3E%20%27image/x-portable-pixmap%27.%0A%09%09%27pps%27%20-%3E%20%27application/vnd.ms-powerpoint%27.%0A%09%09%27ppt%27%20-%3E%20%27application/vnd.ms-powerpoint%27.%0A%09%09%27prf%27%20-%3E%20%27application/pics-rules%27.%0A%09%09%27prt%27%20-%3E%20%27chemical/x-ncbi-asn1-ascii%27.%0A%09%09%27ps%27%20-%3E%20%27application/postscript%27.%0A%09%09%27psd%27%20-%3E%20%27image/x-photoshop%27.%0A%09%09%27psp%27%20-%3E%20%27text/x-psp%27.%0A%09%09%27py%27%20-%3E%20%27text/x-python%27.%0A%09%09%27pyc%27%20-%3E%20%27application/x-python-code%27.%0A%09%09%27pyo%27%20-%3E%20%27application/x-python-code%27.%0A%09%09%27qt%27%20-%3E%20%27video/quicktime%27.%0A%09%09%27qtl%27%20-%3E%20%27application/x-quicktimeplayer%27.%0A%09%09%27ra%27%20-%3E%20%27audio/x-realaudio%27.%0A%09%09%27ram%27%20-%3E%20%27audio/x-pn-realaudio%27.%0A%09%09%27rar%27%20-%3E%20%27application/rar%27.%0A%09%09%27ras%27%20-%3E%20%27image/x-cmu-raster%27.%0A%09%09%27rd%27%20-%3E%20%27chemical/x-mdl-rdfile%27.%0A%09%09%27rdf%27%20-%3E%20%27application/rdf+xml%27.%0A%09%09%27rgb%27%20-%3E%20%27image/x-rgb%27.%0A%09%09%27rm%27%20-%3E%20%27audio/x-pn-realaudio%27.%0A%09%09%27roff%27%20-%3E%20%27application/x-troff%27.%0A%09%09%27ros%27%20-%3E%20%27chemical/x-rosdal%27.%0A%09%09%27rpm%27%20-%3E%20%27application/x-redhat-package-manager%27.%0A%09%09%27rss%27%20-%3E%20%27application/rss+xml%27.%0A%09%09%27rtf%27%20-%3E%20%27text/rtf%27.%0A%09%09%27rtx%27%20-%3E%20%27text/richtext%27.%0A%09%09%27rxn%27%20-%3E%20%27chemical/x-mdl-rxnfile%27.%0A%09%09%27sct%27%20-%3E%20%27text/scriptlet%27.%0A%09%09%27sd%27%20-%3E%20%27chemical/x-mdl-sdfile%27.%0A%09%09%27sd2%27%20-%3E%20%27audio/x-sd2%27.%0A%09%09%27sda%27%20-%3E%20%27application/vnd.stardivision.draw%27.%0A%09%09%27sdc%27%20-%3E%20%27application/vnd.stardivision.calc%27.%0A%09%09%27sdd%27%20-%3E%20%27application/vnd.stardivision.impress%27.%0A%09%09%27sdf%27%20-%3E%20%27chemical/x-mdl-sdfile%27.%0A%09%09%27sdp%27%20-%3E%20%27application/vnd.stardivision.impress%27.%0A%09%09%27sdw%27%20-%3E%20%27application/vnd.stardivision.writer%27.%0A%09%09%27ser%27%20-%3E%20%27application/java-serialized-object%27.%0A%09%09%27sgf%27%20-%3E%20%27application/x-go-sgf%27.%0A%09%09%27sgl%27%20-%3E%20%27application/vnd.stardivision.writer-global%27.%0A%09%09%27sh%27%20-%3E%20%27text/x-sh%27.%0A%09%09%27shar%27%20-%3E%20%27application/x-shar%27.%0A%09%09%27shtml%27%20-%3E%20%27text/html%27.%0A%09%09%27sid%27%20-%3E%20%27audio/prs.sid%27.%0A%09%09%27sik%27%20-%3E%20%27application/x-trash%27.%0A%09%09%27silo%27%20-%3E%20%27model/mesh%27.%0A%09%09%27sis%27%20-%3E%20%27application/vnd.symbian.install%27.%0A%09%09%27sit%27%20-%3E%20%27application/x-stuffit%27.%0A%09%09%27skd%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27skm%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27skp%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27skt%27%20-%3E%20%27application/x-koan%27.%0A%09%09%27smf%27%20-%3E%20%27application/vnd.stardivision.math%27.%0A%09%09%27smi%27%20-%3E%20%27application/smil%27.%0A%09%09%27smil%27%20-%3E%20%27application/smil%27.%0A%09%09%27snd%27%20-%3E%20%27audio/basic%27.%0A%09%09%27spc%27%20-%3E%20%27chemical/x-galactic-spc%27.%0A%09%09%27spl%27%20-%3E%20%27application/x-futuresplash%27.%0A%09%09%27src%27%20-%3E%20%27application/x-wais-source%27.%0A%09%09%27stc%27%20-%3E%20%27application/vnd.sun.xml.calc.template%27.%0A%09%09%27std%27%20-%3E%20%27application/vnd.sun.xml.draw.template%27.%0A%09%09%27sti%27%20-%3E%20%27application/vnd.sun.xml.impress.template%27.%0A%09%09%27stl%27%20-%3E%20%27application/vnd.ms-pki.stl%27.%0A%09%09%27stw%27%20-%3E%20%27application/vnd.sun.xml.writer.template%27.%0A%09%09%27sty%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27sv4cpio%27%20-%3E%20%27application/x-sv4cpio%27.%0A%09%09%27sv4crc%27%20-%3E%20%27application/x-sv4crc%27.%0A%09%09%27svg%27%20-%3E%20%27image/svg+xml%27.%0A%09%09%27svgz%27%20-%3E%20%27image/svg+xml%27.%0A%09%09%27sw%27%20-%3E%20%27chemical/x-swissprot%27.%0A%09%09%27swf%27%20-%3E%20%27application/x-shockwave-flash%27.%0A%09%09%27swfl%27%20-%3E%20%27application/x-shockwave-flash%27.%0A%09%09%27sxc%27%20-%3E%20%27application/vnd.sun.xml.calc%27.%0A%09%09%27sxd%27%20-%3E%20%27application/vnd.sun.xml.draw%27.%0A%09%09%27sxg%27%20-%3E%20%27application/vnd.sun.xml.writer.global%27.%0A%09%09%27sxi%27%20-%3E%20%27application/vnd.sun.xml.impress%27.%0A%09%09%27sxm%27%20-%3E%20%27application/vnd.sun.xml.math%27.%0A%09%09%27sxw%27%20-%3E%20%27application/vnd.sun.xml.writer%27.%0A%09%09%27t%27%20-%3E%20%27application/x-troff%27.%0A%09%09%27tar%27%20-%3E%20%27application/x-tar%27.%0A%09%09%27taz%27%20-%3E%20%27application/x-gtar%27.%0A%09%09%27tcl%27%20-%3E%20%27text/x-tcl%27.%0A%09%09%27tex%27%20-%3E%20%27text/x-tex%27.%0A%09%09%27texi%27%20-%3E%20%27application/x-texinfo%27.%0A%09%09%27texinfo%27%20-%3E%20%27application/x-texinfo%27.%0A%09%09%27text%27%20-%3E%20%27text/plain%27.%0A%09%09%27tgf%27%20-%3E%20%27chemical/x-mdl-tgf%27.%0A%09%09%27tgz%27%20-%3E%20%27application/x-gtar%27.%0A%09%09%27tif%27%20-%3E%20%27image/tiff%27.%0A%09%09%27tiff%27%20-%3E%20%27image/tiff%27.%0A%09%09%27tk%27%20-%3E%20%27text/x-tcl%27.%0A%09%09%27tm%27%20-%3E%20%27text/texmacs%27.%0A%09%09%27torrent%27%20-%3E%20%27application/x-bittorrent%27.%0A%09%09%27tr%27%20-%3E%20%27application/x-troff%27.%0A%09%09%27ts%27%20-%3E%20%27text/texmacs%27.%0A%09%09%27tsp%27%20-%3E%20%27application/dsptype%27.%0A%09%09%27tsv%27%20-%3E%20%27text/tab-separated-values%27.%0A%09%09%27txt%27%20-%3E%20%27text/plain%27.%0A%09%09%27udeb%27%20-%3E%20%27application/x-debian-package%27.%0A%09%09%27uls%27%20-%3E%20%27text/iuls%27.%0A%09%09%27ustar%27%20-%3E%20%27application/x-ustar%27.%0A%09%09%27val%27%20-%3E%20%27chemical/x-ncbi-asn1-binary%27.%0A%09%09%27vcd%27%20-%3E%20%27application/x-cdlink%27.%0A%09%09%27vcf%27%20-%3E%20%27text/x-vcard%27.%0A%09%09%27vcs%27%20-%3E%20%27text/x-vcalendar%27.%0A%09%09%27vmd%27%20-%3E%20%27chemical/x-vmd%27.%0A%09%09%27vms%27%20-%3E%20%27chemical/x-vamas-iso14976%27.%0A%09%09%27vor%27%20-%3E%20%27application/vnd.stardivision.writer%27.%0A%09%09%27vrm%27%20-%3E%20%27x-world/x-vrml%27.%0A%09%09%27vrml%27%20-%3E%20%27x-world/x-vrml%27.%0A%09%09%27vsd%27%20-%3E%20%27application/vnd.visio%27.%0A%09%09%27wad%27%20-%3E%20%27application/x-doom%27.%0A%09%09%27wav%27%20-%3E%20%27audio/x-wav%27.%0A%09%09%27wax%27%20-%3E%20%27audio/x-ms-wax%27.%0A%09%09%27wbmp%27%20-%3E%20%27image/vnd.wap.wbmp%27.%0A%09%09%27wbxml%27%20-%3E%20%27application/vnd.wap.wbxml%27.%0A%09%09%27wk%27%20-%3E%20%27application/x-123%27.%0A%09%09%27wm%27%20-%3E%20%27video/x-ms-wm%27.%0A%09%09%27wma%27%20-%3E%20%27audio/x-ms-wma%27.%0A%09%09%27wmd%27%20-%3E%20%27application/x-ms-wmd%27.%0A%09%09%27wml%27%20-%3E%20%27text/vnd.wap.wml%27.%0A%09%09%27wmlc%27%20-%3E%20%27application/vnd.wap.wmlc%27.%0A%09%09%27wmls%27%20-%3E%20%27text/vnd.wap.wmlscript%27.%0A%09%09%27wmlsc%27%20-%3E%20%27application/vnd.wap.wmlscriptc%27.%0A%09%09%27wmv%27%20-%3E%20%27video/x-ms-wmv%27.%0A%09%09%27wmx%27%20-%3E%20%27video/x-ms-wmx%27.%0A%09%09%27wmz%27%20-%3E%20%27application/x-ms-wmz%27.%0A%09%09%27wp5%27%20-%3E%20%27application/wordperfect5.1%27.%0A%09%09%27wpd%27%20-%3E%20%27application/wordperfect%27.%0A%09%09%27wrl%27%20-%3E%20%27x-world/x-vrml%27.%0A%09%09%27wsc%27%20-%3E%20%27text/scriptlet%27.%0A%09%09%27wvx%27%20-%3E%20%27video/x-ms-wvx%27.%0A%09%09%27wz%27%20-%3E%20%27application/x-wingz%27.%0A%09%09%27xbm%27%20-%3E%20%27image/x-xbitmap%27.%0A%09%09%27xcf%27%20-%3E%20%27application/x-xcf%27.%0A%09%09%27xht%27%20-%3E%20%27application/xhtml+xml%27.%0A%09%09%27xhtml%27%20-%3E%20%27application/xhtml+xml%27.%0A%09%09%27xlb%27%20-%3E%20%27application/vnd.ms-excel%27.%0A%09%09%27xls%27%20-%3E%20%27application/vnd.ms-excel%27.%0A%09%09%27xlt%27%20-%3E%20%27application/vnd.ms-excel%27.%0A%09%09%27xml%27%20-%3E%20%27application/xml%27.%0A%09%09%27xpi%27%20-%3E%20%27application/x-xpinstall%27.%0A%09%09%27xpm%27%20-%3E%20%27image/x-xpixmap%27.%0A%09%09%27xsl%27%20-%3E%20%27application/xml%27.%0A%09%09%27xtel%27%20-%3E%20%27chemical/x-xtel%27.%0A%09%09%27xul%27%20-%3E%20%27application/vnd.mozilla.xul+xml%27.%0A%09%09%27xwd%27%20-%3E%20%27image/x-xwindowdump%27.%0A%09%09%27xyz%27%20-%3E%20%27chemical/x-xyz%27.%0A%09%09%27zip%27%20-%3E%20%27application/zip%27.%0A%09%09%27zmt%27%20-%3E%20%27chemical/x-mopac-input%27.%0A%09%09%27%7E%27%20-%3E%20%27application/x-trash%27%0A%09%7D'),
  9341. messageSends: [unescape("-%3E")],
  9342. referencedClasses: []
  9343. }),
  9344. smalltalk.FileServer.klass);
  9345. smalltalk.addMethod(
  9346. unescape('_mimeTypes'),
  9347. smalltalk.method({
  9348. selector: unescape('mimeTypes'),
  9349. category: 'accessing',
  9350. fn: function (){
  9351. var self=this;
  9352. return (($receiver = self['@mimeTypes']) == nil || $receiver == undefined) ? (function(){return self['@mimeTypes']=smalltalk.send(self, "_defaultMimeTypes", []);})() : $receiver;
  9353. return self;},
  9354. args: [],
  9355. source: unescape('mimeTypes%0A%09%5EmimeTypes%20ifNil%3A%20%5BmimeTypes%20%3A%3D%20self%20defaultMimeTypes%5D'),
  9356. messageSends: ["ifNil:", "defaultMimeTypes"],
  9357. referencedClasses: []
  9358. }),
  9359. smalltalk.FileServer.klass);
  9360. smalltalk.addMethod(
  9361. unescape('_mimeTypeFor_'),
  9362. smalltalk.method({
  9363. selector: unescape('mimeTypeFor%3A'),
  9364. category: 'accessing',
  9365. fn: function (aString){
  9366. var self=this;
  9367. return smalltalk.send(smalltalk.send(self, "_mimeTypes", []), "_at_ifAbsent_", [smalltalk.send(aString, "_replace_with_", [unescape(".*%5B%5C.%5D"), ""]), (function(){return unescape("text/plain");})]);
  9368. return self;},
  9369. args: ["aString"],
  9370. source: unescape('mimeTypeFor%3A%20aString%0A%09%5Eself%20mimeTypes%20at%3A%20%28aString%20replace%3A%20%27.*%5B%5C.%5D%27%20with%3A%20%27%27%29%20ifAbsent%3A%20%5B%27text/plain%27%5D'),
  9371. messageSends: ["at:ifAbsent:", "mimeTypes", "replace:with:"],
  9372. referencedClasses: []
  9373. }),
  9374. smalltalk.FileServer.klass);
  9375. smalltalk.addMethod(
  9376. unescape('_main'),
  9377. smalltalk.method({
  9378. selector: unescape('main'),
  9379. category: 'initialization',
  9380. fn: function (){
  9381. var self=this;
  9382. return smalltalk.send(smalltalk.send(self, "_new", []), "_startOn_", [smalltalk.send(self, "_port", [])]);
  9383. return self;},
  9384. args: [],
  9385. source: unescape('main%0A%09%5Eself%20new%20startOn%3A%20self%20port'),
  9386. messageSends: ["startOn:", "new", "port"],
  9387. referencedClasses: []
  9388. }),
  9389. smalltalk.FileServer.klass);
  9390. smalltalk.init(smalltalk.Object);
  9391. smalltalk.classes()._do_(function(each) {each._initialize()});
  9392. /* Similar to jQuery(document).ready() */
  9393. if(this.smalltalkReady) {
  9394. this.smalltalkReady();
  9395. }smalltalk.FileServer._main()