game.min.js 388 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883
  1. var requirejs, require, define; (function(global) {
  2. function isFunction(e) {
  3. return ostring.call(e) === "[object Function]"
  4. }
  5. function isArray(e) {
  6. return ostring.call(e) === "[object Array]"
  7. }
  8. function each(e, t) {
  9. if (e) {
  10. var n;
  11. for (n = 0; n < e.length; n += 1) if (e[n] && t(e[n], n, e)) break
  12. }
  13. }
  14. function eachReverse(e, t) {
  15. if (e) {
  16. var n;
  17. for (n = e.length - 1; n > -1; n -= 1) if (e[n] && t(e[n], n, e)) break
  18. }
  19. }
  20. function hasProp(e, t) {
  21. return hasOwn.call(e, t)
  22. }
  23. function getOwn(e, t) {
  24. return hasProp(e, t) && e[t]
  25. }
  26. function eachProp(e, t) {
  27. var n;
  28. for (n in e) if (hasProp(e, n) && t(e[n], n)) break
  29. }
  30. function mixin(e, t, n, r) {
  31. return t && eachProp(t,
  32. function(t, i) {
  33. if (n || !hasProp(e, i)) r && typeof t == "object" && t && !isArray(t) && !isFunction(t) && !(t instanceof RegExp) ? (e[i] || (e[i] = {}), mixin(e[i], t, n, r)) : e[i] = t
  34. }),
  35. e
  36. }
  37. function bind(e, t) {
  38. return function() {
  39. return t.apply(e, arguments)
  40. }
  41. }
  42. function scripts() {
  43. return document.getElementsByTagName("script")
  44. }
  45. function defaultOnError(e) {
  46. throw e
  47. }
  48. function getGlobal(e) {
  49. if (!e) return e;
  50. var t = global;
  51. return each(e.split("."),
  52. function(e) {
  53. t = t[e]
  54. }),
  55. t
  56. }
  57. function makeError(e, t, n, r) {
  58. var i = new Error(t + "\nhttp://requirejs.org/docs/errors.html#" + e);
  59. return i.requireType = e,
  60. i.requireModules = r,
  61. n && (i.originalError = n),
  62. i
  63. }
  64. function newContext(e) {
  65. function m(e) {
  66. var t, n, r = e.length;
  67. for (t = 0; t < r; t++) {
  68. n = e[t];
  69. if (n === ".") e.splice(t, 1),
  70. t -= 1;
  71. else if (n === "..") {
  72. if (t === 1 && (e[2] === ".." || e[0] === "..")) break;
  73. t > 0 && (e.splice(t - 1, 2), t -= 2)
  74. }
  75. }
  76. }
  77. function g(e, t, n) {
  78. var r, i, s, u, a, f, l, c, h, p, d, v = t && t.split("/"),
  79. g = v,
  80. y = o.map,
  81. b = y && y["*"];
  82. e && e.charAt(0) === "." && (t ? (g = v.slice(0, v.length - 1), e = e.split("/"), l = e.length - 1, o.nodeIdCompat && jsSuffixRegExp.test(e[l]) && (e[l] = e[l].replace(jsSuffixRegExp, "")), e = g.concat(e), m(e), e = e.join("/")) : e.indexOf("./") === 0 && (e = e.substring(2)));
  83. if (n && y && (v || b)) {
  84. s = e.split("/");
  85. e: for (u = s.length; u > 0; u -= 1) {
  86. f = s.slice(0, u).join("/");
  87. if (v) for (a = v.length; a > 0; a -= 1) {
  88. i = getOwn(y, v.slice(0, a).join("/"));
  89. if (i) {
  90. i = getOwn(i, f);
  91. if (i) {
  92. c = i,
  93. h = u;
  94. break e
  95. }
  96. }
  97. } ! p && b && getOwn(b, f) && (p = getOwn(b, f), d = u)
  98. } ! c && p && (c = p, h = d),
  99. c && (s.splice(0, h, c), e = s.join("/"))
  100. }
  101. return r = getOwn(o.pkgs, e),
  102. r ? r: e
  103. }
  104. function y(e) {
  105. isBrowser && each(scripts(),
  106. function(t) {
  107. if (t.getAttribute("data-requiremodule") === e && t.getAttribute("data-requirecontext") === r.contextName) return t.parentNode.removeChild(t),
  108. !0
  109. })
  110. }
  111. function b(e) {
  112. var t = getOwn(o.paths, e);
  113. if (t && isArray(t) && t.length > 1) return t.shift(),
  114. r.require.undef(e),
  115. r.require([e]),
  116. !0
  117. }
  118. function w(e) {
  119. var t, n = e ? e.indexOf("!") : -1;
  120. return n > -1 && (t = e.substring(0, n), e = e.substring(n + 1, e.length)),
  121. [t, e]
  122. }
  123. function E(e, t, n, i) {
  124. var s, o, u, a, f = null,
  125. l = t ? t.name: null,
  126. h = e,
  127. p = !0,
  128. m = "";
  129. return e || (p = !1, e = "_@r" + (d += 1)),
  130. a = w(e),
  131. f = a[0],
  132. e = a[1],
  133. f && (f = g(f, l, i), o = getOwn(c, f)),
  134. e && (f ? o && o.normalize ? m = o.normalize(e,
  135. function(e) {
  136. return g(e, l, i)
  137. }) : m = g(e, l, i) : (m = g(e, l, i), a = w(m), f = a[0], m = a[1], n = !0, s = r.nameToUrl(m))),
  138. u = f && !o && !n ? "_unnormalized" + (v += 1) : "",
  139. {
  140. prefix: f,
  141. name: m,
  142. parentMap: t,
  143. unnormalized: !!u,
  144. url: s,
  145. originalName: h,
  146. isDefine: p,
  147. id: (f ? f + "!" + m: m) + u
  148. }
  149. }
  150. function S(e) {
  151. var t = e.id,
  152. n = getOwn(u, t);
  153. return n || (n = u[t] = new r.Module(e)),
  154. n
  155. }
  156. function x(e, t, n) {
  157. var r = e.id,
  158. i = getOwn(u, r);
  159. hasProp(c, r) && (!i || i.defineEmitComplete) ? t === "defined" && n(c[r]) : (i = S(e), i.error && t === "error" ? n(i.error) : i.on(t, n))
  160. }
  161. function T(e, t) {
  162. var n = e.requireModules,
  163. r = !1;
  164. t ? t(e) : (each(n,
  165. function(t) {
  166. var n = getOwn(u, t);
  167. n && (n.error = e, n.events.error && (r = !0, n.emit("error", e)))
  168. }), r || req.onError(e))
  169. }
  170. function N() {
  171. globalDefQueue.length && (apsp.apply(l, [l.length, 0].concat(globalDefQueue)), globalDefQueue = [])
  172. }
  173. function C(e) {
  174. delete u[e],
  175. delete a[e]
  176. }
  177. function k(e, t, n) {
  178. var r = e.map.id;
  179. e.error ? e.emit("error", e.error) : (t[r] = !0, each(e.depMaps,
  180. function(r, i) {
  181. var s = r.id,
  182. o = getOwn(u, s);
  183. o && !e.depMatched[i] && !n[s] && (getOwn(t, s) ? (e.defineDep(i, c[s]), e.check()) : k(o, t, n))
  184. }), n[r] = !0)
  185. }
  186. function L() {
  187. var e, n, i = o.waitSeconds * 1e3,
  188. u = i && r.startTime + i < (new Date).getTime(),
  189. f = [],
  190. l = [],
  191. c = !1,
  192. h = !0;
  193. if (t) return;
  194. t = !0,
  195. eachProp(a,
  196. function(e) {
  197. var t = e.map,
  198. r = t.id;
  199. if (!e.enabled) return;
  200. t.isDefine || l.push(e);
  201. if (!e.error) if (!e.inited && u) b(r) ? (n = !0, c = !0) : (f.push(r), y(r));
  202. else if (!e.inited && e.fetched && t.isDefine) {
  203. c = !0;
  204. if (!t.prefix) return h = !1
  205. }
  206. });
  207. if (u && f.length) return e = makeError("timeout", "Load timeout for modules: " + f, null, f),
  208. e.contextName = r.contextName,
  209. T(e);
  210. h && each(l,
  211. function(e) {
  212. k(e, {},
  213. {})
  214. }),
  215. (!u || n) && c && (isBrowser || isWebWorker) && !s && (s = setTimeout(function() {
  216. s = 0,
  217. L()
  218. },
  219. 50)),
  220. t = !1
  221. }
  222. function A(e) {
  223. hasProp(c, e[0]) || S(E(e[0], null, !0)).init(e[1], e[2])
  224. }
  225. function O(e, t, n, r) {
  226. e.detachEvent && !isOpera ? r && e.detachEvent(r, t) : e.removeEventListener(n, t, !1)
  227. }
  228. function M(e) {
  229. var t = e.currentTarget || e.srcElement;
  230. return O(t, r.onScriptLoad, "load", "onreadystatechange"),
  231. O(t, r.onScriptError, "error"),
  232. {
  233. node: t,
  234. id: t && t.getAttribute("data-requiremodule")
  235. }
  236. }
  237. function _() {
  238. var e;
  239. N();
  240. while (l.length) {
  241. e = l.shift();
  242. if (e[0] === null) return null;
  243. A(e)
  244. }
  245. }
  246. var t, n, r, i, s, o = {
  247. waitSeconds: 7,
  248. baseUrl: "./",
  249. paths: {},
  250. bundles: {},
  251. pkgs: {},
  252. shim: {},
  253. config: {}
  254. },
  255. u = {},
  256. a = {},
  257. f = {},
  258. l = [],
  259. c = {},
  260. h = {},
  261. p = {},
  262. d = 1,
  263. v = 1;
  264. return i = {
  265. require: function(e) {
  266. return e.require ? e.require: e.require = r.makeRequire(e.map)
  267. },
  268. exports: function(e) {
  269. e.usingExports = !0;
  270. if (e.map.isDefine) return e.exports ? e.exports: e.exports = c[e.map.id] = {}
  271. },
  272. module: function(e) {
  273. return e.module ? e.module: e.module = {
  274. id: e.map.id,
  275. uri: e.map.url,
  276. config: function() {
  277. return getOwn(o.config, e.map.id) || {}
  278. },
  279. exports: i.exports(e)
  280. }
  281. }
  282. },
  283. n = function(e) {
  284. this.events = getOwn(f, e.id) || {},
  285. this.map = e,
  286. this.shim = getOwn(o.shim, e.id),
  287. this.depExports = [],
  288. this.depMaps = [],
  289. this.depMatched = [],
  290. this.pluginMaps = {},
  291. this.depCount = 0
  292. },
  293. n.prototype = {
  294. init: function(e, t, n, r) {
  295. r = r || {};
  296. if (this.inited) return;
  297. this.factory = t,
  298. n ? this.on("error", n) : this.events.error && (n = bind(this,
  299. function(e) {
  300. this.emit("error", e)
  301. })),
  302. this.depMaps = e && e.slice(0),
  303. this.errback = n,
  304. this.inited = !0,
  305. this.ignore = r.ignore,
  306. r.enabled || this.enabled ? this.enable() : this.check()
  307. },
  308. defineDep: function(e, t) {
  309. this.depMatched[e] || (this.depMatched[e] = !0, this.depCount -= 1, this.depExports[e] = t)
  310. },
  311. fetch: function() {
  312. if (this.fetched) return;
  313. this.fetched = !0,
  314. r.startTime = (new Date).getTime();
  315. var e = this.map;
  316. if (!this.shim) return e.prefix ? this.callPlugin() : this.load();
  317. r.makeRequire(this.map, {
  318. enableBuildCallback: !0
  319. })(this.shim.deps || [], bind(this,
  320. function() {
  321. return e.prefix ? this.callPlugin() : this.load()
  322. }))
  323. },
  324. load: function() {
  325. var e = this.map.url;
  326. h[e] || (h[e] = !0, r.load(this.map.id, e))
  327. },
  328. check: function() {
  329. if (!this.enabled || this.enabling) return;
  330. var e, t, n = this.map.id,
  331. i = this.depExports,
  332. s = this.exports,
  333. o = this.factory;
  334. if (!this.inited) this.fetch();
  335. else if (this.error) this.emit("error", this.error);
  336. else if (!this.defining) {
  337. this.defining = !0;
  338. if (this.depCount < 1 && !this.defined) {
  339. if (isFunction(o)) {
  340. if (this.events.error && this.map.isDefine || req.onError !== defaultOnError) try {
  341. s = r.execCb(n, o, i, s)
  342. } catch(u) {
  343. e = u
  344. } else s = r.execCb(n, o, i, s);
  345. this.map.isDefine && s === undefined && (t = this.module, t ? s = t.exports: this.usingExports && (s = this.exports));
  346. if (e) return e.requireMap = this.map,
  347. e.requireModules = this.map.isDefine ? [this.map.id] : null,
  348. e.requireType = this.map.isDefine ? "define": "require",
  349. T(this.error = e)
  350. } else s = o;
  351. this.exports = s,
  352. this.map.isDefine && !this.ignore && (c[n] = s, req.onResourceLoad && req.onResourceLoad(r, this.map, this.depMaps)),
  353. C(n),
  354. this.defined = !0
  355. }
  356. this.defining = !1,
  357. this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0)
  358. }
  359. },
  360. callPlugin: function() {
  361. var e = this.map,
  362. t = e.id,
  363. n = E(e.prefix);
  364. this.depMaps.push(n),
  365. x(n, "defined", bind(this,
  366. function(n) {
  367. var i, s, a, f = getOwn(p, this.map.id),
  368. l = this.map.name,
  369. c = this.map.parentMap ? this.map.parentMap.name: null,
  370. h = r.makeRequire(e.parentMap, {
  371. enableBuildCallback: !0
  372. });
  373. if (this.map.unnormalized) {
  374. n.normalize && (l = n.normalize(l,
  375. function(e) {
  376. return g(e, c, !0)
  377. }) || ""),
  378. s = E(e.prefix + "!" + l, this.map.parentMap),
  379. x(s, "defined", bind(this,
  380. function(e) {
  381. this.init([],
  382. function() {
  383. return e
  384. },
  385. null, {
  386. enabled: !0,
  387. ignore: !0
  388. })
  389. })),
  390. a = getOwn(u, s.id),
  391. a && (this.depMaps.push(s), this.events.error && a.on("error", bind(this,
  392. function(e) {
  393. this.emit("error", e)
  394. })), a.enable());
  395. return
  396. }
  397. if (f) {
  398. this.map.url = r.nameToUrl(f),
  399. this.load();
  400. return
  401. }
  402. i = bind(this,
  403. function(e) {
  404. this.init([],
  405. function() {
  406. return e
  407. },
  408. null, {
  409. enabled: !0
  410. })
  411. }),
  412. i.error = bind(this,
  413. function(e) {
  414. this.inited = !0,
  415. this.error = e,
  416. e.requireModules = [t],
  417. eachProp(u,
  418. function(e) {
  419. e.map.id.indexOf(t + "_unnormalized") === 0 && C(e.map.id)
  420. }),
  421. T(e)
  422. }),
  423. i.fromText = bind(this,
  424. function(n, s) {
  425. var u = e.name,
  426. a = E(u),
  427. f = useInteractive;
  428. s && (n = s),
  429. f && (useInteractive = !1),
  430. S(a),
  431. hasProp(o.config, t) && (o.config[u] = o.config[t]);
  432. try {
  433. req.exec(n)
  434. } catch(l) {
  435. return T(makeError("fromtexteval", "fromText eval for " + t + " failed: " + l, l, [t]))
  436. }
  437. f && (useInteractive = !0),
  438. this.depMaps.push(a),
  439. r.completeLoad(u),
  440. h([u], i)
  441. }),
  442. n.load(e.name, h, i, o)
  443. })),
  444. r.enable(n, this),
  445. this.pluginMaps[n.id] = n
  446. },
  447. enable: function() {
  448. a[this.map.id] = this,
  449. this.enabled = !0,
  450. this.enabling = !0,
  451. each(this.depMaps, bind(this,
  452. function(e, t) {
  453. var n, s, o;
  454. if (typeof e == "string") {
  455. e = E(e, this.map.isDefine ? this.map: this.map.parentMap, !1, !this.skipMap),
  456. this.depMaps[t] = e,
  457. o = getOwn(i, e.id);
  458. if (o) {
  459. this.depExports[t] = o(this);
  460. return
  461. }
  462. this.depCount += 1,
  463. x(e, "defined", bind(this,
  464. function(e) {
  465. this.defineDep(t, e),
  466. this.check()
  467. })),
  468. this.errback && x(e, "error", bind(this, this.errback))
  469. }
  470. n = e.id,
  471. s = u[n],
  472. !hasProp(i, n) && s && !s.enabled && r.enable(e, this)
  473. })),
  474. eachProp(this.pluginMaps, bind(this,
  475. function(e) {
  476. var t = getOwn(u, e.id);
  477. t && !t.enabled && r.enable(e, this)
  478. })),
  479. this.enabling = !1,
  480. this.check()
  481. },
  482. on: function(e, t) {
  483. var n = this.events[e];
  484. n || (n = this.events[e] = []),
  485. n.push(t)
  486. },
  487. emit: function(e, t) {
  488. each(this.events[e],
  489. function(e) {
  490. e(t)
  491. }),
  492. e === "error" && delete this.events[e]
  493. }
  494. },
  495. r = {
  496. config: o,
  497. contextName: e,
  498. registry: u,
  499. defined: c,
  500. urlFetched: h,
  501. defQueue: l,
  502. Module: n,
  503. makeModuleMap: E,
  504. nextTick: req.nextTick,
  505. onError: T,
  506. configure: function(e) {
  507. e.baseUrl && e.baseUrl.charAt(e.baseUrl.length - 1) !== "/" && (e.baseUrl += "/");
  508. var t = o.shim,
  509. n = {
  510. paths: !0,
  511. bundles: !0,
  512. config: !0,
  513. map: !0
  514. };
  515. eachProp(e,
  516. function(e, t) {
  517. n[t] ? (o[t] || (o[t] = {}), mixin(o[t], e, !0, !0)) : o[t] = e
  518. }),
  519. e.bundles && eachProp(e.bundles,
  520. function(e, t) {
  521. each(e,
  522. function(e) {
  523. e !== t && (p[e] = t)
  524. })
  525. }),
  526. e.shim && (eachProp(e.shim,
  527. function(e, n) {
  528. isArray(e) && (e = {
  529. deps: e
  530. }),
  531. (e.exports || e.init) && !e.exportsFn && (e.exportsFn = r.makeShimExports(e)),
  532. t[n] = e
  533. }), o.shim = t),
  534. e.packages && each(e.packages,
  535. function(e) {
  536. var t, n;
  537. e = typeof e == "string" ? {
  538. name: e
  539. }: e,
  540. n = e.name,
  541. t = e.location,
  542. t && (o.paths[n] = e.location),
  543. o.pkgs[n] = e.name + "/" + (e.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "")
  544. }),
  545. eachProp(u,
  546. function(e, t) { ! e.inited && !e.map.unnormalized && (e.map = E(t))
  547. }),
  548. (e.deps || e.callback) && r.require(e.deps || [], e.callback)
  549. },
  550. makeShimExports: function(e) {
  551. function t() {
  552. var t;
  553. return e.init && (t = e.init.apply(global, arguments)),
  554. t || e.exports && getGlobal(e.exports)
  555. }
  556. return t
  557. },
  558. makeRequire: function(t, n) {
  559. function s(o, a, f) {
  560. var l, h, p;
  561. return n.enableBuildCallback && a && isFunction(a) && (a.__requireJsBuild = !0),
  562. typeof o == "string" ? isFunction(a) ? T(makeError("requireargs", "Invalid require call"), f) : t && hasProp(i, o) ? i[o](u[t.id]) : req.get ? req.get(r, o, t, s) : (h = E(o, t, !1, !0), l = h.id, hasProp(c, l) ? c[l] : T(makeError("notloaded", 'Module name "' + l + '" has not been loaded yet for context: ' + e + (t ? "": ". Use require([])")))) : (_(), r.nextTick(function() {
  563. _(),
  564. p = S(E(null, t)),
  565. p.skipMap = n.skipMap,
  566. p.init(o, a, f, {
  567. enabled: !0
  568. }),
  569. L()
  570. }), s)
  571. }
  572. return n = n || {},
  573. mixin(s, {
  574. isBrowser: isBrowser,
  575. toUrl: function(e) {
  576. var n, i = e.lastIndexOf("."),
  577. s = e.split("/")[0],
  578. o = s === "." || s === "..";
  579. return i !== -1 && (!o || i > 1) && (n = e.substring(i, e.length), e = e.substring(0, i)),
  580. r.nameToUrl(g(e, t && t.id, !0), n, !0)
  581. },
  582. defined: function(e) {
  583. return hasProp(c, E(e, t, !1, !0).id)
  584. },
  585. specified: function(e) {
  586. return e = E(e, t, !1, !0).id,
  587. hasProp(c, e) || hasProp(u, e)
  588. }
  589. }),
  590. t || (s.undef = function(e) {
  591. N();
  592. var n = E(e, t, !0),
  593. r = getOwn(u, e);
  594. y(e),
  595. delete c[e],
  596. delete h[n.url],
  597. delete f[e],
  598. eachReverse(l,
  599. function(t, n) {
  600. t[0] === e && l.splice(n, 1)
  601. }),
  602. r && (r.events.defined && (f[e] = r.events), C(e))
  603. }),
  604. s
  605. },
  606. enable: function(e) {
  607. var t = getOwn(u, e.id);
  608. t && S(e).enable()
  609. },
  610. completeLoad: function(e) {
  611. var t, n, r, i = getOwn(o.shim, e) || {},
  612. s = i.exports;
  613. N();
  614. while (l.length) {
  615. n = l.shift();
  616. if (n[0] === null) {
  617. n[0] = e;
  618. if (t) break;
  619. t = !0
  620. } else n[0] === e && (t = !0);
  621. A(n)
  622. }
  623. r = getOwn(u, e);
  624. if (!t && !hasProp(c, e) && r && !r.inited) {
  625. if (o.enforceDefine && (!s || !getGlobal(s))) {
  626. if (b(e)) return;
  627. return T(makeError("nodefine", "No define call for " + e, null, [e]))
  628. }
  629. A([e, i.deps || [], i.exportsFn])
  630. }
  631. L()
  632. },
  633. nameToUrl: function(e, t, n) {
  634. var i, s, u, a, f, l, c, h = getOwn(o.pkgs, e);
  635. h && (e = h),
  636. c = getOwn(p, e);
  637. if (c) return r.nameToUrl(c, t, n);
  638. if (req.jsExtRegExp.test(e)) f = e + (t || "");
  639. else {
  640. i = o.paths,
  641. s = e.split("/");
  642. for (u = s.length; u > 0; u -= 1) {
  643. a = s.slice(0, u).join("/"),
  644. l = getOwn(i, a);
  645. if (l) {
  646. isArray(l) && (l = l[0]),
  647. s.splice(0, u, l);
  648. break
  649. }
  650. }
  651. f = s.join("/"),
  652. f += t || (/^data\:|\?/.test(f) || n ? "": ".js"),
  653. f = (f.charAt(0) === "/" || f.match(/^[\w\+\.\-]+:/) ? "": o.baseUrl) + f
  654. }
  655. return o.urlArgs ? f + ((f.indexOf("?") === -1 ? "?": "&") + o.urlArgs) : f
  656. },
  657. load: function(e, t) {
  658. req.load(r, e, t)
  659. },
  660. execCb: function(e, t, n, r) {
  661. return t.apply(r, n)
  662. },
  663. onScriptLoad: function(e) {
  664. if (e.type === "load" || readyRegExp.test((e.currentTarget || e.srcElement).readyState)) {
  665. interactiveScript = null;
  666. var t = M(e);
  667. r.completeLoad(t.id)
  668. }
  669. },
  670. onScriptError: function(e) {
  671. var t = M(e);
  672. if (!b(t.id)) return T(makeError("scripterror", "Script error for: " + t.id, e, [t.id]))
  673. }
  674. },
  675. r.require = r.makeRequire(),
  676. r
  677. }
  678. function getInteractiveScript() {
  679. return interactiveScript && interactiveScript.readyState === "interactive" ? interactiveScript: (eachReverse(scripts(),
  680. function(e) {
  681. if (e.readyState === "interactive") return interactiveScript = e
  682. }), interactiveScript)
  683. }
  684. var req, s, head, baseElement, dataMain, src, interactiveScript, currentlyAddingScript, mainScript, subPath, version = "2.1.10",
  685. commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
  686. cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
  687. jsSuffixRegExp = /\.js$/,
  688. currDirRegExp = /^\.\//,
  689. op = Object.prototype,
  690. ostring = op.toString,
  691. hasOwn = op.hasOwnProperty,
  692. ap = Array.prototype,
  693. apsp = ap.splice,
  694. isBrowser = typeof window != "undefined" && typeof navigator != "undefined" && !!window.document,
  695. isWebWorker = !isBrowser && typeof importScripts != "undefined",
  696. readyRegExp = isBrowser && navigator.platform === "PLAYSTATION 3" ? /^complete$/: /^(complete|loaded)$/,
  697. defContextName = "_",
  698. isOpera = typeof opera != "undefined" && opera.toString() === "[object Opera]",
  699. contexts = {},
  700. cfg = {},
  701. globalDefQueue = [],
  702. useInteractive = !1;
  703. if (typeof define != "undefined") return;
  704. if (typeof requirejs != "undefined") {
  705. if (isFunction(requirejs)) return;
  706. cfg = requirejs,
  707. requirejs = undefined
  708. }
  709. typeof require != "undefined" && !isFunction(require) && (cfg = require, require = undefined),
  710. req = requirejs = function(e, t, n, r) {
  711. var i, s, o = defContextName;
  712. return ! isArray(e) && typeof e != "string" && (s = e, isArray(t) ? (e = t, t = n, n = r) : e = []),
  713. s && s.context && (o = s.context),
  714. i = getOwn(contexts, o),
  715. i || (i = contexts[o] = req.s.newContext(o)),
  716. s && i.configure(s),
  717. i.require(e, t, n)
  718. },
  719. req.config = function(e) {
  720. return req(e)
  721. },
  722. req.nextTick = typeof setTimeout != "undefined" ?
  723. function(e) {
  724. setTimeout(e, 4)
  725. }: function(e) {
  726. e()
  727. },
  728. require || (require = req),
  729. req.version = version,
  730. req.jsExtRegExp = /^\/|:|\?|\.js$/,
  731. req.isBrowser = isBrowser,
  732. s = req.s = {
  733. contexts: contexts,
  734. newContext: newContext
  735. },
  736. req({}),
  737. each(["toUrl", "undef", "defined", "specified"],
  738. function(e) {
  739. req[e] = function() {
  740. var t = contexts[defContextName];
  741. return t.require[e].apply(t, arguments)
  742. }
  743. }),
  744. isBrowser && (head = s.head = document.getElementsByTagName("head")[0], baseElement = document.getElementsByTagName("base")[0], baseElement && (head = s.head = baseElement.parentNode)),
  745. req.onError = defaultOnError,
  746. req.createNode = function(e, t, n) {
  747. var r = e.xhtml ? document.createElementNS("http://www.w3.org/1999/xhtml", "html:script") : document.createElement("script");
  748. return r.type = e.scriptType || "text/javascript",
  749. r.charset = "utf-8",
  750. r.async = !0,
  751. r
  752. },
  753. req.load = function(e, t, n) {
  754. var r = e && e.config || {},
  755. i;
  756. if (isBrowser) return i = req.createNode(r, t, n),
  757. i.setAttribute("data-requirecontext", e.contextName),
  758. i.setAttribute("data-requiremodule", t),
  759. i.attachEvent && !(i.attachEvent.toString && i.attachEvent.toString().indexOf("[native code") < 0) && !isOpera ? (useInteractive = !0, i.attachEvent("onreadystatechange", e.onScriptLoad)) : (i.addEventListener("load", e.onScriptLoad, !1), i.addEventListener("error", e.onScriptError, !1)),
  760. i.src = n,
  761. currentlyAddingScript = i,
  762. baseElement ? head.insertBefore(i, baseElement) : head.appendChild(i),
  763. currentlyAddingScript = null,
  764. i;
  765. if (isWebWorker) try {
  766. importScripts(n),
  767. e.completeLoad(t)
  768. } catch(s) {
  769. e.onError(makeError("importscripts", "importScripts failed for " + t + " at " + n, s, [t]))
  770. }
  771. },
  772. isBrowser && !cfg.skipDataMain && eachReverse(scripts(),
  773. function(e) {
  774. head || (head = e.parentNode),
  775. dataMain = e.getAttribute("data-main");
  776. if (dataMain) return mainScript = dataMain,
  777. cfg.baseUrl || (src = mainScript.split("/"), mainScript = src.pop(), subPath = src.length ? src.join("/") + "/": "./", cfg.baseUrl = subPath),
  778. mainScript = mainScript.replace(jsSuffixRegExp, ""),
  779. req.jsExtRegExp.test(mainScript) && (mainScript = dataMain),
  780. cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript],
  781. !0
  782. }),
  783. define = function(e, t, n) {
  784. var r, i;
  785. typeof e != "string" && (n = t, t = e, e = null),
  786. isArray(t) || (n = t, t = null),
  787. !t && isFunction(n) && (t = [], n.length && (n.toString().replace(commentRegExp, "").replace(cjsRequireRegExp,
  788. function(e, n) {
  789. t.push(n)
  790. }), t = (n.length === 1 ? ["require"] : ["require", "exports", "module"]).concat(t))),
  791. useInteractive && (r = currentlyAddingScript || getInteractiveScript(), r && (e || (e = r.getAttribute("data-requiremodule")), i = contexts[r.getAttribute("data-requirecontext")])),
  792. (i ? i.defQueue: globalDefQueue).push([e, t, n])
  793. },
  794. define.amd = {
  795. jQuery: !0
  796. },
  797. req.exec = function(text) {
  798. return eval(text)
  799. },
  800. req(cfg)
  801. })(this),
  802. define("requireLib",
  803. function() {});
  804. var viewporter; (function() {
  805. var e;
  806. viewporter = {
  807. forceDetection: !1,
  808. disableLegacyAndroid: !0,
  809. ACTIVE: function() {
  810. return viewporter.disableLegacyAndroid && /android 2/i.test(navigator.userAgent) ? !1 : /ipad/i.test(navigator.userAgent) ? !1 : /webos/i.test(navigator.userAgent) ? !0 : "ontouchstart" in window ? !0 : !1
  811. },
  812. READY: !1,
  813. isLandscape: function() {
  814. return window.orientation === 90 || window.orientation === -90
  815. },
  816. ready: function(e) {
  817. window.addEventListener("viewportready", e, !1)
  818. },
  819. change: function(e) {
  820. window.addEventListener("viewportchange", e, !1)
  821. },
  822. refresh: function() {
  823. e && e.prepareVisualViewport()
  824. },
  825. preventPageScroll: function() {
  826. document.body.addEventListener("touchmove",
  827. function(e) {
  828. e.preventDefault()
  829. },
  830. !1),
  831. document.body.addEventListener("touchstart",
  832. function() {
  833. e.prepareVisualViewport()
  834. },
  835. !1)
  836. }
  837. },
  838. viewporter.ACTIVE = viewporter.ACTIVE();
  839. if (!viewporter.ACTIVE) return;
  840. var t = function() {
  841. var e = this;
  842. this.IS_ANDROID = /Android/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent);
  843. var t = function() {
  844. e.prepareVisualViewport();
  845. var t = window.orientation;
  846. window.addEventListener("orientationchange",
  847. function() {
  848. window.orientation !== t && (e.prepareVisualViewport(), t = window.orientation)
  849. },
  850. !1)
  851. };
  852. document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
  853. function() {
  854. t()
  855. },
  856. !1) : t()
  857. };
  858. t.prototype = {
  859. getProfile: function() {
  860. if (viewporter.forceDetection) return null;
  861. for (var e in viewporter.profiles) if ((new RegExp(e)).test(navigator.userAgent)) return viewporter.profiles[e];
  862. return null
  863. },
  864. postProcess: function() {
  865. viewporter.READY = !0,
  866. this.triggerWindowEvent(this._firstUpdateExecuted ? "viewportchange": "viewportready"),
  867. this._firstUpdateExecuted = !0
  868. },
  869. prepareVisualViewport: function() {
  870. var e = this;
  871. if (navigator.standalone) return this.postProcess();
  872. document.documentElement.style.minHeight = "5000px";
  873. var t = window.innerHeight,
  874. n = this.getProfile(),
  875. r = viewporter.isLandscape() ? "landscape": "portrait";
  876. window.scrollTo(0, e.IS_ANDROID ? 1 : 0);
  877. var i = 40,
  878. s = window.setInterval(function() {
  879. function o() {
  880. return n ? window.innerHeight === n[r] : !1
  881. }
  882. function u() {
  883. return window.innerHeight > t
  884. }
  885. window.scrollTo(0, e.IS_ANDROID ? 1 : 0),
  886. i--;
  887. if ((e.IS_ANDROID ? o() : u()) || i < 0) document.documentElement.style.minHeight = window.innerHeight + "px",
  888. document.getElementById("viewporter").style.position = "relative",
  889. document.getElementById("viewporter").style.height = window.innerHeight + "px",
  890. clearInterval(s),
  891. e.postProcess()
  892. },
  893. 10)
  894. },
  895. triggerWindowEvent: function(e) {
  896. var t = document.createEvent("Event");
  897. t.initEvent(e, !1, !1),
  898. window.dispatchEvent(t)
  899. }
  900. },
  901. e = new t
  902. })(),
  903. viewporter.profiles = {
  904. MZ601: {
  905. portrait: 696,
  906. landscape: 1176
  907. },
  908. "GT-I9000|GT-I9100|Nexus S": {
  909. portrait: 508,
  910. landscape: 295
  911. },
  912. "GT-P1000": {
  913. portrait: 657,
  914. landscape: 400
  915. },
  916. "Desire_A8181|DesireHD_A9191": {
  917. portrait: 533,
  918. landscape: 320
  919. }
  920. },
  921. define("viewporter",
  922. function(e) {
  923. return function() {
  924. var t, n;
  925. return t || e.viewporter
  926. }
  927. } (this)),
  928. this.createjs = this.createjs || {},
  929. function() {
  930. var e = function(e, t, n) {
  931. this.initialize(e, t, n)
  932. },
  933. t = e.prototype;
  934. t.type = null,
  935. t.target = null,
  936. t.currentTarget = null,
  937. t.eventPhase = 0,
  938. t.bubbles = !1,
  939. t.cancelable = !1,
  940. t.timeStamp = 0,
  941. t.defaultPrevented = !1,
  942. t.propagationStopped = !1,
  943. t.immediatePropagationStopped = !1,
  944. t.removed = !1,
  945. t.initialize = function(e, t, n) {
  946. this.type = e,
  947. this.bubbles = t,
  948. this.cancelable = n,
  949. this.timeStamp = (new Date).getTime()
  950. },
  951. t.preventDefault = function() {
  952. this.defaultPrevented = !0
  953. },
  954. t.stopPropagation = function() {
  955. this.propagationStopped = !0
  956. },
  957. t.stopImmediatePropagation = function() {
  958. this.immediatePropagationStopped = this.propagationStopped = !0
  959. },
  960. t.remove = function() {
  961. this.removed = !0
  962. },
  963. t.clone = function() {
  964. return new e(this.type, this.bubbles, this.cancelable)
  965. },
  966. t.toString = function() {
  967. return "[Event (type=" + this.type + ")]"
  968. },
  969. createjs.Event = e
  970. } (),
  971. this.createjs = this.createjs || {},
  972. function() {
  973. var e = function() {},
  974. t = e.prototype;
  975. e.initialize = function(e) {
  976. e.addEventListener = t.addEventListener,
  977. e.on = t.on,
  978. e.removeEventListener = e.off = t.removeEventListener,
  979. e.removeAllEventListeners = t.removeAllEventListeners,
  980. e.hasEventListener = t.hasEventListener,
  981. e.dispatchEvent = t.dispatchEvent,
  982. e._dispatchEvent = t._dispatchEvent,
  983. e.willTrigger = t.willTrigger
  984. },
  985. t._listeners = null,
  986. t._captureListeners = null,
  987. t.initialize = function() {},
  988. t.addEventListener = function(e, t, n) {
  989. var r;
  990. n ? r = this._captureListeners = this._captureListeners || {}: r = this._listeners = this._listeners || {};
  991. var i = r[e];
  992. return i && this.removeEventListener(e, t, n),
  993. i = r[e],
  994. i ? i.push(t) : r[e] = [t],
  995. t
  996. },
  997. t.on = function(e, t, n, r, i, s) {
  998. return t.handleEvent && (n = n || t, t = t.handleEvent),
  999. n = n || this,
  1000. this.addEventListener(e,
  1001. function(e) {
  1002. t.call(n, e, i),
  1003. r && e.remove()
  1004. },
  1005. s)
  1006. },
  1007. t.removeEventListener = function(e, t, n) {
  1008. var r = n ? this._captureListeners: this._listeners;
  1009. if (!r) return;
  1010. var i = r[e];
  1011. if (!i) return;
  1012. for (var s = 0,
  1013. o = i.length; s < o; s++) if (i[s] == t) {
  1014. o == 1 ? delete r[e] : i.splice(s, 1);
  1015. break
  1016. }
  1017. },
  1018. t.off = t.removeEventListener,
  1019. t.removeAllEventListeners = function(e) {
  1020. e ? (this._listeners && delete this._listeners[e], this._captureListeners && delete this._captureListeners[e]) : this._listeners = this._captureListeners = null
  1021. },
  1022. t.dispatchEvent = function(e, t) {
  1023. if (typeof e == "string") {
  1024. var n = this._listeners;
  1025. if (!n || !n[e]) return ! 1;
  1026. e = new createjs.Event(e)
  1027. }
  1028. e.target = t || this;
  1029. if (!e.bubbles || !this.parent) this._dispatchEvent(e, 2);
  1030. else {
  1031. var r = this,
  1032. i = [r];
  1033. while (r.parent) i.push(r = r.parent);
  1034. var s, o = i.length;
  1035. for (s = o - 1; s >= 0 && !e.propagationStopped; s--) i[s]._dispatchEvent(e, 1 + (s == 0));
  1036. for (s = 1; s < o && !e.propagationStopped; s++) i[s]._dispatchEvent(e, 3)
  1037. }
  1038. return e.defaultPrevented
  1039. },
  1040. t.hasEventListener = function(e) {
  1041. var t = this._listeners,
  1042. n = this._captureListeners;
  1043. return !! (t && t[e] || n && n[e])
  1044. },
  1045. t.willTrigger = function(e) {
  1046. var t = this;
  1047. while (t) {
  1048. if (t.hasEventListener(e)) return ! 0;
  1049. t = t.parent
  1050. }
  1051. return ! 1
  1052. },
  1053. t.toString = function() {
  1054. return "[EventDispatcher]"
  1055. },
  1056. t._dispatchEvent = function(e, t) {
  1057. var n, r = t == 1 ? this._captureListeners: this._listeners;
  1058. if (e && r) {
  1059. var i = r[e.type];
  1060. if (!i || !(n = i.length)) return;
  1061. e.currentTarget = this,
  1062. e.eventPhase = t,
  1063. e.removed = !1,
  1064. i = i.slice();
  1065. for (var s = 0; s < n && !e.immediatePropagationStopped; s++) {
  1066. var o = i[s];
  1067. o.handleEvent ? o.handleEvent(e) : o(e),
  1068. e.removed && (this.off(e.type, o, t == 1), e.removed = !1)
  1069. }
  1070. }
  1071. },
  1072. createjs.EventDispatcher = e
  1073. } (),
  1074. this.createjs = this.createjs || {},
  1075. function() {
  1076. createjs.indexOf = function(e, t) {
  1077. for (var n = 0,
  1078. r = e.length; n < r; n++) if (t === e[n]) return n;
  1079. return - 1
  1080. }
  1081. } (),
  1082. this.createjs = this.createjs || {},
  1083. function() {
  1084. var e = function() {
  1085. throw "UID cannot be instantiated"
  1086. };
  1087. e._nextID = 0,
  1088. e.get = function() {
  1089. return e._nextID++
  1090. },
  1091. createjs.UID = e
  1092. } (),
  1093. this.createjs = this.createjs || {},
  1094. function() {
  1095. var e = function() {
  1096. throw "Ticker cannot be instantiated."
  1097. };
  1098. e.RAF_SYNCHED = "synched",
  1099. e.RAF = "raf",
  1100. e.TIMEOUT = "timeout",
  1101. e.useRAF = !1,
  1102. e.timingMode = null,
  1103. e.maxDelta = 0,
  1104. e.removeEventListener = null,
  1105. e.removeAllEventListeners = null,
  1106. e.dispatchEvent = null,
  1107. e.hasEventListener = null,
  1108. e._listeners = null,
  1109. createjs.EventDispatcher.initialize(e),
  1110. e._addEventListener = e.addEventListener,
  1111. e.addEventListener = function() {
  1112. return ! e._inited && e.init(),
  1113. e._addEventListener.apply(e, arguments)
  1114. },
  1115. e._paused = !1,
  1116. e._inited = !1,
  1117. e._startTime = 0,
  1118. e._pausedTime = 0,
  1119. e._ticks = 0,
  1120. e._pausedTicks = 0,
  1121. e._interval = 50,
  1122. e._lastTime = 0,
  1123. e._times = null,
  1124. e._tickTimes = null,
  1125. e._timerId = null,
  1126. e._raf = !0,
  1127. e.init = function() {
  1128. if (e._inited) return;
  1129. e._inited = !0,
  1130. e._times = [],
  1131. e._tickTimes = [],
  1132. e._startTime = e._getTime(),
  1133. e._times.push(e._lastTime = 0),
  1134. e.setInterval(e._interval)
  1135. },
  1136. e.reset = function() {
  1137. if (e._raf) {
  1138. var t = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame;
  1139. t && t(e._timerId)
  1140. } else clearTimeout(e._timerId);
  1141. e.removeAllEventListeners("tick")
  1142. },
  1143. e.setInterval = function(t) {
  1144. e._interval = t;
  1145. if (!e._inited) return;
  1146. e._setupTick()
  1147. },
  1148. e.getInterval = function() {
  1149. return e._interval
  1150. },
  1151. e.setFPS = function(t) {
  1152. e.setInterval(1e3 / t)
  1153. },
  1154. e.getFPS = function() {
  1155. return 1e3 / e._interval
  1156. },
  1157. e.getMeasuredTickTime = function(t) {
  1158. var n = 0,
  1159. r = e._tickTimes;
  1160. if (r.length < 1) return - 1;
  1161. t = Math.min(r.length, t || e.getFPS() | 0);
  1162. for (var i = 0; i < t; i++) n += r[i];
  1163. return n / t
  1164. },
  1165. e.getMeasuredFPS = function(t) {
  1166. var n = e._times;
  1167. return n.length < 2 ? -1 : (t = Math.min(n.length - 1, t || e.getFPS() | 0), 1e3 / ((n[0] - n[t]) / t))
  1168. },
  1169. e.setPaused = function(t) {
  1170. e._paused = t
  1171. },
  1172. e.getPaused = function() {
  1173. return e._paused
  1174. },
  1175. e.getTime = function(t) {
  1176. return e._getTime() - e._startTime - (t ? e._pausedTime: 0)
  1177. },
  1178. e.getEventTime = function(t) {
  1179. return (e._lastTime || e._startTime) - (t ? e._pausedTime: 0)
  1180. },
  1181. e.getTicks = function(t) {
  1182. return e._ticks - (t ? e._pausedTicks: 0)
  1183. },
  1184. e._handleSynch = function() {
  1185. var t = e._getTime() - e._startTime;
  1186. e._timerId = null,
  1187. e._setupTick(),
  1188. t - e._lastTime >= (e._interval - 1) * .97 && e._tick()
  1189. },
  1190. e._handleRAF = function() {
  1191. e._timerId = null,
  1192. e._setupTick(),
  1193. e._tick()
  1194. },
  1195. e._handleTimeout = function() {
  1196. e._timerId = null,
  1197. e._setupTick(),
  1198. e._tick()
  1199. },
  1200. e._setupTick = function() {
  1201. if (e._timerId != null) return;
  1202. var t = e.timingMode || e.useRAF && e.RAF_SYNCHED;
  1203. if (t == e.RAF_SYNCHED || t == e.RAF) {
  1204. var n = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;
  1205. if (n) {
  1206. e._timerId = n(t == e.RAF ? e._handleRAF: e._handleSynch),
  1207. e._raf = !0;
  1208. return
  1209. }
  1210. }
  1211. e._raf = !1,
  1212. e._timerId = setTimeout(e._handleTimeout, e._interval)
  1213. },
  1214. e._tick = function() {
  1215. var t = e._getTime() - e._startTime,
  1216. n = t - e._lastTime,
  1217. r = e._paused;
  1218. e._ticks++,
  1219. r && (e._pausedTicks++, e._pausedTime += n),
  1220. e._lastTime = t;
  1221. if (e.hasEventListener("tick")) {
  1222. var i = new createjs.Event("tick"),
  1223. s = e.maxDelta;
  1224. i.delta = s && n > s ? s: n,
  1225. i.paused = r,
  1226. i.time = t,
  1227. i.runTime = t - e._pausedTime,
  1228. e.dispatchEvent(i)
  1229. }
  1230. e._tickTimes.unshift(e._getTime() - t);
  1231. while (e._tickTimes.length > 100) e._tickTimes.pop();
  1232. e._times.unshift(t);
  1233. while (e._times.length > 100) e._times.pop()
  1234. };
  1235. var t = window.performance && (performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow);
  1236. e._getTime = function() {
  1237. return t && t.call(performance) || (new Date).getTime()
  1238. },
  1239. createjs.Ticker = e
  1240. } (),
  1241. this.createjs = this.createjs || {},
  1242. function() {
  1243. var e = function(e, t, n, r, i, s, o, u, a, f) {
  1244. this.initialize(e, t, n, r, i, s, o, u, a, f)
  1245. },
  1246. t = e.prototype = new createjs.Event;
  1247. t.stageX = 0,
  1248. t.stageY = 0,
  1249. t.rawX = 0,
  1250. t.rawY = 0,
  1251. t.nativeEvent = null,
  1252. t.pointerID = 0,
  1253. t.primary = !1,
  1254. t.addEventListener = null,
  1255. t.removeEventListener = null,
  1256. t.removeAllEventListeners = null,
  1257. t.dispatchEvent = null,
  1258. t.hasEventListener = null,
  1259. t._listeners = null,
  1260. createjs.EventDispatcher.initialize(t),
  1261. t._get_localX = function() {
  1262. return this.currentTarget.globalToLocal(this.rawX, this.rawY).x
  1263. },
  1264. t._get_localY = function() {
  1265. return this.currentTarget.globalToLocal(this.rawX, this.rawY).y
  1266. };
  1267. try {
  1268. Object.defineProperties(t, {
  1269. localX: {
  1270. get: t._get_localX
  1271. },
  1272. localY: {
  1273. get: t._get_localY
  1274. }
  1275. })
  1276. } catch(n) {}
  1277. t.Event_initialize = t.initialize,
  1278. t.initialize = function(e, t, n, r, i, s, o, u, a, f) {
  1279. this.Event_initialize(e, t, n),
  1280. this.stageX = r,
  1281. this.stageY = i,
  1282. this.nativeEvent = s,
  1283. this.pointerID = o,
  1284. this.primary = u,
  1285. this.rawX = a == null ? r: a,
  1286. this.rawY = f == null ? i: f
  1287. },
  1288. t.clone = function() {
  1289. return new e(this.type, this.bubbles, this.cancelable, this.stageX, this.stageY, this.target, this.nativeEvent, this.pointerID, this.primary, this.rawX, this.rawY)
  1290. },
  1291. t.toString = function() {
  1292. return "[MouseEvent (type=" + this.type + " stageX=" + this.stageX + " stageY=" + this.stageY + ")]"
  1293. },
  1294. createjs.MouseEvent = e
  1295. } (),
  1296. this.createjs = this.createjs || {},
  1297. function() {
  1298. var e = function(e, t, n, r, i, s) {
  1299. this.initialize(e, t, n, r, i, s)
  1300. },
  1301. t = e.prototype;
  1302. e.identity = null,
  1303. e.DEG_TO_RAD = Math.PI / 180,
  1304. t.a = 1,
  1305. t.b = 0,
  1306. t.c = 0,
  1307. t.d = 1,
  1308. t.tx = 0,
  1309. t.ty = 0,
  1310. t.alpha = 1,
  1311. t.shadow = null,
  1312. t.compositeOperation = null,
  1313. t.initialize = function(e, t, n, r, i, s) {
  1314. return this.a = e == null ? 1 : e,
  1315. this.b = t || 0,
  1316. this.c = n || 0,
  1317. this.d = r == null ? 1 : r,
  1318. this.tx = i || 0,
  1319. this.ty = s || 0,
  1320. this
  1321. },
  1322. t.prepend = function(e, t, n, r, i, s) {
  1323. var o = this.tx;
  1324. if (e != 1 || t != 0 || n != 0 || r != 1) {
  1325. var u = this.a,
  1326. a = this.c;
  1327. this.a = u * e + this.b * n,
  1328. this.b = u * t + this.b * r,
  1329. this.c = a * e + this.d * n,
  1330. this.d = a * t + this.d * r
  1331. }
  1332. return this.tx = o * e + this.ty * n + i,
  1333. this.ty = o * t + this.ty * r + s,
  1334. this
  1335. },
  1336. t.append = function(e, t, n, r, i, s) {
  1337. var o = this.a,
  1338. u = this.b,
  1339. a = this.c,
  1340. f = this.d;
  1341. return this.a = e * o + t * a,
  1342. this.b = e * u + t * f,
  1343. this.c = n * o + r * a,
  1344. this.d = n * u + r * f,
  1345. this.tx = i * o + s * a + this.tx,
  1346. this.ty = i * u + s * f + this.ty,
  1347. this
  1348. },
  1349. t.prependMatrix = function(e) {
  1350. return this.prepend(e.a, e.b, e.c, e.d, e.tx, e.ty),
  1351. this.prependProperties(e.alpha, e.shadow, e.compositeOperation),
  1352. this
  1353. },
  1354. t.appendMatrix = function(e) {
  1355. return this.append(e.a, e.b, e.c, e.d, e.tx, e.ty),
  1356. this.appendProperties(e.alpha, e.shadow, e.compositeOperation),
  1357. this
  1358. },
  1359. t.prependTransform = function(t, n, r, i, s, o, u, a, f) {
  1360. if (s % 360) var l = s * e.DEG_TO_RAD,
  1361. c = Math.cos(l),
  1362. h = Math.sin(l);
  1363. else c = 1,
  1364. h = 0;
  1365. if (a || f) this.tx -= a,
  1366. this.ty -= f;
  1367. return o || u ? (o *= e.DEG_TO_RAD, u *= e.DEG_TO_RAD, this.prepend(c * r, h * r, -h * i, c * i, 0, 0), this.prepend(Math.cos(u), Math.sin(u), -Math.sin(o), Math.cos(o), t, n)) : this.prepend(c * r, h * r, -h * i, c * i, t, n),
  1368. this
  1369. },
  1370. t.appendTransform = function(t, n, r, i, s, o, u, a, f) {
  1371. if (s % 360) var l = s * e.DEG_TO_RAD,
  1372. c = Math.cos(l),
  1373. h = Math.sin(l);
  1374. else c = 1,
  1375. h = 0;
  1376. o || u ? (o *= e.DEG_TO_RAD, u *= e.DEG_TO_RAD, this.append(Math.cos(u), Math.sin(u), -Math.sin(o), Math.cos(o), t, n), this.append(c * r, h * r, -h * i, c * i, 0, 0)) : this.append(c * r, h * r, -h * i, c * i, t, n);
  1377. if (a || f) this.tx -= a * this.a + f * this.c,
  1378. this.ty -= a * this.b + f * this.d;
  1379. return this
  1380. },
  1381. t.rotate = function(e) {
  1382. var t = Math.cos(e),
  1383. n = Math.sin(e),
  1384. r = this.a,
  1385. i = this.c,
  1386. s = this.tx;
  1387. return this.a = r * t - this.b * n,
  1388. this.b = r * n + this.b * t,
  1389. this.c = i * t - this.d * n,
  1390. this.d = i * n + this.d * t,
  1391. this.tx = s * t - this.ty * n,
  1392. this.ty = s * n + this.ty * t,
  1393. this
  1394. },
  1395. t.skew = function(t, n) {
  1396. return t *= e.DEG_TO_RAD,
  1397. n *= e.DEG_TO_RAD,
  1398. this.append(Math.cos(n), Math.sin(n), -Math.sin(t), Math.cos(t), 0, 0),
  1399. this
  1400. },
  1401. t.scale = function(e, t) {
  1402. return this.a *= e,
  1403. this.d *= t,
  1404. this.c *= e,
  1405. this.b *= t,
  1406. this.tx *= e,
  1407. this.ty *= t,
  1408. this
  1409. },
  1410. t.translate = function(e, t) {
  1411. return this.tx += e,
  1412. this.ty += t,
  1413. this
  1414. },
  1415. t.identity = function() {
  1416. return this.alpha = this.a = this.d = 1,
  1417. this.b = this.c = this.tx = this.ty = 0,
  1418. this.shadow = this.compositeOperation = null,
  1419. this
  1420. },
  1421. t.invert = function() {
  1422. var e = this.a,
  1423. t = this.b,
  1424. n = this.c,
  1425. r = this.d,
  1426. i = this.tx,
  1427. s = e * r - t * n;
  1428. return this.a = r / s,
  1429. this.b = -t / s,
  1430. this.c = -n / s,
  1431. this.d = e / s,
  1432. this.tx = (n * this.ty - r * i) / s,
  1433. this.ty = -(e * this.ty - t * i) / s,
  1434. this
  1435. },
  1436. t.isIdentity = function() {
  1437. return this.tx == 0 && this.ty == 0 && this.a == 1 && this.b == 0 && this.c == 0 && this.d == 1
  1438. },
  1439. t.transformPoint = function(e, t, n) {
  1440. return n = n || {},
  1441. n.x = e * this.a + t * this.c + this.tx,
  1442. n.y = e * this.b + t * this.d + this.ty,
  1443. n
  1444. },
  1445. t.decompose = function(t) {
  1446. t == null && (t = {}),
  1447. t.x = this.tx,
  1448. t.y = this.ty,
  1449. t.scaleX = Math.sqrt(this.a * this.a + this.b * this.b),
  1450. t.scaleY = Math.sqrt(this.c * this.c + this.d * this.d);
  1451. var n = Math.atan2( - this.c, this.d),
  1452. r = Math.atan2(this.b, this.a);
  1453. return n == r ? (t.rotation = r / e.DEG_TO_RAD, this.a < 0 && this.d >= 0 && (t.rotation += t.rotation <= 0 ? 180 : -180), t.skewX = t.skewY = 0) : (t.skewX = n / e.DEG_TO_RAD, t.skewY = r / e.DEG_TO_RAD),
  1454. t
  1455. },
  1456. t.reinitialize = function(e, t, n, r, i, s, o, u, a) {
  1457. return this.initialize(e, t, n, r, i, s),
  1458. this.alpha = o == null ? 1 : o,
  1459. this.shadow = u,
  1460. this.compositeOperation = a,
  1461. this
  1462. },
  1463. t.copy = function(e) {
  1464. return this.reinitialize(e.a, e.b, e.c, e.d, e.tx, e.ty, e.alpha, e.shadow, e.compositeOperation)
  1465. },
  1466. t.appendProperties = function(e, t, n) {
  1467. return this.alpha *= e,
  1468. this.shadow = t || this.shadow,
  1469. this.compositeOperation = n || this.compositeOperation,
  1470. this
  1471. },
  1472. t.prependProperties = function(e, t, n) {
  1473. return this.alpha *= e,
  1474. this.shadow = this.shadow || t,
  1475. this.compositeOperation = this.compositeOperation || n,
  1476. this
  1477. },
  1478. t.clone = function() {
  1479. return (new e).copy(this)
  1480. },
  1481. t.toString = function() {
  1482. return "[Matrix2D (a=" + this.a + " b=" + this.b + " c=" + this.c + " d=" + this.d + " tx=" + this.tx + " ty=" + this.ty + ")]"
  1483. },
  1484. e.identity = new e,
  1485. createjs.Matrix2D = e
  1486. } (),
  1487. this.createjs = this.createjs || {},
  1488. function() {
  1489. var e = function(e, t) {
  1490. this.initialize(e, t)
  1491. },
  1492. t = e.prototype;
  1493. t.x = 0,
  1494. t.y = 0,
  1495. t.initialize = function(e, t) {
  1496. return this.x = e == null ? 0 : e,
  1497. this.y = t == null ? 0 : t,
  1498. this
  1499. },
  1500. t.copy = function(e) {
  1501. return this.initialize(e.x, e.y)
  1502. },
  1503. t.clone = function() {
  1504. return new e(this.x, this.y)
  1505. },
  1506. t.toString = function() {
  1507. return "[Point (x=" + this.x + " y=" + this.y + ")]"
  1508. },
  1509. createjs.Point = e
  1510. } (),
  1511. this.createjs = this.createjs || {},
  1512. function() {
  1513. var e = function(e, t, n, r) {
  1514. this.initialize(e, t, n, r)
  1515. },
  1516. t = e.prototype;
  1517. t.x = 0,
  1518. t.y = 0,
  1519. t.width = 0,
  1520. t.height = 0,
  1521. t.initialize = function(e, t, n, r) {
  1522. return this.x = e || 0,
  1523. this.y = t || 0,
  1524. this.width = n || 0,
  1525. this.height = r || 0,
  1526. this
  1527. },
  1528. t.copy = function(e) {
  1529. return this.initialize(e.x, e.y, e.width, e.height)
  1530. },
  1531. t.clone = function() {
  1532. return new e(this.x, this.y, this.width, this.height)
  1533. },
  1534. t.toString = function() {
  1535. return "[Rectangle (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + ")]"
  1536. },
  1537. createjs.Rectangle = e
  1538. } (),
  1539. this.createjs = this.createjs || {},
  1540. function() {
  1541. var e = function(e, t, n, r, i, s, o) {
  1542. this.initialize(e, t, n, r, i, s, o)
  1543. },
  1544. t = e.prototype;
  1545. t.target = null,
  1546. t.overLabel = null,
  1547. t.outLabel = null,
  1548. t.downLabel = null,
  1549. t.play = !1,
  1550. t._isPressed = !1,
  1551. t._isOver = !1,
  1552. t.initialize = function(e, t, n, r, i, s, o) {
  1553. if (!e.addEventListener) return;
  1554. this.target = e,
  1555. e.cursor = "pointer",
  1556. this.overLabel = n == null ? "over": n,
  1557. this.outLabel = t == null ? "out": t,
  1558. this.downLabel = r == null ? "down": r,
  1559. this.play = i,
  1560. this.setEnabled(!0),
  1561. this.handleEvent({}),
  1562. s && (o && (s.actionsEnabled = !1, s.gotoAndStop && s.gotoAndStop(o)), e.hitArea = s)
  1563. },
  1564. t.setEnabled = function(e) {
  1565. var t = this.target;
  1566. e ? (t.addEventListener("rollover", this), t.addEventListener("rollout", this), t.addEventListener("mousedown", this), t.addEventListener("pressup", this)) : (t.removeEventListener("rollover", this), t.removeEventListener("rollout", this), t.removeEventListener("mousedown", this), t.removeEventListener("pressup", this))
  1567. },
  1568. t.toString = function() {
  1569. return "[ButtonHelper]"
  1570. },
  1571. t.handleEvent = function(e) {
  1572. var t, n = this.target,
  1573. r = e.type;
  1574. r == "mousedown" ? (this._isPressed = !0, t = this.downLabel) : r == "pressup" ? (this._isPressed = !1, t = this._isOver ? this.overLabel: this.outLabel) : r == "rollover" ? (this._isOver = !0, t = this._isPressed ? this.downLabel: this.overLabel) : (this._isOver = !1, t = this._isPressed ? this.overLabel: this.outLabel),
  1575. this.play ? n.gotoAndPlay && n.gotoAndPlay(t) : n.gotoAndStop && n.gotoAndStop(t)
  1576. },
  1577. createjs.ButtonHelper = e
  1578. } (),
  1579. this.createjs = this.createjs || {},
  1580. function() {
  1581. var e = function(e, t, n, r) {
  1582. this.initialize(e, t, n, r)
  1583. },
  1584. t = e.prototype;
  1585. e.identity = null,
  1586. t.color = null,
  1587. t.offsetX = 0,
  1588. t.offsetY = 0,
  1589. t.blur = 0,
  1590. t.initialize = function(e, t, n, r) {
  1591. this.color = e,
  1592. this.offsetX = t,
  1593. this.offsetY = n,
  1594. this.blur = r
  1595. },
  1596. t.toString = function() {
  1597. return "[Shadow]"
  1598. },
  1599. t.clone = function() {
  1600. return new e(this.color, this.offsetX, this.offsetY, this.blur)
  1601. },
  1602. e.identity = new e("transparent", 0, 0, 0),
  1603. createjs.Shadow = e
  1604. } (),
  1605. this.createjs = this.createjs || {},
  1606. function() {
  1607. var e = function(e) {
  1608. this.initialize(e)
  1609. },
  1610. t = e.prototype = new createjs.EventDispatcher;
  1611. t.complete = !0,
  1612. t.framerate = 0,
  1613. t._animations = null,
  1614. t._frames = null,
  1615. t._images = null,
  1616. t._data = null,
  1617. t._loadCount = 0,
  1618. t._frameHeight = 0,
  1619. t._frameWidth = 0,
  1620. t._numFrames = 0,
  1621. t._regX = 0,
  1622. t._regY = 0,
  1623. t.initialize = function(e) {
  1624. var t, n, r, i;
  1625. if (e == null) return;
  1626. this.framerate = e.framerate || 0;
  1627. if (e.images && (n = e.images.length) > 0) {
  1628. i = this._images = [];
  1629. for (t = 0; t < n; t++) {
  1630. var s = e.images[t];
  1631. if (typeof s == "string") {
  1632. var o = s;
  1633. s = document.createElement("img"),
  1634. s.src = o
  1635. }
  1636. i.push(s),
  1637. !s.getContext && !s.complete && (this._loadCount++, this.complete = !1,
  1638. function(e) {
  1639. s.onload = function() {
  1640. e._handleImageLoad()
  1641. }
  1642. } (this))
  1643. }
  1644. }
  1645. if (e.frames != null) if (e.frames instanceof Array) {
  1646. this._frames = [],
  1647. i = e.frames;
  1648. for (t = 0, n = i.length; t < n; t++) {
  1649. var u = i[t];
  1650. this._frames.push({
  1651. image: this._images[u[4] ? u[4] : 0],
  1652. rect: new createjs.Rectangle(u[0], u[1], u[2], u[3]),
  1653. regX: u[5] || 0,
  1654. regY: u[6] || 0
  1655. })
  1656. }
  1657. } else r = e.frames,
  1658. this._frameWidth = r.width,
  1659. this._frameHeight = r.height,
  1660. this._regX = r.regX || 0,
  1661. this._regY = r.regY || 0,
  1662. this._numFrames = r.count,
  1663. this._loadCount == 0 && this._calculateFrames();
  1664. this._animations = [];
  1665. if ((r = e.animations) != null) {
  1666. this._data = {};
  1667. var a;
  1668. for (a in r) {
  1669. var f = {
  1670. name: a
  1671. },
  1672. l = r[a];
  1673. if (typeof l == "number") i = f.frames = [l];
  1674. else if (l instanceof Array) if (l.length == 1) f.frames = [l[0]];
  1675. else {
  1676. f.speed = l[3],
  1677. f.next = l[2],
  1678. i = f.frames = [];
  1679. for (t = l[0]; t <= l[1]; t++) i.push(t)
  1680. } else {
  1681. f.speed = l.speed,
  1682. f.next = l.next;
  1683. var c = l.frames;
  1684. i = f.frames = typeof c == "number" ? [c] : c.slice(0)
  1685. }
  1686. if (f.next === !0 || f.next === undefined) f.next = a;
  1687. if (f.next === !1 || i.length < 2 && f.next == a) f.next = null;
  1688. f.speed || (f.speed = 1),
  1689. this._animations.push(a),
  1690. this._data[a] = f
  1691. }
  1692. }
  1693. },
  1694. t.getNumFrames = function(e) {
  1695. if (e == null) return this._frames ? this._frames.length: this._numFrames;
  1696. var t = this._data[e];
  1697. return t == null ? 0 : t.frames.length
  1698. },
  1699. t.getAnimations = function() {
  1700. return this._animations.slice(0)
  1701. },
  1702. t.getAnimation = function(e) {
  1703. return this._data[e]
  1704. },
  1705. t.getFrame = function(e) {
  1706. var t;
  1707. return this._frames && (t = this._frames[e]) ? t: null
  1708. },
  1709. t.getFrameBounds = function(e, t) {
  1710. var n = this.getFrame(e);
  1711. return n ? (t || new createjs.Rectangle).initialize( - n.regX, -n.regY, n.rect.width, n.rect.height) : null
  1712. },
  1713. t.toString = function() {
  1714. return "[SpriteSheet]"
  1715. },
  1716. t.clone = function() {
  1717. var t = new e;
  1718. return t.complete = this.complete,
  1719. t._animations = this._animations,
  1720. t._frames = this._frames,
  1721. t._images = this._images,
  1722. t._data = this._data,
  1723. t._frameHeight = this._frameHeight,
  1724. t._frameWidth = this._frameWidth,
  1725. t._numFrames = this._numFrames,
  1726. t._loadCount = this._loadCount,
  1727. t
  1728. },
  1729. t._handleImageLoad = function() {--this._loadCount == 0 && (this._calculateFrames(), this.complete = !0, this.dispatchEvent("complete"))
  1730. },
  1731. t._calculateFrames = function() {
  1732. if (this._frames || this._frameWidth == 0) return;
  1733. this._frames = [];
  1734. var e = 0,
  1735. t = this._frameWidth,
  1736. n = this._frameHeight;
  1737. for (var r = 0,
  1738. i = this._images; r < i.length; r++) {
  1739. var s = i[r],
  1740. o = s.width / t | 0,
  1741. u = s.height / n | 0,
  1742. a = this._numFrames > 0 ? Math.min(this._numFrames - e, o * u) : o * u;
  1743. for (var f = 0; f < a; f++) this._frames.push({
  1744. image: s,
  1745. rect: new createjs.Rectangle(f % o * t, (f / o | 0) * n, t, n),
  1746. regX: this._regX,
  1747. regY: this._regY
  1748. });
  1749. e += a
  1750. }
  1751. this._numFrames = e
  1752. },
  1753. createjs.SpriteSheet = e
  1754. } (),
  1755. this.createjs = this.createjs || {},
  1756. function() {
  1757. function e(e, t, n) {
  1758. this.f = e,
  1759. this.params = t,
  1760. this.path = n == null ? !0 : n
  1761. }
  1762. e.prototype.exec = function(e) {
  1763. this.f.apply(e, this.params)
  1764. };
  1765. var t = function() {
  1766. this.initialize()
  1767. },
  1768. n = t.prototype;
  1769. t.getRGB = function(e, t, n, r) {
  1770. return e != null && n == null && (r = t, n = e & 255, t = e >> 8 & 255, e = e >> 16 & 255),
  1771. r == null ? "rgb(" + e + "," + t + "," + n + ")": "rgba(" + e + "," + t + "," + n + "," + r + ")"
  1772. },
  1773. t.getHSL = function(e, t, n, r) {
  1774. return r == null ? "hsl(" + e % 360 + "," + t + "%," + n + "%)": "hsla(" + e % 360 + "," + t + "%," + n + "%," + r + ")"
  1775. },
  1776. t.Command = e,
  1777. t.BASE_64 = {
  1778. A: 0,
  1779. B: 1,
  1780. C: 2,
  1781. D: 3,
  1782. E: 4,
  1783. F: 5,
  1784. G: 6,
  1785. H: 7,
  1786. I: 8,
  1787. J: 9,
  1788. K: 10,
  1789. L: 11,
  1790. M: 12,
  1791. N: 13,
  1792. O: 14,
  1793. P: 15,
  1794. Q: 16,
  1795. R: 17,
  1796. S: 18,
  1797. T: 19,
  1798. U: 20,
  1799. V: 21,
  1800. W: 22,
  1801. X: 23,
  1802. Y: 24,
  1803. Z: 25,
  1804. a: 26,
  1805. b: 27,
  1806. c: 28,
  1807. d: 29,
  1808. e: 30,
  1809. f: 31,
  1810. g: 32,
  1811. h: 33,
  1812. i: 34,
  1813. j: 35,
  1814. k: 36,
  1815. l: 37,
  1816. m: 38,
  1817. n: 39,
  1818. o: 40,
  1819. p: 41,
  1820. q: 42,
  1821. r: 43,
  1822. s: 44,
  1823. t: 45,
  1824. u: 46,
  1825. v: 47,
  1826. w: 48,
  1827. x: 49,
  1828. y: 50,
  1829. z: 51,
  1830. 0 : 52,
  1831. 1 : 53,
  1832. 2 : 54,
  1833. 3 : 55,
  1834. 4 : 56,
  1835. 5 : 57,
  1836. 6 : 58,
  1837. 7 : 59,
  1838. 8 : 60,
  1839. 9 : 61,
  1840. "+": 62,
  1841. "/": 63
  1842. },
  1843. t.STROKE_CAPS_MAP = ["butt", "round", "square"],
  1844. t.STROKE_JOINTS_MAP = ["miter", "round", "bevel"];
  1845. var r = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  1846. if (r.getContext) {
  1847. var i = t._ctx = r.getContext("2d");
  1848. t.beginCmd = new e(i.beginPath, [], !1),
  1849. t.fillCmd = new e(i.fill, [], !1),
  1850. t.strokeCmd = new e(i.stroke, [], !1),
  1851. r.width = r.height = 1
  1852. }
  1853. n._strokeInstructions = null,
  1854. n._strokeStyleInstructions = null,
  1855. n._strokeIgnoreScale = !1,
  1856. n._fillInstructions = null,
  1857. n._fillMatrix = null,
  1858. n._instructions = null,
  1859. n._oldInstructions = null,
  1860. n._activeInstructions = null,
  1861. n._active = !1,
  1862. n._dirty = !1,
  1863. n.initialize = function() {
  1864. this.clear(),
  1865. this._ctx = t._ctx
  1866. },
  1867. n.isEmpty = function() {
  1868. return ! (this._instructions.length || this._oldInstructions.length || this._activeInstructions.length)
  1869. },
  1870. n.draw = function(e) {
  1871. this._dirty && this._updateInstructions();
  1872. var t = this._instructions;
  1873. for (var n = 0,
  1874. r = t.length; n < r; n++) t[n].exec(e)
  1875. },
  1876. n.drawAsPath = function(e) {
  1877. this._dirty && this._updateInstructions();
  1878. var t, n = this._instructions;
  1879. for (var r = 0,
  1880. i = n.length; r < i; r++)((t = n[r]).path || r == 0) && t.exec(e)
  1881. },
  1882. n.moveTo = function(t, n) {
  1883. return this._activeInstructions.push(new e(this._ctx.moveTo, [t, n])),
  1884. this
  1885. },
  1886. n.lineTo = function(t, n) {
  1887. return this._dirty = this._active = !0,
  1888. this._activeInstructions.push(new e(this._ctx.lineTo, [t, n])),
  1889. this
  1890. },
  1891. n.arcTo = function(t, n, r, i, s) {
  1892. return this._dirty = this._active = !0,
  1893. this._activeInstructions.push(new e(this._ctx.arcTo, [t, n, r, i, s])),
  1894. this
  1895. },
  1896. n.arc = function(t, n, r, i, s, o) {
  1897. return this._dirty = this._active = !0,
  1898. o == null && (o = !1),
  1899. this._activeInstructions.push(new e(this._ctx.arc, [t, n, r, i, s, o])),
  1900. this
  1901. },
  1902. n.quadraticCurveTo = function(t, n, r, i) {
  1903. return this._dirty = this._active = !0,
  1904. this._activeInstructions.push(new e(this._ctx.quadraticCurveTo, [t, n, r, i])),
  1905. this
  1906. },
  1907. n.bezierCurveTo = function(t, n, r, i, s, o) {
  1908. return this._dirty = this._active = !0,
  1909. this._activeInstructions.push(new e(this._ctx.bezierCurveTo, [t, n, r, i, s, o])),
  1910. this
  1911. },
  1912. n.rect = function(t, n, r, i) {
  1913. return this._dirty = this._active = !0,
  1914. this._activeInstructions.push(new e(this._ctx.rect, [t, n, r, i])),
  1915. this
  1916. },
  1917. n.closePath = function() {
  1918. return this._active && (this._dirty = !0, this._activeInstructions.push(new e(this._ctx.closePath, []))),
  1919. this
  1920. },
  1921. n.clear = function() {
  1922. return this._instructions = [],
  1923. this._oldInstructions = [],
  1924. this._activeInstructions = [],
  1925. this._strokeStyleInstructions = this._strokeInstructions = this._fillInstructions = this._fillMatrix = null,
  1926. this._active = this._dirty = this._strokeIgnoreScale = !1,
  1927. this
  1928. },
  1929. n.beginFill = function(t) {
  1930. return this._active && this._newPath(),
  1931. this._fillInstructions = t ? [new e(this._setProp, ["fillStyle", t], !1)] : null,
  1932. this._fillMatrix = null,
  1933. this
  1934. },
  1935. n.beginLinearGradientFill = function(t, n, r, i, s, o) {
  1936. this._active && this._newPath();
  1937. var u = this._ctx.createLinearGradient(r, i, s, o);
  1938. for (var a = 0,
  1939. f = t.length; a < f; a++) u.addColorStop(n[a], t[a]);
  1940. return this._fillInstructions = [new e(this._setProp, ["fillStyle", u], !1)],
  1941. this._fillMatrix = null,
  1942. this
  1943. },
  1944. n.beginRadialGradientFill = function(t, n, r, i, s, o, u, a) {
  1945. this._active && this._newPath();
  1946. var f = this._ctx.createRadialGradient(r, i, s, o, u, a);
  1947. for (var l = 0,
  1948. c = t.length; l < c; l++) f.addColorStop(n[l], t[l]);
  1949. return this._fillInstructions = [new e(this._setProp, ["fillStyle", f], !1)],
  1950. this._fillMatrix = null,
  1951. this
  1952. },
  1953. n.beginBitmapFill = function(t, n, r) {
  1954. this._active && this._newPath(),
  1955. n = n || "";
  1956. var i = this._ctx.createPattern(t, n);
  1957. return this._fillInstructions = [new e(this._setProp, ["fillStyle", i], !1)],
  1958. this._fillMatrix = r ? [r.a, r.b, r.c, r.d, r.tx, r.ty] : null,
  1959. this
  1960. },
  1961. n.endFill = function() {
  1962. return this.beginFill()
  1963. },
  1964. n.setStrokeStyle = function(n, r, i, s, o) {
  1965. return this._active && this._newPath(),
  1966. this._strokeStyleInstructions = [new e(this._setProp, ["lineWidth", n == null ? "1": n], !1), new e(this._setProp, ["lineCap", r == null ? "butt": isNaN(r) ? r: t.STROKE_CAPS_MAP[r]], !1), new e(this._setProp, ["lineJoin", i == null ? "miter": isNaN(i) ? i: t.STROKE_JOINTS_MAP[i]], !1), new e(this._setProp, ["miterLimit", s == null ? "10": s], !1)],
  1967. this._strokeIgnoreScale = o,
  1968. this
  1969. },
  1970. n.beginStroke = function(t) {
  1971. return this._active && this._newPath(),
  1972. this._strokeInstructions = t ? [new e(this._setProp, ["strokeStyle", t], !1)] : null,
  1973. this
  1974. },
  1975. n.beginLinearGradientStroke = function(t, n, r, i, s, o) {
  1976. this._active && this._newPath();
  1977. var u = this._ctx.createLinearGradient(r, i, s, o);
  1978. for (var a = 0,
  1979. f = t.length; a < f; a++) u.addColorStop(n[a], t[a]);
  1980. return this._strokeInstructions = [new e(this._setProp, ["strokeStyle", u], !1)],
  1981. this
  1982. },
  1983. n.beginRadialGradientStroke = function(t, n, r, i, s, o, u, a) {
  1984. this._active && this._newPath();
  1985. var f = this._ctx.createRadialGradient(r, i, s, o, u, a);
  1986. for (var l = 0,
  1987. c = t.length; l < c; l++) f.addColorStop(n[l], t[l]);
  1988. return this._strokeInstructions = [new e(this._setProp, ["strokeStyle", f], !1)],
  1989. this
  1990. },
  1991. n.beginBitmapStroke = function(t, n) {
  1992. this._active && this._newPath(),
  1993. n = n || "";
  1994. var r = this._ctx.createPattern(t, n);
  1995. return this._strokeInstructions = [new e(this._setProp, ["strokeStyle", r], !1)],
  1996. this
  1997. },
  1998. n.endStroke = function() {
  1999. return this.beginStroke(),
  2000. this
  2001. },
  2002. n.curveTo = n.quadraticCurveTo,
  2003. n.drawRect = n.rect,
  2004. n.drawRoundRect = function(e, t, n, r, i) {
  2005. return this.drawRoundRectComplex(e, t, n, r, i, i, i, i),
  2006. this
  2007. },
  2008. n.drawRoundRectComplex = function(t, n, r, i, s, o, u, a) {
  2009. var f = (r < i ? r: i) / 2,
  2010. l = 0,
  2011. c = 0,
  2012. h = 0,
  2013. p = 0;
  2014. s < 0 && (s *= l = -1),
  2015. s > f && (s = f),
  2016. o < 0 && (o *= c = -1),
  2017. o > f && (o = f),
  2018. u < 0 && (u *= h = -1),
  2019. u > f && (u = f),
  2020. a < 0 && (a *= p = -1),
  2021. a > f && (a = f),
  2022. this._dirty = this._active = !0;
  2023. var d = this._ctx.arcTo,
  2024. v = this._ctx.lineTo;
  2025. return this._activeInstructions.push(new e(this._ctx.moveTo, [t + r - o, n]), new e(d, [t + r + o * c, n - o * c, t + r, n + o, o]), new e(v, [t + r, n + i - u]), new e(d, [t + r + u * h, n + i + u * h, t + r - u, n + i, u]), new e(v, [t + a, n + i]), new e(d, [t - a * p, n + i + a * p, t, n + i - a, a]), new e(v, [t, n + s]), new e(d, [t - s * l, n - s * l, t + s, n, s]), new e(this._ctx.closePath)),
  2026. this
  2027. },
  2028. n.drawCircle = function(e, t, n) {
  2029. return this.arc(e, t, n, 0, Math.PI * 2),
  2030. this
  2031. },
  2032. n.drawEllipse = function(t, n, r, i) {
  2033. this._dirty = this._active = !0;
  2034. var s = .5522848,
  2035. o = r / 2 * s,
  2036. u = i / 2 * s,
  2037. a = t + r,
  2038. f = n + i,
  2039. l = t + r / 2,
  2040. c = n + i / 2;
  2041. return this._activeInstructions.push(new e(this._ctx.moveTo, [t, c]), new e(this._ctx.bezierCurveTo, [t, c - u, l - o, n, l, n]), new e(this._ctx.bezierCurveTo, [l + o, n, a, c - u, a, c]), new e(this._ctx.bezierCurveTo, [a, c + u, l + o, f, l, f]), new e(this._ctx.bezierCurveTo, [l - o, f, t, c + u, t, c])),
  2042. this
  2043. },
  2044. n.inject = function(t, n) {
  2045. return this._dirty = this._active = !0,
  2046. this._activeInstructions.push(new e(t, [n])),
  2047. this
  2048. },
  2049. n.drawPolyStar = function(t, n, r, i, s, o) {
  2050. this._dirty = this._active = !0,
  2051. s == null && (s = 0),
  2052. s = 1 - s,
  2053. o == null ? o = 0 : o /= 180 / Math.PI;
  2054. var u = Math.PI / i;
  2055. this._activeInstructions.push(new e(this._ctx.moveTo, [t + Math.cos(o) * r, n + Math.sin(o) * r]));
  2056. for (var a = 0; a < i; a++) o += u,
  2057. s != 1 && this._activeInstructions.push(new e(this._ctx.lineTo, [t + Math.cos(o) * r * s, n + Math.sin(o) * r * s])),
  2058. o += u,
  2059. this._activeInstructions.push(new e(this._ctx.lineTo, [t + Math.cos(o) * r, n + Math.sin(o) * r]));
  2060. return this
  2061. },
  2062. n.decodePath = function(e) {
  2063. var n = [this.moveTo, this.lineTo, this.quadraticCurveTo, this.bezierCurveTo, this.closePath],
  2064. r = [2, 2, 4, 6, 0],
  2065. i = 0,
  2066. s = e.length,
  2067. o = [],
  2068. u = 0,
  2069. a = 0,
  2070. f = t.BASE_64;
  2071. while (i < s) {
  2072. var l = e.charAt(i),
  2073. c = f[l],
  2074. h = c >> 3,
  2075. p = n[h];
  2076. if (!p || c & 3) throw "bad path data (@" + i + "): " + l;
  2077. var d = r[h];
  2078. h || (u = a = 0),
  2079. o.length = 0,
  2080. i++;
  2081. var v = (c >> 2 & 1) + 2;
  2082. for (var m = 0; m < d; m++) {
  2083. var g = f[e.charAt(i)],
  2084. y = g >> 5 ? -1 : 1;
  2085. g = (g & 31) << 6 | f[e.charAt(i + 1)],
  2086. v == 3 && (g = g << 6 | f[e.charAt(i + 2)]),
  2087. g = y * g / 10,
  2088. m % 2 ? u = g += u: a = g += a,
  2089. o[m] = g,
  2090. i += v
  2091. }
  2092. p.apply(this, o)
  2093. }
  2094. return this
  2095. },
  2096. n.clone = function() {
  2097. var e = new t;
  2098. return e._instructions = this._instructions.slice(),
  2099. e._activeInstructions = this._activeInstructions.slice(),
  2100. e._oldInstructions = this._oldInstructions.slice(),
  2101. this._fillInstructions && (e._fillInstructions = this._fillInstructions.slice()),
  2102. this._strokeInstructions && (e._strokeInstructions = this._strokeInstructions.slice()),
  2103. this._strokeStyleInstructions && (e._strokeStyleInstructions = this._strokeStyleInstructions.slice()),
  2104. e._active = this._active,
  2105. e._dirty = this._dirty,
  2106. e._fillMatrix = this._fillMatrix,
  2107. e._strokeIgnoreScale = this._strokeIgnoreScale,
  2108. e
  2109. },
  2110. n.toString = function() {
  2111. return "[Graphics]"
  2112. },
  2113. n.mt = n.moveTo,
  2114. n.lt = n.lineTo,
  2115. n.at = n.arcTo,
  2116. n.bt = n.bezierCurveTo,
  2117. n.qt = n.quadraticCurveTo,
  2118. n.a = n.arc,
  2119. n.r = n.rect,
  2120. n.cp = n.closePath,
  2121. n.c = n.clear,
  2122. n.f = n.beginFill,
  2123. n.lf = n.beginLinearGradientFill,
  2124. n.rf = n.beginRadialGradientFill,
  2125. n.bf = n.beginBitmapFill,
  2126. n.ef = n.endFill,
  2127. n.ss = n.setStrokeStyle,
  2128. n.s = n.beginStroke,
  2129. n.ls = n.beginLinearGradientStroke,
  2130. n.rs = n.beginRadialGradientStroke,
  2131. n.bs = n.beginBitmapStroke,
  2132. n.es = n.endStroke,
  2133. n.dr = n.drawRect,
  2134. n.rr = n.drawRoundRect,
  2135. n.rc = n.drawRoundRectComplex,
  2136. n.dc = n.drawCircle,
  2137. n.de = n.drawEllipse,
  2138. n.dp = n.drawPolyStar,
  2139. n.p = n.decodePath,
  2140. n._updateInstructions = function() {
  2141. this._instructions = this._oldInstructions.slice(),
  2142. this._instructions.push(t.beginCmd),
  2143. this._appendInstructions(this._fillInstructions),
  2144. this._appendInstructions(this._strokeInstructions),
  2145. this._appendInstructions(this._strokeInstructions && this._strokeStyleInstructions),
  2146. this._appendInstructions(this._activeInstructions),
  2147. this._fillInstructions && this._appendDraw(t.fillCmd, this._fillMatrix),
  2148. this._strokeInstructions && this._appendDraw(t.strokeCmd, this._strokeIgnoreScale && [1, 0, 0, 1, 0, 0])
  2149. },
  2150. n._appendInstructions = function(e) {
  2151. e && this._instructions.push.apply(this._instructions, e)
  2152. },
  2153. n._appendDraw = function(t, n) {
  2154. n ? this._instructions.push(new e(this._ctx.save, [], !1), new e(this._ctx.transform, n, !1), t, new e(this._ctx.restore, [], !1)) : this._instructions.push(t)
  2155. },
  2156. n._newPath = function() {
  2157. this._dirty && this._updateInstructions(),
  2158. this._oldInstructions = this._instructions,
  2159. this._activeInstructions = [],
  2160. this._active = this._dirty = !1
  2161. },
  2162. n._setProp = function(e, t) {
  2163. this[e] = t
  2164. },
  2165. createjs.Graphics = t
  2166. } (),
  2167. this.createjs = this.createjs || {},
  2168. function() {
  2169. var e = function() {
  2170. this.initialize()
  2171. },
  2172. t = e.prototype = new createjs.EventDispatcher;
  2173. e._MOUSE_EVENTS = ["click", "dblclick", "mousedown", "mouseout", "mouseover", "pressmove", "pressup", "rollout", "rollover"],
  2174. e.suppressCrossDomainErrors = !1;
  2175. var n = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  2176. n.getContext && (e._hitTestCanvas = n, e._hitTestContext = n.getContext("2d"), n.width = n.height = 1),
  2177. e._nextCacheID = 1,
  2178. t.alpha = 1,
  2179. t.cacheCanvas = null,
  2180. t.id = -1,
  2181. t.mouseEnabled = !0,
  2182. t.tickEnabled = !0,
  2183. t.name = null,
  2184. t.parent = null,
  2185. t.regX = 0,
  2186. t.regY = 0,
  2187. t.rotation = 0,
  2188. t.scaleX = 1,
  2189. t.scaleY = 1,
  2190. t.skewX = 0,
  2191. t.skewY = 0,
  2192. t.shadow = null,
  2193. t.visible = !0,
  2194. t.x = 0,
  2195. t.y = 0,
  2196. t.compositeOperation = null,
  2197. t.snapToPixel = !1,
  2198. t.filters = null,
  2199. t.cacheID = 0,
  2200. t.mask = null,
  2201. t.hitArea = null,
  2202. t.cursor = null,
  2203. t._cacheOffsetX = 0,
  2204. t._cacheOffsetY = 0,
  2205. t._cacheScale = 1,
  2206. t._cacheDataURLID = 0,
  2207. t._cacheDataURL = null,
  2208. t._matrix = null,
  2209. t._rectangle = null,
  2210. t._bounds = null,
  2211. t.initialize = function() {
  2212. this.id = createjs.UID.get(),
  2213. this._matrix = new createjs.Matrix2D,
  2214. this._rectangle = new createjs.Rectangle
  2215. },
  2216. t.isVisible = function() {
  2217. return !! (this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0)
  2218. },
  2219. t.draw = function(e, t) {
  2220. var n = this.cacheCanvas;
  2221. if (t || !n) return ! 1;
  2222. var r = this._cacheScale,
  2223. i = this._cacheOffsetX,
  2224. s = this._cacheOffsetY,
  2225. o;
  2226. if (o = this._applyFilterBounds(i, s, 0, 0)) i = o.x,
  2227. s = o.y;
  2228. return e.drawImage(n, i, s, n.width / r, n.height / r),
  2229. !0
  2230. },
  2231. t.updateContext = function(e) {
  2232. var t, n = this.mask,
  2233. r = this;
  2234. n && n.graphics && !n.graphics.isEmpty() && (t = n.getMatrix(n._matrix), e.transform(t.a, t.b, t.c, t.d, t.tx, t.ty), n.graphics.drawAsPath(e), e.clip(), t.invert(), e.transform(t.a, t.b, t.c, t.d, t.tx, t.ty)),
  2235. t = r._matrix.identity().appendTransform(r.x, r.y, r.scaleX, r.scaleY, r.rotation, r.skewX, r.skewY, r.regX, r.regY),
  2236. createjs.Stage._snapToPixelEnabled && r.snapToPixel ? e.transform(t.a, t.b, t.c, t.d, t.tx + .5 | 0, t.ty + .5 | 0) : e.transform(t.a, t.b, t.c, t.d, t.tx, t.ty),
  2237. e.globalAlpha *= r.alpha,
  2238. r.compositeOperation && (e.globalCompositeOperation = r.compositeOperation),
  2239. r.shadow && this._applyShadow(e, r.shadow)
  2240. },
  2241. t.cache = function(e, t, n, r, i) {
  2242. i = i || 1,
  2243. this.cacheCanvas || (this.cacheCanvas = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")),
  2244. this._cacheWidth = n,
  2245. this._cacheHeight = r,
  2246. this._cacheOffsetX = e,
  2247. this._cacheOffsetY = t,
  2248. this._cacheScale = i,
  2249. this.updateCache()
  2250. },
  2251. t.updateCache = function(t) {
  2252. var n = this.cacheCanvas,
  2253. r = this._cacheScale,
  2254. i = this._cacheOffsetX * r,
  2255. s = this._cacheOffsetY * r,
  2256. o = this._cacheWidth,
  2257. u = this._cacheHeight,
  2258. a;
  2259. if (!n) throw "cache() must be called before updateCache()";
  2260. var f = n.getContext("2d");
  2261. if (a = this._applyFilterBounds(i, s, o, u)) i = a.x,
  2262. s = a.y,
  2263. o = a.width,
  2264. u = a.height;
  2265. o = Math.ceil(o * r),
  2266. u = Math.ceil(u * r),
  2267. o != n.width || u != n.height ? (n.width = o, n.height = u) : t || f.clearRect(0, 0, o + 1, u + 1),
  2268. f.save(),
  2269. f.globalCompositeOperation = t,
  2270. f.setTransform(r, 0, 0, r, -i, -s),
  2271. this.draw(f, !0),
  2272. this._applyFilters(),
  2273. f.restore(),
  2274. this.cacheID = e._nextCacheID++
  2275. },
  2276. t.uncache = function() {
  2277. this._cacheDataURL = this.cacheCanvas = null,
  2278. this.cacheID = this._cacheOffsetX = this._cacheOffsetY = 0,
  2279. this._cacheScale = 1
  2280. },
  2281. t.getCacheDataURL = function() {
  2282. return this.cacheCanvas ? (this.cacheID != this._cacheDataURLID && (this._cacheDataURL = this.cacheCanvas.toDataURL()), this._cacheDataURL) : null
  2283. },
  2284. t.getStage = function() {
  2285. var e = this;
  2286. while (e.parent) e = e.parent;
  2287. return e instanceof createjs.Stage ? e: null
  2288. },
  2289. t.localToGlobal = function(e, t) {
  2290. var n = this.getConcatenatedMatrix(this._matrix);
  2291. return n == null ? null: (n.append(1, 0, 0, 1, e, t), new createjs.Point(n.tx, n.ty))
  2292. },
  2293. t.globalToLocal = function(e, t) {
  2294. var n = this.getConcatenatedMatrix(this._matrix);
  2295. return n == null ? null: (n.invert(), n.append(1, 0, 0, 1, e, t), new createjs.Point(n.tx, n.ty))
  2296. },
  2297. t.localToLocal = function(e, t, n) {
  2298. var r = this.localToGlobal(e, t);
  2299. return n.globalToLocal(r.x, r.y)
  2300. },
  2301. t.setTransform = function(e, t, n, r, i, s, o, u, a) {
  2302. return this.x = e || 0,
  2303. this.y = t || 0,
  2304. this.scaleX = n == null ? 1 : n,
  2305. this.scaleY = r == null ? 1 : r,
  2306. this.rotation = i || 0,
  2307. this.skewX = s || 0,
  2308. this.skewY = o || 0,
  2309. this.regX = u || 0,
  2310. this.regY = a || 0,
  2311. this
  2312. },
  2313. t.getMatrix = function(e) {
  2314. var t = this;
  2315. return (e ? e.identity() : new createjs.Matrix2D).appendTransform(t.x, t.y, t.scaleX, t.scaleY, t.rotation, t.skewX, t.skewY, t.regX, t.regY).appendProperties(t.alpha, t.shadow, t.compositeOperation)
  2316. },
  2317. t.getConcatenatedMatrix = function(e) {
  2318. e ? e.identity() : e = new createjs.Matrix2D;
  2319. var t = this;
  2320. while (t != null) e.prependTransform(t.x, t.y, t.scaleX, t.scaleY, t.rotation, t.skewX, t.skewY, t.regX, t.regY).prependProperties(t.alpha, t.shadow, t.compositeOperation),
  2321. t = t.parent;
  2322. return e
  2323. },
  2324. t.hitTest = function(t, n) {
  2325. var r = e._hitTestContext;
  2326. r.setTransform(1, 0, 0, 1, -t, -n),
  2327. this.draw(r);
  2328. var i = this._testHit(r);
  2329. return r.setTransform(1, 0, 0, 1, 0, 0),
  2330. r.clearRect(0, 0, 2, 2),
  2331. i
  2332. },
  2333. t.set = function(e) {
  2334. for (var t in e) this[t] = e[t];
  2335. return this
  2336. },
  2337. t.getBounds = function() {
  2338. if (this._bounds) return this._rectangle.copy(this._bounds);
  2339. var e = this.cacheCanvas;
  2340. if (e) {
  2341. var t = this._cacheScale;
  2342. return this._rectangle.initialize(this._cacheOffsetX, this._cacheOffsetY, e.width / t, e.height / t)
  2343. }
  2344. return null
  2345. },
  2346. t.getTransformedBounds = function() {
  2347. return this._getBounds()
  2348. },
  2349. t.setBounds = function(e, t, n, r) {
  2350. e == null && (this._bounds = e),
  2351. this._bounds = (this._bounds || new createjs.Rectangle).initialize(e, t, n, r)
  2352. },
  2353. t.clone = function() {
  2354. var t = new e;
  2355. return this.cloneProps(t),
  2356. t
  2357. },
  2358. t.toString = function() {
  2359. return "[DisplayObject (name=" + this.name + ")]"
  2360. },
  2361. t.cloneProps = function(e) {
  2362. e.alpha = this.alpha,
  2363. e.name = this.name,
  2364. e.regX = this.regX,
  2365. e.regY = this.regY,
  2366. e.rotation = this.rotation,
  2367. e.scaleX = this.scaleX,
  2368. e.scaleY = this.scaleY,
  2369. e.shadow = this.shadow,
  2370. e.skewX = this.skewX,
  2371. e.skewY = this.skewY,
  2372. e.visible = this.visible,
  2373. e.x = this.x,
  2374. e.y = this.y,
  2375. e._bounds = this._bounds,
  2376. e.mouseEnabled = this.mouseEnabled,
  2377. e.compositeOperation = this.compositeOperation
  2378. },
  2379. t._applyShadow = function(e, t) {
  2380. t = t || Shadow.identity,
  2381. e.shadowColor = t.color,
  2382. e.shadowOffsetX = t.offsetX,
  2383. e.shadowOffsetY = t.offsetY,
  2384. e.shadowBlur = t.blur
  2385. },
  2386. t._tick = function(e) {
  2387. var t = this._listeners;
  2388. if (t && t.tick) {
  2389. var n = new createjs.Event("tick");
  2390. n.params = e,
  2391. this._dispatchEvent(n, this, 2)
  2392. }
  2393. },
  2394. t._testHit = function(t) {
  2395. try {
  2396. var n = t.getImageData(0, 0, 1, 1).data[3] > 1
  2397. } catch(r) {
  2398. if (!e.suppressCrossDomainErrors) throw "An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."
  2399. }
  2400. return n
  2401. },
  2402. t._applyFilters = function() {
  2403. if (!this.filters || this.filters.length == 0 || !this.cacheCanvas) return;
  2404. var e = this.filters.length,
  2405. t = this.cacheCanvas.getContext("2d"),
  2406. n = this.cacheCanvas.width,
  2407. r = this.cacheCanvas.height;
  2408. for (var i = 0; i < e; i++) this.filters[i].applyFilter(t, 0, 0, n, r)
  2409. },
  2410. t._applyFilterBounds = function(e, t, n, r) {
  2411. var i, s, o = this.filters;
  2412. if (!o || !(s = o.length)) return null;
  2413. for (var u = 0; u < s; u++) {
  2414. var a = this.filters[u],
  2415. f = a.getBounds && a.getBounds();
  2416. if (!f) continue;
  2417. i || (i = this._rectangle.initialize(e, t, n, r)),
  2418. i.x += f.x,
  2419. i.y += f.y,
  2420. i.width += f.width,
  2421. i.height += f.height
  2422. }
  2423. return i
  2424. },
  2425. t._getBounds = function(e, t) {
  2426. return this._transformBounds(this.getBounds(), e, t)
  2427. },
  2428. t._transformBounds = function(e, t, n) {
  2429. if (!e) return e;
  2430. var r = e.x,
  2431. i = e.y,
  2432. s = e.width,
  2433. o = e.height,
  2434. u = n ? this._matrix.identity() : this.getMatrix(this._matrix); (r || i) && u.appendTransform(0, 0, 1, 1, 0, 0, 0, -r, -i),
  2435. t && u.prependMatrix(t);
  2436. var a = s * u.a,
  2437. f = s * u.b,
  2438. l = o * u.c,
  2439. c = o * u.d,
  2440. h = u.tx,
  2441. p = u.ty,
  2442. d = h,
  2443. v = h,
  2444. m = p,
  2445. g = p;
  2446. return (r = a + h) < d ? d = r: r > v && (v = r),
  2447. (r = a + l + h) < d ? d = r: r > v && (v = r),
  2448. (r = l + h) < d ? d = r: r > v && (v = r),
  2449. (i = f + p) < m ? m = i: i > g && (g = i),
  2450. (i = f + c + p) < m ? m = i: i > g && (g = i),
  2451. (i = c + p) < m ? m = i: i > g && (g = i),
  2452. e.initialize(d, m, v - d, g - m)
  2453. },
  2454. t._hasMouseEventListener = function() {
  2455. var t = e._MOUSE_EVENTS;
  2456. for (var n = 0,
  2457. r = t.length; n < r; n++) if (this.hasEventListener(t[n])) return ! 0;
  2458. return !! this.cursor
  2459. },
  2460. createjs.DisplayObject = e
  2461. } (),
  2462. this.createjs = this.createjs || {},
  2463. function() {
  2464. var e = function() {
  2465. this.initialize()
  2466. },
  2467. t = e.prototype = new createjs.DisplayObject;
  2468. t.children = null,
  2469. t.mouseChildren = !0,
  2470. t.tickChildren = !0,
  2471. t.DisplayObject_initialize = t.initialize,
  2472. t.initialize = function() {
  2473. this.DisplayObject_initialize(),
  2474. this.children = []
  2475. },
  2476. t.isVisible = function() {
  2477. var e = this.cacheCanvas || this.children.length;
  2478. return !! (this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && e)
  2479. },
  2480. t.DisplayObject_draw = t.draw,
  2481. t.draw = function(e, t) {
  2482. if (this.DisplayObject_draw(e, t)) return ! 0;
  2483. var n = this.children.slice(0);
  2484. for (var r = 0,
  2485. i = n.length; r < i; r++) {
  2486. var s = n[r];
  2487. if (!s.isVisible()) continue;
  2488. e.save(),
  2489. s.updateContext(e),
  2490. s.draw(e),
  2491. e.restore()
  2492. }
  2493. return ! 0
  2494. },
  2495. t.addChild = function(e) {
  2496. if (e == null) return e;
  2497. var t = arguments.length;
  2498. if (t > 1) {
  2499. for (var n = 0; n < t; n++) this.addChild(arguments[n]);
  2500. return arguments[t - 1]
  2501. }
  2502. return e.parent && e.parent.removeChild(e),
  2503. e.parent = this,
  2504. this.children.push(e),
  2505. e
  2506. },
  2507. t.addChildAt = function(e, t) {
  2508. var n = arguments.length,
  2509. r = arguments[n - 1];
  2510. if (r < 0 || r > this.children.length) return arguments[n - 2];
  2511. if (n > 2) {
  2512. for (var i = 0; i < n - 1; i++) this.addChildAt(arguments[i], r + i);
  2513. return arguments[n - 2]
  2514. }
  2515. return e.parent && e.parent.removeChild(e),
  2516. e.parent = this,
  2517. this.children.splice(t, 0, e),
  2518. e
  2519. },
  2520. t.removeChild = function(e) {
  2521. var t = arguments.length;
  2522. if (t > 1) {
  2523. var n = !0;
  2524. for (var r = 0; r < t; r++) n = n && this.removeChild(arguments[r]);
  2525. return n
  2526. }
  2527. return this.removeChildAt(createjs.indexOf(this.children, e))
  2528. },
  2529. t.removeChildAt = function(e) {
  2530. var t = arguments.length;
  2531. if (t > 1) {
  2532. var n = [];
  2533. for (var r = 0; r < t; r++) n[r] = arguments[r];
  2534. n.sort(function(e, t) {
  2535. return t - e
  2536. });
  2537. var i = !0;
  2538. for (var r = 0; r < t; r++) i = i && this.removeChildAt(n[r]);
  2539. return i
  2540. }
  2541. if (e < 0 || e > this.children.length - 1) return ! 1;
  2542. var s = this.children[e];
  2543. return s && (s.parent = null),
  2544. this.children.splice(e, 1),
  2545. !0
  2546. },
  2547. t.removeAllChildren = function() {
  2548. var e = this.children;
  2549. while (e.length) e.pop().parent = null
  2550. },
  2551. t.getChildAt = function(e) {
  2552. return this.children[e]
  2553. },
  2554. t.getChildByName = function(e) {
  2555. var t = this.children;
  2556. for (var n = 0,
  2557. r = t.length; n < r; n++) if (t[n].name == e) return t[n];
  2558. return null
  2559. },
  2560. t.sortChildren = function(e) {
  2561. this.children.sort(e)
  2562. },
  2563. t.getChildIndex = function(e) {
  2564. return createjs.indexOf(this.children, e)
  2565. },
  2566. t.getNumChildren = function() {
  2567. return this.children.length
  2568. },
  2569. t.swapChildrenAt = function(e, t) {
  2570. var n = this.children,
  2571. r = n[e],
  2572. i = n[t];
  2573. if (!r || !i) return;
  2574. n[e] = i,
  2575. n[t] = r
  2576. },
  2577. t.swapChildren = function(e, t) {
  2578. var n = this.children,
  2579. r, i;
  2580. for (var s = 0,
  2581. o = n.length; s < o; s++) {
  2582. n[s] == e && (r = s),
  2583. n[s] == t && (i = s);
  2584. if (r != null && i != null) break
  2585. }
  2586. if (s == o) return;
  2587. n[r] = t,
  2588. n[i] = e
  2589. },
  2590. t.setChildIndex = function(e, t) {
  2591. var n = this.children,
  2592. r = n.length;
  2593. if (e.parent != this || t < 0 || t >= r) return;
  2594. for (var i = 0; i < r; i++) if (n[i] == e) break;
  2595. if (i == r || i == t) return;
  2596. n.splice(i, 1),
  2597. n.splice(t, 0, e)
  2598. },
  2599. t.contains = function(e) {
  2600. while (e) {
  2601. if (e == this) return ! 0;
  2602. e = e.parent
  2603. }
  2604. return ! 1
  2605. },
  2606. t.hitTest = function(e, t) {
  2607. return this.getObjectUnderPoint(e, t) != null
  2608. },
  2609. t.getObjectsUnderPoint = function(e, t) {
  2610. var n = [],
  2611. r = this.localToGlobal(e, t);
  2612. return this._getObjectsUnderPoint(r.x, r.y, n),
  2613. n
  2614. },
  2615. t.getObjectUnderPoint = function(e, t) {
  2616. var n = this.localToGlobal(e, t);
  2617. return this._getObjectsUnderPoint(n.x, n.y)
  2618. },
  2619. t.DisplayObject_getBounds = t.getBounds,
  2620. t.getBounds = function() {
  2621. return this._getBounds(null, !0)
  2622. },
  2623. t.getTransformedBounds = function() {
  2624. return this._getBounds()
  2625. },
  2626. t.clone = function(t) {
  2627. var n = new e;
  2628. this.cloneProps(n);
  2629. if (t) {
  2630. var r = n.children = [];
  2631. for (var i = 0,
  2632. s = this.children.length; i < s; i++) {
  2633. var o = this.children[i].clone(t);
  2634. o.parent = n,
  2635. r.push(o)
  2636. }
  2637. }
  2638. return n
  2639. },
  2640. t.toString = function() {
  2641. return "[Container (name=" + this.name + ")]"
  2642. },
  2643. t.DisplayObject__tick = t._tick,
  2644. t._tick = function(e) {
  2645. if (this.tickChildren) for (var t = this.children.length - 1; t >= 0; t--) {
  2646. var n = this.children[t];
  2647. n.tickEnabled && n._tick && n._tick(e)
  2648. }
  2649. this.DisplayObject__tick(e)
  2650. },
  2651. t._getObjectsUnderPoint = function(t, n, r, i, s) {
  2652. var o = createjs.DisplayObject._hitTestContext,
  2653. u = this._matrix;
  2654. s = s || i && this._hasMouseEventListener();
  2655. var a = this.children,
  2656. f = a.length;
  2657. for (var l = f - 1; l >= 0; l--) {
  2658. var c = a[l],
  2659. h = c.hitArea,
  2660. p = c.mask;
  2661. if (!c.visible || !h && !c.isVisible() || i && !c.mouseEnabled) continue;
  2662. if (!h && p && p.graphics && !p.graphics.isEmpty()) {
  2663. var d = p.getMatrix(p._matrix).prependMatrix(this.getConcatenatedMatrix(u));
  2664. o.setTransform(d.a, d.b, d.c, d.d, d.tx - t, d.ty - n),
  2665. p.graphics.drawAsPath(o),
  2666. o.fillStyle = "#000",
  2667. o.fill();
  2668. if (!this._testHit(o)) continue;
  2669. o.setTransform(1, 0, 0, 1, 0, 0),
  2670. o.clearRect(0, 0, 2, 2)
  2671. }
  2672. if (!h && c instanceof e) {
  2673. var v = c._getObjectsUnderPoint(t, n, r, i, s);
  2674. if (!r && v) return i && !this.mouseChildren ? this: v
  2675. } else {
  2676. if (i && !s && !c._hasMouseEventListener()) continue;
  2677. c.getConcatenatedMatrix(u);
  2678. var m = (h || c).getBounds();
  2679. if (m) {
  2680. u.invert();
  2681. var g = u.transformPoint(t, n);
  2682. if (! (g.x >= m.x && g.x <= m.x + m.width && g.y >= m.y && g.y <= m.y + m.height)) continue
  2683. } else {
  2684. h && (u.appendTransform(h.x, h.y, h.scaleX, h.scaleY, h.rotation, h.skewX, h.skewY, h.regX, h.regY), u.alpha = h.alpha),
  2685. o.globalAlpha = u.alpha,
  2686. o.setTransform(u.a, u.b, u.c, u.d, u.tx - t, u.ty - n),
  2687. (h || c).draw(o);
  2688. if (!this._testHit(o)) continue;
  2689. o.setTransform(1, 0, 0, 1, 0, 0),
  2690. o.clearRect(0, 0, 2, 2)
  2691. }
  2692. if (!r) return i && !this.mouseChildren ? this: c;
  2693. r.push(c)
  2694. }
  2695. }
  2696. return null
  2697. },
  2698. t._getBounds = function(e, t) {
  2699. var n = this.DisplayObject_getBounds();
  2700. if (n) return this._transformBounds(n, e, t);
  2701. var r, i, s, o, u = t ? this._matrix.identity() : this.getMatrix(this._matrix);
  2702. e && u.prependMatrix(e);
  2703. var a = this.children.length;
  2704. for (var f = 0; f < a; f++) {
  2705. var l = this.children[f];
  2706. if (!l.visible || !(n = l._getBounds(u))) continue;
  2707. var c = n.x,
  2708. h = n.y,
  2709. p = c + n.width,
  2710. d = h + n.height;
  2711. if (c < r || r == null) r = c;
  2712. if (p > i || i == null) i = p;
  2713. if (h < s || s == null) s = h;
  2714. if (d > o || o == null) o = d
  2715. }
  2716. return i == null ? null: this._rectangle.initialize(r, s, i - r, o - s)
  2717. },
  2718. createjs.Container = e
  2719. } (),
  2720. this.createjs = this.createjs || {},
  2721. function() {
  2722. var e = function(e) {
  2723. this.initialize(e)
  2724. },
  2725. t = e.prototype = new createjs.Container;
  2726. e._snapToPixelEnabled = !1,
  2727. t.autoClear = !0,
  2728. t.canvas = null,
  2729. t.mouseX = 0,
  2730. t.mouseY = 0,
  2731. t.snapToPixelEnabled = !1,
  2732. t.mouseInBounds = !1,
  2733. t.tickOnUpdate = !0,
  2734. t.mouseMoveOutside = !1,
  2735. t.nextStage = null,
  2736. t._pointerData = null,
  2737. t._pointerCount = 0,
  2738. t._primaryPointerID = null,
  2739. t._mouseOverIntervalID = null,
  2740. t.Container_initialize = t.initialize,
  2741. t.initialize = function(e) {
  2742. this.Container_initialize(),
  2743. this.canvas = typeof e == "string" ? document.getElementById(e) : e,
  2744. this._pointerData = {},
  2745. this.enableDOMEvents(!0)
  2746. },
  2747. t.update = function(t) {
  2748. if (!this.canvas) return;
  2749. this.tickOnUpdate && (this.dispatchEvent("tickstart"), this.tickEnabled && this._tick(arguments.length ? arguments: null), this.dispatchEvent("tickend")),
  2750. this.dispatchEvent("drawstart"),
  2751. e._snapToPixelEnabled = this.snapToPixelEnabled,
  2752. this.autoClear && this.clear();
  2753. var n = this.canvas.getContext("2d");
  2754. n.save(),
  2755. this.updateContext(n),
  2756. this.draw(n, !1),
  2757. n.restore(),
  2758. this.dispatchEvent("drawend")
  2759. },
  2760. t.handleEvent = function(e) {
  2761. e.type == "tick" && this.update(e)
  2762. },
  2763. t.clear = function() {
  2764. if (!this.canvas) return;
  2765. var e = this.canvas.getContext("2d");
  2766. e.setTransform(1, 0, 0, 1, 0, 0),
  2767. e.clearRect(0, 0, this.canvas.width + 1, this.canvas.height + 1)
  2768. function isHUAWEI (){
  2769. if( /huawei/i.test(navigator.userAgent.toLowerCase()) ){
  2770. return true;
  2771. }
  2772. else{
  2773. return false;
  2774. }
  2775. }
  2776. if (isHUAWEI()) {
  2777. this.canvas.style.visibility = 'hidden'; // Force a change in DOM
  2778. this.canvas.offsetHeight; // Cause a repaint to take play
  2779. this.canvas.style.visibility = 'inherit'; // Make visible again
  2780. }
  2781. else{
  2782. this.canvas.width = this.canvas.width;
  2783. }
  2784. },
  2785. t.toDataURL = function(e, t) {
  2786. t || (t = "image/png");
  2787. var n = this.canvas.getContext("2d"),
  2788. r = this.canvas.width,
  2789. i = this.canvas.height,
  2790. s;
  2791. if (e) {
  2792. s = n.getImageData(0, 0, r, i);
  2793. var o = n.globalCompositeOperation;
  2794. n.globalCompositeOperation = "destination-over",
  2795. n.fillStyle = e,
  2796. n.fillRect(0, 0, r, i)
  2797. }
  2798. var u = this.canvas.toDataURL(t);
  2799. return e && (n.clearRect(0, 0, r + 1, i + 1), n.putImageData(s, 0, 0), n.globalCompositeOperation = o),
  2800. u
  2801. },
  2802. t.enableMouseOver = function(e) {
  2803. this._mouseOverIntervalID && (clearInterval(this._mouseOverIntervalID), this._mouseOverIntervalID = null, e == 0 && this._testMouseOver(!0));
  2804. if (e == null) e = 20;
  2805. else if (e <= 0) return;
  2806. var t = this;
  2807. this._mouseOverIntervalID = setInterval(function() {
  2808. t._testMouseOver()
  2809. },
  2810. 1e3 / Math.min(50, e))
  2811. },
  2812. t.enableDOMEvents = function(e) {
  2813. e == null && (e = !0);
  2814. var t, n, r = this._eventListeners;
  2815. if (!e && r) {
  2816. for (t in r) n = r[t],
  2817. n.t.removeEventListener(t, n.f, !1);
  2818. this._eventListeners = null
  2819. } else if (e && !r && this.canvas) {
  2820. var i = window.addEventListener ? window: document,
  2821. s = this;
  2822. r = this._eventListeners = {},
  2823. r.mouseup = {
  2824. t: i,
  2825. f: function(e) {
  2826. s._handleMouseUp(e)
  2827. }
  2828. },
  2829. r.mousemove = {
  2830. t: i,
  2831. f: function(e) {
  2832. s._handleMouseMove(e)
  2833. }
  2834. },
  2835. r.dblclick = {
  2836. t: this.canvas,
  2837. f: function(e) {
  2838. s._handleDoubleClick(e)
  2839. }
  2840. },
  2841. r.mousedown = {
  2842. t: this.canvas,
  2843. f: function(e) {
  2844. s._handleMouseDown(e)
  2845. }
  2846. };
  2847. for (t in r) n = r[t],
  2848. n.t.addEventListener(t, n.f, !1)
  2849. }
  2850. },
  2851. t.clone = function() {
  2852. var t = new e(null);
  2853. return this.cloneProps(t),
  2854. t
  2855. },
  2856. t.toString = function() {
  2857. return "[Stage (name=" + this.name + ")]"
  2858. },
  2859. t._getElementRect = function(e) {
  2860. var t;
  2861. try {
  2862. t = e.getBoundingClientRect()
  2863. } catch(n) {
  2864. t = {
  2865. top: e.offsetTop,
  2866. left: e.offsetLeft,
  2867. width: e.offsetWidth,
  2868. height: e.offsetHeight
  2869. }
  2870. }
  2871. var r = (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || document.body.clientLeft || 0),
  2872. i = (window.pageYOffset || document.scrollTop || 0) - (document.clientTop || document.body.clientTop || 0),
  2873. s = window.getComputedStyle ? getComputedStyle(e) : e.currentStyle,
  2874. o = parseInt(s.paddingLeft) + parseInt(s.borderLeftWidth),
  2875. u = parseInt(s.paddingTop) + parseInt(s.borderTopWidth),
  2876. a = parseInt(s.paddingRight) + parseInt(s.borderRightWidth),
  2877. f = parseInt(s.paddingBottom) + parseInt(s.borderBottomWidth);
  2878. return {
  2879. left: t.left + r + o,
  2880. right: t.right + r - a,
  2881. top: t.top + i + u,
  2882. bottom: t.bottom + i - f
  2883. }
  2884. },
  2885. t._getPointerData = function(e) {
  2886. var t = this._pointerData[e];
  2887. if (!t) {
  2888. t = this._pointerData[e] = {
  2889. x: 0,
  2890. y: 0
  2891. },
  2892. this._primaryPointerID == null && (this._primaryPointerID = e);
  2893. if (this._primaryPointerID == null || this._primaryPointerID == -1) this._primaryPointerID = e
  2894. }
  2895. return t
  2896. },
  2897. t._handleMouseMove = function(e) {
  2898. e || (e = window.event),
  2899. this._handlePointerMove( - 1, e, e.pageX, e.pageY)
  2900. },
  2901. t._handlePointerMove = function(e, t, n, r) {
  2902. if (!this.canvas) return;
  2903. var i = this._getPointerData(e),
  2904. s = i.inBounds;
  2905. this._updatePointerPosition(e, t, n, r);
  2906. if (!s && !i.inBounds && !this.mouseMoveOutside) return;
  2907. e == -1 && i.inBounds == !s && this._dispatchMouseEvent(this, s ? "mouseleave": "mouseenter", !1, e, i, t),
  2908. this._dispatchMouseEvent(this, "stagemousemove", !1, e, i, t),
  2909. this._dispatchMouseEvent(i.target, "pressmove", !0, e, i, t);
  2910. var o = i.event;
  2911. o && o.hasEventListener("mousemove") && o.dispatchEvent(new createjs.MouseEvent("mousemove", !1, !1, i.x, i.y, t, e, e == this._primaryPointerID, i.rawX, i.rawY), i.target),
  2912. this.nextStage && this.nextStage._handlePointerMove(e, t, n, r)
  2913. },
  2914. t._updatePointerPosition = function(e, t, n, r) {
  2915. var i = this._getElementRect(this.canvas);
  2916. n -= i.left,
  2917. r -= i.top;
  2918. var s = this.canvas.width,
  2919. o = this.canvas.height;
  2920. n /= (i.right - i.left) / s,
  2921. r /= (i.bottom - i.top) / o;
  2922. var u = this._getPointerData(e); (u.inBounds = n >= 0 && r >= 0 && n <= s - 1 && r <= o - 1) ? (u.x = n, u.y = r) : this.mouseMoveOutside && (u.x = n < 0 ? 0 : n > s - 1 ? s - 1 : n, u.y = r < 0 ? 0 : r > o - 1 ? o - 1 : r),
  2923. u.posEvtObj = t,
  2924. u.rawX = n,
  2925. u.rawY = r,
  2926. e == this._primaryPointerID && (this.mouseX = u.x, this.mouseY = u.y, this.mouseInBounds = u.inBounds)
  2927. },
  2928. t._handleMouseUp = function(e) {
  2929. this._handlePointerUp( - 1, e, !1)
  2930. },
  2931. t._handlePointerUp = function(e, t, n) {
  2932. var r = this._getPointerData(e);
  2933. this._dispatchMouseEvent(this, "stagemouseup", !1, e, r, t);
  2934. var i = r.target;
  2935. i && (this._getObjectsUnderPoint(r.x, r.y, null, true) == i && this._dispatchMouseEvent(i, "click", !0, e, r, t), this._dispatchMouseEvent(i, "pressup", !0, e, r, t));
  2936. var s = r.event;
  2937. s && s.hasEventListener("mouseup") && s.dispatchEvent(new createjs.MouseEvent("mouseup", !1, !1, r.x, r.y, t, e, e == this._primaryPointerID, r.rawX, r.rawY), i),
  2938. n ? (e == this._primaryPointerID && (this._primaryPointerID = null), delete this._pointerData[e]) : r.event = r.target = null,
  2939. this.nextStage && this.nextStage._handlePointerUp(e, t, n)
  2940. },
  2941. t._handleMouseDown = function(e) {
  2942. this._handlePointerDown( - 1, e, e.pageX, e.pageY)
  2943. },
  2944. t._handlePointerDown = function(e, t, n, r) {
  2945. r != null && this._updatePointerPosition(e, t, n, r);
  2946. var i = this._getPointerData(e);
  2947. this._dispatchMouseEvent(this, "stagemousedown", !1, e, i, t),
  2948. i.target = this._getObjectsUnderPoint(i.x, i.y, null, !0),
  2949. i.event = this._dispatchMouseEvent(i.target, "mousedown", !0, e, i, t),
  2950. this.nextStage && this.nextStage._handlePointerDown(e, t, n, r)
  2951. },
  2952. t._testMouseOver = function(e) {
  2953. if (this._primaryPointerID != -1 || !e && this.mouseX == this._mouseOverX && this.mouseY == this._mouseOverY && this.mouseInBounds) return;
  2954. var t = this._getPointerData( - 1),
  2955. n = t.posEvtObj,
  2956. r,
  2957. i = -1,
  2958. s = "",
  2959. o,
  2960. u,
  2961. a;
  2962. if (e || this.mouseInBounds && n && n.target == this.canvas) r = this._getObjectsUnderPoint(this.mouseX, this.mouseY, null, !0),
  2963. this._mouseOverX = this.mouseX,
  2964. this._mouseOverY = this.mouseY;
  2965. var f = this._mouseOverTarget || [],
  2966. l = f[f.length - 1],
  2967. c = this._mouseOverTarget = [];
  2968. o = r;
  2969. while (o) c.unshift(o),
  2970. o.cursor != null && (s = o.cursor),
  2971. o = o.parent;
  2972. this.canvas.style.cursor = s;
  2973. for (u = 0, a = c.length; u < a; u++) {
  2974. if (c[u] != f[u]) break;
  2975. i = u
  2976. }
  2977. l != r && this._dispatchMouseEvent(l, "mouseout", !0, -1, t, n);
  2978. for (u = f.length - 1; u > i; u--) this._dispatchMouseEvent(f[u], "rollout", !1, -1, t, n);
  2979. for (u = c.length - 1; u > i; u--) this._dispatchMouseEvent(c[u], "rollover", !1, -1, t, n);
  2980. l != r && this._dispatchMouseEvent(r, "mouseover", !0, -1, t, n)
  2981. },
  2982. t._handleDoubleClick = function(e) {
  2983. var t = this._getPointerData( - 1),
  2984. n = this._getObjectsUnderPoint(t.x, t.y, null, !0);
  2985. this._dispatchMouseEvent(n, "dblclick", !0, -1, t, e),
  2986. this.nextStage && this.nextStage._handleDoubleClick(e)
  2987. },
  2988. t._dispatchMouseEvent = function(e, t, n, r, i, s) {
  2989. if (!e || !n && !e.hasEventListener(t)) return;
  2990. var o = new createjs.MouseEvent(t, n, !1, i.x, i.y, s, r, r == this._primaryPointerID, i.rawX, i.rawY);
  2991. return e.dispatchEvent(o),
  2992. o
  2993. },
  2994. createjs.Stage = e
  2995. } (),
  2996. this.createjs = this.createjs || {},
  2997. function() {
  2998. var e = function(e) {
  2999. this.initialize(e)
  3000. },
  3001. t = e.prototype = new createjs.DisplayObject;
  3002. t.image = null,
  3003. t.snapToPixel = !0,
  3004. t.sourceRect = null,
  3005. t.DisplayObject_initialize = t.initialize,
  3006. t.initialize = function(e) {
  3007. this.DisplayObject_initialize(),
  3008. typeof e == "string" ? (this.image = document.createElement("img"), this.image.src = e) : this.image = e
  3009. },
  3010. t.isVisible = function() {
  3011. var e = this.cacheCanvas || this.image && (this.image.complete || this.image.getContext || this.image.readyState >= 2);
  3012. return !! (this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && e)
  3013. },
  3014. t.DisplayObject_draw = t.draw,
  3015. t.draw = function(e, t) {
  3016. if (this.DisplayObject_draw(e, t)) return ! 0;
  3017. var n = this.sourceRect;
  3018. return n ? e.drawImage(this.image, n.x, n.y, n.width, n.height, 0, 0, n.width, n.height) : e.drawImage(this.image, 0, 0),
  3019. !0
  3020. },
  3021. t.DisplayObject_getBounds = t.getBounds,
  3022. t.getBounds = function() {
  3023. var e = this.DisplayObject_getBounds();
  3024. if (e) return e;
  3025. var t = this.sourceRect || this.image,
  3026. n = this.image && (this.image.complete || this.image.getContext || this.image.readyState >= 2);
  3027. return n ? this._rectangle.initialize(0, 0, t.width, t.height) : null
  3028. },
  3029. t.clone = function() {
  3030. var t = new e(this.image);
  3031. return this.sourceRect && (t.sourceRect = this.sourceRect.clone()),
  3032. this.cloneProps(t),
  3033. t
  3034. },
  3035. t.toString = function() {
  3036. return "[Bitmap (name=" + this.name + ")]"
  3037. },
  3038. createjs.Bitmap = e
  3039. } (),
  3040. this.createjs = this.createjs || {},
  3041. function() {
  3042. var e = function(e, t) {
  3043. this.initialize(e, t)
  3044. },
  3045. t = e.prototype = new createjs.DisplayObject;
  3046. t.currentFrame = 0,
  3047. t.currentAnimation = null,
  3048. t.paused = !0,
  3049. t.spriteSheet = null,
  3050. t.snapToPixel = !0,
  3051. t.offset = 0,
  3052. t.currentAnimationFrame = 0,
  3053. t.framerate = 0,
  3054. t._advanceCount = 0,
  3055. t._animation = null,
  3056. t._currentFrame = null,
  3057. t.DisplayObject_initialize = t.initialize,
  3058. t.initialize = function(e, t) {
  3059. this.DisplayObject_initialize(),
  3060. this.spriteSheet = e,
  3061. t && this.gotoAndPlay(t)
  3062. },
  3063. t.isVisible = function() {
  3064. var e = this.cacheCanvas || this.spriteSheet.complete;
  3065. return !! (this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && e)
  3066. },
  3067. t.DisplayObject_draw = t.draw,
  3068. t.draw = function(e, t) {
  3069. if (this.DisplayObject_draw(e, t)) return ! 0;
  3070. this._normalizeFrame();
  3071. var n = this.spriteSheet.getFrame(this._currentFrame | 0);
  3072. if (!n) return ! 1;
  3073. var r = n.rect;
  3074. return e.drawImage(n.image, r.x, r.y, r.width, r.height, -n.regX, -n.regY, r.width, r.height),
  3075. !0
  3076. },
  3077. t.play = function() {
  3078. this.paused = !1
  3079. },
  3080. t.stop = function() {
  3081. this.paused = !0
  3082. },
  3083. t.gotoAndPlay = function(e) {
  3084. this.paused = !1,
  3085. this._goto(e)
  3086. },
  3087. t.gotoAndStop = function(e) {
  3088. this.paused = !0,
  3089. this._goto(e)
  3090. },
  3091. t.advance = function(e) {
  3092. var t = this._animation && this._animation.speed || 1,
  3093. n = this.framerate || this.spriteSheet.framerate,
  3094. r = n && e != null ? e / (1e3 / n) : 1;
  3095. this._animation ? this.currentAnimationFrame += r * t: this._currentFrame += r * t,
  3096. this._normalizeFrame()
  3097. },
  3098. t.DisplayObject_getBounds = t.getBounds,
  3099. t.getBounds = function() {
  3100. return this.DisplayObject_getBounds() || this.spriteSheet.getFrameBounds(this.currentFrame, this._rectangle)
  3101. },
  3102. t.clone = function() {
  3103. var t = new e(this.spriteSheet);
  3104. return this.cloneProps(t),
  3105. t
  3106. },
  3107. t.toString = function() {
  3108. return "[Sprite (name=" + this.name + ")]"
  3109. },
  3110. t.DisplayObject__tick = t._tick,
  3111. t._tick = function(e) {
  3112. this.paused || this.advance(e && e[0] && e[0].delta),
  3113. this.DisplayObject__tick(e)
  3114. },
  3115. t._normalizeFrame = function() {
  3116. var e = this._animation,
  3117. t = this.paused,
  3118. n = this._currentFrame,
  3119. r = this.currentAnimationFrame,
  3120. i;
  3121. if (e) {
  3122. i = e.frames.length;
  3123. if ((r | 0) >= i) {
  3124. var s = e.next;
  3125. if (!this._dispatchAnimationEnd(e, n, t, s, i - 1)) {
  3126. if (s) return this._goto(s, r - i);
  3127. this.paused = !0,
  3128. r = this.currentAnimationFrame = e.frames.length - 1,
  3129. this._currentFrame = e.frames[r]
  3130. }
  3131. } else this._currentFrame = e.frames[r | 0]
  3132. } else {
  3133. i = this.spriteSheet.getNumFrames();
  3134. if (n >= i && !this._dispatchAnimationEnd(e, n, t, i - 1) && (this._currentFrame -= i) >= i) return this._normalizeFrame()
  3135. }
  3136. this.currentFrame = this._currentFrame | 0
  3137. },
  3138. t._dispatchAnimationEnd = function(e, t, n, r, i) {
  3139. var s = e ? e.name: null;
  3140. if (this.hasEventListener("animationend")) {
  3141. var o = new createjs.Event("animationend");
  3142. o.name = s,
  3143. o.next = r,
  3144. this.dispatchEvent(o)
  3145. }
  3146. var u = this._animation != e || this._currentFrame != t;
  3147. return ! u && !n && this.paused && (this.currentAnimationFrame = i, u = !0),
  3148. u
  3149. },
  3150. t.DisplayObject_cloneProps = t.cloneProps,
  3151. t.cloneProps = function(e) {
  3152. this.DisplayObject_cloneProps(e),
  3153. e.currentFrame = this.currentFrame,
  3154. e._currentFrame = this._currentFrame,
  3155. e.currentAnimation = this.currentAnimation,
  3156. e.paused = this.paused,
  3157. e._animation = this._animation,
  3158. e.currentAnimationFrame = this.currentAnimationFrame,
  3159. e.framerate = this.framerate
  3160. },
  3161. t._goto = function(e, t) {
  3162. if (isNaN(e)) {
  3163. var n = this.spriteSheet.getAnimation(e);
  3164. n && (this.currentAnimationFrame = t || 0, this._animation = n, this.currentAnimation = e, this._normalizeFrame())
  3165. } else this.currentAnimationFrame = 0,
  3166. this.currentAnimation = this._animation = null,
  3167. this._currentFrame = e,
  3168. this._normalizeFrame()
  3169. },
  3170. createjs.Sprite = e
  3171. } (),
  3172. this.createjs = this.createjs || {},
  3173. function() {
  3174. var e = "BitmapAnimation is deprecated in favour of Sprite. See VERSIONS file for info on changes.";
  3175. if (!createjs.Sprite) throw e; (createjs.BitmapAnimation = function(t) {
  3176. console.log(e),
  3177. this.initialize(t)
  3178. }).prototype = new createjs.Sprite
  3179. } (),
  3180. this.createjs = this.createjs || {},
  3181. function() {
  3182. var e = function(e) {
  3183. this.initialize(e)
  3184. },
  3185. t = e.prototype = new createjs.DisplayObject;
  3186. t.graphics = null,
  3187. t.DisplayObject_initialize = t.initialize,
  3188. t.initialize = function(e) {
  3189. this.DisplayObject_initialize(),
  3190. this.graphics = e ? e: new createjs.Graphics
  3191. },
  3192. t.isVisible = function() {
  3193. var e = this.cacheCanvas || this.graphics && !this.graphics.isEmpty();
  3194. return !! (this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && e)
  3195. },
  3196. t.DisplayObject_draw = t.draw,
  3197. t.draw = function(e, t) {
  3198. return this.DisplayObject_draw(e, t) ? !0 : (this.graphics.draw(e), !0)
  3199. },
  3200. t.clone = function(t) {
  3201. var n = new e(t && this.graphics ? this.graphics.clone() : this.graphics);
  3202. return this.cloneProps(n),
  3203. n
  3204. },
  3205. t.toString = function() {
  3206. return "[Shape (name=" + this.name + ")]"
  3207. },
  3208. createjs.Shape = e
  3209. } (),
  3210. this.createjs = this.createjs || {},
  3211. function() {
  3212. var e = function(e, t, n) {
  3213. this.initialize(e, t, n)
  3214. },
  3215. t = e.prototype = new createjs.DisplayObject,
  3216. n = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  3217. n.getContext && (e._workingContext = n.getContext("2d"), n.width = n.height = 1),
  3218. e.H_OFFSETS = {
  3219. start: 0,
  3220. left: 0,
  3221. center: -0.5,
  3222. end: -1,
  3223. right: -1
  3224. },
  3225. e.V_OFFSETS = {
  3226. top: 0,
  3227. hanging: -0.01,
  3228. middle: -0.4,
  3229. alphabetic: -0.8,
  3230. ideographic: -0.85,
  3231. bottom: -1
  3232. },
  3233. t.text = "",
  3234. t.font = null,
  3235. t.color = null,
  3236. t.textAlign = "left",
  3237. t.textBaseline = "top",
  3238. t.maxWidth = null,
  3239. t.outline = 0,
  3240. t.lineHeight = 0,
  3241. t.lineWidth = null,
  3242. t.DisplayObject_initialize = t.initialize,
  3243. t.initialize = function(e, t, n) {
  3244. this.DisplayObject_initialize(),
  3245. this.text = e,
  3246. this.font = t,
  3247. this.color = n
  3248. },
  3249. t.isVisible = function() {
  3250. var e = this.cacheCanvas || this.text != null && this.text !== "";
  3251. return !! (this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && e)
  3252. },
  3253. t.DisplayObject_draw = t.draw,
  3254. t.draw = function(e, t) {
  3255. if (this.DisplayObject_draw(e, t)) return ! 0;
  3256. var n = this.color || "#000";
  3257. return this.outline ? (e.strokeStyle = n, e.lineWidth = this.outline * 1) : e.fillStyle = n,
  3258. this._drawText(this._prepContext(e)),
  3259. !0
  3260. },
  3261. t.getMeasuredWidth = function() {
  3262. return this._prepContext(e._workingContext).measureText(this.text).width
  3263. },
  3264. t.getMeasuredLineHeight = function() {
  3265. return this._prepContext(e._workingContext).measureText("M").width * 1.2
  3266. },
  3267. t.getMeasuredHeight = function() {
  3268. return this._drawText(null, {}).height
  3269. },
  3270. t.DisplayObject_getBounds = t.getBounds,
  3271. t.getBounds = function() {
  3272. var t = this.DisplayObject_getBounds();
  3273. if (t) return t;
  3274. if (this.text == null || this.text == "") return null;
  3275. var n = this._drawText(null, {}),
  3276. r = this.maxWidth && this.maxWidth < n.width ? this.maxWidth: n.width,
  3277. i = r * e.H_OFFSETS[this.textAlign || "left"],
  3278. s = this.lineHeight || this.getMeasuredLineHeight(),
  3279. o = s * e.V_OFFSETS[this.textBaseline || "top"];
  3280. return this._rectangle.initialize(i, o, r, n.height)
  3281. },
  3282. t.clone = function() {
  3283. var t = new e(this.text, this.font, this.color);
  3284. return this.cloneProps(t),
  3285. t
  3286. },
  3287. t.toString = function() {
  3288. return "[Text (text=" + (this.text.length > 20 ? this.text.substr(0, 17) + "...": this.text) + ")]"
  3289. },
  3290. t.DisplayObject_cloneProps = t.cloneProps,
  3291. t.cloneProps = function(e) {
  3292. this.DisplayObject_cloneProps(e),
  3293. e.textAlign = this.textAlign,
  3294. e.textBaseline = this.textBaseline,
  3295. e.maxWidth = this.maxWidth,
  3296. e.outline = this.outline,
  3297. e.lineHeight = this.lineHeight,
  3298. e.lineWidth = this.lineWidth
  3299. },
  3300. t._prepContext = function(e) {
  3301. return e.font = this.font,
  3302. e.textAlign = this.textAlign || "left",
  3303. e.textBaseline = this.textBaseline || "top",
  3304. e
  3305. },
  3306. t._drawText = function(t, n) {
  3307. var r = !!t;
  3308. r || (t = this._prepContext(e._workingContext));
  3309. var i = this.lineHeight || this.getMeasuredLineHeight(),
  3310. s = 0,
  3311. o = 0,
  3312. u = String(this.text).split(/(?:\r\n|\r|\n)/);
  3313. for (var a = 0,
  3314. f = u.length; a < f; a++) {
  3315. var l = u[a],
  3316. c = null;
  3317. if (this.lineWidth != null && (c = t.measureText(l).width) > this.lineWidth) {
  3318. var h = l.split(/(\s)/);
  3319. l = h[0],
  3320. c = t.measureText(l).width;
  3321. for (var p = 1,
  3322. d = h.length; p < d; p += 2) {
  3323. var v = t.measureText(h[p] + h[p + 1]).width;
  3324. c + v > this.lineWidth ? (r && this._drawTextLine(t, l, o * i), c > s && (s = c), l = h[p + 1], c = t.measureText(l).width, o++) : (l += h[p] + h[p + 1], c += v)
  3325. }
  3326. }
  3327. r && this._drawTextLine(t, l, o * i),
  3328. n && c == null && (c = t.measureText(l).width),
  3329. c > s && (s = c),
  3330. o++
  3331. }
  3332. return n && (n.count = o, n.width = s, n.height = o * i),
  3333. n
  3334. },
  3335. t._drawTextLine = function(e, t, n) {
  3336. this.outline ? e.strokeText(t, 0, n, this.maxWidth || 65535) : e.fillText(t, 0, n, this.maxWidth || 65535)
  3337. },
  3338. createjs.Text = e
  3339. } (),
  3340. this.createjs = this.createjs || {},
  3341. function() {
  3342. function e(e, t) {
  3343. this.initialize(e, t)
  3344. }
  3345. var t = e.prototype = new createjs.DisplayObject;
  3346. t.text = "",
  3347. t.spriteSheet = null,
  3348. t.lineHeight = 0,
  3349. t.letterSpacing = 0,
  3350. t.spaceWidth = 0,
  3351. t.DisplayObject_initialize = t.initialize,
  3352. t.initialize = function(e, t) {
  3353. this.DisplayObject_initialize(),
  3354. this.text = e,
  3355. this.spriteSheet = t
  3356. },
  3357. t.DisplayObject_draw = t.draw,
  3358. t.draw = function(e, t) {
  3359. if (this.DisplayObject_draw(e, t)) return ! 0;
  3360. this._drawText(e)
  3361. },
  3362. t.isVisible = function() {
  3363. var e = this.cacheCanvas || this.spriteSheet && this.spriteSheet.complete && this.text;
  3364. return !! (this.visible && this.alpha > 0 && this.scaleX != 0 && this.scaleY != 0 && e)
  3365. },
  3366. t.getBounds = function() {
  3367. var e = this._rectangle;
  3368. return this._drawText(null, e),
  3369. e.width ? e: null
  3370. },
  3371. t._getFrame = function(e, t) {
  3372. var n, r = t.getAnimation(e);
  3373. return r || (e != (n = e.toUpperCase()) || e != (n = e.toLowerCase()) || (n = null), n && (r = t.getAnimation(n))),
  3374. r && t.getFrame(r.frames[0])
  3375. },
  3376. t._getLineHeight = function(e) {
  3377. var t = this._getFrame("1", e) || this._getFrame("T", e) || this._getFrame("L", e) || e.getFrame(0);
  3378. return t ? t.rect.height: 1
  3379. },
  3380. t._getSpaceWidth = function(e) {
  3381. var t = this._getFrame("1", e) || this._getFrame("l", e) || this._getFrame("e", e) || this._getFrame("a", e) || e.getFrame(0);
  3382. return t ? t.rect.width: 1
  3383. },
  3384. t._drawText = function(e, t) {
  3385. var n, r, i, s = 0,
  3386. o = 0,
  3387. u = this.spaceWidth,
  3388. a = this.lineHeight,
  3389. f = this.spriteSheet,
  3390. l = !!this._getFrame(" ", f); ! l && u == 0 && (u = this._getSpaceWidth(f)),
  3391. a == 0 && (a = this._getLineHeight(f));
  3392. var c = 0;
  3393. for (var h = 0,
  3394. p = this.text.length; h < p; h++) {
  3395. var d = this.text.charAt(h);
  3396. if (!l && d == " ") {
  3397. s += u;
  3398. continue
  3399. }
  3400. if (d == "\n" || d == "\r") {
  3401. d == "\r" && this.text.charAt(h + 1) == "\n" && h++,
  3402. s - i > c && (c = s - i),
  3403. s = 0,
  3404. o += a;
  3405. continue
  3406. }
  3407. var v = this._getFrame(d, f);
  3408. if (!v) continue;
  3409. var m = v.rect;
  3410. i = v.regX,
  3411. n = m.width,
  3412. e && e.drawImage(v.image, m.x, m.y, n, r = m.height, s - i, o - v.regY, n, r),
  3413. s += n + this.letterSpacing
  3414. }
  3415. s - i > c && (c = s - i),
  3416. t && (t.width = c - this.letterSpacing, t.height = o + a)
  3417. },
  3418. createjs.BitmapText = e
  3419. } (),
  3420. this.createjs = this.createjs || {},
  3421. function() {
  3422. var e = function() {
  3423. throw "SpriteSheetUtils cannot be instantiated"
  3424. },
  3425. t = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  3426. t.getContext && (e._workingCanvas = t, e._workingContext = t.getContext("2d"), t.width = t.height = 1),
  3427. e.addFlippedFrames = function(t, n, r, i) {
  3428. if (!n && !r && !i) return;
  3429. var s = 0;
  3430. n && e._flip(t, ++s, !0, !1),
  3431. r && e._flip(t, ++s, !1, !0),
  3432. i && e._flip(t, ++s, !0, !0)
  3433. },
  3434. e.extractFrame = function(t, n) {
  3435. isNaN(n) && (n = t.getAnimation(n).frames[0]);
  3436. var r = t.getFrame(n);
  3437. if (!r) return null;
  3438. var i = r.rect,
  3439. s = e._workingCanvas;
  3440. s.width = i.width,
  3441. s.height = i.height,
  3442. e._workingContext.drawImage(r.image, i.x, i.y, i.width, i.height, 0, 0, i.width, i.height);
  3443. var o = document.createElement("img");
  3444. return o.src = s.toDataURL("image/png"),
  3445. o
  3446. },
  3447. e.mergeAlpha = function(e, t, n) {
  3448. n || (n = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")),
  3449. n.width = Math.max(t.width, e.width),
  3450. n.height = Math.max(t.height, e.height);
  3451. var r = n.getContext("2d");
  3452. return r.save(),
  3453. r.drawImage(e, 0, 0),
  3454. r.globalCompositeOperation = "destination-in",
  3455. r.drawImage(t, 0, 0),
  3456. r.restore(),
  3457. n
  3458. },
  3459. e._flip = function(t, n, r, i) {
  3460. var s = t._images,
  3461. o = e._workingCanvas,
  3462. u = e._workingContext,
  3463. a = s.length / n;
  3464. for (var f = 0; f < a; f++) {
  3465. var l = s[f];
  3466. l.__tmp = f,
  3467. u.setTransform(1, 0, 0, 1, 0, 0),
  3468. u.clearRect(0, 0, o.width + 1, o.height + 1),
  3469. o.width = l.width,
  3470. o.height = l.height,
  3471. u.setTransform(r ? -1 : 1, 0, 0, i ? -1 : 1, r ? l.width: 0, i ? l.height: 0),
  3472. u.drawImage(l, 0, 0);
  3473. var c = document.createElement("img");
  3474. c.src = o.toDataURL("image/png"),
  3475. c.width = l.width,
  3476. c.height = l.height,
  3477. s.push(c)
  3478. }
  3479. var h = t._frames,
  3480. p = h.length / n;
  3481. for (f = 0; f < p; f++) {
  3482. l = h[f];
  3483. var d = l.rect.clone();
  3484. c = s[l.image.__tmp + a * n];
  3485. var v = {
  3486. image: c,
  3487. rect: d,
  3488. regX: l.regX,
  3489. regY: l.regY
  3490. };
  3491. r && (d.x = c.width - d.x - d.width, v.regX = d.width - l.regX),
  3492. i && (d.y = c.height - d.y - d.height, v.regY = d.height - l.regY),
  3493. h.push(v)
  3494. }
  3495. var m = "_" + (r ? "h": "") + (i ? "v": ""),
  3496. g = t._animations,
  3497. y = t._data,
  3498. b = g.length / n;
  3499. for (f = 0; f < b; f++) {
  3500. var w = g[f];
  3501. l = y[w];
  3502. var E = {
  3503. name: w + m,
  3504. speed: l.speed,
  3505. next: l.next,
  3506. frames: []
  3507. };
  3508. l.next && (E.next += m),
  3509. h = l.frames;
  3510. for (var S = 0,
  3511. x = h.length; S < x; S++) E.frames.push(h[S] + p * n);
  3512. y[E.name] = E,
  3513. g.push(E.name)
  3514. }
  3515. },
  3516. createjs.SpriteSheetUtils = e
  3517. } (),
  3518. this.createjs = this.createjs || {},
  3519. function() {
  3520. var e = function() {
  3521. this.initialize()
  3522. },
  3523. t = e.prototype = new createjs.EventDispatcher;
  3524. e.ERR_DIMENSIONS = "frame dimensions exceed max spritesheet dimensions",
  3525. e.ERR_RUNNING = "a build is already running",
  3526. t.maxWidth = 2048,
  3527. t.maxHeight = 2048,
  3528. t.spriteSheet = null,
  3529. t.scale = 1,
  3530. t.padding = 1,
  3531. t.timeSlice = .3,
  3532. t.progress = -1,
  3533. t._frames = null,
  3534. t._animations = null,
  3535. t._data = null,
  3536. t._nextFrameIndex = 0,
  3537. t._index = 0,
  3538. t._timerID = null,
  3539. t._scale = 1,
  3540. t.initialize = function() {
  3541. this._frames = [],
  3542. this._animations = {}
  3543. },
  3544. t.addFrame = function(t, n, r, i, s, o) {
  3545. if (this._data) throw e.ERR_RUNNING;
  3546. var u = n || t.bounds || t.nominalBounds;
  3547. return ! u && t.getBounds && (u = t.getBounds()),
  3548. u ? (r = r || 1, this._frames.push({
  3549. source: t,
  3550. sourceRect: u,
  3551. scale: r,
  3552. funct: i,
  3553. params: s,
  3554. scope: o,
  3555. index: this._frames.length,
  3556. height: u.height * r
  3557. }) - 1) : null
  3558. },
  3559. t.addAnimation = function(t, n, r, i) {
  3560. if (this._data) throw e.ERR_RUNNING;
  3561. this._animations[t] = {
  3562. frames: n,
  3563. next: r,
  3564. frequency: i
  3565. }
  3566. },
  3567. t.addMovieClip = function(t, n, r) {
  3568. if (this._data) throw e.ERR_RUNNING;
  3569. var i = t.frameBounds,
  3570. s = n || t.bounds || t.nominalBounds; ! s && t.getBounds && (s = t.getBounds());
  3571. if (!s && !i) return null;
  3572. var o = this._frames.length,
  3573. u = t.timeline.duration;
  3574. for (var a = 0; a < u; a++) {
  3575. var f = i && i[a] ? i[a] : s;
  3576. this.addFrame(t, f, r,
  3577. function(e) {
  3578. var t = this.actionsEnabled;
  3579. this.actionsEnabled = !1,
  3580. this.gotoAndStop(e),
  3581. this.actionsEnabled = t
  3582. },
  3583. [a], t)
  3584. }
  3585. var l = t.timeline._labels,
  3586. c = [];
  3587. for (var h in l) c.push({
  3588. index: l[h],
  3589. label: h
  3590. });
  3591. if (c.length) {
  3592. c.sort(function(e, t) {
  3593. return e.index - t.index
  3594. });
  3595. for (var a = 0,
  3596. p = c.length; a < p; a++) {
  3597. var d = c[a].label,
  3598. v = o + c[a].index,
  3599. m = o + (a == p - 1 ? u: c[a + 1].index),
  3600. g = [];
  3601. for (var y = v; y < m; y++) g.push(y);
  3602. this.addAnimation(d, g, !0)
  3603. }
  3604. }
  3605. },
  3606. t.build = function() {
  3607. if (this._data) throw e.ERR_RUNNING;
  3608. this._startBuild();
  3609. while (this._drawNext());
  3610. return this._endBuild(),
  3611. this.spriteSheet
  3612. },
  3613. t.buildAsync = function(t) {
  3614. if (this._data) throw e.ERR_RUNNING;
  3615. this.timeSlice = t,
  3616. this._startBuild();
  3617. var n = this;
  3618. this._timerID = setTimeout(function() {
  3619. n._run()
  3620. },
  3621. 50 - Math.max(.01, Math.min(.99, this.timeSlice || .3)) * 50)
  3622. },
  3623. t.stopAsync = function() {
  3624. clearTimeout(this._timerID),
  3625. this._data = null
  3626. },
  3627. t.clone = function() {
  3628. throw "SpriteSheetBuilder cannot be cloned."
  3629. },
  3630. t.toString = function() {
  3631. return "[SpriteSheetBuilder]"
  3632. },
  3633. t._startBuild = function() {
  3634. var t = this.padding || 0;
  3635. this.progress = 0,
  3636. this.spriteSheet = null,
  3637. this._index = 0,
  3638. this._scale = this.scale;
  3639. var n = [];
  3640. this._data = {
  3641. images: [],
  3642. frames: n,
  3643. animations: this._animations
  3644. };
  3645. var r = this._frames.slice();
  3646. r.sort(function(e, t) {
  3647. return e.height <= t.height ? -1 : 1
  3648. });
  3649. if (r[r.length - 1].height + t * 2 > this.maxHeight) throw e.ERR_DIMENSIONS;
  3650. var i = 0,
  3651. s = 0,
  3652. o = 0;
  3653. while (r.length) {
  3654. var u = this._fillRow(r, i, o, n, t);
  3655. u.w > s && (s = u.w),
  3656. i += u.h;
  3657. if (!u.h || !r.length) {
  3658. var a = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  3659. a.width = this._getSize(s, this.maxWidth),
  3660. a.height = this._getSize(i, this.maxHeight),
  3661. this._data.images[o] = a,
  3662. u.h || (s = i = 0, o++)
  3663. }
  3664. }
  3665. },
  3666. t._getSize = function(e, t) {
  3667. var n = 4;
  3668. while (Math.pow(2, ++n) < e);
  3669. return Math.min(t, Math.pow(2, n))
  3670. },
  3671. t._fillRow = function(t, n, r, i, s) {
  3672. var o = this.maxWidth,
  3673. u = this.maxHeight;
  3674. n += s;
  3675. var a = u - n,
  3676. f = s,
  3677. l = 0;
  3678. for (var c = t.length - 1; c >= 0; c--) {
  3679. var h = t[c],
  3680. p = this._scale * h.scale,
  3681. d = h.sourceRect,
  3682. v = h.source,
  3683. m = Math.floor(p * d.x - s),
  3684. g = Math.floor(p * d.y - s),
  3685. y = Math.ceil(p * d.height + s * 2),
  3686. b = Math.ceil(p * d.width + s * 2);
  3687. if (b > o) throw e.ERR_DIMENSIONS;
  3688. if (y > a || f + b > o) continue;
  3689. h.img = r,
  3690. h.rect = new createjs.Rectangle(f, n, b, y),
  3691. l = l || y,
  3692. t.splice(c, 1),
  3693. i[h.index] = [f, n, b, y, r, Math.round( - m + p * v.regX - s), Math.round( - g + p * v.regY - s)],
  3694. f += b
  3695. }
  3696. return {
  3697. w: f,
  3698. h: l
  3699. }
  3700. },
  3701. t._endBuild = function() {
  3702. this.spriteSheet = new createjs.SpriteSheet(this._data),
  3703. this._data = null,
  3704. this.progress = 1,
  3705. this.dispatchEvent("complete")
  3706. },
  3707. t._run = function() {
  3708. var e = Math.max(.01, Math.min(.99, this.timeSlice || .3)) * 50,
  3709. t = (new Date).getTime() + e,
  3710. n = !1;
  3711. while (t > (new Date).getTime()) if (!this._drawNext()) {
  3712. n = !0;
  3713. break
  3714. }
  3715. if (n) this._endBuild();
  3716. else {
  3717. var r = this;
  3718. this._timerID = setTimeout(function() {
  3719. r._run()
  3720. },
  3721. 50 - e)
  3722. }
  3723. var i = this.progress = this._index / this._frames.length;
  3724. if (this.hasEventListener("progress")) {
  3725. var s = new createjs.Event("progress");
  3726. s.progress = i,
  3727. this.dispatchEvent(s)
  3728. }
  3729. },
  3730. t._drawNext = function() {
  3731. var e = this._frames[this._index],
  3732. t = e.scale * this._scale,
  3733. n = e.rect,
  3734. r = e.sourceRect,
  3735. i = this._data.images[e.img],
  3736. s = i.getContext("2d");
  3737. return e.funct && e.funct.apply(e.scope, e.params),
  3738. s.save(),
  3739. s.beginPath(),
  3740. s.rect(n.x, n.y, n.width, n.height),
  3741. s.clip(),
  3742. s.translate(Math.ceil(n.x - r.x * t), Math.ceil(n.y - r.y * t)),
  3743. s.scale(t, t),
  3744. e.source.draw(s),
  3745. s.restore(),
  3746. ++this._index < this._frames.length
  3747. },
  3748. createjs.SpriteSheetBuilder = e
  3749. } (),
  3750. this.createjs = this.createjs || {},
  3751. function() {
  3752. var e = function(e) {
  3753. this.initialize(e)
  3754. },
  3755. t = e.prototype = new createjs.DisplayObject;
  3756. t.htmlElement = null,
  3757. t._oldMtx = null,
  3758. t._visible = !1,
  3759. t.DisplayObject_initialize = t.initialize,
  3760. t.initialize = function(e) {
  3761. typeof e == "string" && (e = document.getElementById(e)),
  3762. this.DisplayObject_initialize(),
  3763. this.mouseEnabled = !1,
  3764. this.htmlElement = e;
  3765. var t = e.style;
  3766. t.position = "absolute",
  3767. t.transformOrigin = t.WebkitTransformOrigin = t.msTransformOrigin = t.MozTransformOrigin = t.OTransformOrigin = "0% 0%"
  3768. },
  3769. t.isVisible = function() {
  3770. return this.htmlElement != null
  3771. },
  3772. t.draw = function(e, t) {
  3773. return this.visible && (this._visible = !0),
  3774. !0
  3775. },
  3776. t.cache = function() {},
  3777. t.uncache = function() {},
  3778. t.updateCache = function() {},
  3779. t.hitTest = function() {},
  3780. t.localToGlobal = function() {},
  3781. t.globalToLocal = function() {},
  3782. t.localToLocal = function() {},
  3783. t.clone = function() {
  3784. throw "DOMElement cannot be cloned."
  3785. },
  3786. t.toString = function() {
  3787. return "[DOMElement (name=" + this.name + ")]"
  3788. },
  3789. t.DisplayObject__tick = t._tick,
  3790. t._tick = function(e) {
  3791. var t = this.getStage();
  3792. this._visible = !1,
  3793. t && t.on("drawend", this._handleDrawEnd, this, !0),
  3794. this.DisplayObject__tick(e)
  3795. },
  3796. t._handleDrawEnd = function(e) {
  3797. var t = this.htmlElement;
  3798. if (!t) return;
  3799. var n = t.style,
  3800. r = this._visible ? "visible": "hidden";
  3801. r != n.visibility && (n.visibility = r);
  3802. if (!this._visible) return;
  3803. var i = this.getConcatenatedMatrix(this._matrix),
  3804. s = this._oldMtx,
  3805. o = 1e4;
  3806. if (!s || s.alpha != i.alpha) n.opacity = "" + (i.alpha * o | 0) / o,
  3807. s && (s.alpha = i.alpha);
  3808. if (!s || s.tx != i.tx || s.ty != i.ty || s.a != i.a || s.b != i.b || s.c != i.c || s.d != i.d) {
  3809. var u = "matrix(" + (i.a * o | 0) / o + "," + (i.b * o | 0) / o + "," + (i.c * o | 0) / o + "," + (i.d * o | 0) / o + "," + (i.tx + .5 | 0);
  3810. n.transform = n.WebkitTransform = n.OTransform = n.msTransform = u + "," + (i.ty + .5 | 0) + ")",
  3811. n.MozTransform = u + "px," + (i.ty + .5 | 0) + "px)",
  3812. this._oldMtx = s ? s.copy(i) : i.clone()
  3813. }
  3814. },
  3815. createjs.DOMElement = e
  3816. } (),
  3817. this.createjs = this.createjs || {},
  3818. function() {
  3819. var e = function() {
  3820. this.initialize()
  3821. },
  3822. t = e.prototype;
  3823. t.initialize = function() {},
  3824. t.getBounds = function() {
  3825. return null
  3826. },
  3827. t.applyFilter = function(e, t, n, r, i, s, o, u) {},
  3828. t.toString = function() {
  3829. return "[Filter]"
  3830. },
  3831. t.clone = function() {
  3832. return new e
  3833. },
  3834. createjs.Filter = e
  3835. } (),
  3836. this.createjs = this.createjs || {},
  3837. function() {
  3838. var e = function(e, t, n) {
  3839. this.initialize(e, t, n)
  3840. },
  3841. t = e.prototype = new createjs.Filter;
  3842. t.initialize = function(e, t, n) {
  3843. if (isNaN(e) || e < 0) e = 0;
  3844. this.blurX = e | 0;
  3845. if (isNaN(t) || t < 0) t = 0;
  3846. this.blurY = t | 0;
  3847. if (isNaN(n) || n < 1) n = 1;
  3848. this.quality = n | 0
  3849. },
  3850. t.blurX = 0,
  3851. t.blurY = 0,
  3852. t.quality = 1,
  3853. t.mul_table = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1],
  3854. t.shg_table = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9],
  3855. t.getBounds = function() {
  3856. var e = Math.pow(this.quality, .6) * .5;
  3857. return new createjs.Rectangle( - this.blurX * e, -this.blurY * e, 2 * this.blurX * e, 2 * this.blurY * e)
  3858. },
  3859. t.applyFilter = function(e, t, n, r, i, s, o, u) {
  3860. s = s || e,
  3861. o == null && (o = t),
  3862. u == null && (u = n);
  3863. try {
  3864. var a = e.getImageData(t, n, r, i)
  3865. } catch(f) {
  3866. return ! 1
  3867. }
  3868. var l = this.blurX / 2;
  3869. if (isNaN(l) || l < 0) return ! 1;
  3870. l |= 0;
  3871. var c = this.blurY / 2;
  3872. if (isNaN(c) || c < 0) return ! 1;
  3873. c |= 0;
  3874. if (l == 0 && c == 0) return ! 1;
  3875. var h = this.quality;
  3876. if (isNaN(h) || h < 1) h = 1;
  3877. h |= 0,
  3878. h > 3 && (h = 3),
  3879. h < 1 && (h = 1);
  3880. var p = a.data,
  3881. t, n, d, v, m, g, y, b, w, E, S, x, T, N, C, k, L, A, O, M, _, D, P, H, B = l + l + 1,
  3882. j = c + c + 1,
  3883. F = r << 2,
  3884. I = r - 1,
  3885. q = i - 1,
  3886. R = l + 1,
  3887. U = c + 1,
  3888. z = {
  3889. r: 0,
  3890. b: 0,
  3891. g: 0,
  3892. a: 0,
  3893. next: null
  3894. },
  3895. W = z;
  3896. for (d = 1; d < B; d++) {
  3897. W = W.next = {
  3898. r: 0,
  3899. b: 0,
  3900. g: 0,
  3901. a: 0,
  3902. next: null
  3903. };
  3904. if (d == R) var X = W
  3905. }
  3906. W.next = z;
  3907. var V = {
  3908. r: 0,
  3909. b: 0,
  3910. g: 0,
  3911. a: 0,
  3912. next: null
  3913. },
  3914. $ = V;
  3915. for (d = 1; d < j; d++) {
  3916. $ = $.next = {
  3917. r: 0,
  3918. b: 0,
  3919. g: 0,
  3920. a: 0,
  3921. next: null
  3922. };
  3923. if (d == U) var J = $
  3924. }
  3925. $.next = V;
  3926. var K = null;
  3927. while (h-->0) {
  3928. y = g = 0;
  3929. var Q = this.mul_table[l],
  3930. G = this.shg_table[l];
  3931. for (n = i; --n > -1;) {
  3932. b = R * (M = p[g]),
  3933. w = R * (_ = p[g + 1]),
  3934. E = R * (D = p[g + 2]),
  3935. S = R * (P = p[g + 3]),
  3936. W = z;
  3937. for (d = R; --d > -1;) W.r = M,
  3938. W.g = _,
  3939. W.b = D,
  3940. W.a = P,
  3941. W = W.next;
  3942. for (d = 1; d < R; d++) v = g + ((I < d ? I: d) << 2),
  3943. b += W.r = p[v],
  3944. w += W.g = p[v + 1],
  3945. E += W.b = p[v + 2],
  3946. S += W.a = p[v + 3],
  3947. W = W.next;
  3948. K = z;
  3949. for (t = 0; t < r; t++) p[g++] = b * Q >>> G,
  3950. p[g++] = w * Q >>> G,
  3951. p[g++] = E * Q >>> G,
  3952. p[g++] = S * Q >>> G,
  3953. v = y + ((v = t + l + 1) < I ? v: I) << 2,
  3954. b -= K.r - (K.r = p[v]),
  3955. w -= K.g - (K.g = p[v + 1]),
  3956. E -= K.b - (K.b = p[v + 2]),
  3957. S -= K.a - (K.a = p[v + 3]),
  3958. K = K.next;
  3959. y += r
  3960. }
  3961. Q = this.mul_table[c],
  3962. G = this.shg_table[c];
  3963. for (t = 0; t < r; t++) {
  3964. g = t << 2,
  3965. b = U * (M = p[g]),
  3966. w = U * (_ = p[g + 1]),
  3967. E = U * (D = p[g + 2]),
  3968. S = U * (P = p[g + 3]),
  3969. $ = V;
  3970. for (d = 0; d < U; d++) $.r = M,
  3971. $.g = _,
  3972. $.b = D,
  3973. $.a = P,
  3974. $ = $.next;
  3975. m = r;
  3976. for (d = 1; d <= c; d++) g = m + t << 2,
  3977. b += $.r = p[g],
  3978. w += $.g = p[g + 1],
  3979. E += $.b = p[g + 2],
  3980. S += $.a = p[g + 3],
  3981. $ = $.next,
  3982. d < q && (m += r);
  3983. g = t,
  3984. K = V;
  3985. if (h > 0) for (n = 0; n < i; n++) v = g << 2,
  3986. p[v + 3] = P = S * Q >>> G,
  3987. P > 0 ? (p[v] = b * Q >>> G, p[v + 1] = w * Q >>> G, p[v + 2] = E * Q >>> G) : p[v] = p[v + 1] = p[v + 2] = 0,
  3988. v = t + ((v = n + U) < q ? v: q) * r << 2,
  3989. b -= K.r - (K.r = p[v]),
  3990. w -= K.g - (K.g = p[v + 1]),
  3991. E -= K.b - (K.b = p[v + 2]),
  3992. S -= K.a - (K.a = p[v + 3]),
  3993. K = K.next,
  3994. g += r;
  3995. else for (n = 0; n < i; n++) v = g << 2,
  3996. p[v + 3] = P = S * Q >>> G,
  3997. P > 0 ? (P = 255 / P, p[v] = (b * Q >>> G) * P, p[v + 1] = (w * Q >>> G) * P, p[v + 2] = (E * Q >>> G) * P) : p[v] = p[v + 1] = p[v + 2] = 0,
  3998. v = t + ((v = n + U) < q ? v: q) * r << 2,
  3999. b -= K.r - (K.r = p[v]),
  4000. w -= K.g - (K.g = p[v + 1]),
  4001. E -= K.b - (K.b = p[v + 2]),
  4002. S -= K.a - (K.a = p[v + 3]),
  4003. K = K.next,
  4004. g += r
  4005. }
  4006. }
  4007. return s.putImageData(a, o, u),
  4008. !0
  4009. },
  4010. t.clone = function() {
  4011. return new e(this.blurX, this.blurY, this.quality)
  4012. },
  4013. t.toString = function() {
  4014. return "[BlurFilter]"
  4015. },
  4016. createjs.BlurFilter = e
  4017. } (),
  4018. this.createjs = this.createjs || {},
  4019. function() {
  4020. var e = function(e) {
  4021. this.initialize(e)
  4022. },
  4023. t = e.prototype = new createjs.Filter;
  4024. t.initialize = function(e) {
  4025. this.alphaMap = e
  4026. },
  4027. t.alphaMap = null,
  4028. t._alphaMap = null,
  4029. t._mapData = null,
  4030. t.applyFilter = function(e, t, n, r, i, s, o, u) {
  4031. if (!this.alphaMap) return ! 0;
  4032. if (!this._prepAlphaMap()) return ! 1;
  4033. s = s || e,
  4034. o == null && (o = t),
  4035. u == null && (u = n);
  4036. try {
  4037. var a = e.getImageData(t, n, r, i)
  4038. } catch(f) {
  4039. return ! 1
  4040. }
  4041. var l = a.data,
  4042. c = this._mapData,
  4043. h = l.length;
  4044. for (var p = 0; p < h; p += 4) l[p + 3] = c[p] || 0;
  4045. return s.putImageData(a, o, u),
  4046. !0
  4047. },
  4048. t.clone = function() {
  4049. return new e(this.alphaMap)
  4050. },
  4051. t.toString = function() {
  4052. return "[AlphaMapFilter]"
  4053. },
  4054. t._prepAlphaMap = function() {
  4055. if (!this.alphaMap) return ! 1;
  4056. if (this.alphaMap == this._alphaMap && this._mapData) return ! 0;
  4057. this._mapData = null;
  4058. var e = this._alphaMap = this.alphaMap,
  4059. t = e,
  4060. n;
  4061. e instanceof HTMLCanvasElement ? n = t.getContext("2d") : (t = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"), t.width = e.width, t.height = e.height, n = t.getContext("2d"), n.drawImage(e, 0, 0));
  4062. try {
  4063. var r = n.getImageData(0, 0, e.width, e.height)
  4064. } catch(i) {
  4065. return ! 1
  4066. }
  4067. return this._mapData = r.data,
  4068. !0
  4069. },
  4070. createjs.AlphaMapFilter = e
  4071. } (),
  4072. this.createjs = this.createjs || {},
  4073. function() {
  4074. var e = function(e) {
  4075. this.initialize(e)
  4076. },
  4077. t = e.prototype = new createjs.Filter;
  4078. t.initialize = function(e) {
  4079. this.mask = e
  4080. },
  4081. t.mask = null,
  4082. t.applyFilter = function(e, t, n, r, i, s, o, u) {
  4083. return this.mask ? (s = s || e, o == null && (o = t), u == null && (u = n), s.save(), e != s, s.globalCompositeOperation = "destination-in", s.drawImage(this.mask, o, u), s.restore(), !0) : !0
  4084. },
  4085. t.clone = function() {
  4086. return new e(this.mask)
  4087. },
  4088. t.toString = function() {
  4089. return "[AlphaMaskFilter]"
  4090. },
  4091. createjs.AlphaMaskFilter = e
  4092. } (),
  4093. this.createjs = this.createjs || {},
  4094. function() {
  4095. var e = function(e, t, n, r, i, s, o, u) {
  4096. this.initialize(e, t, n, r, i, s, o, u)
  4097. },
  4098. t = e.prototype = new createjs.Filter;
  4099. t.redMultiplier = 1,
  4100. t.greenMultiplier = 1,
  4101. t.blueMultiplier = 1,
  4102. t.alphaMultiplier = 1,
  4103. t.redOffset = 0,
  4104. t.greenOffset = 0,
  4105. t.blueOffset = 0,
  4106. t.alphaOffset = 0,
  4107. t.initialize = function(e, t, n, r, i, s, o, u) {
  4108. this.redMultiplier = e != null ? e: 1,
  4109. this.greenMultiplier = t != null ? t: 1,
  4110. this.blueMultiplier = n != null ? n: 1,
  4111. this.alphaMultiplier = r != null ? r: 1,
  4112. this.redOffset = i || 0,
  4113. this.greenOffset = s || 0,
  4114. this.blueOffset = o || 0,
  4115. this.alphaOffset = u || 0
  4116. },
  4117. t.applyFilter = function(e, t, n, r, i, s, o, u) {
  4118. s = s || e,
  4119. o == null && (o = t),
  4120. u == null && (u = n);
  4121. try {
  4122. var a = e.getImageData(t, n, r, i)
  4123. } catch(f) {
  4124. return ! 1
  4125. }
  4126. var l = a.data,
  4127. c = l.length;
  4128. for (var h = 0; h < c; h += 4) l[h] = l[h] * this.redMultiplier + this.redOffset,
  4129. l[h + 1] = l[h + 1] * this.greenMultiplier + this.greenOffset,
  4130. l[h + 2] = l[h + 2] * this.blueMultiplier + this.blueOffset,
  4131. l[h + 3] = l[h + 3] * this.alphaMultiplier + this.alphaOffset;
  4132. return s.putImageData(a, o, u),
  4133. !0
  4134. },
  4135. t.toString = function() {
  4136. return "[ColorFilter]"
  4137. },
  4138. t.clone = function() {
  4139. return new e(this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset)
  4140. },
  4141. createjs.ColorFilter = e
  4142. } (),
  4143. this.createjs = this.createjs || {},
  4144. function() {
  4145. var e = function(e, t, n, r) {
  4146. this.initialize(e, t, n, r)
  4147. },
  4148. t = e.prototype;
  4149. e.DELTA_INDEX = [0, .01, .02, .04, .05, .06, .07, .08, .1, .11, .12, .14, .15, .16, .17, .18, .2, .21, .22, .24, .25, .27, .28, .3, .32, .34, .36, .38, .4, .42, .44, .46, .48, .5, .53, .56, .59, .62, .65, .68, .71, .74, .77, .8, .83, .86, .89, .92, .95, .98, 1, 1.06, 1.12, 1.18, 1.24, 1.3, 1.36, 1.42, 1.48, 1.54, 1.6, 1.66, 1.72, 1.78, 1.84, 1.9, 1.96, 2, 2.12, 2.25, 2.37, 2.5, 2.62, 2.75, 2.87, 3, 3.2, 3.4, 3.6, 3.8, 4, 4.3, 4.7, 4.9, 5, 5.5, 6, 6.5, 6.8, 7, 7.3, 7.5, 7.8, 8, 8.4, 8.7, 9, 9.4, 9.6, 9.8, 10],
  4150. e.IDENTITY_MATRIX = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1],
  4151. e.LENGTH = e.IDENTITY_MATRIX.length,
  4152. t.initialize = function(e, t, n, r) {
  4153. return this.reset(),
  4154. this.adjustColor(e, t, n, r),
  4155. this
  4156. },
  4157. t.reset = function() {
  4158. return this.copyMatrix(e.IDENTITY_MATRIX)
  4159. },
  4160. t.adjustColor = function(e, t, n, r) {
  4161. return this.adjustHue(r),
  4162. this.adjustContrast(t),
  4163. this.adjustBrightness(e),
  4164. this.adjustSaturation(n)
  4165. },
  4166. t.adjustBrightness = function(e) {
  4167. return e == 0 || isNaN(e) ? this: (e = this._cleanValue(e, 255), this._multiplyMatrix([1, 0, 0, 0, e, 0, 1, 0, 0, e, 0, 0, 1, 0, e, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this)
  4168. },
  4169. t.adjustContrast = function(t) {
  4170. if (t == 0 || isNaN(t)) return this;
  4171. t = this._cleanValue(t, 100);
  4172. var n;
  4173. return t < 0 ? n = 127 + t / 100 * 127 : (n = t % 1, n == 0 ? n = e.DELTA_INDEX[t] : n = e.DELTA_INDEX[t << 0] * (1 - n) + e.DELTA_INDEX[(t << 0) + 1] * n, n = n * 127 + 127),
  4174. this._multiplyMatrix([n / 127, 0, 0, 0, .5 * (127 - n), 0, n / 127, 0, 0, .5 * (127 - n), 0, 0, n / 127, 0, .5 * (127 - n), 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]),
  4175. this
  4176. },
  4177. t.adjustSaturation = function(e) {
  4178. if (e == 0 || isNaN(e)) return this;
  4179. e = this._cleanValue(e, 100);
  4180. var t = 1 + (e > 0 ? 3 * e / 100 : e / 100),
  4181. n = .3086,
  4182. r = .6094,
  4183. i = .082;
  4184. return this._multiplyMatrix([n * (1 - t) + t, r * (1 - t), i * (1 - t), 0, 0, n * (1 - t), r * (1 - t) + t, i * (1 - t), 0, 0, n * (1 - t), r * (1 - t), i * (1 - t) + t, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]),
  4185. this
  4186. },
  4187. t.adjustHue = function(e) {
  4188. if (e == 0 || isNaN(e)) return this;
  4189. e = this._cleanValue(e, 180) / 180 * Math.PI;
  4190. var t = Math.cos(e),
  4191. n = Math.sin(e),
  4192. r = .213,
  4193. i = .715,
  4194. s = .072;
  4195. return this._multiplyMatrix([r + t * (1 - r) + n * -r, i + t * -i + n * -i, s + t * -s + n * (1 - s), 0, 0, r + t * -r + n * .143, i + t * (1 - i) + n * .14, s + t * -s + n * -0.283, 0, 0, r + t * -r + n * -(1 - r), i + t * -i + n * i, s + t * (1 - s) + n * s, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]),
  4196. this
  4197. },
  4198. t.concat = function(t) {
  4199. return t = this._fixMatrix(t),
  4200. t.length != e.LENGTH ? this: (this._multiplyMatrix(t), this)
  4201. },
  4202. t.clone = function() {
  4203. return (new e).copyMatrix(this)
  4204. },
  4205. t.toArray = function() {
  4206. var t = [];
  4207. for (var n = 0,
  4208. r = e.LENGTH; n < r; n++) t[n] = this[n];
  4209. return t
  4210. },
  4211. t.copyMatrix = function(t) {
  4212. var n = e.LENGTH;
  4213. for (var r = 0; r < n; r++) this[r] = t[r];
  4214. return this
  4215. },
  4216. t.toString = function() {
  4217. return "[ColorMatrix]"
  4218. },
  4219. t._multiplyMatrix = function(e) {
  4220. var t = [];
  4221. for (var n = 0; n < 5; n++) {
  4222. for (var r = 0; r < 5; r++) t[r] = this[r + n * 5];
  4223. for (var r = 0; r < 5; r++) {
  4224. var i = 0;
  4225. for (var s = 0; s < 5; s++) i += e[r + s * 5] * t[s];
  4226. this[r + n * 5] = i
  4227. }
  4228. }
  4229. },
  4230. t._cleanValue = function(e, t) {
  4231. return Math.min(t, Math.max( - t, e))
  4232. },
  4233. t._fixMatrix = function(t) {
  4234. return t instanceof e && (t = t.toArray()),
  4235. t.length < e.LENGTH ? t = t.slice(0, t.length).concat(e.IDENTITY_MATRIX.slice(t.length, e.LENGTH)) : t.length > e.LENGTH && (t = t.slice(0, e.LENGTH)),
  4236. t
  4237. },
  4238. createjs.ColorMatrix = e
  4239. } (),
  4240. this.createjs = this.createjs || {},
  4241. function() {
  4242. var e = function(e) {
  4243. this.initialize(e)
  4244. },
  4245. t = e.prototype = new createjs.Filter;
  4246. t.matrix = null,
  4247. t.initialize = function(e) {
  4248. this.matrix = e
  4249. },
  4250. t.applyFilter = function(e, t, n, r, i, s, o, u) {
  4251. s = s || e,
  4252. o == null && (o = t),
  4253. u == null && (u = n);
  4254. try {
  4255. var a = e.getImageData(t, n, r, i)
  4256. } catch(f) {
  4257. return ! 1
  4258. }
  4259. var l = a.data,
  4260. c = l.length,
  4261. h, p, d, v, m = this.matrix,
  4262. g = m[0],
  4263. y = m[1],
  4264. b = m[2],
  4265. w = m[3],
  4266. E = m[4],
  4267. S = m[5],
  4268. x = m[6],
  4269. T = m[7],
  4270. N = m[8],
  4271. C = m[9],
  4272. k = m[10],
  4273. L = m[11],
  4274. A = m[12],
  4275. O = m[13],
  4276. M = m[14],
  4277. _ = m[15],
  4278. D = m[16],
  4279. P = m[17],
  4280. H = m[18],
  4281. B = m[19];
  4282. for (var j = 0; j < c; j += 4) h = l[j],
  4283. p = l[j + 1],
  4284. d = l[j + 2],
  4285. v = l[j + 3],
  4286. l[j] = h * g + p * y + d * b + v * w + E,
  4287. l[j + 1] = h * S + p * x + d * T + v * N + C,
  4288. l[j + 2] = h * k + p * L + d * A + v * O + M,
  4289. l[j + 3] = h * _ + p * D + d * P + v * H + B;
  4290. return s.putImageData(a, o, u),
  4291. !0
  4292. },
  4293. t.toString = function() {
  4294. return "[ColorMatrixFilter]"
  4295. },
  4296. t.clone = function() {
  4297. return new e(this.matrix)
  4298. },
  4299. createjs.ColorMatrixFilter = e
  4300. } (),
  4301. this.createjs = this.createjs || {},
  4302. function() {
  4303. var e = function() {
  4304. throw "Touch cannot be instantiated"
  4305. };
  4306. e.isSupported = function() {
  4307. return "ontouchstart" in window || window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 0 || window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 0
  4308. },
  4309. e.enable = function(t, n, r) {
  4310. return ! t || !t.canvas || !e.isSupported() ? !1 : (t.__touch = {
  4311. pointers: {},
  4312. multitouch: !n,
  4313. preventDefault: !r,
  4314. count: 0
  4315. },
  4316. "ontouchstart" in window ? e._IOS_enable(t) : (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && e._IE_enable(t), !0)
  4317. },
  4318. e.disable = function(t) {
  4319. if (!t) return;
  4320. "ontouchstart" in window ? e._IOS_disable(t) : (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && e._IE_disable(t)
  4321. },
  4322. e._IOS_enable = function(t) {
  4323. var n = t.canvas,
  4324. r = t.__touch.f = function(n) {
  4325. e._IOS_handleEvent(t, n)
  4326. };
  4327. n.addEventListener("touchstart", r, !1),
  4328. n.addEventListener("touchmove", r, !1),
  4329. n.addEventListener("touchend", r, !1),
  4330. n.addEventListener("touchcancel", r, !1)
  4331. },
  4332. e._IOS_disable = function(e) {
  4333. var t = e.canvas;
  4334. if (!t) return;
  4335. var n = e.__touch.f;
  4336. t.removeEventListener("touchstart", n, !1),
  4337. t.removeEventListener("touchmove", n, !1),
  4338. t.removeEventListener("touchend", n, !1),
  4339. t.removeEventListener("touchcancel", n, !1)
  4340. },
  4341. e._IOS_handleEvent = function(e, t) {
  4342. if (!e) return;
  4343. e.__touch.preventDefault && t.preventDefault && t.preventDefault();
  4344. var n = t.changedTouches,
  4345. r = t.type;
  4346. for (var i = 0,
  4347. s = n.length; i < s; i++) {
  4348. var o = n[i],
  4349. u = o.identifier;
  4350. if (o.target != e.canvas) continue;
  4351. r == "touchstart" ? this._handleStart(e, u, t, o.pageX, o.pageY) : r == "touchmove" ? this._handleMove(e, u, t, o.pageX, o.pageY) : (r == "touchend" || r == "touchcancel") && this._handleEnd(e, u, t)
  4352. }
  4353. },
  4354. e._IE_enable = function(t) {
  4355. var n = t.canvas,
  4356. r = t.__touch.f = function(n) {
  4357. e._IE_handleEvent(t, n)
  4358. };
  4359. window.navigator.pointerEnabled === undefined ? (n.addEventListener("MSPointerDown", r, !1), window.addEventListener("MSPointerMove", r, !1), window.addEventListener("MSPointerUp", r, !1), window.addEventListener("MSPointerCancel", r, !1), t.__touch.preventDefault && (n.style.msTouchAction = "none")) : (n.addEventListener("pointerdown", r, !1), window.addEventListener("pointermove", r, !1), window.addEventListener("pointerup", r, !1), window.addEventListener("pointercancel", r, !1), t.__touch.preventDefault && (n.style.touchAction = "none")),
  4360. t.__touch.activeIDs = {}
  4361. },
  4362. e._IE_disable = function(e) {
  4363. var t = e.__touch.f;
  4364. window.navigator.pointerEnabled === undefined ? (window.removeEventListener("MSPointerMove", t, !1), window.removeEventListener("MSPointerUp", t, !1), window.removeEventListener("MSPointerCancel", t, !1), e.canvas && e.canvas.removeEventListener("MSPointerDown", t, !1)) : (window.removeEventListener("pointermove", t, !1), window.removeEventListener("pointerup", t, !1), window.removeEventListener("pointercancel", t, !1), e.canvas && e.canvas.removeEventListener("pointerdown", t, !1))
  4365. },
  4366. e._IE_handleEvent = function(e, t) {
  4367. if (!e) return;
  4368. e.__touch.preventDefault && t.preventDefault && t.preventDefault();
  4369. var n = t.type,
  4370. r = t.pointerId,
  4371. i = e.__touch.activeIDs;
  4372. if (n == "MSPointerDown" || n == "pointerdown") {
  4373. if (t.srcElement != e.canvas) return;
  4374. i[r] = !0,
  4375. this._handleStart(e, r, t, t.pageX, t.pageY)
  4376. } else if (i[r]) if (n == "MSPointerMove" || n == "pointermove") this._handleMove(e, r, t, t.pageX, t.pageY);
  4377. else if (n == "MSPointerUp" || n == "MSPointerCancel" || n == "pointerup" || n == "pointercancel") delete i[r],
  4378. this._handleEnd(e, r, t)
  4379. },
  4380. e._handleStart = function(e, t, n, r, i) {
  4381. var s = e.__touch;
  4382. if (!s.multitouch && s.count) return;
  4383. var o = s.pointers;
  4384. if (o[t]) return;
  4385. o[t] = !0,
  4386. s.count++,
  4387. e._handlePointerDown(t, n, r, i)
  4388. },
  4389. e._handleMove = function(e, t, n, r, i) {
  4390. if (!e.__touch.pointers[t]) return;
  4391. e._handlePointerMove(t, n, r, i)
  4392. },
  4393. e._handleEnd = function(e, t, n) {
  4394. var r = e.__touch,
  4395. i = r.pointers;
  4396. if (!i[t]) return;
  4397. r.count--,
  4398. e._handlePointerUp(t, n, !0),
  4399. delete i[t]
  4400. },
  4401. createjs.Touch = e
  4402. } (),
  4403. this.createjs = this.createjs || {},
  4404. function() {
  4405. var e = createjs.EaselJS = createjs.EaselJS || {};
  4406. e.version = "0.7.1",
  4407. e.buildDate = "Tue, 04 Mar 2014 23:51:13 GMT"
  4408. } (),
  4409. define("cjs",
  4410. function(e) {
  4411. return function() {
  4412. var t, n;
  4413. return t || e.createjs
  4414. }
  4415. } (this)),
  4416. define("Screen", ["cjs"],
  4417. function(e) {
  4418. var t = function() {
  4419. this.init()
  4420. },
  4421. n = t.prototype = new e.Container;
  4422. return n.Container_draw = n.draw,
  4423. n.getName = function() {
  4424. return this._name
  4425. },
  4426. n.draw = function(e, t) {
  4427. return this.Container_draw(e, t)
  4428. },
  4429. n.getScreenController = function() {
  4430. return this._screenController
  4431. },
  4432. n.init = function() {
  4433. this.initialize()
  4434. },
  4435. n.didScreenSelected = function(e) {},
  4436. n.didScreenUnselected = function() {},
  4437. n._name = null,
  4438. n._builded = !1,
  4439. n._screenController = null,
  4440. n._build = function() {},
  4441. t
  4442. }),
  4443. define("assetStorage", ["cjs"],
  4444. function(e) {
  4445. return {
  4446. add: function(e, t) {
  4447. if (t.indexOf("atlas.json") != -1) for (var n in e.frames) {
  4448. if (!e.frames.hasOwnProperty(n)) continue;
  4449. var r = "gfx/" + n.replace("0000", "") + ".png",
  4450. i = t.replace(".json", ".png"),
  4451. s = e.frames[n];
  4452. this._atlas[r] = {
  4453. png: i,
  4454. frame: s.frame
  4455. }
  4456. }
  4457. this._assets[t] = e
  4458. },
  4459. get: function(e) {
  4460. return this._assets[e]
  4461. },
  4462. getBitmap: function(t) {
  4463. var n = this.get(t),
  4464. r;
  4465. if (n) r = new e.Bitmap(n);
  4466. else if (this._atlas.hasOwnProperty(t)) {
  4467. var i = this._atlas[t];
  4468. n = this.get(i.png),
  4469. r = new e.Bitmap(n),
  4470. r.sourceRect = new e.Rectangle(i.frame.x, i.frame.y, i.frame.w, i.frame.h)
  4471. } else r = new e.Bitmap;
  4472. return r
  4473. },
  4474. remove: function(e) {
  4475. delete this._assets[e]
  4476. },
  4477. _assets: {},
  4478. _atlas: {}
  4479. }
  4480. }),
  4481. define("gui/ComponentRenderer", ["require"],
  4482. function(e) {
  4483. var t = function() {
  4484. this.init()
  4485. },
  4486. n = t.prototype;
  4487. return n.init = function() {},
  4488. n.getOwner = function() {
  4489. return this._owner
  4490. },
  4491. n.setOwner = function(e) {
  4492. this._owner = e
  4493. },
  4494. n.validate = function(e) {},
  4495. n._owner = null,
  4496. t
  4497. }),
  4498. define("gui/Component", ["require", "cjs", "gui/ComponentRenderer"],
  4499. function(e) {
  4500. var t = e("cjs"),
  4501. n = e("gui/ComponentRenderer"),
  4502. r = function() {
  4503. this.initialize()
  4504. },
  4505. i = r.prototype = new t.Container;
  4506. return i.getRenderer = function() {
  4507. return this._renderer
  4508. },
  4509. i.setRenderer = function(e) {
  4510. this._renderer = e,
  4511. this._renderer && (this._renderer._owner = this),
  4512. this.invalidate()
  4513. },
  4514. i.Container_initialize = i.initialize,
  4515. i.initialize = function() {
  4516. this.Container_initialize(),
  4517. this.setRenderer(new n),
  4518. this.addChild(new t.DisplayObject)
  4519. },
  4520. i.Container_draw = i.draw,
  4521. i.draw = function(e, t) {
  4522. return this._invalid && this.validate(),
  4523. this.Container_draw(e, t)
  4524. },
  4525. i.invalidate = function() {
  4526. this._invalid = !0,
  4527. this._invalidFlags = this._invalidFlags || {};
  4528. for (var e = 0; e < arguments.length; e++) this._invalidFlags[arguments[e]] = null
  4529. },
  4530. i.validate = function() {
  4531. this._renderer.validate(this._invalidFlags),
  4532. this._invalidFlags = null,
  4533. this._invalid = !1
  4534. },
  4535. i._invalid = !0,
  4536. i._renderer = null,
  4537. i._invalidFlags = null,
  4538. r
  4539. }),
  4540. define("gui/Button", ["require", "gui/Component"],
  4541. function(e) {
  4542. var t = e("gui/Component"),
  4543. n = {
  4544. stateChanged: "stateChanged"
  4545. },
  4546. r = {
  4547. enabled: 2,
  4548. hover: 4,
  4549. pressed: 8
  4550. },
  4551. i = function(e) {
  4552. e || this.initialize()
  4553. };
  4554. i.invFlags = n,
  4555. i.stateFlags = r;
  4556. var s = i.prototype = new t;
  4557. return s.Component_initialize = s.initialize,
  4558. s.initialize = function() {
  4559. this.Component_initialize(),
  4560. this.mouseChildren = !1,
  4561. this.subscribeToEvents()
  4562. },
  4563. s.getEnabled = function() {
  4564. return this._enabled
  4565. },
  4566. s.getPressed = function() {
  4567. return this._isPressed
  4568. },
  4569. s.getMouseHover = function() {
  4570. return this._isOver
  4571. },
  4572. s.getActive = function() {
  4573. return this._enabled
  4574. },
  4575. s.getState = function() {
  4576. var e = 0;
  4577. return this._isPressed && (e |= r.pressed),
  4578. this._enabled && (e |= r.active),
  4579. this._isOver && (e |= r.hover),
  4580. e
  4581. },
  4582. s.subscribeToEvents = function() {
  4583. this.cursor = "pointer",
  4584. this.addEventListener("rollover", this),
  4585. this.addEventListener("rollout", this),
  4586. this.addEventListener("mousedown", this),
  4587. this.addEventListener("pressup", this)
  4588. },
  4589. s.unsubscribeToEvents = function() {
  4590. this.cursor = null,
  4591. this.removeEventListener("rollover", this),
  4592. this.removeEventListener("rollout", this),
  4593. this.removeEventListener("mousedown", this),
  4594. this.removeEventListener("pressup", this)
  4595. },
  4596. s.handleEvent = function(e) {
  4597. var t = e.type;
  4598. t == "mousedown" ? this._isPressed = !0 : t == "pressup" ? this._isPressed = !1 : this._isOver = t == "rollover",
  4599. this.invalidate(n.stateChanged)
  4600. },
  4601. s._state = 0,
  4602. s._isPressed = !1,
  4603. s._isOver = !1,
  4604. s._enabled = !0,
  4605. i
  4606. }),
  4607. define("gui/ToggleButton", ["require", "cjs", "gui/Button"],
  4608. function(e) {
  4609. var t = e("cjs"),
  4610. n = e("gui/Button"),
  4611. r = function() {
  4612. this.initialize()
  4613. },
  4614. i = r.prototype = new n(!0);
  4615. return i.getSelected = function() {
  4616. return this._selected
  4617. },
  4618. i.setSelected = function(e) {
  4619. if (e == this._selected) return;
  4620. this._selected = e,
  4621. this.invalidate()
  4622. },
  4623. i.Button_handleEvent = i.handleEvent,
  4624. i.handleEvent = function(e) {
  4625. e.type == "pressup" && (this._selected = !this._selected, this.dispatchEvent(new t.Event("change"))),
  4626. this.Button_handleEvent(e)
  4627. },
  4628. i._selected = !1,
  4629. r
  4630. }),
  4631. define("gui/ButtonRenderer", ["require", "gui/ComponentRenderer"],
  4632. function(e) {
  4633. var t = e("gui/ComponentRenderer"),
  4634. n = function() {},
  4635. r = n.prototype = new t;
  4636. return r.getButton = function() {},
  4637. r.setButton = function() {},
  4638. r.buttonStateChanged = function() {},
  4639. r._button = null,
  4640. n
  4641. }),
  4642. define("gui/BitmapButtonRenderer", ["require", "gui/ButtonRenderer", "gui/Button"],
  4643. function(e) {
  4644. var t = e("gui/ButtonRenderer"),
  4645. n = e("gui/Button"),
  4646. r = function() {},
  4647. i = r.prototype = new t;
  4648. return i.setFlagBitmaps = function(e) {
  4649. this._flagBitmaps = e
  4650. },
  4651. i.setAnchors = function(e, t) {
  4652. this._anchorX = e,
  4653. this._anchorY = t,
  4654. this.getOwner() && this.getOwner().invalidate()
  4655. },
  4656. i.validate = function(e) {
  4657. var t = this.getOwner().getState(),
  4658. n = this._getBitmapForState(t);
  4659. if (this._currBitmap == n) return;
  4660. this._currBitmap && this.getOwner().removeChild(this._currBitmap),
  4661. n && (n.name = "bitmapButtonRenderer", n.x = -(n.getBounds().width * this._anchorX), n.y = -(n.getBounds().height * this._anchorY), this.getOwner().addChild(n), this._currBitmap = n)
  4662. },
  4663. i._flagBitmaps = null,
  4664. i._getBitmapForState = function(e) {
  4665. var t = n.stateFlags,
  4666. r = this._flagBitmaps,
  4667. i;
  4668. e & t.pressed ? i = "pressed": e & t.hover && (i = "hover");
  4669. var s = e & t.enabled ? r.enabled: r.disabled;
  4670. s || (s = r["default"]);
  4671. var o = s[i];
  4672. return o || (o = r["default"][i]),
  4673. o || (o = r["default"].active),
  4674. o
  4675. },
  4676. i._currBitmap = null,
  4677. i._anchorX = 0,
  4678. i._anchorY = 0,
  4679. r
  4680. }),
  4681. define("gui/ToggleButtonBitmapRenderer", ["require", "gui/ComponentRenderer", "gui/BitmapButtonRenderer", "gui/Button"],
  4682. function(e) {
  4683. var t = e("gui/ComponentRenderer"),
  4684. n = e("gui/BitmapButtonRenderer"),
  4685. r = e("gui/Button"),
  4686. i = function() {
  4687. this._bitmaps = {}
  4688. },
  4689. s = i.prototype = new n;
  4690. return s.getBitmaps = function() {},
  4691. s.setBitmaps = function() {},
  4692. s._getBitmapForState = function(e) {
  4693. var t = r.stateFlags,
  4694. n = this._flagBitmaps,
  4695. i = "idle";
  4696. e & t.pressed ? i = "pressed": e & t.hover && (i = "hover");
  4697. var s = e & t.enabled ? n.enabled: n.disabled;
  4698. s || (s = n["default"]);
  4699. var o = this.getOwner().getSelected() ? "selected": "idle",
  4700. u = s[o];
  4701. u || (u = n["default"]);
  4702. var a = u[i];
  4703. return a || (a = n["default"][o][i]),
  4704. a || (a = n["default"][o].idle),
  4705. a
  4706. },
  4707. s._bitmaps = null,
  4708. s._selected = !1,
  4709. i
  4710. }),
  4711. define("gui/BitmapButton", ["require", "gui/Button", "gui/BitmapButtonRenderer"],
  4712. function(e) {
  4713. var t = e("gui/Button"),
  4714. n = e("gui/BitmapButtonRenderer"),
  4715. r = function() {};
  4716. r.createButton = function(e) {
  4717. var r = new t;
  4718. r.x = e.x || 0,
  4719. r.y = e.y || 0;
  4720. var i = new n;
  4721. return i.setFlagBitmaps(e.flags || {}),
  4722. i.setAnchors(e.anchorX || 0, e.anchorY || 0),
  4723. r.setRenderer(i),
  4724. r
  4725. };
  4726. var i = r.prototype;
  4727. return r
  4728. }),
  4729. define("gui/popUpUtils", {
  4730. show: function(e, t) {
  4731. e && e.addChild && e.addChild(t)
  4732. },
  4733. hide: function(e) {
  4734. e && e.parent && e.parent.removeChild && e.parent.removeChild(e)
  4735. }
  4736. }),
  4737. define("ScaleUtils", ["require"],
  4738. function(e) {
  4739. return {
  4740. fit: function(e, t, n, r) {
  4741. var i = r / n,
  4742. s = t / e,
  4743. o = i > s ? n / e: r / t;
  4744. return {
  4745. width: e * o,
  4746. height: t * o
  4747. }
  4748. },
  4749. fill: function(e, t, n, r) {
  4750. var i = r / n,
  4751. s = t / e,
  4752. o = i < s ? n / e: r / t;
  4753. return {
  4754. width: e * o,
  4755. height: t * o
  4756. }
  4757. },
  4758. fillX: function(e, t, n, r) {
  4759. var i = r / n,
  4760. s = t / e,
  4761. o = n / e;
  4762. return {
  4763. width: e * o,
  4764. height: t * o
  4765. }
  4766. },
  4767. fillY: function(e, t, n, r) {
  4768. var i = r / n,
  4769. s = t / e,
  4770. o = r / t;
  4771. return {
  4772. width: e * o,
  4773. height: t * o
  4774. }
  4775. }
  4776. }
  4777. }),
  4778. define("screenSize", ["require", "ScaleUtils"],
  4779. function(e) {
  4780. var t = e("ScaleUtils");
  4781. return {
  4782. baseWidth: undefined,
  4783. baseHeight: undefined,
  4784. width: undefined,
  4785. height: undefined,
  4786. maxWidth: undefined,
  4787. maxHeight: undefined,
  4788. getRatio: function() {
  4789. return this.width / this.height
  4790. },
  4791. setUp: function(e, n, r, i) {
  4792. this.maxWidth = r,
  4793. this.maxHeight = i,
  4794. this.baseWidth = e,
  4795. this.baseHeight = n;
  4796. var s = window.innerWidth,
  4797. o = window.innerHeight,
  4798. u = t.fit(this.baseWidth, this.baseHeight, s, o),
  4799. a = u.width / this.baseWidth;
  4800. this.width = Math.floor(s / a),
  4801. this.height = Math.floor(o / a),
  4802. this.width > r && (this.width = r),
  4803. this.height > i && (this.height = i)
  4804. },
  4805. resize: function() {}
  4806. }
  4807. }),
  4808. define("screens/InfoPopUp", ["require", "gui/popUpUtils", "cjs", "assetStorage", "screenSize"],
  4809. function(e) {
  4810. var t = e("gui/popUpUtils"),
  4811. n = e("cjs"),
  4812. r = e("assetStorage"),
  4813. i = e("screenSize"),
  4814. s = function() {
  4815. this.initialize(),
  4816. this.create()
  4817. },
  4818. o = s.prototype = new n.Container;
  4819. return o.create = function() {
  4820. return;
  4821. },
  4822. o.show = function(e) {
  4823. t.show(e, this)
  4824. },
  4825. o.hide = function() {
  4826. t.hide(this)
  4827. },
  4828. s
  4829. }),
  4830. this.createjs = this.createjs || {},
  4831. function() {
  4832. var e = createjs.SoundJS = createjs.SoundJS || {};
  4833. e.version = "0.5.2",
  4834. e.buildDate = "Thu, 12 Dec 2013 23:33:37 GMT"
  4835. } (),
  4836. this.createjs = this.createjs || {},
  4837. function() {
  4838. var e = function() {},
  4839. t = e.prototype;
  4840. e.initialize = function(e) {
  4841. e.addEventListener = t.addEventListener,
  4842. e.on = t.on,
  4843. e.removeEventListener = e.off = t.removeEventListener,
  4844. e.removeAllEventListeners = t.removeAllEventListeners,
  4845. e.hasEventListener = t.hasEventListener,
  4846. e.dispatchEvent = t.dispatchEvent,
  4847. e._dispatchEvent = t._dispatchEvent,
  4848. e.willTrigger = t.willTrigger
  4849. },
  4850. t._listeners = null,
  4851. t._captureListeners = null,
  4852. t.initialize = function() {},
  4853. t.addEventListener = function(e, t, n) {
  4854. var r;
  4855. r = n ? this._captureListeners = this._captureListeners || {}: this._listeners = this._listeners || {};
  4856. var i = r[e];
  4857. return i && this.removeEventListener(e, t, n),
  4858. i = r[e],
  4859. i ? i.push(t) : r[e] = [t],
  4860. t
  4861. },
  4862. t.on = function(e, t, n, r, i, s) {
  4863. return t.handleEvent && (n = n || t, t = t.handleEvent),
  4864. n = n || this,
  4865. this.addEventListener(e,
  4866. function(e) {
  4867. t.call(n, e, i),
  4868. r && e.remove()
  4869. },
  4870. s)
  4871. },
  4872. t.removeEventListener = function(e, t, n) {
  4873. var r = n ? this._captureListeners: this._listeners;
  4874. if (r) {
  4875. var i = r[e];
  4876. if (i) for (var s = 0,
  4877. o = i.length; o > s; s++) if (i[s] == t) {
  4878. 1 == o ? delete r[e] : i.splice(s, 1);
  4879. break
  4880. }
  4881. }
  4882. },
  4883. t.off = t.removeEventListener,
  4884. t.removeAllEventListeners = function(e) {
  4885. e ? (this._listeners && delete this._listeners[e], this._captureListeners && delete this._captureListeners[e]) : this._listeners = this._captureListeners = null
  4886. },
  4887. t.dispatchEvent = function(e, t) {
  4888. if ("string" == typeof e) {
  4889. var n = this._listeners;
  4890. if (!n || !n[e]) return ! 1;
  4891. e = new createjs.Event(e)
  4892. }
  4893. if (e.target = t || this, e.bubbles && this.parent) {
  4894. for (var r = this,
  4895. i = [r]; r.parent;) i.push(r = r.parent);
  4896. var s, o = i.length;
  4897. for (s = o - 1; s >= 0 && !e.propagationStopped; s--) i[s]._dispatchEvent(e, 1 + (0 == s));
  4898. for (s = 1; o > s && !e.propagationStopped; s++) i[s]._dispatchEvent(e, 3)
  4899. } else this._dispatchEvent(e, 2);
  4900. return e.defaultPrevented
  4901. },
  4902. t.hasEventListener = function(e) {
  4903. var t = this._listeners,
  4904. n = this._captureListeners;
  4905. return !! (t && t[e] || n && n[e])
  4906. },
  4907. t.willTrigger = function(e) {
  4908. for (var t = this; t;) {
  4909. if (t.hasEventListener(e)) return ! 0;
  4910. t = t.parent
  4911. }
  4912. return ! 1
  4913. },
  4914. t.toString = function() {
  4915. return "[EventDispatcher]"
  4916. },
  4917. t._dispatchEvent = function(e, t) {
  4918. var n, r = 1 == t ? this._captureListeners: this._listeners;
  4919. if (e && r) {
  4920. var i = r[e.type];
  4921. if (!i || !(n = i.length)) return;
  4922. e.currentTarget = this,
  4923. e.eventPhase = t,
  4924. e.removed = !1,
  4925. i = i.slice();
  4926. for (var s = 0; n > s && !e.immediatePropagationStopped; s++) {
  4927. var o = i[s];
  4928. o.handleEvent ? o.handleEvent(e) : o(e),
  4929. e.removed && (this.off(e.type, o, 1 == t), e.removed = !1)
  4930. }
  4931. }
  4932. },
  4933. createjs.EventDispatcher = e
  4934. } (),
  4935. this.createjs = this.createjs || {},
  4936. function() {
  4937. var e = function(e, t, n) {
  4938. this.initialize(e, t, n)
  4939. },
  4940. t = e.prototype;
  4941. t.type = null,
  4942. t.target = null,
  4943. t.currentTarget = null,
  4944. t.eventPhase = 0,
  4945. t.bubbles = !1,
  4946. t.cancelable = !1,
  4947. t.timeStamp = 0,
  4948. t.defaultPrevented = !1,
  4949. t.propagationStopped = !1,
  4950. t.immediatePropagationStopped = !1,
  4951. t.removed = !1,
  4952. t.initialize = function(e, t, n) {
  4953. this.type = e,
  4954. this.bubbles = t,
  4955. this.cancelable = n,
  4956. this.timeStamp = (new Date).getTime()
  4957. },
  4958. t.preventDefault = function() {
  4959. this.defaultPrevented = !0
  4960. },
  4961. t.stopPropagation = function() {
  4962. this.propagationStopped = !0
  4963. },
  4964. t.stopImmediatePropagation = function() {
  4965. this.immediatePropagationStopped = this.propagationStopped = !0
  4966. },
  4967. t.remove = function() {
  4968. this.removed = !0
  4969. },
  4970. t.clone = function() {
  4971. return new e(this.type, this.bubbles, this.cancelable)
  4972. },
  4973. t.toString = function() {
  4974. return "[Event (type=" + this.type + ")]"
  4975. },
  4976. createjs.Event = e
  4977. } (),
  4978. this.createjs = this.createjs || {},
  4979. function() {
  4980. createjs.indexOf = function(e, t) {
  4981. for (var n = 0,
  4982. r = e.length; r > n; n++) if (t === e[n]) return n;
  4983. return - 1
  4984. }
  4985. } (),
  4986. this.createjs = this.createjs || {},
  4987. function() {
  4988. createjs.proxy = function(e, t) {
  4989. var n = Array.prototype.slice.call(arguments, 2);
  4990. return function() {
  4991. return e.apply(t, Array.prototype.slice.call(arguments, 0).concat(n))
  4992. }
  4993. }
  4994. } (),
  4995. this.createjs = this.createjs || {},
  4996. function() {
  4997. function e() {
  4998. throw "Sound cannot be instantiated"
  4999. }
  5000. function t(e, t) {
  5001. this.init(e, t)
  5002. }
  5003. function n() {
  5004. this.isDefault = !0,
  5005. this.addEventListener = this.removeEventListener = this.removeAllEventListeners = this.dispatchEvent = this.hasEventListener = this._listeners = this._interrupt = this._playFailed = this.pause = this.resume = this.play = this._beginPlaying = this._cleanUp = this.stop = this.setMasterVolume = this.setVolume = this.mute = this.setMute = this.getMute = this.setPan = this.getPosition = this.setPosition = this.playFailed = function() {
  5006. return ! 1
  5007. },
  5008. this.getVolume = this.getPan = this.getDuration = function() {
  5009. return 0
  5010. },
  5011. this.playState = e.PLAY_FAILED,
  5012. this.toString = function() {
  5013. return "[Sound Default Sound Instance]"
  5014. }
  5015. }
  5016. function r() {}
  5017. var i = e;
  5018. i.DELIMITER = "|",
  5019. i.INTERRUPT_ANY = "any",
  5020. i.INTERRUPT_EARLY = "early",
  5021. i.INTERRUPT_LATE = "late",
  5022. i.INTERRUPT_NONE = "none",
  5023. i.PLAY_INITED = "playInited",
  5024. i.PLAY_SUCCEEDED = "playSucceeded",
  5025. i.PLAY_INTERRUPTED = "playInterrupted",
  5026. i.PLAY_FINISHED = "playFinished",
  5027. i.PLAY_FAILED = "playFailed",
  5028. i.SUPPORTED_EXTENSIONS = ["mp3", "ogg", "mpeg", "wav", "m4a", "mp4", "aiff", "wma", "mid"],
  5029. i.EXTENSION_MAP = {
  5030. m4a: "mp4"
  5031. },
  5032. i.FILE_PATTERN=/^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([/.]*?(?:[^?]+)?\/)?((?:[^/?]+)\.(\w+))(?:\?(\S+)?)?$/,i.defaultInterruptBehavior = i.INTERRUPT_NONE, i.alternateExtensions = [], i._lastID = 0, i.activePlugin = null, i._pluginsRegistered = !1, i._masterVolume = 1, i._masterMute = !1, i._instances = [], i._idHash = {},
  5033. i._preloadHash = {},
  5034. i._defaultSoundInstance = null, i.addEventListener = null, i.removeEventListener = null, i.removeAllEventListeners = null, i.dispatchEvent = null, i.hasEventListener = null, i._listeners = null, createjs.EventDispatcher.initialize(i), i._sendFileLoadEvent = function(e) {
  5035. if (i._preloadHash[e]) for (var t = 0,
  5036. n = i._preloadHash[e].length; n > t; t++) {
  5037. var r = i._preloadHash[e][t];
  5038. if (i._preloadHash[e][t] = !0, i.hasEventListener("fileload")) {
  5039. var s = new createjs.Event("fileload");
  5040. s.src = r.src,
  5041. s.id = r.id,
  5042. s.data = r.data,
  5043. i.dispatchEvent(s)
  5044. }
  5045. }
  5046. },
  5047. i.getPreloadHandlers = function() {
  5048. return {
  5049. callback: createjs.proxy(i.initLoad, i),
  5050. types: ["sound"],
  5051. extensions: i.SUPPORTED_EXTENSIONS
  5052. }
  5053. },
  5054. i.registerPlugin = function(e) {
  5055. try {
  5056. console.log("createjs.Sound.registerPlugin has been deprecated. Please use registerPlugins.")
  5057. } catch(t) {}
  5058. return i._registerPlugin(e)
  5059. },
  5060. i._registerPlugin = function(e) {
  5061. return i._pluginsRegistered = !0,
  5062. null == e ? !1 : e.isSupported() ? (i.activePlugin = new e, !0) : !1
  5063. },
  5064. i.registerPlugins = function(e) {
  5065. for (var t = 0,
  5066. n = e.length; n > t; t++) {
  5067. var r = e[t];
  5068. if (i._registerPlugin(r)) return ! 0
  5069. }
  5070. return ! 1
  5071. },
  5072. i.initializeDefaultPlugins = function() {
  5073. return null != i.activePlugin ? !0 : i._pluginsRegistered ? !1 : i.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin]) ? !0 : !1
  5074. },
  5075. i.isReady = function() {
  5076. return null != i.activePlugin
  5077. },
  5078. i.getCapabilities = function() {
  5079. return null == i.activePlugin ? null: i.activePlugin._capabilities
  5080. },
  5081. i.getCapability = function(e) {
  5082. return null == i.activePlugin ? null: i.activePlugin._capabilities[e]
  5083. },
  5084. i.initLoad = function(e, t, n, r, s) {
  5085. e = e.replace(s, "");
  5086. var o = i.registerSound(e, n, r, !1, s);
  5087. return null == o ? !1 : o
  5088. },
  5089. i.registerSound = function(e, n, r, s, o) {
  5090. if (!i.initializeDefaultPlugins()) return ! 1;
  5091. if (e instanceof Object && (o = n, n = e.id, r = e.data, e = e.src), i.alternateExtensions.length) var u = i._parsePath2(e, "sound", n, r);
  5092. else var u = i._parsePath(e, "sound", n, r);
  5093. if (null == u) return ! 1;
  5094. null != o && (e = o + e, u.src = o + u.src),
  5095. null != n && (i._idHash[n] = u.src);
  5096. var a = null;
  5097. null != r && (isNaN(r.channels) ? isNaN(r) || (a = parseInt(r)) : a = parseInt(r.channels));
  5098. var f = i.activePlugin.register(u.src, a);
  5099. if (null != f && (null != f.numChannels && (a = f.numChannels), t.create(u.src, a), null != r && isNaN(r) ? r.channels = u.data.channels = a || t.maxPerChannel() : r = u.data = a || t.maxPerChannel(), null != f.tag ? u.tag = f.tag: f.src && (u.src = f.src), null != f.completeHandler && (u.completeHandler = f.completeHandler), f.type && (u.type = f.type)), 0 != s) if (i._preloadHash[u.src] || (i._preloadHash[u.src] = []), i._preloadHash[u.src].push({
  5100. src: e,
  5101. id: n,
  5102. data: r
  5103. }), 1 == i._preloadHash[u.src].length) i.activePlugin.preload(u.src, f);
  5104. else if (1 == i._preloadHash[u.src][0]) return ! 0;
  5105. return u
  5106. },
  5107. i.registerManifest = function(e, t) {
  5108. for (var n = [], r = 0, i = e.length; i > r; r++) n[r] = createjs.Sound.registerSound(e[r].src, e[r].id, e[r].data, e[r].preload, t);
  5109. return n
  5110. },
  5111. i.removeSound = function(e, n) {
  5112. if (null == i.activePlugin) return ! 1;
  5113. if (e instanceof Object && (e = e.src), e = i._getSrcById(e), i.alternateExtensions.length) var r = i._parsePath2(e);
  5114. else var r = i._parsePath(e);
  5115. if (null == r) return ! 1;
  5116. null != n && (r.src = n + r.src),
  5117. e = r.src;
  5118. for (var s in i._idHash) i._idHash[s] == e && delete i._idHash[s];
  5119. return t.removeSrc(e),
  5120. delete i._preloadHash[e],
  5121. i.activePlugin.removeSound(e),
  5122. !0
  5123. },
  5124. i.removeManifest = function(e, t) {
  5125. for (var n = [], r = 0, i = e.length; i > r; r++) n[r] = createjs.Sound.removeSound(e[r].src, t);
  5126. return n
  5127. },
  5128. i.removeAllSounds = function() {
  5129. i._idHash = {},
  5130. i._preloadHash = {},
  5131. t.removeAll(),
  5132. i.activePlugin.removeAllSounds()
  5133. },
  5134. i.loadComplete = function(e) {
  5135. if (i.alternateExtensions.length) var t = i._parsePath2(e, "sound");
  5136. else var t = i._parsePath(e, "sound");
  5137. return e = t ? i._getSrcById(t.src) : i._getSrcById(e),
  5138. 1 == i._preloadHash[e][0]
  5139. },
  5140. i._parsePath = function(e, t, n, r) {
  5141. "string" != typeof e && (e = e.toString());
  5142. var s = e.split(i.DELIMITER);
  5143. if (s.length > 1) try {
  5144. console.log('createjs.Sound.DELIMITER "|" loading approach has been deprecated. Please use the new alternateExtensions property.')
  5145. } catch(o) {}
  5146. for (var u = {
  5147. type: t || "sound",
  5148. id: n,
  5149. data: r
  5150. },
  5151. a = i.getCapabilities(), f = 0, l = s.length; l > f; f++) {
  5152. var c = s[f],
  5153. h = c.match(i.FILE_PATTERN);
  5154. if (null == h) return ! 1;
  5155. var p = h[4],
  5156. d = h[5];
  5157. if (a[d] && createjs.indexOf(i.SUPPORTED_EXTENSIONS, d) > -1) return u.name = p,
  5158. u.src = c,
  5159. u.extension = d,
  5160. u
  5161. }
  5162. return null
  5163. },
  5164. i._parsePath2 = function(e, t, n, r) {
  5165. "string" != typeof e && (e = e.toString());
  5166. var s = e.match(i.FILE_PATTERN);
  5167. if (null == s) return ! 1;
  5168. for (var o = s[4], u = s[5], a = i.getCapabilities(), f = 0; ! a[u];) if (u = i.alternateExtensions[f++], f > i.alternateExtensions.length) return null;
  5169. e = e.replace("." + s[5], "." + u);
  5170. var l = {
  5171. type: t || "sound",
  5172. id: n,
  5173. data: r
  5174. };
  5175. return l.name = o,
  5176. l.src = e,
  5177. l.extension = u,
  5178. l
  5179. },
  5180. i.play = function(e, t, n, r, s, o, u) {
  5181. var a = i.createInstance(e),
  5182. f = i._playInstance(a, t, n, r, s, o, u);
  5183. return f || a.playFailed(),
  5184. a
  5185. },
  5186. i.createInstance = function(n) {
  5187. if (!i.initializeDefaultPlugins()) return i._defaultSoundInstance;
  5188. if (n = i._getSrcById(n), i.alternateExtensions.length) var r = i._parsePath2(n, "sound");
  5189. else var r = i._parsePath(n, "sound");
  5190. var s = null;
  5191. return null != r && null != r.src ? (t.create(r.src), s = i.activePlugin.create(r.src)) : s = e._defaultSoundInstance,
  5192. s.uniqueId = i._lastID++,
  5193. s
  5194. },
  5195. i.setVolume = function(e) {
  5196. if (null == Number(e)) return ! 1;
  5197. if (e = Math.max(0, Math.min(1, e)), i._masterVolume = e, !this.activePlugin || !this.activePlugin.setVolume || !this.activePlugin.setVolume(e)) for (var t = this._instances,
  5198. n = 0,
  5199. r = t.length; r > n; n++) t[n].setMasterVolume(e)
  5200. },
  5201. i.getVolume = function() {
  5202. return i._masterVolume
  5203. },
  5204. i.setMute = function(e) {
  5205. if (null == e || void 0 == e) return ! 1;
  5206. if (this._masterMute = e, !this.activePlugin || !this.activePlugin.setMute || !this.activePlugin.setMute(e)) for (var t = this._instances,
  5207. n = 0,
  5208. r = t.length; r > n; n++) t[n].setMasterMute(e);
  5209. return ! 0
  5210. },
  5211. i.getMute = function() {
  5212. return this._masterMute
  5213. },
  5214. i.stop = function() {
  5215. for (var e = this._instances,
  5216. t = e.length; t--;) e[t].stop()
  5217. },
  5218. i._playInstance = function(e, t, n, r, s, o, u) {
  5219. if (t instanceof Object && (n = t.delay, r = t.offset, s = t.loop, o = t.volume, u = t.pan, t = t.interrupt), t = t || i.defaultInterruptBehavior, null == n && (n = 0), null == r && (r = e.getPosition()), null == s && (s = 0), null == o && (o = e.volume), null == u && (u = e.pan), 0 == n) {
  5220. var a = i._beginPlaying(e, t, r, s, o, u);
  5221. if (!a) return ! 1
  5222. } else {
  5223. var f = setTimeout(function() {
  5224. i._beginPlaying(e, t, r, s, o, u)
  5225. },
  5226. n);
  5227. e._delayTimeoutId = f
  5228. }
  5229. return this._instances.push(e),
  5230. !0
  5231. },
  5232. i._beginPlaying = function(e, n, r, i, s, o) {
  5233. if (!t.add(e, n)) return ! 1;
  5234. var u = e._beginPlaying(r, i, s, o);
  5235. if (!u) {
  5236. var a = createjs.indexOf(this._instances, e);
  5237. return a > -1 && this._instances.splice(a, 1),
  5238. !1
  5239. }
  5240. return ! 0
  5241. },
  5242. i._getSrcById = function(e) {
  5243. return null == i._idHash || null == i._idHash[e] ? e: i._idHash[e]
  5244. },
  5245. i._playFinished = function(e) {
  5246. t.remove(e);
  5247. var n = createjs.indexOf(this._instances, e);
  5248. n > -1 && this._instances.splice(n, 1)
  5249. },
  5250. createjs.Sound = e, t.channels = {},
  5251. t.create = function(e, n) {
  5252. var r = t.get(e);
  5253. return null == r ? (t.channels[e] = new t(e, n), !0) : !1
  5254. },
  5255. t.removeSrc = function(e) {
  5256. var n = t.get(e);
  5257. return null == n ? !1 : (n.removeAll(), delete t.channels[e], !0)
  5258. },
  5259. t.removeAll = function() {
  5260. for (var e in t.channels) t.channels[e].removeAll();
  5261. t.channels = {}
  5262. },
  5263. t.add = function(e, n) {
  5264. var r = t.get(e.src);
  5265. return null == r ? !1 : r.add(e, n)
  5266. },
  5267. t.remove = function(e) {
  5268. var n = t.get(e.src);
  5269. return null == n ? !1 : (n.remove(e), !0)
  5270. },
  5271. t.maxPerChannel = function() {
  5272. return s.maxDefault
  5273. },
  5274. t.get = function(e) {
  5275. return t.channels[e]
  5276. };
  5277. var s = t.prototype; s.src = null, s.max = null, s.maxDefault = 100, s.length = 0, s.init = function(e, t) {
  5278. this.src = e,
  5279. this.max = t || this.maxDefault,
  5280. -1 == this.max && (this.max = this.maxDefault),
  5281. this._instances = []
  5282. },
  5283. s.get = function(e) {
  5284. return this._instances[e]
  5285. },
  5286. s.add = function(e, t) {
  5287. return this.getSlot(t, e) ? (this._instances.push(e), this.length++, !0) : !1
  5288. },
  5289. s.remove = function(e) {
  5290. var t = createjs.indexOf(this._instances, e);
  5291. return - 1 == t ? !1 : (this._instances.splice(t, 1), this.length--, !0)
  5292. },
  5293. s.removeAll = function() {
  5294. for (var e = this.length - 1; e >= 0; e--) this._instances[e].stop()
  5295. },
  5296. s.getSlot = function(t) {
  5297. for (var n, r, i = 0,
  5298. s = this.max; s > i; i++) {
  5299. if (n = this.get(i), null == n) return ! 0; (t != e.INTERRUPT_NONE || n.playState == e.PLAY_FINISHED) && (0 != i ? n.playState == e.PLAY_FINISHED || n.playState == e.PLAY_INTERRUPTED || n.playState == e.PLAY_FAILED ? r = n: (t == e.INTERRUPT_EARLY && n.getPosition() < r.getPosition() || t == e.INTERRUPT_LATE && n.getPosition() > r.getPosition()) && (r = n) : r = n)
  5300. }
  5301. return null != r ? (r._interrupt(), this.remove(r), !0) : !1
  5302. },
  5303. s.toString = function() {
  5304. return "[Sound SoundChannel]"
  5305. },
  5306. e._defaultSoundInstance = new n, r.init = function() {
  5307. var e = window.navigator.userAgent;
  5308. r.isFirefox = e.indexOf("Firefox") > -1,
  5309. r.isOpera = null != window.opera,
  5310. r.isChrome = e.indexOf("Chrome") > -1,
  5311. r.isIOS = e.indexOf("iPod") > -1 || e.indexOf("iPhone") > -1 || e.indexOf("iPad") > -1,
  5312. r.isAndroid = e.indexOf("Android") > -1,
  5313. r.isBlackberry = e.indexOf("Blackberry") > -1
  5314. },
  5315. r.init(), createjs.Sound.BrowserDetect = r
  5316. } (), this.createjs = this.createjs || {},
  5317. function() {
  5318. function e() {
  5319. this._init()
  5320. }
  5321. var t = e;
  5322. t._capabilities = null,
  5323. t.isSupported = function() {
  5324. var e = createjs.Sound.BrowserDetect.isIOS || createjs.Sound.BrowserDetect.isAndroid || createjs.Sound.BrowserDetect.isBlackberry;
  5325. return "file:" != location.protocol || e || this._isFileXHRSupported() ? (t._generateCapabilities(), null == t.context ? !1 : !0) : !1
  5326. },
  5327. t._isFileXHRSupported = function() {
  5328. var e = !0,
  5329. t = new XMLHttpRequest;
  5330. try {
  5331. t.open("GET", "fail.fail", !1)
  5332. } catch(n) {
  5333. return e = !1
  5334. }
  5335. t.onerror = function() {
  5336. e = !1
  5337. },
  5338. t.onload = function() {
  5339. e = 404 == this.status || 200 == this.status || 0 == this.status && "" != this.response
  5340. };
  5341. try {
  5342. t.send()
  5343. } catch(n) {
  5344. e = !1
  5345. }
  5346. return e
  5347. },
  5348. t._generateCapabilities = function() {
  5349. if (null == t._capabilities) {
  5350. var e = document.createElement("audio");
  5351. if (null == e.canPlayType) return null;
  5352. if (window.webkitAudioContext) t.context = new webkitAudioContext;
  5353. else {
  5354. if (!window.AudioContext) return null;
  5355. t.context = new AudioContext
  5356. }
  5357. t._compatibilitySetUp(),
  5358. t.playEmptySound(),
  5359. t._capabilities = {
  5360. panning: !0,
  5361. volume: !0,
  5362. tracks: -1
  5363. };
  5364. for (var n = createjs.Sound.SUPPORTED_EXTENSIONS,
  5365. r = createjs.Sound.EXTENSION_MAP,
  5366. i = 0,
  5367. s = n.length; s > i; i++) {
  5368. var o = n[i],
  5369. u = r[o] || o;
  5370. t._capabilities[o] = "no" != e.canPlayType("audio/" + o) && "" != e.canPlayType("audio/" + o) || "no" != e.canPlayType("audio/" + u) && "" != e.canPlayType("audio/" + u)
  5371. }
  5372. t.context.destination.numberOfChannels < 2 && (t._capabilities.panning = !1),
  5373. t.dynamicsCompressorNode = t.context.createDynamicsCompressor(),
  5374. t.dynamicsCompressorNode.connect(t.context.destination),
  5375. t.gainNode = t.context.createGain(),
  5376. t.gainNode.connect(t.dynamicsCompressorNode)
  5377. }
  5378. },
  5379. t._compatibilitySetUp = function() {
  5380. if (!t.context.createGain) {
  5381. t.context.createGain = t.context.createGainNode;
  5382. var e = t.context.createBufferSource();
  5383. e.__proto__.start = e.__proto__.noteGrainOn,
  5384. e.__proto__.stop = e.__proto__.noteOff,
  5385. this._panningModel = 0
  5386. }
  5387. },
  5388. t.playEmptySound = function() {
  5389. var e = this.context.createBuffer(1, 1, 22050),
  5390. t = this.context.createBufferSource();
  5391. t.buffer = e,
  5392. t.connect(this.context.destination),
  5393. t.start(0, 0, 0)
  5394. };
  5395. var n = e.prototype;
  5396. n._capabilities = null,
  5397. n._volume = 1,
  5398. n.context = null,
  5399. n._panningModel = "equalpower",
  5400. n.dynamicsCompressorNode = null,
  5401. n.gainNode = null,
  5402. n._arrayBuffers = null,
  5403. n._init = function() {
  5404. this._capabilities = t._capabilities,
  5405. this._arrayBuffers = {},
  5406. this.context = t.context,
  5407. this.gainNode = t.gainNode,
  5408. this.dynamicsCompressorNode = t.dynamicsCompressorNode
  5409. },
  5410. n.register = function(e) {
  5411. this._arrayBuffers[e] = !0;
  5412. var t = new createjs.WebAudioPlugin.Loader(e, this);
  5413. return {
  5414. tag: t
  5415. }
  5416. },
  5417. n.isPreloadStarted = function(e) {
  5418. return null != this._arrayBuffers[e]
  5419. },
  5420. n.isPreloadComplete = function(e) {
  5421. return null != this._arrayBuffers[e] && 1 != this._arrayBuffers[e]
  5422. },
  5423. n.removeSound = function(e) {
  5424. delete this._arrayBuffers[e]
  5425. },
  5426. n.removeAllSounds = function() {
  5427. this._arrayBuffers = {}
  5428. },
  5429. n.addPreloadResults = function(e, t) {
  5430. this._arrayBuffers[e] = t
  5431. },
  5432. n._handlePreloadComplete = function() {
  5433. createjs.Sound._sendFileLoadEvent(this.src)
  5434. },
  5435. n.preload = function(e) {
  5436. this._arrayBuffers[e] = !0;
  5437. var t = new createjs.WebAudioPlugin.Loader(e, this);
  5438. t.onload = this._handlePreloadComplete,
  5439. t.load()
  5440. },
  5441. n.create = function(e) {
  5442. return this.isPreloadStarted(e) || this.preload(e),
  5443. new createjs.WebAudioPlugin.SoundInstance(e, this)
  5444. },
  5445. n.setVolume = function(e) {
  5446. return this._volume = e,
  5447. this._updateVolume(),
  5448. !0
  5449. },
  5450. n._updateVolume = function() {
  5451. var e = createjs.Sound._masterMute ? 0 : this._volume;
  5452. e != this.gainNode.gain.value && (this.gainNode.gain.value = e)
  5453. },
  5454. n.getVolume = function() {
  5455. return this._volume
  5456. },
  5457. n.setMute = function() {
  5458. return this._updateVolume(),
  5459. !0
  5460. },
  5461. n.toString = function() {
  5462. return "[WebAudioPlugin]"
  5463. },
  5464. createjs.WebAudioPlugin = e
  5465. } (),
  5466. function() {
  5467. function e(e, t) {
  5468. this._init(e, t)
  5469. }
  5470. var t = e.prototype = new createjs.EventDispatcher;
  5471. t.src = null,
  5472. t.uniqueId = -1,
  5473. t.playState = null,
  5474. t._owner = null,
  5475. t._offset = 0,
  5476. t._delay = 0,
  5477. t._volume = 1;
  5478. try {
  5479. Object.defineProperty(t, "volume", {
  5480. get: function() {
  5481. return this._volume
  5482. },
  5483. set: function(e) {
  5484. return null == Number(e) ? !1 : (e = Math.max(0, Math.min(1, e)), this._volume = e, this._updateVolume(), void 0)
  5485. }
  5486. })
  5487. } catch(n) {}
  5488. t._pan = 0;
  5489. try {
  5490. Object.defineProperty(t, "pan", {
  5491. get: function() {
  5492. return this._pan
  5493. },
  5494. set: function(e) {
  5495. return this._owner._capabilities.panning && null != Number(e) ? (e = Math.max( - 1, Math.min(1, e)), this._pan = e, this.panNode.setPosition(e, 0, -0.5), void 0) : !1
  5496. }
  5497. })
  5498. } catch(n) {}
  5499. t._duration = 0,
  5500. t._remainingLoops = 0,
  5501. t._delayTimeoutId = null,
  5502. t._soundCompleteTimeout = null,
  5503. t.gainNode = null,
  5504. t.panNode = null,
  5505. t.sourceNode = null,
  5506. t._sourceNodeNext = null,
  5507. t._muted = !1,
  5508. t._paused = !1,
  5509. t._startTime = 0,
  5510. t._endedHandler = null,
  5511. t._sendEvent = function(e) {
  5512. var t = new createjs.Event(e);
  5513. this.dispatchEvent(t)
  5514. },
  5515. t._init = function(e, t) {
  5516. this._owner = t,
  5517. this.src = e,
  5518. this.gainNode = this._owner.context.createGain(),
  5519. this.panNode = this._owner.context.createPanner(),
  5520. this.panNode.panningModel = this._owner._panningModel,
  5521. this.panNode.connect(this.gainNode),
  5522. this._owner.isPreloadComplete(this.src) && (this._duration = 1e3 * this._owner._arrayBuffers[this.src].duration),
  5523. this._endedHandler = createjs.proxy(this._handleSoundComplete, this)
  5524. },
  5525. t._cleanUp = function() {
  5526. this.sourceNode && this.playState == createjs.Sound.PLAY_SUCCEEDED && (this.sourceNode = this._cleanUpAudioNode(this.sourceNode), this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext)),
  5527. 0 != this.gainNode.numberOfOutputs && this.gainNode.disconnect(0),
  5528. clearTimeout(this._delayTimeoutId),
  5529. clearTimeout(this._soundCompleteTimeout),
  5530. this._startTime = 0,
  5531. null != window.createjs && createjs.Sound._playFinished(this)
  5532. },
  5533. t._cleanUpAudioNode = function(e) {
  5534. return e && (e.stop(0), e.disconnect(this.panNode), e = null),
  5535. e
  5536. },
  5537. t._interrupt = function() {
  5538. this._cleanUp(),
  5539. this.playState = createjs.Sound.PLAY_INTERRUPTED,
  5540. this._paused = !1,
  5541. this._sendEvent("interrupted")
  5542. },
  5543. t._handleSoundReady = function() {
  5544. if (null != window.createjs) {
  5545. if (1e3 * this._offset > this.getDuration()) return this.playFailed(),
  5546. void 0;
  5547. this._offset < 0 && (this._offset = 0),
  5548. this.playState = createjs.Sound.PLAY_SUCCEEDED,
  5549. this._paused = !1,
  5550. this.gainNode.connect(this._owner.gainNode);
  5551. var e = this._owner._arrayBuffers[this.src].duration;
  5552. this.sourceNode = this._createAndPlayAudioNode(this._owner.context.currentTime - e, this._offset),
  5553. this._duration = 1e3 * e,
  5554. this._startTime = this.sourceNode.startTime - this._offset,
  5555. this._soundCompleteTimeout = setTimeout(this._endedHandler, 1e3 * (e - this._offset)),
  5556. 0 != this._remainingLoops && (this._sourceNodeNext = this._createAndPlayAudioNode(this._startTime, 0))
  5557. }
  5558. },
  5559. t._createAndPlayAudioNode = function(e, t) {
  5560. var n = this._owner.context.createBufferSource();
  5561. return n.buffer = this._owner._arrayBuffers[this.src],
  5562. n.connect(this.panNode),
  5563. this._owner.context.currentTime,
  5564. n.startTime = e + n.buffer.duration,
  5565. n.start(n.startTime, t, n.buffer.duration - t),
  5566. n
  5567. },
  5568. t.play = function(e, t, n, r, i, s) {
  5569. this._cleanUp(),
  5570. createjs.Sound._playInstance(this, e, t, n, r, i, s)
  5571. },
  5572. t._beginPlaying = function(e, t, n, r) {
  5573. return null != window.createjs && this.src ? (this._offset = e / 1e3, this._remainingLoops = t, this.volume = n, this.pan = r, this._owner.isPreloadComplete(this.src) ? (this._handleSoundReady(null), this._sendEvent("succeeded"), 1) : (this.playFailed(), void 0)) : void 0
  5574. },
  5575. t.pause = function() {
  5576. return this._paused || this.playState != createjs.Sound.PLAY_SUCCEEDED ? !1 : (this._paused = !0, this._offset = this._owner.context.currentTime - this._startTime, this._cleanUpAudioNode(this.sourceNode), this._cleanUpAudioNode(this._sourceNodeNext), 0 != this.gainNode.numberOfOutputs && this.gainNode.disconnect(), clearTimeout(this._delayTimeoutId), clearTimeout(this._soundCompleteTimeout), !0)
  5577. },
  5578. t.resume = function() {
  5579. return this._paused ? (this._handleSoundReady(null), !0) : !1
  5580. },
  5581. t.stop = function() {
  5582. return this._cleanUp(),
  5583. this.playState = createjs.Sound.PLAY_FINISHED,
  5584. this._offset = 0,
  5585. !0
  5586. },
  5587. t.setVolume = function(e) {
  5588. return this.volume = e,
  5589. !0
  5590. },
  5591. t._updateVolume = function() {
  5592. var e = this._muted ? 0 : this._volume;
  5593. return e != this.gainNode.gain.value ? (this.gainNode.gain.value = e, !0) : !1
  5594. },
  5595. t.getVolume = function() {
  5596. return this.volume
  5597. },
  5598. t.setMute = function(e) {
  5599. return null == e || void 0 == e ? !1 : (this._muted = e, this._updateVolume(), !0)
  5600. },
  5601. t.getMute = function() {
  5602. return this._muted
  5603. },
  5604. t.setPan = function(e) {
  5605. return this.pan = e,
  5606. this.pan != e ? !1 : void 0
  5607. },
  5608. t.getPan = function() {
  5609. return this.pan
  5610. },
  5611. t.getPosition = function() {
  5612. if (this._paused || null == this.sourceNode) var e = this._offset;
  5613. else var e = this._owner.context.currentTime - this._startTime;
  5614. return 1e3 * e
  5615. },
  5616. t.setPosition = function(e) {
  5617. return this._offset = e / 1e3,
  5618. this.sourceNode && this.playState == createjs.Sound.PLAY_SUCCEEDED && (this._cleanUpAudioNode(this.sourceNode), this._cleanUpAudioNode(this._sourceNodeNext), clearTimeout(this._soundCompleteTimeout)),
  5619. this._paused || this.playState != createjs.Sound.PLAY_SUCCEEDED || this._handleSoundReady(null),
  5620. !0
  5621. },
  5622. t.getDuration = function() {
  5623. return this._duration
  5624. },
  5625. t._handleSoundComplete = function() {
  5626. return this._offset = 0,
  5627. 0 != this._remainingLoops ? (this._remainingLoops--, this._sourceNodeNext ? (this._cleanUpAudioNode(this.sourceNode), this.sourceNode = this._sourceNodeNext, this._startTime = this.sourceNode.startTime, this._sourceNodeNext = this._createAndPlayAudioNode(this._startTime, 0), this._soundCompleteTimeout = setTimeout(this._endedHandler, this._duration)) : this._handleSoundReady(null), this._sendEvent("loop"), void 0) : (null != window.createjs && (this._cleanUp(), this.playState = createjs.Sound.PLAY_FINISHED, this._sendEvent("complete")), void 0)
  5628. },
  5629. t.playFailed = function() {
  5630. null != window.createjs && (this._cleanUp(), this.playState = createjs.Sound.PLAY_FAILED, this._sendEvent("failed"))
  5631. },
  5632. t.toString = function() {
  5633. return "[WebAudioPlugin SoundInstance]"
  5634. },
  5635. createjs.WebAudioPlugin.SoundInstance = e
  5636. } (),
  5637. function() {
  5638. function e(e, t) {
  5639. this._init(e, t)
  5640. }
  5641. var t = e.prototype;
  5642. t.request = null,
  5643. t.owner = null,
  5644. t.progress = -1,
  5645. t.src = null,
  5646. t.originalSrc = null,
  5647. t.result = null,
  5648. t.onload = null,
  5649. t.onprogress = null,
  5650. t.onError = null,
  5651. t._init = function(e, t) {
  5652. this.src = e,
  5653. this.originalSrc = e,
  5654. this.owner = t
  5655. },
  5656. t.load = function(e) {
  5657. null != e && (this.src = e),
  5658. this.request = new XMLHttpRequest,
  5659. this.request.open("GET", this.src, !0),
  5660. this.request.responseType = "arraybuffer",
  5661. this.request.onload = createjs.proxy(this.handleLoad, this),
  5662. this.request.onError = createjs.proxy(this.handleError, this),
  5663. this.request.onprogress = createjs.proxy(this.handleProgress, this),
  5664. this.request.send()
  5665. },
  5666. t.handleProgress = function(e, t) {
  5667. this.progress = e / t,
  5668. null != this.onprogress && this.onprogress({
  5669. loaded: e,
  5670. total: t,
  5671. progress: this.progress
  5672. })
  5673. },
  5674. t.handleLoad = function() {
  5675. this.owner.context.decodeAudioData(this.request.response, createjs.proxy(this.handleAudioDecoded, this), createjs.proxy(this.handleError, this))
  5676. },
  5677. t.handleAudioDecoded = function(e) {
  5678. this.progress = 1,
  5679. this.result = e,
  5680. this.src = this.originalSrc,
  5681. this.owner.addPreloadResults(this.src, this.result),
  5682. this.onload && this.onload()
  5683. },
  5684. t.handleError = function(e) {
  5685. this.owner.removeSound(this.src),
  5686. this.onerror && this.onerror(e)
  5687. },
  5688. t.toString = function() {
  5689. return "[WebAudioPlugin Loader]"
  5690. },
  5691. createjs.WebAudioPlugin.Loader = e
  5692. } (), this.createjs = this.createjs || {},
  5693. function() {
  5694. function e() {
  5695. this._init()
  5696. }
  5697. var t = e;
  5698. t.MAX_INSTANCES = 30,
  5699. t._AUDIO_READY = "canplaythrough",
  5700. t._AUDIO_ENDED = "ended",
  5701. t._AUDIO_SEEKED = "seeked",
  5702. t._AUDIO_STALLED = "stalled",
  5703. t._capabilities = null,
  5704. t.enableIOS = !1,
  5705. t.isSupported = function() {
  5706. if (createjs.Sound.BrowserDetect.isIOS && !t.enableIOS) return ! 1;
  5707. t._generateCapabilities();
  5708. var e = t.tag;
  5709. return null == e || null == t._capabilities ? !1 : !0
  5710. },
  5711. t._generateCapabilities = function() {
  5712. if (null == t._capabilities) {
  5713. var e = t.tag = document.createElement("audio");
  5714. if (null == e.canPlayType) return null;
  5715. t._capabilities = {
  5716. panning: !0,
  5717. volume: !0,
  5718. tracks: -1
  5719. };
  5720. for (var n = createjs.Sound.SUPPORTED_EXTENSIONS,
  5721. r = createjs.Sound.EXTENSION_MAP,
  5722. i = 0,
  5723. s = n.length; s > i; i++) {
  5724. var o = n[i],
  5725. u = r[o] || o;
  5726. t._capabilities[o] = "no" != e.canPlayType("audio/" + o) && "" != e.canPlayType("audio/" + o) || "no" != e.canPlayType("audio/" + u) && "" != e.canPlayType("audio/" + u)
  5727. }
  5728. }
  5729. };
  5730. var n = e.prototype;
  5731. n._capabilities = null,
  5732. n._audioSources = null,
  5733. n.defaultNumChannels = 2,
  5734. n.loadedHandler = null,
  5735. n._init = function() {
  5736. this._capabilities = t._capabilities,
  5737. this._audioSources = {}
  5738. },
  5739. n.register = function(e, t) {
  5740. this._audioSources[e] = !0;
  5741. for (var n = createjs.HTMLAudioPlugin.TagPool.get(e), r = null, i = t || this.defaultNumChannels, s = 0; i > s; s++) r = this._createTag(e),
  5742. n.add(r);
  5743. if (r.id = e, this.loadedHandler = createjs.proxy(this._handleTagLoad, this), r.addEventListener && r.addEventListener("canplaythrough", this.loadedHandler), null == r.onreadystatechange) r.onreadystatechange = this.loadedHandler;
  5744. else {
  5745. var o = r.onreadystatechange;
  5746. r.onreadystatechange = function() {
  5747. o(),
  5748. this.loadedHandler()
  5749. }
  5750. }
  5751. return {
  5752. tag: r,
  5753. numChannels: i
  5754. }
  5755. },
  5756. n._handleTagLoad = function(e) {
  5757. e.target.removeEventListener && e.target.removeEventListener("canplaythrough", this.loadedHandler),
  5758. e.target.onreadystatechange = null,
  5759. e.target.src != e.target.id && createjs.HTMLAudioPlugin.TagPool.checkSrc(e.target.id)
  5760. },
  5761. n._createTag = function(e) {
  5762. var t = document.createElement("audio");
  5763. return t.autoplay = !1,
  5764. t.preload = "none",
  5765. t.src = e,
  5766. t
  5767. },
  5768. n.removeSound = function(e) {
  5769. delete this._audioSources[e],
  5770. createjs.HTMLAudioPlugin.TagPool.remove(e)
  5771. },
  5772. n.removeAllSounds = function() {
  5773. this._audioSources = {},
  5774. createjs.HTMLAudioPlugin.TagPool.removeAll()
  5775. },
  5776. n.create = function(e) {
  5777. if (!this.isPreloadStarted(e)) {
  5778. var t = createjs.HTMLAudioPlugin.TagPool.get(e),
  5779. n = this._createTag(e);
  5780. n.id = e,
  5781. t.add(n),
  5782. this.preload(e, {
  5783. tag: n
  5784. })
  5785. }
  5786. return new createjs.HTMLAudioPlugin.SoundInstance(e, this)
  5787. },
  5788. n.isPreloadStarted = function(e) {
  5789. return null != this._audioSources[e]
  5790. },
  5791. n.preload = function(e, t) {
  5792. this._audioSources[e] = !0,
  5793. new createjs.HTMLAudioPlugin.Loader(e, t.tag)
  5794. },
  5795. n.toString = function() {
  5796. return "[HTMLAudioPlugin]"
  5797. },
  5798. createjs.HTMLAudioPlugin = e
  5799. } (),
  5800. function() {
  5801. function e(e, t) {
  5802. this._init(e, t)
  5803. }
  5804. var t = e.prototype = new createjs.EventDispatcher;
  5805. t.src = null,
  5806. t.uniqueId = -1,
  5807. t.playState = null,
  5808. t._owner = null,
  5809. t.loaded = !1,
  5810. t._offset = 0,
  5811. t._delay = 0,
  5812. t._volume = 1;
  5813. try {
  5814. Object.defineProperty(t, "volume", {
  5815. get: function() {
  5816. return this._volume
  5817. },
  5818. set: function(e) {
  5819. null != Number(e) && (e = Math.max(0, Math.min(1, e)), this._volume = e, this._updateVolume())
  5820. }
  5821. })
  5822. } catch(n) {}
  5823. t.pan = 0,
  5824. t._duration = 0,
  5825. t._remainingLoops = 0,
  5826. t._delayTimeoutId = null,
  5827. t.tag = null,
  5828. t._muted = !1,
  5829. t._paused = !1,
  5830. t._endedHandler = null,
  5831. t._readyHandler = null,
  5832. t._stalledHandler = null,
  5833. t.loopHandler = null,
  5834. t._init = function(e, t) {
  5835. this.src = e,
  5836. this._owner = t,
  5837. this._endedHandler = createjs.proxy(this._handleSoundComplete, this),
  5838. this._readyHandler = createjs.proxy(this._handleSoundReady, this),
  5839. this._stalledHandler = createjs.proxy(this._handleSoundStalled, this),
  5840. this.loopHandler = createjs.proxy(this.handleSoundLoop, this)
  5841. },
  5842. t._sendEvent = function(e) {
  5843. var t = new createjs.Event(e);
  5844. this.dispatchEvent(t)
  5845. },
  5846. t._cleanUp = function() {
  5847. var e = this.tag;
  5848. if (null != e) {
  5849. e.pause(),
  5850. e.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1),
  5851. e.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, !1),
  5852. e.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this.loopHandler, !1);
  5853. try {
  5854. e.currentTime = 0
  5855. } catch(t) {}
  5856. createjs.HTMLAudioPlugin.TagPool.setInstance(this.src, e),
  5857. this.tag = null
  5858. }
  5859. clearTimeout(this._delayTimeoutId),
  5860. null != window.createjs && createjs.Sound._playFinished(this)
  5861. },
  5862. t._interrupt = function() {
  5863. null != this.tag && (this.playState = createjs.Sound.PLAY_INTERRUPTED, this._cleanUp(), this._paused = !1, this._sendEvent("interrupted"))
  5864. },
  5865. t.play = function(e, t, n, r, i, s) {
  5866. this._cleanUp(),
  5867. createjs.Sound._playInstance(this, e, t, n, r, i, s)
  5868. },
  5869. t._beginPlaying = function(e, t, n, r) {
  5870. if (null == window.createjs) return - 1;
  5871. var i = this.tag = createjs.HTMLAudioPlugin.TagPool.getInstance(this.src);
  5872. return null == i ? (this.playFailed(), -1) : (i.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1), this._offset = e, this.volume = n, this.pan = r, this._updateVolume(), this._remainingLoops = t, 4 !== i.readyState ? (i.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, !1), i.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, !1), i.preload = "auto", i.load()) : this._handleSoundReady(null), this._sendEvent("succeeded"), 1)
  5873. },
  5874. t._handleSoundStalled = function() {
  5875. this._cleanUp(),
  5876. this._sendEvent("failed")
  5877. },
  5878. t._handleSoundReady = function() {
  5879. if (null != window.createjs) {
  5880. if (this._duration = 1e3 * this.tag.duration, this.playState = createjs.Sound.PLAY_SUCCEEDED, this._paused = !1, this.tag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, !1), this._offset >= this.getDuration()) return this.playFailed(),
  5881. void 0;
  5882. this._offset > 0 && (this.tag.currentTime = .001 * this._offset),
  5883. -1 == this._remainingLoops && (this.tag.loop = !0),
  5884. 0 != this._remainingLoops && (this.tag.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this.loopHandler, !1), this.tag.loop = !0),
  5885. this.tag.play()
  5886. }
  5887. },
  5888. t.pause = function() {
  5889. return this._paused || this.playState != createjs.Sound.PLAY_SUCCEEDED || null == this.tag ? !1 : (this._paused = !0, this.tag.pause(), clearTimeout(this._delayTimeoutId), !0)
  5890. },
  5891. t.resume = function() {
  5892. return this._paused && null != this.tag ? (this._paused = !1, this.tag.play(), !0) : !1
  5893. },
  5894. t.stop = function() {
  5895. return this._offset = 0,
  5896. this.pause(),
  5897. this.playState = createjs.Sound.PLAY_FINISHED,
  5898. this._cleanUp(),
  5899. !0
  5900. },
  5901. t.setMasterVolume = function() {
  5902. return this._updateVolume(),
  5903. !0
  5904. },
  5905. t.setVolume = function(e) {
  5906. return this.volume = e,
  5907. !0
  5908. },
  5909. t._updateVolume = function() {
  5910. if (null != this.tag) {
  5911. var e = this._muted || createjs.Sound._masterMute ? 0 : this._volume * createjs.Sound._masterVolume;
  5912. return e != this.tag.volume && (this.tag.volume = e),
  5913. !0
  5914. }
  5915. return ! 1
  5916. },
  5917. t.getVolume = function() {
  5918. return this.volume
  5919. },
  5920. t.setMasterMute = function() {
  5921. return this._updateVolume(),
  5922. !0
  5923. },
  5924. t.setMute = function(e) {
  5925. return null == e || void 0 == e ? !1 : (this._muted = e, this._updateVolume(), !0)
  5926. },
  5927. t.getMute = function() {
  5928. return this._muted
  5929. },
  5930. t.setPan = function() {
  5931. return ! 1
  5932. },
  5933. t.getPan = function() {
  5934. return 0
  5935. },
  5936. t.getPosition = function() {
  5937. return null == this.tag ? this._offset: 1e3 * this.tag.currentTime
  5938. },
  5939. t.setPosition = function(e) {
  5940. if (null == this.tag) this._offset = e;
  5941. else {
  5942. this.tag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this.loopHandler, !1);
  5943. try {
  5944. this.tag.currentTime = .001 * e
  5945. } catch(t) {
  5946. return ! 1
  5947. }
  5948. this.tag.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this.loopHandler, !1)
  5949. }
  5950. return ! 0
  5951. },
  5952. t.getDuration = function() {
  5953. return this._duration
  5954. },
  5955. t._handleSoundComplete = function() {
  5956. this._offset = 0,
  5957. null != window.createjs && (this.playState = createjs.Sound.PLAY_FINISHED, this._cleanUp(), this._sendEvent("complete"))
  5958. },
  5959. t.handleSoundLoop = function() {
  5960. this._offset = 0,
  5961. this._remainingLoops--,
  5962. 0 == this._remainingLoops && (this.tag.loop = !1, this.tag.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this.loopHandler, !1)),
  5963. this._sendEvent("loop")
  5964. },
  5965. t.playFailed = function() {
  5966. null != window.createjs && (this.playState = createjs.Sound.PLAY_FAILED, this._cleanUp(), this._sendEvent("failed"))
  5967. },
  5968. t.toString = function() {
  5969. return "[HTMLAudioPlugin SoundInstance]"
  5970. },
  5971. createjs.HTMLAudioPlugin.SoundInstance = e
  5972. } (),
  5973. function() {
  5974. function e(e, t) {
  5975. this._init(e, t)
  5976. }
  5977. var t = e.prototype;
  5978. t.src = null,
  5979. t.tag = null,
  5980. t.preloadTimer = null,
  5981. t.loadedHandler = null,
  5982. t._init = function(e, t) {
  5983. if (this.src = e, this.tag = t, this.preloadTimer = setInterval(createjs.proxy(this.preloadTick, this), 200), this.loadedHandler = createjs.proxy(this.sendLoadedEvent, this), this.tag.addEventListener && this.tag.addEventListener("canplaythrough", this.loadedHandler), null == this.tag.onreadystatechange) this.tag.onreadystatechange = createjs.proxy(this.sendLoadedEvent, this);
  5984. else {
  5985. var n = this.tag.onreadystatechange;
  5986. this.tag.onreadystatechange = function() {
  5987. n(),
  5988. this.tag.onreadystatechange = createjs.proxy(this.sendLoadedEvent, this)
  5989. }
  5990. }
  5991. this.tag.preload = "auto",
  5992. this.tag.load()
  5993. },
  5994. t.preloadTick = function() {
  5995. var e = this.tag.buffered,
  5996. t = this.tag.duration;
  5997. e.length > 0 && e.end(0) >= t - 1 && this.handleTagLoaded()
  5998. },
  5999. t.handleTagLoaded = function() {
  6000. clearInterval(this.preloadTimer)
  6001. },
  6002. t.sendLoadedEvent = function() {
  6003. this.tag.removeEventListener && this.tag.removeEventListener("canplaythrough", this.loadedHandler),
  6004. this.tag.onreadystatechange = null,
  6005. createjs.Sound._sendFileLoadEvent(this.src)
  6006. },
  6007. t.toString = function() {
  6008. return "[HTMLAudioPlugin Loader]"
  6009. },
  6010. createjs.HTMLAudioPlugin.Loader = e
  6011. } (),
  6012. function() {
  6013. function e(e) {
  6014. this._init(e)
  6015. }
  6016. var t = e;
  6017. t.tags = {},
  6018. t.get = function(n) {
  6019. var r = t.tags[n];
  6020. return null == r && (r = t.tags[n] = new e(n)),
  6021. r
  6022. },
  6023. t.remove = function(e) {
  6024. var n = t.tags[e];
  6025. return null == n ? !1 : (n.removeAll(), delete t.tags[e], !0)
  6026. },
  6027. t.removeAll = function() {
  6028. for (var e in t.tags) t.tags[e].removeAll();
  6029. t.tags = {}
  6030. },
  6031. t.getInstance = function(e) {
  6032. var n = t.tags[e];
  6033. return null == n ? null: n.get()
  6034. },
  6035. t.setInstance = function(e, n) {
  6036. var r = t.tags[e];
  6037. return null == r ? null: r.set(n)
  6038. },
  6039. t.checkSrc = function(e) {
  6040. var n = t.tags[e];
  6041. return null == n ? null: (n.checkSrcChange(), void 0)
  6042. };
  6043. var n = e.prototype;
  6044. n.src = null,
  6045. n.length = 0,
  6046. n.available = 0,
  6047. n.tags = null,
  6048. n._init = function(e) {
  6049. this.src = e,
  6050. this.tags = []
  6051. },
  6052. n.add = function(e) {
  6053. this.tags.push(e),
  6054. this.length++,
  6055. this.available++
  6056. },
  6057. n.removeAll = function() {
  6058. for (; this.length--;) delete this.tags[this.length];
  6059. this.src = null,
  6060. this.tags.length = 0
  6061. },
  6062. n.get = function() {
  6063. if (0 == this.tags.length) return null;
  6064. this.available = this.tags.length;
  6065. var e = this.tags.pop();
  6066. return null == e.parentNode && document.body.appendChild(e),
  6067. e
  6068. },
  6069. n.set = function(e) {
  6070. var t = createjs.indexOf(this.tags, e); - 1 == t && this.tags.push(e),
  6071. this.available = this.tags.length
  6072. },
  6073. n.checkSrcChange = function() {
  6074. for (var e = this.tags.length - 1,
  6075. t = this.tags[e].src; e--;) this.tags[e].src = t
  6076. },
  6077. n.toString = function() {
  6078. return "[HTMLAudioPlugin TagPool]"
  6079. },
  6080. createjs.HTMLAudioPlugin.TagPool = e
  6081. } (), define("soundjs",
  6082. function(e) {
  6083. return function() {
  6084. var t, n;
  6085. return t || e.createjs
  6086. }
  6087. } (this)), define("Sound+MuteDispatcher", ["soundjs"],
  6088. function(e) {
  6089. var t = e.Sound.setMute;
  6090. e.Sound.setMute = function(n) {
  6091. this.getMute() != n && (t.call(this, n), this.dispatchEvent(new e.Event("mute")))
  6092. }
  6093. }), define("screens/MainMenuScreen", ["require", "Screen", "assetStorage", "gui/ToggleButton", "gui/Button", "gui/ToggleButtonBitmapRenderer", "gui/BitmapButton", "screens/InfoPopUp", "Sound+MuteDispatcher", "soundjs", "screenSize"],
  6094. function(e) {
  6095. var t = e("Screen"),
  6096. n = e("assetStorage"),
  6097. r = e("gui/ToggleButton"),
  6098. i = e("gui/Button"),
  6099. s = e("gui/ToggleButtonBitmapRenderer"),
  6100. o = e("gui/BitmapButton"),
  6101. u = e("screens/InfoPopUp"),
  6102. a = e("Sound+MuteDispatcher"),
  6103. f = e("soundjs"),
  6104. l = e("screenSize"),
  6105. c = function() {
  6106. this.init()
  6107. },
  6108. h = c.prototype = new t;
  6109. return h._build = function() {
  6110. var e = n.getBitmap("gfx/bigPlayButton.png"),
  6111. t = o.createButton({
  6112. x: l.width / 2,
  6113. y: l.height / 2,
  6114. anchorX: .5,
  6115. anchorY: .5,
  6116. flags: {
  6117. "default": {
  6118. active: e
  6119. }
  6120. }
  6121. });
  6122. t.on("click",
  6123. function() {
  6124. this.getScreenController().goToScreen("gameScreen")
  6125. },
  6126. this),
  6127. this.addChild(t);
  6128. var i = n.getBitmap("gfx/logo.png");
  6129. i.x = (l.width - i.getBounds().width) / 2,
  6130. i.y = (t.y - i.getBounds().height - 60) / 2,
  6131. i.mouseEnabled = !1,
  6132. this.addChild(i);
  6133. var u = o.createButton({
  6134. x: t.x + 125,
  6135. y: t.y + 150,
  6136. anchorX: .5,
  6137. anchorY: .5,
  6138. flags: {
  6139. "default": {
  6140. active: n.getBitmap("gfx/infoButton.png")
  6141. }
  6142. }
  6143. });
  6144. this.addChild(u),
  6145. u.on("click",
  6146. function(e) {
  6147. this._showInfoPopUp()
  6148. },
  6149. this);
  6150. var a = new s;
  6151. a.setFlagBitmaps({
  6152. "default": {
  6153. idle: {
  6154. idle: n.getBitmap("gfx/muteButton.png")
  6155. },
  6156. selected: {
  6157. idle: n.getBitmap("gfx/unmuteButton.png")
  6158. }
  6159. }
  6160. }),
  6161. a.setAnchors(.5, .5);
  6162. var c = new r;
  6163. c.setRenderer(a),
  6164. c.x = t.x - 125,
  6165. c.y = t.y + 150,
  6166. c.setSelected(f.Sound.getMute()),
  6167. c.on("change",
  6168. function(e) {
  6169. f.Sound.setMute(c.getSelected())
  6170. }),
  6171. this.addChild(c)
  6172. },
  6173. h._showInfoPopUp = function() {
  6174. if (this._infoPopUp) return;
  6175. var e = new u;
  6176. e.show(this);
  6177. var t = e.on("click",
  6178. function(e) {
  6179. this._infoPopUp.hide(),
  6180. this._infoPopUp.off("click", t),
  6181. this._infoPopUp = null
  6182. },
  6183. this);
  6184. this._infoPopUp = e
  6185. },
  6186. h._infoPopUp = null,
  6187. c
  6188. }), this.createjs = this.createjs || {},
  6189. function() {
  6190. var e = function(e, t, n) {
  6191. this.initialize(e, t, n)
  6192. },
  6193. t = e.prototype;
  6194. t.type = null,
  6195. t.target = null,
  6196. t.currentTarget = null,
  6197. t.eventPhase = 0,
  6198. t.bubbles = !1,
  6199. t.cancelable = !1,
  6200. t.timeStamp = 0,
  6201. t.defaultPrevented = !1,
  6202. t.propagationStopped = !1,
  6203. t.immediatePropagationStopped = !1,
  6204. t.removed = !1,
  6205. t.initialize = function(e, t, n) {
  6206. this.type = e,
  6207. this.bubbles = t,
  6208. this.cancelable = n,
  6209. this.timeStamp = (new Date).getTime()
  6210. },
  6211. t.preventDefault = function() {
  6212. this.defaultPrevented = !0
  6213. },
  6214. t.stopPropagation = function() {
  6215. this.propagationStopped = !0
  6216. },
  6217. t.stopImmediatePropagation = function() {
  6218. this.immediatePropagationStopped = this.propagationStopped = !0
  6219. },
  6220. t.remove = function() {
  6221. this.removed = !0
  6222. },
  6223. t.clone = function() {
  6224. return new e(this.type, this.bubbles, this.cancelable)
  6225. },
  6226. t.toString = function() {
  6227. return "[Event (type=" + this.type + ")]"
  6228. },
  6229. createjs.Event = e
  6230. } (), this.createjs = this.createjs || {},
  6231. function() {
  6232. var e = function() {},
  6233. t = e.prototype;
  6234. e.initialize = function(e) {
  6235. e.addEventListener = t.addEventListener,
  6236. e.on = t.on,
  6237. e.removeEventListener = e.off = t.removeEventListener,
  6238. e.removeAllEventListeners = t.removeAllEventListeners,
  6239. e.hasEventListener = t.hasEventListener,
  6240. e.dispatchEvent = t.dispatchEvent,
  6241. e._dispatchEvent = t._dispatchEvent,
  6242. e.willTrigger = t.willTrigger
  6243. },
  6244. t._listeners = null,
  6245. t._captureListeners = null,
  6246. t.initialize = function() {},
  6247. t.addEventListener = function(e, t, n) {
  6248. var r;
  6249. r = n ? this._captureListeners = this._captureListeners || {}: this._listeners = this._listeners || {};
  6250. var i = r[e];
  6251. return i && this.removeEventListener(e, t, n),
  6252. i = r[e],
  6253. i ? i.push(t) : r[e] = [t],
  6254. t
  6255. },
  6256. t.on = function(e, t, n, r, i, s) {
  6257. return t.handleEvent && (n = n || t, t = t.handleEvent),
  6258. n = n || this,
  6259. this.addEventListener(e,
  6260. function(e) {
  6261. t.call(n, e, i),
  6262. r && e.remove()
  6263. },
  6264. s)
  6265. },
  6266. t.removeEventListener = function(e, t, n) {
  6267. var r = n ? this._captureListeners: this._listeners;
  6268. if (r) {
  6269. var i = r[e];
  6270. if (i) for (var s = 0,
  6271. o = i.length; o > s; s++) if (i[s] == t) {
  6272. 1 == o ? delete r[e] : i.splice(s, 1);
  6273. break
  6274. }
  6275. }
  6276. },
  6277. t.off = t.removeEventListener,
  6278. t.removeAllEventListeners = function(e) {
  6279. e ? (this._listeners && delete this._listeners[e], this._captureListeners && delete this._captureListeners[e]) : this._listeners = this._captureListeners = null
  6280. },
  6281. t.dispatchEvent = function(e, t) {
  6282. if ("string" == typeof e) {
  6283. var n = this._listeners;
  6284. if (!n || !n[e]) return ! 1;
  6285. e = new createjs.Event(e)
  6286. }
  6287. if (e.target = t || this, e.bubbles && this.parent) {
  6288. for (var r = this,
  6289. i = [r]; r.parent;) i.push(r = r.parent);
  6290. var s, o = i.length;
  6291. for (s = o - 1; s >= 0 && !e.propagationStopped; s--) i[s]._dispatchEvent(e, 1 + (0 == s));
  6292. for (s = 1; o > s && !e.propagationStopped; s++) i[s]._dispatchEvent(e, 3)
  6293. } else this._dispatchEvent(e, 2);
  6294. return e.defaultPrevented
  6295. },
  6296. t.hasEventListener = function(e) {
  6297. var t = this._listeners,
  6298. n = this._captureListeners;
  6299. return !! (t && t[e] || n && n[e])
  6300. },
  6301. t.willTrigger = function(e) {
  6302. for (var t = this; t;) {
  6303. if (t.hasEventListener(e)) return ! 0;
  6304. t = t.parent
  6305. }
  6306. return ! 1
  6307. },
  6308. t.toString = function() {
  6309. return "[EventDispatcher]"
  6310. },
  6311. t._dispatchEvent = function(e, t) {
  6312. var n, r = 1 == t ? this._captureListeners: this._listeners;
  6313. if (e && r) {
  6314. var i = r[e.type];
  6315. if (!i || !(n = i.length)) return;
  6316. e.currentTarget = this,
  6317. e.eventPhase = t,
  6318. e.removed = !1,
  6319. i = i.slice();
  6320. for (var s = 0; n > s && !e.immediatePropagationStopped; s++) {
  6321. var o = i[s];
  6322. o.handleEvent ? o.handleEvent(e) : o(e),
  6323. e.removed && (this.off(e.type, o, 1 == t), e.removed = !1)
  6324. }
  6325. }
  6326. },
  6327. createjs.EventDispatcher = e
  6328. } (), this.createjs = this.createjs || {},
  6329. function() {
  6330. var e = function(e, t, n) {
  6331. this.initialize(e, t, n)
  6332. },
  6333. t = e.prototype = new createjs.EventDispatcher;
  6334. e.NONE = 0,
  6335. e.LOOP = 1,
  6336. e.REVERSE = 2,
  6337. e.IGNORE = {},
  6338. e._tweens = [],
  6339. e._plugins = {},
  6340. e.get = function(t, n, r, i) {
  6341. return i && e.removeTweens(t),
  6342. new e(t, n, r)
  6343. },
  6344. e.tick = function(t, n) {
  6345. for (var r = e._tweens.slice(), i = r.length - 1; i >= 0; i--) {
  6346. var s = r[i];
  6347. n && !s.ignoreGlobalPause || s._paused || s.tick(s._useTicks ? 1 : t)
  6348. }
  6349. },
  6350. e.handleEvent = function(e) {
  6351. "tick" == e.type && this.tick(e.delta, e.paused)
  6352. },
  6353. e.removeTweens = function(t) {
  6354. if (t.tweenjs_count) {
  6355. for (var n = e._tweens,
  6356. r = n.length - 1; r >= 0; r--) n[r]._target == t && (n[r]._paused = !0, n.splice(r, 1));
  6357. t.tweenjs_count = 0
  6358. }
  6359. },
  6360. e.removeAllTweens = function() {
  6361. for (var t = e._tweens,
  6362. n = 0,
  6363. r = t.length; r > n; n++) {
  6364. var i = t[n];
  6365. i.paused = !0,
  6366. i.target.tweenjs_count = 0
  6367. }
  6368. t.length = 0
  6369. },
  6370. e.hasActiveTweens = function(t) {
  6371. return t ? t.tweenjs_count: e._tweens && !!e._tweens.length
  6372. },
  6373. e.installPlugin = function(t, n) {
  6374. var r = t.priority;
  6375. null == r && (t.priority = r = 0);
  6376. for (var i = 0,
  6377. s = n.length,
  6378. o = e._plugins; s > i; i++) {
  6379. var u = n[i];
  6380. if (o[u]) {
  6381. for (var f = o[u], l = 0, c = f.length; c > l && !(r < f[l].priority); l++);
  6382. o[u].splice(l, 0, t)
  6383. } else o[u] = [t]
  6384. }
  6385. },
  6386. e._register = function(t, n) {
  6387. var r = t._target,
  6388. i = e._tweens;
  6389. if (n) r && (r.tweenjs_count = r.tweenjs_count ? r.tweenjs_count + 1 : 1),
  6390. i.push(t),
  6391. !e._inited && createjs.Ticker && (createjs.Ticker.addEventListener("tick", e), e._inited = !0);
  6392. else {
  6393. r && r.tweenjs_count--;
  6394. for (var s = i.length; s--;) if (i[s] == t) return i.splice(s, 1),
  6395. void 0
  6396. }
  6397. },
  6398. t.ignoreGlobalPause = !1,
  6399. t.loop = !1,
  6400. t.duration = 0,
  6401. t.pluginData = null,
  6402. t.target = null,
  6403. t.position = null,
  6404. t.passive = !1,
  6405. t._paused = !1,
  6406. t._curQueueProps = null,
  6407. t._initQueueProps = null,
  6408. t._steps = null,
  6409. t._actions = null,
  6410. t._prevPosition = 0,
  6411. t._stepPosition = 0,
  6412. t._prevPos = -1,
  6413. t._target = null,
  6414. t._useTicks = !1,
  6415. t._inited = !1,
  6416. t.initialize = function(t, n, r) {
  6417. this.target = this._target = t,
  6418. n && (this._useTicks = n.useTicks, this.ignoreGlobalPause = n.ignoreGlobalPause, this.loop = n.loop, n.onChange && this.addEventListener("change", n.onChange), n.override && e.removeTweens(t)),
  6419. this.pluginData = r || {},
  6420. this._curQueueProps = {},
  6421. this._initQueueProps = {},
  6422. this._steps = [],
  6423. this._actions = [],
  6424. n && n.paused ? this._paused = !0 : e._register(this, !0),
  6425. n && null != n.position && this.setPosition(n.position, e.NONE)
  6426. },
  6427. t.wait = function(e, t) {
  6428. if (null == e || 0 >= e) return this;
  6429. var n = this._cloneProps(this._curQueueProps);
  6430. return this._addStep({
  6431. d: e,
  6432. p0: n,
  6433. e: this._linearEase,
  6434. p1: n,
  6435. v: t
  6436. })
  6437. },
  6438. t.to = function(e, t, n) {
  6439. return (isNaN(t) || 0 > t) && (t = 0),
  6440. this._addStep({
  6441. d: t || 0,
  6442. p0: this._cloneProps(this._curQueueProps),
  6443. e: n,
  6444. p1: this._cloneProps(this._appendQueueProps(e))
  6445. })
  6446. },
  6447. t.call = function(e, t, n) {
  6448. return this._addAction({
  6449. f: e,
  6450. p: t ? t: [this],
  6451. o: n ? n: this._target
  6452. })
  6453. },
  6454. t.set = function(e, t) {
  6455. return this._addAction({
  6456. f: this._set,
  6457. o: this,
  6458. p: [e, t ? t: this._target]
  6459. })
  6460. },
  6461. t.play = function(e) {
  6462. return e || (e = this),
  6463. this.call(e.setPaused, [!1], e)
  6464. },
  6465. t.pause = function(e) {
  6466. return e || (e = this),
  6467. this.call(e.setPaused, [!0], e)
  6468. },
  6469. t.setPosition = function(e, t) {
  6470. 0 > e && (e = 0),
  6471. null == t && (t = 1);
  6472. var n = e,
  6473. r = !1;
  6474. if (n >= this.duration && (this.loop ? n %= this.duration: (n = this.duration, r = !0)), n == this._prevPos) return r;
  6475. var i = this._prevPos;
  6476. if (this.position = this._prevPos = n, this._prevPosition = e, this._target) if (r) this._updateTargetProps(null, 1);
  6477. else if (this._steps.length > 0) {
  6478. for (var s = 0,
  6479. o = this._steps.length; o > s && !(this._steps[s].t > n); s++);
  6480. var u = this._steps[s - 1];
  6481. this._updateTargetProps(u, (this._stepPosition = n - u.t) / u.d)
  6482. }
  6483. return 0 != t && this._actions.length > 0 && (this._useTicks ? this._runActions(n, n) : 1 == t && i > n ? (i != this.duration && this._runActions(i, this.duration), this._runActions(0, n, !0)) : this._runActions(i, n)),
  6484. r && this.setPaused(!0),
  6485. this.dispatchEvent("change"),
  6486. r
  6487. },
  6488. t.tick = function(e) {
  6489. this._paused || this.setPosition(this._prevPosition + e)
  6490. },
  6491. t.setPaused = function(t) {
  6492. return this._paused = !!t,
  6493. e._register(this, !t),
  6494. this
  6495. },
  6496. t.w = t.wait,
  6497. t.t = t.to,
  6498. t.c = t.call,
  6499. t.s = t.set,
  6500. t.toString = function() {
  6501. return "[Tween]"
  6502. },
  6503. t.clone = function() {
  6504. throw "Tween can not be cloned."
  6505. },
  6506. t._updateTargetProps = function(t, n) {
  6507. var r, i, s, o, u, f;
  6508. if (t || 1 != n) {
  6509. if (this.passive = !!t.v, this.passive) return;
  6510. t.e && (n = t.e(n, 0, 1, 1)),
  6511. r = t.p0,
  6512. i = t.p1
  6513. } else this.passive = !1,
  6514. r = i = this._curQueueProps;
  6515. for (var l in this._initQueueProps) {
  6516. null == (o = r[l]) && (r[l] = o = this._initQueueProps[l]),
  6517. null == (u = i[l]) && (i[l] = u = o),
  6518. s = o == u || 0 == n || 1 == n || "number" != typeof o ? 1 == n ? u: o: o + (u - o) * n;
  6519. var c = !1;
  6520. if (f = e._plugins[l]) for (var h = 0,
  6521. p = f.length; p > h; h++) {
  6522. var d = f[h].tween(this, l, s, r, i, n, !!t && r == i, !t);
  6523. d == e.IGNORE ? c = !0 : s = d
  6524. }
  6525. c || (this._target[l] = s)
  6526. }
  6527. },
  6528. t._runActions = function(e, t, n) {
  6529. var r = e,
  6530. i = t,
  6531. s = -1,
  6532. o = this._actions.length,
  6533. u = 1;
  6534. for (e > t && (r = t, i = e, s = o, o = u = -1); (s += u) != o;) {
  6535. var a = this._actions[s],
  6536. f = a.t; (f == i || f > r && i > f || n && f == e) && a.f.apply(a.o, a.p)
  6537. }
  6538. },
  6539. t._appendQueueProps = function(t) {
  6540. var n, r, i, s, o;
  6541. for (var u in t) if (void 0 === this._initQueueProps[u]) {
  6542. if (r = this._target[u], n = e._plugins[u]) for (i = 0, s = n.length; s > i; i++) r = n[i].init(this, u, r);
  6543. this._initQueueProps[u] = this._curQueueProps[u] = void 0 === r ? null: r
  6544. } else r = this._curQueueProps[u];
  6545. for (var u in t) {
  6546. if (r = this._curQueueProps[u], n = e._plugins[u]) for (o = o || {},
  6547. i = 0, s = n.length; s > i; i++) n[i].step && n[i].step(this, u, r, t[u], o);
  6548. this._curQueueProps[u] = t[u]
  6549. }
  6550. return o && this._appendQueueProps(o),
  6551. this._curQueueProps
  6552. },
  6553. t._cloneProps = function(e) {
  6554. var t = {};
  6555. for (var n in e) t[n] = e[n];
  6556. return t
  6557. },
  6558. t._addStep = function(e) {
  6559. return e.d > 0 && (this._steps.push(e), e.t = this.duration, this.duration += e.d),
  6560. this
  6561. },
  6562. t._addAction = function(e) {
  6563. return e.t = this.duration,
  6564. this._actions.push(e),
  6565. this
  6566. },
  6567. t._set = function(e, t) {
  6568. for (var n in e) t[n] = e[n]
  6569. },
  6570. createjs.Tween = e
  6571. } (), this.createjs = this.createjs || {},
  6572. function() {
  6573. var e = function(e, t, n) {
  6574. this.initialize(e, t, n)
  6575. },
  6576. t = e.prototype = new createjs.EventDispatcher;
  6577. t.ignoreGlobalPause = !1,
  6578. t.duration = 0,
  6579. t.loop = !1,
  6580. t.position = null,
  6581. t._paused = !1,
  6582. t._tweens = null,
  6583. t._labels = null,
  6584. t._labelList = null,
  6585. t._prevPosition = 0,
  6586. t._prevPos = -1,
  6587. t._useTicks = !1,
  6588. t.initialize = function(e, t, n) {
  6589. this._tweens = [],
  6590. n && (this._useTicks = n.useTicks, this.loop = n.loop, this.ignoreGlobalPause = n.ignoreGlobalPause, n.onChange && this.addEventListener("change", n.onChange)),
  6591. e && this.addTween.apply(this, e),
  6592. this.setLabels(t),
  6593. n && n.paused ? this._paused = !0 : createjs.Tween._register(this, !0),
  6594. n && null != n.position && this.setPosition(n.position, createjs.Tween.NONE)
  6595. },
  6596. t.addTween = function(e) {
  6597. var t = arguments.length;
  6598. if (t > 1) {
  6599. for (var n = 0; t > n; n++) this.addTween(arguments[n]);
  6600. return arguments[0]
  6601. }
  6602. return 0 == t ? null: (this.removeTween(e), this._tweens.push(e), e.setPaused(!0), e._paused = !1, e._useTicks = this._useTicks, e.duration > this.duration && (this.duration = e.duration), this._prevPos >= 0 && e.setPosition(this._prevPos, createjs.Tween.NONE), e)
  6603. },
  6604. t.removeTween = function(e) {
  6605. var t = arguments.length;
  6606. if (t > 1) {
  6607. for (var n = !0,
  6608. r = 0; t > r; r++) n = n && this.removeTween(arguments[r]);
  6609. return n
  6610. }
  6611. if (0 == t) return ! 1;
  6612. for (var i = this._tweens,
  6613. r = i.length; r--;) if (i[r] == e) return i.splice(r, 1),
  6614. e.duration >= this.duration && this.updateDuration(),
  6615. !0;
  6616. return ! 1
  6617. },
  6618. t.addLabel = function(e, t) {
  6619. this._labels[e] = t;
  6620. var n = this._labelList;
  6621. if (n) {
  6622. for (var r = 0,
  6623. i = n.length; i > r && !(t < n[r].position); r++);
  6624. n.splice(r, 0, {
  6625. label: e,
  6626. position: t
  6627. })
  6628. }
  6629. },
  6630. t.setLabels = function(e) {
  6631. this._labels = e ? e: {}
  6632. },
  6633. t.getLabels = function() {
  6634. var e = this._labelList;
  6635. if (!e) {
  6636. e = this._labelList = [];
  6637. var t = this._labels;
  6638. for (var n in t) e.push({
  6639. label: n,
  6640. position: t[n]
  6641. });
  6642. e.sort(function(e, t) {
  6643. return e.position - t.position
  6644. })
  6645. }
  6646. return e
  6647. },
  6648. t.getCurrentLabel = function() {
  6649. var e = this.getLabels(),
  6650. t = this.position,
  6651. n = e.length;
  6652. if (n) {
  6653. for (var r = 0; n > r && !(t < e[r].position); r++);
  6654. return 0 == r ? null: e[r - 1].label
  6655. }
  6656. return null
  6657. },
  6658. t.gotoAndPlay = function(e) {
  6659. this.setPaused(!1),
  6660. this._goto(e)
  6661. },
  6662. t.gotoAndStop = function(e) {
  6663. this.setPaused(!0),
  6664. this._goto(e)
  6665. },
  6666. t.setPosition = function(e, t) {
  6667. 0 > e && (e = 0);
  6668. var n = this.loop ? e % this.duration: e,
  6669. r = !this.loop && e >= this.duration;
  6670. if (n == this._prevPos) return r;
  6671. this._prevPosition = e,
  6672. this.position = this._prevPos = n;
  6673. for (var i = 0,
  6674. s = this._tweens.length; s > i; i++) if (this._tweens[i].setPosition(n, t), n != this._prevPos) return ! 1;
  6675. return r && this.setPaused(!0),
  6676. this.dispatchEvent("change"),
  6677. r
  6678. },
  6679. t.setPaused = function(e) {
  6680. this._paused = !!e,
  6681. createjs.Tween._register(this, !e)
  6682. },
  6683. t.updateDuration = function() {
  6684. this.duration = 0;
  6685. for (var e = 0,
  6686. t = this._tweens.length; t > e; e++) {
  6687. var n = this._tweens[e];
  6688. n.duration > this.duration && (this.duration = n.duration)
  6689. }
  6690. },
  6691. t.tick = function(e) {
  6692. this.setPosition(this._prevPosition + e)
  6693. },
  6694. t.resolve = function(e) {
  6695. var t = parseFloat(e);
  6696. return isNaN(t) && (t = this._labels[e]),
  6697. t
  6698. },
  6699. t.toString = function() {
  6700. return "[Timeline]"
  6701. },
  6702. t.clone = function() {
  6703. throw "Timeline can not be cloned."
  6704. },
  6705. t._goto = function(e) {
  6706. var t = this.resolve(e);
  6707. null != t && this.setPosition(t)
  6708. },
  6709. createjs.Timeline = e
  6710. } (), this.createjs = this.createjs || {},
  6711. function() {
  6712. var e = function() {
  6713. throw "Ease cannot be instantiated."
  6714. };
  6715. e.linear = function(e) {
  6716. return e
  6717. },
  6718. e.none = e.linear,
  6719. e.get = function(e) {
  6720. return - 1 > e && (e = -1),
  6721. e > 1 && (e = 1),
  6722. function(t) {
  6723. return 0 == e ? t: 0 > e ? t * (t * -e + 1 + e) : t * ((2 - t) * e + (1 - e))
  6724. }
  6725. },
  6726. e.getPowIn = function(e) {
  6727. return function(t) {
  6728. return Math.pow(t, e)
  6729. }
  6730. },
  6731. e.getPowOut = function(e) {
  6732. return function(t) {
  6733. return 1 - Math.pow(1 - t, e)
  6734. }
  6735. },
  6736. e.getPowInOut = function(e) {
  6737. return function(t) {
  6738. return (t *= 2) < 1 ? .5 * Math.pow(t, e) : 1 - .5 * Math.abs(Math.pow(2 - t, e))
  6739. }
  6740. },
  6741. e.quadIn = e.getPowIn(2),
  6742. e.quadOut = e.getPowOut(2),
  6743. e.quadInOut = e.getPowInOut(2),
  6744. e.cubicIn = e.getPowIn(3),
  6745. e.cubicOut = e.getPowOut(3),
  6746. e.cubicInOut = e.getPowInOut(3),
  6747. e.quartIn = e.getPowIn(4),
  6748. e.quartOut = e.getPowOut(4),
  6749. e.quartInOut = e.getPowInOut(4),
  6750. e.quintIn = e.getPowIn(5),
  6751. e.quintOut = e.getPowOut(5),
  6752. e.quintInOut = e.getPowInOut(5),
  6753. e.sineIn = function(e) {
  6754. return 1 - Math.cos(e * Math.PI / 2)
  6755. },
  6756. e.sineOut = function(e) {
  6757. return Math.sin(e * Math.PI / 2)
  6758. },
  6759. e.sineInOut = function(e) {
  6760. return - 0.5 * (Math.cos(Math.PI * e) - 1)
  6761. },
  6762. e.getBackIn = function(e) {
  6763. return function(t) {
  6764. return t * t * ((e + 1) * t - e)
  6765. }
  6766. },
  6767. e.backIn = e.getBackIn(1.7),
  6768. e.getBackOut = function(e) {
  6769. return function(t) {
  6770. return--t * t * ((e + 1) * t + e) + 1
  6771. }
  6772. },
  6773. e.backOut = e.getBackOut(1.7),
  6774. e.getBackInOut = function(e) {
  6775. return e *= 1.525,
  6776. function(t) {
  6777. return (t *= 2) < 1 ? .5 * t * t * ((e + 1) * t - e) : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2)
  6778. }
  6779. },
  6780. e.backInOut = e.getBackInOut(1.7),
  6781. e.circIn = function(e) {
  6782. return - (Math.sqrt(1 - e * e) - 1)
  6783. },
  6784. e.circOut = function(e) {
  6785. return Math.sqrt(1 - --e * e)
  6786. },
  6787. e.circInOut = function(e) {
  6788. return (e *= 2) < 1 ? -0.5 * (Math.sqrt(1 - e * e) - 1) : .5 * (Math.sqrt(1 - (e -= 2) * e) + 1)
  6789. },
  6790. e.bounceIn = function(t) {
  6791. return 1 - e.bounceOut(1 - t)
  6792. },
  6793. e.bounceOut = function(e) {
  6794. return 1 / 2.75 > e ? 7.5625 * e * e: 2 / 2.75 > e ? 7.5625 * (e -= 1.5 / 2.75) * e + .75 : 2.5 / 2.75 > e ? 7.5625 * (e -= 2.25 / 2.75) * e + .9375 : 7.5625 * (e -= 2.625 / 2.75) * e + .984375
  6795. },
  6796. e.bounceInOut = function(t) {
  6797. return.5 > t ? .5 * e.bounceIn(2 * t) : .5 * e.bounceOut(2 * t - 1) + .5
  6798. },
  6799. e.getElasticIn = function(e, t) {
  6800. var n = 2 * Math.PI;
  6801. return function(r) {
  6802. if (0 == r || 1 == r) return r;
  6803. var i = t / n * Math.asin(1 / e);
  6804. return - (e * Math.pow(2, 10 * (r -= 1)) * Math.sin((r - i) * n / t))
  6805. }
  6806. },
  6807. e.elasticIn = e.getElasticIn(1, .3),
  6808. e.getElasticOut = function(e, t) {
  6809. var n = 2 * Math.PI;
  6810. return function(r) {
  6811. if (0 == r || 1 == r) return r;
  6812. var i = t / n * Math.asin(1 / e);
  6813. return e * Math.pow(2, -10 * r) * Math.sin((r - i) * n / t) + 1
  6814. }
  6815. },
  6816. e.elasticOut = e.getElasticOut(1, .3),
  6817. e.getElasticInOut = function(e, t) {
  6818. var n = 2 * Math.PI;
  6819. return function(r) {
  6820. var i = t / n * Math.asin(1 / e);
  6821. return (r *= 2) < 1 ? -0.5 * e * Math.pow(2, 10 * (r -= 1)) * Math.sin((r - i) * n / t) : .5 * e * Math.pow(2, -10 * (r -= 1)) * Math.sin((r - i) * n / t) + 1
  6822. }
  6823. },
  6824. e.elasticInOut = e.getElasticInOut(1, .3 * 1.5),
  6825. createjs.Ease = e
  6826. } (), this.createjs = this.createjs || {},
  6827. function() {
  6828. var e = function() {
  6829. throw "MotionGuidePlugin cannot be instantiated."
  6830. };
  6831. e.priority = 0,
  6832. e._rotOffS,
  6833. e._rotOffE,
  6834. e._rotNormS,
  6835. e._rotNormE,
  6836. e.install = function() {
  6837. return createjs.Tween.installPlugin(e, ["guide", "x", "y", "rotation"]),
  6838. createjs.Tween.IGNORE
  6839. },
  6840. e.init = function(e, t, n) {
  6841. var r = e.target;
  6842. return r.hasOwnProperty("x") || (r.x = 0),
  6843. r.hasOwnProperty("y") || (r.y = 0),
  6844. r.hasOwnProperty("rotation") || (r.rotation = 0),
  6845. "rotation" == t && (e.__needsRot = !0),
  6846. "guide" == t ? null: n
  6847. },
  6848. e.step = function(t, n, r, i, s) {
  6849. if ("rotation" == n && (t.__rotGlobalS = r, t.__rotGlobalE = i, e.testRotData(t, s)), "guide" != n) return i;
  6850. var o, u = i;
  6851. u.hasOwnProperty("path") || (u.path = []);
  6852. var f = u.path;
  6853. if (u.hasOwnProperty("end") || (u.end = 1), u.hasOwnProperty("start") || (u.start = r && r.hasOwnProperty("end") && r.path === f ? r.end: 0), u.hasOwnProperty("_segments") && u._length) return i;
  6854. var l = f.length,
  6855. c = 10;
  6856. if (l >= 6 && 0 == (l - 2) % 4) {
  6857. u._segments = [],
  6858. u._length = 0;
  6859. for (var h = 2; l > h; h += 4) {
  6860. for (var p, d, v = f[h - 2], m = f[h - 1], g = f[h + 0], y = f[h + 1], b = f[h + 2], w = f[h + 3], E = v, S = m, x = 0, T = [], N = 1; c >= N; N++) {
  6861. var C = N / c,
  6862. k = 1 - C;
  6863. p = k * k * v + 2 * k * C * g + C * C * b,
  6864. d = k * k * m + 2 * k * C * y + C * C * w,
  6865. x += T[T.push(Math.sqrt((o = p - E) * o + (o = d - S) * o)) - 1],
  6866. E = p,
  6867. S = d
  6868. }
  6869. u._segments.push(x),
  6870. u._segments.push(T),
  6871. u._length += x
  6872. }
  6873. o = u.orient,
  6874. u.orient = !0;
  6875. var L = {};
  6876. return e.calc(u, u.start, L),
  6877. t.__rotPathS = Number(L.rotation.toFixed(5)),
  6878. e.calc(u, u.end, L),
  6879. t.__rotPathE = Number(L.rotation.toFixed(5)),
  6880. u.orient = !1,
  6881. e.calc(u, u.end, s),
  6882. u.orient = o,
  6883. u.orient ? (t.__guideData = u, e.testRotData(t, s), i) : i
  6884. }
  6885. throw "invalid 'path' data, please see documentation for valid paths"
  6886. },
  6887. e.testRotData = function(e, t) {
  6888. if (void 0 === e.__rotGlobalS || void 0 === e.__rotGlobalE) {
  6889. if (e.__needsRot) return;
  6890. e.__rotGlobalS = e.__rotGlobalE = void 0 !== e._curQueueProps.rotation ? e._curQueueProps.rotation: t.rotation = e.target.rotation || 0
  6891. }
  6892. if (void 0 !== e.__guideData) {
  6893. var n = e.__guideData,
  6894. r = e.__rotGlobalE - e.__rotGlobalS,
  6895. i = e.__rotPathE - e.__rotPathS,
  6896. s = r - i;
  6897. if ("auto" == n.orient) s > 180 ? s -= 360 : -180 > s && (s += 360);
  6898. else if ("cw" == n.orient) {
  6899. for (; 0 > s;) s += 360;
  6900. 0 == s && r > 0 && 180 != r && (s += 360)
  6901. } else if ("ccw" == n.orient) {
  6902. for (s = r - (i > 180 ? 360 - i: i); s > 0;) s -= 360;
  6903. 0 == s && 0 > r && -180 != r && (s -= 360)
  6904. }
  6905. n.rotDelta = s,
  6906. n.rotOffS = e.__rotGlobalS - e.__rotPathS,
  6907. e.__rotGlobalS = e.__rotGlobalE = e.__guideData = e.__needsRot = void 0
  6908. }
  6909. },
  6910. e.tween = function(t, n, r, i, s, o, u) {
  6911. var f = s.guide;
  6912. if (void 0 == f || f === i.guide) return r;
  6913. if (f.lastRatio != o) {
  6914. var l = (f.end - f.start) * (u ? f.end: o) + f.start;
  6915. switch (e.calc(f, l, t.target), f.orient) {
  6916. case "cw":
  6917. case "ccw":
  6918. case "auto":
  6919. t.target.rotation += f.rotOffS + f.rotDelta * o;
  6920. break;
  6921. case "fixed":
  6922. default:
  6923. t.target.rotation += f.rotOffS
  6924. }
  6925. f.lastRatio = o
  6926. }
  6927. return "rotation" != n || f.orient && "false" != f.orient ? t.target[n] : r
  6928. },
  6929. e.calc = function(t, n, r) {
  6930. void 0 == t._segments && e.validate(t),
  6931. void 0 == r && (r = {
  6932. x: 0,
  6933. y: 0,
  6934. rotation: 0
  6935. });
  6936. for (var i = t._segments,
  6937. s = t.path,
  6938. o = t._length * n,
  6939. u = i.length - 2,
  6940. f = 0; o > i[f] && u > f;) o -= i[f],
  6941. f += 2;
  6942. var l = i[f + 1],
  6943. c = 0;
  6944. for (u = l.length - 1; o > l[c] && u > c;) o -= l[c],
  6945. c++;
  6946. var h = c / ++u + o / (u * l[c]);
  6947. f = 2 * f + 2;
  6948. var p = 1 - h;
  6949. return r.x = p * p * s[f - 2] + 2 * p * h * s[f + 0] + h * h * s[f + 2],
  6950. r.y = p * p * s[f - 1] + 2 * p * h * s[f + 1] + h * h * s[f + 3],
  6951. t.orient && (r.rotation = 57.2957795 * Math.atan2((s[f + 1] - s[f - 1]) * p + (s[f + 3] - s[f + 1]) * h, (s[f + 0] - s[f - 2]) * p + (s[f + 2] - s[f + 0]) * h)),
  6952. r
  6953. },
  6954. createjs.MotionGuidePlugin = e
  6955. } (), this.createjs = this.createjs || {},
  6956. function() {
  6957. var e = createjs.TweenJS = createjs.TweenJS || {};
  6958. e.version = "0.5.1",
  6959. e.buildDate = "Thu, 12 Dec 2013 23:33:38 GMT"
  6960. } (), define("tweenjs",
  6961. function(e) {
  6962. return function() {
  6963. var t, n;
  6964. return t || e.createjs
  6965. }
  6966. } (this)), define("FSM", ["require"],
  6967. function(e) {
  6968. var t = function(e) {
  6969. this.init(e)
  6970. },
  6971. n = t.prototype;
  6972. return n.getPrevState = function() {
  6973. return this._prevState
  6974. },
  6975. n.getCurrState = function() {
  6976. return this._currState
  6977. },
  6978. n.init = function(e) {
  6979. this._newState = e
  6980. },
  6981. n.execute = function() {
  6982. this._newState && (this._newState.enter(), this._prevState = this._currState, this._currState = this._newState, this._newState = null),
  6983. this._newState = this._currState.execute(this),
  6984. this._newState && (this._currState.exit(), this._prevState = this._currState, this._currState = this._newState)
  6985. },
  6986. n._currState = null,
  6987. n._newState = null,
  6988. n._prevState = null,
  6989. t
  6990. }), define("State", ["require"],
  6991. function(e) {
  6992. var t = function(e, t, n) {
  6993. this.init(e, t, n)
  6994. };
  6995. t.new = function(e, t) {
  6996. var n = new Stats(e, t);
  6997. return n
  6998. };
  6999. var n = t.prototype;
  7000. return n.name = "",
  7001. n.init = function(e, t, n) {
  7002. this._conditions = [],
  7003. this._enterCallback = e,
  7004. this._exitCallback = t,
  7005. this.name = n === undefined ? "": n
  7006. },
  7007. n.addTransition = function(e, t, n) {
  7008. return this._conditions.push({
  7009. state: e,
  7010. conditionCallback: t,
  7011. scope: n
  7012. }),
  7013. this
  7014. },
  7015. n.enter = function() {
  7016. this._enterCallback && this._enterCallback.call()
  7017. },
  7018. n.exit = function() {
  7019. this._exitCallback && this._exitCallback.call()
  7020. },
  7021. n.execute = function(e) {
  7022. for (var t = 0; t < this._conditions.length; t++) if (this._conditions[t].conditionCallback.call(this._conditions[t].scope, e)) return this._conditions[t].state;
  7023. return null
  7024. },
  7025. n._conditions = null,
  7026. n._enterCallback = null,
  7027. n._exitCallback = null,
  7028. t
  7029. }),
  7030. function() {
  7031. var e = this,
  7032. t = e._,
  7033. n = {},
  7034. r = Array.prototype,
  7035. i = Object.prototype,
  7036. s = Function.prototype,
  7037. o = r.push,
  7038. u = r.slice,
  7039. a = r.concat,
  7040. f = i.toString,
  7041. l = i.hasOwnProperty,
  7042. c = r.forEach,
  7043. h = r.map,
  7044. p = r.reduce,
  7045. d = r.reduceRight,
  7046. v = r.filter,
  7047. m = r.every,
  7048. g = r.some,
  7049. y = r.indexOf,
  7050. b = r.lastIndexOf,
  7051. w = Array.isArray,
  7052. E = Object.keys,
  7053. S = s.bind,
  7054. x = function(e) {
  7055. return e instanceof x ? e: this instanceof x ? (this._wrapped = e, void 0) : new x(e)
  7056. };
  7057. "undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = x), exports._ = x) : e._ = x,
  7058. x.VERSION = "1.5.2";
  7059. var T = x.each = x.forEach = function(e, t, r) {
  7060. if (null != e) if (c && e.forEach === c) e.forEach(t, r);
  7061. else if (e.length === +e.length) {
  7062. for (var i = 0,
  7063. s = e.length; s > i; i++) if (t.call(r, e[i], i, e) === n) return
  7064. } else for (var o = x.keys(e), i = 0, s = o.length; s > i; i++) if (t.call(r, e[o[i]], o[i], e) === n) return
  7065. };
  7066. x.map = x.collect = function(e, t, n) {
  7067. var r = [];
  7068. return null == e ? r: h && e.map === h ? e.map(t, n) : (T(e,
  7069. function(e, i, s) {
  7070. r.push(t.call(n, e, i, s))
  7071. }), r)
  7072. };
  7073. var N = "Reduce of empty array with no initial value";
  7074. x.reduce = x.foldl = x.inject = function(e, t, n, r) {
  7075. var i = arguments.length > 2;
  7076. if (null == e && (e = []), p && e.reduce === p) return r && (t = x.bind(t, r)),
  7077. i ? e.reduce(t, n) : e.reduce(t);
  7078. if (T(e,
  7079. function(e, s, o) {
  7080. i ? n = t.call(r, n, e, s, o) : (n = e, i = !0)
  7081. }), !i) throw new TypeError(N);
  7082. return n
  7083. },
  7084. x.reduceRight = x.foldr = function(e, t, n, r) {
  7085. var i = arguments.length > 2;
  7086. if (null == e && (e = []), d && e.reduceRight === d) return r && (t = x.bind(t, r)),
  7087. i ? e.reduceRight(t, n) : e.reduceRight(t);
  7088. var s = e.length;
  7089. if (s !== +s) {
  7090. var o = x.keys(e);
  7091. s = o.length
  7092. }
  7093. if (T(e,
  7094. function(u, a, f) {
  7095. a = o ? o[--s] : --s,
  7096. i ? n = t.call(r, n, e[a], a, f) : (n = e[a], i = !0)
  7097. }), !i) throw new TypeError(N);
  7098. return n
  7099. },
  7100. x.find = x.detect = function(e, t, n) {
  7101. var r;
  7102. return C(e,
  7103. function(e, i, s) {
  7104. return t.call(n, e, i, s) ? (r = e, !0) : void 0
  7105. }),
  7106. r
  7107. },
  7108. x.filter = x.select = function(e, t, n) {
  7109. var r = [];
  7110. return null == e ? r: v && e.filter === v ? e.filter(t, n) : (T(e,
  7111. function(e, i, s) {
  7112. t.call(n, e, i, s) && r.push(e)
  7113. }), r)
  7114. },
  7115. x.reject = function(e, t, n) {
  7116. return x.filter(e,
  7117. function(e, r, i) {
  7118. return ! t.call(n, e, r, i)
  7119. },
  7120. n)
  7121. },
  7122. x.every = x.all = function(e, t, r) {
  7123. t || (t = x.identity);
  7124. var i = !0;
  7125. return null == e ? i: m && e.every === m ? e.every(t, r) : (T(e,
  7126. function(e, s, o) {
  7127. return (i = i && t.call(r, e, s, o)) ? void 0 : n
  7128. }), !!i)
  7129. };
  7130. var C = x.some = x.any = function(e, t, r) {
  7131. t || (t = x.identity);
  7132. var i = !1;
  7133. return null == e ? i: g && e.some === g ? e.some(t, r) : (T(e,
  7134. function(e, s, o) {
  7135. return i || (i = t.call(r, e, s, o)) ? n: void 0
  7136. }), !!i)
  7137. };
  7138. x.contains = x.include = function(e, t) {
  7139. return null == e ? !1 : y && e.indexOf === y ? e.indexOf(t) != -1 : C(e,
  7140. function(e) {
  7141. return e === t
  7142. })
  7143. },
  7144. x.invoke = function(e, t) {
  7145. var n = u.call(arguments, 2),
  7146. r = x.isFunction(t);
  7147. return x.map(e,
  7148. function(e) {
  7149. return (r ? t: e[t]).apply(e, n)
  7150. })
  7151. },
  7152. x.pluck = function(e, t) {
  7153. return x.map(e,
  7154. function(e) {
  7155. return e[t]
  7156. })
  7157. },
  7158. x.where = function(e, t, n) {
  7159. return x.isEmpty(t) ? n ? void 0 : [] : x[n ? "find": "filter"](e,
  7160. function(e) {
  7161. for (var n in t) if (t[n] !== e[n]) return ! 1;
  7162. return ! 0
  7163. })
  7164. },
  7165. x.findWhere = function(e, t) {
  7166. return x.where(e, t, !0)
  7167. },
  7168. x.max = function(e, t, n) {
  7169. if (!t && x.isArray(e) && e[0] === +e[0] && e.length < 65535) return Math.max.apply(Math, e);
  7170. if (!t && x.isEmpty(e)) return - 1 / 0;
  7171. var r = {
  7172. computed: -1 / 0,
  7173. value: -1 / 0
  7174. };
  7175. return T(e,
  7176. function(e, i, s) {
  7177. var o = t ? t.call(n, e, i, s) : e;
  7178. o > r.computed && (r = {
  7179. value: e,
  7180. computed: o
  7181. })
  7182. }),
  7183. r.value
  7184. },
  7185. x.min = function(e, t, n) {
  7186. if (!t && x.isArray(e) && e[0] === +e[0] && e.length < 65535) return Math.min.apply(Math, e);
  7187. if (!t && x.isEmpty(e)) return 1 / 0;
  7188. var r = {
  7189. computed: 1 / 0,
  7190. value: 1 / 0
  7191. };
  7192. return T(e,
  7193. function(e, i, s) {
  7194. var o = t ? t.call(n, e, i, s) : e;
  7195. o < r.computed && (r = {
  7196. value: e,
  7197. computed: o
  7198. })
  7199. }),
  7200. r.value
  7201. },
  7202. x.shuffle = function(e) {
  7203. var t, n = 0,
  7204. r = [];
  7205. return T(e,
  7206. function(e) {
  7207. t = x.random(n++),
  7208. r[n - 1] = r[t],
  7209. r[t] = e
  7210. }),
  7211. r
  7212. },
  7213. x.sample = function(e, t, n) {
  7214. return arguments.length < 2 || n ? e[x.random(e.length - 1)] : x.shuffle(e).slice(0, Math.max(0, t))
  7215. };
  7216. var k = function(e) {
  7217. return x.isFunction(e) ? e: function(t) {
  7218. return t[e]
  7219. }
  7220. };
  7221. x.sortBy = function(e, t, n) {
  7222. var r = k(t);
  7223. return x.pluck(x.map(e,
  7224. function(e, t, i) {
  7225. return {
  7226. value: e,
  7227. index: t,
  7228. criteria: r.call(n, e, t, i)
  7229. }
  7230. }).sort(function(e, t) {
  7231. var n = e.criteria,
  7232. r = t.criteria;
  7233. if (n !== r) {
  7234. if (n > r || n === void 0) return 1;
  7235. if (r > n || r === void 0) return - 1
  7236. }
  7237. return e.index - t.index
  7238. }), "value")
  7239. };
  7240. var L = function(e) {
  7241. return function(t, n, r) {
  7242. var i = {},
  7243. s = null == n ? x.identity: k(n);
  7244. return T(t,
  7245. function(n, o) {
  7246. var u = s.call(r, n, o, t);
  7247. e(i, u, n)
  7248. }),
  7249. i
  7250. }
  7251. };
  7252. x.groupBy = L(function(e, t, n) { (x.has(e, t) ? e[t] : e[t] = []).push(n)
  7253. }),
  7254. x.indexBy = L(function(e, t, n) {
  7255. e[t] = n
  7256. }),
  7257. x.countBy = L(function(e, t) {
  7258. x.has(e, t) ? e[t]++:e[t] = 1
  7259. }),
  7260. x.sortedIndex = function(e, t, n, r) {
  7261. n = null == n ? x.identity: k(n);
  7262. for (var i = n.call(r, t), s = 0, o = e.length; o > s;) {
  7263. var u = s + o >>> 1;
  7264. n.call(r, e[u]) < i ? s = u + 1 : o = u
  7265. }
  7266. return s
  7267. },
  7268. x.toArray = function(e) {
  7269. return e ? x.isArray(e) ? u.call(e) : e.length === +e.length ? x.map(e, x.identity) : x.values(e) : []
  7270. },
  7271. x.size = function(e) {
  7272. return null == e ? 0 : e.length === +e.length ? e.length: x.keys(e).length
  7273. },
  7274. x.first = x.head = x.take = function(e, t, n) {
  7275. return null == e ? void 0 : null == t || n ? e[0] : u.call(e, 0, t)
  7276. },
  7277. x.initial = function(e, t, n) {
  7278. return u.call(e, 0, e.length - (null == t || n ? 1 : t))
  7279. },
  7280. x.last = function(e, t, n) {
  7281. return null == e ? void 0 : null == t || n ? e[e.length - 1] : u.call(e, Math.max(e.length - t, 0))
  7282. },
  7283. x.rest = x.tail = x.drop = function(e, t, n) {
  7284. return u.call(e, null == t || n ? 1 : t)
  7285. },
  7286. x.compact = function(e) {
  7287. return x.filter(e, x.identity)
  7288. };
  7289. var A = function(e, t, n) {
  7290. return t && x.every(e, x.isArray) ? a.apply(n, e) : (T(e,
  7291. function(e) {
  7292. x.isArray(e) || x.isArguments(e) ? t ? o.apply(n, e) : A(e, t, n) : n.push(e)
  7293. }), n)
  7294. };
  7295. x.flatten = function(e, t) {
  7296. return A(e, t, [])
  7297. },
  7298. x.without = function(e) {
  7299. return x.difference(e, u.call(arguments, 1))
  7300. },
  7301. x.uniq = x.unique = function(e, t, n, r) {
  7302. x.isFunction(t) && (r = n, n = t, t = !1);
  7303. var i = n ? x.map(e, n, r) : e,
  7304. s = [],
  7305. o = [];
  7306. return T(i,
  7307. function(n, r) { (t ? r && o[o.length - 1] === n: x.contains(o, n)) || (o.push(n), s.push(e[r]))
  7308. }),
  7309. s
  7310. },
  7311. x.union = function() {
  7312. return x.uniq(x.flatten(arguments, !0))
  7313. },
  7314. x.intersection = function(e) {
  7315. var t = u.call(arguments, 1);
  7316. return x.filter(x.uniq(e),
  7317. function(e) {
  7318. return x.every(t,
  7319. function(t) {
  7320. return x.indexOf(t, e) >= 0
  7321. })
  7322. })
  7323. },
  7324. x.difference = function(e) {
  7325. var t = a.apply(r, u.call(arguments, 1));
  7326. return x.filter(e,
  7327. function(e) {
  7328. return ! x.contains(t, e)
  7329. })
  7330. },
  7331. x.zip = function() {
  7332. for (var e = x.max(x.pluck(arguments, "length").concat(0)), t = new Array(e), n = 0; e > n; n++) t[n] = x.pluck(arguments, "" + n);
  7333. return t
  7334. },
  7335. x.object = function(e, t) {
  7336. if (null == e) return {};
  7337. for (var n = {},
  7338. r = 0,
  7339. i = e.length; i > r; r++) t ? n[e[r]] = t[r] : n[e[r][0]] = e[r][1];
  7340. return n
  7341. },
  7342. x.indexOf = function(e, t, n) {
  7343. if (null == e) return - 1;
  7344. var r = 0,
  7345. i = e.length;
  7346. if (n) {
  7347. if ("number" != typeof n) return r = x.sortedIndex(e, t),
  7348. e[r] === t ? r: -1;
  7349. r = 0 > n ? Math.max(0, i + n) : n
  7350. }
  7351. if (y && e.indexOf === y) return e.indexOf(t, n);
  7352. for (; i > r; r++) if (e[r] === t) return r;
  7353. return - 1
  7354. },
  7355. x.lastIndexOf = function(e, t, n) {
  7356. if (null == e) return - 1;
  7357. var r = null != n;
  7358. if (b && e.lastIndexOf === b) return r ? e.lastIndexOf(t, n) : e.lastIndexOf(t);
  7359. for (var i = r ? n: e.length; i--;) if (e[i] === t) return i;
  7360. return - 1
  7361. },
  7362. x.range = function(e, t, n) {
  7363. arguments.length <= 1 && (t = e || 0, e = 0),
  7364. n = arguments[2] || 1;
  7365. for (var r = Math.max(Math.ceil((t - e) / n), 0), i = 0, s = new Array(r); r > i;) s[i++] = e,
  7366. e += n;
  7367. return s
  7368. };
  7369. var O = function() {};
  7370. x.bind = function(e, t) {
  7371. var n, r;
  7372. if (S && e.bind === S) return S.apply(e, u.call(arguments, 1));
  7373. if (!x.isFunction(e)) throw new TypeError;
  7374. return n = u.call(arguments, 2),
  7375. r = function() {
  7376. if (this instanceof r) {
  7377. O.prototype = e.prototype;
  7378. var i = new O;
  7379. O.prototype = null;
  7380. var s = e.apply(i, n.concat(u.call(arguments)));
  7381. return Object(s) === s ? s: i
  7382. }
  7383. return e.apply(t, n.concat(u.call(arguments)))
  7384. }
  7385. },
  7386. x.partial = function(e) {
  7387. var t = u.call(arguments, 1);
  7388. return function() {
  7389. return e.apply(this, t.concat(u.call(arguments)))
  7390. }
  7391. },
  7392. x.bindAll = function(e) {
  7393. var t = u.call(arguments, 1);
  7394. if (0 === t.length) throw new Error("bindAll must be passed function names");
  7395. return T(t,
  7396. function(t) {
  7397. e[t] = x.bind(e[t], e)
  7398. }),
  7399. e
  7400. },
  7401. x.memoize = function(e, t) {
  7402. var n = {};
  7403. return t || (t = x.identity),
  7404. function() {
  7405. var r = t.apply(this, arguments);
  7406. return x.has(n, r) ? n[r] : n[r] = e.apply(this, arguments)
  7407. }
  7408. },
  7409. x.delay = function(e, t) {
  7410. var n = u.call(arguments, 2);
  7411. return setTimeout(function() {
  7412. return e.apply(null, n)
  7413. },
  7414. t)
  7415. },
  7416. x.defer = function(e) {
  7417. return x.delay.apply(x, [e, 1].concat(u.call(arguments, 1)))
  7418. },
  7419. x.throttle = function(e, t, n) {
  7420. var r, i, s, o = null,
  7421. u = 0;
  7422. n || (n = {});
  7423. var a = function() {
  7424. u = n.leading === !1 ? 0 : new Date,
  7425. o = null,
  7426. s = e.apply(r, i)
  7427. };
  7428. return function() {
  7429. var f = new Date;
  7430. u || n.leading !== !1 || (u = f);
  7431. var l = t - (f - u);
  7432. return r = this,
  7433. i = arguments,
  7434. 0 >= l ? (clearTimeout(o), o = null, u = f, s = e.apply(r, i)) : o || n.trailing === !1 || (o = setTimeout(a, l)),
  7435. s
  7436. }
  7437. },
  7438. x.debounce = function(e, t, n) {
  7439. var r, i, s, o, u;
  7440. return function() {
  7441. s = this,
  7442. i = arguments,
  7443. o = new Date;
  7444. var a = function() {
  7445. var f = new Date - o;
  7446. t > f ? r = setTimeout(a, t - f) : (r = null, n || (u = e.apply(s, i)))
  7447. },
  7448. f = n && !r;
  7449. return r || (r = setTimeout(a, t)),
  7450. f && (u = e.apply(s, i)),
  7451. u
  7452. }
  7453. },
  7454. x.once = function(e) {
  7455. var t, n = !1;
  7456. return function() {
  7457. return n ? t: (n = !0, t = e.apply(this, arguments), e = null, t)
  7458. }
  7459. },
  7460. x.wrap = function(e, t) {
  7461. return function() {
  7462. var n = [e];
  7463. return o.apply(n, arguments),
  7464. t.apply(this, n)
  7465. }
  7466. },
  7467. x.compose = function() {
  7468. var e = arguments;
  7469. return function() {
  7470. for (var t = arguments,
  7471. n = e.length - 1; n >= 0; n--) t = [e[n].apply(this, t)];
  7472. return t[0]
  7473. }
  7474. },
  7475. x.after = function(e, t) {
  7476. return function() {
  7477. return--e < 1 ? t.apply(this, arguments) : void 0
  7478. }
  7479. },
  7480. x.keys = E ||
  7481. function(e) {
  7482. if (e !== Object(e)) throw new TypeError("Invalid object");
  7483. var t = [];
  7484. for (var n in e) x.has(e, n) && t.push(n);
  7485. return t
  7486. },
  7487. x.values = function(e) {
  7488. for (var t = x.keys(e), n = t.length, r = new Array(n), i = 0; n > i; i++) r[i] = e[t[i]];
  7489. return r
  7490. },
  7491. x.pairs = function(e) {
  7492. for (var t = x.keys(e), n = t.length, r = new Array(n), i = 0; n > i; i++) r[i] = [t[i], e[t[i]]];
  7493. return r
  7494. },
  7495. x.invert = function(e) {
  7496. for (var t = {},
  7497. n = x.keys(e), r = 0, i = n.length; i > r; r++) t[e[n[r]]] = n[r];
  7498. return t
  7499. },
  7500. x.functions = x.methods = function(e) {
  7501. var t = [];
  7502. for (var n in e) x.isFunction(e[n]) && t.push(n);
  7503. return t.sort()
  7504. },
  7505. x.extend = function(e) {
  7506. return T(u.call(arguments, 1),
  7507. function(t) {
  7508. if (t) for (var n in t) e[n] = t[n]
  7509. }),
  7510. e
  7511. },
  7512. x.pick = function(e) {
  7513. var t = {},
  7514. n = a.apply(r, u.call(arguments, 1));
  7515. return T(n,
  7516. function(n) {
  7517. n in e && (t[n] = e[n])
  7518. }),
  7519. t
  7520. },
  7521. x.omit = function(e) {
  7522. var t = {},
  7523. n = a.apply(r, u.call(arguments, 1));
  7524. for (var i in e) x.contains(n, i) || (t[i] = e[i]);
  7525. return t
  7526. },
  7527. x.defaults = function(e) {
  7528. return T(u.call(arguments, 1),
  7529. function(t) {
  7530. if (t) for (var n in t) e[n] === void 0 && (e[n] = t[n])
  7531. }),
  7532. e
  7533. },
  7534. x.clone = function(e) {
  7535. return x.isObject(e) ? x.isArray(e) ? e.slice() : x.extend({},
  7536. e) : e
  7537. },
  7538. x.tap = function(e, t) {
  7539. return t(e),
  7540. e
  7541. };
  7542. var M = function(e, t, n, r) {
  7543. if (e === t) return 0 !== e || 1 / e == 1 / t;
  7544. if (null == e || null == t) return e === t;
  7545. e instanceof x && (e = e._wrapped),
  7546. t instanceof x && (t = t._wrapped);
  7547. var i = f.call(e);
  7548. if (i != f.call(t)) return ! 1;
  7549. switch (i) {
  7550. case "[object String]":
  7551. return e == String(t);
  7552. case "[object Number]":
  7553. return e != +e ? t != +t: 0 == e ? 1 / e == 1 / t: e == +t;
  7554. case "[object Date]":
  7555. case "[object Boolean]":
  7556. return + e == +t;
  7557. case "[object RegExp]":
  7558. return e.source == t.source && e.global == t.global && e.multiline == t.multiline && e.ignoreCase == t.ignoreCase
  7559. }
  7560. if ("object" != typeof e || "object" != typeof t) return ! 1;
  7561. for (var s = n.length; s--;) if (n[s] == e) return r[s] == t;
  7562. var o = e.constructor,
  7563. u = t.constructor;
  7564. if (o !== u && !(x.isFunction(o) && o instanceof o && x.isFunction(u) && u instanceof u)) return ! 1;
  7565. n.push(e),
  7566. r.push(t);
  7567. var a = 0,
  7568. l = !0;
  7569. if ("[object Array]" == i) {
  7570. if (a = e.length, l = a == t.length) for (; a--&&(l = M(e[a], t[a], n, r)););
  7571. } else {
  7572. for (var c in e) if (x.has(e, c) && (a++, !(l = x.has(t, c) && M(e[c], t[c], n, r)))) break;
  7573. if (l) {
  7574. for (c in t) if (x.has(t, c) && !(a--)) break;
  7575. l = !a
  7576. }
  7577. }
  7578. return n.pop(),
  7579. r.pop(),
  7580. l
  7581. };
  7582. x.isEqual = function(e, t) {
  7583. return M(e, t, [], [])
  7584. },
  7585. x.isEmpty = function(e) {
  7586. if (null == e) return ! 0;
  7587. if (x.isArray(e) || x.isString(e)) return 0 === e.length;
  7588. for (var t in e) if (x.has(e, t)) return ! 1;
  7589. return ! 0
  7590. },
  7591. x.isElement = function(e) {
  7592. return !! e && 1 === e.nodeType
  7593. },
  7594. x.isArray = w ||
  7595. function(e) {
  7596. return "[object Array]" == f.call(e)
  7597. },
  7598. x.isObject = function(e) {
  7599. return e === Object(e)
  7600. },
  7601. T(["Arguments", "Function", "String", "Number", "Date", "RegExp"],
  7602. function(e) {
  7603. x["is" + e] = function(t) {
  7604. return f.call(t) == "[object " + e + "]"
  7605. }
  7606. }),
  7607. x.isArguments(arguments) || (x.isArguments = function(e) {
  7608. return !! e && !!x.has(e, "callee")
  7609. }),
  7610. "function" != typeof / . / &&(x.isFunction = function(e) {
  7611. return "function" == typeof e
  7612. }),
  7613. x.isFinite = function(e) {
  7614. return isFinite(e) && !isNaN(parseFloat(e))
  7615. },
  7616. x.isNaN = function(e) {
  7617. return x.isNumber(e) && e != +e
  7618. },
  7619. x.isBoolean = function(e) {
  7620. return e === !0 || e === !1 || "[object Boolean]" == f.call(e)
  7621. },
  7622. x.isNull = function(e) {
  7623. return null === e
  7624. },
  7625. x.isUndefined = function(e) {
  7626. return e === void 0
  7627. },
  7628. x.has = function(e, t) {
  7629. return l.call(e, t)
  7630. },
  7631. x.noConflict = function() {
  7632. return e._ = t,
  7633. this
  7634. },
  7635. x.identity = function(e) {
  7636. return e
  7637. },
  7638. x.times = function(e, t, n) {
  7639. for (var r = Array(Math.max(0, e)), i = 0; e > i; i++) r[i] = t.call(n, i);
  7640. return r
  7641. },
  7642. x.random = function(e, t) {
  7643. return null == t && (t = e, e = 0),
  7644. e + Math.floor(Math.random() * (t - e + 1))
  7645. };
  7646. var _ = {
  7647. escape: {
  7648. "&": "&amp;",
  7649. "<": "&lt;",
  7650. ">": "&gt;",
  7651. '"': "&quot;",
  7652. "'": "&#x27;"
  7653. }
  7654. };
  7655. _.unescape = x.invert(_.escape);
  7656. var D = {
  7657. escape: new RegExp("[" + x.keys(_.escape).join("") + "]", "g"),
  7658. unescape: new RegExp("(" + x.keys(_.unescape).join("|") + ")", "g")
  7659. };
  7660. x.each(["escape", "unescape"],
  7661. function(e) {
  7662. x[e] = function(t) {
  7663. return null == t ? "": ("" + t).replace(D[e],
  7664. function(t) {
  7665. return _[e][t]
  7666. })
  7667. }
  7668. }),
  7669. x.result = function(e, t) {
  7670. if (null == e) return void 0;
  7671. var n = e[t];
  7672. return x.isFunction(n) ? n.call(e) : n
  7673. },
  7674. x.mixin = function(e) {
  7675. T(x.functions(e),
  7676. function(t) {
  7677. var n = x[t] = e[t];
  7678. x.prototype[t] = function() {
  7679. var e = [this._wrapped];
  7680. return o.apply(e, arguments),
  7681. F.call(this, n.apply(x, e))
  7682. }
  7683. })
  7684. };
  7685. var P = 0;
  7686. x.uniqueId = function(e) {
  7687. var t = ++P + "";
  7688. return e ? e + t: t
  7689. },
  7690. x.templateSettings = {
  7691. evaluate: /<%([\s\S]+?)%>/g,
  7692. interpolate: /<%=([\s\S]+?)%>/g,
  7693. escape: /<%-([\s\S]+?)%>/g
  7694. };
  7695. var H = /(.)^/,
  7696. B = {
  7697. "'": "'",
  7698. "\\": "\\",
  7699. "\r": "r",
  7700. "\n": "n",
  7701. " ": "t",
  7702. "\u2028": "u2028",
  7703. "\u2029": "u2029"
  7704. },
  7705. j = /\\|'|\r|\n|\t|\u2028|\u2029/g;
  7706. x.template = function(e, t, n) {
  7707. var r;
  7708. n = x.defaults({},
  7709. n, x.templateSettings);
  7710. var i = new RegExp([(n.escape || H).source, (n.interpolate || H).source, (n.evaluate || H).source].join("|") + "|$", "g"),
  7711. s = 0,
  7712. o = "__p+='";
  7713. e.replace(i,
  7714. function(t, n, r, i, u) {
  7715. return o += e.slice(s, u).replace(j,
  7716. function(e) {
  7717. return "\\" + B[e]
  7718. }),
  7719. n && (o += "'+\n((__t=(" + n + "))==null?'':_.escape(__t))+\n'"),
  7720. r && (o += "'+\n((__t=(" + r + "))==null?'':__t)+\n'"),
  7721. i && (o += "';\n" + i + "\n__p+='"),
  7722. s = u + t.length,
  7723. t
  7724. }),
  7725. o += "';\n",
  7726. n.variable || (o = "with(obj||{}){\n" + o + "}\n"),
  7727. o = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + o + "return __p;\n";
  7728. try {
  7729. r = new Function(n.variable || "obj", "_", o)
  7730. } catch(u) {
  7731. throw u.source = o,
  7732. u
  7733. }
  7734. if (t) return r(t, x);
  7735. var a = function(e) {
  7736. return r.call(this, e, x)
  7737. };
  7738. return a.source = "function(" + (n.variable || "obj") + "){\n" + o + "}",
  7739. a
  7740. },
  7741. x.chain = function(e) {
  7742. return x(e).chain()
  7743. };
  7744. var F = function(e) {
  7745. return this._chain ? x(e).chain() : e
  7746. };
  7747. x.mixin(x),
  7748. T(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"],
  7749. function(e) {
  7750. var t = r[e];
  7751. x.prototype[e] = function() {
  7752. var n = this._wrapped;
  7753. return t.apply(n, arguments),
  7754. "shift" != e && "splice" != e || 0 !== n.length || delete n[0],
  7755. F.call(this, n)
  7756. }
  7757. }),
  7758. T(["concat", "join", "slice"],
  7759. function(e) {
  7760. var t = r[e];
  7761. x.prototype[e] = function() {
  7762. return F.call(this, t.apply(this._wrapped, arguments))
  7763. }
  7764. }),
  7765. x.extend(x.prototype, {
  7766. chain: function() {
  7767. return this._chain = !0,
  7768. this
  7769. },
  7770. value: function() {
  7771. return this._wrapped
  7772. }
  7773. })
  7774. }.call(this), define("underscore",
  7775. function(e) {
  7776. return function() {
  7777. var t, n;
  7778. return t || e._
  7779. }
  7780. } (this)), define("game/Game", ["require", "assetStorage", "cjs", "tweenjs", "FSM", "State", "soundjs", "underscore", "screenSize"],
  7781. function(e) {
  7782. var t = e("assetStorage"),
  7783. n = e("cjs"),
  7784. r = e("tweenjs"),
  7785. i = e("FSM"),
  7786. s = e("State"),
  7787. o = e("soundjs"),
  7788. u = e("underscore"),
  7789. a = e("screenSize"),
  7790. f = function(e, t, n, r) {
  7791. this.init(e, t, n, r)
  7792. },
  7793. l = f.prototype = new n.EventDispatcher;
  7794. return l.init = function(e, r, i, s) {
  7795. this.initialize(),
  7796. this._view = e,
  7797. this._touchArea = r,
  7798. this._startPos = 200,
  7799. this._potentialContacts = [];
  7800. var o = 1;
  7801. this._hero = new n.Container,
  7802. this._hero.x = this._startPos,
  7803. this._hero.y = 530,
  7804. this._heroVelocity = {
  7805. x: 0,
  7806. y: 0
  7807. },
  7808. this._heroAccel = {
  7809. x: 0,
  7810. y: 0
  7811. };
  7812. var u = t.getBitmap("gfx/hero.png");
  7813. u.x = -(u.getBounds().width / 2),
  7814. u.y = -(u.getBounds().height / 2),
  7815. this._hero.addChild(u),
  7816. this._hero.scaleX = this._hero.scaleY = o,
  7817. this._heroHalfWidth = 40 * o,
  7818. this._heroBound = new n.Rectangle(0, 0, this._heroHalfWidth * 2, this._heroHalfWidth * 2),
  7819. this._view.addChild(this._hero),
  7820. this._progressChangeSpeed = 2,
  7821. this._gravity = 2e3,
  7822. this._platforms = [],
  7823. this._touchArea.on("mousedown",
  7824. function() {
  7825. this._wasMouseDown = !0
  7826. },
  7827. this),
  7828. this._touchArea.on("pressup",
  7829. function() {
  7830. this._wasMouseUp = !0
  7831. },
  7832. this),
  7833. this._lastAddedPlatformPos = {
  7834. x: 0,
  7835. y: 0
  7836. },
  7837. this._progressBar = i,
  7838. this._view.addChild(i),
  7839. this._scoreLabel = s,
  7840. this._lastUpdateNum = 0,
  7841. this._updateEveryNumPixels = 300,
  7842. this._setUpWaterSegments(),
  7843. this._createBigPlatform(),
  7844. this._setUpGameFSM()
  7845. },
  7846. l.getCurrScore = function() {
  7847. return Math.floor((this._hero.x - this._startPos) / 10)
  7848. },
  7849. l.getDistance = function() {
  7850. return this._hero.x - this._startPos
  7851. },
  7852. l.replay = function() {
  7853. this._hero.x = 200,
  7854. this._hero.y = 550,
  7855. this._heroVelocity = {
  7856. x: 0,
  7857. y: 0
  7858. },
  7859. this._heroAccel = {
  7860. x: 0,
  7861. y: 0
  7862. },
  7863. this._setUpGameFSM(),
  7864. this._score = 0,
  7865. this._hero.rotation = 0,
  7866. this._removeAllPlatforms(),
  7867. this._lastAddedPlatformPos = {
  7868. x: 0,
  7869. y: 0
  7870. },
  7871. this._createBigPlatform(),
  7872. this._lastUpdateNum = 0
  7873. },
  7874. l._removeAllPlatforms = function() {
  7875. var e;
  7876. while (e = this._platforms.pop()) this._view.removeChild(e.view);
  7877. this._potentialContacts.length = 0
  7878. },
  7879. l._updatePlatforms = function() {
  7880. var e = [],
  7881. n;
  7882. for (var r = this._platforms.length; r--;) n = this._platforms[r],
  7883. n.view.x + n.bounds.width < -this._view.x ? this._view.removeChild(n.view) : e.push(n);
  7884. this._platforms = e;
  7885. while (this._platforms.length < 10) {
  7886. var i = this._lastAddedPlatformPos.x,
  7887. s = this._lastAddedPlatformPos.y;
  7888. n = t.getBitmap("gfx/platform.png"),
  7889. n.mouseEnabled = !1,
  7890. n.x = i + (this._lastAddedPlatformBound.width + (100 + Math.random() * 220 * this._computeDistanceFactor())),
  7891. n.y = s + u.sample([ - (50 + Math.random() * 100 * this._computeDistanceFactor()), Math.random() * 650]),
  7892. n.y > 650 ? n.y = 650 : n.y < 150 && (n.y = 150),
  7893. this._lastAddedPlatformPos.x = n.x,
  7894. this._lastAddedPlatformPos.y = n.y,
  7895. this.addPlatform({
  7896. view: n,
  7897. bounds: n.getBounds()
  7898. }),
  7899. this._lastAddedPlatformBound = n.getBounds()
  7900. }
  7901. },
  7902. l._computeDistanceFactor = function() {
  7903. var e = .1,
  7904. t = e + (1 - e) * (this.getCurrScore() / 800);
  7905. return t > 1 ? 1 : t
  7906. },
  7907. l._createBigPlatform = function() {
  7908. var e = t.getBitmap("gfx/bigPlatformMiddleSegment.png");
  7909. for (var n = 0; n < 6; n++) {
  7910. var r = e.clone();
  7911. r.mouseEnabled = !1,
  7912. r.x = r.getBounds().width * n - n,
  7913. r.y = 650,
  7914. this.addPlatform({
  7915. view: r,
  7916. bounds: r.getBounds()
  7917. })
  7918. }
  7919. var i = t.getBitmap("gfx/bigPlatformEndSegment.png");
  7920. i.mouseEnabled = !1,
  7921. i.x = n * e.getBounds().width - n,
  7922. i.y = 650,
  7923. this.addPlatform({
  7924. view: i,
  7925. bounds: i.getBounds()
  7926. }),
  7927. this._lastAddedPlatformBound = i.getBounds(),
  7928. this._lastAddedPlatformPos.x = i.x,
  7929. this._lastAddedPlatformPos.y = i.y
  7930. },
  7931. l._setUpWaterSegments = function() {
  7932. this._waterSegments = [];
  7933. var e = new createjs.SpriteSheet({
  7934. images: [t.get("gfx/waterAnim.png")],
  7935. frames: [[2, 2, 186, 111, 0, -0.25, .15], [190, 2, 186, 111, 0, -0.25, .15], [2, 115, 186, 111, 0, -0.25, .15], [190, 115, 186, 111, 0, -0.25, .15], [2, 228, 186, 111, 0, -0.25, .15]],
  7936. animations: {
  7937. idle: {
  7938. frames: [0, 1, 2, 3, 4, 3, 2, 1]
  7939. }
  7940. }
  7941. }),
  7942. r = 184,
  7943. i = Math.ceil(a.width / r) + 1;
  7944. for (var s = 0; s < i; s++) {
  7945. var o = new n.Sprite(e);
  7946. o.mouseEnabled = !1,
  7947. o.framerate = 10,
  7948. this._waterSegments.push(o),
  7949. this._view.addChild(o),
  7950. o.y = 700,
  7951. o.gotoAndPlay("idle")
  7952. }
  7953. },
  7954. l._updateWater = function() {
  7955. var e = this._waterSegments,
  7956. t = 0 - this._view.x,
  7957. n = 184,
  7958. r = t % n;
  7959. for (var i = e.length; i--;) {
  7960. var s = e[i];
  7961. s.x = t - r + i * n
  7962. }
  7963. },
  7964. l._setUpGameFSM = function() {
  7965. var e = this,
  7966. t = new s,
  7967. n = new s(function() {
  7968. e._doGameOver()
  7969. });
  7970. t.addTransition(n,
  7971. function() {
  7972. return e._doControl(),
  7973. e._moveHero(),
  7974. e._resolveCollisions(),
  7975. e._moveCamera(),
  7976. e._updateProgress(),
  7977. e._updateScoreLabel(),
  7978. e._updateWater(),
  7979. e._lastUpdateNum < Math.floor(e.getDistance() / e._updateEveryNumPixels) && (e._lastUpdateNum = Math.floor(e.getDistance() / e._updateEveryNumPixels), e._updatePlatforms()),
  7980. e._checkGameOver() ? (o.Sound.play("sfx/splash.mp3"), !0) : !1
  7981. }),
  7982. this._gameFMS = new i(t)
  7983. },
  7984. l.update = function(e) {
  7985. this._dt = e,
  7986. this._gameFMS.execute(),
  7987. this._updateControl()
  7988. },
  7989. l.addPlatform = function(e) {
  7990. this._platforms.push(e),
  7991. this._view.addChild(e.view)
  7992. },
  7993. l._lastAddedPlatformPos = null,
  7994. l._lastAddedPlatformBound = null,
  7995. l._waterSegments = null,
  7996. l._dt = 0,
  7997. l._gameFMS = null,
  7998. l._view = null,
  7999. l._touchArea = null,
  8000. l._gravity = null,
  8001. l._hero = null,
  8002. l._heroBound = null,
  8003. l._heroVelocity = null,
  8004. l._heroAccel = null,
  8005. l._heroBound = null,
  8006. l._heroHalfWidth = 0,
  8007. l._platforms = null,
  8008. l._currContact = null,
  8009. l._maxVelocity = 700,
  8010. l._potentialContacts = null,
  8011. l._wasMouseDown = !1,
  8012. l._mouseDown = !1,
  8013. l._wasMouseUp = !1,
  8014. l._progressChangeSpeed = 0,
  8015. l._currProgress = 0,
  8016. l._progressBar = null,
  8017. l._startPos = 0,
  8018. l._scoreLabel = null,
  8019. l._score = 0,
  8020. l._platformDistanceFactor = 0,
  8021. l._doGameOver = function() {
  8022. this.dispatchEvent(new n.Event("gameOver"))
  8023. },
  8024. l._checkGameOver = function() {
  8025. return this._hero.y > 800
  8026. },
  8027. l._updateScoreLabel = function() {
  8028. this._scoreLabel.setText(this.getCurrScore().toString())
  8029. },
  8030. l._doControl = function() {
  8031. if (this._currContact && this._wasMouseUp) {
  8032. var e = this._computeCurrProgress(),
  8033. t = -60 * (Math.PI / 180);
  8034. this._heroVelocity.x = Math.cos(t) * (250 + 850 * e),
  8035. this._heroVelocity.y = Math.sin(t) * (250 + 850 * e),
  8036. r.Tween.get(this._hero).to({
  8037. rotation: this._hero.rotation + 90
  8038. },
  8039. 200 + 500 * e),
  8040. o.Sound.play("sfx/jump.mp3")
  8041. }
  8042. },
  8043. l._moveCamera = function() {
  8044. this._view.x = -(this._hero.x - 150),
  8045. this._view.x > 0 && (this._view.x = 0)
  8046. },
  8047. l._moveHero = function() {
  8048. var e = this._dt,
  8049. t = this._heroAccel.x,
  8050. n = this._heroAccel.y + this._gravity;
  8051. this._heroVelocity.x += t * e,
  8052. this._heroVelocity.y += n * e,
  8053. this._heroVelocity.y > this._maxVelocity && (this._heroVelocity.y = this._maxVelocity),
  8054. this._hero.x += this._heroVelocity.x * e,
  8055. this._hero.y += this._heroVelocity.y * e
  8056. },
  8057. l._resolveCollisions = function() {
  8058. this._currContact && (this._isOverlapWithPlatform(this._currContact.platform) ? this._resolveHeroVsPlatformCollision(this._currContact) : this._currContact = null);
  8059. if (!this._currContact) for (var e = this._platforms.length; e--;) {
  8060. var t = this._platforms[e];
  8061. if (this._isOverlapWithPlatform(t)) {
  8062. if (this._potentialContacts.indexOf(t) != -1) continue;
  8063. this._currContact = this._getContactWith(t),
  8064. this._currContact ? (this._resolveHeroVsPlatformCollision(this._currContact), o.Sound.play("sfx/landing.mp3")) : this._potentialContacts.push(t)
  8065. } else this._potentialContacts.indexOf(t) != -1 && this._potentialContacts.splice(this._potentialContacts.indexOf(t), 1)
  8066. }
  8067. },
  8068. l._updateProgress = function() {
  8069. this._mouseDown && (this._currProgress += this._progressChangeSpeed * this._dt),
  8070. this._wasMouseUp && (this._currProgress = 0),
  8071. this._setProgressBarProgress(this._computeCurrProgress()),
  8072. this._progressBar.x = this._hero.x - 65,
  8073. this._progressBar.y = this._hero.y - this._heroHalfWidth - 50
  8074. },
  8075. l._computeCurrProgress = function() {
  8076. var e;
  8077. return this._currProgress % 2 < 1 ? e = this._currProgress % 1 : e = 1 - this._currProgress % 1,
  8078. e
  8079. },
  8080. l._updateControl = function() {
  8081. this._wasMouseDown && (this._mouseDown = !0),
  8082. this._wasMouseUp && (this._mouseDown = !1),
  8083. this._wasMouseDown = !1,
  8084. this._wasMouseUp = !1
  8085. },
  8086. l._isOverlapWithPlatform = function(e) {
  8087. var t = this._getHeroBound(),
  8088. n = e.bounds;
  8089. return n.x = e.view.x,
  8090. n.y = e.view.y,
  8091. t.y + t.height > n.y && t.y < n.y + n.height && t.x + t.width > n.x && t.x < n.x + n.width
  8092. },
  8093. l._getContactWith = function(e) {
  8094. var t = this._getHeroBound(),
  8095. n = e.bounds;
  8096. n.x = e.view.x,
  8097. n.y = e.view.y;
  8098. var r = n.x + n.width - t.x,
  8099. i = t.x + t.width - n.x,
  8100. s = n.y + n.height - t.y,
  8101. o = t.y + t.height - n.y;
  8102. return o < r && o < i && o < s ? {
  8103. penetration: o,
  8104. platform: e
  8105. }: null
  8106. },
  8107. l._resolveHeroVsPlatformCollision = function(e) {
  8108. var t = e.platform,
  8109. n = this._getHeroBound();
  8110. this._hero.y = t.view.y - n.height / 2,
  8111. this._heroVelocity.x = this._heroVelocity.y = 0
  8112. },
  8113. l._getHeroBound = function() {
  8114. return this._heroBound.x = this._hero.x - this._heroHalfWidth,
  8115. this._heroBound.y = this._hero.y - this._heroHalfWidth,
  8116. this._heroBound
  8117. },
  8118. l._setProgressBarProgress = function(e) {
  8119. this._progressBar.setValue(e)
  8120. },
  8121. f
  8122. }), define("bitmapText/BitmapFont", ["require"],
  8123. function(e) {
  8124. var t = function(e, t) {},
  8125. n = t.prototype;
  8126. return n.getImage = function() {
  8127. return this._img
  8128. },
  8129. n.getCharData = function(e) {
  8130. return this.getCharDataByCode(e.charCodeAt(0))
  8131. },
  8132. n.getCharDataByCode = function(e) {
  8133. for (var t = 0; t < this._chars.length; t++) if (this._chars[t].id == e) return this._chars[t];
  8134. return null
  8135. },
  8136. n.getKerning = function(e, t) {
  8137. var n = e.charCodeAt(0),
  8138. r = t.charCodeAt(0);
  8139. for (var i = 0; i < this._kernings.length; i++) if (this._kernings[i].first == n && this._kernings[i].second == r) return Number(this._kernings[i].amount);
  8140. return undefined
  8141. },
  8142. n.initWithXml = function(e, t) {
  8143. this._img = e,
  8144. this.parseXml(t)
  8145. },
  8146. n.initWithJson = function(e, t) {
  8147. this._img = e,
  8148. this.parseJson(t)
  8149. },
  8150. n.parseXml = function(e) {
  8151. var t = e.childNodes[0].getElementsByTagName("chars")[0].getElementsByTagName("char"),
  8152. n = [],
  8153. r = [];
  8154. for (var i = 0; i < t.length; i++) {
  8155. var s = {};
  8156. s.id = t[i].getAttribute("id"),
  8157. s.x = t[i].getAttribute("x"),
  8158. s.y = t[i].getAttribute("y"),
  8159. s.xAdvance = t[i].getAttribute("xadvance"),
  8160. s.xOffset = t[i].getAttribute("xoffset"),
  8161. s.yOffset = t[i].getAttribute("yoffset"),
  8162. s.width = t[i].getAttribute("width"),
  8163. s.height = t[i].getAttribute("height"),
  8164. n.push(s)
  8165. }
  8166. if (e.childNodes[0].getElementsByTagName("kernings")[0] != null) {
  8167. var o = e.childNodes[0].getElementsByTagName("kernings")[0].getElementsByTagName("kerning");
  8168. for (var u = 0; u < o.length; u++) {
  8169. var s = {};
  8170. s.first = o[u].getAttribute("first"),
  8171. s.second = o[u].getAttribute("second"),
  8172. s.amount = o[u].getAttribute("amount"),
  8173. r.push(s)
  8174. }
  8175. }
  8176. this._chars = n,
  8177. this._kernings = r
  8178. },
  8179. n.parseJson = function(e) {
  8180. this._chars = e.chars.data.concat(),
  8181. this._kernings = e.kernings.data.concat()
  8182. },
  8183. n._font = "",
  8184. n._lineHeight = 0,
  8185. n._spaceWidth = 0,
  8186. n._base = 0,
  8187. n._scaleW = 0,
  8188. n._scaleH = 0,
  8189. n._chars = null,
  8190. n._kernings = null,
  8191. n._img = null,
  8192. n._offsetX = 0,
  8193. n._offsetY = 0,
  8194. t
  8195. }), define("bitmapText/BitmapTextField", ["require", "cjs"],
  8196. function(e) {
  8197. var t = e("cjs"),
  8198. n = function(e) {
  8199. this.initialize(e)
  8200. };
  8201. n.format = {
  8202. left: "left",
  8203. center: "center",
  8204. right: "right"
  8205. };
  8206. var r = n.prototype = new t.DisplayObject;
  8207. return r.DisplayObject_initialize = r.initialize,
  8208. r.initialize = function(e) {
  8209. this.DisplayObject_initialize(),
  8210. this._font = e,
  8211. this._lines = [],
  8212. this._lineWidths = [],
  8213. this._invalidate()
  8214. },
  8215. r.DisplayObject_draw = r.draw,
  8216. r.drawBorder = !1,
  8217. r.getText = function() {
  8218. return this._text
  8219. },
  8220. r.setText = function(e) {
  8221. if (this._text.localeCompare(e) === 0) return;
  8222. this._text = e,
  8223. this._invalidate()
  8224. },
  8225. r.setSize = function(e, t) {
  8226. this._width = e,
  8227. this._height = t,
  8228. this._invalidate()
  8229. },
  8230. r.setFormat = function(e) {
  8231. this._format = e
  8232. },
  8233. r.setLetterSpacing = function(e) {
  8234. if (this._letterSpacing === e) return;
  8235. this._letterSpacing = e,
  8236. this._invalidate()
  8237. },
  8238. r.getBounds = function() {
  8239. return new t.Rectangle(0, 0, this._width, this._height)
  8240. },
  8241. r.draw = function(e, t) {
  8242. return this.DisplayObject_draw(e, t) ? !0 : (this._invalid && this._validate(), this._doDraw(e), !0)
  8243. },
  8244. r._invalid = !0,
  8245. r._text = "",
  8246. r._lineHeight = 30,
  8247. r._font = null,
  8248. r._format = n.format.left,
  8249. r._letterSpacing = 0,
  8250. r._lineSpacing = "",
  8251. r._leftMargin = "",
  8252. r._rightMargin = "",
  8253. r._width = 0,
  8254. r._height = 0,
  8255. r._cache = null,
  8256. r._cursorX = 0,
  8257. r._lines = null,
  8258. r._lineWidths = null,
  8259. r._currLineNum = 0,
  8260. r._spaceWidth = 0,
  8261. r._doDraw = function(e) {
  8262. var t = this._font.getImage(),
  8263. n = 0,
  8264. r = 0;
  8265. this.drawBorder && e.strokeRect(0, 0, this._width, this._height);
  8266. for (var i = 0; i < this._lines.length; i++) {
  8267. var s = this._lines[i];
  8268. this._drawLine(e, t, s, this._computeXPosition(this._lineWidths[i]), r),
  8269. r += this._lineHeight
  8270. }
  8271. },
  8272. r._computeXPosition = function(e) {
  8273. var t = 0;
  8274. switch (this._format) {
  8275. case n.format.center:
  8276. t = this._width / 2 - e / 2;
  8277. break;
  8278. case n.format.right:
  8279. t = this._width - e
  8280. }
  8281. return t
  8282. },
  8283. r._drawLine = function(e, t, n, r, i) {
  8284. for (var s = 0; s < n.length; s++) {
  8285. var o = n[s];
  8286. if (o == " ") r += this._spaceWidth;
  8287. else for (var u = 0; u < o.length; u++) {
  8288. var a = this._font.getCharData(o.charAt(u)),
  8289. f;
  8290. u > 0 && (f = this._font.getKerning(o.charAt(u - 1), o.charAt(u))),
  8291. f = f || 0,
  8292. e.drawImage(t, a.x, a.y, a.width, a.height, r + f, i, a.width, a.height),
  8293. r += Number(a.xadvance) + f + this._letterSpacing
  8294. }
  8295. }
  8296. },
  8297. r._invalidate = function() {
  8298. this._invalid = !0
  8299. },
  8300. r._validate = function() {
  8301. this._cursorX = 0,
  8302. this._lines.length = 0,
  8303. this._lineWidths.length = 0,
  8304. this._lines.push([]),
  8305. this._lineWidths.push(0),
  8306. this._currLineNum = 0;
  8307. var e = "",
  8308. t = this._text,
  8309. n = !1,
  8310. r = t.length;
  8311. for (var i = 0; i < r; i++) {
  8312. var s = t.charAt(i);
  8313. n = s === "\n" || s === " " || s == " ",
  8314. n ? e.length > 0 && (this._pushWorld(e), e = "") : e += s,
  8315. n && (s === "\n" ? this._pushNewLine() : s === " " ? this._pushTab() : s === " " && this._pushSpace())
  8316. }
  8317. e.length > 0 && this._pushWorld(e),
  8318. this._invalid = !1
  8319. },
  8320. r._pushWorld = function(e) {
  8321. var t = this._measureWordWidth(e);
  8322. this._cursorX + t <= this._width || this._lines[this._currLineNum].length == 0 ? this._lines[this._currLineNum].push(e) : (this._pushNewLine(), this._lines[this._currLineNum].push(e)),
  8323. this._cursorX += t,
  8324. this._lineWidths[this._currLineNum] = this._cursorX
  8325. },
  8326. r._pushSpace = function() {
  8327. this._lines[this._currLineNum].push(" "),
  8328. this._cursorX += this._spaceWidth
  8329. },
  8330. r._pushTab = function() {},
  8331. r._pushNewLine = function() {
  8332. this._lineWidths.push(0),
  8333. this._currLineNum++,
  8334. this._lines.push([]),
  8335. this._cursorX = 0
  8336. },
  8337. r._measureWordWidth = function(e) {
  8338. var t = e.length;
  8339. if (t == 0) return 0;
  8340. var n = 0,
  8341. r = e.charAt(0),
  8342. i = this._font.getCharData(r);
  8343. i && (n += i.xadvance);
  8344. var s = null;
  8345. for (var o = 1; o < e.length; o++) r = e.charAt(o),
  8346. i = this._font.getCharData(r),
  8347. i && (n += i.xadvance),
  8348. s = this._font.getKerning(e.charAt(o - 1), r),
  8349. s && (n += s),
  8350. n += this._letterSpacing;
  8351. return n
  8352. },
  8353. n
  8354. }), define("screens/GameOverPopUp", ["require", "assetStorage", "cjs", "bitmapText/BitmapFont", "bitmapText/BitmapTextField", "screenSize"],
  8355. function(e) {
  8356. var t = e("assetStorage"),
  8357. n = e("cjs"),
  8358. r = e("bitmapText/BitmapFont"),
  8359. i = e("bitmapText/BitmapTextField"),
  8360. s = e("screenSize"),
  8361. o = function() {
  8362. this.initialize(),
  8363. this.create()
  8364. },
  8365. u = o.prototype = new n.Container;
  8366. return u.setScore = function(e) {
  8367. this._score.setText(e)
  8368. },
  8369. u.setBestScore = function(e) {
  8370. this._bestScore.setText(e)
  8371. },
  8372. u.create = function() {
  8373. var e = new n.Shape;
  8374. e.graphics.beginFill("rgba(0, 0, 0, 0.3)").drawRect(0, 0, s.width, s.height),
  8375. this.addChild(e);
  8376. var o = new n.Container,
  8377. u = t.getBitmap("gfx/gameOverSign.png");
  8378. o.addChild(u);
  8379. var a = new n.Container,
  8380. f = t.getBitmap("gfx/scoreSign.png");
  8381. f.x = 0,
  8382. f.y = 0,
  8383. a.addChild(f);
  8384. var l = t.getBitmap("gfx/bestSign.png");
  8385. l.x = 250,
  8386. l.y = 0,
  8387. a.addChild(l);
  8388. var c = new r;
  8389. c.initWithJson(t.get("gfx/font.png"), t.get("gfx/font.json"));
  8390. var h = new i(c);
  8391. h.setText("000"),
  8392. h.setSize(205, 100),
  8393. h.x = f.x + (f.getBounds().width - h.getBounds().width) / 2,
  8394. h.y = 60,
  8395. h.setLetterSpacing( - 5),
  8396. h.setFormat(i.format.center),
  8397. h.mouseEnabled = !1,
  8398. a.addChild(h),
  8399. this._score = h;
  8400. var p = new i(c);
  8401. p.setSize(205, 100),
  8402. p.setText("000"),
  8403. p.x = l.x + (l.getBounds().width - p.getBounds().width) / 2,
  8404. p.y = 60,
  8405. p.setLetterSpacing( - 5),
  8406. p.setFormat(i.format.center),
  8407. p.mouseEnabled = !1,
  8408. a.addChild(p),
  8409. this._bestScore = p,
  8410. a.x = (u.getBounds().width - a.getBounds().width) / 2 - a.getBounds().x,
  8411. a.y = u.y + 150,
  8412. o.x = (s.width - o.getBounds().width) / 2,
  8413. o.y = (s.height - 325) / 2,
  8414. o.addChild(a),
  8415. this.addChild(o);
  8416. var d = t.getBitmap("gfx/tapToContinueSign.png");
  8417. d.x = (s.width - d.getBounds().width) / 2,
  8418. d.y = s.height - d.getBounds().height - 20,
  8419. this.addChild(d)
  8420. },
  8421. u.show = function(e) {
  8422. e.addChild(this)
  8423. },
  8424. u.close = function() {
  8425. this.parent && this.parent.removeChild(this)
  8426. },
  8427. u._score = null,
  8428. u._bestScore = null,
  8429. o
  8430. }), define("ProgressBarRenderer", ["require", "assetStorage", "cjs"],
  8431. function(e) {
  8432. var t = e("assetStorage"),
  8433. n = e("cjs"),
  8434. r = function() {
  8435. this.init()
  8436. },
  8437. i = r.prototype;
  8438. return i.init = function() {},
  8439. i.createView = function() {
  8440. this._owner.addChild(t.getBitmap("gfx/progressBarBackground.png"));
  8441. var e = t.getBitmap("gfx/progressBarForeground.png");
  8442. e.x = 12,
  8443. e.y = 6,
  8444. this._owner.addChild(e),
  8445. this._foreground = e
  8446. },
  8447. i.validate = function() {
  8448. this._foreground.scaleX = this._owner.getComputedValue() * 100 / 12
  8449. },
  8450. i._setOwner = function(e) {
  8451. this._owner = e,
  8452. this._owner.removeAllChildren(),
  8453. this.createView()
  8454. },
  8455. i._owner = null,
  8456. i._foreground = null,
  8457. r
  8458. }), define("gui/ProgressBar", ["cjs", "../ProgressBarRenderer"],
  8459. function(e, t) {
  8460. var n = function() {
  8461. this.initialize(new t)
  8462. },
  8463. r = n.prototype = new e.Container;
  8464. return r.Container_draw = r.draw,
  8465. r.Container_initialize = r.initialize,
  8466. r.initialize = function(e) {
  8467. this.Container_initialize(),
  8468. this.setRenderer(e)
  8469. },
  8470. r.getRenderer = function() {
  8471. return this._renderer
  8472. },
  8473. r.setRenderer = function(e) {
  8474. this._renderer = e,
  8475. this._renderer._setOwner(this)
  8476. },
  8477. r.getValue = function() {
  8478. return this._value
  8479. },
  8480. r.setValue = function(e) {
  8481. if (this._value == e) return;
  8482. this._value = e,
  8483. this.invalidate()
  8484. },
  8485. r.getMinValue = function() {
  8486. return this._minValue
  8487. },
  8488. r.setMinValue = function(e) {
  8489. if (this._minValue == e) return;
  8490. this._minValue = e,
  8491. this.invalidate()
  8492. },
  8493. r.getMaxValue = function() {
  8494. return this._maxValue
  8495. },
  8496. r.setMaxValue = function(e) {
  8497. if (this._maxValue == e) return;
  8498. this._maxValue = e,
  8499. this.invalidate()
  8500. },
  8501. r.getComputedValue = function() {
  8502. var e = 1 / ((this._maxValue - this._minValue) / (this._value - this._minValue));
  8503. return e < 0 ? 0 : e > 1 ? 1 : e
  8504. },
  8505. r.invalidate = function() {
  8506. this._invalid || (this._invalid = !0)
  8507. },
  8508. r.validate = function() {
  8509. this._invalid = !1,
  8510. this._renderer.validate()
  8511. },
  8512. r.draw = function(e, t) {
  8513. return this._invalid && this.validate(),
  8514. this.Container_draw(e, t)
  8515. },
  8516. r._invalid = !0,
  8517. r._value = .5,
  8518. r._minValue = 0,
  8519. r._maxValue = 1,
  8520. r._renderer = null,
  8521. n
  8522. }), define("screens/GameScreen", ["require", "Screen", "cjs", "assetStorage", "game/Game", "screens/GameOverPopUp", "gui/ProgressBar", "gui/BitmapButton", "bitmapText/BitmapFont", "bitmapText/BitmapTextField", "tweenjs", "screenSize"],
  8523. function(e) {
  8524. var t = e("Screen"),
  8525. n = e("cjs"),
  8526. r = e("assetStorage"),
  8527. i = e("game/Game"),
  8528. s = e("screens/GameOverPopUp"),
  8529. o = e("gui/ProgressBar"),
  8530. u = e("gui/BitmapButton"),
  8531. a = e("bitmapText/BitmapFont"),
  8532. f = e("bitmapText/BitmapTextField"),
  8533. l = e("tweenjs"),
  8534. c = e("screenSize"),
  8535. h = function(e, t) {
  8536. this.init(e, t)
  8537. },
  8538. p = h.prototype = new t;
  8539. return p.init = function(e, t) {
  8540. this._gameStage = e,
  8541. this._storage = t
  8542. },
  8543. p.didScreenSelected = function() {
  8544. this._paused = !1
  8545. },
  8546. p.didScreenUnselected = function() {
  8547. this._paused = !0
  8548. },
  8549. p._build = function() {
  8550. var e = new n.Container,
  8551. t = new n.Shape;
  8552. t.graphics.beginFill("rgba(0, 0, 0, 0.01)").drawRect(0, 0, c.width, c.height),
  8553. this.addChild(e),
  8554. this.addChild(t);
  8555. var s = new a;
  8556. s.initWithJson(r.get("gfx/smallDigits.png"), r.get("gfx/smallDigits.json"));
  8557. var h = new f(s);
  8558. h.x = 0,
  8559. h.y = 39,
  8560. h.setLetterSpacing( - 4),
  8561. h.setSize(c.width, 55),
  8562. h.setFormat(f.format.center),
  8563. h.mouseEnabled = !1,
  8564. this.addChild(h);
  8565. var p = r.getBitmap("gfx/scoreSignSmall.png");
  8566. p.x = (c.width - p.getBounds().width) / 2,
  8567. p.y = 13.5,
  8568. this.addChild(p);
  8569. var d = new o;
  8570. d.x = 300,
  8571. d.y = 300,
  8572. d.setValue(.3);
  8573. var v = new n.Container;
  8574. v.y = c.height - 800,
  8575. this.addChild(v),
  8576. this._game = new i(v, t, d, h),
  8577. this._game.on("gameOver",
  8578. function() {
  8579. this._showGameOverPopUp()
  8580. },
  8581. this);
  8582. var m = this._createTutorialSprite();
  8583. this.addChild(m),
  8584. l.Tween.get(m).wait(5e3).to({
  8585. alpha: 0
  8586. },
  8587. 500, l.Ease.backIn).call(function(e) {
  8588. this.removeChild(e)
  8589. },
  8590. [m], this);
  8591. var g = r.getBitmap("gfx/pauseButton.png"),
  8592. y = u.createButton({
  8593. x: c.width - 15,
  8594. y: 15,
  8595. anchorX: 1,
  8596. anchorY: 0,
  8597. flags: {
  8598. "default": {
  8599. active: g
  8600. }
  8601. }
  8602. });
  8603. y.on("click",
  8604. function() {
  8605. this.getScreenController().goToScreen("mainMenuScreen")
  8606. },
  8607. this),
  8608. this.addChild(y),
  8609. n.Ticker.on("tick",
  8610. function(e) {
  8611. if (this._paused) return;
  8612. var t = n.Ticker.getTime(),
  8613. r = (t - this._prevTime) / 1e3;
  8614. r > .05 && (r = .05),
  8615. this._game.update(r),
  8616. this._prevTime = t
  8617. },
  8618. this)
  8619. },
  8620. p._showGameOverPopUp = function() {
  8621. var e = this._storage.get("bestScore"),
  8622. t = this._game.getCurrScore();
  8623. //dp_submitScore(t);
  8624. if (!e || e < t) e = t,
  8625. this._storage.set("bestScore", e);
  8626. var n = new s;
  8627. n.show(this),
  8628. n.setScore(t.toString()),
  8629. n.setBestScore(e.toString());
  8630. var r = n.on("click",
  8631. function(e) {
  8632. this._game.replay(),
  8633. n.close(),
  8634. n.off("click", r)
  8635. },
  8636. this)
  8637. },
  8638. p._createTutorialSprite = function() {
  8639. var e = new createjs.SpriteSheet({
  8640. images: [r.get("gfx/tutorial.png")],
  8641. frames: [[1, 1, 126, 227, 0, 5.95, 3.95], [128, 1, 126, 227, 0, 5.95, 3.95]],
  8642. animations: {
  8643. idle: {
  8644. frames: [0, 1]
  8645. }
  8646. }
  8647. }),
  8648. t = new n.Sprite(e);
  8649. return t.x = (c.width - t.getBounds().width) / 2,
  8650. t.y = c.height / 4,
  8651. t.mouseEnabled = !1,
  8652. t.framerate = 1,
  8653. t.gotoAndPlay("idle"),
  8654. t
  8655. },
  8656. p._prevTime = 0,
  8657. p._storage = null,
  8658. p._gameStage = null,
  8659. p._game = null,
  8660. p.paused = !1,
  8661. h
  8662. }), define("screens/PreloadingScreen", ["require", "Screen", "cjs", "wuki"],
  8663. function(e) {
  8664. var t = e("Screen"),
  8665. n = e("cjs"),
  8666. r = e("wuki"),
  8667. i = function(e, t) {
  8668. this.init(e, t)
  8669. },
  8670. s = i.prototype = new t;
  8671. return s.init = function(e, t) {
  8672. this.initialize(),
  8673. this._loader = e,
  8674. this._screenSize = t,
  8675. this.mouseChildren = !1
  8676. },
  8677. s._loaderCompleteEventListener = null,
  8678. s._loaderProgressEventListener = null,
  8679. s._barForeground = null,
  8680. s._loader = null,
  8681. s._screenSize = null,
  8682. s._build = function() {
  8683. var e = 260,
  8684. t = 10,
  8685. r = new n.Shape;
  8686. r.graphics.beginStroke("#ffffff").setStrokeStyle(2).beginFill("rgba(0, 0, 0, 0)").drawRect(0, 0, e, t),
  8687. r.x = this._screenSize.width / 2 - e / 2,
  8688. r.y = this._screenSize.height / 2 - t / 2,
  8689. this.addChild(r);
  8690. var i = new n.Shape;
  8691. i.x = r.x,
  8692. i.y = r.y,
  8693. this.addChild(i),
  8694. this._barForeground = i;
  8695. var s = new n.Text("Loading", "bold 30px Arial, Helvetica, sans-serif", "#ffffff");
  8696. s.x = this._screenSize.width / 2 - s.getBounds().width / 2,
  8697. s.y = r.y - 40,
  8698. s.name = "loadingText",
  8699. this.addChild(s);
  8700. var o = new n.Shape;
  8701. o.graphics.beginFill("#ffffff").drawRect(0, 0, this._screenSize.width, this._screenSize.height),
  8702. this.hitArea = o,
  8703. this._loaderProgressEventListener = this._loader.on("progress", this._handleLoadQueueProgressEvent, this),
  8704. this._loaderCompleteEventListener = this._loader.on("complete", this._handleLoadQueueCompleteEvent, this)
  8705. },
  8706. s._handleLoadQueueProgressEvent = function(e) {
  8707. this._barForeground.graphics.clear().beginStroke("#ffffff").setStrokeStyle(2).beginFill("#ffffff").drawRect(0, 0, e.progress * 260, 10)
  8708. },
  8709. s._handleLoadQueueCompleteEvent = function() {
  8710. this._loader.off("progress", this._loaderProgressEventListener),
  8711. this._loader.off("complete", this._loaderCompleteEventListener),
  8712. this._loaderProgressEventListener = null,
  8713. this._loaderCompleteEventListener = null;
  8714. var e = this;
  8715. r("showSplash",
  8716. function() {
  8717. e.getScreenController().goToScreen("mainMenuScreen")
  8718. })
  8719. },
  8720. i
  8721. }), define("ScreenController", [],
  8722. function() {
  8723. var e = function(e) {
  8724. this._activeScreen = null,
  8725. this._screens = null,
  8726. this._view = e
  8727. },
  8728. t = e.prototype;
  8729. return t.getActiveScreen = function() {
  8730. return this._activeScreen
  8731. },
  8732. t.getScreens = function() {
  8733. return this._screens
  8734. },
  8735. t.setScreens = function(e) {
  8736. var t = {};
  8737. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n], t[n]._name = n);
  8738. this._screens = t
  8739. },
  8740. t.goToScreen = function(e) {
  8741. if (!this._screens.hasOwnProperty(e)) throw new Error("Can't find screen with provided name: " + e);
  8742. var t = this._screens[e];
  8743. t._builded || (t._build(), t._builded = !0),
  8744. this._pushScreen(t)
  8745. },
  8746. t._pushScreen = function(e) {
  8747. this._activeScreen && (this._activeScreen.didScreenUnselected(), this._activeScreen._screenController = null, this._view.removeChild(this._activeScreen)),
  8748. this._activeScreen = e,
  8749. this._activeScreen && (this._activeScreen._screenController = this, this._activeScreen.didScreenSelected(this), this._view.addChild(this._activeScreen))
  8750. },
  8751. e
  8752. }), this.createjs = this.createjs || {},
  8753. function() {
  8754. var e = createjs.PreloadJS = createjs.PreloadJS || {};
  8755. e.version = "0.4.1",
  8756. e.buildDate = "Thu, 12 Dec 2013 23:33:38 GMT"
  8757. } (), this.createjs = this.createjs || {},
  8758. function() {
  8759. var e = function(e, t, n) {
  8760. this.initialize(e, t, n)
  8761. },
  8762. t = e.prototype;
  8763. t.type = null,
  8764. t.target = null,
  8765. t.currentTarget = null,
  8766. t.eventPhase = 0,
  8767. t.bubbles = !1,
  8768. t.cancelable = !1,
  8769. t.timeStamp = 0,
  8770. t.defaultPrevented = !1,
  8771. t.propagationStopped = !1,
  8772. t.immediatePropagationStopped = !1,
  8773. t.removed = !1,
  8774. t.initialize = function(e, t, n) {
  8775. this.type = e,
  8776. this.bubbles = t,
  8777. this.cancelable = n,
  8778. this.timeStamp = (new Date).getTime()
  8779. },
  8780. t.preventDefault = function() {
  8781. this.defaultPrevented = !0
  8782. },
  8783. t.stopPropagation = function() {
  8784. this.propagationStopped = !0
  8785. },
  8786. t.stopImmediatePropagation = function() {
  8787. this.immediatePropagationStopped = this.propagationStopped = !0
  8788. },
  8789. t.remove = function() {
  8790. this.removed = !0
  8791. },
  8792. t.clone = function() {
  8793. return new e(this.type, this.bubbles, this.cancelable)
  8794. },
  8795. t.toString = function() {
  8796. return "[Event (type=" + this.type + ")]"
  8797. },
  8798. createjs.Event = e
  8799. } (), this.createjs = this.createjs || {},
  8800. function() {
  8801. var e = function() {},
  8802. t = e.prototype;
  8803. e.initialize = function(e) {
  8804. e.addEventListener = t.addEventListener,
  8805. e.on = t.on,
  8806. e.removeEventListener = e.off = t.removeEventListener,
  8807. e.removeAllEventListeners = t.removeAllEventListeners,
  8808. e.hasEventListener = t.hasEventListener,
  8809. e.dispatchEvent = t.dispatchEvent,
  8810. e._dispatchEvent = t._dispatchEvent,
  8811. e.willTrigger = t.willTrigger
  8812. },
  8813. t._listeners = null,
  8814. t._captureListeners = null,
  8815. t.initialize = function() {},
  8816. t.addEventListener = function(e, t, n) {
  8817. var r;
  8818. r = n ? this._captureListeners = this._captureListeners || {}: this._listeners = this._listeners || {};
  8819. var i = r[e];
  8820. return i && this.removeEventListener(e, t, n),
  8821. i = r[e],
  8822. i ? i.push(t) : r[e] = [t],
  8823. t
  8824. },
  8825. t.on = function(e, t, n, r, i, s) {
  8826. return t.handleEvent && (n = n || t, t = t.handleEvent),
  8827. n = n || this,
  8828. this.addEventListener(e,
  8829. function(e) {
  8830. t.call(n, e, i),
  8831. r && e.remove()
  8832. },
  8833. s)
  8834. },
  8835. t.removeEventListener = function(e, t, n) {
  8836. var r = n ? this._captureListeners: this._listeners;
  8837. if (r) {
  8838. var i = r[e];
  8839. if (i) for (var s = 0,
  8840. o = i.length; o > s; s++) if (i[s] == t) {
  8841. 1 == o ? delete r[e] : i.splice(s, 1);
  8842. break
  8843. }
  8844. }
  8845. },
  8846. t.off = t.removeEventListener,
  8847. t.removeAllEventListeners = function(e) {
  8848. e ? (this._listeners && delete this._listeners[e], this._captureListeners && delete this._captureListeners[e]) : this._listeners = this._captureListeners = null
  8849. },
  8850. t.dispatchEvent = function(e, t) {
  8851. if ("string" == typeof e) {
  8852. var n = this._listeners;
  8853. if (!n || !n[e]) return ! 1;
  8854. e = new createjs.Event(e)
  8855. }
  8856. if (e.target = t || this, e.bubbles && this.parent) {
  8857. for (var r = this,
  8858. i = [r]; r.parent;) i.push(r = r.parent);
  8859. var s, o = i.length;
  8860. for (s = o - 1; s >= 0 && !e.propagationStopped; s--) i[s]._dispatchEvent(e, 1 + (0 == s));
  8861. for (s = 1; o > s && !e.propagationStopped; s++) i[s]._dispatchEvent(e, 3)
  8862. } else this._dispatchEvent(e, 2);
  8863. return e.defaultPrevented
  8864. },
  8865. t.hasEventListener = function(e) {
  8866. var t = this._listeners,
  8867. n = this._captureListeners;
  8868. return !! (t && t[e] || n && n[e])
  8869. },
  8870. t.willTrigger = function(e) {
  8871. for (var t = this; t;) {
  8872. if (t.hasEventListener(e)) return ! 0;
  8873. t = t.parent
  8874. }
  8875. return ! 1
  8876. },
  8877. t.toString = function() {
  8878. return "[EventDispatcher]"
  8879. },
  8880. t._dispatchEvent = function(e, t) {
  8881. var n, r = 1 == t ? this._captureListeners: this._listeners;
  8882. if (e && r) {
  8883. var i = r[e.type];
  8884. if (!i || !(n = i.length)) return;
  8885. e.currentTarget = this,
  8886. e.eventPhase = t,
  8887. e.removed = !1,
  8888. i = i.slice();
  8889. for (var s = 0; n > s && !e.immediatePropagationStopped; s++) {
  8890. var o = i[s];
  8891. o.handleEvent ? o.handleEvent(e) : o(e),
  8892. e.removed && (this.off(e.type, o, 1 == t), e.removed = !1)
  8893. }
  8894. }
  8895. },
  8896. createjs.EventDispatcher = e
  8897. } (), this.createjs = this.createjs || {},
  8898. function() {
  8899. createjs.indexOf = function(e, t) {
  8900. for (var n = 0,
  8901. r = e.length; r > n; n++) if (t === e[n]) return n;
  8902. return - 1
  8903. }
  8904. } (), this.createjs = this.createjs || {},
  8905. function() {
  8906. createjs.proxy = function(e, t) {
  8907. var n = Array.prototype.slice.call(arguments, 2);
  8908. return function() {
  8909. return e.apply(t, Array.prototype.slice.call(arguments, 0).concat(n))
  8910. }
  8911. }
  8912. } (), this.createjs = this.createjs || {},
  8913. function() {
  8914. var e = function() {
  8915. this.init()
  8916. };
  8917. e.prototype = new createjs.EventDispatcher;
  8918. var t = e.prototype,
  8919. n = e;
  8920. n.FILE_PATTERN=/^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?)|(.{0,2}\/{1}))?([/.]*?(?:[^?]+)?\/)?((?:[^/?]+)\.(\w+))(?:\?(\S+)?)?$/,n.PATH_PATTERN=/^(?:(\w+:)\/{2})|(.{0,2}\/{1})?([/.]*?(?:[^?]+)?\/?)?$/,t.loaded = !1, t.canceled = !1, t.progress = 0, t._item = null, t.getItem = function() {
  8921. return this._item
  8922. },
  8923. t.init = function() {},
  8924. t.load = function() {},
  8925. t.close = function() {},
  8926. t._sendLoadStart = function() {
  8927. this._isCanceled() || this.dispatchEvent("loadstart")
  8928. },
  8929. t._sendProgress = function(e) {
  8930. if (!this._isCanceled()) {
  8931. var t = null;
  8932. "number" == typeof e ? (this.progress = e, t = new createjs.Event("progress"), t.loaded = this.progress, t.total = 1) : (t = e, this.progress = e.loaded / e.total, (isNaN(this.progress) || 1 / 0 == this.progress) && (this.progress = 0)),
  8933. t.progress = this.progress,
  8934. this.hasEventListener("progress") && this.dispatchEvent(t)
  8935. }
  8936. },
  8937. t._sendComplete = function() {
  8938. this._isCanceled() || this.dispatchEvent("complete")
  8939. },
  8940. t._sendError = function(e) { ! this._isCanceled() && this.hasEventListener("error") && (null == e && (e = new createjs.Event("error")), this.dispatchEvent(e))
  8941. },
  8942. t._isCanceled = function() {
  8943. return null == window.createjs || this.canceled ? !0 : !1
  8944. },
  8945. t._parseURI = function(e) {
  8946. return e ? e.match(n.FILE_PATTERN) : null
  8947. },
  8948. t._parsePath = function(e) {
  8949. return e ? e.match(n.PATH_PATTERN) : null
  8950. },
  8951. t._formatQueryString = function(e, t) {
  8952. if (null == e) throw new Error("You must specify data.");
  8953. var n = [];
  8954. for (var r in e) n.push(r + "=" + escape(e[r]));
  8955. return t && (n = n.concat(t)),
  8956. n.join("&")
  8957. },
  8958. t.buildPath = function(e, t) {
  8959. if (null == t) return e;
  8960. var n = [],
  8961. r = e.indexOf("?");
  8962. if ( - 1 != r) {
  8963. var i = e.slice(r + 1);
  8964. n = n.concat(i.split("&"))
  8965. }
  8966. return - 1 != r ? e.slice(0, r) + "?" + this._formatQueryString(t, n) : e + "?" + this._formatQueryString(t, n)
  8967. },
  8968. t._isCrossDomain = function(e) {
  8969. var t = document.createElement("a");
  8970. t.href = e.src;
  8971. var n = document.createElement("a");
  8972. n.href = location.href;
  8973. var r = "" != t.hostname && (t.port != n.port || t.protocol != n.protocol || t.hostname != n.hostname);
  8974. return r
  8975. },
  8976. t._isLocal = function(e) {
  8977. var t = document.createElement("a");
  8978. return t.href = e.src,
  8979. "" == t.hostname && "file:" == t.protocol
  8980. },
  8981. t.toString = function() {
  8982. return "[PreloadJS AbstractLoader]"
  8983. },
  8984. createjs.AbstractLoader = e
  8985. } (), this.createjs = this.createjs || {},
  8986. function() {
  8987. var e = function(e, t, n) {
  8988. this.init(e, t, n)
  8989. },
  8990. t = e.prototype = new createjs.AbstractLoader,
  8991. n = e;
  8992. n.loadTimeout = 8e3,
  8993. n.LOAD_TIMEOUT = 0,
  8994. n.BINARY = "binary",
  8995. n.CSS = "css",
  8996. n.IMAGE = "image",
  8997. n.JAVASCRIPT = "javascript",
  8998. n.JSON = "json",
  8999. n.JSONP = "jsonp",
  9000. n.MANIFEST = "manifest",
  9001. n.SOUND = "sound",
  9002. n.SVG = "svg",
  9003. n.TEXT = "text",
  9004. n.XML = "xml",
  9005. n.POST = "POST",
  9006. n.GET = "GET",
  9007. t._basePath = null,
  9008. t._crossOrigin = "",
  9009. t.useXHR = !0,
  9010. t.stopOnError = !1,
  9011. t.maintainScriptOrder = !0,
  9012. t.next = null,
  9013. t._typeCallbacks = null,
  9014. t._extensionCallbacks = null,
  9015. t._loadStartWasDispatched = !1,
  9016. t._maxConnections = 1,
  9017. t._currentlyLoadingScript = null,
  9018. t._currentLoads = null,
  9019. t._loadQueue = null,
  9020. t._loadQueueBackup = null,
  9021. t._loadItemsById = null,
  9022. t._loadItemsBySrc = null,
  9023. t._loadedResults = null,
  9024. t._loadedRawResults = null,
  9025. t._numItems = 0,
  9026. t._numItemsLoaded = 0,
  9027. t._scriptOrder = null,
  9028. t._loadedScripts = null,
  9029. t.init = function(e, t, n) {
  9030. this._numItems = this._numItemsLoaded = 0,
  9031. this._paused = !1,
  9032. this._loadStartWasDispatched = !1,
  9033. this._currentLoads = [],
  9034. this._loadQueue = [],
  9035. this._loadQueueBackup = [],
  9036. this._scriptOrder = [],
  9037. this._loadedScripts = [],
  9038. this._loadItemsById = {},
  9039. this._loadItemsBySrc = {},
  9040. this._loadedResults = {},
  9041. this._loadedRawResults = {},
  9042. this._typeCallbacks = {},
  9043. this._extensionCallbacks = {},
  9044. this._basePath = t,
  9045. this.setUseXHR(e),
  9046. this._crossOrigin = n === !0 ? "Anonymous": n === !1 || null == n ? "": n
  9047. },
  9048. t.setUseXHR = function(e) {
  9049. return this.useXHR = 0 != e && null != window.XMLHttpRequest,
  9050. this.useXHR
  9051. },
  9052. t.removeAll = function() {
  9053. this.remove()
  9054. },
  9055. t.remove = function(e) {
  9056. var t = null;
  9057. if (!e || e instanceof Array) {
  9058. if (e) t = e;
  9059. else if (arguments.length > 0) return
  9060. } else t = [e];
  9061. var n = !1;
  9062. if (t) {
  9063. for (; t.length;) {
  9064. var r = t.pop(),
  9065. i = this.getResult(r);
  9066. for (s = this._loadQueue.length - 1; s >= 0; s--) if (o = this._loadQueue[s].getItem(), o.id == r || o.src == r) {
  9067. this._loadQueue.splice(s, 1)[0].cancel();
  9068. break
  9069. }
  9070. for (s = this._loadQueueBackup.length - 1; s >= 0; s--) if (o = this._loadQueueBackup[s].getItem(), o.id == r || o.src == r) {
  9071. this._loadQueueBackup.splice(s, 1)[0].cancel();
  9072. break
  9073. }
  9074. if (i) delete this._loadItemsById[i.id],
  9075. delete this._loadItemsBySrc[i.src],
  9076. this._disposeItem(i);
  9077. else for (var s = this._currentLoads.length - 1; s >= 0; s--) {
  9078. var o = this._currentLoads[s].getItem();
  9079. if (o.id == r || o.src == r) {
  9080. this._currentLoads.splice(s, 1)[0].cancel(),
  9081. n = !0;
  9082. break
  9083. }
  9084. }
  9085. }
  9086. n && this._loadNext()
  9087. } else {
  9088. this.close();
  9089. for (var u in this._loadItemsById) this._disposeItem(this._loadItemsById[u]);
  9090. this.init(this.useXHR)
  9091. }
  9092. },
  9093. t.reset = function() {
  9094. this.close();
  9095. for (var e in this._loadItemsById) this._disposeItem(this._loadItemsById[e]);
  9096. for (var t = [], n = 0, r = this._loadQueueBackup.length; r > n; n++) t.push(this._loadQueueBackup[n].getItem());
  9097. this.loadManifest(t, !1)
  9098. },
  9099. n.isBinary = function(e) {
  9100. switch (e) {
  9101. case createjs.LoadQueue.IMAGE:
  9102. case createjs.LoadQueue.BINARY:
  9103. return ! 0;
  9104. default:
  9105. return ! 1
  9106. }
  9107. },
  9108. n.isText = function(e) {
  9109. switch (e) {
  9110. case createjs.LoadQueue.TEXT:
  9111. case createjs.LoadQueue.JSON:
  9112. case createjs.LoadQueue.MANIFEST:
  9113. case createjs.LoadQueue.XML:
  9114. case createjs.LoadQueue.HTML:
  9115. case createjs.LoadQueue.CSS:
  9116. case createjs.LoadQueue.SVG:
  9117. case createjs.LoadQueue.JAVASCRIPT:
  9118. return ! 0;
  9119. default:
  9120. return ! 1
  9121. }
  9122. },
  9123. t.installPlugin = function(e) {
  9124. if (null != e && null != e.getPreloadHandlers) {
  9125. var t = e.getPreloadHandlers();
  9126. if (t.scope = e, null != t.types) for (var n = 0,
  9127. r = t.types.length; r > n; n++) this._typeCallbacks[t.types[n]] = t;
  9128. if (null != t.extensions) for (n = 0, r = t.extensions.length; r > n; n++) this._extensionCallbacks[t.extensions[n]] = t
  9129. }
  9130. },
  9131. t.setMaxConnections = function(e) {
  9132. this._maxConnections = e,
  9133. !this._paused && this._loadQueue.length > 0 && this._loadNext()
  9134. },
  9135. t.loadFile = function(e, t, n) {
  9136. if (null == e) {
  9137. var r = new createjs.Event("error");
  9138. return r.text = "PRELOAD_NO_FILE",
  9139. this._sendError(r),
  9140. void 0
  9141. }
  9142. this._addItem(e, null, n),
  9143. t !== !1 ? this.setPaused(!1) : this.setPaused(!0)
  9144. },
  9145. t.loadManifest = function(e, t, r) {
  9146. var i = null,
  9147. s = null;
  9148. if (e instanceof Array) {
  9149. if (0 == e.length) {
  9150. var o = new createjs.Event("error");
  9151. return o.text = "PRELOAD_MANIFEST_EMPTY",
  9152. this._sendError(o),
  9153. void 0
  9154. }
  9155. i = e
  9156. } else if ("string" == typeof e) i = [{
  9157. src: e,
  9158. type: n.MANIFEST
  9159. }];
  9160. else {
  9161. if ("object" != typeof e) {
  9162. var o = new createjs.Event("error");
  9163. return o.text = "PRELOAD_MANIFEST_NULL",
  9164. this._sendError(o),
  9165. void 0
  9166. }
  9167. if (void 0 !== e.src) {
  9168. if (null == e.type) e.type = n.MANIFEST;
  9169. else if (e.type != n.MANIFEST) {
  9170. var o = new createjs.Event("error");
  9171. o.text = "PRELOAD_MANIFEST_ERROR",
  9172. this._sendError(o)
  9173. }
  9174. i = [e]
  9175. } else void 0 !== e.manifest && (i = e.manifest, s = e.path)
  9176. }
  9177. for (var u = 0,
  9178. a = i.length; a > u; u++) this._addItem(i[u], s, r);
  9179. t !== !1 ? this.setPaused(!1) : this.setPaused(!0)
  9180. },
  9181. t.load = function() {
  9182. this.setPaused(!1)
  9183. },
  9184. t.getItem = function(e) {
  9185. return this._loadItemsById[e] || this._loadItemsBySrc[e]
  9186. },
  9187. t.getResult = function(e, t) {
  9188. var n = this._loadItemsById[e] || this._loadItemsBySrc[e];
  9189. if (null == n) return null;
  9190. var r = n.id;
  9191. return t && this._loadedRawResults[r] ? this._loadedRawResults[r] : this._loadedResults[r]
  9192. },
  9193. t.setPaused = function(e) {
  9194. this._paused = e,
  9195. this._paused || this._loadNext()
  9196. },
  9197. t.close = function() {
  9198. for (; this._currentLoads.length;) this._currentLoads.pop().cancel();
  9199. this._scriptOrder.length = 0,
  9200. this._loadedScripts.length = 0,
  9201. this.loadStartWasDispatched = !1
  9202. },
  9203. t._addItem = function(e, t, n) {
  9204. var r = this._createLoadItem(e, t, n);
  9205. if (null != r) {
  9206. var i = this._createLoader(r);
  9207. null != i && (this._loadQueue.push(i), this._loadQueueBackup.push(i), this._numItems++, this._updateProgress(), this.maintainScriptOrder && r.type == createjs.LoadQueue.JAVASCRIPT && i instanceof createjs.XHRLoader && (this._scriptOrder.push(r), this._loadedScripts.push(null)))
  9208. }
  9209. },
  9210. t._createLoadItem = function(e, t, n) {
  9211. var r = null;
  9212. switch (typeof e) {
  9213. case "string":
  9214. r = {
  9215. src: e
  9216. };
  9217. break;
  9218. case "object":
  9219. r = window.HTMLAudioElement && e instanceof window.HTMLAudioElement ? {
  9220. tag: e,
  9221. src: r.tag.src,
  9222. type: createjs.LoadQueue.SOUND
  9223. }: e;
  9224. break;
  9225. default:
  9226. return null
  9227. }
  9228. var i = this._parseURI(r.src);
  9229. null != i && (r.ext = i[6]),
  9230. null == r.type && (r.type = this._getTypeByExtension(r.ext));
  9231. var s = "",
  9232. o = n || this._basePath,
  9233. u = r.src;
  9234. if (i && null == i[1] && null == i[3]) if (t) {
  9235. s = t;
  9236. var a = this._parsePath(t);
  9237. u = t + u,
  9238. null != o && a && null == a[1] && null == a[2] && (s = o + s)
  9239. } else null != o && (s = o);
  9240. if (r.src = s + r.src, r.path = s, (r.type == createjs.LoadQueue.JSON || r.type == createjs.LoadQueue.MANIFEST) && (r._loadAsJSONP = null != r.callback), r.type == createjs.LoadQueue.JSONP && null == r.callback) throw new Error("callback is required for loading JSONP requests."); (void 0 === r.tag || null === r.tag) && (r.tag = this._createTag(r)),
  9241. (void 0 === r.id || null === r.id || "" === r.id) && (r.id = u);
  9242. var f = this._typeCallbacks[r.type] || this._extensionCallbacks[r.ext];
  9243. if (f) {
  9244. var l = f.callback.call(f.scope, r.src, r.type, r.id, r.data, s, this);
  9245. if (l === !1) return null;
  9246. l === !0 || (null != l.src && (r.src = l.src), null != l.id && (r.id = l.id), null != l.tag && (r.tag = l.tag), null != l.completeHandler && (r.completeHandler = l.completeHandler), l.type && (r.type = l.type), i = this._parseURI(r.src), null != i && null != i[6] && (r.ext = i[6].toLowerCase()))
  9247. }
  9248. return this._loadItemsById[r.id] = r,
  9249. this._loadItemsBySrc[r.src] = r,
  9250. r
  9251. },
  9252. t._createLoader = function(e) {
  9253. var t = this.useXHR;
  9254. switch (e.type) {
  9255. case createjs.LoadQueue.JSON:
  9256. case createjs.LoadQueue.MANIFEST:
  9257. t = !e._loadAsJSONP;
  9258. break;
  9259. case createjs.LoadQueue.XML:
  9260. case createjs.LoadQueue.TEXT:
  9261. t = !0;
  9262. break;
  9263. case createjs.LoadQueue.SOUND:
  9264. case createjs.LoadQueue.JSONP:
  9265. t = !1;
  9266. break;
  9267. case null:
  9268. return null
  9269. }
  9270. return t ? new createjs.XHRLoader(e, this._crossOrigin) : new createjs.TagLoader(e)
  9271. },
  9272. t._loadNext = function() {
  9273. if (!this._paused) {
  9274. this._loadStartWasDispatched || (this._sendLoadStart(), this._loadStartWasDispatched = !0),
  9275. this._numItems == this._numItemsLoaded ? (this.loaded = !0, this._sendComplete(), this.next && this.next.load && this.next.load()) : this.loaded = !1;
  9276. for (var e = 0; e < this._loadQueue.length && !(this._currentLoads.length >= this._maxConnections); e++) {
  9277. var t = this._loadQueue[e];
  9278. if (this.maintainScriptOrder && t instanceof createjs.TagLoader && t.getItem().type == createjs.LoadQueue.JAVASCRIPT) {
  9279. if (this._currentlyLoadingScript) continue;
  9280. this._currentlyLoadingScript = !0
  9281. }
  9282. this._loadQueue.splice(e, 1),
  9283. e--,
  9284. this._loadItem(t)
  9285. }
  9286. }
  9287. },
  9288. t._loadItem = function(e) {
  9289. e.on("progress", this._handleProgress, this),
  9290. e.on("complete", this._handleFileComplete, this),
  9291. e.on("error", this._handleFileError, this),
  9292. this._currentLoads.push(e),
  9293. this._sendFileStart(e.getItem()),
  9294. e.load()
  9295. },
  9296. t._handleFileError = function(e) {
  9297. var t = e.target;
  9298. this._numItemsLoaded++,
  9299. this._updateProgress();
  9300. var n = new createjs.Event("error");
  9301. n.text = "FILE_LOAD_ERROR",
  9302. n.item = t.getItem(),
  9303. this._sendError(n),
  9304. this.stopOnError || (this._removeLoadItem(t), this._loadNext())
  9305. },
  9306. t._handleFileComplete = function(e) {
  9307. var t = e.target,
  9308. n = t.getItem();
  9309. if (this._loadedResults[n.id] = t.getResult(), t instanceof createjs.XHRLoader && (this._loadedRawResults[n.id] = t.getResult(!0)), this._removeLoadItem(t), this.maintainScriptOrder && n.type == createjs.LoadQueue.JAVASCRIPT) {
  9310. if (! (t instanceof createjs.TagLoader)) return this._loadedScripts[createjs.indexOf(this._scriptOrder, n)] = n,
  9311. this._checkScriptLoadOrder(t),
  9312. void 0;
  9313. this._currentlyLoadingScript = !1
  9314. }
  9315. if (delete n._loadAsJSONP, n.type == createjs.LoadQueue.MANIFEST) {
  9316. var r = t.getResult();
  9317. null != r && void 0 !== r.manifest && this.loadManifest(r, !0)
  9318. }
  9319. this._processFinishedLoad(n, t)
  9320. },
  9321. t._processFinishedLoad = function(e, t) {
  9322. this._numItemsLoaded++,
  9323. this._updateProgress(),
  9324. this._sendFileComplete(e, t),
  9325. this._loadNext()
  9326. },
  9327. t._checkScriptLoadOrder = function() {
  9328. for (var e = this._loadedScripts.length,
  9329. t = 0; e > t; t++) {
  9330. var n = this._loadedScripts[t];
  9331. if (null === n) break;
  9332. if (n !== !0) {
  9333. var r = this._loadedResults[n.id]; (document.body || document.getElementsByTagName("body")[0]).appendChild(r),
  9334. this._processFinishedLoad(n),
  9335. this._loadedScripts[t] = !0
  9336. }
  9337. }
  9338. },
  9339. t._removeLoadItem = function(e) {
  9340. for (var t = this._currentLoads.length,
  9341. n = 0; t > n; n++) if (this._currentLoads[n] == e) {
  9342. this._currentLoads.splice(n, 1);
  9343. break
  9344. }
  9345. },
  9346. t._handleProgress = function(e) {
  9347. var t = e.target;
  9348. this._sendFileProgress(t.getItem(), t.progress),
  9349. this._updateProgress()
  9350. },
  9351. t._updateProgress = function() {
  9352. var e = this._numItemsLoaded / this._numItems,
  9353. t = this._numItems - this._numItemsLoaded;
  9354. if (t > 0) {
  9355. for (var n = 0,
  9356. r = 0,
  9357. i = this._currentLoads.length; i > r; r++) n += this._currentLoads[r].progress;
  9358. e += n / t * (t / this._numItems)
  9359. }
  9360. this._sendProgress(e)
  9361. },
  9362. t._disposeItem = function(e) {
  9363. delete this._loadedResults[e.id],
  9364. delete this._loadedRawResults[e.id],
  9365. delete this._loadItemsById[e.id],
  9366. delete this._loadItemsBySrc[e.src]
  9367. },
  9368. t._createTag = function(e) {
  9369. var t = null;
  9370. switch (e.type) {
  9371. case createjs.LoadQueue.IMAGE:
  9372. return t = document.createElement("img"),
  9373. "" == this._crossOrigin || this._isLocal(e) || (t.crossOrigin = this._crossOrigin),
  9374. t;
  9375. case createjs.LoadQueue.SOUND:
  9376. return t = document.createElement("audio"),
  9377. t.autoplay = !1,
  9378. t;
  9379. case createjs.LoadQueue.JSON:
  9380. case createjs.LoadQueue.JSONP:
  9381. case createjs.LoadQueue.JAVASCRIPT:
  9382. case createjs.LoadQueue.MANIFEST:
  9383. return t = document.createElement("script"),
  9384. t.type = "text/javascript",
  9385. t;
  9386. case createjs.LoadQueue.CSS:
  9387. return t = this.useXHR ? document.createElement("style") : document.createElement("link"),
  9388. t.rel = "stylesheet",
  9389. t.type = "text/css",
  9390. t;
  9391. case createjs.LoadQueue.SVG:
  9392. return this.useXHR ? t = document.createElement("svg") : (t = document.createElement("object"), t.type = "image/svg+xml"),
  9393. t
  9394. }
  9395. return null
  9396. },
  9397. t._getTypeByExtension = function(e) {
  9398. if (null == e) return createjs.LoadQueue.TEXT;
  9399. switch (e.toLowerCase()) {
  9400. case "jpeg":
  9401. case "jpg":
  9402. case "gif":
  9403. case "png":
  9404. case "webp":
  9405. case "bmp":
  9406. return createjs.LoadQueue.IMAGE;
  9407. case "ogg":
  9408. case "mp3":
  9409. case "wav":
  9410. return createjs.LoadQueue.SOUND;
  9411. case "json":
  9412. return createjs.LoadQueue.JSON;
  9413. case "xml":
  9414. return createjs.LoadQueue.XML;
  9415. case "css":
  9416. return createjs.LoadQueue.CSS;
  9417. case "js":
  9418. return createjs.LoadQueue.JAVASCRIPT;
  9419. case "svg":
  9420. return createjs.LoadQueue.SVG;
  9421. default:
  9422. return createjs.LoadQueue.TEXT
  9423. }
  9424. },
  9425. t._sendFileProgress = function(e, t) {
  9426. if (this._isCanceled()) return this._cleanUp(),
  9427. void 0;
  9428. if (this.hasEventListener("fileprogress")) {
  9429. var n = new createjs.Event("fileprogress");
  9430. n.progress = t,
  9431. n.loaded = t,
  9432. n.total = 1,
  9433. n.item = e,
  9434. this.dispatchEvent(n)
  9435. }
  9436. },
  9437. t._sendFileComplete = function(e, t) {
  9438. if (!this._isCanceled()) {
  9439. var n = new createjs.Event("fileload");
  9440. n.prld = t,
  9441. n.item = e,
  9442. n.result = this._loadedResults[e.id],
  9443. n.rawResult = this._loadedRawResults[e.id],
  9444. e.completeHandler && e.completeHandler(n),
  9445. this.hasEventListener("fileload") && this.dispatchEvent(n)
  9446. }
  9447. },
  9448. t._sendFileStart = function(e) {
  9449. var t = new createjs.Event("filestart");
  9450. t.item = e,
  9451. this.hasEventListener("filestart") && this.dispatchEvent(t)
  9452. },
  9453. t.toString = function() {
  9454. return "[PreloadJS LoadQueue]"
  9455. },
  9456. createjs.LoadQueue = e;
  9457. var r = function() {};
  9458. r.init = function() {
  9459. var e = navigator.userAgent;
  9460. r.isFirefox = e.indexOf("Firefox") > -1,
  9461. r.isOpera = null != window.opera,
  9462. r.isChrome = e.indexOf("Chrome") > -1,
  9463. r.isIOS = e.indexOf("iPod") > -1 || e.indexOf("iPhone") > -1 || e.indexOf("iPad") > -1
  9464. },
  9465. r.init(),
  9466. createjs.LoadQueue.BrowserDetect = r
  9467. } (), this.createjs = this.createjs || {},
  9468. function() {
  9469. var e = function(e) {
  9470. this.init(e)
  9471. },
  9472. t = e.prototype = new createjs.AbstractLoader;
  9473. t._loadTimeout = null,
  9474. t._tagCompleteProxy = null,
  9475. t._isAudio = !1,
  9476. t._tag = null,
  9477. t._jsonResult = null,
  9478. t.init = function(e) {
  9479. this._item = e,
  9480. this._tag = e.tag,
  9481. this._isAudio = window.HTMLAudioElement && e.tag instanceof window.HTMLAudioElement,
  9482. this._tagCompleteProxy = createjs.proxy(this._handleLoad, this)
  9483. },
  9484. t.getResult = function() {
  9485. return this._item.type == createjs.LoadQueue.JSONP || this._item.type == createjs.LoadQueue.MANIFEST ? this._jsonResult: this._tag
  9486. },
  9487. t.cancel = function() {
  9488. this.canceled = !0,
  9489. this._clean()
  9490. },
  9491. t.load = function() {
  9492. var e = this._item,
  9493. t = this._tag;
  9494. clearTimeout(this._loadTimeout);
  9495. var n = createjs.LoadQueue.LOAD_TIMEOUT;
  9496. 0 == n && (n = createjs.LoadQueue.loadTimeout),
  9497. this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), n),
  9498. this._isAudio && (t.src = null, t.preload = "auto"),
  9499. t.onerror = createjs.proxy(this._handleError, this),
  9500. this._isAudio ? (t.onstalled = createjs.proxy(this._handleStalled, this), t.addEventListener("canplaythrough", this._tagCompleteProxy, !1)) : (t.onload = createjs.proxy(this._handleLoad, this), t.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this));
  9501. var r = this.buildPath(e.src, e.values);
  9502. switch (e.type) {
  9503. case createjs.LoadQueue.CSS:
  9504. t.href = r;
  9505. break;
  9506. case createjs.LoadQueue.SVG:
  9507. t.data = r;
  9508. break;
  9509. default:
  9510. t.src = r
  9511. }
  9512. if (e.type == createjs.LoadQueue.JSONP || e.type == createjs.LoadQueue.JSON || e.type == createjs.LoadQueue.MANIFEST) {
  9513. if (null == e.callback) throw new Error("callback is required for loading JSONP requests.");
  9514. if (null != window[e.callback]) throw new Error('JSONP callback "' + e.callback + '" already exists on window. You need to specify a different callback. Or re-name the current one.');
  9515. window[e.callback] = createjs.proxy(this._handleJSONPLoad, this)
  9516. } (e.type == createjs.LoadQueue.SVG || e.type == createjs.LoadQueue.JSONP || e.type == createjs.LoadQueue.JSON || e.type == createjs.LoadQueue.MANIFEST || e.type == createjs.LoadQueue.JAVASCRIPT || e.type == createjs.LoadQueue.CSS) && (this._startTagVisibility = t.style.visibility, t.style.visibility = "hidden", (document.body || document.getElementsByTagName("body")[0]).appendChild(t)),
  9517. null != t.load && t.load()
  9518. },
  9519. t._handleJSONPLoad = function(e) {
  9520. this._jsonResult = e
  9521. },
  9522. t._handleTimeout = function() {
  9523. this._clean();
  9524. var e = new createjs.Event("error");
  9525. e.text = "PRELOAD_TIMEOUT",
  9526. this._sendError(e)
  9527. },
  9528. t._handleStalled = function() {},
  9529. t._handleError = function() {
  9530. this._clean();
  9531. var e = new createjs.Event("error");
  9532. this._sendError(e)
  9533. },
  9534. t._handleReadyStateChange = function() {
  9535. clearTimeout(this._loadTimeout);
  9536. var e = this.getItem().tag; ("loaded" == e.readyState || "complete" == e.readyState) && this._handleLoad()
  9537. },
  9538. t._handleLoad = function() {
  9539. if (!this._isCanceled()) {
  9540. var e = this.getItem(),
  9541. t = e.tag;
  9542. if (! (this.loaded || this._isAudio && 4 !== t.readyState)) {
  9543. switch (this.loaded = !0, e.type) {
  9544. case createjs.LoadQueue.SVG:
  9545. case createjs.LoadQueue.JSON:
  9546. case createjs.LoadQueue.JSONP:
  9547. case createjs.LoadQueue.MANIFEST:
  9548. case createjs.LoadQueue.CSS:
  9549. t.style.visibility = this._startTagVisibility,
  9550. (document.body || document.getElementsByTagName("body")[0]).removeChild(t)
  9551. }
  9552. this._clean(),
  9553. this._sendComplete()
  9554. }
  9555. }
  9556. },
  9557. t._clean = function() {
  9558. clearTimeout(this._loadTimeout);
  9559. var e = this.getItem(),
  9560. t = e.tag;
  9561. null != t && (t.onload = null, t.removeEventListener && t.removeEventListener("canplaythrough", this._tagCompleteProxy, !1), t.onstalled = null, t.onprogress = null, t.onerror = null, null != t.parentNode && e.type == createjs.LoadQueue.SVG && e.type == createjs.LoadQueue.JSON && e.type == createjs.LoadQueue.MANIFEST && e.type == createjs.LoadQueue.CSS && e.type == createjs.LoadQueue.JSONP && t.parentNode.removeChild(t));
  9562. var e = this.getItem(); (e.type == createjs.LoadQueue.JSONP || e.type == createjs.LoadQueue.MANIFEST) && (window[e.callback] = null)
  9563. },
  9564. t.toString = function() {
  9565. return "[PreloadJS TagLoader]"
  9566. },
  9567. createjs.TagLoader = e
  9568. } (), this.createjs = this.createjs || {},
  9569. function() {
  9570. var e = function(e, t) {
  9571. this.init(e, t)
  9572. },
  9573. t = e.prototype = new createjs.AbstractLoader;
  9574. t._request = null,
  9575. t._loadTimeout = null,
  9576. t._xhrLevel = 1,
  9577. t._response = null,
  9578. t._rawResponse = null,
  9579. t._crossOrigin = "",
  9580. t.init = function(e, t) {
  9581. this._item = e,
  9582. this._crossOrigin = t,
  9583. !this._createXHR(e)
  9584. },
  9585. t.getResult = function(e) {
  9586. return e && this._rawResponse ? this._rawResponse: this._response
  9587. },
  9588. t.cancel = function() {
  9589. this.canceled = !0,
  9590. this._clean(),
  9591. this._request.abort()
  9592. },
  9593. t.load = function() {
  9594. if (null == this._request) return this._handleError(),
  9595. void 0;
  9596. if (this._request.onloadstart = createjs.proxy(this._handleLoadStart, this), this._request.onprogress = createjs.proxy(this._handleProgress, this), this._request.onabort = createjs.proxy(this._handleAbort, this), this._request.onerror = createjs.proxy(this._handleError, this), this._request.ontimeout = createjs.proxy(this._handleTimeout, this), 1 == this._xhrLevel) {
  9597. var e = createjs.LoadQueue.LOAD_TIMEOUT;
  9598. if (0 == e) e = createjs.LoadQueue.loadTimeout;
  9599. else try {
  9600. console.warn("LoadQueue.LOAD_TIMEOUT has been deprecated in favor of LoadQueue.loadTimeout")
  9601. } catch(t) {}
  9602. this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), e)
  9603. }
  9604. this._request.onload = createjs.proxy(this._handleLoad, this),
  9605. this._request.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this);
  9606. try {
  9607. this._item.values && this._item.method != createjs.LoadQueue.GET ? this._item.method == createjs.LoadQueue.POST && this._request.send(this._formatQueryString(this._item.values)) : this._request.send()
  9608. } catch(n) {
  9609. var r = new createjs.Event("error");
  9610. r.error = n,
  9611. this._sendError(r)
  9612. }
  9613. },
  9614. t.getAllResponseHeaders = function() {
  9615. return this._request.getAllResponseHeaders instanceof Function ? this._request.getAllResponseHeaders() : null
  9616. },
  9617. t.getResponseHeader = function(e) {
  9618. return this._request.getResponseHeader instanceof Function ? this._request.getResponseHeader(e) : null
  9619. },
  9620. t._handleProgress = function(e) {
  9621. if (e && !(e.loaded > 0 && 0 == e.total)) {
  9622. var t = new createjs.Event("progress");
  9623. t.loaded = e.loaded,
  9624. t.total = e.total,
  9625. this._sendProgress(t)
  9626. }
  9627. },
  9628. t._handleLoadStart = function() {
  9629. clearTimeout(this._loadTimeout),
  9630. this._sendLoadStart()
  9631. },
  9632. t._handleAbort = function() {
  9633. this._clean();
  9634. var e = new createjs.Event("error");
  9635. e.text = "XHR_ABORTED",
  9636. this._sendError(e)
  9637. },
  9638. t._handleError = function() {
  9639. this._clean();
  9640. var e = new createjs.Event("error");
  9641. this._sendError(e)
  9642. },
  9643. t._handleReadyStateChange = function() {
  9644. 4 == this._request.readyState && this._handleLoad()
  9645. },
  9646. t._handleLoad = function() {
  9647. if (!this.loaded) {
  9648. if (this.loaded = !0, !this._checkError()) return this._handleError(),
  9649. void 0;
  9650. this._response = this._getResponse(),
  9651. this._clean();
  9652. var e = this._generateTag();
  9653. e && this._sendComplete()
  9654. }
  9655. },
  9656. t._handleTimeout = function(e) {
  9657. this._clean();
  9658. var t = new createjs.Event("error");
  9659. t.text = "PRELOAD_TIMEOUT",
  9660. this._sendError(e)
  9661. },
  9662. t._checkError = function() {
  9663. var e = parseInt(this._request.status);
  9664. switch (e) {
  9665. case 404:
  9666. case 0:
  9667. return ! 1
  9668. }
  9669. return ! 0
  9670. },
  9671. t._getResponse = function() {
  9672. if (null != this._response) return this._response;
  9673. if (null != this._request.response) return this._request.response;
  9674. try {
  9675. if (null != this._request.responseText) return this._request.responseText
  9676. } catch(e) {}
  9677. try {
  9678. if (null != this._request.responseXML) return this._request.responseXML
  9679. } catch(e) {}
  9680. return null
  9681. },
  9682. t._createXHR = function(e) {
  9683. var t = this._isCrossDomain(e),
  9684. n = null;
  9685. if (t && window.XDomainRequest) n = new XDomainRequest;
  9686. else if (window.XMLHttpRequest) n = new XMLHttpRequest;
  9687. else try {
  9688. n = new ActiveXObject("Msxml2.XMLHTTP.6.0")
  9689. } catch(r) {
  9690. try {
  9691. n = new ActiveXObject("Msxml2.XMLHTTP.3.0")
  9692. } catch(r) {
  9693. try {
  9694. n = new ActiveXObject("Msxml2.XMLHTTP")
  9695. } catch(r) {
  9696. return ! 1
  9697. }
  9698. }
  9699. }
  9700. createjs.LoadQueue.isText(e.type) && n.overrideMimeType && n.overrideMimeType("text/plain; charset=utf-8"),
  9701. this._xhrLevel = "string" == typeof n.responseType ? 2 : 1;
  9702. var i = null;
  9703. return i = e.method == createjs.LoadQueue.GET ? this.buildPath(e.src, e.values) : e.src,
  9704. n.open(e.method || createjs.LoadQueue.GET, i, !0),
  9705. t && n instanceof XMLHttpRequest && 1 == this._xhrLevel && n.setRequestHeader("Origin", location.origin),
  9706. e.values && e.method == createjs.LoadQueue.POST && n.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"),
  9707. createjs.LoadQueue.isBinary(e.type) && (n.responseType = "arraybuffer"),
  9708. this._request = n,
  9709. !0
  9710. },
  9711. t._clean = function() {
  9712. clearTimeout(this._loadTimeout);
  9713. var e = this._request;
  9714. e.onloadstart = null,
  9715. e.onprogress = null,
  9716. e.onabort = null,
  9717. e.onerror = null,
  9718. e.onload = null,
  9719. e.ontimeout = null,
  9720. e.onloadend = null,
  9721. e.onreadystatechange = null
  9722. },
  9723. t._generateTag = function() {
  9724. var e = this._item.type,
  9725. t = this._item.tag;
  9726. switch (e) {
  9727. case createjs.LoadQueue.IMAGE:
  9728. return t.onload = createjs.proxy(this._handleTagReady, this),
  9729. "" != this._crossOrigin && (t.crossOrigin = "Anonymous"),
  9730. t.src = this.buildPath(this._item.src, this._item.values),
  9731. this._rawResponse = this._response,
  9732. this._response = t,
  9733. !1;
  9734. case createjs.LoadQueue.JAVASCRIPT:
  9735. return t = document.createElement("script"),
  9736. t.text = this._response,
  9737. this._rawResponse = this._response,
  9738. this._response = t,
  9739. !0;
  9740. case createjs.LoadQueue.CSS:
  9741. var n = document.getElementsByTagName("head")[0];
  9742. if (n.appendChild(t), t.styleSheet) t.styleSheet.cssText = this._response;
  9743. else {
  9744. var r = document.createTextNode(this._response);
  9745. t.appendChild(r)
  9746. }
  9747. return this._rawResponse = this._response,
  9748. this._response = t,
  9749. !0;
  9750. case createjs.LoadQueue.XML:
  9751. var i = this._parseXML(this._response, "text/xml");
  9752. return this._rawResponse = this._response,
  9753. this._response = i,
  9754. !0;
  9755. case createjs.LoadQueue.SVG:
  9756. var i = this._parseXML(this._response, "image/svg+xml");
  9757. return this._rawResponse = this._response,
  9758. null != i.documentElement ? (t.appendChild(i.documentElement), this._response = t) : this._response = i,
  9759. !0;
  9760. case createjs.LoadQueue.JSON:
  9761. case createjs.LoadQueue.MANIFEST:
  9762. var s = {};
  9763. try {
  9764. s = JSON.parse(this._response)
  9765. } catch(o) {
  9766. s = o
  9767. }
  9768. return this._rawResponse = this._response,
  9769. this._response = s,
  9770. !0
  9771. }
  9772. return ! 0
  9773. },
  9774. t._parseXML = function(e, t) {
  9775. var n = null;
  9776. try {
  9777. if (window.DOMParser) {
  9778. var r = new DOMParser;
  9779. n = r.parseFromString(e, t)
  9780. } else n = new ActiveXObject("Microsoft.XMLDOM"),
  9781. n.async = !1,
  9782. n.loadXML(e)
  9783. } catch(i) {}
  9784. return n
  9785. },
  9786. t._handleTagReady = function() {
  9787. this._sendComplete()
  9788. },
  9789. t.toString = function() {
  9790. return "[PreloadJS XHRLoader]"
  9791. },
  9792. createjs.XHRLoader = e
  9793. } (), "object" != typeof JSON && (JSON = {}),
  9794. function() {
  9795. function f(e) {
  9796. return 10 > e ? "0" + e: e
  9797. }
  9798. function quote(e) {
  9799. return escapable.lastIndex = 0,
  9800. escapable.test(e) ? '"' + e.replace(escapable,
  9801. function(e) {
  9802. var t = meta[e];
  9803. return "string" == typeof t ? t: "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice( - 4)
  9804. }) + '"': '"' + e + '"'
  9805. }
  9806. function str(e, t) {
  9807. var n, r, i, s, o, u = gap,
  9808. a = t[e];
  9809. switch (a && "object" == typeof a && "function" == typeof a.toJSON && (a = a.toJSON(e)), "function" == typeof rep && (a = rep.call(t, e, a)), typeof a) {
  9810. case "string":
  9811. return quote(a);
  9812. case "number":
  9813. return isFinite(a) ? String(a) : "null";
  9814. case "boolean":
  9815. case "null":
  9816. return String(a);
  9817. case "object":
  9818. if (!a) return "null";
  9819. if (gap += indent, o = [], "[object Array]" === Object.prototype.toString.apply(a)) {
  9820. for (s = a.length, n = 0; s > n; n += 1) o[n] = str(n, a) || "null";
  9821. return i = 0 === o.length ? "[]": gap ? "[\n" + gap + o.join(",\n" + gap) + "\n" + u + "]": "[" + o.join(",") + "]",
  9822. gap = u,
  9823. i
  9824. }
  9825. if (rep && "object" == typeof rep) for (s = rep.length, n = 0; s > n; n += 1)"string" == typeof rep[n] && (r = rep[n], i = str(r, a), i && o.push(quote(r) + (gap ? ": ": ":") + i));
  9826. else for (r in a) Object.prototype.hasOwnProperty.call(a, r) && (i = str(r, a), i && o.push(quote(r) + (gap ? ": ": ":") + i));
  9827. return i = 0 === o.length ? "{}": gap ? "{\n" + gap + o.join(",\n" + gap) + "\n" + u + "}": "{" + o.join(",") + "}",
  9828. gap = u,
  9829. i
  9830. }
  9831. }
  9832. "function" != typeof Date.prototype.toJSON && (Date.prototype.toJSON = function() {
  9833. return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z": null
  9834. },
  9835. String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() {
  9836. return this.valueOf()
  9837. });
  9838. var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
  9839. escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
  9840. gap, indent, meta = {
  9841. "\b": "\\b",
  9842. " ": "\\t",
  9843. "\n": "\\n",
  9844. "\f": "\\f",
  9845. "\r": "\\r",
  9846. '"': '\\"',
  9847. "\\": "\\\\"
  9848. },
  9849. rep;
  9850. "function" != typeof JSON.stringify && (JSON.stringify = function(e, t, n) {
  9851. var r;
  9852. if (gap = "", indent = "", "number" == typeof n) for (r = 0; n > r; r += 1) indent += " ";
  9853. else "string" == typeof n && (indent = n);
  9854. if (rep = t, !t || "function" == typeof t || "object" == typeof t && "number" == typeof t.length) return str("", {
  9855. "": e
  9856. });
  9857. throw new Error("JSON.stringify")
  9858. }),
  9859. "function" != typeof JSON.parse && (JSON.parse = function(text, reviver) {
  9860. function walk(e, t) {
  9861. var n, r, i = e[t];
  9862. if (i && "object" == typeof i) for (n in i) Object.prototype.hasOwnProperty.call(i, n) && (r = walk(i, n), void 0 !== r ? i[n] = r: delete i[n]);
  9863. return reviver.call(e, t, i)
  9864. }
  9865. var j;
  9866. if (text = String(text), cx.lastIndex = 0, cx.test(text) && (text = text.replace(cx,
  9867. function(e) {
  9868. return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice( - 4)
  9869. })), /^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return j = eval("(" + text + ")"),
  9870. "function" == typeof reviver ? walk({
  9871. "": j
  9872. },
  9873. "") : j;
  9874. throw new SyntaxError("JSON.parse")
  9875. })
  9876. } (), define("prld",
  9877. function(e) {
  9878. return function() {
  9879. var t, n;
  9880. return t || e.createjs
  9881. }
  9882. } (this)), define("gameAssets", {
  9883. gfx_font_png: "gfx/font.png",
  9884. gfx_gfx_atlas_png: "gfx/gfx.atlas.png",
  9885. gfx_smallDigits_png: "gfx/smallDigits.png",
  9886. gfx_tutorial_png: "gfx/tutorial.png",
  9887. gfx_waterAnim_png: "gfx/waterAnim.png",
  9888. sfx_buttontap_mp3: "sfx/buttontap.mp3",
  9889. sfx_jump_mp3: "sfx/jump.mp3",
  9890. sfx_landing_mp3: "sfx/landing.mp3",
  9891. sfx_splash_mp3: "sfx/splash.mp3",
  9892. sfx_theme_mp3: "sfx/theme.mp3"
  9893. }),
  9894. function() {
  9895. function v() {
  9896. var e = !1;
  9897. if ("localStorage" in window) try {
  9898. window.localStorage.setItem("_tmptest", "tmpval"),
  9899. e = !0,
  9900. window.localStorage.removeItem("_tmptest")
  9901. } catch(t) {}
  9902. if (e) try {
  9903. window.localStorage && (i = window.localStorage, u = "localStorage", l = i.jStorage_update)
  9904. } catch(n) {} else if ("globalStorage" in window) try {
  9905. window.globalStorage && (window.location.hostname == "localhost" ? i = window.globalStorage["localhost.localdomain"] : i = window.globalStorage[window.location.hostname], u = "globalStorage", l = i.jStorage_update)
  9906. } catch(r) {} else {
  9907. s = document.createElement("link");
  9908. if (!s.addBehavior) {
  9909. s = null;
  9910. return
  9911. }
  9912. s.style.behavior = "url(#default#userData)",
  9913. document.getElementsByTagName("head")[0].appendChild(s);
  9914. try {
  9915. s.load("jStorage")
  9916. } catch(o) {
  9917. s.setAttribute("jStorage", "{}"),
  9918. s.save("jStorage"),
  9919. s.load("jStorage")
  9920. }
  9921. var a = "{}";
  9922. try {
  9923. a = s.getAttribute("jStorage")
  9924. } catch(f) {}
  9925. try {
  9926. l = s.getAttribute("jStorage_update")
  9927. } catch(c) {}
  9928. i.jStorage = a,
  9929. u = "userDataBehavior"
  9930. }
  9931. S(),
  9932. N(),
  9933. g(),
  9934. C(),
  9935. "addEventListener" in window && window.addEventListener("pageshow",
  9936. function(e) {
  9937. e.persisted && y()
  9938. },
  9939. !1)
  9940. }
  9941. function m() {
  9942. var e = "{}";
  9943. if (u == "userDataBehavior") {
  9944. s.load("jStorage");
  9945. try {
  9946. e = s.getAttribute("jStorage")
  9947. } catch(t) {}
  9948. try {
  9949. l = s.getAttribute("jStorage_update")
  9950. } catch(n) {}
  9951. i.jStorage = e
  9952. }
  9953. S(),
  9954. N(),
  9955. C()
  9956. }
  9957. function g() {
  9958. u == "localStorage" || u == "globalStorage" ? "addEventListener" in window ? window.addEventListener("storage", y, !1) : document.attachEvent("onstorage", y) : u == "userDataBehavior" && setInterval(y, 1e3)
  9959. }
  9960. function y() {
  9961. var e;
  9962. clearTimeout(f),
  9963. f = setTimeout(function() {
  9964. if (u == "localStorage" || u == "globalStorage") e = i.jStorage_update;
  9965. else if (u == "userDataBehavior") {
  9966. s.load("jStorage");
  9967. try {
  9968. e = s.getAttribute("jStorage_update")
  9969. } catch(t) {}
  9970. }
  9971. e && e != l && (l = e, b())
  9972. },
  9973. 25)
  9974. }
  9975. function b() {
  9976. var e = n.parse(n.stringify(r.__jstorage_meta.CRC32)),
  9977. t;
  9978. m(),
  9979. t = n.parse(n.stringify(r.__jstorage_meta.CRC32));
  9980. var i, s = [],
  9981. o = [];
  9982. for (i in e) if (e.hasOwnProperty(i)) {
  9983. if (!t[i]) {
  9984. o.push(i);
  9985. continue
  9986. }
  9987. e[i] != t[i] && String(e[i]).substr(0, 2) == "2." && s.push(i)
  9988. }
  9989. for (i in t) t.hasOwnProperty(i) && (e[i] || s.push(i));
  9990. w(s, "updated"),
  9991. w(o, "deleted")
  9992. }
  9993. function w(e, t) {
  9994. e = [].concat(e || []);
  9995. if (t == "flushed") {
  9996. e = [];
  9997. for (var n in a) a.hasOwnProperty(n) && e.push(n);
  9998. t = "deleted"
  9999. }
  10000. for (var r = 0,
  10001. i = e.length; r < i; r++) {
  10002. if (a[e[r]]) for (var s = 0,
  10003. o = a[e[r]].length; s < o; s++) a[e[r]][s](e[r], t);
  10004. if (a["*"]) for (var s = 0,
  10005. o = a["*"].length; s < o; s++) a["*"][s](e[r], t)
  10006. }
  10007. }
  10008. function E() {
  10009. var e = ( + (new Date)).toString();
  10010. if (u == "localStorage" || u == "globalStorage") try {
  10011. i.jStorage_update = e
  10012. } catch(t) {
  10013. u = !1
  10014. } else u == "userDataBehavior" && (s.setAttribute("jStorage_update", e), s.save("jStorage"));
  10015. y()
  10016. }
  10017. function S() {
  10018. if (i.jStorage) try {
  10019. r = n.parse(String(i.jStorage))
  10020. } catch(e) {
  10021. i.jStorage = "{}"
  10022. } else i.jStorage = "{}";
  10023. o = i.jStorage ? String(i.jStorage).length: 0,
  10024. r.__jstorage_meta || (r.__jstorage_meta = {}),
  10025. r.__jstorage_meta.CRC32 || (r.__jstorage_meta.CRC32 = {})
  10026. }
  10027. function x() {
  10028. L();
  10029. try {
  10030. i.jStorage = n.stringify(r),
  10031. s && (s.setAttribute("jStorage", i.jStorage), s.save("jStorage")),
  10032. o = i.jStorage ? String(i.jStorage).length: 0
  10033. } catch(e) {}
  10034. }
  10035. function T(e) {
  10036. if (typeof e != "string" && typeof e != "number") throw new TypeError("Key name must be string or numeric");
  10037. if (e == "__jstorage_meta") throw new TypeError("Reserved key name");
  10038. return ! 0
  10039. }
  10040. function N() {
  10041. var e, t, n, i, s = Infinity,
  10042. o = !1,
  10043. u = [];
  10044. clearTimeout(p);
  10045. if (!r.__jstorage_meta || typeof r.__jstorage_meta.TTL != "object") return;
  10046. e = +(new Date),
  10047. n = r.__jstorage_meta.TTL,
  10048. i = r.__jstorage_meta.CRC32;
  10049. for (t in n) n.hasOwnProperty(t) && (n[t] <= e ? (delete n[t], delete i[t], delete r[t], o = !0, u.push(t)) : n[t] < s && (s = n[t]));
  10050. s != Infinity && (p = setTimeout(Math.min(N, s - e, 2147483647))),
  10051. o && (x(), E(), w(u, "deleted"))
  10052. }
  10053. function C() {
  10054. var e, t;
  10055. if (!r.__jstorage_meta.PubSub) return;
  10056. var n, i = h;
  10057. for (e = t = r.__jstorage_meta.PubSub.length - 1; e >= 0; e--) n = r.__jstorage_meta.PubSub[e],
  10058. n[0] > h && (i = n[0], k(n[1], n[2]));
  10059. h = i
  10060. }
  10061. function k(e, t) {
  10062. if (c[e]) for (var r = 0,
  10063. i = c[e].length; r < i; r++) try {
  10064. c[e][r](e, n.parse(n.stringify(t)))
  10065. } catch(s) {}
  10066. }
  10067. function L() {
  10068. if (!r.__jstorage_meta.PubSub) return;
  10069. var e = +(new Date) - 2e3;
  10070. for (var t = 0,
  10071. n = r.__jstorage_meta.PubSub.length; t < n; t++) if (r.__jstorage_meta.PubSub[t][0] <= e) {
  10072. r.__jstorage_meta.PubSub.splice(t, r.__jstorage_meta.PubSub.length - t);
  10073. break
  10074. }
  10075. r.__jstorage_meta.PubSub.length || delete r.__jstorage_meta.PubSub
  10076. }
  10077. function A(e, t) {
  10078. r.__jstorage_meta || (r.__jstorage_meta = {}),
  10079. r.__jstorage_meta.PubSub || (r.__jstorage_meta.PubSub = []),
  10080. r.__jstorage_meta.PubSub.unshift([ + (new Date), e, t]),
  10081. x(),
  10082. E()
  10083. }
  10084. function O(e, t) {
  10085. var n = e.length,
  10086. r = t ^ n,
  10087. i = 0,
  10088. s;
  10089. while (n >= 4) s = e.charCodeAt(i) & 255 | (e.charCodeAt(++i) & 255) << 8 | (e.charCodeAt(++i) & 255) << 16 | (e.charCodeAt(++i) & 255) << 24,
  10090. s = (s & 65535) * 1540483477 + (((s >>> 16) * 1540483477 & 65535) << 16),
  10091. s ^= s >>> 24,
  10092. s = (s & 65535) * 1540483477 + (((s >>> 16) * 1540483477 & 65535) << 16),
  10093. r = (r & 65535) * 1540483477 + (((r >>> 16) * 1540483477 & 65535) << 16) ^ s,
  10094. n -= 4,
  10095. ++i;
  10096. switch (n) {
  10097. case 3:
  10098. r ^= (e.charCodeAt(i + 2) & 255) << 16;
  10099. case 2:
  10100. r ^= (e.charCodeAt(i + 1) & 255) << 8;
  10101. case 1:
  10102. r ^= e.charCodeAt(i) & 255,
  10103. r = (r & 65535) * 1540483477 + (((r >>> 16) * 1540483477 & 65535) << 16)
  10104. }
  10105. return r ^= r >>> 13,
  10106. r = (r & 65535) * 1540483477 + (((r >>> 16) * 1540483477 & 65535) << 16),
  10107. r ^= r >>> 15,
  10108. r >>> 0
  10109. }
  10110. var e = "0.4.8",
  10111. t = window.jQuery || window.$ || (window.$ = {}),
  10112. n = {
  10113. parse: window.JSON && (window.JSON.parse || window.JSON.decode) || String.prototype.evalJSON &&
  10114. function(e) {
  10115. return String(e).evalJSON()
  10116. } || t.parseJSON || t.evalJSON,
  10117. stringify: Object.toJSON || window.JSON && (window.JSON.stringify || window.JSON.encode) || t.toJSON
  10118. };
  10119. if (! ("parse" in n && "stringify" in n)) throw new Error("No JSON support found, include //cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js to page");
  10120. var r = {
  10121. __jstorage_meta: {
  10122. CRC32: {}
  10123. }
  10124. },
  10125. i = {
  10126. jStorage: "{}"
  10127. },
  10128. s = null,
  10129. o = 0,
  10130. u = !1,
  10131. a = {},
  10132. f = !1,
  10133. l = 0,
  10134. c = {},
  10135. h = +(new Date),
  10136. p,
  10137. d = {
  10138. isXML: function(e) {
  10139. var t = (e ? e.ownerDocument || e: 0).documentElement;
  10140. return t ? t.nodeName !== "HTML": !1
  10141. },
  10142. encode: function(e) {
  10143. if (!this.isXML(e)) return ! 1;
  10144. try {
  10145. return (new XMLSerializer).serializeToString(e)
  10146. } catch(t) {
  10147. try {
  10148. return e.xml
  10149. } catch(n) {}
  10150. }
  10151. return ! 1
  10152. },
  10153. decode: function(e) {
  10154. var t = "DOMParser" in window && (new DOMParser).parseFromString || window.ActiveXObject &&
  10155. function(e) {
  10156. var t = new ActiveXObject("Microsoft.XMLDOM");
  10157. return t.async = "false",
  10158. t.loadXML(e),
  10159. t
  10160. },
  10161. n;
  10162. return t ? (n = t.call("DOMParser" in window && new DOMParser || window, e, "text/xml"), this.isXML(n) ? n: !1) : !1
  10163. }
  10164. };
  10165. t.jStorage = {
  10166. version: e,
  10167. set: function(e, t, i) {
  10168. T(e),
  10169. i = i || {};
  10170. if (typeof t == "undefined") return this.deleteKey(e),
  10171. t;
  10172. if (d.isXML(t)) t = {
  10173. _is_xml: !0,
  10174. xml: d.encode(t)
  10175. };
  10176. else {
  10177. if (typeof t == "function") return undefined;
  10178. t && typeof t == "object" && (t = n.parse(n.stringify(t)))
  10179. }
  10180. return r[e] = t,
  10181. r.__jstorage_meta.CRC32[e] = "2." + O(n.stringify(t), 2538058380),
  10182. this.setTTL(e, i.TTL || 0),
  10183. w(e, "updated"),
  10184. t
  10185. },
  10186. get: function(e, t) {
  10187. return T(e),
  10188. e in r ? r[e] && typeof r[e] == "object" && r[e]._is_xml ? d.decode(r[e].xml) : r[e] : typeof t == "undefined" ? null: t
  10189. },
  10190. deleteKey: function(e) {
  10191. return T(e),
  10192. e in r ? (delete r[e], typeof r.__jstorage_meta.TTL == "object" && e in r.__jstorage_meta.TTL && delete r.__jstorage_meta.TTL[e], delete r.__jstorage_meta.CRC32[e], x(), E(), w(e, "deleted"), !0) : !1
  10193. },
  10194. setTTL: function(e, t) {
  10195. var n = +(new Date);
  10196. return T(e),
  10197. t = Number(t) || 0,
  10198. e in r ? (r.__jstorage_meta.TTL || (r.__jstorage_meta.TTL = {}), t > 0 ? r.__jstorage_meta.TTL[e] = n + t: delete r.__jstorage_meta.TTL[e], x(), N(), E(), !0) : !1
  10199. },
  10200. getTTL: function(e) {
  10201. var t = +(new Date),
  10202. n;
  10203. return T(e),
  10204. e in r && r.__jstorage_meta.TTL && r.__jstorage_meta.TTL[e] ? (n = r.__jstorage_meta.TTL[e] - t, n || 0) : 0
  10205. },
  10206. flush: function() {
  10207. return r = {
  10208. __jstorage_meta: {
  10209. CRC32: {}
  10210. }
  10211. },
  10212. x(),
  10213. E(),
  10214. w(null, "flushed"),
  10215. !0
  10216. },
  10217. storageObj: function() {
  10218. function e() {}
  10219. return e.prototype = r,
  10220. new e
  10221. },
  10222. index: function() {
  10223. var e = [],
  10224. t;
  10225. for (t in r) r.hasOwnProperty(t) && t != "__jstorage_meta" && e.push(t);
  10226. return e
  10227. },
  10228. storageSize: function() {
  10229. return o
  10230. },
  10231. currentBackend: function() {
  10232. return u
  10233. },
  10234. storageAvailable: function() {
  10235. return !! u
  10236. },
  10237. listenKeyChange: function(e, t) {
  10238. T(e),
  10239. a[e] || (a[e] = []),
  10240. a[e].push(t)
  10241. },
  10242. stopListening: function(e, t) {
  10243. T(e);
  10244. if (!a[e]) return;
  10245. if (!t) {
  10246. delete a[e];
  10247. return
  10248. }
  10249. for (var n = a[e].length - 1; n >= 0; n--) a[e][n] == t && a[e].splice(n, 1)
  10250. },
  10251. subscribe: function(e, t) {
  10252. e = (e || "").toString();
  10253. if (!e) throw new TypeError("Channel not defined");
  10254. c[e] || (c[e] = []),
  10255. c[e].push(t)
  10256. },
  10257. publish: function(e, t) {
  10258. e = (e || "").toString();
  10259. if (!e) throw new TypeError("Channel not defined");
  10260. A(e, t)
  10261. },
  10262. reInit: function() {
  10263. m()
  10264. },
  10265. noConflict: function(e) {
  10266. return delete window.$.jStorage,
  10267. e && (window.jStorage = this),
  10268. this
  10269. }
  10270. },
  10271. v()
  10272. } (), define("jstorage",
  10273. function(e) {
  10274. return function() {
  10275. var t, n;
  10276. return t || e.$
  10277. }
  10278. } (this)), define("Storage", ["require", "jstorage"],
  10279. function(e) {
  10280. var t = e("jstorage").jStorage,
  10281. n = function(e) {
  10282. this._prefix = e,
  10283. this._available = t.storageAvailable()
  10284. },
  10285. r = n.prototype;
  10286. return r.get = function(e) {
  10287. return this._available ? t.get(this._prefix + e) : null
  10288. },
  10289. r.set = function(e, n) {
  10290. if (!this._available) return;
  10291. t.set(this._prefix + e, n)
  10292. },
  10293. r.del = function(e) {
  10294. if (!this._available) return;
  10295. t.deleteKey(this._prefix + e)
  10296. },
  10297. r.clear = function() {
  10298. if (!this._available) return;
  10299. var e = t.index();
  10300. for (var n = e.length; n--;) {
  10301. var r = e[n];
  10302. r.substr(0, this._prefix.length) == this._prefix && t.deleteKey(r)
  10303. }
  10304. },
  10305. r._prefix = "",
  10306. r._available = !0,
  10307. n
  10308. }), define("text", ["module"],
  10309. function(e) {
  10310. var t, n, r, i, s, o = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0"],
  10311. u = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,
  10312. a = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,
  10313. f = typeof location != "undefined" && location.href,
  10314. l = f && location.protocol && location.protocol.replace(/\:/, ""),
  10315. c = f && location.hostname,
  10316. h = f && (location.port || undefined),
  10317. p = {},
  10318. d = e.config && e.config() || {};
  10319. t = {
  10320. version: "2.0.12",
  10321. strip: function(e) {
  10322. if (e) {
  10323. e = e.replace(u, "");
  10324. var t = e.match(a);
  10325. t && (e = t[1])
  10326. } else e = "";
  10327. return e
  10328. },
  10329. jsEscape: function(e) {
  10330. return e.replace(/(['\\])/g, "\\$1").replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r").replace(/[\u2028]/g, "\\u2028").replace(/[\u2029]/g, "\\u2029")
  10331. },
  10332. createXhr: d.createXhr ||
  10333. function() {
  10334. var e, t, n;
  10335. if (typeof XMLHttpRequest != "undefined") return new XMLHttpRequest;
  10336. if (typeof ActiveXObject != "undefined") for (t = 0; t < 3; t += 1) {
  10337. n = o[t];
  10338. try {
  10339. e = new ActiveXObject(n)
  10340. } catch(r) {}
  10341. if (e) {
  10342. o = [n];
  10343. break
  10344. }
  10345. }
  10346. return e
  10347. },
  10348. parseName: function(e) {
  10349. var t, n, r, i = !1,
  10350. s = e.indexOf("."),
  10351. o = e.indexOf("./") === 0 || e.indexOf("../") === 0;
  10352. return s !== -1 && (!o || s > 1) ? (t = e.substring(0, s), n = e.substring(s + 1, e.length)) : t = e,
  10353. r = n || t,
  10354. s = r.indexOf("!"),
  10355. s !== -1 && (i = r.substring(s + 1) === "strip", r = r.substring(0, s), n ? n = r: t = r),
  10356. {
  10357. moduleName: t,
  10358. ext: n,
  10359. strip: i
  10360. }
  10361. },
  10362. xdRegExp: /^((\w+)\:)?\/\/([^\/\\]+)/,
  10363. useXhr: function(e, n, r, i) {
  10364. var s, o, u, a = t.xdRegExp.exec(e);
  10365. return a ? (s = a[2], o = a[3], o = o.split(":"), u = o[1], o = o[0], (!s || s === n) && (!o || o.toLowerCase() === r.toLowerCase()) && (!u && !o || u === i)) : !0
  10366. },
  10367. finishLoad: function(e, n, r, i) {
  10368. r = n ? t.strip(r) : r,
  10369. d.isBuild && (p[e] = r),
  10370. i(r)
  10371. },
  10372. load: function(e, n, r, i) {
  10373. if (i && i.isBuild && !i.inlineText) {
  10374. r();
  10375. return
  10376. }
  10377. d.isBuild = i && i.isBuild;
  10378. var s = t.parseName(e),
  10379. o = s.moduleName + (s.ext ? "." + s.ext: ""),
  10380. u = n.toUrl(o),
  10381. a = d.useXhr || t.useXhr;
  10382. if (u.indexOf("empty:") === 0) {
  10383. r();
  10384. return
  10385. } ! f || a(u, l, c, h) ? t.get(u,
  10386. function(n) {
  10387. t.finishLoad(e, s.strip, n, r)
  10388. },
  10389. function(e) {
  10390. r.error && r.error(e)
  10391. }) : n([o],
  10392. function(e) {
  10393. t.finishLoad(s.moduleName + "." + s.ext, s.strip, e, r)
  10394. })
  10395. },
  10396. write: function(e, n, r, i) {
  10397. if (p.hasOwnProperty(n)) {
  10398. var s = t.jsEscape(p[n]);
  10399. r.asModule(e + "!" + n, "define(function () { return '" + s + "';});\n")
  10400. }
  10401. },
  10402. writeFile: function(e, n, r, i, s) {
  10403. var o = t.parseName(n),
  10404. u = o.ext ? "." + o.ext: "",
  10405. a = o.moduleName + u,
  10406. f = r.toUrl(o.moduleName + u) + ".js";
  10407. t.load(a, r,
  10408. function(n) {
  10409. var r = function(e) {
  10410. return i(f, e)
  10411. };
  10412. r.asModule = function(e, t) {
  10413. return i.asModule(e, f, t)
  10414. },
  10415. t.write(e, a, r, s)
  10416. },
  10417. s)
  10418. }
  10419. };
  10420. if (d.env === "node" || !d.env && typeof process != "undefined" && process.versions && !!process.versions.node && !process.versions["node-webkit"]) n = require.nodeRequire("fs"),
  10421. t.get = function(e, t, r) {
  10422. try {
  10423. var i = n.readFileSync(e, "utf8");
  10424. i.indexOf("") === 0 && (i = i.substring(1)),
  10425. t(i)
  10426. } catch(s) {
  10427. r && r(s)
  10428. }
  10429. };
  10430. else if (d.env === "xhr" || !d.env && t.createXhr()) t.get = function(e, n, r, i) {
  10431. var s = t.createXhr(),
  10432. o;
  10433. s.open("GET", e, !0);
  10434. if (i) for (o in i) i.hasOwnProperty(o) && s.setRequestHeader(o.toLowerCase(), i[o]);
  10435. d.onXhr && d.onXhr(s, e),
  10436. s.onreadystatechange = function(t) {
  10437. var i, o;
  10438. s.readyState === 4 && (i = s.status || 0, i > 399 && i < 600 ? (o = new Error(e + " HTTP status: " + i), o.xhr = s, r && r(o)) : n(s.responseText), d.onXhrComplete && d.onXhrComplete(s, e))
  10439. },
  10440. s.send(null)
  10441. };
  10442. else if (d.env === "rhino" || !d.env && typeof Packages != "undefined" && typeof java != "undefined") t.get = function(e, t) {
  10443. var n, r, i = "utf-8",
  10444. s = new java.io.File(e),
  10445. o = java.lang.System.getProperty("line.separator"),
  10446. u = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s), i)),
  10447. a = "";
  10448. try {
  10449. n = new java.lang.StringBuffer,
  10450. r = u.readLine(),
  10451. r && r.length() && r.charAt(0) === 65279 && (r = r.substring(1)),
  10452. r !== null && n.append(r);
  10453. while ((r = u.readLine()) !== null) n.append(o),
  10454. n.append(r);
  10455. a = String(n.toString())
  10456. } finally {
  10457. u.close()
  10458. }
  10459. t(a)
  10460. };
  10461. else if (d.env === "xpconnect" || !d.env && typeof Components != "undefined" && Components.classes && Components.interfaces) r = Components.classes,
  10462. i = Components.interfaces,
  10463. Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),
  10464. s = "@mozilla.org/windows-registry-key;1" in r,
  10465. t.get = function(e, t) {
  10466. var n, o, u, a = {};
  10467. s && (e = e.replace(/\//g, "\\")),
  10468. u = new FileUtils.File(e);
  10469. try {
  10470. n = r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),
  10471. n.init(u, 1, 0, !1),
  10472. o = r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),
  10473. o.init(n, "utf-8", n.available(), i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),
  10474. o.readString(n.available(), a),
  10475. o.close(),
  10476. n.close(),
  10477. t(a.value)
  10478. } catch(f) {
  10479. throw new Error((u && u.path || "") + ": " + f)
  10480. }
  10481. };
  10482. return t
  10483. }), define("text!screens/../../game_assets/gfx/font.json", [],
  10484. function() {
  10485. return '{\r\n "info": {\r\n "face": "font",\r\n "size": 32,\r\n "bold": 0,\r\n "italic": 0,\r\n "charset": 0,\r\n "unicode": 0,\r\n "stretchH": 100,\r\n "smooth": 1,\r\n "aa": 1,\r\n "padding": "0,0,0,0",\r\n "spacing": "1,1"\r\n },\r\n "common": {\r\n "lineHeight": 103,\r\n "base": 26,\r\n "scaleW": 256,\r\n "scaleH": 256,\r\n "pages": 1,\r\n "packed": 0,\r\n "alphaChnl": 1,\r\n "redChnl": 0,\r\n "greenChnl": 0,\r\n "blueChnl": 0\r\n },\r\n "page": {\r\n "id": 0,\r\n "file": "font.png"\r\n },\r\n "chars": {\r\n "count": 12,\r\n "data": [\r\n {\r\n "id": 49,\r\n "x": 156,\r\n "y": 72,\r\n "width": 30,\r\n "height": 68,\r\n "xoffset": 0,\r\n "yoffset": 34,\r\n "xadvance": 30,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 1\r\n },\r\n {\r\n "id": 50,\r\n "x": 57,\r\n "y": 0,\r\n "width": 51,\r\n "height": 69,\r\n "xoffset": 0,\r\n "yoffset": 33,\r\n "xadvance": 51,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 2\r\n },\r\n {\r\n "id": 51,\r\n "x": 109,\r\n "y": 0,\r\n "width": 49,\r\n "height": 71,\r\n "xoffset": 0,\r\n "yoffset": 34,\r\n "xadvance": 49,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 3\r\n },\r\n {\r\n "id": 52,\r\n "x": 54,\r\n "y": 73,\r\n "width": 52,\r\n "height": 67,\r\n "xoffset": 0,\r\n "yoffset": 35,\r\n "xadvance": 52,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 4\r\n },\r\n {\r\n "id": 53,\r\n "x": 107,\r\n "y": 72,\r\n "width": 48,\r\n "height": 68,\r\n "xoffset": 0,\r\n "yoffset": 35,\r\n "xadvance": 48,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 5\r\n },\r\n {\r\n "id": 54,\r\n "x": 53,\r\n "y": 143,\r\n "width": 52,\r\n "height": 70,\r\n "xoffset": 0,\r\n "yoffset": 33,\r\n "xadvance": 52,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 6\r\n },\r\n {\r\n "id": 55,\r\n "x": 106,\r\n "y": 141,\r\n "width": 51,\r\n "height": 67,\r\n "xoffset": 0,\r\n "yoffset": 35,\r\n "xadvance": 51,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 7\r\n },\r\n {\r\n "id": 56,\r\n "x": 0,\r\n "y": 73,\r\n "width": 53,\r\n "height": 69,\r\n "xoffset": 0,\r\n "yoffset": 34,\r\n "xadvance": 53,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 8\r\n },\r\n {\r\n "id": 57,\r\n "x": 0,\r\n "y": 143,\r\n "width": 52,\r\n "height": 69,\r\n "xoffset": 0,\r\n "yoffset": 34,\r\n "xadvance": 52,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 9\r\n },\r\n {\r\n "id": 48,\r\n "x": 0,\r\n "y": 0,\r\n "width": 56,\r\n "height": 72,\r\n "xoffset": 0,\r\n "yoffset": 31,\r\n "xadvance": 56,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 0\r\n }\r\n ]\r\n },\r\n "kernings": {\r\n "count": 0,\r\n "data": []\r\n }\r\n}'
  10486. }), define("text!screens/../../game_assets/gfx/gfx.atlas.json", [],
  10487. function() {
  10488. return '{"frames": {\r\n\r\n"background0000":\r\n{\r\n "frame": {"x":1,"y":1,"w":351,"h":401},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":351,"h":401},\r\n "sourceSize": {"w":351,"h":401}\r\n},\r\n"bestSign0000":\r\n{\r\n "frame": {"x":221,"y":403,"w":119,"h":42},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":119,"h":42},\r\n "sourceSize": {"w":119,"h":42}\r\n},\r\n"bigPlatformEndSegment0000":\r\n{\r\n "frame": {"x":814,"y":1,"w":192,"h":196},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":192,"h":196},\r\n "sourceSize": {"w":192,"h":196}\r\n},\r\n"bigPlatformMiddleSegment0000":\r\n{\r\n "frame": {"x":827,"y":198,"w":177,"h":196},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":177,"h":196},\r\n "sourceSize": {"w":177,"h":196}\r\n},\r\n"bigPlayButton0000":\r\n{\r\n "frame": {"x":353,"y":285,"w":162,"h":164},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":162,"h":164},\r\n "sourceSize": {"w":162,"h":164}\r\n},\r\n"gameOverSign0000":\r\n{\r\n "frame": {"x":353,"y":210,"w":473,"h":74},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":473,"h":74},\r\n "sourceSize": {"w":473,"h":74}\r\n},\r\n"hero0000":\r\n{\r\n "frame": {"x":604,"y":285,"w":84,"h":84},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":84,"h":84},\r\n "sourceSize": {"w":84,"h":84}\r\n},\r\n"infoButton0000":\r\n{\r\n "frame": {"x":890,"y":395,"w":109,"h":111},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":109,"h":111},\r\n "sourceSize": {"w":109,"h":111}\r\n},\r\n"logo0000":\r\n{\r\n "frame": {"x":353,"y":1,"w":460,"h":208},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":460,"h":208},\r\n "sourceSize": {"w":460,"h":208}\r\n},\r\n"muteButton0000":\r\n{\r\n "frame": {"x":1,"y":403,"w":109,"h":111},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":109,"h":111},\r\n "sourceSize": {"w":109,"h":111}\r\n},\r\n"pauseButton0000":\r\n{\r\n "frame": {"x":516,"y":285,"w":87,"h":88},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":87,"h":88},\r\n "sourceSize": {"w":87,"h":88}\r\n},\r\n"platform0000":\r\n{\r\n "frame": {"x":221,"y":446,"w":104,"h":39},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":104,"h":39},\r\n "sourceSize": {"w":104,"h":39}\r\n},\r\n"progressBarBackground0000":\r\n{\r\n "frame": {"x":604,"y":370,"w":124,"h":24},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":124,"h":24},\r\n "sourceSize": {"w":124,"h":24}\r\n},\r\n"progressBarForeground0000":\r\n{\r\n "frame": {"x":1007,"y":1,"w":12,"h":12},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":12,"h":12},\r\n "sourceSize": {"w":12,"h":12}\r\n},\r\n"scoreSign0000":\r\n{\r\n "frame": {"x":516,"y":438,"w":154,"h":40},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":154,"h":40},\r\n "sourceSize": {"w":154,"h":40}\r\n},\r\n"scoreSignSmall0000":\r\n{\r\n "frame": {"x":729,"y":285,"w":86,"h":23},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":86,"h":23},\r\n "sourceSize": {"w":86,"h":23}\r\n},\r\n"tapToContinueSign0000":\r\n{\r\n "frame": {"x":516,"y":395,"w":373,"h":42},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":373,"h":42},\r\n "sourceSize": {"w":373,"h":42}\r\n},\r\n"unmuteButton0000":\r\n{\r\n "frame": {"x":111,"y":403,"w":109,"h":111},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":109,"h":111},\r\n "sourceSize": {"w":109,"h":111}\r\n}},\r\n"meta": {\r\n "app": "Adobe Flash Professional",\r\n "version": "13.0.0.759",\r\n "image": "gfx.atlas.png",\r\n "format": "RGBA8888",\r\n "size": {"w":1024,"h":1024},\r\n "scale": "1"\r\n}\r\n}\r\n'
  10489. }), define("text!screens/../../game_assets/gfx/smallDigits.json", [],
  10490. function() {
  10491. return '{\r\n "info": {\r\n "face": "font",\r\n "size": 32,\r\n "bold": 0,\r\n "italic": 0,\r\n "charset": 0,\r\n "unicode": 0,\r\n "stretchH": 100,\r\n "smooth": 1,\r\n "aa": 1,\r\n "padding": "0,0,0,0",\r\n "spacing": "1,1"\r\n },\r\n "common": {\r\n "lineHeight": 103,\r\n "base": 26,\r\n "scaleW": 128,\r\n "scaleH": 256,\r\n "pages": 1,\r\n "packed": 0,\r\n "alphaChnl": 1,\r\n "redChnl": 0,\r\n "greenChnl": 0,\r\n "blueChnl": 0\r\n },\r\n "page": {\r\n "id": 0,\r\n "file": "font.png"\r\n },\r\n "chars": {\r\n "count": 12,\r\n "data": [\r\n {\r\n "id": 49,\r\n "x": 39,\r\n "y": 0,\r\n "width": 22,\r\n "height": 46,\r\n "xoffset": 0,\r\n "yoffset": 56,\r\n "xadvance": 22,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 1\r\n },\r\n {\r\n "id": 50,\r\n "x": 36,\r\n "y": 194,\r\n "width": 35,\r\n "height": 47,\r\n "xoffset": 0,\r\n "yoffset": 55,\r\n "xadvance": 35,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 2\r\n },\r\n {\r\n "id": 51,\r\n "x": 37,\r\n "y": 144,\r\n "width": 34,\r\n "height": 48,\r\n "xoffset": 0,\r\n "yoffset": 56,\r\n "xadvance": 34,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 3\r\n },\r\n {\r\n "id": 52,\r\n "x": 0,\r\n "y": 194,\r\n "width": 35,\r\n "height": 45,\r\n "xoffset": 0,\r\n "yoffset": 57,\r\n "xadvance": 35,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 4\r\n },\r\n {\r\n "id": 53,\r\n "x": 38,\r\n "y": 50,\r\n "width": 33,\r\n "height": 46,\r\n "xoffset": 0,\r\n "yoffset": 57,\r\n "xadvance": 33,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 5\r\n },\r\n {\r\n "id": 54,\r\n "x": 0,\r\n "y": 146,\r\n "width": 36,\r\n "height": 47,\r\n "xoffset": 0,\r\n "yoffset": 56,\r\n "xadvance": 36,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 6\r\n },\r\n {\r\n "id": 55,\r\n "x": 37,\r\n "y": 98,\r\n "width": 34,\r\n "height": 45,\r\n "xoffset": 0,\r\n "yoffset": 57,\r\n "xadvance": 34,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 7\r\n },\r\n {\r\n "id": 56,\r\n "x": 0,\r\n "y": 50,\r\n "width": 37,\r\n "height": 47,\r\n "xoffset": 0,\r\n "yoffset": 56,\r\n "xadvance": 37,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 8\r\n },\r\n {\r\n "id": 57,\r\n "x": 0,\r\n "y": 98,\r\n "width": 36,\r\n "height": 47,\r\n "xoffset": 0,\r\n "yoffset": 56,\r\n "xadvance": 36,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 9\r\n },\r\n {\r\n "id": 48,\r\n "x": 0,\r\n "y": 0,\r\n "width": 38,\r\n "height": 49,\r\n "xoffset": 0,\r\n "yoffset": 54,\r\n "xadvance": 38,\r\n "page": 0,\r\n "chnl": 0,\r\n "letter": 0\r\n }\r\n ]\r\n },\r\n "kernings": {\r\n "count": 0,\r\n "data": []\r\n }\r\n}'
  10492. }), define("text!screens/../../game_assets/gfx/waterAnim.json", [],
  10493. function() {
  10494. return '{"frames": {\r\n\r\n"waterAnim0000":\r\n{\r\n "frame": {"x":2,"y":2,"w":186,"h":110},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":186,"h":110},\r\n "sourceSize": {"w":186,"h":110}\r\n},\r\n"waterAnim0001":\r\n{\r\n "frame": {"x":190,"y":2,"w":186,"h":110},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":186,"h":110},\r\n "sourceSize": {"w":186,"h":110}\r\n},\r\n"waterAnim0002":\r\n{\r\n "frame": {"x":2,"y":114,"w":186,"h":110},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":186,"h":110},\r\n "sourceSize": {"w":186,"h":110}\r\n},\r\n"waterAnim0003":\r\n{\r\n "frame": {"x":190,"y":114,"w":186,"h":110},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":186,"h":110},\r\n "sourceSize": {"w":186,"h":110}\r\n},\r\n"waterAnim0004":\r\n{\r\n "frame": {"x":2,"y":226,"w":186,"h":110},\r\n "rotated": false,\r\n "trimmed": false,\r\n "spriteSourceSize": {"x":0,"y":0,"w":186,"h":110},\r\n "sourceSize": {"w":186,"h":110}\r\n}},\r\n"meta": {\r\n "app": "Adobe Flash Professional",\r\n "version": "13.1.0.217",\r\n "image": "waterAnim.png",\r\n "format": "RGBA8888",\r\n "size": {"w":512,"h":512},\r\n "scale": "1"\r\n}\r\n}\r\n'
  10495. }), define("screens/ScreenController", ["require", "screens/MainMenuScreen", "screens/GameScreen", "screens/PreloadingScreen", "ScreenController", "prld", "gameAssets", "assetStorage", "gui/Button", "cjs", "soundjs", "tweenjs", "Storage", "ScaleUtils", "screenSize", "soundjs", "text!../../game_assets/gfx/font.json", "text!../../game_assets/gfx/gfx.atlas.json", "text!../../game_assets/gfx/smallDigits.json", "text!../../game_assets/gfx/waterAnim.json"],
  10496. function(e) {
  10497. var t = e("screens/MainMenuScreen"),
  10498. n = e("screens/GameScreen"),
  10499. r = e("screens/PreloadingScreen"),
  10500. i = e("ScreenController"),
  10501. s = e("prld"),
  10502. o = e("gameAssets"),
  10503. u = e("assetStorage"),
  10504. a = e("gui/Button"),
  10505. f = e("cjs"),
  10506. l = e("soundjs"),
  10507. c = e("tweenjs"),
  10508. h = e("Storage"),
  10509. p = e("ScaleUtils"),
  10510. d = e("screenSize"),
  10511. l = e("soundjs"),
  10512. v = e("text!../../game_assets/gfx/font.json"),
  10513. m = e("text!../../game_assets/gfx/gfx.atlas.json"),
  10514. g = e("text!../../game_assets/gfx/smallDigits.json"),
  10515. y = e("text!../../game_assets/gfx/waterAnim.json"),
  10516. b = function(e, o) {
  10517. this._view = new f.Container,
  10518. this._fade = this._createFadeShape(),
  10519. i.call(this, this._view),
  10520. this.setupTicker();
  10521. var c = new h("jumpingFrog");
  10522. l.Sound.initializeDefaultPlugins(),
  10523. l.Sound.alternateExtensions = ["ogg"],
  10524. this._gameStage = new f.Stage(o),
  10525. this._gameStage.enableMouseOver(20),
  10526. createjs.Touch.enable(this._gameStage),
  10527. this._gameStage.snapToPixelEnabled = !1,
  10528. this._gameStage.addChild(this._view),
  10529. this._gameStage.addChild(this._fade),
  10530. this._backgroundStage = new f.Stage(e),
  10531. this._backgroundStage.mouseEnabled = !1,
  10532. this._backgroundStage.mouseChildren = !1;
  10533. var p = new s.LoadQueue(!1, "game_assets/", !1);
  10534. p.installPlugin(l.Sound),
  10535. p.loadManifest(this.createManifest()),
  10536. p.on("fileload",
  10537. function(e) {
  10538. u.add(e.result, e.item.id, !1)
  10539. }),
  10540. p.on("complete",
  10541. function(e) {
  10542. u.add(JSON.parse(v.toString()), "gfx/font.json", !1),
  10543. u.add(JSON.parse(m.toString()), "gfx/gfx.atlas.json", !1),
  10544. u.add(JSON.parse(g.toString()), "gfx/smallDigits.json", !1),
  10545. u.add(JSON.parse(y.toString()), "gfx/waterAnim.json", !1)
  10546. }),
  10547. this.setScreens({
  10548. mainMenuScreen: new t,
  10549. gameScreen: new n(this._gameStage, c),
  10550. preloadingScreen: new r(p, {
  10551. x: 0,
  10552. y: 0,
  10553. width: d.width,
  10554. height: d.height
  10555. })
  10556. }),
  10557. this.goToScreen("preloadingScreen"),
  10558. this._gameStage.on("mouseover",
  10559. function(e) {
  10560. var t = e.target;
  10561. t instanceof a && (t.scaleX = t.scaleY = 1.05)
  10562. }),
  10563. this._gameStage.on("mouseout",
  10564. function(e) {
  10565. var t = e.target;
  10566. t instanceof a && (t.scaleX = t.scaleY = 1)
  10567. }),
  10568. this._gameStage.on("click",
  10569. function(e) {
  10570. var t = e.target;
  10571. t instanceof a && l.Sound.play("sfx/buttontap.mp3")
  10572. })
  10573. },
  10574. w = b.prototype = Object.create(i.prototype);
  10575. return w.constructor = b,
  10576. w.setupTicker = function() {
  10577. f.Ticker.timingMode = f.Ticker.RAF,
  10578. f.Ticker.setFPS(30),
  10579. f.Ticker.on("tick",
  10580. function(e) {
  10581. this._gameStage.update(e)
  10582. },
  10583. this)
  10584. },
  10585. w.createManifest = function() {
  10586. var e = [];
  10587. for (var t in o) o.hasOwnProperty(t) && e.push({
  10588. src: o[t],
  10589. id: o[t]
  10590. });
  10591. return e
  10592. },
  10593. w._BaseScreenController_pushScreen = w._pushScreen,
  10594. w._pushScreen = function(e) {
  10595. e.getName() == "preloadingScreen" ? this._BaseScreenController_pushScreen(e) : (this._fade.visible = !0, this._fade.alpha = 0, c.Tween.get(this._fade).to({
  10596. alpha: 1
  10597. },
  10598. 100).call(function(e) {
  10599. this.getActiveScreen() && this.getActiveScreen().getName() == "preloadingScreen" && (this._showBackground(), l.Sound.play("sfx/theme.mp3", {
  10600. loop: -1
  10601. })),
  10602. this._BaseScreenController_pushScreen(e),
  10603. c.Tween.get(this._fade).to({
  10604. alpha: 0
  10605. },
  10606. 100).call(function() {
  10607. this._fade.visible = !1
  10608. },
  10609. null, this)
  10610. },
  10611. [e], this))
  10612. },
  10613. w._createFadeShape = function() {
  10614. var e = new f.Shape;
  10615. return e.graphics.beginFill("#000000").drawRect(0, 0, d.width, d.height),
  10616. e.alpha = 0,
  10617. e
  10618. },
  10619. w._showBackground = function() {
  10620. var e = u.getBitmap("gfx/background.png"),
  10621. t = e.getBounds(),
  10622. n = p.fill(t.width, t.height, d.width, d.height);
  10623. e.scaleX = e.scaleY = n.width / t.width,
  10624. e.x = (d.width - n.width) / 2,
  10625. e.y = d.height - n.height,
  10626. this._backgroundStage.addChild(e),
  10627. this._backgroundStage.update()
  10628. },
  10629. b
  10630. }), define("domReady", [],
  10631. function() {
  10632. function u(e) {
  10633. var t;
  10634. for (t = 0; t < e.length; t += 1) e[t](s)
  10635. }
  10636. function a() {
  10637. var e = o;
  10638. i && e.length && (o = [], u(e))
  10639. }
  10640. function f() {
  10641. i || (i = !0, n && clearInterval(n), a())
  10642. }
  10643. function c(e) {
  10644. return i ? e(s) : o.push(e),
  10645. c
  10646. }
  10647. var e, t, n, r = typeof window != "undefined" && window.document,
  10648. i = !r,
  10649. s = r ? document: null,
  10650. o = [];
  10651. if (r) {
  10652. if (document.addEventListener) document.addEventListener("DOMContentLoaded", f, !1),
  10653. window.addEventListener("load", f, !1);
  10654. else if (window.attachEvent) {
  10655. window.attachEvent("onload", f),
  10656. t = document.createElement("div");
  10657. try {
  10658. e = window.frameElement === null
  10659. } catch(l) {}
  10660. t.doScroll && e && window.external && (n = setInterval(function() {
  10661. try {
  10662. t.doScroll(),
  10663. f()
  10664. } catch(e) {}
  10665. },
  10666. 30))
  10667. }
  10668. document.readyState === "complete" && f()
  10669. }
  10670. return c.version = "2.0.1",
  10671. c.load = function(e, t, n, r) {
  10672. r.isBuild ? n(null) : c(n)
  10673. },
  10674. c
  10675. });
  10676. var Stats = function() {
  10677. var e = Date.now(),
  10678. t = e,
  10679. n = 0,
  10680. r = Infinity,
  10681. i = 0,
  10682. s = 0,
  10683. o = Infinity,
  10684. u = 0,
  10685. a = 0,
  10686. f = 0,
  10687. l = document.createElement("div");
  10688. l.id = "stats",
  10689. l.addEventListener("mousedown",
  10690. function(e) {
  10691. e.preventDefault(),
  10692. y(++f % 2)
  10693. },
  10694. !1),
  10695. l.style.cssText = "width:80px;opacity:0.9;cursor:pointer";
  10696. var c = document.createElement("div");
  10697. c.id = "fps",
  10698. c.style.cssText = "padding:0 0 3px 3px;text-align:left;background-color:#002",
  10699. l.appendChild(c);
  10700. var h = document.createElement("div");
  10701. h.id = "fpsText",
  10702. h.style.cssText = "color:#0ff;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px",
  10703. h.innerHTML = "FPS",
  10704. c.appendChild(h);
  10705. var p = document.createElement("div");
  10706. p.id = "fpsGraph",
  10707. p.style.cssText = "position:relative;width:74px;height:30px;background-color:#0ff",
  10708. c.appendChild(p);
  10709. while (p.children.length < 74) {
  10710. var d = document.createElement("span");
  10711. d.style.cssText = "width:1px;height:30px;float:left;background-color:#113",
  10712. p.appendChild(d)
  10713. }
  10714. var v = document.createElement("div");
  10715. v.id = "ms",
  10716. v.style.cssText = "padding:0 0 3px 3px;text-align:left;background-color:#020;display:none",
  10717. l.appendChild(v);
  10718. var m = document.createElement("div");
  10719. m.id = "msText",
  10720. m.style.cssText = "color:#0f0;font-family:Helvetica,Arial,sans-serif;font-size:9px;font-weight:bold;line-height:15px",
  10721. m.innerHTML = "MS",
  10722. v.appendChild(m);
  10723. var g = document.createElement("div");
  10724. g.id = "msGraph",
  10725. g.style.cssText = "position:relative;width:74px;height:30px;background-color:#0f0",
  10726. v.appendChild(g);
  10727. while (g.children.length < 74) {
  10728. var d = document.createElement("span");
  10729. d.style.cssText = "width:1px;height:30px;float:left;background-color:#131",
  10730. g.appendChild(d)
  10731. }
  10732. var y = function(e) {
  10733. f = e;
  10734. switch (f) {
  10735. case 0:
  10736. c.style.display = "block",
  10737. v.style.display = "none";
  10738. break;
  10739. case 1:
  10740. c.style.display = "none",
  10741. v.style.display = "block"
  10742. }
  10743. },
  10744. b = function(e, t) {
  10745. var n = e.appendChild(e.firstChild);
  10746. n.style.height = t + "px"
  10747. };
  10748. return {
  10749. REVISION: 11,
  10750. domElement: l,
  10751. setMode: y,
  10752. begin: function() {
  10753. e = Date.now()
  10754. },
  10755. end: function() {
  10756. var f = Date.now();
  10757. return n = f - e,
  10758. r = Math.min(r, n),
  10759. i = Math.max(i, n),
  10760. m.textContent = n + " MS (" + r + "-" + i + ")",
  10761. b(g, Math.min(30, 30 - n / 200 * 30)),
  10762. a++,
  10763. f > t + 1e3 && (s = Math.round(a * 1e3 / (f - t)), o = Math.min(o, s), u = Math.max(u, s), h.textContent = s + " FPS (" + o + "-" + u + ")", b(p, Math.min(30, 30 - s / 100 * 30)), t = f, a = 0),
  10764. f
  10765. },
  10766. update: function() {
  10767. e = this.end()
  10768. }
  10769. }
  10770. }; define("Stats",
  10771. function(e) {
  10772. return function() {
  10773. var t, n;
  10774. return t || e.Stats
  10775. }
  10776. } (this)), require.config({
  10777. enforceDefine: !0,
  10778. shim: {
  10779. cjs: {
  10780. exports: "createjs"
  10781. },
  10782. prld: {
  10783. exports: "createjs"
  10784. },
  10785. underscore: {
  10786. exports: "_"
  10787. },
  10788. tweenjs: {
  10789. exports: "createjs"
  10790. },
  10791. viewporter: {
  10792. exports: "viewporter"
  10793. },
  10794. soundjs: {
  10795. exports: "createjs"
  10796. },
  10797. Stats: {
  10798. exports: "Stats"
  10799. },
  10800. jstorage: {
  10801. exports: "$"
  10802. },
  10803. wuki: {
  10804. exports: "admeen"
  10805. }
  10806. },
  10807. paths: {
  10808. cjs: "vendor/easeljs-0.7.1.combined",
  10809. prld: "vendor/preloadjs-0.4.1.min",
  10810. underscore: "vendor/underscore-min",
  10811. viewporter: "vendor/viewporter",
  10812. tweenjs: "vendor/tweenjs-0.5.1.min",
  10813. soundjs: "vendor/soundjs-0.5.2.min",
  10814. Stats: "vendor/Stats",
  10815. jstorage: "vendor/jstorage",
  10816. domReady: "vendor/domReady",
  10817. text: "vendor/text",
  10818. wuki: "./api"
  10819. }
  10820. }), define("Main", ["require", "viewporter", "screens/ScreenController", "domReady!", "cjs", "Stats", "screenSize", "wuki"],
  10821. function(e) {
  10822. function v(e, t, n) {
  10823. var r = document.createElement("canvas");
  10824. return r.width = e,
  10825. r.height = t,
  10826. n && n.appendChild(r),
  10827. r
  10828. }
  10829. function m() {
  10830. var e = l,
  10831. t = d,
  10832. n = window.innerWidth,
  10833. r = window.innerHeight,
  10834. i = n / r;
  10835. i > t ? n = r * t: r = n / t,
  10836. e.style.width = n + "px",
  10837. e.style.height = r + "px",
  10838. e.style.left = (window.innerWidth - n) / 2 + "px",
  10839. e.style.top = (window.innerHeight - r) / 2 + "px"
  10840. }
  10841. var t = e("viewporter"),
  10842. n = e("screens/ScreenController"),
  10843. r = e("domReady!"),
  10844. i = e("cjs"),
  10845. s = e("Stats"),
  10846. o = e("screenSize"),
  10847. u = e("wuki");
  10848. u("init", {
  10849. name: "Jumping Rock"
  10850. }),
  10851. window.addEventListener("load",
  10852. function() {
  10853. function e(e) {
  10854. e.preventDefault()
  10855. }
  10856. document.addEventListener("touchmove", e, !1),
  10857. document.addEventListener("touchstart", e, !1)
  10858. },
  10859. !1),
  10860. document.addEventListener("touchmove",
  10861. function(e) {
  10862. e.preventDefault()
  10863. },
  10864. !1),
  10865. document.addEventListener("touchstart",
  10866. function(e) {
  10867. e.preventDefault()
  10868. },
  10869. !1);
  10870. var a = 700,
  10871. f = 800;
  10872. o.setUp(a, f, a * 1.25, f * 1.25);
  10873. var l = document.getElementById("canvasHolder"),
  10874. c = v(o.width, o.height, l),
  10875. h = v(o.width, o.height, l),
  10876. p = new n(c, h, null);
  10877. t.ACTIVE ? (window.addEventListener("viewportready", m), window.addEventListener("viewportchange", m), window.addEventListener("resize", t.refresh), window.addEventListener("orientationchange", t.refresh)) : (window.addEventListener("resize", m, !1), window.addEventListener("orientationchange", m, !1), m());
  10878. var d = o.getRatio();
  10879. m()
  10880. });