12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695 |
- var b = b || {};
- b.p = b.p || {};
- b.c = {};
- p = window;
- p = Object.prototype;
- delete window._p;
- b.rb = function(a) {
- return document.createElement(a)
- };
- b.ka = function(a, c, d, e) {
- a.addEventListener(c, d, e)
- };
- b.Gx = "undefined" !== typeof require && require("fs");
- b.wz = function(a, c) {
- if (a) if (a instanceof Array) for (var d = 0,
- e = a.length; d < e && !1 !== c.call(void 0, a[d], d); d++);
- else for (d in a) if (!1 === c.call(void 0, a[d], d)) break
- };
- b.Ju = function(a) {
- if (!a) return b.log("invalid URL"),
- !1;
- var c = a.indexOf("://");
- if ( - 1 == c) return ! 1;
- c = a.indexOf("/", c + 3);
- return ( - 1 == c ? a: a.substring(0, c)) != location.origin
- };
- b.async = {
- xw: function(a) {
- var c = this.rz;
- if (!c.ou) {
- var d = c.length,
- e = c.KA,
- f = c.qA,
- g = f.fc,
- h = f.lz,
- k = f.ov,
- f = f.uZ;
- if (a) {
- if (c.ou = a, g) return g.call(h, a)
- } else {
- var m = Array.apply(null, arguments).slice(1),
- n = m.length;
- 0 == n ? m = null: 1 == n && (m = m[0]);
- e[this.index] = m;
- c.count--;
- k && k.call(f, m, d - c.count, d);
- 0 == c.count && g && g.apply(h, [null, e])
- }
- }
- },
- ix: function() {},
- UW: function(a, c, d) {
- var e = b.async;
- if (void 0 !== d)"function" == typeof c && (c = {
- ov: c
- }),
- c.fc = d || c.fc;
- else if (void 0 !== c)"function" == typeof c && (c = {
- fc: c
- });
- else if (void 0 !== a) c = {};
- else throw "arguments error!";
- var f = (d = a instanceof Array) ? a.length: Object.keys(a).length;
- if (0 == f) c.fc && c.fc.call(c.lz, null);
- else {
- var g = {
- length: f,
- count: f,
- qA: c,
- KA: d ? [] : {}
- };
- b.wz(a,
- function(a, d) {
- if (g.ou) return ! 1;
- var f = c.fc || c.ov ? e.xw.bind({
- rz: g,
- index: d
- }) : e.ix;
- a(f, d)
- })
- }
- },
- map: function(a, c, d) {
- var e = this,
- f = arguments.length;
- "function" == typeof c && (c = {
- Nu: c
- });
- if (3 === f) c.fc = d || c.fc;
- else if (2 > f) throw "arguments error!";
- "function" == typeof c && (c = {
- Nu: c
- });
- if (void 0 !== d) c.fc = d || c.fc;
- else if (void 0 === a) throw "arguments error!";
- var g = (f = a instanceof Array) ? a.length: Object.keys(a).length;
- if (0 === g) c.fc && c.fc.call(c.lz, null);
- else {
- var h = {
- length: g,
- count: g,
- qA: c,
- KA: f ? [] : {}
- };
- b.wz(a,
- function(a, d) {
- if (h.ou) return ! 1;
- var f = c.fc ? e.xw.bind({
- rz: h,
- index: d
- }) : e.ix;
- c.Nu.call(c.gL, a, d, f)
- })
- }
- }
- };
- b.path = {
- join: function() {
- for (var a = arguments.length,
- c = "",
- d = 0; d < a; d++) c = (c + ("" == c ? "": "/") + arguments[d]).replace(/(\/|\\\\)$/, "");
- return c
- },
- Hg: function(a) {
- return (a = /(\.[^\.\/\?\\]*)(\?.*)?$/.exec(a)) ? a[1] : null
- },
- YV: function(a) {
- if (a) {
- var c = a.lastIndexOf(".");
- if ( - 1 !== c) return a.substring(0, c)
- }
- return a
- },
- GI: function(a, c) {
- var d = a.indexOf("?");
- 0 < d && (a = a.substring(0, d));
- d = /(\/|\\\\)([^(\/|\\\\)]+)$/g.exec(a.replace(/(\/|\\\\)$/, ""));
- if (!d) return null;
- d = d[2];
- return c && a.substring(a.length - c.length).toLowerCase() == c.toLowerCase() ? d.substring(0, d.length - c.length) : d
- },
- dirname: function(a) {
- return a.replace(/((.*)(\/|\\|\\\\))?(.*?\..*$)?/, "$2")
- },
- mz: function(a, c) {
- c = c || "";
- var d = a.indexOf("?"),
- e = "";
- 0 < d && (e = a.substring(d), a = a.substring(0, d));
- d = a.lastIndexOf(".");
- return 0 > d ? a + c + e: a.substring(0, d) + c + e
- },
- $o: function(a, c, d) {
- if (0 == c.indexOf(".")) return this.mz(a, c);
- var e = a.indexOf("?"),
- f = "";
- d = d ? this.Hg(a) : "";
- 0 < e && (f = a.substring(e), a = a.substring(0, e));
- e = a.lastIndexOf("/");
- return a.substring(0, 0 >= e ? 0 : e + 1) + c + d + f
- }
- };
- b.D = {
- Kx: {},
- xo: {},
- KG: {},
- $g: {},
- Jp: "",
- CI: "",
- sd: {},
- rp: function() {
- return window.XMLHttpRequest ? new window.XMLHttpRequest: new ActiveXObject("MSXML2.XMLHTTP")
- },
- vx: function(a) {
- var c = a[0],
- d = a[1],
- e = a[2],
- f = ["", null, null];
- if (1 === a.length) f[1] = c instanceof Array ? c: [c];
- else if (2 === a.length)"function" == typeof d ? (f[1] = c instanceof Array ? c: [c], f[2] = d) : (f[0] = c || "", f[1] = d instanceof Array ? d: [d]);
- else if (3 === a.length) f[0] = c || "",
- f[1] = d instanceof Array ? d: [d],
- f[2] = e;
- else throw "arguments error to load js!";
- return f
- },
- uL: function(a, c, d) {
- var e = this,
- f = e.Kx,
- g = e.vx(arguments); - 1 < navigator.userAgent.indexOf("Trident/5") ? e.Px(g[0], g[1], 0, g[2]) : b.async.map(g[1],
- function(a, c, d) {
- a = b.path.join(g[0], a);
- if (f[a]) return d(null);
- e.yw(a, !1, d)
- },
- g[2])
- },
- lA: function(a, c, d) {
- var e = this.PG(),
- f = this.vx(arguments);
- this.uL(f[0], f[1],
- function(a) {
- if (a) throw a;
- e.parentNode.removeChild(e);
- if (f[2]) f[2]()
- })
- },
- yw: function(a, c, d) {
- var e = document,
- f = b.rb("script");
- f.async = c;
- f.src = a;
- this.Kx[a] = !0;
- b.ka(f, "load",
- function() {
- this.removeEventListener("load", arguments.callee, !1);
- d()
- },
- !1);
- b.ka(f, "error",
- function() {
- d("Load " + a + " failed!")
- },
- !1);
- e.body.appendChild(f)
- },
- Px: function(a, c, d, e) {
- if (d >= c.length) e && e();
- else {
- var f = this;
- f.yw(b.path.join(a, c[d]), !1,
- function(g) {
- if (g) return e(g);
- f.Px(a, c, d + 1, e)
- })
- }
- },
- PG: function() {
- var a = document,
- c = a.getElementById("cocos2d_loadJsImg");
- if (!c) {
- c = b.rb("img");
- b.Rx && (c.src = b.Rx);
- a = a.getElementById(b.Va.Jc.id);
- a.style.backgroundColor = "black";
- a.parentNode.appendChild(c);
- var d = getComputedStyle ? getComputedStyle(a) : a.currentStyle;
- d || (d = {
- width: a.width,
- height: a.height
- });
- c.style.left = a.offsetLeft + (parseFloat(d.width) - c.width) / 2 + "px";
- c.style.top = a.offsetTop + (parseFloat(d.height) - c.height) / 2 + "px";
- c.style.position = "absolute"
- }
- return c
- },
- yp: function(a, c) {
- if (b.Gx) require("fs").gX(a,
- function(a, d) {
- a ? c(a) : c(null, d.toString())
- });
- else {
- var d = this.rp(),
- e = "load " + a + " failed!";
- d.open("GET", a, !0);
- /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) ? (d.setRequestHeader("Accept-Charset", "utf-8"), d.onreadystatechange = function() {
- 4 == d.readyState && 200 == d.status ? c(null, d.responseText) : c(e)
- }) : (d.overrideMimeType && d.overrideMimeType("text/plain; charset\x3dutf-8"), d.onload = function() {
- 4 == d.readyState && 200 == d.status ? c(null, d.responseText) : c(e)
- });
- d.send(null)
- }
- },
- Qx: function(a) {
- if (b.Gx) return require("fs").hX(a).toString();
- var c = this.rp();
- c.open("GET", a, !1);
- /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) ? c.setRequestHeader("Accept-Charset", "utf-8") : c.overrideMimeType && c.overrideMimeType("text/plain; charset\x3dutf-8");
- c.send(null);
- return 4 == !c.readyState || 200 != c.status ? null: c.responseText
- },
- mA: function(a, c) {
- this.yp(a,
- function(d, e) {
- try {
- d ? c(d) : c(null, JSON.parse(e))
- } catch(f) {
- throw "load json [" + a + "] failed : " + f;
- }
- })
- },
- uw: function(a) {
- return null != /(\.png)|(\.jpg)|(\.bmp)|(\.jpeg)|(\.gif)/.exec(a)
- },
- Wl: function(a, c, d) {
- var e = !0;
- void 0 !== d ? e = null == c.Ju ? e: c.Ju: void 0 !== c && (d = c);
- var f = new Image;
- e && "file://" != location.origin && (f.crossOrigin = "Anonymous");
- b.ka(f, "load",
- function() {
- this.removeEventListener("load", arguments.callee, !1);
- this.removeEventListener("error", arguments.callee, !1);
- d && d(null, f)
- });
- b.ka(f, "error",
- function() {
- this.removeEventListener("error", arguments.callee, !1);
- d && d("load image failed")
- });
- f.src = a;
- return f
- },
- QG: function(a, c, d) {
- var e = this,
- f = null; (c = a.type) ? (c = "." + c.toLowerCase(), f = a.src ? a.src: a.name + c) : (f = a, c = b.path.Hg(f));
- var g = e.sd[f];
- if (g) return d(null, g);
- g = e.xo[c.toLowerCase()];
-
- if (!g) return b.error("loader for [" + c + "] not exists!"),
- d();
- c = e.HK(g.op ? g.op() : e.Jp, f);
- g.load(c, f, a,
- function(a, c) {
- a ? (b.log(a), e.sd[f] = null, delete e.sd[f], d()) : (e.sd[f] = c, d(null, c))
- })
- },
- HK: function(a, c) {
- var d = this.KG,
- e = b.path;
- if (void 0 !== a && void 0 === c) {
- c = a;
- var f = e.Hg(c),
- f = f ? f.toLowerCase() : "";
- a = (f = this.xo[f]) ? f.op ? f.op() : this.Jp: this.Jp
- }
- c = b.path.join(a || "", c);
- if (c.match(/[\/(\\\\)]lang[\/(\\\\)]/i)) {
- if (d[c]) return d[c];
- e = e.Hg(c) || "";
- c = d[c] = c.substring(0, c.length - e.length) + "_" + b.Aa.language + e
- }
- return c
- },
- load: function(a, c, d) {
- if (void 0 !== d)"function" == typeof c && (c = {
- ov: c
- });
- else if (void 0 !== c)"function" == typeof c && (d = c, c = {});
- else if (void 0 !== a) c = {};
- else throw "arguments error!";
- c.fc = function(a, c) {
- a && b.log(a);
- d && d(c)
- };
- a instanceof Array || (a = [a]);
- c.Nu = this.QG;
- c.gL = this;
- b.async.map(a, c)
- },
- Bx: function(a, c) {
- var d = this.$g,
- e = [],
- f;
- for (f in a) {
- var g = a[f];
- d[f] = g;
- e.push(g)
- }
- this.load(e, c)
- },
- TV: function(a, c) {
- var d = this,
- e = d.Yc(a);
- e ? d.Bx(e.filenames, c) : d.load(a,
- function(a) {
- d.Bx(a[0].filenames, c)
- })
- },
- Mg: function(a, c) {
- if (a && c) {
- if ("string" == typeof a) return this.xo[a.trim().toLowerCase()] = c;
- for (var d = 0,
- e = a.length; d < e; d++) this.xo["." + a[d].trim().toLowerCase()] = c
- }
- },
- Yc: function(a) {
- return this.sd[a] || this.sd[this.$g[a]]
- },
- Pf: function(a) {
- var c = this.sd,
- d = this.$g;
- delete c[a];
- delete c[d[a]];
- delete d[a]
- },
- nX: function() {
- var a = this.sd,
- c = this.$g,
- d;
- for (d in a) delete a[d];
- for (d in c) delete c[d]
- }
- }; (function() {
- function a() {
- b.I && b.Va.lg && b.I.dispatchEvent(b.Va.lg);
- b.Va.bl && (window.cancelAnimationFrame(b.Va.bl), b.Va.Ao())
- }
- function c() {
- b.I && b.Va.kg && b.I.dispatchEvent(b.Va.kg)
- }
- var d = window,
- e, f;
- "undefined" !== typeof document.hidden ? (e = "hidden", f = "visibilitychange") : "undefined" !== typeof document.mozHidden ? (e = "mozHidden", f = "mozvisibilitychange") : "undefined" !== typeof document.msHidden ? (e = "msHidden", f = "msvisibilitychange") : "undefined" !== typeof document.webkitHidden && (e = "webkitHidden", f = "webkitvisibilitychange");
- e ? b.ka(document, f,
- function() {
- document[e] ? c() : a()
- },
- !1) : (b.ka(d, "blur", c, !1), b.ka(d, "focus", a, !1)); - 1 < navigator.userAgent.indexOf("MicroMessenger") && (d.onfocus = function() {
- a()
- });
- "onpageshow" in window && "onpagehide" in window && (b.ka(d, "pagehide", c, !1), b.ka(d, "pageshow", a, !1));
- f = d = null
- })();
- b.log = b.warn = b.error = b.assert = function() {};
- b.sz = function(a, c) {
- for (var d = ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"], e = null, f = 0; f < d.length; ++f) {
- try {
- e = a.getContext(d[f], c)
- } catch(g) {}
- if (e) break
- }
- return e
- };
- b.BG = function(a, c) {
- b.Ya = 0;
- b.wb = 1;
- b.Aa = {};
- var d = b.Aa;
- d.KC = "en";
- d.oP = "zh";
- d.pP = "fr";
- d.sP = "it";
- d.qP = "de";
- d.zP = "es";
- d.yP = "ru";
- d.uP = "ko";
- d.tP = "ja";
- d.rP = "hu";
- d.xP = "pt";
- d.nP = "ar";
- d.vP = "no";
- d.wP = "pl";
- d.nD = "Windows";
- d.Nv = "iOS";
- d.Ov = "OS X";
- d.lD = "UNIX";
- d.kD = "Linux";
- d.jD = "Android";
- d.mD = "Unknown";
- d.FQ = 0;
- d.AP = 1;
- d.BP = 2;
- d.lO = 3;
- d.jP = 4;
- d.iP = 5;
- d.uO = 6;
- d.DP = 7;
- d.ZO = 8;
- d.gQ = 9;
- d.GQ = 10;
- d.HQ = 11;
- d.PC = 100;
- d.eC = 101;
- d.OB = "wechat";
- d.KB = "androidbrowser";
- d.Zp = "ie";
- d.LB = "qqbrowser";
- d.vv = "mqqbrowser";
- d.MB = "ucbrowser";
- d.wO = "360browser";
- d.xO = "baiduboxapp";
- d.uv = "baidubrowser";
- d.yO = "maxthon";
- d.$p = "opera";
- d.zO = "miuibrowser";
- d.$j = "firefox";
- d.aq = "safari";
- d.Yp = "chrome";
- d.NB = "unknown";
- d.zV = !1;
- var e = [d.uv, d.$p, d.$j, d.Yp, d.aq],
- f = [d.uv, d.$p, d.$j, d.Yp, d.aq, d.MB, d.LB, d.vv, d.Zp],
- g = window,
- h = g.navigator,
- k = document.documentElement,
- m = h.userAgent.toLowerCase();
- d.Kf = -1 != m.indexOf("mobile") || -1 != m.indexOf("android");
- d.platform = d.Kf ? d.PC: d.eC;
- var n = h.language,
- n = (n = n ? n: h.browserLanguage) ? n.split("-")[0] : d.KC;
- d.language = n;
- var n = d.NB,
- r = m.match(/micromessenger|qqbrowser|mqqbrowser|ucbrowser|360browser|baiduboxapp|baidubrowser|maxthon|trident|opera|miuibrowser|firefox/i) || m.match(/chrome|safari/i);
- r && 0 < r.length && (n = r[0].toLowerCase(), "micromessenger" == n ? n = d.OB: "safari" === n && m.match(/android.*applewebkit/) ? n = d.KB: "trident" == n && (n = d.Zp));
- d.Ih = n;
- d.VH = -1 < f.indexOf(d.Ih);
- f = parseInt(a[c.hm]);
- n = b.wb;
- r = b.rb("Canvas");
- b.zl = !0;
- e = -1 == e.indexOf(d.Ih);
- if (1 === f || 0 === f && (d.Kf || e) || "file://" == location.origin) n = b.Ya;
- d.tF = function() {
- var a = document.createElement("canvas");
- a.width = 1;
- a.height = 1;
- a = a.getContext("2d");
- a.fillStyle = "#000";
- a.fillRect(0, 0, 1, 1);
- a.globalCompositeOperation = "multiply";
- a.fillStyle = "#fff";
- a.fillRect(0, 0, 1, 1);
- return 0 === a.getImageData(0, 0, 1, 1).data[0]
- };
- d.wt = d.tF();
- n != b.wb || g.WebGLRenderingContext && b.sz(r, {
- stencil: !0,
- preserveDrawingBuffer: !0
- }) || (0 == f ? n = b.Ya: b.zl = !1);
- if (n == b.Ya) try {
- r.getContext("2d")
- } catch(s) {
- b.zl = !1
- }
- b.da = n;
- try {
- d.Jo = !!new(g.AudioContext || g.webkitAudioContext || g.mozAudioContext)
- } catch(u) {
- d.Jo = !1
- }
- try {
- var t = d.localStorage = g.localStorage;
- t.setItem("storage", "");
- t.removeItem("storage");
- t = null
- } catch(v) {
- "SECURITY_ERR" !== v.name && "QuotaExceededError" !== v.name || b.warn("Warning: localStorage isn't enabled. Please confirm browser cookie or privacy option"),
- d.localStorage = function() {}
- }
- t = d.Zt = {
- canvas: !0
- };
- b.da == b.wb && (t.opengl = !0);
- void 0 !== k.ontouchstart || h.msPointerEnabled ? t.touches = !0 : void 0 !== k.onmouseup && (t.mouse = !0);
- void 0 !== k.onkeyup && (t.keyboard = !0);
- if (g.DeviceMotionEvent || g.DeviceOrientationEvent) t.accelerometer = !0;
- g = m.match(/(iPad|iPhone|iPod)/i) ? !0 : !1;
- m = m.match(/android/i) || h.platform.match(/android/i) ? !0 : !1;
- k = d.mD; - 1 != h.appVersion.indexOf("Win") ? k = d.nD: g ? k = d.Nv: -1 != h.appVersion.indexOf("Mac") ? k = d.Ov: -1 != h.appVersion.indexOf("X11") ? k = d.lD: -1 != h.appVersion.indexOf("Linux") ? k = d.kD: m && (k = d.jD);
- d.Su = k;
- d.DT = function() {};
- d.ES = function() {};
- d.JX = function() {};
- d.CS = function() {
- var a;
- a = "" + ("isMobile : " + this.Kf + "\r\n");
- a += "language : " + this.language + "\r\n";
- a += "browserType : " + this.Ih + "\r\n";
- a += "capabilities : " + JSON.stringify(this.Zt) + "\r\n";
- a += "os : " + this.Su + "\r\n";
- a += "platform : " + this.platform + "\r\n";
- b.log(a)
- }
- };
- b.PP = 0;
- b.QP = 1;
- b.NP = 2;
- b.OP = 3;
- b.Hd = null;
- b.l = null;
- b.ra = null;
- b.PF = null;
- b.yo = !1;
- b.Fy = !1;
- b.Ey = function(a) {
- var c, d;
- if (!b.Fy) {
- b.Fy = !0;
- var e = window,
- f = new Date,
- g = 1E3 / b.Va.Jc[b.Va.Vd.jp];
- e.GA = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame ||
- function(a) {
- var c = (new Date).getTime(),
- d = Math.max(0, g - (c - f)),
- e = window.setTimeout(function() {
- a()
- },
- d);
- f = c + d;
- return e
- };
- e.cancelAnimationFrame = window.cancelAnimationFrame || window.cancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame || window.msCancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.oCancelAnimationFrame ||
- function(a) {
- clearTimeout(a)
- };
- var h = b.Ca(a) || b.Ca("#" + a),
- k;
- "CANVAS" == h.tagName ? (c = c || h.width, d = d || h.height, k = b.Jh = b.rb("DIV"), a = b.ra = h, a.parentNode.insertBefore(k, a), a.cz(k), k.setAttribute("id", "Cocos2dGameContainer")) : ("DIV" != h.tagName && b.log("Warning: target element is not a DIV or CANVAS"), c = c || h.clientWidth, d = d || h.clientHeight, k = b.Jh = h, a = b.ra = b.Ca(b.rb("CANVAS")), h.appendChild(a));
- a.$y("gameCanvas");
- a.setAttribute("width", c || 480);
- a.setAttribute("height", d || 320);
- a.setAttribute("tabindex", 99);
- a.style.outline = "none";
- h = k.style;
- h.width = (c || 480) + "px";
- h.height = (d || 320) + "px";
- h.margin = "0 auto";
- h.position = "relative";
- h.overflow = "hidden";
- k.top = "100%";
- b.da == b.wb && (b.l = b.HZ = b.sz(a, {
- stencil: !0,
- preserveDrawingBuffer: !0,
- antialias: !b.Aa.Kf,
- alpha: !1
- }));
- b.l ? (e.gl = b.l, b.Hd = new b.oC(b.l), b.yo = !0, b.va.CG(), b.ff.$n()) : (b.l = a.getContext("2d"), b.jR = b.l, b.l.translate(0, a.height), b.Hd = b.Cv ? new b.Cv(b.l) : null);
- b.PF = k;
- b.log(b.oq);
- b.yH();
- b.Aa.Kf && (c = b.rb("style"), c.type = "text/css", document.body.appendChild(c), c.textContent = "body,canvas,div{ -moz-user-select: none;-webkit-user-select: none;-ms-user-select: none;-khtml-user-select: none;-webkit-tap-highlight-color:rgba(0,0,0,0);}");
- b.view = b.mq.Zr();
- b.dA.XL(b.ra);
- b.Qa = b.ha.Zr();
- b.Qa.fv && b.Qa.fv(b.view);
- b.aa = b.Qa.Ql();
- b.OX = new b.Vv;
- b.ML = new b.vD
- }
- };
- b.SQ = function() {
- if (b.da !== b.wb) throw "This feature supports WebGL render mode only.";
- };
- b.Fx = !1;
- b.yH = function() {
- b.Fx = !1;
- b.ra.oncontextmenu = function() {
- if (!b.Fx) return ! 1
- }
- };
- b.Va = {
- xv: 0,
- dC: 1,
- MO: 2,
- cC: 3,
- hq: 4,
- yv: 5,
- wv: 6,
- tm: "game_on_hide",
- ek: "game_on_show",
- kg: null,
- lg: null,
- lR: [],
- Vd: {
- nu: "engineDir",
- tS: "dependencies",
- gp: "debugMode",
- oN: "showFPS",
- jp: "frameRate",
- id: "id",
- hm: "renderMode",
- hL: "jsList",
- QI: "classReleaseMode"
- },
- cy: !1,
- Is: !1,
- $a: !0,
- bl: null,
- Jc: null,
- Ru: null,
- pW: null,
- oY: function(a) {
- this.Jc[this.Vd.jp] = a;
- this.bl && window.cancelAnimationFrame(this.bl);
- this.$a = !0;
- this.Ao()
- },
- Ao: function() {
- var a = this,
- c, d = b.Qa;
- d.DM(a.Jc[a.Vd.oN]);
- c = function() {
- a.$a || (d.wL(), a.bl = window.GA(c))
- };
- window.GA(c);
- a.$a = !1
- },
- oM: function(a) {
- function c() {
- a && (d.Jc[d.Vd.id] = a);
- d.cy ? b.zl && (d.uF = setInterval(function() {
- d.Is && (b.Ey(d.Jc[d.Vd.id]), d.Ao(), d.kg = d.kg || new b.kf(d.tm), d.kg.setUserData(d), d.lg = d.lg || new b.kf(d.ek), d.lg.setUserData(d), d.Ru(), clearInterval(d.uF))
- },
- 10)) : d.RL(function() {
- b.zl && (b.Ey(d.Jc[d.Vd.id]), d.Ao(), d.kg = d.kg || new b.kf(d.tm), d.kg.setUserData(d), d.lg = d.lg || new b.kf(d.ek), d.lg.setUserData(d), d.Ru())
- })
- }
- var d = this;
- document.body ? c() : b.ka(window, "load",
- function() {
- this.removeEventListener("load", arguments.callee, !1);
- c()
- },
- !1)
- },
- yG: function() {
- function a(a) {
- a[c.nu] = a[c.nu] || "frameworks/cocos2d-html5";
- null == a[c.gp] && (a[c.gp] = 0);
- a[c.jp] = a[c.jp] || 60;
- null == a[c.hm] && (a[c.hm] = 1);
- return a
- }
- var c = this.Vd;
- if (document.ccConfig) this.Jc = a(document.ccConfig);
- else try {
- for (var d = document.getElementsByTagName("script"), e = 0; e < d.length; e++) {
- var f = d[e].getAttribute("cocos");
- if ("" == f || f) break
- }
- var g, h, k;
- if (e < d.length) {
- if (g = d[e].src) k = /(.*)\//.exec(g)[0],
- b.D.Jp = k,
- g = b.path.join(k, "project.json");
- h = b.D.Qx(g)
- }
- h || (h = b.D.Qx("project.json"));
- var m = JSON.parse(h);
- this.Jc = a(m || {})
- } catch(n) {
- b.log("Failed to read or parse project.json"),
- this.Jc = a({})
- }
- b.BG(this.Jc, c)
- },
- IG: {},
- xx: function(a, c, d) {
- var e = this.IG;
- if (e[c]) return null;
- d = d || "";
- var f = [],
- g = a[c];
- if (!g) throw "can not find module [" + c + "]";
- c = b.path;
- for (var h = 0,
- k = g.length; h < k; h++) {
- var m = g[h];
- if (!e[m]) {
- var n = c.Hg(m);
- n ? ".js" == n.toLowerCase() && f.push(c.join(d, m)) : (n = this.xx(a, m, d)) && (f = f.concat(n));
- e[m] = 1
- }
- }
- return f
- },
- RL: function(a) {
- var c = this,
- d = c.Jc,
- e = c.Vd,
- f = d[e.nu],
- g = b.D;
- if (!b.zl) throw "The renderer doesn't support the renderMode " + d[e.hm];
- c.cy = !0;
- var h = d[e.hL] || [];
- b.oa ? g.lA("", h,
- function(d) {
- if (d) throw d;
- c.Is = !0;
- a && a()
- }) : (e = b.path.join(f, "moduleConfig.json"), g.mA(e,
- function(e, g) {
- if (e) throw e;
- var n = d.modules || [],
- r = g.module,
- s = [];
- b.da == b.wb ? n.splice(0, 0, "shaders") : 0 > n.indexOf("core") && n.splice(0, 0, "core");
- for (var u = 0,
- t = n.length; u < t; u++) {
- var v = c.xx(r, n[u], f);
- v && (s = s.concat(v))
- }
- s = s.concat(h);
- b.D.lA(s,
- function(d) {
- if (d) throw d;
- c.Is = !0;
- a && a()
- })
- }))
- }
- };
- b.Va.yG();
- Function.prototype.bind = Function.prototype.bind ||
- function(a) {
- var c = this;
- return function() {
- var d = Array.prototype.slice.call(arguments);
- return c.apply(a || null, d)
- }
- };
- b.c = {
- qv: "cc.ActionManager.addAction(): action must be non-null",
- IB: "cocos2d: removeAction: Target not found",
- pO: "cc.ActionManager.removeActionByTag(): an invalid tag",
- qO: "cc.ActionManager.removeActionByTag(): target must be non-null",
- GB: "cc.ActionManager.getActionByTag(): an invalid tag",
- HB: "cocos2d : getActionByTag(tag \x3d %s): Action not found",
- TI: "cocos2d: **** WARNING **** CC_ENABLE_PROFILERS is defined. Disable it when you finish profiling (from ccConfig.js)",
- UI: "Expected 'data' dict, but not found. Config file: %s",
- VI: "Please load the resource first : %s",
- jC: "cocos2d: Director: Error in gettimeofday",
- kC: "cocos2d: Director: unrecognized projection",
- YO: "cocos2d: Director: unrecognized projection",
- iC: "cocos2d: Director: Error in gettimeofday",
- hC: "running scene should not null",
- Bv: "the scene should not null",
- qj: "element type is wrong!",
- ED: "CCSheduler#scheduleCallback. Callback already scheduled. Updating interval from:%s to %s",
- FD: "cc.scheduler.scheduleCallbackForTarget(): callback_fn should be non-null.",
- GD: "cc.scheduler.scheduleCallbackForTarget(): target should be non-null.",
- CD: "cc.Scheduler.pauseTarget():target should be non-null",
- DD: "cc.Scheduler.resumeTarget():target should be non-null",
- BD: "cc.Scheduler.isTargetPaused():target should be non-null",
- WC: "getZOrder is deprecated. Please use getLocalZOrder instead.",
- gD: "setZOrder is deprecated. Please use setLocalZOrder instead.",
- UC: "RotationX !\x3d RotationY. Don't know which one to return",
- VC: "ScaleX !\x3d ScaleY. Don't know which one to return",
- FP: "An Node can't be added as a child of itself.",
- GP: "child already added. It can't be added again",
- RC: "child must be non-null",
- aD: "removeFromParentAndCleanup is deprecated. Use removeFromParent instead",
- SC: "boundingBox is deprecated. Use getBoundingBox instead",
- ZC: "argument tag is an invalid tag",
- $C: "cocos2d: removeChildByTag(tag \x3d %s): child not found!",
- YC: "removeAllChildrenWithCleanup is deprecated. Use removeAllChildren instead",
- hD: "cc.Node.stopActionBy(): argument tag an invalid tag",
- TC: "cc.Node.getActionByTag(): argument tag is an invalid tag",
- cD: "resumeSchedulerAndActions is deprecated, please use resume instead.",
- XC: "pauseSchedulerAndActions is deprecated, please use pause instead.",
- QC: "Unknown callback function",
- bD: "child must be non-null",
- dD: "cc.Node.runAction(): action must be non-null",
- eD: "callback function must be non-null",
- fD: "interval must be positive",
- HP: "cocos2d: Could not initialize cc.AtlasNode. Invalid Texture.",
- JB: "cc.AtlasNode.updateAtlasValues(): Shall be overridden in subclasses",
- tO: "",
- rv: "cocos2d: Could not initialize cc.AtlasNode. Invalid Texture.",
- YE: "cc._EventListenerKeyboard.checkAvailable(): Invalid EventListenerKeyboard!",
- $E: "cc._EventListenerTouchOneByOne.checkAvailable(): Invalid EventListenerTouchOneByOne!",
- ZE: "cc._EventListenerTouchAllAtOnce.checkAvailable(): Invalid EventListenerTouchAllAtOnce!",
- XE: "cc._EventListenerAcceleration.checkAvailable(): _onAccelerationEvent must be non-nil",
- wC: "Invalid parameter.",
- jn: "Don't call this method if the event is for touch.",
- yJ: "Invalid scene graph priority!",
- zJ: "0 priority is forbidden for fixed priority since it's used for scene graph based priority.",
- DJ: "Invalid listener type!",
- EJ: "Can't set fixed priority with scene graph based listener.",
- AJ: "Invalid parameters.",
- BJ: "listener must be a cc.EventListener object when adding a fixed priority listener",
- CJ: "The listener has been registered, please don't register it again.",
- MC: "parameters should not be ending with null in Javascript",
- NC: "Invalid index in MultiplexLayer switchTo message",
- OC: "Invalid index in MultiplexLayer switchTo message",
- LC: "cc.Layer.addLayer(): layer should be non-null",
- pC: "Resolution not valid",
- qC: "should set resolutionPolicy",
- XK: "The touches is more than MAX_TOUCHES, nUnusedIndex \x3d %s",
- pB: "cc.swap is being modified from original macro, please check usage",
- bp: "WebGL error %s",
- rI: "cocos2d: cc.AnimationCache: No animations were found in provided dictionary.",
- sI: "cc.AnimationCache. Invalid animation format",
- zI: "cc.AnimationCache.addAnimations(): File could not be found",
- tI: "cocos2d: cc.AnimationCache: Animation '%s' found in dictionary without any frames - cannot add to animation cache.",
- uI: "cocos2d: cc.AnimationCache: Animation '%s' refers to frame '%s' which is not currently in the cc.SpriteFrameCache. This frame will not be added to the animation.",
- vI: "cocos2d: cc.AnimationCache: None of the frames for animation '%s' were found in the cc.SpriteFrameCache. Animation is not being added to the Animation Cache.",
- wI: "cocos2d: cc.AnimationCache: An animation in your dictionary refers to a frame which is not in the cc.SpriteFrameCache. Some or all of the frames for the animation '%s' may be missing.",
- xI: "cocos2d: CCAnimationCache: Animation '%s' found in dictionary without any frames - cannot add to animation cache.",
- yI: "cocos2d: cc.AnimationCache: Animation '%s' refers to frame '%s' which is not currently in the cc.SpriteFrameCache. This frame will not be added to the animation.",
- AI: "cc.AnimationCache.addAnimations(): Invalid texture file name",
- cE: "cc.Sprite.reorderChild(): this child is not in children list",
- VD: "cc.Sprite.ignoreAnchorPointForPosition(): it is invalid in cc.Sprite when using SpriteBatchNode",
- fE: "cc.Sprite.setDisplayFrameWithAnimationName(): Frame not found",
- gE: "cc.Sprite.setDisplayFrameWithAnimationName(): Invalid frame index",
- eE: "setDisplayFrame is deprecated, please use setSpriteFrame instead.",
- OD: "cc.Sprite._updateBlendFunc(): _updateBlendFunc doesn't work when the sprite is rendered using a cc.CCSpriteBatchNode",
- XD: "cc.Sprite.initWithSpriteFrame(): spriteFrame should be non-null",
- YD: "cc.Sprite.initWithSpriteFrameName(): spriteFrameName should be non-null",
- ZD: " is null, please check.",
- WD: "cc.Sprite.initWithFile(): filename should be non-null",
- hE: "cc.Sprite.setDisplayFrameWithAnimationName(): animationName must be non-null",
- dE: "cc.Sprite.reorderChild(): child should be non-null",
- PD: "cc.Sprite.addChild(): cc.Sprite only supports cc.Sprites as children when using cc.SpriteBatchNode",
- QD: "cc.Sprite.addChild(): cc.Sprite only supports a sprite using same texture as children when using cc.SpriteBatchNode",
- RD: "cc.Sprite.addChild(): child should be non-null",
- jE: "cc.Sprite.texture setter: Batched sprites should use the same texture as the batchnode",
- cQ: "cc.SpriteBatchNode.updateQuadFromSprite(): cc.SpriteBatchNode only supports cc.Sprites as children",
- aE: "cc.SpriteBatchNode.insertQuadFromSprite(): cc.SpriteBatchNode only supports cc.Sprites as children",
- SD: "cc.SpriteBatchNode.addChild(): cc.SpriteBatchNode only supports cc.Sprites as children",
- TD: "cc.SpriteBatchNode.addChild(): cc.Sprite is not using the same texture",
- $D: "Sprite.initWithTexture(): Argument must be non-nil ",
- iE: "Invalid spriteFrameName",
- kE: "Invalid argument: cc.Sprite.texture setter expects a CCTexture2D.",
- dQ: "cc.SpriteBatchNode.updateQuadFromSprite(): sprite should be non-null",
- bE: "cc.SpriteBatchNode.insertQuadFromSprite(): sprite should be non-null",
- UD: "cc.SpriteBatchNode.addChild(): child should be non-null",
- HD: "cc.SpriteBatchNode.addQuadFromSprite(): SpriteBatchNode only supports cc.Sprites as children",
- JD: "cocos2d: CCSpriteBatchNode: resizing TextureAtlas capacity from %s to %s.",
- KD: "cocos2d: WARNING: Not enough memory to resize the atlas",
- MD: "cc.SpriteBatchNode.addChild(): Child doesn't belong to Sprite",
- LD: "cc.SpriteBatchNode.addChild(): sprite batch node should contain the child",
- ID: "cc.SpriteBatchNode.addQuadFromSprite(): child should be non-null",
- ND: "cc.SpriteBatchNode.addChild():child should be non-null",
- wN: "cocos2d: WARNING: originalWidth/Height not found on the cc.SpriteFrame. AnchorPoint won't work as expected. Regenrate the .plist",
- yN: "cocos2d: WARNING: an alias with name %s already exists",
- vN: "cocos2d: WARNING: Sprite frame: %s has already been added by another source, please fix name conflit",
- BN: "cocos2d: cc.SpriteFrameCahce: Frame %s not found",
- xN: "Please load the resource first : %s",
- zN: "cc.SpriteFrameCache.addSpriteFrames(): plist should be non-null",
- AN: "Argument must be non-nil",
- eq: "cc.SpriteBatchNode.updateQuadFromSprite(): cc.SpriteBatchNode only supports cc.Sprites as children",
- UB: "cc.SpriteBatchNode.insertQuadFromSprite(): cc.SpriteBatchNode only supports cc.Sprites as children",
- QB: "cc.SpriteBatchNode.addChild(): cc.SpriteBatchNode only supports cc.Sprites as children",
- TB: "Sprite.initWithTexture(): Argument must be non-nil ",
- RB: "cc.Sprite.addChild(): child should be non-null",
- WB: "Invalid spriteFrameName",
- XB: "Invalid argument: cc.Sprite texture setter expects a CCTexture2D.",
- YB: "cc.SpriteBatchNode.updateQuadFromSprite(): sprite should be non-null",
- VB: "cc.SpriteBatchNode.insertQuadFromSprite(): sprite should be non-null",
- SB: "cc.SpriteBatchNode.addChild(): child should be non-null",
- BE: "cocos2d: Could not open file: %s",
- bw: "cc.TextureAtlas.insertQuad(): invalid totalQuads",
- CE: "cc.TextureAtlas.initWithTexture():texture should be non-null",
- ME: "cc.TextureAtlas.updateQuad(): quad should be non-null",
- NE: "cc.TextureAtlas.updateQuad(): Invalid index",
- FE: "cc.TextureAtlas.insertQuad(): Invalid index",
- GE: "cc.TextureAtlas.insertQuad(): Invalid index + amount",
- DE: "cc.TextureAtlas.insertQuadFromIndex(): Invalid newIndex",
- EE: "cc.TextureAtlas.insertQuadFromIndex(): Invalid fromIndex",
- KE: "cc.TextureAtlas.removeQuadAtIndex(): Invalid index",
- LE: "cc.TextureAtlas.removeQuadsAtIndex(): index + amount out of bounds",
- HE: "cc.TextureAtlas.moveQuadsFromIndex(): move is out of bounds",
- IE: "cc.TextureAtlas.moveQuadsFromIndex(): Invalid newIndex",
- JE: "cc.TextureAtlas.moveQuadsFromIndex(): Invalid oldIndex",
- IN: "TextureCache:addPVRTCImage does not support on HTML5",
- GN: "TextureCache:addPVRTCImage does not support on HTML5",
- HN: "addPVRImage does not support on HTML5",
- JN: "cocos2d: Couldn't add UIImage in TextureCache",
- LN: "cocos2d: '%s' id\x3d%s %s x %s",
- rB: "cocos2d: '%s' id\x3d HTMLCanvasElement %s x %s",
- MN: "cocos2d: TextureCache dumpDebugInfo: %s textures, HTMLCanvasElement for %s KB (%s MB)",
- KN: "cc.Texture.addUIImage(): image should be non-null",
- sE: "initWithETCFile does not support on HTML5",
- wE: "initWithPVRFile does not support on HTML5",
- yE: "initWithPVRTCData does not support on HTML5",
- oE: "cc.Texture.addImage(): path should be non-null",
- uE: "cocos2d: cc.Texture2D. Can't create Texture. UIImage is nil",
- vE: "cocos2d: WARNING: Image (%s x %s) is bigger than the supported %s x %s",
- AE: "initWithString isn't supported on cocos2d-html5",
- tE: "initWithETCFile does not support on HTML5",
- xE: "initWithPVRFile does not support on HTML5",
- zE: "initWithPVRTCData does not support on HTML5",
- qE: "bitsPerPixelForFormat: %s, cannot give useful result, it's a illegal pixel format",
- nE: "cocos2d: cc.Texture2D: Using RGB565 texture since image has no alpha",
- pE: "cc.Texture.addImage(): path should be non-null",
- rE: "NSInternalInconsistencyException",
- Gb: "Missing file: %s",
- xA: "cc.radiansToDegress() should be called cc.radiansToDegrees()",
- Pq: "Rect width exceeds maximum margin: %s",
- Oq: "Rect height exceeds maximum margin: %s",
- xC: "If program goes here, there should be event in dispatch.",
- yC: "_inDispatch should be 1 here."
- };
- b.io = function(a) {
- if (b.ra) {
- var c = b.RG,
- d = document;
- if (!c) {
- var e = d.createElement("Div"),
- c = e.style;
- e.setAttribute("id", "logInfoDiv");
- b.ra.parentNode.appendChild(e);
- e.setAttribute("width", "200");
- e.setAttribute("height", b.ra.height);
- c.zIndex = "99999";
- c.position = "absolute";
- c.top = "0";
- c.left = "0";
- c = b.RG = d.createElement("textarea");
- d = c.style;
- c.setAttribute("rows", "20");
- c.setAttribute("cols", "30");
- c.setAttribute("disabled", !0);
- e.appendChild(c);
- d.backgroundColor = "transparent";
- d.borderBottom = "1px solid #cccccc";
- d.borderRightWidth = "0px";
- d.borderLeftWidth = "0px";
- d.borderTopWidth = "0px";
- d.borderTopStyle = "none";
- d.borderRightStyle = "none";
- d.borderLeftStyle = "none";
- d.padding = "0px";
- d.margin = 0
- }
- a = "string" == typeof a ? a: JSON.stringify(a);
- c.value = c.value + a + "\r\n";
- c.scrollTop = c.scrollHeight
- }
- };
- b.Un = function(a) {
- if ("object" === typeof a) try {
- return JSON.stringify(a)
- } catch(c) {
- return ""
- } else return a
- };
- console.log && (b.log = function(a) {
- for (var c = 1; c < arguments.length; c++) a = a.replace(/(%s)|(%d)/, b.Un(arguments[c]));
- console.log(a)
- },
- b.warn = console.warn ?
- function(a) {
- for (var c = 1; c < arguments.length; c++) a = a.replace(/(%s)|(%d)/, b.Un(arguments[c]));
- console.warn(a)
- }: b.log, b.error = console.error ?
- function(a) {
- for (var c = 1; c < arguments.length; c++) a = a.replace(/(%s)|(%d)/, b.Un(arguments[c]));
- console.error(a)
- }: b.log, b.assert = function(a, c) {
- if (!a && c) {
- for (var d = 2; d < arguments.length; d++) c = c.replace(/(%s)|(%d)/, b.Un(arguments[d]));
- throw c;
- }
- });
- var q = b.Va.Jc[b.Va.Vd.gp],
- x = b.Va;
- console.log && q === x.dC || (b.log = q == x.hq ? b.io.bind(b) : function() {});
- q && q != x.xv && q != x.cC && q != x.wv || (b.warn = function() {});
- q != x.hq && q != x.yv && console.warn || (b.warn = b.io.bind(b));
- q && q != x.xv ? q != x.hq && q != x.yv && q != x.wv && console.error || (b.error = b.io.bind(b), b.assert = function(a, c) {
- if (!a && c) {
- for (var d = 2; d < arguments.length; d++) c = c.replace("%s", arguments[d]);
- b.io(c)
- }
- }) : (b.error = function() {},
- b.assert = function() {});
- b.D.tL = function(a, c) {
- var d = this,
- e = this.rp(),
- f = "load " + a + " failed!";
- e.open("GET", a, !0);
- /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) ? (e.setRequestHeader("Accept-Charset", "x-user-defined"), e.onreadystatechange = function() {
- if (4 == e.readyState && 200 == e.status) {
- var a = b.vw(e.responseBody);
- c(null, d.Ho(a))
- } else c(f)
- }) : (e.overrideMimeType && e.overrideMimeType("text/plain; charset\x3dx-user-defined"), e.onload = function() {
- 4 == e.readyState && 200 == e.status ? c(null, d.Ho(e.responseText)) : c(f)
- });
- e.send(null)
- };
- b.D.Ho = function(a) {
- if (!a) return null;
- for (var c = new Uint8Array(a.length), d = 0; d < a.length; d++) c[d] = a.charCodeAt(d) & 255;
- return c
- };
- b.D.UV = function(a) {
- var c = this.rp(),
- d = "load " + a + " failed!";
- c.open("GET", a, !1);
- a = null;
- if (/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)) {
- c.setRequestHeader("Accept-Charset", "x-user-defined");
- c.send(null);
- if (200 != c.status) return b.log(d),
- null; (c = b.vw(c.responseBody)) && (a = this.Ho(c))
- } else {
- c.overrideMimeType && c.overrideMimeType("text/plain; charset\x3dx-user-defined");
- c.send(null);
- if (200 != c.status) return b.log(d),
- null;
- a = this.Ho(c.responseText)
- }
- return a
- };
- var Uint8Array = Uint8Array || Array;
- if (/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)) {
- var y = b.rb("script");
- y.type = "text/vbscript";
- y.textContent = '\x3c!-- IEBinaryToArray_ByteStr --\x3e\r\nFunction IEBinaryToArray_ByteStr(Binary)\r\n IEBinaryToArray_ByteStr \x3d CStr(Binary)\r\nEnd Function\r\nFunction IEBinaryToArray_ByteStr_Last(Binary)\r\n Dim lastIndex\r\n lastIndex \x3d LenB(Binary)\r\n if lastIndex mod 2 Then\r\n IEBinaryToArray_ByteStr_Last \x3d Chr( AscB( MidB( Binary, lastIndex, 1 ) ) )\r\n Else\r\n IEBinaryToArray_ByteStr_Last \x3d ""\r\n End If\r\nEnd Function\r\n';
- document.body.appendChild(y);
- b.vw = function(a) {
- for (var c = {},
- d = 0; 256 > d; d++) for (var e = 0; 256 > e; e++) c[String.fromCharCode(d + 256 * e)] = String.fromCharCode(d) + String.fromCharCode(e);
- d = IEBinaryToArray_ByteStr(a);
- a = IEBinaryToArray_ByteStr_Last(a);
- return d.replace(/[\s\S]/g,
- function(a) {
- return c[a]
- }) + a
- }
- };
- b = b || {};
- b.Rx = "";
- b.Ji = "";
- b.os = "";
- var b = b || {},
- B = {
- id: 0 | 998 * Math.random(),
- ZK: 0 | 998 * Math.random(),
- oz: function(a, c, d) {
- a = a.toString();
- var e = a.substring(a.indexOf("(") + 1, a.indexOf(")")),
- e = e.trim();
- for (a = a.substring(a.indexOf("{") + 1, a.lastIndexOf("}")); - 1 != a.indexOf("this._super");) {
- var f = a.indexOf("this._super"),
- g = a.indexOf("(", f),
- h = a.substring(g + 1, a.indexOf(")", g)),
- h = h.trim();
- a = a.substring(0, f) + "ClassManager[" + d + "]." + c + ".call(this" + (h ? ",": "") + a.substring(g + 1)
- }
- return Function(e, a)
- },
- oK: function() {
- return this.id++
- },
- pK: function() {
- return this.ZK++
- }
- };
- B.oz.LO = B; (function() {
- var a = /\b_super\b/,
- c = b.Va.Jc[b.Va.Vd.QI];
- c && console.log("release Mode");
- b.oa = function() {};
- b.oa.extend = function(d) {
- function e() {
- this.L = B.pK();
- this.ctor && this.ctor.apply(this, arguments)
- }
- var f = this.prototype,
- g = Object.create(f),
- h = B.oK();
- B[h] = f;
- var k = {
- writable: !0,
- enumerable: !1,
- configurable: !0
- };
- g.L = null;
- e.id = h;
- k.value = h;
- Object.defineProperty(g, "__pid", k);
- e.prototype = g;
- k.value = e;
- Object.defineProperty(e.prototype, "constructor", k);
- this.ze && (e.ze = b.d(this.ze));
- this.Ae && (e.Ae = b.d(this.Ae));
- for (var m = 0,
- n = arguments.length; m < n; ++m) {
- var r = arguments[m],
- s;
- for (s in r) {
- var u = "function" === typeof r[s],
- t = "function" === typeof f[s],
- v = a.test(r[s]);
- c && u && t && v ? (k.value = B.oz(r[s], s, h), Object.defineProperty(g, s, k)) : u && t && v ? (k.value = function(a, c) {
- return function() {
- var d = this._super;
- this._super = f[a];
- var e = c.apply(this, arguments);
- this._super = d;
- return e
- }
- } (s, r[s]), Object.defineProperty(g, s, k)) : u ? (k.value = r[s], Object.defineProperty(g, s, k)) : g[s] = r[s];
- if (u) {
- var w, A;
- if (this.ze && this.ze[s]) {
- var u = this.ze[s],
- z;
- for (z in this.Ae) if (this.Ae[z] == u) {
- A = z;
- break
- }
- b.k(g, u, r[s], r[A] ? r[A] : g[A], s, A)
- }
- if (this.Ae && this.Ae[s]) {
- u = this.Ae[s];
- for (z in this.ze) if (this.ze[z] == u) {
- w = z;
- break
- }
- b.k(g, u, r[w] ? r[w] : g[w], r[s], w, s)
- }
- }
- }
- }
- e.extend = b.oa.extend;
- e.nV = function(a) {
- for (var c in a) g[c] = a[c]
- };
- return e
- }
- })();
- b.k = function(a, c, d, e, f, g) {
- if (a.__defineGetter__) d && a.__defineGetter__(c, d),
- e && a.__defineSetter__(c, e);
- else if (Object.defineProperty) {
- var h = {
- enumerable: !1,
- configurable: !0
- };
- d && (h.get = d);
- e && (h.set = e);
- Object.defineProperty(a, c, h)
- } else throw Error("browser does not support getters");
- if (!f && !g) for (var h = null != d,
- k = void 0 != e,
- m = Object.getOwnPropertyNames(a), n = 0; n < m.length; n++) {
- var r = m[n];
- if ((a.__lookupGetter__ ? !a.__lookupGetter__(r) : !Object.getOwnPropertyDescriptor(a, r)) && "function" === typeof a[r]) {
- var s = a[r];
- if (h && s === d && (f = r, !k || g)) break;
- if (k && s === e && (g = r, !h || f)) break
- }
- }
- a = a.constructor;
- f && (a.ze || (a.ze = {}), a.ze[f] = c);
- g && (a.Ae || (a.Ae = {}), a.Ae[g] = c)
- };
- b.d = function(a) {
- var c = a.constructor ? new a.constructor: {},
- d;
- for (d in a) {
- var e = a[d];
- c[d] = "object" != typeof e || !e || e instanceof b.m || e instanceof HTMLElement ? e: b.d(e)
- }
- return c
- };
- b = b || {};
- b.p = b.p || {};
- b.TR = function() {};
- b.lP = {
- VR: 8,
- sZ: 9,
- iT: 13,
- shift: 16,
- rS: 17,
- alt: 18,
- pause: 19,
- bS: 20,
- escape: 27,
- TW: 33,
- SW: 34,
- end: 35,
- home: 36,
- left: 37,
- vZ: 38,
- right: 39,
- yS: 40,
- qV: 45,
- WO: 46,
- 0 : 48,
- 1 : 49,
- 2 : 50,
- 3 : 51,
- 4 : 52,
- 5 : 53,
- 6 : 54,
- 7 : 55,
- 8 : 56,
- 9 : 57,
- a: 65,
- b: 66,
- J: 67,
- P: 68,
- FS: 69,
- lT: 70,
- g: 71,
- kV: 72,
- mV: 73,
- KV: 74,
- LV: 75,
- RV: 76,
- WV: 77,
- Ap: 78,
- oW: 79,
- rW: 80,
- cX: 81,
- r: 82,
- NX: 83,
- rZ: 84,
- R: 85,
- S: 86,
- FZ: 87,
- x: 88,
- y: 89,
- z: 90,
- dW: 96,
- eW: 97,
- fW: 98,
- gW: 99,
- hW: 100,
- iW: 101,
- jW: 102,
- kW: 103,
- lW: 104,
- mW: 105,
- "*": 106,
- "+": 107,
- "-": 109,
- numdel: 110,
- "/": 111,
- mT: 112,
- qT: 113,
- rT: 114,
- sT: 115,
- tT: 116,
- uT: 117,
- vT: 118,
- wT: 119,
- xT: 120,
- nT: 121,
- oT: 122,
- pT: 123,
- nW: 144,
- QX: 145,
- RX: 186,
- ",": 186,
- jT: 187,
- "\x3d": 187,
- ";": 188,
- jS: 188,
- sS: 189,
- ".": 190,
- ZW: 190,
- BT: 191,
- jV: 192,
- "[": 219,
- qW: 219,
- "]": 221,
- gS: 221,
- UR: 220,
- quote: 222,
- dZ: 32
- };
- b.cP = 0;
- b.zC = 1;
- b.AC = 2;
- b.dP = 3;
- b.eP = 4;
- b.BC = 5;
- b.oU = function(a) {
- return 8 < a.length && 137 == a[0] && 80 == a[1] && 78 == a[2] && 71 == a[3] && 13 == a[4] && 10 == a[5] && 26 == a[6] && 10 == a[7] ? b.zC: 2 < a.length && (73 == a[0] && 73 == a[1] || 77 == a[0] && 77 == a[1] || 255 == a[0] && 216 == a[1]) ? b.AC: b.BC
- };
- b.oV = function(a, c) {
- function d() {}
- d.prototype = c.prototype;
- a.Rp = c.prototype;
- a.prototype = new d;
- a.prototype.constructor = a
- };
- b.WR = function(a, c, d) {
- var e = arguments.callee.caller;
- if (e.Rp) return ret = e.Rp.constructor.apply(a, Array.prototype.slice.call(arguments, 1));
- for (var f = Array.prototype.slice.call(arguments, 2), g = !1, h = a.constructor; h; h = h.Rp && h.Rp.constructor) if (h.prototype[c] === e) g = !0;
- else if (g) return h.prototype[c].apply(a, f);
- if (a[c] === e) return a.constructor.prototype[c].apply(a, f);
- throw Error("cc.base called from a method of one name to a method of a different name");
- };
- b.UP = function(a, c) {
- this.x = a || 0;
- this.y = c || 0
- };
- function C(a, c) {
- return void 0 == a ? {
- x: 0,
- y: 0
- }: void 0 == c ? {
- x: a.x,
- y: a.y
- }: {
- x: a,
- y: c
- }
- }
- b.NL = function(a, c) {
- return a && c && a.x === c.x && a.y === c.y
- };
- b.bQ = function(a, c) {
- this.width = a || 0;
- this.height = c || 0
- };
- function D(a, c) {
- return void 0 === a ? {
- width: 0,
- height: 0
- }: void 0 === c ? {
- width: a.width,
- height: a.height
- }: {
- width: a,
- height: c
- }
- }
- b.cZ = function(a, c) {
- return a && c && a.width == c.width && a.height == c.height
- };
- b.Uv = function(a, c, d, e) {
- this.x = a || 0;
- this.y = c || 0;
- this.width = d || 0;
- this.height = e || 0
- };
- function E(a, c, d, e) {
- return void 0 === a ? {
- x: 0,
- y: 0,
- width: 0,
- height: 0
- }: void 0 === c ? {
- x: a.x,
- y: a.y,
- width: a.width,
- height: a.height
- }: {
- x: a,
- y: c,
- width: d,
- height: e
- }
- }
- b.AA = function(a, c) {
- return a && c && a.x === c.x && a.y === c.y && a.width === c.width && a.height === c.height
- };
- b.Ns = function(a) {
- return a && 0 === a.x && 0 === a.y && 0 === a.width && 0 === a.height
- };
- b.iX = function(a, c) {
- return a && c ? !(a.x >= c.x || a.y >= c.y || a.x + a.width <= c.x + c.width || a.y + a.height <= c.y + c.height) : !1
- };
- b.em = function(a) {
- return a.x + a.width
- };
- b.jX = function(a) {
- return a.x + a.width / 2
- };
- b.Mj = function(a) {
- return a.x
- };
- b.fm = function(a) {
- return a.y + a.height
- };
- b.kX = function(a) {
- return a.y + a.height / 2
- };
- b.Nj = function(a) {
- return a.y
- };
- b.zA = function(a, c) {
- return c.x >= b.Mj(a) && c.x <= b.em(a) && c.y >= b.Nj(a) && c.y <= b.fm(a)
- };
- b.BA = function(a, c) {
- var d = a.y + a.height,
- e = c.x + c.width,
- f = c.y + c.height;
- return ! (a.x + a.width < c.x || e < a.x || d < c.y || f < a.y)
- };
- b.mX = function(a, c) {
- return ! (a.x + a.width < c.x || c.x + c.width < a.x || a.y + a.height < c.y || c.y + c.height < a.y)
- };
- b.Ip = function(a, c) {
- var d = E(0, 0, 0, 0);
- d.x = Math.min(a.x, c.x);
- d.y = Math.min(a.y, c.y);
- d.width = Math.max(a.x + a.width, c.x + c.width) - d.x;
- d.height = Math.max(a.y + a.height, c.y + c.height) - d.y;
- return d
- };
- b.lX = function(a, c) {
- var d = E(Math.max(b.Mj(a), b.Mj(c)), Math.max(b.Nj(a), b.Nj(c)), 0, 0);
- d.width = Math.min(b.em(a), b.em(c)) - b.Mj(d);
- d.height = Math.min(b.fm(a), b.fm(c)) - b.Nj(d);
- return d
- };
- b.Vv = b.oa.extend({
- Yx: null,
- ks: null,
- ctor: function() {
- window.DOMParser ? (this.ks = !0, this.Yx = new DOMParser) : this.ks = !1
- },
- parse: function(a) {
- return this.Xx(a)
- },
- Xx: function(a) {
- var c;
- this.ks ? c = this.Yx.parseFromString(a, "text/xml") : (c = new ActiveXObject("Microsoft.XMLDOM"), c.async = "false", c.loadXML(a));
- return c
- }
- });
- b.vD = b.Vv.extend({
- parse: function(a) {
- a = this.Xx(a).documentElement;
- if ("plist" != a.tagName) throw "Not a plist file!";
- for (var c = null,
- d = 0,
- e = a.childNodes.length; d < e && (c = a.childNodes[d], 1 != c.nodeType); d++);
- return this.As(c)
- },
- As: function(a) {
- var c = null,
- d = a.tagName;
- if ("dict" == d) c = this.dH(a);
- else if ("array" == d) c = this.cH(a);
- else if ("string" == d) if (1 == a.childNodes.length) c = a.firstChild.nodeValue;
- else for (c = "", d = 0; d < a.childNodes.length; d++) c += a.childNodes[d].nodeValue;
- else "false" == d ? c = !1 : "true" == d ? c = !0 : "real" == d ? c = parseFloat(a.firstChild.nodeValue) : "integer" == d && (c = parseInt(a.firstChild.nodeValue, 10));
- return c
- },
- cH: function(a) {
- for (var c = [], d = 0, e = a.childNodes.length; d < e; d++) {
- var f = a.childNodes[d];
- 1 == f.nodeType && c.push(this.As(f))
- }
- return c
- },
- dH: function(a) {
- for (var c = {},
- d = null,
- e = 0,
- f = a.childNodes.length; e < f; e++) {
- var g = a.childNodes[e];
- 1 == g.nodeType && ("key" == g.tagName ? d = g.firstChild.nodeValue: c[d] = this.As(g))
- }
- return c
- }
- });
- b.ZH = {
- load: function(a, c, d, e) {
- b.D.yp(a, e)
- }
- };
- b.D.Mg(["txt", "xml", "vsh", "fsh", "atlas"], b.ZH);
- b.JG = {
- load: function(a, c, d, e) {
- b.D.mA(a, e)
- }
- };
- b.D.Mg(["json", "ExportJson"], b.JG);
- b.xG = {
- load: function(a, c, d, e) {
- b.D.sd[c] = b.D.Wl(a,
- function(a, d) {
- if (a) return e(a);
- b.va.Fa(c);
- e(null, d)
- })
- }
- };
- b.D.Mg("png jpg bmp jpeg gif ico".split(" "), b.xG);
- b.rH = {
- load: function(a, c, d, e) {
- b.D.sd[c] = b.D.Wl(d.src,
- function(a, d) {
- if (a) return e(a);
- b.va.Fa(c);
- e(null, d)
- })
- }
- };
- b.D.Mg(["serverImg"], b.rH);
- b.gH = {
- load: function(a, c, d, e) {
- b.D.yp(a,
- function(a, c) {
- if (a) return e(a);
- e(null, b.ML.parse(c))
- })
- }
- };
- b.D.Mg(["plist"], b.gH);
- b.NF = {
- lE: {
- ".eot": "embedded-opentype",
- ".ttf": "truetype",
- ".woff": "woff",
- ".svg": "svg"
- },
- Ox: function(a, c, d) {
- var e = document,
- f = b.path,
- g = this.lE,
- h = b.rb("style");
- h.type = "text/css";
- e.body.appendChild(h);
- var k = "@font-face { font-family:" + a + "; src:";
- if (c instanceof Array) for (var m = 0,
- n = c.length; m < n; m++) d = f.Hg(c[m]).toLowerCase(),
- k += "url('" + c[m] + "') format('" + g[d] + "')",
- k += m == n - 1 ? ";": ",";
- else k += "url('" + c + "') format('" + g[d] + "');";
- h.textContent += k + "};";
- c = b.rb("div");
- d = c.style;
- d.fontFamily = a;
- c.innerHTML = ".";
- d.position = "absolute";
- d.left = "-100px";
- d.top = "-100px";
- e.body.appendChild(c)
- },
- load: function(a, c, d, e) {
- c = d.type;
- a = d.name;
- c = d.eZ;
- "string" == typeof d ? (c = b.path.Hg(d), a = b.path.GI(d, c), this.Ox(a, d, c)) : this.Ox(a, c);
- e(null, !0)
- }
- };
- b.D.Mg(["font", "eot", "ttf", "woff", "svg"], b.NF);
- b.PQ = {
- load: function(a, c, d, e) {
- b.D.tL(a, e)
- }
- };
- window.CocosEngine = b.oq = "Cocos2d-JS v3.0 RC2";
- b.vk = 0;
- b.jq = C(0, 0);
- b.fC = 0.5;
- b.JO = 1;
- b.Yv = 1;
- b.iD = 0;
- b.Zv = 0;
- b.eQ = 0;
- b.fQ = 0;
- b.XP = 1;
- b.WP = "-hd";
- b.TE = 1;
- b.Uf = 0;
- b.$P = 0;
- b.JC = 0;
- b.IC = 0;
- b.tq = 1;
- b.NO = b.oq + "-canvas";
- b.rm = 1;
- b.Dv = 1;
- b.Ca = function(a) {
- var c = this == b ? document: this;
- if (a = a instanceof HTMLElement ? a: c.querySelector(a)) a.find = a.find || b.Ca,
- a.Du = a.Du ||
- function(a) {
- return this.className.match(RegExp("(\\s|^)" + a + "(\\s|$)"))
- },
- a.$y = a.$y ||
- function(a) {
- this.Du(a) || (this.className && (this.className += " "), this.className += a);
- return this
- },
- a.aM = a.aM ||
- function(a) {
- this.Du(a) && (this.className = this.className.replace(a, ""));
- return this
- },
- a.remove = a.remove ||
- function() {
- this.parentNode && this.parentNode.removeChild(this);
- return this
- },
- a.cz = a.cz ||
- function(a) {
- a.appendChild(this);
- return this
- },
- a.SL = a.SL ||
- function(a) {
- a.childNodes[0] ? a.insertBefore(this, a.childNodes[0]) : a.appendChild(this);
- return this
- },
- a.mm = a.mm ||
- function() {
- this.style[b.Ca.PN] = b.Ca.translate(this.position) + b.Ca.rotate(this.rotation) + b.Ca.scale(this.scale) + b.Ca.Sj(this.Sj);
- return this
- },
- a.position = a.position || {
- x: 0,
- y: 0
- },
- a.rotation = a.rotation || 0,
- a.scale = a.scale || {
- x: 1,
- y: 1
- },
- a.Sj = a.Sj || {
- x: 0,
- y: 0
- },
- a.tZ = function(a, c) {
- this.position.x = a;
- this.position.y = c;
- this.mm();
- return this
- },
- a.rotate = function(a) {
- this.rotation = a;
- this.mm();
- return this
- },
- a.resize = function(a, c) {
- this.scale.x = a;
- this.scale.y = c;
- this.mm();
- return this
- },
- a.PY = function(a, c) {
- this.Sj.x = a;
- this.Sj.y = c;
- this.mm();
- return this
- };
- return a
- };
- switch (b.Aa.Ih) {
- case b.Aa.$j:
- b.Ca.dm = "Moz";
- b.Ca.Bj = !0;
- break;
- case b.Aa.Yp:
- case b.Aa.aq:
- b.Ca.dm = "webkit";
- b.Ca.Bj = !0;
- break;
- case b.Aa.$p:
- b.Ca.dm = "O";
- b.Ca.Bj = !1;
- break;
- case b.Aa.Zp:
- b.Ca.dm = "ms";
- b.Ca.Bj = !1;
- break;
- default:
- b.Ca.dm = "webkit",
- b.Ca.Bj = !0
- }
- b.Ca.PN = b.Ca.dm + "Transform";
- b.Ca.translate = b.Ca.Bj ?
- function(a) {
- return "translate3d(" + a.x + "px, " + a.y + "px, 0) "
- }: function(a) {
- return "translate(" + a.x + "px, " + a.y + "px) "
- };
- b.Ca.rotate = b.Ca.Bj ?
- function(a) {
- return "rotateZ(" + a + "deg) "
- }: function(a) {
- return "rotate(" + a + "deg) "
- };
- b.Ca.scale = function(a) {
- return "scale(" + a.x + ", " + a.y + ") "
- };
- b.Ca.Sj = function(a) {
- return "skewX(" + -a.x + "deg) skewY(" + a.y + "deg)"
- };
- b.bO = function(a) {
- return b.Ca(document.createElement(a))
- };
- b.Ca.zT = function(a) {
- var c = 0,
- d = 0;
- do c += a.offsetLeft,
- d += a.offsetTop;
- while (a = a.offsetParent);
- return {
- x: c,
- y: d
- }
- };
- b.hP = -1;
- b.PI = Math.PI;
- b.aP = parseFloat("3.402823466e+38F");
- b.bP = parseFloat("1.175494351e-38F");
- b.wD = b.PI / 180;
- b.zv = 180 / b.PI;
- b.RE = 4294967295;
- b.pB = function(a, c, d) {
- if ("object" == typeof d && "undefined" != typeof d.x && "undefined" != typeof d.y) {
- var e = d[a];
- d[a] = d[c];
- d[c] = e
- } else b.log(b.c.pB)
- };
- b.SV = function(a, c, d) {
- return a + (c - a) * d
- };
- b.dX = function() {
- return 16777215 * Math.random()
- };
- b.fX = function() {
- return 2 * (Math.random() - 0.5)
- };
- b.eX = Math.random;
- b.Gg = function(a) {
- return a * b.wD
- };
- b.wA = function(a) {
- return a * b.zv
- };
- b.xA = function(a) {
- b.log(b.c.xA);
- return a * b.zv
- };
- b.Ak = Number.MAX_VALUE - 1;
- b.kc = b.iD ? 1 : 770;
- b.jc = 771;
- b.pA = function(a) {
- a.Jb && (a.Jb.wc(), a.Jb.xd())
- };
- b.hT = function() {};
- b.uS = function() {};
- b.Ze = function() {
- b.We += 1
- };
- b.Nm = 1.192092896E-7;
- b.Ka = b.tq ?
- function() {
- return b.Qa.bh
- }: function() {
- return 1
- };
- b.PL = function(a) {
- var c = b.Ka();
- return C(a.x * c, a.y * c)
- };
- b.OL = function(a) {
- var c = b.Ka();
- return C(a.x / c, a.y / c)
- };
- b.Ds = function(a, c) {
- var d = b.Ka();
- c.x = a.x / d;
- c.y = a.y / d
- };
- b.rN = function(a) {
- var c = b.Ka();
- return D(a.width * c, a.height * c)
- };
- b.qN = function(a) {
- var c = b.Ka();
- return D(a.width / c, a.height / c)
- };
- b.Iy = function(a, c) {
- var d = b.Ka();
- c.width = a.width / d;
- c.height = a.height / d
- };
- b.Hp = b.tq ?
- function(a) {
- var c = b.Ka();
- return E(a.x / c, a.y / c, a.width / c, a.height / c)
- }: function(a) {
- return a
- };
- b.gm = b.tq ?
- function(a) {
- var c = b.Ka();
- return E(a.x * c, a.y * c, a.width * c, a.height * c)
- }: function(a) {
- return a
- };
- b.ONE = 1;
- b.ZERO = 0;
- b.SRC_ALPHA = 770;
- b.SRC_ALPHA_SATURATE = 776;
- b.SRC_COLOR = 768;
- b.DST_ALPHA = 772;
- b.DST_COLOR = 774;
- b.ONE_MINUS_SRC_ALPHA = 771;
- b.ONE_MINUS_SRC_COLOR = 769;
- b.ONE_MINUS_DST_ALPHA = 773;
- b.DST_COLOR = 775;
- b.ONE_MINUS_DST_COLOR = 775;
- b.ONE_MINUS_CONSTANT_ALPHA = 32772;
- b.ONE_MINUS_CONSTANT_COLOR = 32770;
- b.bp = function() {
- if (b.hm == b.wb) {
- var a = b.l.getError();
- a && b.log(b.c.bp, a)
- }
- };
- b.RO = 0;
- b.PO = 1;
- b.SO = 2;
- b.QO = 3;
- b.OO = 2;
- b.DQ = 0;
- b.Lc = 1;
- b.cr = 2;
- b.dr = 4;
- b.gn = b.Lc | b.cr | b.dr;
- b.gP = 0;
- b.lc = 0;
- b.Ck = 1;
- b.Dk = 2;
- b.EQ = 3;
- b.sQ = 0;
- b.oQ = 1;
- b.qQ = 2;
- b.AQ = 3;
- b.yQ = 4;
- b.lQ = 5;
- b.uQ = 6;
- b.wQ = 7;
- b.nQ = 8;
- b.Wq = "ShaderPositionTextureColor";
- b.ZP = "ShaderPositionTextureColorAlphaTest";
- b.Wv = "ShaderPositionColor";
- b.Xv = "ShaderPositionTexture";
- b.zD = "ShaderPositionTexture_uColor";
- b.yD = "ShaderPositionTextureA8Color";
- b.AD = "ShaderPosition_uColor";
- b.xD = "ShaderPositionLengthTextureColor";
- b.tQ = "CC_PMatrix";
- b.pQ = "CC_MVMatrix";
- b.rQ = "CC_MVPMatrix";
- b.BQ = "CC_Time";
- b.zQ = "CC_SinTime";
- b.mQ = "CC_CosTime";
- b.vQ = "CC_Random01";
- b.xQ = "CC_Texture0";
- b.kQ = "CC_alpha_value";
- b.mO = "a_color";
- b.nO = "a_position";
- b.oO = "a_texCoord";
- b.kP = 32;
- b.KO = 3233828865;
- b.IQ = 3233828866;
- b.EP = 8801;
- b.YP = 8802;
- b.UO = 8803;
- b = b || {};
- b.p = b.p || {};
- b.p.gr = function() {
- b.color = function(a, d, e, f, g, h) {
- return void 0 === a ? new b.ad(0, 0, 0, 255, g, h) : "string" === typeof a ? (a = b.Uz(a), new b.ad(a.r, a.g, a.b, a.a)) : "object" === typeof a ? new b.ad(a.r, a.g, a.b, a.a, a.Xo, a.offset) : new b.ad(a, d, e, f, g, h)
- };
- b.ad = function(a, d, e, f, g, h) {
- this.Bb = g || new ArrayBuffer(b.ad.BYTES_PER_ELEMENT);
- this.Na = h || 0;
- g = this.Bb;
- h = this.Na;
- var k = Uint8Array.BYTES_PER_ELEMENT;
- this.Ms = new Uint8Array(g, h, 1);
- this.Ur = new Uint8Array(g, h + k, 1);
- this.vr = new Uint8Array(g, h + 2 * k, 1);
- this.pr = new Uint8Array(g, h + 3 * k, 1);
- this.Ms[0] = a || 0;
- this.Ur[0] = d || 0;
- this.vr[0] = e || 0;
- this.pr[0] = f || 255
- };
- b.ad.BYTES_PER_ELEMENT = 4;
- var a = b.ad.prototype;
- a.lG = function() {
- return this.Ms[0]
- };
- a.DH = function(a) {
- this.Ms[0] = 0 > a ? 0 : a
- };
- a.bG = function() {
- return this.Ur[0]
- };
- a.AH = function(a) {
- this.Ur[0] = 0 > a ? 0 : a
- };
- a.VF = function() {
- return this.vr[0]
- };
- a.tH = function(a) {
- this.vr[0] = 0 > a ? 0 : a
- };
- a.RF = function() {
- return this.pr[0]
- };
- a.sH = function(a) {
- this.pr[0] = 0 > a ? 0 : a
- };
- b.k(a, "r", a.lG, a.DH);
- b.k(a, "g", a.bG, a.AH);
- b.k(a, "b", a.VF, a.tH);
- b.k(a, "a", a.RF, a.sH);
- b.Sa = function(a, d, e, f) {
- this.Bb = e || new ArrayBuffer(b.Sa.BYTES_PER_ELEMENT);
- this.Na = f || 0;
- this.Bh = new Float32Array(this.Bb, this.Na, 1);
- this.Ch = new Float32Array(this.Bb, this.Na + 4, 1);
- this.Bh[0] = a || 0;
- this.Ch[0] = d || 0
- };
- b.Sa.BYTES_PER_ELEMENT = 8;
- Object.defineProperties(b.Sa.prototype, {
- x: {
- get: function() {
- return this.Bh[0]
- },
- set: function(a) {
- this.Bh[0] = a
- },
- enumerable: !0
- },
- y: {
- get: function() {
- return this.Ch[0]
- },
- set: function(a) {
- this.Ch[0] = a
- },
- enumerable: !0
- }
- });
- b.Yd = function(a, d, e, f, g) {
- this.Bb = f || new ArrayBuffer(b.Yd.BYTES_PER_ELEMENT);
- this.Na = g || 0;
- f = this.Bb;
- g = this.Na;
- this.Bh = new Float32Array(f, g, 1);
- this.Bh[0] = a || 0;
- this.Ch = new Float32Array(f, g + Float32Array.BYTES_PER_ELEMENT, 1);
- this.Ch[0] = d || 0;
- this.Rt = new Float32Array(f, g + 2 * Float32Array.BYTES_PER_ELEMENT, 1);
- this.Rt[0] = e || 0
- };
- b.Yd.BYTES_PER_ELEMENT = 12;
- Object.defineProperties(b.Yd.prototype, {
- x: {
- get: function() {
- return this.Bh[0]
- },
- set: function(a) {
- this.Bh[0] = a
- },
- enumerable: !0
- },
- y: {
- get: function() {
- return this.Ch[0]
- },
- set: function(a) {
- this.Ch[0] = a
- },
- enumerable: !0
- },
- z: {
- get: function() {
- return this.Rt[0]
- },
- set: function(a) {
- this.Rt[0] = a
- },
- enumerable: !0
- }
- });
- b.Xf = function(a, d, e, f) {
- this.Bb = e || new ArrayBuffer(b.Xf.BYTES_PER_ELEMENT);
- this.Na = f || 0;
- this.Gt = new Float32Array(this.Bb, this.Na, 1);
- this.Kt = new Float32Array(this.Bb, this.Na + 4, 1);
- this.Gt[0] = a || 0;
- this.Kt[0] = d || 0
- };
- b.Xf.BYTES_PER_ELEMENT = 8;
- Object.defineProperties(b.Xf.prototype, {
- R: {
- get: function() {
- return this.Gt[0]
- },
- set: function(a) {
- this.Gt[0] = a
- },
- enumerable: !0
- },
- S: {
- get: function() {
- return this.Kt[0]
- },
- set: function(a) {
- this.Kt[0] = a
- },
- enumerable: !0
- }
- });
- b.Nq = function(a, d, e, f, g, h) {
- this.Bb = g || new ArrayBuffer(b.Nq.BYTES_PER_ELEMENT);
- this.Na = h || 0;
- g = this.Bb;
- h = b.Sa.BYTES_PER_ELEMENT;
- this.kj = a ? new b.Sa(a.x, a.y, g, 0) : new b.Sa(0, 0, g, 0);
- this.nj = d ? new b.Sa(d.x, d.y, g, h) : new b.Sa(0, 0, g, h);
- this.pi = e ? new b.Sa(e.x, e.y, g, 2 * h) : new b.Sa(0, 0, g, 2 * h);
- this.ri = f ? new b.Sa(f.x, f.y, g, 3 * h) : new b.Sa(0, 0, g, 3 * h)
- };
- b.Nq.BYTES_PER_ELEMENT = 32;
- b.VP = function(a, d, e, f) {
- this.wa = a || new b.Yd(0, 0, 0);
- this.xa = d || new b.Yd(0, 0, 0);
- this.ya = e || new b.Yd(0, 0, 0);
- this.za = f || new b.Yd(0, 0, 0)
- };
- Object.defineProperties(b.Nq.prototype, {
- ya: {
- get: function() {
- return this.kj
- },
- set: function(a) {
- this.kj.x = a.x;
- this.kj.y = a.y
- },
- enumerable: !0
- },
- za: {
- get: function() {
- return this.nj
- },
- set: function(a) {
- this.nj.x = a.x;
- this.nj.y = a.y
- },
- enumerable: !0
- },
- wa: {
- get: function() {
- return this.pi
- },
- set: function(a) {
- this.pi.x = a.x;
- this.pi.y = a.y
- },
- enumerable: !0
- },
- xa: {
- get: function() {
- return this.ri
- },
- set: function(a) {
- this.ri.x = a.x;
- this.ri.y = a.y
- },
- enumerable: !0
- }
- });
- b.Ed = function(a, d, e, f, g) {
- this.Bb = f || new ArrayBuffer(b.Ed.BYTES_PER_ELEMENT);
- this.Na = g || 0;
- f = this.Bb;
- g = this.Na;
- var h = b.Yd.BYTES_PER_ELEMENT;
- this.pj = a ? new b.Yd(a.x, a.y, a.z, f, g) : new b.Yd(0, 0, 0, f, g);
- this.Qk = d ? b.color(d.r, d.g, d.b, d.a, f, g + h) : b.color(0, 0, 0, 0, f, g + h);
- this.th = e ? new b.Xf(e.R, e.S, f, g + h + b.ad.BYTES_PER_ELEMENT) : new b.Xf(0, 0, f, g + h + b.ad.BYTES_PER_ELEMENT)
- };
- b.Ed.BYTES_PER_ELEMENT = 24;
- Object.defineProperties(b.Ed.prototype, {
- e: {
- get: function() {
- return this.pj
- },
- set: function(a) {
- var d = this.pj;
- d.x = a.x;
- d.y = a.y;
- d.z = a.z
- },
- enumerable: !0
- },
- j: {
- get: function() {
- return this.Qk
- },
- set: function(a) {
- var d = this.Qk;
- d.r = a.r;
- d.g = a.g;
- d.b = a.b;
- d.a = a.a
- },
- enumerable: !0
- },
- f: {
- get: function() {
- return this.th
- },
- set: function(a) {
- this.th.R = a.R;
- this.th.S = a.S
- },
- enumerable: !0
- }
- });
- b.Xa = function(a, d, e, f, g, h) {
- this.Bb = g || new ArrayBuffer(b.Xa.BYTES_PER_ELEMENT);
- this.Na = h || 0;
- g = this.Bb;
- h = this.Na;
- var k = b.Ed.BYTES_PER_ELEMENT;
- this.kj = a ? new b.Ed(a.e, a.j, a.f, g, h) : new b.Ed(null, null, null, g, h);
- this.pi = d ? new b.Ed(d.e, d.j, d.f, g, h + k) : new b.Ed(null, null, null, g, h + k);
- this.nj = e ? new b.Ed(e.e, e.j, e.f, g, h + 2 * k) : new b.Ed(null, null, null, g, h + 2 * k);
- this.ri = f ? new b.Ed(f.e, f.j, f.f, g, h + 3 * k) : new b.Ed(null, null, null, g, h + 3 * k)
- };
- b.Xa.BYTES_PER_ELEMENT = 96;
- Object.defineProperties(b.Xa.prototype, {
- ya: {
- get: function() {
- return this.kj
- },
- set: function(a) {
- var d = this.kj;
- d.e = a.e;
- d.j = a.j;
- d.f = a.f
- },
- enumerable: !0
- },
- wa: {
- get: function() {
- return this.pi
- },
- set: function(a) {
- var d = this.pi;
- d.e = a.e;
- d.j = a.j;
- d.f = a.f
- },
- enumerable: !0
- },
- za: {
- get: function() {
- return this.nj
- },
- set: function(a) {
- var d = this.nj;
- d.e = a.e;
- d.j = a.j;
- d.f = a.f
- },
- enumerable: !0
- },
- xa: {
- get: function() {
- return this.ri
- },
- set: function(a) {
- var d = this.ri;
- d.e = a.e;
- d.j = a.j;
- d.f = a.f
- },
- enumerable: !0
- },
- Xo: {
- get: function() {
- return this.Bb
- },
- enumerable: !0
- }
- });
- b.UE = function() {
- return new b.Xa
- };
- b.ew = function(a) {
- if (!a) return b.UE();
- var d = a.ya,
- e = a.wa,
- f = a.za;
- a = a.xa;
- return {
- ya: {
- e: {
- x: d.e.x,
- y: d.e.y,
- z: d.e.z
- },
- j: {
- r: d.j.r,
- g: d.j.g,
- b: d.j.b,
- a: d.j.a
- },
- f: {
- R: d.f.R,
- S: d.f.S
- }
- },
- wa: {
- e: {
- x: e.e.x,
- y: e.e.y,
- z: e.e.z
- },
- j: {
- r: e.j.r,
- g: e.j.g,
- b: e.j.b,
- a: e.j.a
- },
- f: {
- R: e.f.R,
- S: e.f.S
- }
- },
- za: {
- e: {
- x: f.e.x,
- y: f.e.y,
- z: f.e.z
- },
- j: {
- r: f.j.r,
- g: f.j.g,
- b: f.j.b,
- a: f.j.a
- },
- f: {
- R: f.f.R,
- S: f.f.S
- }
- },
- xa: {
- e: {
- x: a.e.x,
- y: a.e.y,
- z: a.e.z
- },
- j: {
- r: a.j.r,
- g: a.j.g,
- b: a.j.b,
- a: a.j.a
- },
- f: {
- R: a.f.R,
- S: a.f.S
- }
- }
- }
- };
- b.CQ = function(a) {
- if (!a) return [];
- for (var d = [], e = 0; e < a.length; e++) d.push(b.ew(a[e]));
- return d
- };
- b.Xd = function(a, d, e, f, g) {
- this.Bb = f || new ArrayBuffer(b.Xd.BYTES_PER_ELEMENT);
- this.Na = g || 0;
- f = this.Bb;
- g = this.Na;
- var h = b.Sa.BYTES_PER_ELEMENT;
- this.pj = a ? new b.Sa(a.x, a.y, f, g) : new b.Sa(0, 0, f, g);
- this.Qk = d ? b.color(d.r, d.g, d.b, d.a, f, g + h) : b.color(0, 0, 0, 0, f, g + h);
- this.th = e ? new b.Xf(e.R, e.S, f, g + h + b.ad.BYTES_PER_ELEMENT) : new b.Xf(0, 0, f, g + h + b.ad.BYTES_PER_ELEMENT)
- };
- b.Xd.BYTES_PER_ELEMENT = 20;
- Object.defineProperties(b.Xd.prototype, {
- e: {
- get: function() {
- return this.pj
- },
- set: function(a) {
- this.pj.x = a.x;
- this.pj.y = a.y
- },
- enumerable: !0
- },
- j: {
- get: function() {
- return this.Qk
- },
- set: function(a) {
- var d = this.Qk;
- d.r = a.r;
- d.g = a.g;
- d.b = a.b;
- d.a = a.a
- },
- enumerable: !0
- },
- f: {
- get: function() {
- return this.th
- },
- set: function(a) {
- this.th.R = a.R;
- this.th.S = a.S
- },
- enumerable: !0
- }
- });
- b.Ra = function(a, d, e, f, g) {
- this.Bb = f || new ArrayBuffer(b.Ra.BYTES_PER_ELEMENT);
- this.Na = g || 0;
- f = this.Bb;
- g = this.Na;
- var h = b.Xd.BYTES_PER_ELEMENT;
- this.jw = a ? new b.Xd(a.e, a.j, a.f, f, g) : new b.Xd(null, null, null, f, g);
- this.qw = d ? new b.Xd(d.e, d.j, d.f, f, g + h) : new b.Xd(null, null, null, f, g + h);
- this.tw = e ? new b.Xd(e.e, e.j, e.f, f, g + 2 * h) : new b.Xd(null, null, null, f, g + 2 * h)
- };
- b.Ra.BYTES_PER_ELEMENT = 60;
- Object.defineProperties(b.Ra.prototype, {
- a: {
- get: function() {
- return this.jw
- },
- set: function(a) {
- var d = this.jw;
- d.e = a.e;
- d.j = a.j;
- d.f = a.f
- },
- enumerable: !0
- },
- b: {
- get: function() {
- return this.qw
- },
- set: function(a) {
- var d = this.qw;
- d.e = a.e;
- d.j = a.j;
- d.f = a.f
- },
- enumerable: !0
- },
- J: {
- get: function() {
- return this.tw
- },
- set: function(a) {
- var d = this.tw;
- d.e = a.e;
- d.j = a.j;
- d.f = a.f
- },
- enumerable: !0
- }
- })
- };
- b.p.Gq = function() {
- var a = b.color;
- a.vG = function() {
- return a(255, 255, 255)
- };
- a.wG = function() {
- return a(255, 255, 0)
- };
- a.XF = function() {
- return a(0, 0, 255)
- };
- a.dG = function() {
- return a(0, 255, 0)
- };
- a.mG = function() {
- return a(255, 0, 0)
- };
- a.gG = function() {
- return a(255, 0, 255)
- };
- a.WF = function() {
- return a(0, 0, 0)
- };
- a.kG = function() {
- return a(255, 127, 0)
- };
- a.cG = function() {
- return a(166, 166, 166)
- };
- b.k(a, "WHITE", a.vG);
- b.k(a, "YELLOW", a.wG);
- b.k(a, "BLUE", a.XF);
- b.k(a, "GREEN", a.dG);
- b.k(a, "RED", a.mG);
- b.k(a, "MAGENTA", a.gG);
- b.k(a, "BLACK", a.WF);
- b.k(a, "ORANGE", a.kG);
- b.k(a, "GRAY", a.cG);
- b.cb.CF = function() {
- return new b.cb(b.ONE, b.ZERO)
- };
- b.cb.kF = function() {
- return new b.cb(b.ONE, b.ONE_MINUS_SRC_ALPHA)
- };
- b.cb.jF = function() {
- return new b.cb(b.SRC_ALPHA, b.ONE_MINUS_SRC_ALPHA)
- };
- b.cb.iF = function() {
- return new b.cb(b.SRC_ALPHA, b.ONE)
- };
- b.k(b.cb, "DISABLE", b.cb.CF);
- b.k(b.cb, "ALPHA_PREMULTIPLIED", b.cb.kF);
- b.k(b.cb, "ALPHA_NON_PREMULTIPLIED", b.cb.jF);
- b.k(b.cb, "ADDITIVE", b.cb.iF)
- };
- b.ad = function(a, c, d, e) {
- this.r = a || 0;
- this.g = c || 0;
- this.b = d || 0;
- this.a = e || 255
- };
- b.color = function(a, c, d, e) {
- return void 0 === a ? {
- r: 0,
- g: 0,
- b: 0,
- a: 255
- }: "string" === typeof a ? b.Uz(a) : "object" === typeof a ? {
- r: a.r,
- g: a.g,
- b: a.b,
- a: a.a || 255
- }: {
- r: a,
- g: c,
- b: d,
- a: e || 255
- }
- };
- b.hS = function(a, c) {
- return a.r === c.r && a.g === c.g && a.b === c.b
- };
- b.FB = function() {
- this.timestamp = this.z = this.y = this.x = 0
- };
- b.Sa = function(a, c) {
- this.x = a || 0;
- this.y = c || 0
- };
- b.Yd = function(a, c, d) {
- this.x = a || 0;
- this.y = c || 0;
- this.z = d || 0
- };
- b.Xf = function(a, c) {
- this.R = a || 0;
- this.S = c || 0
- };
- b.cb = function(a, c) {
- this.src = a;
- this.Y = c
- };
- b.XR = function() {
- return new b.cb(b.ONE, b.ZERO)
- };
- b.Uz = function(a) {
- a = a.replace(/^#?/, "0x");
- a = parseInt(a);
- return b.color(a >> 16, (a >> 8) % 256, a % 256)
- };
- b.iS = function(a) {
- var c = a.r.toString(16),
- d = a.g.toString(16),
- e = a.b.toString(16);
- return "#" + (16 > a.r ? "0" + c: c) + (16 > a.g ? "0" + d: d) + (16 > a.b ? "0" + e: e)
- };
- b.cn = 0;
- b.Yg = 1;
- b.$v = 2;
- b.Ek = 0;
- b.VE = 1;
- b.fw = 2;
- b.KQ = b.oa.extend({
- Ui: null,
- Gl: null,
- or: 0,
- ctor: function() {
- this.Ui = {};
- this.Gl = {};
- this.or = 2 << (0 | 10 * Math.random())
- },
- dF: function() {
- this.or++;
- return "key_" + this.or
- },
- AY: function(a, c) {
- if (null != c) {
- var d = this.dF();
- this.Ui[d] = c;
- this.Gl[d] = a
- }
- },
- CL: function(a) {
- if (null == a) return null;
- var c = this.Ui,
- d;
- for (d in c) if (c[d] === a) return this.Gl[d];
- return null
- },
- CZ: function(a) {
- return this.CL(a)
- },
- cM: function(a) {
- if (null != a) {
- var c = this.Ui,
- d;
- for (d in c) if (c[d] === a) {
- delete this.Gl[d];
- delete c[d];
- break
- }
- }
- },
- BX: function(a) {
- if (null != a) for (var c = 0; c < a.length; c++) this.cM(a[c])
- },
- pI: function() {
- var a = [],
- c = this.Ui,
- d;
- for (d in c) a.push(c[d]);
- return a
- },
- tX: function() {
- this.Ui = {};
- this.Gl = {}
- },
- count: function() {
- return this.pI().length
- }
- });
- b.Fv = function() {
- this.fontName = "Arial";
- this.fontSize = 12;
- this.textAlign = b.Yg;
- this.verticalAlign = b.Ek;
- this.fillStyle = b.color(255, 255, 255, 255);
- this.boundingHeight = this.boundingWidth = 0;
- this.lv = !1;
- this.strokeStyle = b.color(255, 255, 255, 255);
- this.lineWidth = 1;
- this.kB = !1;
- this.shadowBlur = this.shadowOffsetY = this.shadowOffsetX = 0;
- this.shadowOpacity = 1
- };
- b.da === b.wb && (b.assert("function" === typeof b.p.gr, b.c.Gb, "CCTypesWebGL.js"), b.p.gr(), delete b.p.gr);
- b.assert("function" === typeof b.p.Gq, b.c.Gb, "CCTypesPropertyDefine.js");
- b.p.Gq();
- delete b.p.Gq;
- b.hQ = [];
- b.iQ = {};
- b.mq = b.oa.extend({
- VQ: null,
- oc: null,
- Ai: null,
- tg: null,
- sc: null,
- Ve: null,
- Ts: !1,
- ur: !0,
- dh: 1,
- Mt: "",
- Qs: null,
- O: 1,
- Ux: 1,
- ma: 1,
- Vx: 1,
- Oi: 0,
- ts: 5,
- he: null,
- ry: null,
- vy: null,
- uy: null,
- sy: null,
- ty: null,
- al: !1,
- QQ: !1,
- zR: null,
- zx: null,
- Ax: null,
- vR: !1,
- Er: null,
- og: null,
- Sr: 1,
- kn: !1,
- Ex: !0,
- ctor: function() {
- var a = document,
- c = b.Rf,
- d = b.Cd;
- this.og = b.Jh.parentNode === a.body ? a.documentElement: b.Jh.parentNode;
- this.oc = D(0, 0);
- this.fs();
- var a = b.ra.width,
- e = b.ra.height;
- this.Ai = D(a, e);
- this.tg = D(a, e);
- this.sc = E(0, 0, a, e);
- this.Ve = E(0, 0, a, e);
- this.Er = {
- left: 0,
- top: 0
- };
- this.Mt = "Cocos2dHTML5";
- a = b.Aa;
- this.vJ(a.Su == a.Nv || a.Su == a.Ov);
- b.di && b.di.ga(this.Ve);
- this.ry = new b.yc(c.sm, d.pq);
- this.vy = new b.yc(c.tD, d.SHOW_ALL);
- this.uy = new b.yc(c.sm, d.zq);
- this.sy = new b.yc(c.sm, d.Mm);
- this.ty = new b.yc(c.sm, d.qq);
- this.zx = b.ra;
- this.Ax = b.l
- },
- Rs: function() {
- var a = this.tg.width,
- c = this.tg.height;
- this.Qs && (this.fs(), this.Qs.call());
- 0 < a && this.Lp(a, c, this.he)
- },
- fM: function(a) {
- a ? this.kn || (this.kn = !0, a = this.Rs.bind(this), b.ka(window, "resize", a, !1)) : this.kn && (this.kn = !0, a = this.Rs.bind(this), window.removeEventListener("resize", a, !1))
- },
- MY: function(a) {
- if ("function" == typeof a || null == a) this.Qs = a
- },
- fs: function() {
- var a = this.oc;
- a.width = this.og.clientWidth;
- a.height = this.og.clientHeight
- },
- LQ: function() {
- var a = this.tg.width,
- c = this.tg.height;
- 0 < a && this.Lp(a, c, this.he)
- },
- MH: function() {
- if (this.Ex) {
- var a = {
- "user-scalable": "no",
- "maximum-scale": "1.0",
- "initial-scale": "1.0"
- },
- c = document.getElementsByName("viewport"),
- d;
- 0 == c.length ? (c = b.rb("meta"), c.name = "viewport", c.content = "", document.head.appendChild(c)) : c = c[0];
- if (b.Aa.Kf && b.Aa.Ih == b.Aa.$j) c.content = "initial-scale:1";
- else {
- d = c.content;
- for (var e in a) RegExp(e).test(d) || (d += ("" == d ? "": ",") + e + "\x3d" + a[e]);
- c.content = d
- }
- }
- },
- By: function() {
- var a = b.Ka();
- this.ma = this.O = a
- },
- oy: function() {
- this.O = this.Ux;
- this.ma = this.Vx
- },
- MQ: function() {},
- WK: function() {
- this.al = !0
- },
- lI: function(a) {
- this.Ex = a
- },
- vJ: function(a) {
- this.Ts = a ? !0 : !1
- },
- EV: function() {
- return this.Ts
- },
- gT: function(a) {
- this.ur = a ? !0 : !1
- },
- tV: function() {
- return this.ur
- },
- end: function() {},
- BV: function() {
- return null != this.zx && null != this.Ax
- },
- qY: function(a) {
- this.Sr = a;
- b.Qa.Op(b.Qa.kh)
- },
- oZ: function() {},
- uY: function() {},
- bY: function(a, c) {
- this.Er = {
- left: a,
- top: c
- }
- },
- RT: function() {
- return this.Er
- },
- iU: function() {
- return D(this.oc.width, this.oc.height)
- },
- pY: function(a, c) {
- this.oc.width = a;
- this.oc.height = c;
- this.og.style.width = a + "px";
- this.og.style.height = c + "px";
- this.Rs();
- b.Qa.Op(b.Qa.kh)
- },
- cS: function() {},
- Pl: function() {
- return D(this.Ve.width, this.Ve.height)
- },
- Au: function() {
- return C(this.Ve.x, this.Ve.y)
- },
- $R: function() {
- return ! 0
- },
- KU: function() {
- return this.he
- },
- XM: function(a) {
- if (a instanceof b.yc) this.he = a;
- else {
- var c = b.yc;
- a === c.pq && (this.he = this.ry);
- a === c.SHOW_ALL && (this.he = this.vy);
- a === c.zq && (this.he = this.uy);
- a === c.Mm && (this.he = this.sy);
- a === c.qq && (this.he = this.ty)
- }
- },
- Lp: function(a, c, d) {
- if (isNaN(a) || 0 == a || isNaN(c) || 0 == c) b.log(b.c.pC);
- else {
- this.XM(d);
- var e = this.he;
- if (e) {
- e.Wh(this);
- var f = this.oc.width,
- g = this.oc.height;
- b.Aa.Kf && this.MH(this.oc.width, this.oc.height);
- this.fs();
- if (d != this.he || a != this.tg.width || c != this.tg.height || f != this.oc.width || g != this.oc.height) this.Ai = D(a, c),
- this.tg = D(a, c),
- a = e.apply(this, this.Ai),
- a.scale && 2 == a.scale.length && (this.O = a.scale[0], this.ma = a.scale[1]),
- a.viewport && (a = this.sc = a.viewport, c = this.Ve, c.width = b.ra.width / this.O, c.height = b.ra.height / this.ma, c.x = -a.x / this.O, c.y = -a.y / this.ma),
- a = b.Qa,
- b.aa.width = a.ab.width = this.Ve.width,
- b.aa.height = a.ab.height = this.Ve.height,
- e.Vh(this),
- b.da == b.wb && (a.yi(), a.ZA()),
- this.Ux = this.O,
- this.Vx = this.ma,
- b.gC && b.gC.oR(),
- b.di && b.di.ga(this.Ve)
- } else b.log(b.c.qC)
- }
- },
- su: function() {
- return D(this.Ai.width, this.Ai.height)
- },
- lN: function(a, c, d, e) {
- var f = this.Sr,
- g = this.O,
- h = this.ma;
- b.l.viewport(a * g * f + this.sc.x * f, c * h * f + this.sc.y * f, d * g * f, e * h * f)
- },
- OY: function(a, c, d, e) {
- var f = this.Sr,
- g = this.O,
- h = this.ma;
- b.l.scissor(a * g * f + this.sc.x * f, c * h * f + this.sc.y * f, d * g * f, e * h * f)
- },
- GV: function() {
- var a = b.l;
- return a.isEnabled(a.SCISSOR_TEST)
- },
- OU: function() {
- var a = b.l,
- c = this.O,
- d = this.ma,
- a = a.getParameter(a.SCISSOR_BOX);
- return E((a[0] - this.sc.x) / c, (a[1] - this.sc.y) / d, a[2] / c, a[3] / d)
- },
- $Y: function(a) {
- null != a && 0 < a.length && (this.Mt = a)
- },
- eV: function() {
- return this.Mt
- },
- fV: function() {
- return this.sc
- },
- Lz: function() {
- return this.O
- },
- Mz: function() {
- return this.ma
- },
- ZT: function() {
- return this.dh
- },
- cu: function(a, c, d) {
- return {
- x: this.dh * (a - d.left),
- y: this.dh * (d.top + d.height - c)
- }
- },
- xF: function(a, c) {
- var d = this.sc;
- a.x = (this.dh * (a.x - c.left) - d.x) / this.O;
- a.y = (this.dh * (c.top + c.height - a.y) - d.y) / this.ma
- },
- Cn: function(a) {
- for (var c = this.sc,
- d = this.O,
- e = this.ma,
- f, g, h, k = 0; k < a.length; k++) f = a[k],
- g = f.Qb,
- h = f.Qe,
- f.et((g.x - c.x) / d, (g.y - c.y) / e),
- f.bj((h.x - c.x) / d, (h.y - c.y) / e)
- }
- });
- b.mq.Zr = function() {
- this.ao || (this.ao = this.ao || new b.mq, this.ao.WK());
- return this.ao
- };
- b.Rf = b.oa.extend({
- Wh: function() {},
- apply: function() {},
- Vh: function() {},
- it: function(a, c, d) {
- var e = a.og;
- b.view.ur && b.Aa.Kf && e == document.documentElement && b.screen.EI(e);
- var e = b.ra,
- f = b.Jh;
- f.style.width = e.style.width = c + "px";
- f.style.height = e.style.height = d + "px";
- f = a.dh = 1;
- a.Ts && (f = a.dh = window.devicePixelRatio || 1);
- e.width = c * f;
- e.height = d * f;
- a = document.body;
- var g;
- a && (g = a.style) && (g.paddingTop = g.paddingTop || "0px", g.paddingRight = g.paddingRight || "0px", g.paddingBottom = g.paddingBottom || "0px", g.paddingLeft = g.paddingLeft || "0px", g.borderTop = g.borderTop || "0px", g.borderRight = g.borderRight || "0px", g.borderBottom = g.borderBottom || "0px", g.borderLeft = g.borderLeft || "0px", g.marginTop = g.marginTop || "0px", g.marginRight = g.marginRight || "0px", g.marginBottom = g.marginBottom || "0px", g.marginLeft = g.marginLeft || "0px")
- },
- px: function() {
- document.body.insertBefore(b.Jh, document.body.firstChild);
- var a = document.body.style;
- a.width = window.innerWidth + "px";
- a.height = window.innerHeight + "px";
- a.overflow = "hidden";
- a = b.Jh.style;
- a.position = "fixed";
- a.left = a.top = "0px";
- document.body.scrollTop = 0
- }
- });
- b.Cd = b.oa.extend({
- Ss: {
- scale: [1, 1],
- viewport: null
- },
- Nk: function(a, c, d, e, f, g) {
- 2 > Math.abs(a - d) && (d = a);
- 2 > Math.abs(c - e) && (e = c);
- a = E(Math.round((a - d) / 2), Math.round((c - e) / 2), d, e);
- b.da == b.Ya && b.l.translate(a.x, a.y + e);
- this.Ss.scale = [f, g];
- this.Ss.viewport = a;
- return this.Ss
- },
- Wh: function() {},
- apply: function() {
- return {
- scale: [1, 1]
- }
- },
- Vh: function() {}
- }); (function() {
- var a = b.Rf.extend({
- apply: function(a) {
- this.it(a, a.oc.width, a.oc.height)
- }
- }),
- c = b.Rf.extend({
- apply: function(a, c) {
- var d = a.oc.width,
- e = a.oc.height,
- f = b.Jh.style,
- r = c.width,
- s = c.height,
- u = d / r,
- t = e / s,
- v, w;
- u < t ? (v = d, w = s * u) : (v = r * t, w = e);
- r = Math.round((d - v) / 2);
- w = Math.round((e - w) / 2);
- this.it(a, d - 2 * r, e - 2 * w);
- f.marginLeft = r + "px";
- f.marginRight = r + "px";
- f.marginTop = w + "px";
- f.marginBottom = w + "px"
- }
- });
- a.extend({
- Wh: function(a) {
- this._super(a);
- a.og = document.documentElement
- },
- apply: function(a) {
- this._super(a);
- this.px()
- }
- });
- c.extend({
- Wh: function(a) {
- this._super(a);
- a.og = document.documentElement
- },
- apply: function(a, c) {
- this._super(a, c);
- this.px()
- }
- });
- var d = b.Rf.extend({
- apply: function(a) {
- this.it(a, b.ra.width, b.ra.height)
- }
- });
- b.Rf.sm = new a;
- b.Rf.tD = new c;
- b.Rf.RP = new d;
- var a = b.Cd.extend({
- apply: function(a, c) {
- var d = b.ra.width,
- e = b.ra.height;
- return this.Nk(d, e, d, e, d / c.width, e / c.height)
- }
- }),
- c = b.Cd.extend({
- apply: function(a, c) {
- var d = b.ra.width,
- e = b.ra.height,
- f = c.width,
- r = c.height,
- s = d / f,
- u = e / r,
- t = 0,
- v, w;
- s < u ? (t = s, v = d, w = r * t) : (t = u, v = f * t, w = e);
- return this.Nk(d, e, v, w, t, t)
- }
- }),
- d = b.Cd.extend({
- apply: function(a, c) {
- var d = b.ra.width,
- e = b.ra.height,
- f = c.width,
- r = c.height,
- s = d / f,
- u = e / r,
- t, v, w;
- s < u ? (t = u, v = f * t, w = e) : (t = s, v = d, w = r * t);
- return this.Nk(d, e, v, w, t, t)
- }
- }),
- e = b.Cd.extend({
- apply: function(a, c) {
- var d = b.ra.width,
- e = b.ra.height,
- f = e / c.height;
- return this.Nk(d, e, d, e, f, f)
- },
- Vh: function(a) {
- b.Qa.ab = a.Pl()
- }
- }),
- f = b.Cd.extend({
- apply: function(a, c) {
- var d = b.ra.width,
- e = b.ra.height,
- f = d / c.width;
- return this.Nk(d, e, d, e, f, f)
- },
- Vh: function(a) {
- b.Qa.ab = a.Pl()
- }
- });
- b.Cd.pq = new a;
- b.Cd.SHOW_ALL = new c;
- b.Cd.zq = new d;
- b.Cd.Mm = new e;
- b.Cd.qq = new f
- })();
- b.yc = b.oa.extend({
- An: null,
- Bn: null,
- ctor: function(a, c) {
- this.BM(a);
- this.CM(c)
- },
- Wh: function(a) {
- this.An.Wh(a);
- this.Bn.Wh(a)
- },
- apply: function(a, c) {
- this.An.apply(a, c);
- return this.Bn.apply(a, c)
- },
- Vh: function(a) {
- this.An.Vh(a);
- this.Bn.Vh(a)
- },
- BM: function(a) {
- a instanceof b.Rf && (this.An = a)
- },
- CM: function(a) {
- a instanceof b.Cd && (this.Bn = a)
- }
- });
- b.yc.pq = 0;
- b.yc.zq = 1;
- b.yc.SHOW_ALL = 2;
- b.yc.Mm = 3;
- b.yc.qq = 4;
- b.yc.SE = 5;
- b.screen = {
- Lo: !1,
- Gs: null,
- Et: "",
- ng: null,
- LF: [["requestFullscreen", "exitFullscreen", "fullscreenchange", "fullscreenEnabled", "fullscreenElement"], ["requestFullScreen", "exitFullScreen", "fullScreenchange", "fullScreenEnabled", "fullScreenElement"], ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitIsFullScreen", "webkitCurrentFullScreenElement"], ["mozRequestFullScreen", "mozCancelFullScreen", "mozfullscreenchange", "mozFullScreen", "mozFullScreenElement"], ["msRequestFullscreen", "msExitFullscreen", "MSFullscreenChange", "msFullscreenEnabled", "msFullscreenElement"]],
- ga: function() {
- this.ng = {};
- var a, c, d = this.LF,
- e;
- a = 0;
- for (l = d.length; a < l; a++) if ((c = d[a]) && c[1] in document) {
- a = 0;
- for (e = c.length; a < e; a++) this.ng[d[0][a]] = c[a];
- break
- }
- this.Lo = void 0 != this.ng.requestFullscreen;
- this.Et = "ontouchstart" in window ? "touchstart": "mousedown"
- },
- fullScreen: function() {
- return this.Lo && document[this.ng.fullscreenEnabled]
- },
- HA: function(a, c) {
- if (this.Lo) {
- a = a || document.documentElement;
- a[this.ng.requestFullscreen]();
- if (c) {
- var d = this.ng.CT;
- this.Gs && document.removeEventListener(d, this.Gs);
- this.Gs = c;
- b.ka(document, d, c, !1)
- }
- return a[this.ng.requestFullscreen]()
- }
- },
- kT: function() {
- return this.Lo ? document[this.ng.exitFullscreen]() : !0
- },
- EI: function(a, c) {
- function d() {
- f.HA(a, c);
- e.removeEventListener(f.Et, d)
- }
- a = a || document.body;
- var e = b.ra || a,
- f = this;
- this.HA(a, c);
- b.ka(e, this.Et, d)
- }
- };
- b.screen.ga();
- b.di = {
- tB: C(0, 0),
- uB: C(0, 0),
- top: C(0, 0),
- Wt: C(0, 0),
- iz: C(0, 0),
- bottom: C(0, 0),
- Zo: C(0, 0),
- left: C(0, 0),
- right: C(0, 0),
- width: 0,
- height: 0,
- ga: function(a) {
- var c = this.width = a.width,
- d = this.height = a.height,
- e = a.x;
- a = a.y;
- var f = a + d,
- g = e + c;
- this.tB.x = e;
- this.tB.y = f;
- this.uB.x = g;
- this.uB.y = f;
- this.top.x = e + c / 2;
- this.top.y = f;
- this.Wt.x = e;
- this.Wt.y = a;
- this.iz.x = g;
- this.iz.y = a;
- this.bottom.x = e + c / 2;
- this.bottom.y = a;
- this.Zo.x = e + c / 2;
- this.Zo.y = a + d / 2;
- this.left.x = e;
- this.left.y = a + d / 2;
- this.right.x = g;
- this.right.y = a + d / 2
- }
- };
- b.OE = -90;
- b.PE = 90;
- b.QE = 180;
- b.jQ = 0;
- b.dA = {
- Wi: !1,
- Ix: !1,
- ay: C(0, 0),
- iH: C(0, 0),
- by: [],
- Hs: 0,
- Ag: [],
- Ft: {},
- Oi: 0,
- ts: 5,
- mn: !1,
- nn: 1 / 30,
- lw: 1,
- Zg: 0,
- qr: null,
- ln: null,
- tG: function() {
- for (var a = this.Oi,
- c = 0; c < this.ts; c++) {
- if (! (a & 1)) return this.Oi |= 1 << c,
- c;
- a >>= 1
- }
- return - 1
- },
- pH: function(a) {
- 0 > a || a >= this.ts || (a = ~ (1 << a), this.Oi &= a)
- },
- pg: null,
- Bu: function(a) {
- for (var c, d, e, f = [], g = this.Ft, h = 0, k = a.length; h < k; h++) c = a[h],
- e = c.ce,
- d = g[e],
- null == d && (d = this.tG(), -1 == d ? b.log(b.c.XK, d) : (c = this.Ag[d] = c, g[e] = d, f.push(c)));
- 0 < f.length && (this.pg.Cn(f), a = new b.Dd(f), a.jg = b.Dd.ii.Xp, b.I.dispatchEvent(a))
- },
- Cu: function(a) {
- for (var c, d, e = [], f = this.Ag, g = 0, h = a.length; g < h; g++) c = a[g],
- d = c.ce,
- d = this.Ft[d],
- null != d && f[d] && (f[d].et(c.Qb), f[d].bj(c.Qe), e.push(f[d]));
- 0 < e.length && (this.pg.Cn(e), a = new b.Dd(e), a.jg = b.Dd.ii.yq, b.I.dispatchEvent(a))
- },
- sp: function(a) {
- a = this.Nz(a);
- 0 < a.length && (this.pg.Cn(a), a = new b.Dd(a), a.jg = b.Dd.ii.nq, b.I.dispatchEvent(a))
- },
- Tz: function(a) {
- a = this.Nz(a);
- 0 < a.length && (this.pg.Cn(a), a = new b.Dd(a), a.jg = b.Dd.ii.dq, b.I.dispatchEvent(a))
- },
- Nz: function(a) {
- for (var c, d, e, f = [], g = this.Ag, h = this.Ft, k = 0, m = a.length; k < m; k++) c = a[k],
- e = c.ce,
- d = h[e],
- null != d && g[d] && (g[d].et(c.Qb), g[d].bj(c.Qe), f.push(g[d]), this.pH(d), delete h[e]);
- return f
- },
- oe: function(a) {
- var c = document.documentElement,
- d = window,
- e = null,
- e = "function" === typeof a.getBoundingClientRect ? a.getBoundingClientRect() : a instanceof HTMLCanvasElement ? {
- left: 0,
- top: 0,
- width: a.width,
- height: a.height
- }: {
- left: 0,
- top: 0,
- width: parseInt(a.style.width),
- height: parseInt(a.style.height)
- };
- return {
- left: e.left + d.pageXOffset - c.clientLeft,
- top: e.top + d.pageYOffset - c.clientTop,
- width: e.width,
- height: e.height
- }
- },
- uK: function(a) {
- for (var c = null,
- d = this.by,
- e = a.ce,
- f = d.length - 1; 0 <= f; f--) if (d[f].ce == e) {
- c = d[f];
- break
- }
- c || (c = a);
- return c
- },
- WM: function(a) {
- for (var c = !1,
- d = this.by,
- e = a.ce,
- f = d.length - 1; 0 <= f; f--) if (d[f].ce == e) {
- d[f] = a;
- c = !0;
- break
- }
- c || (50 >= d.length ? d.push(a) : (d[this.Hs] = a, this.Hs = (this.Hs + 1) % 50))
- },
- Ol: function(a, c, d) {
- var e = this.ay;
- a = this.pg.cu(a, c, d);
- c = new b.ar(a.x, a.y);
- c.bj(e.x, e.y);
- e.x = a.x;
- e.y = a.y;
- return c
- },
- vj: function(a, c, d) {
- var e = this.iH;
- this.pg.xF(a, c);
- c = new b.tb(d);
- c.MM(a.x, a.y);
- c.CH(e.x, e.y);
- e.x = a.x;
- e.y = a.y;
- return c
- },
- yj: function(a, c) {
- if (null != a.pageX) return {
- x: a.pageX,
- y: a.pageY
- };
- c.left -= document.body.scrollLeft;
- c.top -= document.body.scrollTop;
- return {
- x: a.clientX,
- y: a.clientY
- }
- },
- qp: function(a, c) {
- for (var d = [], e = this.pg, f, g, h = this.ay, k = a.changedTouches.length, m = 0; m < k; m++) if (f = a.changedTouches[m]) {
- var n;
- n = b.Aa.$j === b.Aa.Ih ? e.cu(f.pageX, f.pageY, c) : e.cu(f.clientX, f.clientY, c);
- null != f.identifier ? (f = new b.ar(n.x, n.y, f.identifier), g = this.uK(f).Oh(), f.bj(g.x, g.y), this.WM(f)) : (f = new b.ar(n.x, n.y), f.bj(h.x, h.y));
- h.x = n.x;
- h.y = n.y;
- d.push(f)
- }
- return d
- },
- XL: function(a) {
- if (!this.Ix) {
- var c = this.pg = b.view,
- d = this,
- e = "touches" in b.Aa.Zt;
- "mouse" in b.Aa.Zt && (b.ka(window, "mousedown",
- function() {
- d.Wi = !0
- },
- !1), b.ka(window, "mouseup",
- function(c) {
- var f = d.Wi;
- d.Wi = !1;
- if (f) {
- var f = d.oe(a),
- g = d.yj(c, f);
- b.zA(new b.Uv(f.left, f.top, f.width, f.height), g) || (e || d.sp([d.Ol(g.x, g.y, f)]), f = d.vj(g, f, b.tb.br), f.ai(c.button), b.I.dispatchEvent(f))
- }
- },
- !1), b.ka(a, "mousedown",
- function(c) {
- d.Wi = !0;
- var f = d.oe(a),
- g = d.yj(c, f);
- e || d.Bu([d.Ol(g.x, g.y, f)]);
- f = d.vj(g, f, b.tb.Av);
- f.ai(c.button);
- b.I.dispatchEvent(f);
- c.stopPropagation();
- c.preventDefault();
- a.focus()
- },
- !1), b.ka(a, "mouseup",
- function(c) {
- d.Wi = !1;
- var f = d.oe(a),
- g = d.yj(c, f);
- e || d.sp([d.Ol(g.x, g.y, f)]);
- f = d.vj(g, f, b.tb.br);
- f.ai(c.button);
- b.I.dispatchEvent(f);
- c.stopPropagation();
- c.preventDefault()
- },
- !1), b.ka(a, "mousemove",
- function(c) {
- var f = d.oe(a),
- g = d.yj(c, f);
- e || d.Cu([d.Ol(g.x, g.y, f)]);
- f = d.vj(g, f, b.tb.Lv);
- d.Wi ? f.ai(c.button) : f.ai(null);
- b.I.dispatchEvent(f);
- c.stopPropagation();
- c.preventDefault()
- },
- !1), b.ka(a, "mousewheel",
- function(c) {
- var e = d.oe(a),
- f = d.yj(c, e),
- e = d.vj(f, e, b.tb.Vq);
- e.ai(c.button);
- e.fB(0, c.wheelDelta);
- b.I.dispatchEvent(e);
- c.stopPropagation();
- c.preventDefault()
- },
- !1), b.ka(a, "DOMMouseScroll",
- function(c) {
- var e = d.oe(a),
- f = d.yj(c, e),
- e = d.vj(f, e, b.tb.Vq);
- e.ai(c.button);
- e.fB(0, -120 * c.detail);
- b.I.dispatchEvent(e);
- c.stopPropagation();
- c.preventDefault()
- },
- !1));
- if (window.navigator.msPointerEnabled) {
- var f = {
- MSPointerDown: d.Bu,
- MSPointerMove: d.Cu,
- MSPointerUp: d.sp,
- MSPointerCancel: d.Tz
- },
- g;
- for (g in f)(function(c, e) {
- b.ka(a, c,
- function(c) {
- var f = d.oe(a);
- f.left -= document.documentElement.scrollLeft;
- f.top -= document.documentElement.scrollTop;
- e.call(d, [d.Ol(c.clientX, c.clientY, f)]);
- c.stopPropagation()
- },
- !1)
- })(g, f[g])
- }
- e && (b.ka(a, "touchstart",
- function(c) {
- if (c.changedTouches) {
- var e = d.oe(a);
- e.left -= document.body.scrollLeft;
- e.top -= document.body.scrollTop;
- d.Bu(d.qp(c, e));
- c.stopPropagation();
- c.preventDefault();
- a.focus()
- }
- },
- !1), b.ka(a, "touchmove",
- function(c) {
- if (c.changedTouches) {
- var e = d.oe(a);
- e.left -= document.body.scrollLeft;
- e.top -= document.body.scrollTop;
- d.Cu(d.qp(c, e));
- c.stopPropagation();
- c.preventDefault()
- }
- },
- !1), b.ka(a, "touchend",
- function(c) {
- if (c.changedTouches) {
- var e = d.oe(a);
- e.left -= document.body.scrollLeft;
- e.top -= document.body.scrollTop;
- d.sp(d.qp(c, e));
- c.stopPropagation();
- c.preventDefault()
- }
- },
- !1), b.ka(a, "touchcancel",
- function(e) {
- if (e.changedTouches) {
- var f = d.oe(a);
- f.left -= document.body.scrollLeft;
- f.top -= document.body.scrollTop;
- c.Tz(d.qp(e, f));
- e.stopPropagation();
- e.preventDefault()
- }
- },
- !1));
- this.ky();
- this.jy();
- this.Ix = !0
- }
- },
- ky: function() {},
- jy: function() {},
- update: function(a) {
- this.Zg > this.nn && (this.Zg -= this.nn, b.I.dispatchEvent(new b.vC(this.qr)));
- this.Zg += a
- }
- };
- var p = b.dA;
- p.SX = function(a) {
- this.mn !== a && (this.mn = a, a = b.Qa.Ig(), this.mn ? (this.Zg = 0, a.bv(this)) : (this.Zg = 0, a.nm(this)))
- };
- p.TX = function(a) {
- this.nn !== a && (this.nn = a)
- };
- p.ky = function() {
- b.ka(b.ra, "keydown",
- function(a) {
- b.I.dispatchEvent(new b.Ev(a.keyCode, !0));
- a.stopPropagation();
- a.preventDefault()
- },
- !1);
- b.ka(b.ra, "keyup",
- function(a) {
- b.I.dispatchEvent(new b.Ev(a.keyCode, !1));
- a.stopPropagation();
- a.preventDefault()
- },
- !1)
- };
- p.jy = function() {
- var a = window;
- this.qr = new b.FB;
- this.ln = a.DeviceMotionEvent || a.DeviceOrientationEvent;
- b.Aa.Ih == b.Aa.vv && (this.ln = window.DeviceOrientationEvent);
- b.ka(a, this.ln == a.DeviceMotionEvent ? "devicemotion": "deviceorientation", this.bJ.bind(this), !1)
- };
- p.bJ = function(a) {
- var c = window;
- if (this.mn) {
- var d = this.qr;
- if (this.ln == window.DeviceMotionEvent) {
- var e = a.accelerationIncludingGravity;
- d.x = this.lw * e.x * 0.1;
- d.y = this.lw * e.y * 0.1;
- d.z = 0.1 * e.z
- } else d.x = a.gamma / 90 * 0.981,
- d.y = 0.981 * -(a.beta / 90),
- d.z = a.alpha / 90 * 0.981;
- d.timestamp = a.timeStamp || Date.now();
- a = d.x;
- c.orientation === b.PE ? (d.x = -d.y, d.y = a) : c.orientation === b.OE ? (d.x = d.y, d.y = -a) : c.orientation === b.QE && (d.x = -d.x, d.y = -d.y)
- }
- };
- delete p;
- b.sO = function(a, c, d, e, f, g) {
- this.a = a;
- this.b = c;
- this.J = d;
- this.P = e;
- this.Z = f;
- this.$ = g
- };
- b.MR = function(a, c, d, e, f, g) {
- return {
- a: a,
- b: c,
- J: d,
- P: e,
- Z: f,
- $: g
- }
- };
- b.vA = function(a, c) {
- return {
- x: c.a * a.x + c.J * a.y + c.Z,
- y: c.b * a.x + c.P * a.y + c.$
- }
- };
- b.vg = function(a, c, d) {
- return {
- x: d.a * a + d.J * c + d.Z,
- y: d.b * a + d.P * c + d.$
- }
- };
- b.bZ = function(a, c) {
- return {
- width: c.a * a.width + c.J * a.height,
- height: c.b * a.width + c.P * a.height
- }
- };
- b.NR = function() {
- return {
- a: 1,
- b: 0,
- J: 0,
- P: 1,
- Z: 0,
- $: 0
- }
- };
- b.LR = function() {
- return {
- a: 1,
- b: 0,
- J: 0,
- P: 1,
- Z: 0,
- $: 0
- }
- };
- b.Xu = function(a, c) {
- var d = b.Nj(a),
- e = b.Mj(a),
- f = b.em(a),
- g = b.fm(a),
- h = b.vg(e, d, c),
- d = b.vg(f, d, c),
- e = b.vg(e, g, c),
- k = b.vg(f, g, c),
- f = Math.min(h.x, d.x, e.x, k.x),
- g = Math.max(h.x, d.x, e.x, k.x),
- m = Math.min(h.y, d.y, e.y, k.y),
- h = Math.max(h.y, d.y, e.y, k.y);
- return E(f, m, g - f, h - m)
- };
- b.jH = function(a, c) {
- var d = b.Nj(a),
- e = b.Mj(a),
- f = b.em(a),
- g = b.fm(a),
- h = b.vg(e, d, c),
- d = b.vg(f, d, c),
- e = b.vg(e, g, c),
- k = b.vg(f, g, c),
- f = Math.min(h.x, d.x, e.x, k.x),
- g = Math.max(h.x, d.x, e.x, k.x),
- m = Math.min(h.y, d.y, e.y, k.y),
- h = Math.max(h.y, d.y, e.y, k.y);
- a.x = f;
- a.y = m;
- a.width = g - f;
- a.height = h - m;
- return a
- };
- b.mI = function(a, c, d) {
- return {
- a: a.a,
- b: a.b,
- J: a.J,
- P: a.P,
- Z: a.Z + a.a * c + a.J * d,
- $: a.$ + a.b * c + a.P * d
- }
- };
- b.PR = function(a, c, d) {
- return {
- a: a.a * c,
- b: a.b * c,
- J: a.J * d,
- P: a.P * d,
- Z: a.Z,
- $: a.$
- }
- };
- b.OR = function(a, c) {
- var d = Math.sin(c),
- e = Math.cos(c);
- return {
- a: a.a * e + a.J * d,
- b: a.b * e + a.P * d,
- J: a.J * e - a.a * d,
- P: a.P * e - a.b * d,
- Z: a.Z,
- $: a.$
- }
- };
- b.Eh = function(a, c) {
- return {
- a: a.a * c.a + a.b * c.J,
- b: a.a * c.b + a.b * c.P,
- J: a.J * c.a + a.P * c.J,
- P: a.J * c.b + a.P * c.P,
- Z: a.Z * c.a + a.$ * c.J + c.Z,
- $: a.Z * c.b + a.$ * c.P + c.$
- }
- };
- b.KR = function(a, c) {
- return a.a === c.a && a.b === c.b && a.J === c.J && a.P === c.P && a.Z === c.Z && a.$ === c.$
- };
- b.az = function(a) {
- var c = 1 / (a.a * a.P - a.b * a.J);
- return {
- a: c * a.P,
- b: -c * a.b,
- J: -c * a.J,
- P: c * a.a,
- Z: c * (a.J * a.$ - a.P * a.Z),
- $: c * (a.b * a.Z - a.a * a.$)
- }
- };
- b.Sv = parseFloat("1.192092896e-07F");
- b.Uu = function(a) {
- return C( - a.x, -a.y)
- };
- b.Jj = function(a, c) {
- return C(a.x + c.x, a.y + c.y)
- };
- b.uc = function(a, c) {
- return C(a.x - c.x, a.y - c.y)
- };
- b.Kg = function(a, c) {
- return C(a.x * c, a.y * c)
- };
- b.tA = function(a, c) {
- return b.Kg(b.Jj(a, c), 0.5)
- };
- b.Kj = function(a, c) {
- return a.x * c.x + a.y * c.y
- };
- b.EL = function(a, c) {
- return a.x * c.y - a.y * c.x
- };
- b.Gp = function(a) {
- return C( - a.y, a.x)
- };
- b.JW = function(a) {
- return C(a.y, -a.x)
- };
- b.IW = function(a, c) {
- return b.Kg(c, b.Kj(a, c) / b.Kj(c, c))
- };
- b.KW = function(a, c) {
- return C(a.x * c.x - a.y * c.y, a.x * c.y + a.y * c.x)
- };
- b.QW = function(a, c) {
- return C(a.x * c.x + a.y * c.y, a.y * c.x - a.x * c.y)
- };
- b.rA = function(a) {
- return b.Kj(a, a)
- };
- b.zW = function(a, c) {
- return b.rA(b.uc(a, c))
- };
- b.Tu = function(a) {
- return Math.sqrt(b.rA(a))
- };
- b.yW = function(a, c) {
- return b.Tu(b.uc(a, c))
- };
- b.Td = function(a) {
- return b.Kg(a, 1 / b.Tu(a))
- };
- b.AW = function(a) {
- return C(Math.cos(a), Math.sin(a))
- };
- b.PW = function(a) {
- return Math.atan2(a.y, a.x)
- };
- b.cp = function(a, c, d) {
- if (c > d) {
- var e = c;
- c = d;
- d = e
- }
- return a < c ? c: a < d ? a: d
- };
- b.vW = function(a, c, d) {
- return C(b.cp(a.x, c.x, d.x), b.cp(a.y, c.y, d.y))
- };
- b.BW = function(a) {
- return C(a.width, a.height)
- };
- b.xW = function(a, c) {
- return C(c(a.x), c(a.y))
- };
- b.GW = function(a, c, d) {
- return b.Jj(b.Kg(a, 1 - d), b.Kg(c, d))
- };
- b.DW = function(a, c, d) {
- return a.x - d <= c.x && c.x <= a.x + d && a.y - d <= c.y && c.y <= a.y + d ? !0 : !1
- };
- b.wW = function(a, c) {
- return C(a.x * c.x, a.y * c.y)
- };
- b.uW = function(a, c) {
- var d = b.Td(a),
- e = b.Td(c),
- d = Math.atan2(d.x * e.y - d.y * e.x, b.Kj(d, e));
- return Math.abs(d) < b.Sv ? 0 : d
- };
- b.tW = function(a, c) {
- var d = Math.acos(b.Kj(b.Td(a), b.Td(c)));
- return Math.abs(d) < b.Sv ? 0 : d
- };
- b.LW = function(a, c, d) {
- a = b.uc(a, c);
- var e = Math.cos(d);
- d = Math.sin(d);
- var f = a.x;
- a.x = f * e - a.y * d + c.x;
- a.y = f * d + a.y * e + c.y;
- return a
- };
- b.sA = function(a, c, d, e, f) {
- if (a.x == c.x && a.y == c.y || d.x == e.x && d.y == e.y) return ! 1;
- var g = c.x - a.x;
- c = c.y - a.y;
- var h = e.x - d.x;
- e = e.y - d.y;
- var k = a.x - d.x;
- a = a.y - d.y;
- d = e * g - h * c;
- f.x = h * a - e * k;
- f.y = g * a - c * k;
- if (0 == d) return 0 == f.x || 0 == f.y ? !0 : !1;
- f.x /= d;
- f.y /= d;
- return ! 0
- };
- b.NW = function(a, c, d, e) {
- var f = C(0, 0);
- return b.sA(a, c, d, e, f) && 0 <= f.x && 1 >= f.x && 0 <= f.y && 1 >= f.y ? !0 : !1
- };
- b.FW = function(a, c, d, e) {
- var f = C(0, 0);
- return b.sA(a, c, d, e, f) ? (d = C(0, 0), d.x = a.x + f.x * (c.x - a.x), d.y = a.y + f.x * (c.y - a.y), d) : C(0, 0)
- };
- b.MW = function(a, c) {
- return null != a && null != c ? a.x == c.x && a.y == c.y: !1
- };
- b.RW = function(a) {
- a.x = 0;
- a.y = 0
- };
- b.EW = function(a, c) {
- a.x = c.x;
- a.y = c.y
- };
- b.FL = function(a, c) {
- a.x *= c;
- a.y *= c
- };
- b.OW = function(a, c) {
- a.x -= c.x;
- a.y -= c.y
- };
- b.sW = function(a, c) {
- a.x += c.x;
- a.y += c.y
- };
- b.HW = function(a) {
- b.FL(a, 1 / Math.sqrt(a.x * a.x + a.y * a.y))
- };
- b.DZ = function(a, c, d, e, f) {
- f += e;
- if (! (1 >= f)) {
- c *= 0.5;
- for (var g, h = f - 1,
- k = e; k < f; k++) {
- g = 2 * k;
- var m = C(a[2 * k], a[2 * k + 1]),
- n;
- if (0 === k) n = b.Gp(b.Td(b.uc(m, C(a[2 * (k + 1)], a[2 * (k + 1) + 1]))));
- else if (k === h) n = b.Gp(b.Td(b.uc(C(a[2 * (k - 1)], a[2 * (k - 1) + 1]), m)));
- else {
- n = C(a[2 * (k - 1)], a[2 * (k - 1) + 1]);
- var r = C(a[2 * (k + 1)], a[2 * (k + 1) + 1]),
- s = b.Td(b.uc(r, m)),
- u = b.Td(b.uc(n, m)),
- t = Math.acos(b.Kj(s, u));
- n = t < b.Gg(70) ? b.Gp(b.Td(b.tA(s, u))) : t < b.Gg(170) ? b.Td(b.tA(s, u)) : b.Gp(b.Td(b.uc(r, n)))
- }
- n = b.Kg(n, c);
- d[2 * g] = m.x + n.x;
- d[2 * g + 1] = m.y + n.y;
- d[2 * (g + 1)] = m.x - n.x;
- d[2 * (g + 1) + 1] = m.y - n.y
- }
- for (k = 0 == e ? 0 : e - 1; k < h; k++) g = 2 * k,
- a = g + 2,
- c = new b.Sa(d[2 * g], d[2 * g + 1]),
- f = new b.Sa(d[2 * (g + 1)], d[2 * (g + 1) + 1]),
- g = new b.Sa(d[2 * a], d[2 * a]),
- e = new b.Sa(d[2 * (a + 1)], d[2 * (a + 1) + 1]),
- c = !b.UN(c.x, c.y, e.x, e.y, f.x, f.y, g.x, g.y),
- !c.Ul && (0 > c.value || 1 < c.value) && (c.Ul = !0),
- c.Ul && (d[2 * a] = e.x, d[2 * a + 1] = e.y, d[2 * (a + 1)] = g.x, d[2 * (a + 1) + 1] = g.y)
- }
- };
- b.UN = function(a, c, d, e, f, g, h, k) {
- if (a == d && c == e || f == h && g == k) return {
- Ul: !1,
- value: 0
- };
- d -= a;
- e -= c;
- f -= a;
- g -= c;
- h -= a;
- k -= c;
- a = Math.sqrt(d * d + e * e);
- d /= a;
- e /= a;
- c = f * d + g * e;
- g = g * d - f * e;
- f = c;
- c = h * d + k * e;
- k = k * d - h * e;
- h = c;
- return g == k ? {
- Ul: !1,
- value: 0
- }: {
- Ul: !0,
- value: (h + (f - h) * k / (k - g)) / a
- }
- };
- b.EZ = function(a) {
- for (var c = 0,
- d = a.length; c < d; c++) {
- var e = a[(c + 1) % d];
- if (0 < b.EL(b.uc(e, a[c]), b.uc(a[(c + 2) % d], e))) return ! 1
- }
- return ! 0
- };
- b.IO = function(a, c) {
- c[2] = c[3] = c[6] = c[7] = c[8] = c[9] = c[11] = c[14] = 0;
- c[10] = c[15] = 1;
- c[0] = a.a;
- c[4] = a.J;
- c[12] = a.Z;
- c[1] = a.b;
- c[5] = a.P;
- c[13] = a.$
- };
- b.fP = function(a, c) {
- c.a = a[0];
- c.J = a[4];
- c.Z = a[12];
- c.b = a[1];
- c.P = a[5];
- c.$ = a[13]
- };
- b.ar = b.oa.extend({
- Qb: null,
- Qe: null,
- ce: 0,
- Ny: !1,
- wl: null,
- ctor: function(a, c, d) {
- this.Qb = C(a || 0, c || 0);
- this.ce = d || 0
- },
- Oh: function() {
- return {
- x: this.Qb.x,
- y: this.Qb.y
- }
- },
- kK: function() {
- return this.Qb.x
- },
- lK: function() {
- return this.Qb.y
- },
- FU: function() {
- return {
- x: this.Qe.x,
- y: this.Qe.y
- }
- },
- SU: function() {
- return {
- x: this.wl.x,
- y: this.wl.y
- }
- },
- WJ: function() {
- return b.uc(this.Qb, this.Qe)
- },
- jK: function() {
- return {
- x: this.Qb.x,
- y: this.Qb.y
- }
- },
- GU: function() {
- return {
- x: this.Qe.x,
- y: this.Qe.y
- }
- },
- TU: function() {
- return {
- x: this.wl.x,
- y: this.wl.y
- }
- },
- mU: function() {
- return this.ce
- },
- nU: function() {
- return this.ce
- },
- VY: function(a, c, d) {
- this.Qe = this.Qb;
- this.Qb = C(c || 0, d || 0);
- this.ce = a;
- this.Ny || (this.wl = C(this.Qb), this.Ny = !0)
- },
- et: function(a, c) {
- void 0 === c ? (this.Qb.x = a.x, this.Qb.y = a.y) : (this.Qb.x = a, this.Qb.y = c)
- },
- bj: function(a, c) {
- this.Qe = void 0 === c ? C(a.x, a.y) : C(a || 0, c || 0)
- }
- });
- b.eb = b.oa.extend({
- Bg: 0,
- ih: !1,
- Cc: null,
- Zs: function(a) {
- this.Cc = a
- },
- ctor: function(a) {
- this.Bg = a
- },
- FK: function() {
- return this.Bg
- },
- stopPropagation: function() {
- this.ih = !0
- },
- IV: function() {
- return this.ih
- },
- ST: function() {
- return this.Cc
- }
- });
- b.eb.dn = 0;
- b.eb.ji = 1;
- b.eb.ei = 2;
- b.eb.ki = 3;
- b.eb.ak = 4;
- b.kf = b.eb.extend({
- Qr: null,
- Yy: null,
- ctor: function(a) {
- b.eb.prototype.ctor.call(this, b.eb.ak);
- this.Qr = a
- },
- setUserData: function(a) {
- this.Yy = a
- },
- getUserData: function() {
- return this.Yy
- },
- dU: function() {
- return this.Qr
- }
- });
- b.tb = b.eb.extend({
- lx: 0,
- sw: 0,
- me: 0,
- Hc: 0,
- Js: 0,
- Ks: 0,
- xy: 0,
- yy: 0,
- ctor: function(a) {
- b.eb.prototype.ctor.call(this, b.eb.ki);
- this.lx = a
- },
- fB: function(a, c) {
- this.xy = a;
- this.yy = c
- },
- PU: function() {
- return this.xy
- },
- QU: function() {
- return this.yy
- },
- MM: function(a, c) {
- this.me = a;
- this.Hc = c
- },
- Oh: function() {
- return {
- x: this.me,
- y: this.Hc
- }
- },
- jK: function() {
- return {
- x: this.me,
- y: b.view.Ai.height - this.Hc
- }
- },
- CH: function(a, c) {
- this.Js = a;
- this.Ks = c
- },
- WJ: function() {
- return {
- x: this.me - this.Js,
- y: this.Hc - this.Ks
- }
- },
- XT: function() {
- return this.me - this.Js
- },
- YT: function() {
- return this.Hc - this.Ks
- },
- ai: function(a) {
- this.sw = a
- },
- KT: function() {
- return this.sw
- },
- kK: function() {
- return this.me
- },
- lK: function() {
- return this.Hc
- }
- });
- b.tb.NONE = 0;
- b.tb.Av = 1;
- b.tb.br = 2;
- b.tb.Lv = 3;
- b.tb.Vq = 4;
- b.tb.FO = 0;
- b.tb.HO = 2;
- b.tb.GO = 1;
- b.tb.AO = 3;
- b.tb.BO = 4;
- b.tb.CO = 5;
- b.tb.DO = 6;
- b.tb.EO = 7;
- b.Dd = b.eb.extend({
- jg: 0,
- Ag: null,
- ctor: function(a) {
- b.eb.prototype.ctor.call(this, b.eb.dn);
- this.Ag = a || []
- },
- cU: function() {
- return this.jg
- },
- $U: function() {
- return this.Ag
- },
- sR: function(a) {
- this.jg = a
- },
- uR: function(a) {
- this.Ag = a
- }
- });
- b.Dd.CP = 5;
- b.Dd.ii = {
- Xp: 0,
- yq: 1,
- nq: 2,
- dq: 3
- };
- b.G = b.oa.extend({
- ws: null,
- Bg: 0,
- Me: null,
- pd: !1,
- mg: 0,
- Sc: null,
- $a: !1,
- Ri: !0,
- ctor: function(a, c, d) {
- this.ws = d;
- this.Bg = a || 0;
- this.Me = c || ""
- },
- dt: function(a) {
- this.$a = a
- },
- gR: function() {
- return this.$a
- },
- sl: function(a) {
- this.pd = a
- },
- HG: function() {
- return this.pd
- },
- eR: function() {
- return this.Bg
- },
- bR: function() {
- return this.Me
- },
- $s: function(a) {
- this.mg = a
- },
- aR: function() {
- return this.mg
- },
- tl: function(a) {
- this.Sc = a
- },
- cR: function() {
- return this.Sc
- },
- Eg: function() {
- return null != this.ws
- },
- d: function() {
- return null
- },
- Mp: function(a) {
- this.Ri = a
- },
- isEnabled: function() {
- return this.Ri
- },
- Zu: function() {},
- Pf: function() {}
- });
- b.G.SE = 0;
- b.G.li = 1;
- b.G.en = 2;
- b.G.ji = 3;
- b.G.ki = 4;
- b.G.ei = 5;
- b.G.ak = 6;
- b.Fk = b.G.extend({
- ll: null,
- ctor: function(a, c) {
- this.ll = c;
- var d = this;
- b.G.prototype.ctor.call(this, b.G.ak, a,
- function(a) {
- null != d.ll && d.ll(a)
- })
- },
- Eg: function() {
- return b.G.prototype.Eg.call(this) && null != this.ll
- },
- d: function() {
- return new b.Fk(this.Me, this.ll)
- }
- });
- b.Fk.create = function(a, c) {
- return new b.Fk(a, c)
- };
- b.ag = b.G.extend({
- Cp: null,
- Fp: null,
- Dp: null,
- Ep: null,
- ctor: function() {
- var a = this;
- b.G.prototype.ctor.call(this, b.G.ki, b.ag.fb,
- function(c) {
- var d = b.tb;
- switch (c.lx) {
- case d.Av:
- a.Cp && a.Cp(c);
- break;
- case d.br:
- a.Fp && a.Fp(c);
- break;
- case d.Lv:
- a.Dp && a.Dp(c);
- break;
- case d.Vq:
- a.Ep && a.Ep(c)
- }
- })
- },
- d: function() {
- var a = new b.ag;
- a.Cp = this.Cp;
- a.Fp = this.Fp;
- a.Dp = this.Dp;
- a.Ep = this.Ep;
- return a
- },
- Eg: function() {
- return ! 0
- }
- });
- b.ag.fb = "__cc_mouse";
- b.ag.create = function() {
- return new b.ag
- };
- b.ye = b.G.extend({
- xi: null,
- Tj: !1,
- cf: null,
- Uh: null,
- Th: null,
- Sh: null,
- ctor: function() {
- b.G.prototype.ctor.call(this, b.G.li, b.ye.fb, null);
- this.xi = []
- },
- QY: function(a) {
- this.Tj = a
- },
- d: function() {
- var a = new b.ye;
- a.cf = this.cf;
- a.Uh = this.Uh;
- a.Th = this.Th;
- a.Sh = this.Sh;
- a.Tj = this.Tj;
- return a
- },
- Eg: function() {
- return this.cf ? !0 : (b.log(b.c.$E), !1)
- }
- });
- b.ye.fb = "__cc_touch_one_by_one";
- b.ye.create = function() {
- return new b.ye
- };
- b.xe = b.G.extend({
- am: null,
- cm: null,
- Ij: null,
- bm: null,
- ctor: function() {
- b.G.prototype.ctor.call(this, b.G.en, b.xe.fb, null)
- },
- d: function() {
- var a = new b.xe;
- a.am = this.am;
- a.cm = this.cm;
- a.Ij = this.Ij;
- a.bm = this.bm;
- return a
- },
- Eg: function() {
- return null == this.am && null == this.cm && null == this.Ij && null == this.bm ? (b.log(b.c.ZE), !1) : !0
- }
- });
- b.xe.fb = "__cc_touch_all_at_once";
- b.xe.create = function() {
- return new b.xe
- };
- b.G.create = function(a) {
- b.assert(a && a.event, b.c.wC);
- var c = a.event;
- delete a.event;
- var d = null;
- c === b.G.li ? d = new b.ye: c === b.G.en ? d = new b.xe: c === b.G.ki ? d = new b.ag: c === b.G.ak ? (d = new b.Fk(a.FJ, a.Yt), delete a.FJ, delete a.Yt) : c === b.G.ji ? d = new b.$f: c === b.G.ei && (d = new b.Zf(a.Yt), delete a.Yt);
- for (var e in a) d[e] = a[e];
- return d
- };
- b.qz = function(a) {
- var c, d = a.length,
- e = Array(d);
- for (c = 0; c < d; c += 1) e[c] = a[c];
- return e
- };
- b.aF = b.oa.extend({
- ld: null,
- qd: null,
- Sz: 0,
- ctor: function() {
- this.ld = [];
- this.qd = []
- },
- size: function() {
- return this.ld.length + this.qd.length
- },
- empty: function() {
- return 0 === this.ld.length && 0 === this.qd.length
- },
- push: function(a) {
- 0 == a.mg ? this.qd.push(a) : this.ld.push(a)
- },
- SI: function() {
- this.qd.length = 0
- },
- RI: function() {
- this.ld.length = 0
- },
- clear: function() {
- this.qd.length = 0;
- this.ld.length = 0
- },
- fU: function() {
- return this.ld
- },
- NU: function() {
- return this.qd
- }
- });
- b.jn = function(a) {
- var c = b.eb,
- d = a.Bg;
- if (d === c.ei) return b.Zf.fb;
- if (d === c.ak) return a.Qr;
- if (d === c.ji) return b.$f.fb;
- if (d === c.ki) return b.ag.fb;
- d === c.dn && b.log(b.c.jn);
- return ""
- };
- b.I = {
- kq: 0,
- qm: 1,
- dk: 2,
- TO: 3,
- Jd: {},
- pl: {},
- Oe: {},
- mo: {},
- yx: {},
- lj: [],
- Rk: [],
- gh: 0,
- Ri: !1,
- Sx: 0,
- GG: [b.Va.tm, b.Va.ek],
- Bo: function(a) {
- null != this.Oe[a.L] && this.Rk.push(a);
- a = a.s;
- for (var c = 0,
- d = a.length; c < d; c++) this.Bo(a[c])
- },
- Lj: function(a, c) {
- var d = this.Oe[a.L],
- e,
- f;
- if (d) for (e = 0, f = d.length; e < f; e++) d[e].dt(!0);
- if (!0 === c) for (d = a.s, e = 0, f = d.length; e < f; e++) this.Lj(d[e], !0)
- },
- Qf: function(a, c) {
- var d = this.Oe[a.L],
- e,
- f;
- if (d) for (e = 0, f = d.length; e < f; e++) d[e].dt(!1);
- this.Bo(a);
- if (!0 === c) for (d = a.s, e = 0, f = d.length; e < f; e++) this.Qf(d[e], !0)
- },
- ow: function(a) {
- 0 === this.gh ? this.qx(a) : this.lj.push(a)
- },
- qx: function(a) {
- var c = a.Me,
- d = this.Jd[c];
- d || (d = new b.aF, this.Jd[c] = d);
- d.push(a);
- 0 == a.mg ? (this.qh(c, this.dk), c = a.Sc, null == c && b.log(b.c.yJ), this.oF(c, a), c.Re && this.Qf(c)) : this.qh(c, this.qm)
- },
- bs: function(a) {
- return this.Jd[a]
- },
- bI: function() {
- if (0 != this.Rk.length) {
- for (var a = this.Rk,
- c, d, e = this.Oe,
- f = 0,
- g = a.length; f < g; f++) if (c = e[a[f].L]) for (var h = 0,
- k = c.length; h < k; h++)(d = c[h]) && this.qh(d.Me, this.dk);
- this.Rk.length = 0
- }
- },
- ly: function(a) {
- if (a) for (var c, d = 0; d < a.length;) c = a[d],
- c.sl(!1),
- null != c.Sc && (this.Ew(c.Sc, c), c.tl(null)),
- 0 === this.gh ? b.Wc(a, c) : ++d
- },
- mh: function(a) {
- var c = this.Jd[a];
- if (c) {
- var d = c.ld;
- this.ly(c.qd);
- this.ly(d);
- delete this.pl[a];
- this.gh || (c.clear(), delete this.Jd[a])
- }
- for (var d = this.lj,
- e, c = 0; c < d.length;)(e = d[c]) && e.Me == a ? b.Wc(d, e) : ++c
- },
- lt: function(a) {
- var c = this.kq,
- d = this.pl;
- d[a] && (c = d[a]);
- c != this.kq && (d[a] = this.kq, c & this.qm && this.RH(a), c & this.dk && ((c = b.Qa.Ib) ? this.TH(a, c) : d[a] = this.dk))
- },
- TH: function(a, c) {
- var d = this.bs(a);
- if (d) {
- var e = d.qd;
- e && 0 !== e.length && (this.Sx = 0, this.mo = {},
- this.Nt(c, !0), d.qd.sort(this.QH))
- }
- },
- QH: function(a, c) {
- var d = b.I.mo;
- return d[c.Sc.L] - d[a.Sc.L]
- },
- RH: function(a) {
- if (a = this.Jd[a]) {
- var c = a.ld;
- if (c && 0 !== c.length) {
- c.sort(this.SH);
- for (var d = 0,
- e = c.length; d < e && !(0 <= c[d].mg);)++d;
- a.Sz = d
- }
- }
- },
- SH: function(a, c) {
- return a.mg - c.mg
- },
- xs: function(a) {
- if (a = this.Jd[a]) {
- var c = a.ld,
- d = a.qd,
- e, f;
- if (d) for (e = 0; e < d.length;) f = d[e],
- f.pd ? ++e: b.Wc(d, f);
- if (c) for (e = 0; e < c.length;) f = c[e],
- f.pd ? ++e: b.Wc(c, f);
- d && 0 === d.length && a.SI();
- c && 0 === c.length && a.RI()
- }
- },
- So: function(a) {
- var c = this.gh;
- b.assert(0 < c, b.c.xC);
- a.Bg == b.eb.dn ? (this.xs(b.ye.fb), this.xs(b.xe.fb)) : this.xs(b.jn(a));
- if (! (1 < c)) {
- b.assert(1 == c, b.c.yC);
- a = this.Jd;
- var c = this.pl,
- d;
- for (d in a) a[d].empty() && (delete c[d], delete a[d]);
- d = this.lj;
- if (0 !== d.length) {
- a = 0;
- for (c = d.length; a < c; a++) this.qx(d[a]);
- this.lj.length = 0
- }
- }
- },
- $G: function(a, c) {
- if (!a.HG) return ! 1;
- var d = c.event,
- e = c.QA;
- d.Zs(a.Sc);
- var f = !1,
- g, h = d.jg,
- k = b.Dd.ii;
- h == k.Xp ? a.cf && (f = a.cf(e, d)) && a.pd && a.xi.push(e) : 0 < a.xi.length && -1 != (g = a.xi.indexOf(e)) && (f = !0, h === k.yq && a.Uh ? a.Uh(e, d) : h === k.nq ? (a.Th && a.Th(e, d), a.pd && a.xi.splice(g, 1)) : h === k.dq && (a.Sh && a.Sh(e, d), a.pd && a.xi.splice(g, 1)));
- return d.ih ? (b.I.So(d), !0) : f && a.pd && a.Tj ? (c.zL && c.touches.splice(e, 1), !0) : !1
- },
- FF: function(a) {
- this.lt(b.ye.fb);
- this.lt(b.xe.fb);
- var c = this.bs(b.ye.fb),
- d = this.bs(b.xe.fb);
- if (null != c || null != d) {
- var e = a.Ag,
- f = b.qz(e),
- g = {
- event: a,
- zL: c && d,
- touches: f,
- QA: null
- };
- if (c) for (var h = 0; h < e.length; h++) if (g.QA = e[h], this.Jr(c, this.$G, g), a.ih) return;
- if (d && 0 < f.length && (this.Jr(d, this.aH, {
- event: a,
- touches: f
- }), a.ih)) return;
- this.So(a)
- }
- },
- aH: function(a, c) {
- if (!a.pd) return ! 1;
- var d = b.Dd.ii,
- e = c.event,
- f = c.touches,
- g = e.jg;
- e.Zs(a.Sc);
- g == d.Xp && a.am ? a.am(f, e) : g == d.yq && a.cm ? a.cm(f, e) : g == d.nq && a.Ij ? a.Ij(f, e) : g == d.dq && a.bm && a.bm(f, e);
- return e.ih ? (b.I.So(e), !0) : !1
- },
- oF: function(a, c) {
- var d = this.Oe[a.L];
- d || (d = [], this.Oe[a.L] = d);
- d.push(c)
- },
- Ew: function(a, c) {
- var d = this.Oe[a.L];
- d && (b.Wc(d, c), 0 === d.length && delete this.Oe[a.L])
- },
- Jr: function(a, c, d) {
- var e = !1,
- f = a.ld,
- g = a.qd,
- h = 0,
- k;
- if (f && 0 !== f.length) for (; h < a.Sz; ++h) if (k = f[h], k.isEnabled() && !k.$a && k.pd && c(k, d)) {
- e = !0;
- break
- }
- if (g && !e) for (a = 0; a < g.length; a++) if (k = g[a], k.isEnabled() && !k.$a && k.pd && c(k, d)) {
- e = !0;
- break
- }
- if (f && !e) for (; h < f.length && (k = f[h], !k.isEnabled() || k.$a || !k.pd || !c(k, d)); ++h);
- },
- qh: function(a, c) {
- var d = this.pl;
- d[a] = null == d[a] ? c: c | d[a]
- },
- Nt: function(a, c) {
- var d = a.s,
- e = 0,
- f = d.length,
- g = this.yx,
- h = this.Oe;
- if (0 < f) {
- for (var k; e < f; e++) if ((k = d[e]) && 0 > k.Ia) this.Nt(k, !1);
- else break;
- null != h[a.L] && (g[a.of] || (g[a.of] = []), g[a.of].push(a.L));
- for (; e < f; e++)(k = d[e]) && this.Nt(k, !1)
- } else null != h[a.L] && (g[a.of] || (g[a.of] = []), g[a.of].push(a.L));
- if (c) {
- var d = [],
- m;
- for (m in g) d.push(m);
- d.sort(this.UH);
- m = d.length;
- k = this.mo;
- for (e = 0; e < m; e++) for (f = g[d[e]], h = 0; h < f.length; h++) k[f[h]] = ++this.Sx;
- this.yx = {}
- }
- },
- UH: function(a, c) {
- return a - c
- },
- addListener: function(a, c) {
- b.assert(a && c, b.c.AJ);
- if (! (a instanceof b.G)) b.assert("number" !== typeof c, b.c.BJ),
- a = b.G.create(a);
- else if (a.pd) {
- b.log(b.c.CJ);
- return
- }
- a.Eg() && ("number" == typeof c ? 0 == c ? b.log(b.c.zJ) : (a.tl(null), a.$s(c), a.sl(!0), a.dt(!1), this.ow(a)) : (a.tl(c), a.$s(0), a.sl(!0), this.ow(a)))
- },
- Tt: function(a, c) {
- var d = b.Fk.create(a, c);
- this.addListener(d, 1);
- return d
- },
- removeListener: function(a) {
- if (null != a) {
- var c, d = this.Jd,
- e;
- for (e in d) {
- var f = d[e],
- g = f.ld; (c = this.my(f.qd, a)) ? this.qh(a.Me, this.dk) : (c = this.my(g, a)) && this.qh(a.Me, this.qm);
- f.empty() && (delete this.pl[a.Me], delete d[e]);
- if (c) break
- }
- if (!c) for (c = this.lj, d = 0, e = c.length; d < e; d++) if (f = c[d], f == a) {
- b.Wc(c, f);
- break
- }
- }
- },
- my: function(a, c) {
- if (null == a) return ! 1;
- for (var d = 0,
- e = a.length; d < e; d++) {
- var f = a[d];
- if (f == c) return f.sl(!1),
- null != f.Sc && (this.Ew(f.Sc, f), f.tl(null)),
- 0 == this.gh && b.Wc(a, f),
- !0
- }
- return ! 1
- },
- EA: function(a, c) {
- if (a instanceof b.m) {
- delete this.mo[a.L];
- b.Wc(this.Rk, a);
- var d = this.Oe[a.L];
- if (d) {
- for (var e = b.qz(d), d = 0; d < e.length; d++) this.removeListener(e[d]);
- e.length = 0;
- e = this.lj;
- for (d = 0; d < e.length;) {
- var f = e[d];
- f.Sc == a ? (f.tl(null), f.sl(!1), e.splice(d, 1)) : ++d
- }
- if (!0 === c) for (e = a.s, d = 0, f = e.length; d < f; d++) this.EA(e[d], !0)
- }
- } else a == b.G.li ? this.mh(b.ye.fb) : a == b.G.en ? this.mh(b.xe.fb) : a == b.G.ki ? this.mh(b.ag.fb) : a == b.G.ei ? this.mh(b.Zf.fb) : a == b.G.ji ? this.mh(b.$f.fb) : b.log(b.c.DJ)
- },
- zX: function(a) {
- this.mh(a)
- },
- sX: function() {
- var a = this.Jd,
- c = this.GG,
- d;
- for (d in a) - 1 === c.indexOf(d) && this.mh(d)
- },
- HY: function(a, c) {
- if (null != a) {
- var d = this.Jd,
- e;
- for (e in d) {
- var f = d[e].ld;
- if (f && -1 != f.indexOf(a)) {
- null != a.Sc && b.log(b.c.EJ);
- a.mg !== c && (a.$s(c), this.qh(a.Me, this.qm));
- break
- }
- }
- }
- },
- Mp: function(a) {
- this.Ri = a
- },
- isEnabled: function() {
- return this.Ri
- },
- dispatchEvent: function(a) {
- if (this.Ri) {
- this.bI();
- this.gh++;
- if (!a || !a.FK) throw "event is undefined";
- if (a.Bg == b.eb.dn) this.FF(a);
- else {
- var c = b.jn(a);
- this.lt(c);
- c = this.Jd[c];
- null != c && this.Jr(c, this.XG, a);
- this.So(a)
- }
- this.gh--
- }
- },
- XG: function(a, c) {
- c.Zs(a.Sc);
- a.ws(c);
- return c.ih
- },
- xS: function(a, c) {
- var d = new b.kf(a);
- d.setUserData(c);
- this.dispatchEvent(d)
- }
- };
- b.vC = b.eb.extend({
- kw: null,
- ctor: function(a) {
- b.eb.prototype.ctor.call(this, b.eb.ei);
- this.kw = a
- }
- });
- b.Ev = b.eb.extend({
- ms: 0,
- Hx: !1,
- ctor: function(a, c) {
- b.eb.prototype.ctor.call(this, b.eb.ji);
- this.ms = a;
- this.Hx = c
- }
- });
- b.Zf = b.G.extend({
- oo: null,
- ctor: function(a) {
- this.oo = a;
- var c = this;
- b.G.prototype.ctor.call(this, b.G.ei, b.Zf.fb,
- function(a) {
- c.oo(a.kw, a)
- })
- },
- Eg: function() {
- b.assert(this.oo, b.c.XE);
- return ! 0
- },
- d: function() {
- return new b.Zf(this.oo)
- }
- });
- b.Zf.fb = "__cc_acceleration";
- b.Zf.create = function(a) {
- return new b.Zf(a)
- };
- b.$f = b.G.extend({
- Zl: null,
- $l: null,
- ctor: function() {
- var a = this;
- b.G.prototype.ctor.call(this, b.G.ji, b.$f.fb,
- function(c) {
- c.Hx ? a.Zl && a.Zl(c.ms, c) : a.$l && a.$l(c.ms, c)
- })
- },
- d: function() {
- var a = new b.$f;
- a.Zl = this.Zl;
- a.$l = this.$l;
- return a
- },
- Eg: function() {
- return null == this.Zl && null == this.$l ? (b.log(b.c.YE), !1) : !0
- }
- });
- b.$f.fb = "__cc_keyboard";
- b.$f.create = function() {
- return new b.$f
- };
- b.p.fr = function() {
- var a = b.m.prototype;
- a.Py = null;
- a.st = null;
- a.es = null;
- a.ti = null;
- a.ctor = function() {
- this.gs();
- var a = new b.re;
- a.Sd[2] = a.Sd[3] = a.Sd[6] = a.Sd[7] = a.Sd[8] = a.Sd[9] = a.Sd[11] = a.Sd[14] = 0;
- a.Sd[10] = a.Sd[15] = 1;
- this.Py = a;
- this.es = 0;
- this.st = new b.re
- };
- a.W = function() { ! 1 === this.Ff && (this.Ff = this.bo = !0)
- };
- a.Ba = function() {
- if (this.Gc) {
- var a = b.l,
- d, e = b.ZI;
- e.stack.push(e.top);
- b.MV(this.st, e.top);
- e.top = this.st;
- var f = this.zj;
- f && f.fF && f.HI();
- this.transform();
- var g = this.s;
- if (g && 0 < g.length) {
- var h = g.length;
- this.vc();
- for (d = 0; d < h; d++) if (g[d] && 0 > g[d].Ia) g[d].Ba();
- else break;
- for (this.na(a); d < h; d++) g[d] && g[d].Ba()
- } else this.na(a);
- this.arrivalOrder = 0;
- f && f.fF && f.nI(this);
- e.top = e.stack.pop()
- }
- };
- a.transform = function() {
- var a = this.Py,
- d = b.ZI.top,
- e = this.Yl(),
- f = a.Sd;
- f[0] = e.a;
- f[4] = e.J;
- f[12] = e.Z;
- f[1] = e.b;
- f[5] = e.P;
- f[13] = e.$;
- f[14] = this.Wo;
- b.rL(d, d, a);
- null == this.ti || null != this.zj && this.zj.fA() || (a = this.lb.x, d = this.lb.y, 0 !== a || 0 !== d ? (b.Yv || (a |= 0, d |= 0), b.pL(a, d, 0), this.ti.nA(), b.pL( - a, -d, 0)) : this.ti.nA())
- };
- a.Xe = a.hG
- };
- b.p.Fq = function() {
- var a = b.m.prototype;
- b.k(a, "x", a.sK, a.UM);
- b.k(a, "y", a.tK, a.VM);
- b.k(a, "width", a.Ie, a.Bf);
- b.k(a, "height", a.fh, a.Af);
- b.k(a, "anchorX", a.TF, a.Ws);
- b.k(a, "anchorY", a.UF, a.Xs);
- b.k(a, "skewX", a.AK, a.aN);
- b.k(a, "skewY", a.BK, a.bN);
- b.k(a, "zIndex", a.iK, a.aB);
- b.k(a, "vertexZ", a.JK, a.jN);
- b.k(a, "rotation", a.xK, a.YM);
- b.k(a, "rotationX", a.yK, a.ZM);
- b.k(a, "rotationY", a.zK, a.$M);
- b.k(a, "scale", a.Kz, a.Og);
- b.k(a, "scaleX", a.Lz, a.Qp);
- b.k(a, "scaleY", a.Mz, a.gv);
- b.k(a, "children", a.SJ);
- b.k(a, "childrenCount", a.TJ);
- b.k(a, "parent", a.getParent, a.bB);
- b.k(a, "visible", a.fL, a.te);
- b.k(a, "running", a.dL);
- b.k(a, "ignoreAnchor", a.bL, a.Gu);
- b.k(a, "actionManager", a.mp, a.RA);
- b.k(a, "scheduler", a.Ig, a.eB);
- b.k(a, "shaderProgram", a.xu, a.hv);
- b.k(a, "glServerState", a.cK, a.KM);
- b.k(a, "opacity", a.wj, a.Ga);
- b.k(a, "opacityModifyRGB", a.Dj, a.Ng);
- b.k(a, "cascadeOpacity", a.hA, a.VA);
- b.k(a, "color", a.Nh, a.V);
- b.k(a, "cascadeColor", a.gA, a.UA)
- };
- b.Mv = -1;
- b.$u = 1;
- b.m = b.oa.extend({
- Ia: 0,
- of: 0,
- Wo: 0,
- yf: 0,
- oh: 0,
- O: 1,
- ma: 1,
- ja: null,
- ie: 0,
- je: 0,
- s: null,
- Gc: !0,
- Ab: null,
- lb: null,
- v: null,
- Re: !1,
- Db: null,
- rf: !1,
- tag: b.Mv,
- userData: null,
- userObject: null,
- Ff: !0,
- bo: !0,
- Ce: !0,
- Ok: null,
- wR: null,
- wh: null,
- Dx: null,
- bc: !1,
- Jb: null,
- arrivalOrder: 0,
- Fd: null,
- rd: null,
- YQ: null,
- Cx: !1,
- Ik: !1,
- on: null,
- gg: null,
- ls: !1,
- $i: 0,
- zo: 0,
- Mc: "Node",
- jt: !1,
- Xi: "",
- sa: 255,
- Md: 255,
- Q: null,
- ac: null,
- $d: !1,
- De: !1,
- yR: !1,
- fR: 0,
- gs: function() {
- this.Ab = C(0, 0);
- this.lb = C(0, 0);
- this.v = D(0, 0);
- this.ja = C(0, 0);
- this.s = [];
- this.wh = {
- a: 1,
- b: 0,
- J: 0,
- P: 1,
- Z: 0,
- $: 0
- };
- var a = b.Qa;
- this.Fd = a.mp();
- this.rd = a.Ig();
- this.Cx = !0;
- this.on = {
- a: 1,
- b: 0,
- J: 0,
- P: 1,
- Z: 0,
- $: 0
- };
- b.bC && (this.gg = new b.bC(this));
- this.Md = this.sa = 255;
- this.Q = b.color(255, 255, 255, 255);
- this.ac = b.color(255, 255, 255, 255);
- this.De = this.$d = !1
- },
- ga: function() { ! 1 === this.Cx && this.gs();
- return ! 0
- },
- Gd: function(a, c) {
- if (a && 0 !== a.length) {
- var d, e = a.length,
- f;
- d = b.m.bd;
- switch (c) {
- case d.se:
- for (d = 0; d < e; d++)(f = a[d]) && f.se();
- break;
- case d.vd:
- for (d = 0; d < e; d++)(f = a[d]) && f.vd();
- break;
- case d.Hj:
- for (d = 0; d < e; d++)(f = a[d]) && f.Hj();
- break;
- case d.If:
- for (d = 0; d < e; d++)(f = a[d]) && f.If();
- break;
- case d.$c:
- for (d = 0; d < e; d++)(f = a[d]) && f.$c();
- break;
- case d.Nf:
- for (d = 0; d < e; d++)(f = a[d]) && f.Nf();
- break;
- case d.vc:
- for (d = 0; d < e; d++)(f = a[d]) && f.vc();
- break;
- default:
- b.assert(0, b.c.QC)
- }
- }
- },
- W: null,
- dc: function(a) {
- for (var c in a) this[c] = a[c]
- },
- AK: function() {
- return this.ie
- },
- aN: function(a) {
- this.ie = a;
- this.W()
- },
- BK: function() {
- return this.je
- },
- bN: function(a) {
- this.je = a;
- this.W()
- },
- aB: function(a) {
- this.Ia = a;
- this.Db && this.Db.im(this, a);
- b.I.Bo(this)
- },
- Ay: function(a) {
- this.Ia = a
- },
- iK: function() {
- return this.Ia
- },
- hV: function() {
- b.log(b.c.WC);
- return this.Ia
- },
- aZ: function(a) {
- b.log(b.c.gD);
- this.aB(a)
- },
- sY: function(a) {
- this.of != a && (this.of = a, b.I.Bo(this))
- },
- kU: function() {
- return this.of
- },
- JK: function() {
- return this.Wo
- },
- jN: function(a) {
- this.Wo = a
- },
- xK: function() {
- this.yf !== this.oh && b.log(b.c.UC);
- return this.yf
- },
- YM: function(a) {
- this.yf = this.oh = a;
- this.$i = 0.017453292519943295 * this.yf;
- this.zo = 0.017453292519943295 * this.oh;
- this.W()
- },
- yK: function() {
- return this.yf
- },
- ZM: function(a) {
- this.yf = a;
- this.$i = 0.017453292519943295 * this.yf;
- this.W()
- },
- zK: function() {
- return this.oh
- },
- $M: function(a) {
- this.oh = a;
- this.zo = 0.017453292519943295 * this.oh;
- this.W()
- },
- Kz: function() {
- this.O !== this.ma && b.log(b.c.VC);
- return this.O
- },
- Og: function(a, c) {
- this.O = a;
- this.ma = c || 0 === c ? c: a;
- this.W()
- },
- Lz: function() {
- return this.O
- },
- Qp: function(a) {
- this.O = a;
- this.W()
- },
- Mz: function() {
- return this.ma
- },
- gv: function(a) {
- this.ma = a;
- this.W()
- },
- Ma: function(a, c) {
- var d = this.ja;
- void 0 === c ? (d.x = a.x, d.y = a.y) : (d.x = a, d.y = c);
- this.W()
- },
- EU: function() {
- return C(this.ja)
- },
- sK: function() {
- return this.ja.x
- },
- UM: function(a) {
- this.ja.x = a;
- this.W()
- },
- tK: function() {
- return this.ja.y
- },
- VM: function(a) {
- this.ja.y = a;
- this.W()
- },
- TJ: function() {
- return this.s.length
- },
- SJ: function() {
- return this.s
- },
- fL: function() {
- return this.Gc
- },
- te: function(a) {
- this.Gc != a && (this.Gc = a) && this.W()
- },
- FT: function() {
- return C(this.Ab)
- },
- Qj: function(a, c) {
- var d = this.Ab;
- if (void 0 === c) {
- if (a.x === d.x && a.y === d.y) return;
- d.x = a.x;
- d.y = a.y
- } else {
- if (a === d.x && c === d.y) return;
- d.x = a;
- d.y = c
- }
- var e = this.lb,
- f = this.v;
- e.x = f.width * d.x;
- e.y = f.height * d.y;
- this.W()
- },
- $Q: function() {
- return this.Ab
- },
- zy: function(a) {
- var c = a.x;
- a = a.y;
- this.Ab.x !== c && (this.Ab.x = c, this.lb.x = this.v.width * c);
- this.Ab.y !== a && (this.Ab.y = a, this.lb.y = this.v.height * a);
- this.W()
- },
- TF: function() {
- return this.Ab.x
- },
- Ws: function(a) {
- this.Ab.x !== a && (this.Ab.x = a, this.lb.x = this.v.width * a, this.W())
- },
- UF: function() {
- return this.Ab.y
- },
- Xs: function(a) {
- this.Ab.y !== a && (this.Ab.y = a, this.lb.y = this.v.height * a, this.W())
- },
- qu: function() {
- return C(this.lb)
- },
- Ie: function() {
- return this.v.width
- },
- Bf: function(a) {
- this.v.width = a;
- this.lb.x = a * this.Ab.x;
- this.W()
- },
- fh: function() {
- return this.v.height
- },
- Af: function(a) {
- this.v.height = a;
- this.lb.y = a * this.Ab.y;
- this.W()
- },
- ud: function() {
- return D(this.v)
- },
- wd: function(a, c) {
- var d = this.v;
- if (void 0 === c) {
- if (a.width === d.width && a.height === d.height) return;
- d.width = a.width;
- d.height = a.height
- } else {
- if (a === d.width && c === d.height) return;
- d.width = a;
- d.height = c
- }
- var e = this.lb,
- f = this.Ab;
- e.x = d.width * f.x;
- e.y = d.height * f.y;
- this.W()
- },
- dL: function() {
- return this.Re
- },
- getParent: function() {
- return this.Db
- },
- bB: function(a) {
- this.Db = a
- },
- bL: function() {
- return this.rf
- },
- Gu: function(a) {
- a != this.rf && (this.rf = a, this.W())
- },
- yu: function() {
- return this.tag
- },
- gB: function(a) {
- this.tag = a
- },
- PM: function(a) {
- this.Xi = a
- },
- getName: function() {
- return this.Xi
- },
- getUserData: function() {
- return this.userData
- },
- setUserData: function(a) {
- this.userData = a
- },
- cV: function() {
- return this.userObject
- },
- YY: function(a) {
- this.userObject != a && (this.userObject = a)
- },
- zU: function() {
- return this.arrivalOrder
- },
- RM: function(a) {
- if (NaN == this.arrivalOrder) debugger;
- this.arrivalOrder = a
- },
- mp: function() {
- this.Fd || (this.Fd = b.Qa.mp());
- return this.Fd
- },
- RA: function(a) {
- this.Fd != a && (this.km(), this.Fd = a)
- },
- Ig: function() {
- this.rd || (this.rd = b.Qa.Ig());
- return this.rd
- },
- eB: function(a) {
- this.rd != a && (this.Tp(), this.rd = a)
- },
- YR: function() {
- b.log(b.c.SC);
- return this.RJ()
- },
- RJ: function() {
- return b.jH(E(0, 0, this.v.width, this.v.height), this.Xe())
- },
- If: function() {
- this.km();
- this.Tp();
- b.I.EA(this);
- this.Gd(this.s, b.m.bd.If)
- },
- Od: function(a) {
- var c = this.s;
- if (null != c) for (var d = 0; d < c.length; d++) {
- var e = c[d];
- if (e && e.tag == a) return e
- }
- return null
- },
- PT: function(a) {
- if (!a) return b.log("Invalid name"),
- null;
- for (var c = this.s,
- d = 0,
- e = c.length; d < e; d++) if (c[d].Xi == a) return c[d];
- return null
- },
- N: function(a, c, d) {
- c = void 0 === c ? a.Ia: c;
- var e, f = !1;
- switch (typeof d) {
- case "undefined":
- d = void 0;
- e = a.Xi;
- break;
- case "string":
- e = d;
- d = void 0;
- break;
- case "number":
- f = !0,
- e = ""
- }
- b.assert(a, b.c.RC);
- b.assert(null === a.Db, "child already added. It can't be added again");
- this.kI(a, c, d, e, f)
- },
- kI: function(a, c, d, e, f) {
- this.s || (this.s = []);
- this.DG(a, c);
- f ? a.gB(d) : a.PM(e);
- a.bB(this);
- a.RM(b.$u++);
- this.Re && (a.se(), this.ls && a.Hj());
- this.$d && this.jx();
- this.De && this.kx()
- },
- hc: function(a) {
- this.Db && (null == a && (a = !0), this.Db.removeChild(this, a))
- },
- AX: function(a) {
- b.log(b.c.aD);
- this.hc(a)
- },
- removeChild: function(a, c) {
- 0 !== this.s.length && (null == c && (c = !0), -1 < this.s.indexOf(a) && this.BF(a, c), this.W())
- },
- xX: function(a, c) {
- a === b.Mv && b.log(b.c.ZC);
- var d = this.Od(a);
- null == d ? b.log(b.c.$C, a) : this.removeChild(d, c)
- },
- qX: function(a) {
- b.log(b.c.YC);
- this.df(a)
- },
- df: function(a) {
- var c = this.s;
- if (null != c) {
- null == a && (a = !0);
- for (var d = 0; d < c.length; d++) {
- var e = c[d];
- e && (this.Re && (e.Nf(), e.vd()), a && e.If(), e.parent = null)
- }
- this.s.length = 0
- }
- },
- BF: function(a, c) {
- this.Re && (a.Nf(), a.vd());
- c && a.If();
- a.parent = null;
- b.Wc(this.s, a)
- },
- DG: function(a, c) {
- this.bc = !0;
- this.s.push(a);
- a.Ay(c)
- },
- im: function(a, c) {
- b.assert(a, b.c.bD);
- this.bc = !0;
- a.arrivalOrder = b.$u;
- b.$u++;
- a.Ay(c);
- this.W()
- },
- vc: function() {
- if (this.bc) {
- var a = this.s,
- c = a.length,
- d, e, f;
- for (d = 1; d < c; d++) {
- f = a[d];
- for (e = d - 1; 0 <= e;) {
- if (f.Ia < a[e].Ia) a[e + 1] = a[e];
- else if (f.Ia === a[e].Ia && f.arrivalOrder < a[e].arrivalOrder) a[e + 1] = a[e];
- else break;
- e--
- }
- a[e + 1] = f
- }
- this.bc = !1
- }
- },
- na: function() {},
- vB: function() {
- null != this.Db && (this.Db.vB(), this.Db.transform())
- },
- se: function() {
- this.ls = !1;
- this.Re = !0;
- this.Gd(this.s, b.m.bd.se);
- this.Oj()
- },
- Hj: function() {
- this.ls = !0;
- this.Gd(this.s, b.m.bd.Hj)
- },
- Nf: function() {
- this.Gd(this.s, b.m.bd.Nf)
- },
- vd: function() {
- this.Re = !1;
- this.pause();
- this.Gd(this.s, b.m.bd.vd)
- },
- Kc: function(a) {
- b.assert(a, b.c.dD);
- this.actionManager.jI(a, this, !this.Re);
- return a
- },
- km: function() {
- this.actionManager && this.actionManager.DA(this)
- },
- kv: function(a) {
- this.actionManager.CA(a)
- },
- fZ: function(a) {
- a === b.fi ? b.log(b.c.hD) : this.actionManager.ZL(a, this)
- },
- Bz: function(a) {
- return a === b.fi ? (b.log(b.c.TC), null) : this.actionManager.Bz(a, this)
- },
- wU: function() {
- return this.actionManager.BL(this)
- },
- rM: function() {
- this.sM(0)
- },
- sM: function(a) {
- this.scheduler.bv(this, a, !this.Re)
- },
- AB: function() {
- this.scheduler.nm(this)
- },
- av: function(a, c, d, e) {
- c = c || 0;
- b.assert(a, b.c.eD);
- b.assert(0 <= c, b.c.fD);
- d = null == d ? b.Ak: d;
- this.scheduler.qM(this, a, c, d, e || 0, !this.Re)
- },
- PX: function(a, c) {
- this.av(a, 0, 0, c)
- },
- xB: function(a) {
- a && this.scheduler.zB(this, a)
- },
- Tp: function() {
- this.scheduler.yB(this)
- },
- KX: function() {
- b.log(b.c.cD);
- this.Oj()
- },
- Oj: function() {
- this.scheduler.Qf(this);
- this.actionManager && this.actionManager.Qf(this);
- b.I.Qf(this)
- },
- YW: function() {
- b.log(b.c.XC);
- this.pause()
- },
- pause: function() {
- this.scheduler.Lj(this);
- this.actionManager && this.actionManager.Lj(this);
- b.I.Lj(this)
- },
- UX: function(a) {
- this.on = a;
- this.Ik = this.Ff = !0
- },
- rK: function() {
- this.bo && (this.Dx = b.az(this.Xe()), this.bo = !1);
- return this.Dx
- },
- VW: function() {
- return this.rK()
- },
- vu: function() {
- for (var a = this.Xe(), c = this.Db; null != c; c = c.parent) a = b.Eh(a, c.Xe());
- return a
- },
- Bp: function() {
- return this.vu()
- },
- Rz: function() {
- return b.az(this.vu())
- },
- JZ: function() {
- return this.Rz()
- },
- du: function(a) {
- return b.vA(a, this.Rz())
- },
- pz: function(a) {
- a = a || C(0, 0);
- return b.vA(a, this.vu())
- },
- XI: function(a) {
- return b.uc(this.du(a), this.lb)
- },
- kS: function(a) {
- a = a || C(0, 0);
- return this.pz(b.Jj(a, this.lb))
- },
- TQ: function(a) {
- a = this.pz(a);
- return b.Qa.YI(a)
- },
- lS: function(a) {
- return this.du(a.Oh())
- },
- mS: function(a) {
- a = a.Oh();
- a = b.Qa.WI(a);
- return this.XI(a)
- },
- update: function(a) {
- this.gg && !this.gg.yV() && this.gg.Ba(a)
- },
- $c: function() {
- this.Gd(this.s, b.m.bd.$c)
- },
- Zu: function() {},
- Pf: function() {},
- UJ: function(a) {
- return this.gg.UJ(a)
- },
- BR: function(a) {
- this.gg.add(a)
- },
- yX: function(a) {
- return this.gg.remove(a)
- },
- rX: function() {
- this.gg.oX()
- },
- zj: null,
- ctor: null,
- Ba: null,
- transform: null,
- Yl: function() {
- return this.Xe()
- },
- Xe: null,
- aj: function() {
- if (!1 === this.Ce) {
- this.Ce = !0;
- var a = this.Ok;
- a && a != this && a.aj()
- }
- },
- Ys: function(a) {
- if (this.Ok != a) {
- this.Ok = a;
- for (var c = this.s,
- d = 0,
- e = c.length; d < e; d++) c[d].Ys(a)
- }
- },
- ru: function() {
- this.ti || (this.ti = new b.bk);
- return this.ti
- },
- lU: function() {
- return this.zj
- },
- tY: function(a) {
- this.zj = a
- },
- xu: function() {
- return this.Jb
- },
- hv: function(a) {
- this.Jb = a
- },
- cK: function() {
- return this.es
- },
- KM: function(a) {
- this.es = a
- },
- JT: function() {
- var a = E(0, 0, this.v.width, this.v.height),
- c = this.Bp(),
- a = b.Xu(a, this.Bp());
- if (!this.s) return a;
- for (var d = this.s,
- e = 0; e < d.length; e++) {
- var f = d[e];
- f && f.Gc && (f = f.Zk(c)) && (a = b.Ip(a, f))
- }
- return a
- },
- Zk: function(a) {
- var c = E(0, 0, this.v.width, this.v.height);
- a = null == a ? this.Xe() : b.Eh(this.Xe(), a);
- c = b.Xu(c, a);
- if (!this.s) return c;
- for (var d = this.s,
- e = 0; e < d.length; e++) {
- var f = d[e];
- f && f.Gc && (f = f.Zk(a)) && (c = b.Ip(c, f))
- }
- return c
- },
- hG: function() {
- if (this.Ff) {
- var a = this.ja.x,
- c = this.ja.y,
- d = this.lb.x,
- e = -d,
- f = this.lb.y,
- g = -f,
- h = this.O,
- k = this.ma;
- this.rf && (a += d, c += f);
- var m = 1,
- n = 0,
- r = 1,
- s = 0;
- if (0 !== this.yf || 0 !== this.oh) m = Math.cos( - this.$i),
- n = Math.sin( - this.$i),
- r = Math.cos( - this.zo),
- s = Math.sin( - this.zo);
- var u = this.ie || this.je;
- u || 0 === d && 0 === f || (a += r * e * h + -n * g * k, c += s * e * h + m * g * k);
- var t = this.wh;
- t.a = r * h;
- t.b = s * h;
- t.J = -n * k;
- t.P = m * k;
- t.Z = a;
- t.$ = c;
- u && (t = b.Eh({
- a: 1,
- b: Math.tan(b.Gg(this.je)),
- J: Math.tan(b.Gg(this.ie)),
- P: 1,
- Z: 0,
- $: 0
- },
- t), 0 !== d || 0 !== f) && (t = b.mI(t, e, g));
- this.Ik && (t = b.Eh(t, this.on), this.Ik = !1);
- this.wh = t;
- this.Ff = !1
- }
- return this.wh
- },
- Eb: function() {},
- wj: function() {
- return this.Md
- },
- YJ: function() {
- return this.sa
- },
- Ga: function(a) {
- this.sa = this.Md = a;
- var c = 255,
- d = this.Db;
- d && d.cascadeOpacity && (c = d.sa);
- this.kb(c);
- this.Q.a = this.ac.a = a
- },
- kb: function(a) {
- this.sa = this.Md * a / 255;
- if (this.De) {
- a = this.s;
- for (var c = 0; c < a.length; c++) {
- var d = a[c];
- d && d.kb(this.sa)
- }
- }
- },
- hA: function() {
- return this.De
- },
- VA: function(a) {
- this.De !== a && ((this.De = a) ? this.kx() : this.EF())
- },
- kx: function() {
- var a = 255,
- c = this.Db;
- c && c.cascadeOpacity && (a = c.sa);
- this.kb(a)
- },
- EF: function() {
- this.sa = this.Md;
- for (var a = this.s,
- c = 0; c < a.length; c++) {
- var d = a[c];
- d && d.kb(255)
- }
- },
- Nh: function() {
- var a = this.ac;
- return b.color(a.r, a.g, a.b, a.a)
- },
- pp: function() {
- var a = this.Q;
- return b.color(a.r, a.g, a.b, a.a)
- },
- V: function(a) {
- var c = this.Q,
- d = this.ac;
- c.r = d.r = a.r;
- c.g = d.g = a.g;
- c.b = d.b = a.b;
- a = (a = this.Db) && a.cascadeColor ? a.pp() : b.color.WHITE;
- this.sb(a)
- },
- sb: function(a) {
- var c = this.Q,
- d = this.ac;
- c.r = 0 | d.r * a.r / 255;
- c.g = 0 | d.g * a.g / 255;
- c.b = 0 | d.b * a.b / 255;
- if (this.$d) for (a = this.s, d = 0; d < a.length; d++) {
- var e = a[d];
- e && e.sb(c)
- }
- },
- gA: function() {
- return this.$d
- },
- UA: function(a) {
- this.$d !== a && ((this.$d = a) ? this.jx() : this.DF())
- },
- jx: function() {
- var a;
- a = (a = this.Db) && a.cascadeColor ? a.pp() : b.color.WHITE;
- this.sb(a)
- },
- DF: function() {
- var a = this.Q,
- c = this.ac;
- a.r = c.r;
- a.g = c.g;
- a.b = c.b;
- for (var a = this.s,
- c = b.color.WHITE,
- d = 0; d < a.length; d++) {
- var e = a[d];
- e && e.sb(c)
- }
- },
- Ng: function() {},
- Dj: function() {
- return ! 1
- }
- });
- b.m.create = function() {
- return new b.m
- };
- b.m.bd = {
- se: 1,
- vd: 2,
- If: 3,
- Hj: 4,
- $c: 5,
- Nf: 6,
- vc: 7
- };
- b.da === b.Ya ? (p = b.m.prototype, p.ctor = function() {
- this.gs()
- },
- p.W = function() {
- this.aj(); ! 1 === this.Ff && (this.Ff = this.bo = !0)
- },
- p.Ba = function(a) {
- if (this.Gc) {
- a = a || b.l;
- var c, d = this.s,
- e;
- a.save();
- this.transform(a);
- var f = d.length;
- if (0 < f) {
- this.vc();
- for (c = 0; c < f; c++) if (e = d[c], 0 > e.Ia) e.Ba(a);
- else break;
- for (this.na(a); c < f; c++) d[c].Ba(a)
- } else this.na(a);
- this.Ce = !1;
- this.arrivalOrder = 0;
- a.restore()
- }
- },
- p.transform = function(a) {
- a = a || b.l;
- var c = b.view,
- d = this.Xe();
- a.transform(d.a, d.J, d.b, d.P, d.Z * c.O, -d.$ * c.ma)
- },
- p.Xe = function() {
- if (this.Ff) {
- var a = this.wh;
- a.Z = this.ja.x;
- a.$ = this.ja.y;
- var c = 1,
- d = 0;
- this.yf && (c = Math.cos(this.$i), d = Math.sin(this.$i));
- a.a = a.P = c;
- a.b = -d;
- a.J = d;
- var e = this.O,
- f = this.ma,
- g = this.lb.x,
- h = this.lb.y,
- k = 1E-6 > e && -1E-6 < e ? 1E-6: e,
- m = 1E-6 > f && -1E-6 < f ? 1E-6: f;
- if (this.ie || this.je) {
- var n = Math.tan( - this.ie * Math.PI / 180),
- r = Math.tan( - this.je * Math.PI / 180);
- Infinity === n && (n = 99999999);
- Infinity === r && (r = 99999999);
- var s = h * n * k,
- u = g * r * m;
- a.a = c + -d * r;
- a.b = c * n + -d;
- a.J = d + c * r;
- a.P = d * n + c;
- a.Z += c * s + -d * u;
- a.$ += d * s + c * u
- }
- if (1 !== e || 1 !== f) a.a *= k,
- a.J *= k,
- a.b *= m,
- a.P *= m;
- a.Z += c * -g * k + -d * h * m;
- a.$ -= d * -g * k + c * h * m;
- this.rf && (a.Z += g, a.$ += h);
- this.Ik && (this.wh = b.Eh(a, this.on), this.Ik = !1);
- this.Ff = !1
- }
- return this.wh
- },
- p = null) : (b.assert("function" === typeof b.p.fr, b.c.Gb, "BaseNodesWebGL.js"), b.p.fr(), delete b.p.fr);
- b.assert("function" === typeof b.p.Fq, b.c.Gb, "BaseNodesPropertyDefine.js");
- b.p.Fq();
- delete b.p.Fq;
- b.m.JP = 0;
- b.m.LP = 1;
- b.m.KP = 2;
- b.m.MP = 3;
- b.m.IP = 4;
- b.hf = b.m.extend({
- textureAtlas: null,
- quadsToDraw: 0,
- Ti: 0,
- Jx: 0,
- Ke: 0,
- de: 0,
- ah: null,
- Da: !1,
- t: null,
- Yn: !1,
- Mc: "AtlasNode",
- ctor: function(a, c, d, e) {
- b.m.prototype.ctor.call(this);
- this.ah = b.color.WHITE;
- this.t = {
- src: b.kc,
- Y: b.jc
- };
- this.Yn = !1;
- void 0 !== e && this.VK(a, c, d, e)
- },
- Vj: function() {
- b.log(b.c.JB)
- },
- Nh: function() {
- return this.Da ? this.ah: b.m.prototype.Nh.call(this)
- },
- Ng: function(a) {
- var c = this.color;
- this.Da = a;
- this.color = c
- },
- Dj: function() {
- return this.Da
- },
- Ml: function() {
- return this.t
- },
- $h: function(a, c) {
- this.t = void 0 === c ? a: {
- src: a,
- Y: c
- }
- },
- hB: function(a) {
- this.textureAtlas = a
- },
- Oz: function() {
- return this.textureAtlas
- },
- IU: function() {
- return this.quadsToDraw
- },
- JY: function(a) {
- this.quadsToDraw = a
- },
- vh: null,
- mb: null,
- Ht: null,
- Pk: null,
- VK: function(a, c, d, e) {
- if (!a) throw "cc.AtlasNode.initWithTileFile(): title should not be null";
- a = b.va.cc(a);
- return this.ia(a, c, d, e)
- },
- ia: null,
- hs: function(a, c, d, e) {
- this.Ke = c;
- this.de = d;
- this.Da = !0;
- this.mb = a;
- if (!this.mb) return b.log(b.c.rv),
- !1;
- this.vh = this.mb;
- this.wn();
- this.quadsToDraw = e;
- return ! 0
- },
- is: function(a, c, d, e) {
- this.Ke = c;
- this.de = d;
- this.ah = b.color.WHITE;
- this.Da = !0;
- this.t.src = b.kc;
- this.t.Y = b.jc;
- c = this.ac;
- this.Pk = new Float32Array([c.r / 255, c.g / 255, c.b / 255, this.Md / 255]);
- this.textureAtlas = new b.mf;
- this.textureAtlas.ia(a, e);
- if (!this.textureAtlas) return b.log(b.c.rv),
- !1;
- this.yh();
- this.Wy();
- this.wn();
- this.quadsToDraw = e;
- this.shaderProgram = b.ff.Of(b.zD);
- this.Ht = b.l.getUniformLocation(this.shaderProgram.Iz(), "u_color");
- return ! 0
- },
- na: null,
- Lr: function(a) {
- a = a || b.l;
- b.pA(this);
- b.Ph(this.t.src, this.t.Y);
- this.Ht && this.Pk && (a.uniform4fv(this.Ht, this.Pk), this.textureAtlas.vz(this.quadsToDraw))
- },
- V: null,
- wH: function(a) {
- var c = this.ac;
- if (c.r != a.r || c.g != a.g || c.b != a.b) {
- c = b.color(a.r, a.g, a.b);
- this.ah = a;
- if (this.Da) {
- var d = this.sa;
- c.r = c.r * d / 255;
- c.g = c.g * d / 255;
- c.b = c.b * d / 255
- }
- b.m.prototype.V.call(this, a);
- this.fd()
- }
- },
- fd: function() {
- var a = this.La();
- if (a && this.mb) {
- var c = this.mb.la;
- if (c) {
- var d = a.la,
- a = E(0, 0, c.width, c.height);
- d instanceof HTMLCanvasElement ? b.tj(c, this.Q, a, d) : (d = b.tj(c, this.Q, a), a = new b.K, a.Mb(d), a.Fa(), this.Wa(a))
- }
- }
- },
- xH: function(a) {
- var c = b.color(a.r, a.g, a.b);
- this.ah = a;
- var d = this.sa;
- this.Da && (c.r = c.r * d / 255, c.g = c.g * d / 255, c.b = c.b * d / 255);
- b.m.prototype.V.call(this, a);
- a = this.Q;
- this.Pk = new Float32Array([a.r / 255, a.g / 255, a.b / 255, d / 255])
- },
- Ga: function() {},
- bt: function(a) {
- b.m.prototype.Ga.call(this, a);
- this.Da && (this.color = this.ah)
- },
- ct: function(a) {
- b.m.prototype.Ga.call(this, a);
- this.Da ? this.color = this.ah: (a = this.Q, this.Pk = new Float32Array([a.r / 255, a.g / 255, a.b / 255, this.sa / 255]))
- },
- La: null,
- cs: function() {
- return this.vh
- },
- ds: function() {
- return this.textureAtlas.texture
- },
- Wa: null,
- gt: function(a) {
- this.vh = a
- },
- ht: function(a) {
- this.textureAtlas.texture = a;
- this.yh();
- this.Wy()
- },
- wn: null,
- rF: function() {
- var a = this.texture.ud();
- this.Jx = 0 | a.height / this.de;
- this.Ti = 0 | a.width / this.Ke
- },
- sF: function() {
- var a = this.texture,
- c = a.ud();
- this.Yn && (c = a.v);
- this.Jx = 0 | c.height / this.de;
- this.Ti = 0 | c.width / this.Ke
- },
- yh: function() {
- this.textureAtlas.texture.Aj() || (this.t.src = b.SRC_ALPHA, this.t.Y = b.ONE_MINUS_SRC_ALPHA)
- },
- Wy: function() {
- this.Da = this.textureAtlas.texture.Aj()
- },
- at: function(a) {
- this.Yn = a
- }
- });
- p = b.hf.prototype;
- b.da === b.wb ? (p.ia = p.is, p.na = p.Lr, p.V = p.xH, p.Ga = p.ct, p.La = p.ds, p.Wa = p.ht, p.wn = p.sF) : (p.ia = p.hs, p.na = b.m.prototype.na, p.V = p.wH, p.Ga = p.bt, p.La = p.cs, p.Wa = p.gt, p.wn = p.rF, b.Aa.wt || (p.fd = function() {
- var a, c = this.La();
- if (c && this.mb && (a = c.la)) {
- var d = this.mb.la;
- if (c = b.va.zu(d)) d = E(0, 0, d.width, d.height),
- a instanceof HTMLCanvasElement ? b.sj(a, c, this.Q, d, a) : (a = b.sj(a, c, this.Q, d), c = new b.K, c.Mb(a), c.Fa(), this.Wa(c))
- }
- }));
- b.k(p, "opacity", p.wj, p.Ga);
- b.k(p, "color", p.Nh, p.V);
- b.k(p, "texture", p.La, p.Wa);
- b.hf.create = function(a, c, d, e) {
- return new b.hf(a, c, d, e)
- };
- b.p.lr = function() {
- b.K = b.oa.extend({
- mR: !0,
- Yi: null,
- wf: 0,
- vf: 0,
- Xi: "",
- v: null,
- af: 0,
- bf: 0,
- Xn: !1,
- Ni: !1,
- shaderProgram: null,
- xb: !1,
- la: null,
- Ah: null,
- url: null,
- qa: null,
- ctor: function() {
- this.v = D(0, 0);
- this.Yi = b.K.tz
- },
- Yu: function() {
- this.Ah && b.l.deleteTexture(this.Ah);
- b.D.Pf(this.url)
- },
- Fz: function() {
- return this.Yi
- },
- Hz: function() {
- return this.wf
- },
- Gz: function() {
- return this.vf
- },
- getName: function() {
- return this.Ah
- },
- ud: function() {
- return D(this.v.width / b.Ka(), this.v.height / b.Ka())
- },
- Ie: function() {
- return this.v.width / b.Ka()
- },
- fh: function() {
- return this.v.height / b.Ka()
- },
- VJ: function() {
- return this.v
- },
- mK: function() {
- return this.af
- },
- NM: function(a) {
- this.af = a
- },
- nK: function() {
- return this.bf
- },
- OM: function(a) {
- this.bf = a
- },
- xu: function() {
- return this.shaderProgram
- },
- hv: function(a) {
- this.shaderProgram = a
- },
- Aj: function() {
- return this.Xn
- },
- NK: function() {
- return this.Ni
- },
- description: function() {
- return "\x3ccc.Texture2D | Name \x3d " + this.Xi + " | Dimensions \x3d " + this.wf + " x " + this.vf + " | Coordinates \x3d (" + this.af + ", " + this.bf + ")\x3e"
- },
- YL: function() {},
- jL: function(a) {
- return a
- },
- Xz: function(a, c, d, e, f) {
- var g = b.K,
- h = b.l,
- k = h.RGBA,
- m = h.UNSIGNED_BYTE,
- n = d * b.K.gw[c] / 8;
- 0 === n % 8 ? h.pixelStorei(h.UNPACK_ALIGNMENT, 8) : 0 === n % 4 ? h.pixelStorei(h.UNPACK_ALIGNMENT, 4) : 0 === n % 2 ? h.pixelStorei(h.UNPACK_ALIGNMENT, 2) : h.pixelStorei(h.UNPACK_ALIGNMENT, 1);
- this.Ah = h.createTexture();
- b.qe(this);
- h.texParameteri(h.TEXTURE_2D, h.TEXTURE_MIN_FILTER, h.LINEAR);
- h.texParameteri(h.TEXTURE_2D, h.TEXTURE_MAG_FILTER, h.LINEAR);
- h.texParameteri(h.TEXTURE_2D, h.TEXTURE_WRAP_S, h.CLAMP_TO_EDGE);
- h.texParameteri(h.TEXTURE_2D, h.TEXTURE_WRAP_T, h.CLAMP_TO_EDGE);
- switch (c) {
- case g.zk:
- k = h.RGBA;
- break;
- case g.yk:
- k = h.RGB;
- break;
- case g.Wm:
- m = h.UNSIGNED_SHORT_4_4_4_4;
- break;
- case g.Vm:
- m = h.UNSIGNED_SHORT_5_5_5_1;
- break;
- case g.xk:
- m = h.UNSIGNED_SHORT_5_6_5;
- break;
- case g.Cq:
- k = h.LUMINANCE_ALPHA;
- break;
- case g.Um:
- k = h.ALPHA;
- break;
- case g.Dq:
- k = h.LUMINANCE;
- break;
- default:
- b.assert(0, b.c.rE)
- }
- h.texImage2D(h.TEXTURE_2D, 0, k, d, e, 0, k, m, a);
- this.v.width = f.width;
- this.v.height = f.height;
- this.wf = d;
- this.vf = e;
- this.Yi = c;
- this.af = f.width / d;
- this.bf = f.height / e;
- this.Ni = this.Xn = !1;
- this.shaderProgram = b.ff.Of(b.Xv);
- return this.xb = !0
- },
- dJ: function(a) {
- var c = [0, this.bf, this.af, this.bf, 0, 0, this.af, 0],
- d = this.wf * this.af,
- e = this.vf * this.bf;
- a = [a.x, a.y, 0, d + a.x, a.y, 0, a.x, e + a.y, 0, d + a.x, e + a.y, 0];
- b.tc(b.Lc | b.dr);
- this.Jb.wc();
- this.Jb.iB();
- b.qe(this);
- d = b.l;
- d.vertexAttribPointer(b.lc, 2, d.FLOAT, !1, 0, a);
- d.vertexAttribPointer(b.Dk, 2, d.FLOAT, !1, 0, c);
- d.drawArrays(d.TRIANGLE_STRIP, 0, 4)
- },
- fJ: function(a) {
- var c = [0, this.bf, this.af, this.bf, 0, 0, this.af, 0];
- a = [a.x, a.y, a.x + a.width, a.y, a.x, a.y + a.height, a.x + a.width, a.y + a.height];
- b.tc(b.Lc | b.dr);
- this.Jb.wc();
- this.Jb.iB();
- b.qe(this);
- var d = b.l;
- d.vertexAttribPointer(b.lc, 2, d.FLOAT, !1, 0, a);
- d.vertexAttribPointer(b.Dk, 2, d.FLOAT, !1, 0, c);
- d.drawArrays(d.TRIANGLE_STRIP, 0, 4)
- },
- $z: function(a) {
- if (null == a) return b.log(b.c.uE),
- !1;
- var c = a.LK(),
- d = a.dK(),
- e = b.bu.il;
- if (c > e || d > e) return b.log(b.c.vE, c, d, e, e),
- !1;
- this.xb = !0;
- return this.zG(a, c, d)
- },
- Mb: function(a) {
- a && (this.Ah = b.l.createTexture(), this.la = a)
- },
- fK: function() {
- return this.la
- },
- cL: function() {
- return this.xb
- },
- Fa: function() {
- if (b.yo) {
- if (!this.la) {
- var a = b.D.Yc(this.url);
- if (!a) return;
- this.Mb(a)
- }
- this.la.width && this.la.height && (this.xb = !0, a = b.l, b.qe(this), a.pixelStorei(a.UNPACK_ALIGNMENT, 4), a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, this.la), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), this.shaderProgram = b.ff.Of(b.Xv), b.qe(null), a = this.la.height, this.wf = this.v.width = this.la.width, this.vf = this.v.height = a, this.Yi = b.K.zk, this.bf = this.af = 1, this.Ni = this.Xn = !1, this.Ub())
- }
- },
- Qd: function() {
- b.log(b.c.AE);
- return null
- },
- RK: function() {
- b.log(b.c.tE);
- return ! 1
- },
- SK: function() {
- b.log(b.c.xE);
- return ! 1
- },
- TK: function() {
- b.log(b.c.zE);
- return ! 1
- },
- fN: function(a) {
- var c = b.l;
- b.assert(this.wf == b.Aq(this.wf) && this.vf == b.Aq(this.vf) || a.WN == c.CLAMP_TO_EDGE && a.XN == c.CLAMP_TO_EDGE, "WebGLRenderingContext.CLAMP_TO_EDGE should be used in NPOT textures");
- b.qe(this);
- c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MIN_FILTER, a.$V);
- c.texParameteri(c.TEXTURE_2D, c.TEXTURE_MAG_FILTER, a.XV);
- c.texParameteri(c.TEXTURE_2D, c.TEXTURE_WRAP_S, a.WN);
- c.texParameteri(c.TEXTURE_2D, c.TEXTURE_WRAP_T, a.XN)
- },
- yM: function() {
- var a = b.l;
- b.qe(this);
- this.Ni ? a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR_MIPMAP_NEAREST) : a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR);
- a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.NEAREST)
- },
- uM: function() {
- var a = b.l;
- b.qe(this);
- this.Ni ? a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.NEAREST_MIPMAP_NEAREST) : a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.NEAREST);
- a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.NEAREST)
- },
- generateMipmap: function() {
- b.assert(this.wf == b.Aq(this.wf) && this.vf == b.Aq(this.vf), "Mimpap texture only works in POT textures");
- b.qe(this);
- b.l.generateMipmap(b.l.TEXTURE_2D);
- this.Ni = !0
- },
- EN: function() {
- return b.K.bF[this.Yi]
- },
- JI: function(a) {
- a = a || this.Yi;
- var c = b.K.gw[a];
- if (null != c) return c;
- b.log(b.c.qE, a);
- return - 1
- },
- zG: function(a, c, d) {
- var e = b.K,
- f = a.getData(),
- g = null,
- g = null,
- h = a.lV(),
- k = D(a.LK(), a.dK()),
- m = e.tz,
- n = a.IT();
- h || (8 <= n ? m = e.yk: (b.log(b.c.nE), m = e.xk));
- var r = c * d;
- if (m == e.xk) if (h) for (f = new Uint16Array(c * d), g = a.getData(), n = 0; n < r; ++n) f[n] = (g[n] >> 0 & 255) >> 3 << 11 | (g[n] >> 8 & 255) >> 2 << 5 | (g[n] >> 16 & 255) >> 3 << 0;
- else for (f = new Uint16Array(c * d), g = a.getData(), n = 0; n < r; ++n) f[n] = (g[n] & 255) >> 3 << 11 | (g[n] & 255) >> 2 << 5 | (g[n] & 255) >> 3 << 0;
- else if (m == e.Wm) for (f = new Uint16Array(c * d), g = a.getData(), n = 0; n < r; ++n) f[n] = (g[n] >> 0 & 255) >> 4 << 12 | (g[n] >> 8 & 255) >> 4 << 8 | (g[n] >> 16 & 255) >> 4 << 4 | (g[n] >> 24 & 255) >> 4 << 0;
- else if (m == e.Vm) for (f = new Uint16Array(c * d), g = a.getData(), n = 0; n < r; ++n) f[n] = (g[n] >> 0 & 255) >> 3 << 11 | (g[n] >> 8 & 255) >> 3 << 6 | (g[n] >> 16 & 255) >> 3 << 1 | (g[n] >> 24 & 255) >> 7 << 0;
- else if (m == e.Um) for (f = new Uint8Array(c * d), g = a.getData(), n = 0; n < r; ++n) f[n] = g >> 24 & 255;
- if (h && m == e.yk) for (g = a.getData(), f = new Uint8Array(c * d * 3), n = 0; n < r; ++n) f[3 * n] = g >> 0 & 255,
- f[3 * n + 1] = g >> 8 & 255,
- f[3 * n + 2] = g >> 16 & 255;
- this.Xz(f, m, c, d, k);
- a.getData();
- this.Xn = a.DV();
- return ! 0
- },
- Vc: function(a, c) {
- this.qa || (this.qa = []);
- this.qa.push({
- ne: a,
- td: c
- })
- },
- bM: function(a) {
- if (this.qa) for (var c = this.qa,
- d = 0; d < c.length; d++) c[d].td == a && c.splice(d, 1)
- },
- Ub: function() {
- if (this.qa) {
- for (var a = this.qa,
- c = 0,
- d = a.length; c < d; c++) {
- var e = a[c];
- e.ne.call(e.td, this)
- }
- a.length = 0
- }
- }
- })
- };
- b.p.mr = function() {
- var a = b.mf.prototype;
- a.Hy = function() {
- var a = b.l;
- this.ed[0] = a.createBuffer();
- this.ed[1] = a.createBuffer();
- this.lh = a.createBuffer();
- this.ko()
- };
- a.ko = function() {
- var a = b.l;
- a.bindBuffer(a.ARRAY_BUFFER, this.lh);
- a.bufferData(a.ARRAY_BUFFER, this.Tc, a.DYNAMIC_DRAW);
- a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.ed[1]);
- a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.md, a.STATIC_DRAW)
- };
- a.vz = function(a) {
- var d;
- d = 0;
- if (0 !== a && this.texture && this.texture.xb) {
- var e = b.l;
- b.qe(this.texture);
- b.tc(b.gn);
- e.bindBuffer(e.ARRAY_BUFFER, this.lh);
- this.dirty && e.bufferData(e.ARRAY_BUFFER, this.Tc, e.DYNAMIC_DRAW);
- e.vertexAttribPointer(b.lc, 3, e.FLOAT, !1, 24, 0);
- e.vertexAttribPointer(b.Ck, 4, e.UNSIGNED_BYTE, !0, 24, 12);
- e.vertexAttribPointer(b.Dk, 2, e.FLOAT, !1, 24, 16);
- this.dirty && (this.dirty = !1);
- e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, this.ed[1]);
- b.Zv ? e.drawElements(e.TRIANGLE_STRIP, 6 * a, e.UNSIGNED_SHORT, 6 * d * this.md.BYTES_PER_ELEMENT) : e.drawElements(e.TRIANGLES, 6 * a, e.UNSIGNED_SHORT, 6 * d * this.md.BYTES_PER_ELEMENT);
- b.We++
- }
- }
- };
- b.p.nr = function() {
- var a = b.va;
- a.Fa = function(a) {
- var d = this.pb;
- b.yo || (d = this.hl);
- var e = d[a];
- e || (e = d[a] = new b.K, e.url = a);
- e.Fa()
- };
- a.cc = function(a, d, e) {
- b.assert(a, b.c.pE);
- var f = this.pb;
- b.yo || (f = this.hl);
- var g = f[a] || f[b.D.$g[a]];
- if (g) return d && d.call(e),
- g;
- b.D.Yc(a) || (b.D.uw(a) ? b.D.load(a,
- function() {
- d && d.call(e)
- }) : b.D.sd[a] = b.D.Wl(a,
- function(e, f) {
- if (e) return d ? d(e) : e;
- b.va.Fa(a);
- d && d(null, f)
- }));
- g = f[a] = new b.K;
- g.url = a;
- return g
- };
- delete a
- };
- b.p.Lq = function() {
- var a = b.K;
- a.TP = function(a) {
- b.uD = a
- };
- a.zk = 2;
- a.yk = 3;
- a.xk = 4;
- a.Um = 5;
- a.Dq = 6;
- a.Cq = 7;
- a.Wm = 8;
- a.Vm = 7;
- a.Rv = 9;
- a.Qv = 10;
- a.pD = a.zk;
- var c = b.K.bF = {};
- c[a.zk] = "RGBA8888";
- c[a.yk] = "RGB888";
- c[a.xk] = "RGB565";
- c[a.Um] = "A8";
- c[a.Dq] = "I8";
- c[a.Cq] = "AI88";
- c[a.Wm] = "RGBA4444";
- c[a.Vm] = "RGB5A1";
- c[a.Rv] = "PVRTC4";
- c[a.Qv] = "PVRTC2";
- c = b.K.gw = {};
- c[a.zk] = 32;
- c[a.yk] = 24;
- c[a.xk] = 16;
- c[a.Um] = 8;
- c[a.Dq] = 8;
- c[a.Cq] = 16;
- c[a.Wm] = 16;
- c[a.Vm] = 16;
- c[a.Rv] = 4;
- c[a.Qv] = 3;
- c = b.K.prototype;
- b.k(c, "name", c.getName);
- b.k(c, "pixelFormat", c.Fz);
- b.k(c, "pixelsWidth", c.Hz);
- b.k(c, "pixelsHeight", c.Gz);
- b.k(c, "width", c.Ie);
- b.k(c, "height", c.fh);
- a.tz = a.pD
- };
- b.p.Mq = function() {
- var a = b.mf.prototype;
- b.k(a, "totalQuads", a.Qz);
- b.k(a, "capacity", a.Cz);
- b.k(a, "quads", a.Jz, a.cB)
- };
- b.fO = 51;
- b.iO = 19;
- b.kO = 18;
- b.hO = 50;
- b.eO = 34;
- b.cO = 35;
- b.dO = 33;
- b.gO = 49;
- b.jO = 17;
- b.uD = !1;
- b.da === b.Ya ? b.K = b.oa.extend({
- v: null,
- xb: !1,
- la: null,
- qa: null,
- url: null,
- ctor: function() {
- this.v = D(0, 0);
- this.xb = !1;
- this.la = null
- },
- Hz: function() {
- return this.v.width
- },
- Gz: function() {
- return this.v.height
- },
- ud: function() {
- var a = b.Ka();
- return D(this.v.width / a, this.v.height / a)
- },
- Ie: function() {
- return this.v.width / b.Ka()
- },
- fh: function() {
- return this.v.height / b.Ka()
- },
- VJ: function() {
- return this.v
- },
- Mb: function(a) {
- a && (this.la = a)
- },
- fK: function() {
- return this.la
- },
- cL: function() {
- return this.xb
- },
- Fa: function() {
- if (!this.xb) {
- if (!this.la) {
- var a = b.D.Yc(this.url);
- if (!a) return;
- this.Mb(a)
- }
- this.xb = !0;
- a = this.la;
- this.v.width = a.width;
- this.v.height = a.height;
- this.Ub()
- }
- },
- description: function() {
- return "\x3ccc.Texture2D | width \x3d " + this.v.width + " height " + this.v.height + "\x3e"
- },
- Xz: function() {
- return ! 1
- },
- $z: function() {
- return ! 1
- },
- Qd: function() {
- return ! 1
- },
- Yu: function() {},
- getName: function() {
- return null
- },
- mK: function() {
- return 1
- },
- NM: function() {},
- nK: function() {
- return 1
- },
- OM: function() {},
- Fz: function() {
- return null
- },
- xu: function() {
- return null
- },
- hv: function() {},
- Aj: function() {
- return ! 1
- },
- NK: function() {
- return ! 1
- },
- YL: function() {},
- jL: function(a) {
- return a
- },
- dJ: function() {},
- fJ: function() {},
- RK: function() {
- b.log(b.c.sE);
- return ! 1
- },
- SK: function() {
- b.log(b.c.wE);
- return ! 1
- },
- TK: function() {
- b.log(b.c.yE);
- return ! 1
- },
- fN: function() {},
- yM: function() {},
- uM: function() {},
- generateMipmap: function() {},
- EN: function() {
- return ""
- },
- JI: function() {
- return - 1
- },
- Vc: function(a, c) {
- this.qa || (this.qa = []);
- this.qa.push({
- ne: a,
- td: c
- })
- },
- bM: function(a) {
- if (this.qa) for (var c = this.qa,
- d = 0; d < c.length; d++) c[d].td == a && c.splice(d, 1)
- },
- Ub: function() {
- if (this.qa) {
- for (var a = this.qa,
- c = 0,
- d = a.length; c < d; c++) {
- var e = a[c];
- e.ne.call(e.td, this)
- }
- a.length = 0
- }
- }
- }) : (b.assert("function" === typeof b.p.lr, b.c.Gb, "TexturesWebGL.js"), b.p.lr(), delete b.p.lr);
- b.assert("function" === typeof b.p.Lq, b.c.Gb, "TexturesPropertyDefine.js");
- b.p.Lq();
- delete b.p.Lq;
- b.va = {
- pb: {},
- Al: {},
- Ct: 0 | 1E3 * Math.random(),
- hl: {},
- CG: function() {
- var a, c = this.hl,
- d = this.pb;
- for (a in c) {
- var e = c[a];
- e.Fa();
- d[a] = e
- }
- this.hl = {}
- },
- FR: function() {
- b.log(b.c.IN)
- },
- CR: function() {
- b.log(b.c.GN)
- },
- description: function() {
- return "\x3cTextureCache | Number of textures \x3d " + this.pb.length + "\x3e"
- },
- lm: function(a) {
- return this.pb[a] || this.pb[b.D.$g[a]]
- },
- gK: function(a) {
- for (var c in this.pb) if (this.pb[c] == a) return c;
- return null
- },
- QF: function() {
- this.Ct++;
- return "_textureKey_" + this.Ct
- },
- zu: function(a) {
- var c = this.gK(a);
- c || (c = a instanceof HTMLImageElement ? a.src: this.QF());
- this.Al[c] || (this.Al[c] = b.rj(a));
- return this.Al[c]
- },
- ER: function() {
- b.log(b.c.HN)
- },
- uX: function() {
- var a = this.pb,
- c;
- for (c in a) a[c] && a[c].Yu();
- this.pb = {}
- },
- HX: function(a) {
- if (a) {
- var c = this.pb,
- d;
- for (d in c) c[d] == a && (c[d].Yu(), delete c[d])
- }
- },
- IX: function(a) {
- null != a && this.pb[a] && delete this.pb[a]
- },
- ZR: function(a, c) {
- if (c instanceof b.K) this.pb[a] = c;
- else {
- var d = new b.K;
- d.Mb(c);
- d.Fa();
- this.pb[a] = d
- }
- },
- JR: function(a, c) {
- b.assert(a, b.c.KN);
- if (c && this.pb[c]) return this.pb[c];
- var d = new b.K;
- d.$z(a);
- null != c && null != d ? this.pb[c] = d: b.log(b.c.JN);
- return d
- },
- DS: function() {
- var a = 0,
- c = 0,
- d = this.pb,
- e;
- for (e in d) {
- var f = d[e];
- a++;
- f.la instanceof HTMLImageElement ? b.log(b.c.LN, e, f.la.src, f.pixelsWidth, f.pixelsHeight) : b.log(b.c.rB, e, f.pixelsWidth, f.pixelsHeight);
- c += f.pixelsWidth * f.pixelsHeight * 4
- }
- d = this.Al;
- for (e in d) {
- var f = d[e],
- g;
- for (g in f) {
- var h = f[g];
- a++;
- b.log(b.c.rB, e, h.width, h.height);
- c += h.width * h.height * 4
- }
- }
- b.log(b.c.MN, a, c / 1024, (c / 1048576).toFixed(2))
- },
- fg: function() {
- this.pb = {};
- this.Al = {};
- this.Ct = 0 | 1E3 * Math.random();
- this.hl = {}
- }
- };
- b.da === b.Ya ? (p = b.va, p.Fa = function(a) {
- var c = this.pb,
- d = c[a];
- d || (d = c[a] = new b.K, d.url = a);
- d.Fa()
- },
- p.cc = function(a, c, d) {
- b.assert(a, b.c.oE);
- var e = this.pb,
- f = e[a] || e[b.D.$g[a]];
- if (f) return c && c.call(d),
- f;
- f = e[a] = new b.K;
- f.url = a;
- b.D.Yc(a) ? f.Fa() : b.D.uw(a) ? b.D.load(a,
- function() {
- c && c.call(d)
- }) : b.D.sd[a] = b.D.Wl(a,
- function(d, e) {
- if (d) return c ? c(d) : d;
- b.va.Fa(a);
- c && c(null, e)
- });
- return f
- },
- p = null) : (b.assert("function" === typeof b.p.nr, b.c.Gb, "TexturesWebGL.js"), b.p.nr(), delete b.p.nr);
- b.mf = b.oa.extend({
- dirty: !1,
- texture: null,
- md: null,
- ed: null,
- Bc: 0,
- Ec: null,
- Tc: null,
- lh: null,
- od: null,
- ctor: function(a, c) {
- this.ed = [];
- "string" == typeof a ? this.Tl(a, c) : a instanceof b.K && this.ia(a, c)
- },
- Qz: function() {
- return this.X
- },
- Cz: function() {
- return this.Bc
- },
- La: function() {
- return this.texture
- },
- Wa: function(a) {
- this.texture = a
- },
- XA: function(a) {
- this.dirty = a
- },
- iA: function() {
- return this.dirty
- },
- Jz: function() {
- return this.Ec
- },
- cB: function(a) {
- this.Ec = a
- },
- UQ: function(a, c) {
- if (a) for (var d = 0; d < a.length; d++) this.Co(a[d], c + d)
- },
- Co: function(a, c) {
- var d = this.Ec;
- d[c] ? (d[c].wa = a.wa, d[c].xa = a.xa, d[c].ya = a.ya, d[c].za = a.za) : d[c] = new b.Xa(a.ya, a.wa, a.za, a.xa, this.Tc, c * b.Xa.BYTES_PER_ELEMENT)
- },
- description: function() {
- return "\x3ccc.TextureAtlas | totalQuads \x3d" + this.X + "\x3e"
- },
- Gy: function() {
- if (0 !== this.Bc) for (var a = this.md,
- c = this.Bc,
- d = 0; d < c; d++) b.Zv ? (a[6 * d + 0] = 4 * d + 0, a[6 * d + 1] = 4 * d + 0, a[6 * d + 2] = 4 * d + 2, a[6 * d + 3] = 4 * d + 1, a[6 * d + 4] = 4 * d + 3, a[6 * d + 5] = 4 * d + 3) : (a[6 * d + 0] = 4 * d + 0, a[6 * d + 1] = 4 * d + 1, a[6 * d + 2] = 4 * d + 2, a[6 * d + 3] = 4 * d + 3, a[6 * d + 4] = 4 * d + 2, a[6 * d + 5] = 4 * d + 1)
- },
- Hy: function() {
- var a = b.l;
- this.ed[0] = a.createBuffer();
- this.ed[1] = a.createBuffer();
- this.lh = a.createBuffer();
- this.ko()
- },
- ko: function() {
- var a = b.l;
- a.bindBuffer(a.ARRAY_BUFFER, this.lh);
- a.bufferData(a.ARRAY_BUFFER, this.Tc, a.DYNAMIC_DRAW);
- a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.ed[1]);
- a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.md, a.STATIC_DRAW)
- },
- Tl: function(a, c) {
- var d = b.va.cc(a);
- if (d) return this.ia(d, c);
- b.log(b.c.BE, a);
- return ! 1
- },
- ia: function(a, c) {
- b.assert(a, b.c.CE);
- this.Bc = c |= 0;
- this.X = 0;
- this.texture = a;
- this.Ec = [];
- this.md = new Uint16Array(6 * c);
- var d = b.Xa.BYTES_PER_ELEMENT;
- this.Tc = new ArrayBuffer(d * c);
- this.od = new Uint8Array(this.Tc);
- if ((!this.Ec || !this.md) && 0 < c) return ! 1;
- for (var e = this.Ec,
- f = 0; f < c; f++) e[f] = new b.Xa(null, null, null, null, this.Tc, f * d);
- this.Gy();
- this.Hy();
- return this.dirty = !0
- },
- Up: function(a, c) {
- b.assert(a, b.c.ME);
- b.assert(0 <= c && c < this.Bc, b.c.NE);
- this.X = Math.max(c + 1, this.X);
- this.Co(a, c);
- this.dirty = !0
- },
- Iu: function(a, c) {
- b.assert(c < this.Bc, b.c.FE);
- this.X++;
- if (this.X > this.Bc) b.log(b.c.bw);
- else {
- var d = b.Xa.BYTES_PER_ELEMENT,
- e = c * d,
- f = (this.X - 1 - c) * d;
- this.Ec[this.X - 1] = new b.Xa(null, null, null, null, this.Tc, (this.X - 1) * d);
- this.od.set(this.od.subarray(e, e + f), e + d);
- this.Co(a, c);
- this.dirty = !0
- }
- },
- sV: function(a, c, d) {
- d = d || a.length;
- b.assert(c + d <= this.Bc, b.c.GE);
- var e = b.Xa.BYTES_PER_ELEMENT;
- this.X += d;
- if (this.X > this.Bc) b.log(b.c.bw);
- else {
- var f = c * e,
- g = (this.X - 1 - c - d) * e,
- h = this.X - 1 - d,
- k;
- for (k = 0; k < d; k++) this.Ec[h + k] = new b.Xa(null, null, null, null, this.Tc, (this.X - 1) * e);
- this.od.set(this.od.subarray(f, f + g), f + e * d);
- for (k = 0; k < d; k++) this.Co(a[k], c + k);
- this.dirty = !0
- }
- },
- rV: function(a, c) {
- if (a !== c) {
- b.assert(0 <= c || c < this.X, b.c.DE);
- b.assert(0 <= a || a < this.X, b.c.EE);
- var d = b.Xa.BYTES_PER_ELEMENT,
- e = this.od,
- f = e.subarray(a * d, d),
- g;
- a > c ? (g = c * d, e.set(e.subarray(g, g + (a - c) * d), g + d), e.set(f, g)) : (g = (a + 1) * d, e.set(e.subarray(g, g + (c - a) * d), g - d), e.set(f, c * d));
- this.dirty = !0
- }
- },
- dM: function(a) {
- b.assert(a < this.X, b.c.KE);
- var c = b.Xa.BYTES_PER_ELEMENT;
- this.X--;
- this.Ec.length = this.X;
- if (a !== this.X) {
- var d = (a + 1) * c;
- this.od.set(this.od.subarray(d, d + (this.X - a) * c), d - c)
- }
- this.dirty = !0
- },
- CX: function(a, c) {
- b.assert(a + c <= this.X, b.c.LE);
- this.X -= c;
- if (a !== this.X) {
- var d = b.Xa.BYTES_PER_ELEMENT,
- e = (a + c) * d;
- this.od.set(this.od.subarray(e, e + (this.X - a) * d), a * d)
- }
- this.dirty = !0
- },
- $L: function() {
- this.X = this.Ec.length = 0
- },
- qh: function(a) {
- this.dirty = a
- },
- JA: function(a) {
- if (a == this.Bc) return ! 0;
- var c = b.Xa.BYTES_PER_ELEMENT,
- d = this.Bc;
- this.X = Math.min(this.X, a);
- var e = this.Bc = 0 | a,
- f = this.X;
- if (null == this.Ec) for (this.Ec = [], this.Tc = new ArrayBuffer(c * e), this.od = new Uint8Array(this.Tc), a = 0; a < e; a++) this.Ec = new b.Xa(null, null, null, null, this.Tc, a * c);
- else {
- var g, h, k = this.Ec;
- if (e > d) {
- g = [];
- h = new ArrayBuffer(c * e);
- for (a = 0; a < f; a++) g[a] = new b.Xa(k[a].ya, k[a].wa, k[a].za, k[a].xa, h, a * c);
- for (; a < e; a++) g[a] = new b.Xa(null, null, null, null, h, a * c)
- } else for (f = Math.max(f, e), g = [], h = new ArrayBuffer(c * e), a = 0; a < f; a++) g[a] = new b.Xa(k[a].ya, k[a].wa, k[a].za, k[a].xa, h, a * c);
- this.od = new Uint8Array(h);
- this.Ec = g;
- this.Tc = h
- }
- null == this.md ? this.md = new Uint16Array(6 * e) : e > d ? (c = new Uint16Array(6 * e), c.set(this.md, 0), this.md = c) : this.md = this.md.subarray(0, 6 * e);
- this.Gy();
- this.ko();
- return this.dirty = !0
- },
- QK: function(a) {
- this.X += a
- },
- aW: function(a, c, d) {
- if (void 0 === d) {
- if (d = c, c = this.X - a, b.assert(d + (this.X - a) <= this.Bc, b.c.HE), 0 === c) return
- } else if (b.assert(d + c <= this.X, b.c.IE), b.assert(a < this.X, b.c.JE), a == d) return;
- var e = b.Xa.BYTES_PER_ELEMENT,
- f = a * e,
- g = c * e,
- h = this.od,
- k = h.subarray(f, f + g),
- m = d * e;
- d < a ? (c = d * e, h.set(h.subarray(c, c + (a - d) * e), c + g)) : (c = (a + c) * e, h.set(h.subarray(c, c + (d - a) * e), f));
- h.set(k, m);
- this.dirty = !0
- },
- yT: function(a, c) {
- for (var d = c * b.Xa.BYTES_PER_ELEMENT,
- e = new Uint8Array(this.Tc, a * b.Xa.BYTES_PER_ELEMENT, d), f = 0; f < d; f++) e[f] = 0
- },
- jJ: function() {
- this.vz(this.X)
- },
- nR: function() {
- var a = b.l;
- this.ed && (this.ed[0] && a.deleteBuffer(this.ed[0]), this.ed[1] && a.deleteBuffer(this.ed[1]));
- this.lh && a.deleteBuffer(this.lh)
- }
- });
- p = b.mf.prototype;
- b.k(p, "totalQuads", p.Qz);
- b.k(p, "capacity", p.Cz);
- b.k(p, "quads", p.Jz, p.cB);
- b.mf.create = function(a, c) {
- return new b.mf(a, c)
- };
- b.mf.eu = b.mf.create;
- b.da === b.wb && (b.assert("function" === typeof b.p.mr, b.c.Gb, "TexturesWebGL.js"), b.p.mr(), delete b.p.mr);
- b.assert("function" === typeof b.p.Mq, b.c.Gb, "TexturesPropertyDefine.js");
- b.p.Mq();
- delete b.p.Mq;
- b.$m = b.m.extend({
- Mc: "Scene",
- ctor: function() {
- b.m.prototype.ctor.call(this);
- this.rf = !0;
- this.Qj(0.5, 0.5);
- this.wd(b.Qa.Ql())
- }
- });
- b.$m.create = function() {
- return new b.$m
- };
- b.xq = b.$m.extend({
- rg: null,
- Lx: 0,
- Fr: 0,
- eo: null,
- Mc: "LoaderScene",
- ga: function() {
- var a = this,
- c = 200,
- d = a.pF = b.Pb.create(b.color(32, 32, 32, 255));
- d.Ma(b.di.Wt);
- a.N(d, 0);
- var e = 24,
- f = -c / 2 + 100;
- b.os && (b.D.Wl(b.os, {
- Ju: !1
- },
- function(d, e) {
- c = e.height;
- a.AG(e, b.di.Zo)
- }), e = 14, f = -c / 2 - 10);
- e = a.eo = b.A.create("\u52a0\u8f7d\u4e2d... 0%", "Arial", e);
- e.Ma(b.Jj(b.di.Zo, C(0, f)));
- e.V(b.color(180, 180, 180));
- d.N(this.eo, 10);
- return ! 0
- },
- AG: function(a, c) {
- var d = new b.K;
- d.Mb(a);
- d.Fa();
- d = b.B.create(d);
- d.Og(b.Ka());
- d.x = c.x;
- d.y = c.y;
- this.pF.N(d, 10)
- },
- se: function() {
- b.m.prototype.se.call(this);
- this.av(this.My, 0.3)
- },
- vd: function() {
- b.m.prototype.vd.call(this);
- this.eo.ic("\u52a0\u8f7d\u4e2d... 0%")
- },
- UK: function(a, c) {
- "string" == typeof a && (a = [a]);
- this.gM = a || [];
- this.fc = c
- },
- My: function() {
- var a = this;
- a.xB(a.My);
- var c = a.gM;
- a.Lx = c.length;
- a.Fr = 0;
- b.D.load(c,
- function(c, e) {
- a.Fr = e
- },
- function() {
- a.fc && a.fc()
- });
- a.av(a.Xy)
- },
- Xy: function() {
- var a = this.Fr,
- c = this.Lx,
- d;
- d = Math.min(a / c * 100 | 0, 100);
- this.eo.ic("\u52a0\u8f7d\u4e2d... " + d + "%");
- a >= c && this.xB(this.Xy)
- }
- });
- b.xq.Wu = function(a, c) {
- var d = b;
- d.Xl || (d.Xl = new b.xq, d.Xl.ga());
- d.Xl.UK(a, c);
- b.Qa.OA(d.Xl);
- return d.Xl
- };
- b.p.wq = function() {
- var a = b.zb.prototype;
- a.ez = function() {};
- a.wB = function() {};
- a.Ba = b.m.prototype.Ba
- };
- b.p.ir = function() {
- var a = b.Pb.prototype;
- a.Eo = null;
- a.pt = null;
- a.Lt = null;
- a.Dr = null;
- a.rt = null;
- a.qt = null;
- a.ctor = function(a, d, e) {
- this.rt = new ArrayBuffer(32);
- this.qt = new ArrayBuffer(16);
- var f = this.rt,
- g = this.qt,
- h = b.Sa.BYTES_PER_ELEMENT,
- k = b.ad.BYTES_PER_ELEMENT;
- this.Eo = [new b.Sa(0, 0, f, 0), new b.Sa(0, 0, f, h), new b.Sa(0, 0, f, 2 * h), new b.Sa(0, 0, f, 3 * h)];
- this.pt = [b.color(0, 0, 0, 255, g, 0), b.color(0, 0, 0, 255, g, k), b.color(0, 0, 0, 255, g, 2 * k), b.color(0, 0, 0, 255, g, 3 * k)];
- this.Lt = b.l.createBuffer();
- this.Dr = b.l.createBuffer();
- b.zb.prototype.ctor.call(this);
- this.t = new b.cb(b.kc, b.jc);
- b.Pb.prototype.ga.call(this, a, d, e)
- };
- a.wd = function(a, d) {
- var e = this.Eo;
- void 0 === d ? (e[1].x = a.width, e[2].y = a.height, e[3].x = a.width, e[3].y = a.height) : (e[1].x = a, e[2].y = d, e[3].x = a, e[3].y = d);
- this.xr();
- b.zb.prototype.wd.call(this, a, d)
- };
- a.Bf = function(a) {
- var d = this.Eo;
- d[1].x = a;
- d[3].x = a;
- this.xr();
- b.zb.prototype.Bf.call(this, a)
- };
- a.Af = function(a) {
- var d = this.Eo;
- d[2].y = a;
- d[3].y = a;
- this.xr();
- b.zb.prototype.Af.call(this, a)
- };
- a.Eb = function() {
- for (var a = this.Q,
- d = this.sa,
- e = this.pt,
- f = 0; 4 > f; f++) e[f].r = a.r,
- e[f].g = a.g,
- e[f].b = a.b,
- e[f].a = d;
- this.rw()
- };
- a.na = function(a) {
- a = a || b.l;
- b.pA(this);
- b.tc(b.Lc | b.cr);
- a.bindBuffer(a.ARRAY_BUFFER, this.Lt);
- a.vertexAttribPointer(b.lc, 2, a.FLOAT, !1, 0, 0);
- a.bindBuffer(a.ARRAY_BUFFER, this.Dr);
- a.vertexAttribPointer(b.Ck, 4, a.UNSIGNED_BYTE, !0, 0, 0);
- b.Ph(this.t.src, this.t.Y);
- a.drawArrays(a.TRIANGLE_STRIP, 0, 4)
- };
- a.xr = function() {
- var a = b.l;
- a.bindBuffer(a.ARRAY_BUFFER, this.Lt);
- a.bufferData(a.ARRAY_BUFFER, this.rt, a.STATIC_DRAW)
- };
- a.rw = function() {
- var a = b.l;
- a.bindBuffer(a.ARRAY_BUFFER, this.Dr);
- a.bufferData(a.ARRAY_BUFFER, this.qt, a.STATIC_DRAW)
- }
- };
- b.p.jr = function() {
- var a = b.Ug.prototype;
- a.na = b.Pb.prototype.na;
- a.Eb = function() {
- var a = this.cg,
- d = b.Tu(a);
- if (0 !== d) {
- var e = Math.sqrt(2),
- a = C(a.x / d, a.y / d);
- this.zn && (a = b.Kg(a, 1 / (Math.abs(a.x) + Math.abs(a.y)) * e));
- var f = this.sa / 255,
- d = this.Q,
- g = this.Bi,
- d = {
- r: d.r,
- g: d.g,
- b: d.b,
- a: this.ej * f
- },
- f = {
- r: g.r,
- g: g.g,
- b: g.b,
- a: this.Ci * f
- },
- h = this.pt,
- g = h[0],
- k = h[1],
- m = h[2],
- h = h[3];
- g.r = f.r + (e + a.x + a.y) / (2 * e) * (d.r - f.r);
- g.g = f.g + (e + a.x + a.y) / (2 * e) * (d.g - f.g);
- g.b = f.b + (e + a.x + a.y) / (2 * e) * (d.b - f.b);
- g.a = f.a + (e + a.x + a.y) / (2 * e) * (d.a - f.a);
- k.r = f.r + (e - a.x + a.y) / (2 * e) * (d.r - f.r);
- k.g = f.g + (e - a.x + a.y) / (2 * e) * (d.g - f.g);
- k.b = f.b + (e - a.x + a.y) / (2 * e) * (d.b - f.b);
- k.a = f.a + (e - a.x + a.y) / (2 * e) * (d.a - f.a);
- m.r = f.r + (e + a.x - a.y) / (2 * e) * (d.r - f.r);
- m.g = f.g + (e + a.x - a.y) / (2 * e) * (d.g - f.g);
- m.b = f.b + (e + a.x - a.y) / (2 * e) * (d.b - f.b);
- m.a = f.a + (e + a.x - a.y) / (2 * e) * (d.a - f.a);
- h.r = f.r + (e - a.x - a.y) / (2 * e) * (d.r - f.r);
- h.g = f.g + (e - a.x - a.y) / (2 * e) * (d.g - f.g);
- h.b = f.b + (e - a.x - a.y) / (2 * e) * (d.b - f.b);
- h.a = f.a + (e - a.x - a.y) / (2 * e) * (d.a - f.a);
- this.rw()
- }
- }
- };
- b.p.Iq = function() {
- var a = b.Pb.prototype;
- b.k(a, "width", a.Ie, a.Bf);
- b.k(a, "height", a.fh, a.Af)
- };
- b.p.Jq = function() {
- var a = b.Ug.prototype;
- b.k(a, "startColor", a.DK, a.dN);
- b.k(a, "endColor", a.ZJ, a.EM);
- b.k(a, "startOpacity", a.EK, a.eN);
- b.k(a, "endOpacity", a.$J, a.FM);
- b.k(a, "vector", a.IK, a.iN)
- };
- b.zb = b.m.extend({
- hh: !1,
- sn: null,
- Mc: "Layer",
- ctor: function() {
- var a = b.m.prototype;
- a.ctor.call(this);
- this.rf = !0;
- a.Qj.call(this, 0.5, 0.5);
- a.wd.call(this, b.aa)
- },
- ga: function() {
- this.rf = !0;
- this.Qj(0.5, 0.5);
- this.wd(b.aa);
- this.cascadeColor = this.cascadeOpacity = !1;
- return ! 0
- },
- ez: null,
- wB: null,
- uV: function() {
- return this.hh
- },
- Ba: null
- });
- b.zb.create = function() {
- return new b.zb
- };
- if (b.da === b.Ya) {
- var F = b.zb.prototype;
- F.ez = function() {
- if (!this.hh) {
- this.hh = this.Ce = !0;
- this.Ok = this;
- for (var a = this.s,
- c = 0,
- d = a.length; c < d; c++) a[c].Ys(this);
- this.sn || (this.sn = new b.PB)
- }
- };
- F.wB = function() {
- if (this.hh) {
- this.hh = !1;
- this.Ce = !0;
- this.Ok = null;
- for (var a = this.s,
- c = 0,
- d = a.length; c < d; c++) a[c].Ys(null)
- }
- };
- F.Ba = function(a) {
- if (this.hh) {
- a = a || b.l;
- var c, d = this.s,
- e = d.length;
- if (this.Gc && 0 !== e) {
- var f = this.sn;
- a.save();
- this.transform(a);
- if (this.Ce) {
- c = this.Wr();
- c.width |= 0;
- c.height |= 0;
- var g = f.vn;
- f.IA(c.width, c.height);
- g.translate(0 - c.x, c.height + c.y);
- var h = f.qu();
- f.Ma(h.x + c.x, h.y + c.y);
- this.vc();
- b.view.By();
- for (c = 0; c < e; c++) d[c].Ba(g);
- b.view.oy();
- this.Ce = !1
- }
- f.Ba(a);
- this.arrivalOrder = 0;
- a.restore()
- }
- } else b.m.prototype.Ba.call(this, a)
- };
- F.Wr = function() {
- var a = null;
- if (!this.s || 0 === this.s.length) return E(0, 0, 10, 10);
- for (var c = this.s,
- d = 0; d < c.length; d++) {
- var e = c[d];
- e && e.Gc && (a ? (e = e.Zk()) && (a = b.Ip(a, e)) : a = e.Zk())
- }
- return a
- };
- F = null
- } else b.assert("function" === typeof b.p.wq, b.c.Gb, "CCLayerWebGL.js"),
- b.p.wq(),
- delete b.p.wq;
- b.Pb = b.zb.extend({
- t: null,
- Mc: "LayerColor",
- Ml: function() {
- return this.t
- },
- fS: function(a, c) {
- this.width = a;
- this.height = c
- },
- eS: function(a) {
- this.width = a
- },
- dS: function(a) {
- this.height = a
- },
- Ng: function() {},
- Dj: function() {
- return ! 1
- },
- V: function(a) {
- b.zb.prototype.V.call(this, a);
- this.Eb()
- },
- Ga: function(a) {
- b.zb.prototype.Ga.call(this, a);
- this.Eb()
- },
- cl: !1,
- ctor: null,
- ga: function(a, c, d) {
- b.da !== b.Ya && (this.shaderProgram = b.ff.Of(b.Wv));
- var e = b.Qa.Ql();
- a = a || b.color(0, 0, 0, 255);
- c = void 0 === c ? e.width: c;
- d = void 0 === d ? e.height: d;
- e = this.Q;
- e.r = a.r;
- e.g = a.g;
- e.b = a.b;
- e = this.ac;
- e.r = a.r;
- e.g = a.g;
- e.b = a.b;
- this.Md = this.sa = a.a;
- a = b.Pb.prototype;
- a.wd.call(this, c, d);
- a.Eb.call(this);
- return ! 0
- },
- $h: function(a, c) {
- this.t = void 0 === c ? a: {
- src: a,
- Y: c
- };
- b.da === b.Ya && (this.cl = this.t && 1 == this.t.src && 771 == this.t.Y)
- },
- Bf: null,
- Af: null,
- Eb: null,
- sb: function(a) {
- b.zb.prototype.sb.call(this, a);
- this.Eb()
- },
- kb: function(a) {
- b.zb.prototype.kb.call(this, a);
- this.Eb()
- },
- na: null
- });
- b.Pb.create = function(a, c, d) {
- return new b.Pb(a, c, d)
- };
- b.da === b.Ya ? (p = b.Pb.prototype, p.ctor = function(a, c, d) {
- b.zb.prototype.ctor.call(this);
- this.t = new b.cb(b.kc, b.jc);
- b.Pb.prototype.ga.call(this, a, c, d)
- },
- p.Bf = b.zb.prototype.Bf, p.Af = b.zb.prototype.Af, p.Eb = function() {},
- p.na = function(a) {
- a = a || b.l;
- var c = b.view,
- d = this.Q;
- a.fillStyle = "rgba(" + (0 | d.r) + "," + (0 | d.g) + "," + (0 | d.b) + "," + this.sa / 255 + ")";
- a.fillRect(0, 0, this.width * c.O, -this.height * c.ma);
- b.We++
- },
- p.Ba = function(a) {
- if (this.hh) {
- a = a || b.l;
- var c, d = this.s,
- e = d.length;
- if (this.Gc) {
- var f = this.sn;
- a.save();
- this.transform(a);
- if (this.Ce) {
- c = this.Wr();
- c.width |= 0;
- c.height |= 0;
- var g = f.vn;
- f.IA(c.width, c.height);
- var h = f.qu(),
- k = this.ja;
- if (this.rf) g.translate(0 - c.x + k.x, c.height + c.y - k.y),
- f.Ma(h.x + c.x - k.x, h.y + c.y - k.y);
- else {
- var m = this.qu(),
- n = k.x - m.x,
- k = k.y - m.y;
- g.translate(0 - c.x + n, c.height + c.y - k);
- f.Ma(h.x + c.x - n, h.y + c.y - k)
- }
- b.view.By();
- if (0 < e) {
- this.vc();
- for (c = 0; c < e; c++) if (h = d[c], 0 > h.Ia) h.Ba(g);
- else break;
- for (this.na(g); c < e; c++) d[c].Ba(g)
- } else this.na(g);
- b.view.oy();
- this.Ce = !1
- }
- f.Ba(a);
- this.arrivalOrder = 0;
- a.restore()
- }
- } else b.m.prototype.Ba.call(this, a)
- },
- p.Wr = function() {
- var a = E(0, 0, this.v.width, this.v.height),
- c = this.Bp(),
- a = b.Xu(a, this.Bp());
- if (!this.s || 0 === this.s.length) return a;
- for (var d = this.s,
- e = 0; e < d.length; e++) {
- var f = d[e];
- f && f.Gc && (f = f.Zk(c), a = b.Ip(a, f))
- }
- return a
- },
- p = null) : (b.assert("function" === typeof b.p.ir, b.c.Gb, "CCLayerWebGL.js"), b.p.ir(), delete b.p.ir);
- b.assert("function" === typeof b.p.Iq, b.c.Gb, "CCLayerPropertyDefine.js");
- b.p.Iq();
- delete b.p.Iq;
- b.Ug = b.Pb.extend({
- Ly: null,
- Bi: null,
- ej: 255,
- Ci: 255,
- cg: null,
- zn: !1,
- Mi: null,
- Li: null,
- Mc: "LayerGradient",
- ctor: function(a, c, d) {
- b.Pb.prototype.ctor.call(this);
- this.Ly = b.color(0, 0, 0, 255);
- this.Bi = b.color(0, 0, 0, 255);
- this.cg = C(0, -1);
- this.Ci = this.ej = 255;
- this.Mi = C(0, 0);
- this.Li = C(0, 0);
- b.Ug.prototype.ga.call(this, a, c, d)
- },
- ga: function(a, c, d) {
- a = a || b.color(0, 0, 0, 255);
- c = c || b.color(0, 0, 0, 255);
- d = d || C(0, -1);
- var e = this.Ly,
- f = this.Bi;
- e.r = a.r;
- e.g = a.g;
- e.b = a.b;
- this.ej = a.a;
- f.r = c.r;
- f.g = c.g;
- f.b = c.b;
- this.Ci = c.a;
- this.cg = d;
- this.zn = !0;
- this.Mi = C(0, 0);
- this.Li = C(0, 0);
- b.Pb.prototype.ga.call(this, b.color(a.r, a.g, a.b, 255));
- b.Ug.prototype.Eb.call(this);
- return ! 0
- },
- wd: function(a, c) {
- b.Pb.prototype.wd.call(this, a, c);
- this.Eb()
- },
- Bf: function(a) {
- b.Pb.prototype.Bf.call(this, a);
- this.Eb()
- },
- Af: function(a) {
- b.Pb.prototype.Af.call(this, a);
- this.Eb()
- },
- DK: function() {
- return this.ac
- },
- dN: function(a) {
- this.color = a
- },
- EM: function(a) {
- this.Bi = a;
- this.Eb()
- },
- ZJ: function() {
- return this.Bi
- },
- eN: function(a) {
- this.ej = a;
- this.Eb()
- },
- EK: function() {
- return this.ej
- },
- FM: function(a) {
- this.Ci = a;
- this.Eb()
- },
- $J: function() {
- return this.Ci
- },
- iN: function(a) {
- this.cg.x = a.x;
- this.cg.y = a.y;
- this.Eb()
- },
- IK: function() {
- return C(this.cg.x, this.cg.y)
- },
- wV: function() {
- return this.zn
- },
- $X: function(a) {
- this.zn = a;
- this.Eb()
- },
- XQ: null,
- Eb: null
- });
- b.Ug.create = function(a, c, d) {
- return new b.Ug(a, c, d)
- };
- b.da === b.Ya ? (p = b.Ug.prototype, p.na = function(a) {
- a = a || b.l;
- this.cl && (a.globalCompositeOperation = "lighter");
- a.save();
- var c = this.sa / 255,
- d = b.view.O,
- e = b.view.ma,
- f = this.width * d,
- g = this.height * e,
- d = a.createLinearGradient(this.Mi.x * d, this.Mi.y * e, this.Li.x * d, this.Li.y * e),
- e = this.Q,
- h = this.Bi;
- d.addColorStop(0, "rgba(" + Math.round(e.r) + "," + Math.round(e.g) + "," + Math.round(e.b) + "," + (this.ej / 255 * c).toFixed(4) + ")");
- d.addColorStop(1, "rgba(" + Math.round(h.r) + "," + Math.round(h.g) + "," + Math.round(h.b) + "," + (this.Ci / 255 * c).toFixed(4) + ")");
- a.fillStyle = d;
- a.fillRect(0, 0, f, -g);
- 0 != this.pR && a.rotate(this.qR);
- a.restore();
- b.We++
- },
- p.Eb = function() {
- var a = this.cg,
- c = 0.5 * this.width,
- d = 0.5 * this.height;
- this.Mi.x = c * -a.x + c;
- this.Mi.y = d * a.y - d;
- this.Li.x = c * a.x + c;
- this.Li.y = d * -a.y - d
- },
- p = null) : (b.assert("function" === typeof b.p.jr, b.c.Gb, "CCLayerWebGL.js"), b.p.jr(), delete b.p.jr);
- b.assert("function" === typeof b.p.Jq, b.c.Gb, "CCLayerPropertyDefine.js");
- b.p.Jq();
- delete b.p.Jq;
- b.Tm = b.zb.extend({
- eh: 0,
- Le: null,
- Mc: "LayerMultiplex",
- ctor: function(a) {
- b.zb.prototype.ctor.call(this);
- a instanceof Array ? b.Tm.prototype.aA.call(this, a) : b.Tm.prototype.aA.call(this, Array.prototype.slice.call(arguments))
- },
- aA: function(a) {
- 0 < a.length && null == a[a.length - 1] && b.log(b.c.MC);
- this.Le = a;
- this.eh = 0;
- this.N(this.Le[this.eh]);
- return ! 0
- },
- pZ: function(a) {
- a >= this.Le.length ? b.log(b.c.NC) : (this.removeChild(this.Le[this.eh], !0), this.eh = a, this.N(this.Le[a]))
- },
- qZ: function(a) {
- a >= this.Le.length ? b.log(b.c.OC) : (this.removeChild(this.Le[this.eh], !0), this.Le[this.eh] = null, this.eh = a, this.N(this.Le[a]))
- },
- DR: function(a) {
- a ? this.Le.push(a) : b.log(b.c.LC)
- }
- });
- b.Tm.create = function() {
- return new b.Tm(Array.prototype.slice.call(arguments))
- };
- b.p.kr = function() {
- var a = b.B.prototype;
- a.ot = function(a) {
- this.W(!0);
- this.Ha(a.pe(), a.qc, a.xj());
- this.Ub()
- };
- a.Ng = function(a) {
- this.Da !== a && (this.Da = a, this.om())
- };
- a.kb = function(a) {
- b.m.prototype.kb.call(this, a);
- this.om()
- };
- a.ctor = function(a, d, e) {
- b.m.prototype.ctor.call(this);
- this.xg = !1;
- this.Oa = C(0, 0);
- this.le = C(0, 0);
- this.t = {
- src: b.kc,
- Y: b.jc
- };
- this.F = E(0, 0, 0, 0);
- this.Pa = new b.Xa;
- this.wo = b.l.createBuffer();
- this.T = this.Dc = !0;
- this.Jy(a, d, e)
- };
- a.$h = function(a, d) {
- var e = this.t;
- void 0 === d ? (e.src = a.src, e.Y = a.Y) : (e.src = a, e.Y = d)
- };
- a.ga = function() {
- if (0 < arguments.length) return this.Tl(arguments[0], arguments[1]);
- b.m.prototype.ga.call(this);
- this.dirty = this.ge = !1;
- this.Da = !0;
- this.t.src = b.kc;
- this.t.Y = b.jc;
- this.texture = null;
- this.T = !0;
- this.gb = this.hb = !1;
- this.anchorY = this.anchorX = 0.5;
- this.Oa.x = 0;
- this.Oa.y = 0;
- this.Je = !1;
- var a = {
- r: 255,
- g: 255,
- b: 255,
- a: 255
- };
- this.Pa.wa.j = a;
- this.Pa.xa.j = a;
- this.Pa.ya.j = a;
- this.Pa.za.j = a;
- this.Dc = !0;
- this.Ha(E(0, 0, 0, 0), !1, D(0, 0));
- return ! 0
- };
- a.ia = function(a, d, e) {
- b.assert(0 != arguments.length, b.c.$D);
- e = e || !1;
- if (!b.m.prototype.ga.call(this)) return ! 1;
- this.ca = null;
- this.dirty = this.ge = !1;
- this.Da = !0;
- this.t.src = b.kc;
- this.t.Y = b.jc;
- this.gb = this.hb = !1;
- this.anchorY = this.anchorX = 0.5;
- this.Oa.x = 0;
- this.Oa.y = 0;
- this.Je = !1;
- var f = b.color(255, 255, 255, 255),
- g = this.Pa;
- g.wa.j = f;
- g.xa.j = f;
- g.ya.j = f;
- g.za.j = f;
- this.T = f = a.xb;
- if (!f) return this.nb = e || !1,
- d && (f = this.F, f.x = d.x, f.y = d.y, f.width = d.width, f.height = d.height),
- a.Vc(this.Oo, this),
- !0;
- d || (d = E(0, 0, a.width, a.height));
- a && a.url && (e ? (f = d.x + d.height, g = d.y + d.width) : (f = d.x + d.width, g = d.y + d.height), f > a.width && b.error(b.c.Pq, a.url), g > a.height && b.error(b.c.Oq, a.url));
- this.texture = a;
- this.Ha(d, e);
- this.batchNode = null;
- return this.Dc = !0
- };
- a.Oo = function(a) {
- if (!this.T) {
- this.T = !0;
- var d = this.F;
- d ? b.Ns(d) && (d.width = a.width, d.height = a.height) : d = E(0, 0, a.width, a.height);
- this.texture = a;
- this.Ha(d, this.nb);
- this.batchNode = this.ca;
- this.Dc = !0;
- this.Ub()
- }
- };
- a.Ha = function(a, d, e) {
- this.nb = d || !1;
- this.wd(e || a);
- this.iv(a);
- this.Dy(a);
- a = this.le;
- this.gb && (a.x = -a.x);
- this.hb && (a.y = -a.y);
- var f = this.F;
- this.Oa.x = a.x + (this.v.width - f.width) / 2;
- this.Oa.y = a.y + (this.v.height - f.height) / 2;
- if (this.ca) this.dirty = !0;
- else {
- a = 0 + this.Oa.x;
- d = 0 + this.Oa.y;
- e = a + f.width;
- var f = d + f.height,
- g = this.Pa;
- g.wa.e = {
- x: a,
- y: d,
- z: 0
- };
- g.xa.e = {
- x: e,
- y: d,
- z: 0
- };
- g.ya.e = {
- x: a,
- y: f,
- z: 0
- };
- g.za.e = {
- x: e,
- y: f,
- z: 0
- };
- this.Dc = !0
- }
- };
- a.$c = function() {
- if (this.dirty) {
- var a = this.Pa,
- d = this.Db;
- if (!this.Gc || d && d != this.ca && d.xg) a.xa.e = a.ya.e = a.za.e = a.wa.e = {
- x: 0,
- y: 0,
- z: 0
- },
- this.xg = !0;
- else {
- this.xg = !1;
- var e = this.xh = d && d != this.ca ? b.Eh(this.Yl(), d.xh) : this.Yl(),
- f = this.F,
- d = this.Oa.x,
- g = this.Oa.y,
- h = d + f.width,
- k = g + f.height,
- m = e.Z,
- n = e.$,
- r = e.a,
- s = e.b,
- u = e.P,
- t = -e.J,
- e = d * r - g * t + m,
- f = d * s + g * u + n,
- v = h * r - g * t + m,
- g = h * s + g * u + n,
- w = h * r - k * t + m,
- h = h * s + k * u + n,
- m = d * r - k * t + m,
- d = d * s + k * u + n,
- k = this.Wo;
- b.Yv || (e |= 0, f |= 0, v |= 0, g |= 0, w |= 0, h |= 0, m |= 0, d |= 0);
- a.wa.e = {
- x: e,
- y: f,
- z: k
- };
- a.xa.e = {
- x: v,
- y: g,
- z: k
- };
- a.ya.e = {
- x: m,
- y: d,
- z: k
- };
- a.za.e = {
- x: w,
- y: h,
- z: k
- }
- }
- this.textureAtlas.Up(a, this.atlasIndex);
- this.dirty = this.ge = !1
- }
- this.Je && this.Gd(this.s, b.m.bd.$c);
- b.Uf && b.Hd.gc([C(this.Pa.wa.e.x, this.Pa.wa.e.y), C(this.Pa.xa.e.x, this.Pa.xa.e.y), C(this.Pa.za.e.x, this.Pa.za.e.y), C(this.Pa.ya.e.x, this.Pa.ya.e.y)], 4, !0)
- };
- a.N = function(a, d, e) {
- b.assert(a, b.c.RD);
- null == d && (d = a.Ia);
- null == e && (e = a.tag);
- if (this.ca) {
- if (! (a instanceof b.B)) {
- b.log(b.c.PD);
- return
- }
- a.texture.Ah !== this.textureAtlas.texture.Ah && b.log(b.c.QD);
- this.ca.appendChild(a);
- this.bc || this.ft()
- }
- b.m.prototype.N.call(this, a, d, e);
- this.Je = !0
- };
- a.Ga = function(a) {
- b.m.prototype.Ga.call(this, a);
- this.om()
- };
- a.V = function(a) {
- b.m.prototype.V.call(this, a);
- this.om()
- };
- a.sb = function(a) {
- b.m.prototype.sb.call(this, a);
- this.om()
- };
- a.Pg = function(a) {
- var d = this;
- "string" == typeof a && (a = b.ue.Ye(a), b.assert(a, b.c.iE));
- d.W(!0);
- var e = a.wu();
- d.le.x = e.x;
- d.le.y = e.y;
- e = a.La();
- a.T || (d.T = !1, a.Vc(function(a) {
- d.T = !0;
- var c = a.La();
- c != d.ea && (d.texture = c);
- d.Ha(a.pe(), a.qc, a.xj());
- d.Ub()
- },
- d));
- e != d.ea && (d.texture = e);
- d.nb = a.qc;
- d.Ha(a.pe(), d.nb, a.xj())
- };
- a.jA = function(a) {
- return b.AA(a.pe(), this.F) && a.La().getName() == this.ea.getName() && b.NL(a.wu(), this.le)
- };
- a.cv = function(a) {
- if (this.ca = a) this.xh = {
- a: 1,
- b: 0,
- J: 0,
- P: 1,
- Z: 0,
- $: 0
- },
- this.textureAtlas = this.ca.textureAtlas;
- else {
- this.atlasIndex = b.B.sq;
- this.textureAtlas = null;
- this.dirty = this.ge = !1;
- a = this.Oa.x;
- var d = this.Oa.y,
- e = a + this.F.width,
- f = d + this.F.height,
- g = this.Pa;
- g.wa.e = {
- x: a,
- y: d,
- z: 0
- };
- g.xa.e = {
- x: e,
- y: d,
- z: 0
- };
- g.ya.e = {
- x: a,
- y: f,
- z: 0
- };
- g.za.e = {
- x: e,
- y: f,
- z: 0
- };
- this.Dc = !0
- }
- };
- a.Wa = function(a) {
- a && "string" === typeof a ? (a = b.va.cc(a), this.Wa(a), a = a.ud(), this.Ha(E(0, 0, a.width, a.height))) : (b.assert(!a || a instanceof b.K, b.c.kE), this.ca && this.ca.texture != a ? b.log(b.c.jE) : (this.shaderProgram = a ? b.ff.Of(b.Wq) : b.ff.Of(b.Wv), this.ca || this.ea == a || (this.ea = a, this.yh())))
- };
- a.na = function() {
- if (this.T) {
- var a = b.l,
- d = this.ea;
- d ? d.xb && (this.Jb.wc(), this.Jb.xd(), b.Ph(this.t.src, this.t.Y), b.iV(0, d), b.tc(b.gn), a.bindBuffer(a.ARRAY_BUFFER, this.wo), this.Dc && (a.bufferData(a.ARRAY_BUFFER, this.Pa.Xo, a.DYNAMIC_DRAW), this.Dc = !1), a.vertexAttribPointer(0, 3, a.FLOAT, !1, 24, 0), a.vertexAttribPointer(1, 4, a.UNSIGNED_BYTE, !0, 24, 12), a.vertexAttribPointer(2, 2, a.FLOAT, !1, 24, 16), a.drawArrays(a.TRIANGLE_STRIP, 0, 4)) : (this.Jb.wc(), this.Jb.xd(), b.Ph(this.t.src, this.t.Y), b.qe(null), b.tc(b.Lc | b.cr), a.bindBuffer(a.ARRAY_BUFFER, this.wo), this.Dc && (b.l.bufferData(b.l.ARRAY_BUFFER, this.Pa.Xo, b.l.STATIC_DRAW), this.Dc = !1), a.vertexAttribPointer(b.lc, 3, a.FLOAT, !1, 24, 0), a.vertexAttribPointer(b.Ck, 4, a.UNSIGNED_BYTE, !0, 24, 12), a.drawArrays(a.TRIANGLE_STRIP, 0, 4));
- b.We++;
- if (0 !== b.Uf || this.jt) 1 === b.Uf || this.jt ? (a = this.Pa, b.Hd.gc([C(a.ya.e.x, a.ya.e.y), C(a.wa.e.x, a.wa.e.y), C(a.xa.e.x, a.xa.e.y), C(a.za.e.x, a.za.e.y)], 4, !0)) : 2 === b.Uf && (a = this.Pz(), d = this.qK(), b.Hd.gc([C(d.x, d.y), C(d.x + a.width, d.y), C(d.x + a.width, d.y + a.height), C(d.x, d.y + a.height)], 4, !0))
- }
- };
- delete a
- };
- b.p.Kq = function() {
- var a = b.B.prototype;
- b.k(a, "opacityModifyRGB", a.Dj, a.Ng);
- b.k(a, "opacity", a.wj, a.Ga);
- b.k(a, "color", a.Nh, a.V);
- b.k(a, "flippedX", a.$K, a.GM);
- b.k(a, "flippedY", a.aL, a.HM);
- b.k(a, "offsetX", a.iG);
- b.k(a, "offsetY", a.jG);
- b.k(a, "texture", a.La, a.Wa);
- b.k(a, "textureRectRotated", a.eL);
- b.k(a, "batchNode", a.QJ, a.cv);
- b.k(a, "quad", a.vK)
- };
- b.tj = function(a, c, d, e) {
- e = e || b.rb("canvas");
- d = d || E(0, 0, a.width, a.height);
- var f = e.getContext("2d");
- e.width != d.width || e.height != d.height ? (e.width = d.width, e.height = d.height) : f.globalCompositeOperation = "source-over";
- f.fillStyle = "rgb(" + c.r + "," + c.g + "," + c.b + ")";
- f.fillRect(0, 0, d.width, d.height);
- f.globalCompositeOperation = "multiply";
- f.drawImage(a, d.x, d.y, d.width, d.height, 0, 0, d.width, d.height);
- f.globalCompositeOperation = "destination-atop";
- f.drawImage(a, d.x, d.y, d.width, d.height, 0, 0, d.width, d.height);
- return e
- };
- b.sj = function(a, c, d, e, f) {
- e || (e = E(0, 0, a.width, a.height));
- a = d.r / 255;
- var g = d.g / 255;
- d = d.b / 255;
- var h = Math.min(e.width, c[0].width),
- k = Math.min(e.height, c[0].height),
- m;
- f ? (m = f.getContext("2d"), m.clearRect(0, 0, h, k)) : (f = b.rb("canvas"), f.width = h, f.height = k, m = f.getContext("2d"));
- m.save();
- m.globalCompositeOperation = "lighter";
- var n = m.globalAlpha;
- 0 < a && (m.globalAlpha = a * n, m.drawImage(c[0], e.x, e.y, h, k, 0, 0, h, k));
- 0 < g && (m.globalAlpha = g * n, m.drawImage(c[1], e.x, e.y, h, k, 0, 0, h, k));
- 0 < d && (m.globalAlpha = d * n, m.drawImage(c[2], e.x, e.y, h, k, 0, 0, h, k));
- 1 > a + g + d && (m.globalAlpha = n, m.drawImage(c[3], e.x, e.y, h, k, 0, 0, h, k));
- m.restore();
- return f
- };
- b.rj = function(a) {
- function c() {
- var c = b.rj,
- e = a.width,
- h = a.height;
- d[0].width = e;
- d[0].height = h;
- d[1].width = e;
- d[1].height = h;
- d[2].width = e;
- d[2].height = h;
- d[3].width = e;
- d[3].height = h;
- c.canvas.width = e;
- c.canvas.height = h;
- var k = c.canvas.getContext("2d");
- k.drawImage(a, 0, 0);
- c.mv.width = e;
- c.mv.height = h;
- for (var k = k.getImageData(0, 0, e, h).data, m = 0; 4 > m; m++) {
- var n = d[m].getContext("2d");
- n.getImageData(0, 0, e, h).data;
- c.qB.drawImage(a, 0, 0);
- for (var r = c.qB.getImageData(0, 0, e, h), s = r.data, u = 0; u < k.length; u += 4) s[u] = 0 === m ? k[u] : 0,
- s[u + 1] = 1 === m ? k[u + 1] : 0,
- s[u + 2] = 2 === m ? k[u + 2] : 0,
- s[u + 3] = k[u + 3];
- n.putImageData(r, 0, 0)
- }
- a.onload = null
- }
- if (a.nz) return a.nz;
- var d = [b.rb("canvas"), b.rb("canvas"), b.rb("canvas"), b.rb("canvas")];
- try {
- c()
- } catch(e) {
- a.onload = c
- }
- return a.nz = d
- };
- b.rj.canvas = b.rb("canvas");
- b.rj.mv = b.rb("canvas");
- b.rj.qB = b.rj.mv.getContext("2d");
- b.fu = function(a, c) {
- if (!a) return null;
- if (!c) return a;
- var d = b.rb("canvas");
- d.width = c.width;
- d.height = c.height;
- var e = d.getContext("2d");
- e.translate(d.width / 2, d.height / 2);
- e.rotate( - 1.5707963267948966);
- e.drawImage(a, c.x, c.y, c.height, c.width, -c.height / 2, -c.width / 2, c.height, c.width);
- return d
- };
- b.B = b.m.extend({
- dirty: !1,
- atlasIndex: 0,
- textureAtlas: null,
- ca: null,
- ge: null,
- Je: null,
- xg: !1,
- xh: null,
- t: null,
- ea: null,
- F: null,
- nb: !1,
- Oa: null,
- le: null,
- Da: !1,
- gb: !1,
- hb: !1,
- T: !1,
- qa: null,
- lo: null,
- Mc: "Sprite",
- Tx: b.color.WHITE,
- nv: function() {
- return this.T
- },
- Vc: function(a, c) {
- this.qa || (this.qa = []);
- this.qa.push({
- ne: a,
- td: c
- })
- },
- Ub: function() {
- if (this.qa) {
- for (var a = this.qa,
- c = 0,
- d = a.length; c < d; c++) {
- var e = a[c];
- e.ne.call(e.td, this)
- }
- a.length = 0
- }
- },
- iA: function() {
- return this.dirty
- },
- XA: function(a) {
- this.dirty = a
- },
- eL: function() {
- return this.nb
- },
- HT: function() {
- return this.atlasIndex
- },
- WX: function(a) {
- this.atlasIndex = a
- },
- Pz: function() {
- return E(this.F.x, this.F.y, this.F.width, this.F.height)
- },
- Oz: function() {
- return this.textureAtlas
- },
- hB: function(a) {
- this.textureAtlas = a
- },
- qK: function() {
- return C(this.Oa)
- },
- iG: function() {
- return this.Oa.x
- },
- jG: function() {
- return this.Oa.y
- },
- Ml: function() {
- return this.t
- },
- $e: function(a) {
- b.assert(a, b.c.XD);
- a.T || (this.T = !1, a.Vc(this.ot, this));
- var c = b.da === b.Ya ? !1 : a.qc,
- c = this.ia(a.La(), a.pe(), c);
- this.Pg(a);
- return c
- },
- ot: null,
- pV: function(a) {
- b.assert(a, b.c.YD);
- var c = b.ue.Ye(a);
- b.assert(c, a + b.c.ZD);
- return this.$e(c)
- },
- zZ: function(a) {
- this.textureAtlas = a.textureAtlas;
- this.ca = a
- },
- iv: function(a) {
- this.F.x = a.x;
- this.F.y = a.y;
- this.F.width = a.width;
- this.F.height = a.height
- },
- vc: function() {
- if (this.bc) {
- var a = this.s,
- c = a.length,
- d, e, f;
- for (d = 1; d < c; d++) {
- f = a[d];
- for (e = d - 1; 0 <= e;) {
- if (f.Ia < a[e].Ia) a[e + 1] = a[e];
- else if (f.Ia === a[e].Ia && f.arrivalOrder < a[e].arrivalOrder) a[e + 1] = a[e];
- else break;
- e--
- }
- a[e + 1] = f
- }
- this.ca && this.Gd(a, b.m.bd.vc);
- this.bc = !1
- }
- },
- im: function(a, c) {
- b.assert(a, b.c.dE); - 1 === this.s.indexOf(a) ? b.log(b.c.cE) : c !== a.zIndex && (this.ca && !this.bc && (this.ft(), this.ca.FA(!0)), b.m.prototype.im.call(this, a, c))
- },
- removeChild: function(a, c) {
- this.ca && this.ca.Xh(a);
- b.m.prototype.removeChild.call(this, a, c)
- },
- te: function(a) {
- b.m.prototype.te.call(this, a);
- this.dv(!0)
- },
- df: function(a) {
- var c = this.s,
- d = this.ca;
- if (d && null != c) for (var e = 0,
- f = c.length; e < f; e++) d.Xh(c[e]);
- b.m.prototype.df.call(this, a);
- this.Je = !1
- },
- dv: function(a) {
- this.dirty = this.ge = a;
- a = this.s;
- for (var c, d = a ? a.length: 0, e = 0; e < d; e++) c = a[e],
- c instanceof b.B && c.dv(!0)
- },
- W: function(a) {
- b.m.prototype.W.call(this);
- a || !this.ca || this.ge || (this.Je ? this.dv(!0) : this.dirty = this.ge = !0)
- },
- Gu: function(a) {
- this.ca ? b.log(b.c.VD) : b.m.prototype.Gu.call(this, a)
- },
- GM: function(a) {
- this.gb != a && (this.gb = a, this.Ha(this.F, this.nb, this.v), this.W(!0))
- },
- HM: function(a) {
- this.hb != a && (this.hb = a, this.Ha(this.F, this.nb, this.v), this.W(!0))
- },
- $K: function() {
- return this.gb
- },
- aL: function() {
- return this.hb
- },
- Ng: null,
- Dj: function() {
- return this.Da
- },
- kb: null,
- iY: function(a, c) {
- b.assert(a, b.c.hE);
- var d = b.Fh.np(a);
- d ? (d = d.$b[c]) ? this.Pg(d.Ye()) : b.log(b.c.gE) : b.log(b.c.fE)
- },
- QJ: function() {
- return this.ca
- },
- ft: function() {
- if (!this.bc) {
- this.bc = !0;
- for (var a = this.Db; a && a != this.ca;) a.ft(),
- a = a.parent
- }
- },
- La: function() {
- return this.ea
- },
- Pa: null,
- wo: null,
- Dc: !1,
- yn: !1,
- cl: !1,
- mb: null,
- ij: null,
- Fw: null,
- ctor: null,
- Jy: function(a, c, d) {
- if (void 0 === a) b.B.prototype.ga.call(this);
- else if ("string" === typeof a)"#" === a[0] ? (a = b.ue.Ye(a.substr(1, a.length - 1)), this.$e(a)) : b.B.prototype.ga.call(this, a, c);
- else if ("object" === typeof a) if (a instanceof b.K) this.ia(a, c, d);
- else if (a instanceof b.zc) this.$e(a);
- else if (a instanceof HTMLImageElement || a instanceof HTMLCanvasElement) c = new b.K,
- c.Mb(a),
- c.Fa(),
- this.ia(c)
- },
- vK: function() {
- return this.Pa
- },
- $h: null,
- ga: null,
- Tl: function(a, c) {
- b.assert(a, b.c.WD);
- var d = b.va.lm(a);
- if (d) {
- if (!c) {
- var e = d.ud();
- c = E(0, 0, e.width, e.height)
- }
- return this.ia(d, c)
- }
- d = b.va.cc(a);
- return this.ia(d, c || E(0, 0, d.v.width, d.v.height))
- },
- ia: null,
- Oo: null,
- Ha: null,
- $c: null,
- N: null,
- om: function() {
- var a = this.Q,
- c = this.sa,
- a = {
- r: a.r,
- g: a.g,
- b: a.b,
- a: c
- };
- this.Da && (a.r *= c / 255, a.g *= c / 255, a.b *= c / 255);
- c = this.Pa;
- c.wa.j = a;
- c.xa.j = a;
- c.ya.j = a;
- c.za.j = a;
- this.ca && (this.atlasIndex != b.B.sq ? this.textureAtlas.Up(c, this.atlasIndex) : this.dirty = !0);
- this.Dc = !0
- },
- Ga: null,
- V: null,
- sb: null,
- Pg: null,
- hY: function(a) {
- b.log(b.c.eE);
- this.Pg(a)
- },
- jA: null,
- cJ: function() {
- return b.zc.create(this.ea, b.gm(this.F), this.nb, b.PL(this.le), b.rN(this.v))
- },
- cv: null,
- Wa: null,
- yh: function() {
- this.ca ? b.log(b.c.OD) : this.ea && this.ea.Aj() ? (this.t.src = b.kc, this.t.Y = b.jc, this.opacityModifyRGB = !0) : (this.t.src = b.SRC_ALPHA, this.t.Y = b.ONE_MINUS_SRC_ALPHA, this.opacityModifyRGB = !1)
- },
- fd: function() {
- var a, c = this.ea,
- d = this.ij;
- c && d.Xj && this.mb && (a = c.la) && (this.yn = !0, a instanceof HTMLCanvasElement && !this.nb && !this.lo ? b.tj(this.mb.la, this.Q, d, a) : (a = b.tj(this.mb.la, this.Q, d), c = new b.K, c.Mb(a), c.Fa(), this.texture = c))
- },
- Dy: function(a) {
- a = b.gm(a);
- var c = this.ca ? this.textureAtlas.texture: this.ea;
- if (c) {
- var d = c.pixelsWidth,
- e = c.pixelsHeight,
- f, g = this.Pa;
- this.nb ? (b.vk ? (c = (2 * a.x + 1) / (2 * d), d = c + (2 * a.height - 2) / (2 * d), f = (2 * a.y + 1) / (2 * e), a = f + (2 * a.width - 2) / (2 * e)) : (c = a.x / d, d = (a.x + a.height) / d, f = a.y / e, a = (a.y + a.width) / e), this.gb && (e = f, f = a, a = e), this.hb && (e = c, c = d, d = e), g.wa.f.R = c, g.wa.f.S = f, g.xa.f.R = c, g.xa.f.S = a, g.ya.f.R = d, g.ya.f.S = f, g.za.f.R = d, g.za.f.S = a) : (b.vk ? (c = (2 * a.x + 1) / (2 * d), d = c + (2 * a.width - 2) / (2 * d), f = (2 * a.y + 1) / (2 * e), a = f + (2 * a.height - 2) / (2 * e)) : (c = a.x / d, d = (a.x + a.width) / d, f = a.y / e, a = (a.y + a.height) / e), this.gb && (e = c, c = d, d = e), this.hb && (e = f, f = a, a = e), g.wa.f.R = c, g.wa.f.S = a, g.xa.f.R = d, g.xa.f.S = a, g.ya.f.R = c, g.ya.f.S = f, g.za.f.R = d, g.za.f.S = f);
- this.Dc = !0
- }
- },
- na: null
- });
- b.B.create = function(a, c, d) {
- return new b.B(a, c, d)
- };
- b.B.eu = b.B.create;
- b.B.qS = b.B.create;
- b.B.pS = b.B.create;
- b.B.sq = -1;
- b.da === b.Ya ? (p = b.B.prototype, p.ot = function(a) {
- this.W(!0);
- this.Ha(a.pe(), a.qc, a.xj());
- a = this.color;
- 255 === a.r && 255 === a.g && 255 === a.b || this.fd();
- this.Ub()
- },
- p.Ng = function(a) {
- this.Da !== a && (this.Da = a, this.W(!0))
- },
- p.kb = function(a) {
- b.m.prototype.kb.call(this, a);
- this.aj()
- },
- p.ctor = function(a, c, d) {
- b.m.prototype.ctor.call(this);
- this.xg = !1;
- this.Oa = C(0, 0);
- this.le = C(0, 0);
- this.t = {
- src: b.kc,
- Y: b.jc
- };
- this.F = E(0, 0, 0, 0);
- this.lo = !1;
- this.T = !0;
- this.ij = {
- x: 0,
- y: 0,
- width: 0,
- height: 0,
- Xj: !1
- };
- this.Fw = D(0, 0);
- this.Jy(a, c, d)
- },
- p.$h = function(a, c) {
- var d = this.t;
- void 0 === c ? (d.src = a.src, d.Y = a.Y) : (d.src = a, d.Y = c);
- this.cl = d && (d.src == b.SRC_ALPHA && d.Y == b.ONE || d.src == b.ONE && d.Y == b.ONE)
- },
- p.ga = function() {
- if (0 < arguments.length) return this.Tl(arguments[0], arguments[1]);
- b.m.prototype.ga.call(this);
- this.dirty = this.ge = !1;
- this.Da = !0;
- this.t.src = b.kc;
- this.t.Y = b.jc;
- this.texture = null;
- this.T = !0;
- this.gb = this.hb = !1;
- this.anchorY = this.anchorX = 0.5;
- this.Oa.x = 0;
- this.Oa.y = 0;
- this.Je = !1;
- this.Ha(E(0, 0, 0, 0), !1, D(0, 0));
- return ! 0
- },
- p.ia = function(a, c, d) {
- b.assert(0 != arguments.length, b.c.TB);
- if ((d = d || !1) && a.xb) {
- var e = a.la,
- e = b.fu(e, c),
- f = new b.K;
- f.Mb(e);
- f.Fa();
- a = f;
- this.F = E(0, 0, c.width, c.height)
- }
- if (!b.m.prototype.ga.call(this)) return ! 1;
- this.ca = null;
- this.dirty = this.ge = !1;
- this.Da = !0;
- this.t.src = b.kc;
- this.t.Y = b.jc;
- this.gb = this.hb = !1;
- this.anchorY = this.anchorX = 0.5;
- this.Oa.x = 0;
- this.Oa.y = 0;
- this.Je = !1;
- this.T = e = a.xb;
- if (!e) return this.nb = d,
- c && (this.F.x = c.x, this.F.y = c.y, this.F.width = c.width, this.F.height = c.height),
- a.Vc(this.Oo, this),
- !0;
- c || (c = E(0, 0, a.width, a.height));
- a && a.url && (e = c.y + c.height, c.x + c.width > a.width && b.error(b.c.Pq, a.url), e > a.height && b.error(b.c.Oq, a.url));
- this.texture = this.mb = a;
- this.Ha(c, d);
- this.batchNode = null;
- return ! 0
- },
- p.Oo = function(a) {
- if (!this.T) {
- this.T = !0;
- var c = this.F;
- c ? b.Ns(c) && (c.width = a.width, c.height = a.height) : c = E(0, 0, a.width, a.height);
- this.texture = this.mb = a;
- this.Ha(c, this.nb);
- a = this.Q;
- 255 == a.r && 255 == a.g && 255 == a.b || this.fd();
- this.batchNode = this.ca;
- this.Ub()
- }
- },
- p.Ha = function(a, c, d) {
- this.nb = c || !1;
- this.wd(d || a);
- this.iv(a);
- c = this.ij;
- d = b.Ka();
- c.x = 0 | a.x * d;
- c.y = 0 | a.y * d;
- c.width = 0 | a.width * d;
- c.height = 0 | a.height * d;
- c.Xj = !(0 === c.width || 0 === c.height || 0 > c.x || 0 > c.y);
- a = this.le;
- this.gb && (a.x = -a.x);
- this.hb && (a.y = -a.y);
- this.Oa.x = a.x + (this.v.width - this.F.width) / 2;
- this.Oa.y = a.y + (this.v.height - this.F.height) / 2;
- this.ca && (this.dirty = !0)
- },
- p.$c = function() {
- if (this.dirty) {
- var a = this.Db; ! this.Gc || a && a != this.ca && a.xg ? this.xg = !0 : (this.xg = !1, this.xh = a && a != this.ca ? b.Eh(this.Yl(), a.xh) : this.Yl());
- this.dirty = this.ge = !1
- }
- this.Je && this.Gd(this.s, b.m.bd.$c)
- },
- p.N = function(a, c, d) {
- b.assert(a, b.c.RB);
- null == c && (c = a.Ia);
- null == d && (d = a.tag);
- b.m.prototype.N.call(this, a, c, d);
- this.Je = !0
- },
- p.Ga = function(a) {
- b.m.prototype.Ga.call(this, a);
- this.aj()
- },
- p.V = function(a) {
- var c = this.color;
- this.Tx = c;
- c.r === a.r && c.g === a.g && c.b === a.b || b.m.prototype.V.call(this, a)
- },
- p.sb = function(a) {
- b.m.prototype.sb.call(this, a);
- a = this.Tx;
- var c = this.Q;
- if (a.r !== c.r || a.g !== c.g || a.b !== c.b) this.fd(),
- this.aj()
- },
- p.Pg = function(a) {
- var c = this;
- "string" == typeof a && (a = b.ue.Ye(a), b.assert(a, b.c.WB));
- c.W(!0);
- var d = a.wu();
- c.le.x = d.x;
- c.le.y = d.y;
- c.nb = a.qc;
- var d = a.La(),
- e = a.T;
- e || (c.T = !1, a.Vc(function(a) {
- c.T = !0;
- var d = a.La();
- d != c.ea && (c.texture = d);
- c.Ha(a.pe(), a.qc, a.xj());
- c.Ub()
- },
- c));
- d != c.ea && (c.texture = d);
- c.nb && (c.mb = d);
- c.Ha(a.pe(), c.nb, a.xj());
- c.yn = !1;
- e && (a = c.color, 255 === a.r && 255 === a.g && 255 === a.b || c.fd())
- },
- p.jA = function(a) {
- return a.La() != this.ea ? !1 : b.AA(a.pe(), this.F)
- },
- p.cv = function(a) { (this.ca = a) ? (this.xh = {
- a: 1,
- b: 0,
- J: 0,
- P: 1,
- Z: 0,
- $: 0
- },
- this.textureAtlas = this.ca.textureAtlas) : (this.atlasIndex = b.B.sq, this.textureAtlas = null, this.dirty = this.ge = !1)
- },
- p.Wa = function(a) {
- a && "string" === typeof a ? (a = b.va.cc(a), this.Wa(a), a = a.ud(), this.Ha(E(0, 0, a.width, a.height))) : (b.assert(!a || a instanceof b.K, b.c.XB), this.ea != a && (a && a.la instanceof HTMLImageElement && (this.mb = a), this.ea = a))
- },
- p.na = function(a) {
- if (this.T) {
- a = a || b.l;
- this.cl && (a.globalCompositeOperation = "lighter");
- var c = b.view.O,
- d = b.view.ma;
- a.globalAlpha = this.sa / 255;
- var e = this.F,
- f = this.v,
- g = this.Oa,
- h = this.Fw,
- k = 0 | g.x,
- m = -g.y - e.height,
- n = this.ij;
- h.width = e.width * c;
- h.height = e.height * d;
- if (this.gb || this.hb) a.save(),
- this.gb && (k = -g.x - e.width, a.scale( - 1, 1)),
- this.hb && (m = g.y, a.scale(1, -1));
- k *= c;
- m *= d;
- this.ea && n.Xj ? (f = this.ea.la, this.yn ? a.drawImage(f, 0, 0, n.width, n.height, k, m, h.width, h.height) : a.drawImage(f, n.x, n.y, n.width, n.height, k, m, h.width, h.height)) : !this.ea && n.Xj && (h = this.color, a.fillStyle = "rgba(" + h.r + "," + h.g + "," + h.b + ",1)", a.fillRect(k, m, f.width * c, f.height * d));
- 1 === b.Uf || this.jt ? (a.strokeStyle = "rgba(0,255,0,1)", k /= c, m = -(m / d), b.Hd.gc([C(k, m), C(k + e.width, m), C(k + e.width, m - e.height), C(k, m - e.height)], 4, !0)) : 2 === b.Uf && (a.strokeStyle = "rgba(0,255,0,1)", c = this.F, m = -m, b.Hd.gc([C(k, m), C(k + c.width, m), C(k + c.width, m - c.height), C(k, m - c.height)], 4, !0)); (this.gb || this.hb) && a.restore();
- b.We++
- }
- },
- b.Aa.wt || (p.fd = function() {
- var a, c = this.ea,
- d = this.ij;
- c && d.Xj && this.mb && (a = c.la) && (c = b.va.zu(this.mb.la)) && (this.yn = !0, a instanceof HTMLCanvasElement && !this.nb && !this.lo ? b.sj(a, c, this.Q, d, a) : (a = b.sj(a, c, this.Q, d), c = new b.K, c.Mb(a), c.Fa(), this.texture = c))
- }), delete p) : (b.assert("function" === typeof b.p.kr, b.c.Gb, "SpritesWebGL.js"), b.p.kr(), delete b.p.kr);
- b.assert("function" === typeof b.p.Kq, b.c.Gb, "SpritesPropertyDefine.js");
- b.p.Kq();
- delete b.p.Kq;
- b.iq = 29;
- b.Vf = b.m.extend({
- textureAtlas: null,
- t: null,
- Xb: null,
- Mc: "SpriteBatchNode",
- IR: function(a, c, d) {
- b.assert(a, b.c.ID);
- if (! (a instanceof b.B)) return b.log(b.c.HD),
- null;
- a.atlasIndex = c;
- var e = 0,
- f = this.Xb;
- if (f && 0 < f.length) for (var g = 0; g < f.length; g++) {
- var h = f[g];
- h && h.atlasIndex >= c && ++e
- }
- f.splice(e, 0, a);
- b.m.prototype.N.call(this, a, c, d);
- this.FA(!1);
- return this
- },
- Oz: function() {
- return this.textureAtlas
- },
- hB: function(a) {
- a != this.textureAtlas && (this.textureAtlas = a)
- },
- XJ: function() {
- return this.Xb
- },
- Tl: function(a, c) {
- var d = b.va.lm(a);
- d || (d = b.va.cc(a));
- return this.ia(d, c)
- },
- aj: function() {
- this.Ce = !0
- },
- ga: function(a, c) {
- var d = b.va.lm(a);
- d || (d = b.va.cc(a));
- return this.ia(d, c)
- },
- tp: function() {
- var a = this.textureAtlas.capacity,
- c = Math.floor(4 * (a + 1) / 3);
- b.log(b.c.JD, a, c);
- this.textureAtlas.JA(c) || b.log(b.c.KD)
- },
- wX: function(a, c) {
- this.removeChild(this.s[a], c)
- },
- yA: function(a, c) {
- var d = a.children;
- if (d && 0 < d.length) for (var e = 0; e < d.length; e++) {
- var f = d[e];
- f && 0 > f.zIndex && (c = this.yA(f, c))
- } ! a == this && (a.atlasIndex = c, c++);
- if (d && 0 < d.length) for (e = 0; e < d.length; e++)(f = d[e]) && 0 <= f.zIndex && (c = this.yA(f, c));
- return c
- },
- Fu: function(a) {
- var c = a.children;
- return c && 0 != c.length ? this.Fu(c[c.length - 1]) : a.atlasIndex
- },
- vL: function(a) {
- var c = a.children;
- return c && 0 != c.length ? this.vL(c[c.length - 1]) : a.atlasIndex
- },
- BI: function(a, c) {
- var d = a.parent,
- e = d.children,
- f = e.indexOf(a),
- g = null;
- 0 < f && f < b.RE && (g = e[f - 1]);
- return d == this ? 0 == f ? 0 : this.Fu(g) + 1 : 0 == f ? 0 > c ? d.atlasIndex: d.atlasIndex + 1 : 0 > g.zIndex && 0 > c || 0 <= g.zIndex && 0 <= c ? this.Fu(g) + 1 : d.atlasIndex + 1
- },
- FA: function(a) {
- this.bc = a
- },
- $h: function(a, c) {
- this.t = void 0 === c ? a: {
- src: a,
- Y: c
- }
- },
- Ml: function() {
- return this.t
- },
- im: function(a, c) {
- b.assert(a, b.c.ND); - 1 === this.s.indexOf(a) ? b.log(b.c.MD) : c !== a.zIndex && (b.m.prototype.im.call(this, a, c), this.W())
- },
- removeChild: function(a, c) {
- null != a && ( - 1 === this.s.indexOf(a) ? b.log(b.c.LD) : (this.Xh(a), b.m.prototype.removeChild.call(this, a, c)))
- },
- UG: null,
- vh: null,
- xR: !1,
- mb: null,
- ctor: null,
- zF: function(a, c) {
- b.m.prototype.ctor.call(this);
- var d;
- c = c || b.iq;
- "string" == typeof a ? (d = b.va.lm(a)) || (d = b.va.cc(a)) : a instanceof b.K && (d = a);
- d && this.ia(d, c)
- },
- AF: function(a, c) {
- b.m.prototype.ctor.call(this);
- this.UG = new b.re;
- var d;
- c = c || b.iq;
- "string" == typeof a ? (d = b.va.lm(a)) || (d = b.va.cc(a)) : a instanceof b.K && (d = a);
- d && this.ia(d, c)
- },
- CB: null,
- cI: function(a, c) {
- b.assert(a, b.c.YB);
- a instanceof b.B ? (a.batchNode = this, a.atlasIndex = c, a.dirty = !0, a.$c()) : b.log(b.c.eq)
- },
- dI: function(a, c) {
- b.assert(a, b.c.eq);
- if (a instanceof b.B) {
- for (var d = this.textureAtlas.capacity; c >= d || d == this.textureAtlas.totalQuads;) this.tp();
- a.batchNode = this;
- a.atlasIndex = c;
- a.dirty = !0;
- a.$c()
- } else b.log(b.c.eq)
- },
- Mo: function(a, c) {
- var d = this.Xb,
- e = this.textureAtlas,
- f = e.quads,
- g = d[a],
- h = b.ew(f[a]);
- d[c].atlasIndex = a;
- d[a] = d[c];
- e.Up(f[c], a);
- d[c] = g;
- e.Up(h, c)
- },
- eA: null,
- EG: function(a, c) {
- b.assert(a, b.c.VB);
- a instanceof b.B ? (a.batchNode = this, a.atlasIndex = c, a.dirty = !0, a.$c(), this.s.splice(c, 0, a)) : b.log(b.c.UB)
- },
- FG: function(a, c) {
- b.assert(a, b.c.bE);
- if (a instanceof b.B) {
- for (var d = this.textureAtlas; c >= d.capacity || d.capacity === d.totalQuads;) this.tp();
- a.batchNode = this;
- a.atlasIndex = c;
- d.Iu(a.quad, c);
- a.dirty = !0;
- a.$c()
- } else b.log(b.c.aE)
- },
- Vy: function(a, c) {
- var d = 0,
- e = a.children;
- e && (d = e.length);
- var f = 0;
- if (0 === d) f = a.atlasIndex,
- a.atlasIndex = c,
- a.arrivalOrder = 0,
- f != c && this.Mo(f, c),
- c++;
- else {
- f = !0;
- 0 <= e[0].zIndex && (f = a.atlasIndex, a.atlasIndex = c, a.arrivalOrder = 0, f != c && this.Mo(f, c), c++, f = !1);
- for (d = 0; d < e.length; d++) {
- var g = e[d];
- f && 0 <= g.zIndex && (f = a.atlasIndex, a.atlasIndex = c, a.arrivalOrder = 0, f != c && this.Mo(f, c), c++, f = !1);
- c = this.Vy(g, c)
- }
- f && (f = a.atlasIndex, a.atlasIndex = c, a.arrivalOrder = 0, f != c && this.Mo(f, c), c++)
- }
- return c
- },
- yh: function() {
- this.textureAtlas.texture.Aj() || (this.t.src = b.SRC_ALPHA, this.t.Y = b.ONE_MINUS_SRC_ALPHA)
- },
- ia: null,
- hs: function(a) {
- this.s = [];
- this.Xb = [];
- this.t = new b.cb(b.kc, b.jc);
- this.vh = this.mb = a;
- return ! 0
- },
- is: function(a, c) {
- this.s = [];
- this.Xb = [];
- this.t = new b.cb(b.kc, b.jc);
- c = c || b.iq;
- this.textureAtlas = new b.mf;
- this.textureAtlas.ia(a, c);
- this.yh();
- this.shaderProgram = b.ff.Of(b.Wq);
- return ! 0
- },
- YK: function(a, c) {
- a.batchNode = this;
- a.atlasIndex = c;
- a.dirty = !0;
- var d = this.textureAtlas;
- d.totalQuads >= d.capacity && this.tp();
- d.Iu(a.quad, c);
- this.Xb.splice(c, 0, a);
- var d = c + 1,
- e = this.Xb;
- if (e && 0 < e.length) for (; d < e.length; d++) e[d].atlasIndex++;
- var e = a.children,
- f;
- if (e) for (d = 0, l = e.length || 0; d < l; d++)(f = e[d]) && this.YK(f, this.BI(f, f.zIndex))
- },
- appendChild: null,
- lF: function(a) {
- this.bc = !0;
- a.batchNode = this;
- a.dirty = !0;
- this.Xb.push(a);
- a.atlasIndex = this.Xb.length - 1;
- a = a.children;
- for (var c = 0,
- d = a.length || 0; c < d; c++) this.appendChild(a[c])
- },
- mF: function(a) {
- this.bc = !0;
- a.batchNode = this;
- a.dirty = !0;
- this.Xb.push(a);
- var c = this.Xb.length - 1;
- a.atlasIndex = c;
- var d = this.textureAtlas;
- d.totalQuads == d.capacity && this.tp();
- d.Iu(a.quad, c);
- a = a.children;
- c = 0;
- for (d = a.length || 0; c < d; c++) this.appendChild(a[c])
- },
- Xh: null,
- nH: function(a) {
- a.batchNode = null;
- var c = this.Xb,
- d = c.indexOf(a);
- if ( - 1 != d) {
- c.splice(d, 1);
- for (var e = c.length; d < e; ++d) c[d].atlasIndex--
- }
- if (a = a.children) for (c = 0, d = a.length || 0; c < d; c++) a[c] && this.Xh(a[c])
- },
- oH: function(a) {
- this.textureAtlas.dM(a.atlasIndex);
- a.batchNode = null;
- var c = this.Xb,
- d = c.indexOf(a);
- if ( - 1 != d) {
- c.splice(d, 1);
- for (var e = c.length; d < e; ++d) c[d].atlasIndex--
- }
- if (a = a.children) for (c = 0, d = a.length || 0; c < d; c++) a[c] && this.Xh(a[c])
- },
- La: null,
- cs: function() {
- return this.vh
- },
- ds: function() {
- return this.textureAtlas.texture
- },
- Wa: null,
- gt: function(a) {
- this.vh = a;
- for (var c = this.s,
- d = 0; d < c.length; d++) c[d].texture = a
- },
- ht: function(a) {
- this.textureAtlas.texture = a;
- this.yh()
- },
- Ba: null,
- eI: function(a) {
- var c = a || b.l;
- if (this.Gc) {
- c.save();
- this.transform(a);
- var d = this.s;
- if (d) for (this.vc(), a = 0; a < d.length; a++) d[a] && d[a].Ba(c);
- c.restore()
- }
- },
- fI: function(a) {
- a = a || b.l;
- if (this.Gc) {
- b.oL();
- var c = this.zj;
- c && c.fA() && (c.HI(), this.vB());
- this.vc();
- this.transform(a);
- this.na(a);
- c && c.fA() && c.nI(this);
- b.nL();
- this.arrivalOrder = 0
- }
- },
- N: null,
- rr: function(a, c, d) {
- b.assert(null != a, b.c.SB);
- a instanceof b.B ? (c = null == c ? a.zIndex: c, d = null == d ? a.tag: d, b.m.prototype.N.call(this, a, c, d), this.appendChild(a), this.W()) : b.log(b.c.QB)
- },
- hF: function(a, c, d) {
- b.assert(null != a, b.c.UD);
- a instanceof b.B ? a.texture != this.textureAtlas.texture ? b.log(b.c.TD) : (c = null == c ? a.zIndex: c, d = null == d ? a.tag: d, b.m.prototype.N.call(this, a, c, d), this.appendChild(a), this.W()) : b.log(b.c.SD)
- },
- df: null,
- lH: function(a) {
- var c = this.Xb;
- if (c && 0 < c.length) for (var d = 0,
- e = c.length; d < e; d++) c[d] && (c[d].batchNode = null);
- b.m.prototype.df.call(this, a);
- this.Xb.length = 0
- },
- mH: function(a) {
- var c = this.Xb;
- if (c && 0 < c.length) for (var d = 0,
- e = c.length; d < e; d++) c[d] && (c[d].batchNode = null);
- b.m.prototype.df.call(this, a);
- this.Xb.length = 0;
- this.textureAtlas.$L()
- },
- vc: null,
- OH: function() {
- if (this.bc) {
- var a, c = 0,
- d = this.s,
- e = d.length,
- f;
- for (a = 1; a < e; a++) {
- var g = d[a],
- c = a - 1;
- for (f = d[c]; 0 <= c && (g.Ia < f.Ia || g.Ia == f.Ia && g.arrivalOrder < f.arrivalOrder);) d[c + 1] = f,
- c -= 1,
- f = d[c];
- d[c + 1] = g
- }
- 0 < d.length && this.Gd(d, b.m.bd.vc);
- this.bc = !1
- }
- },
- PH: function() {
- if (this.bc) {
- var a = this.s,
- c, d = 0,
- e = a.length,
- f;
- for (c = 1; c < e; c++) {
- var g = a[c],
- d = c - 1;
- for (f = a[d]; 0 <= d && (g.Ia < f.Ia || g.Ia == f.Ia && g.arrivalOrder < f.arrivalOrder);) a[d + 1] = f,
- d -= 1,
- f = a[d];
- a[d + 1] = g
- }
- if (0 < a.length) for (this.Gd(a, b.m.bd.vc), c = d = 0; c < a.length; c++) d = this.Vy(a[c], d);
- this.bc = !1
- }
- },
- na: null,
- Lr: function() {
- 0 !== this.textureAtlas.totalQuads && (this.Jb.wc(), this.Jb.xd(), this.Gd(this.s, b.m.bd.$c), b.Ph(this.t.src, this.t.Y), this.textureAtlas.jJ())
- }
- });
- p = b.Vf.prototype;
- b.da === b.wb ? (p.ctor = p.AF, p.CB = p.dI, p.eA = p.FG, p.ia = p.is, p.appendChild = p.mF, p.Xh = p.oH, p.La = p.ds, p.Wa = p.ht, p.Ba = p.fI, p.N = p.hF, p.df = p.mH, p.vc = p.PH, p.na = p.Lr) : (p.ctor = p.zF, p.CB = p.cI, p.eA = p.EG, p.ia = p.hs, p.appendChild = p.lF, p.Xh = p.nH, p.La = p.cs, p.Wa = p.gt, p.Ba = p.eI, p.df = p.lH, p.N = p.rr, p.vc = p.OH, p.na = b.m.prototype.na);
- b.k(p, "texture", p.La, p.Wa);
- b.k(p, "descendants", p.XJ);
- b.Vf.create = function(a, c) {
- return new b.Vf(a, c)
- };
- b.Vf.eu = b.Vf.create;
- b.PB = b.B.extend({
- zr: null,
- vn: null,
- ctor: function() {
- b.B.prototype.ctor.call(this);
- var a = document.createElement("canvas");
- a.width = a.height = 10;
- this.zr = a;
- this.vn = a.getContext("2d");
- var c = new b.K;
- c.Mb(a);
- c.Fa();
- this.Wa(c)
- },
- MT: function() {
- return this.vn
- },
- LT: function() {
- return this.zr
- },
- IA: function(a, c) {
- void 0 === c && (c = a.height, a = a.width);
- var d = this.zr;
- d.width = a;
- d.height = c;
- this.La().Fa();
- this.Ha(E(0, 0, a, c), !1)
- }
- });
- b.Ad = b.oa.extend({
- cj: null,
- Wb: 0,
- oj: null,
- ctor: function(a, c, d) {
- this.cj = a || null;
- this.Wb = c || 0;
- this.oj = d || null
- },
- d: function() {
- var a = new b.Ad;
- a.$e(this.cj.d(), this.Wb, this.oj);
- return a
- },
- ep: function() {
- return b.d(this)
- },
- copy: function() {
- var a = new b.Ad;
- a.$e(this.cj.d(), this.Wb, this.oj);
- return a
- },
- $e: function(a, c, d) {
- this.cj = a;
- this.Wb = c;
- this.oj = d;
- return ! 0
- },
- Ye: function() {
- return this.cj
- },
- Pg: function(a) {
- this.cj = a
- },
- UT: function() {
- return this.Wb
- },
- eY: function(a) {
- this.Wb = a
- },
- bV: function() {
- return this.oj
- },
- XY: function(a) {
- this.oj = a
- }
- });
- b.Ad.create = function(a, c, d) {
- return new b.Ad(a, c, d)
- };
- b.we = b.oa.extend({
- $b: null,
- sf: 0,
- nh: !1,
- u: 0,
- Wb: 0,
- Ue: 0,
- ctor: function(a, c, d) {
- this.$b = [];
- if (void 0 === a) this.cA(null, 0);
- else {
- var e = a[0];
- e && (e instanceof b.zc ? this.cA(a, c, d) : e instanceof b.Ad && this.up(a, c, d))
- }
- },
- jU: function() {
- return this.$b
- },
- rY: function(a) {
- this.$b = a
- },
- Ut: function(a) {
- var c = new b.Ad;
- c.$e(a, 1, null);
- this.$b.push(c);
- this.Ue++
- },
- GR: function(a) {
- a = b.va.cc(a);
- var c = E(0, 0, 0, 0);
- c.width = a.width;
- c.height = a.height;
- a = b.zc.create(a, c);
- this.Ut(a)
- },
- HR: function(a, c) {
- var d = b.zc.create(a, c);
- this.Ut(d)
- },
- up: function(a, c, d) {
- b.qj(a, b.Ad);
- this.Wb = c;
- this.sf = void 0 === d ? 1 : d;
- this.Ue = 0;
- c = this.$b;
- for (d = c.length = 0; d < a.length; d++) {
- var e = a[d];
- c.push(e);
- this.Ue += e.Wb
- }
- return ! 0
- },
- d: function() {
- var a = new b.we;
- a.up(this.ww(), this.Wb, this.sf);
- a.Pp(this.nh);
- return a
- },
- ep: function() {
- var a = new b.we;
- a.up(this.ww(), this.Wb, this.sf);
- a.Pp(this.nh);
- return a
- },
- ww: function() {
- for (var a = [], c = 0; c < this.$b.length; c++) a.push(this.$b[c].d());
- return a
- },
- copy: function() {
- return this.ep(null)
- },
- qU: function() {
- return this.sf
- },
- wY: function(a) {
- this.sf = a
- },
- Pp: function(a) {
- this.nh = a
- },
- LU: function() {
- return this.nh
- },
- tu: function() {
- return this.Ue * this.Wb
- },
- TT: function() {
- return this.Wb
- },
- dY: function(a) {
- this.Wb = a
- },
- YU: function() {
- return this.Ue
- },
- cA: function(a, c, d) {
- b.qj(a, b.zc);
- this.sf = void 0 === d ? 1 : d;
- this.Wb = c || 0;
- this.Ue = 0;
- c = this.$b;
- c.length = 0;
- if (a) {
- for (d = 0; d < a.length; d++) {
- var e = a[d],
- f = new b.Ad;
- f.$e(e, 1, null);
- c.push(f)
- }
- this.Ue += a.length
- }
- return ! 0
- },
- Zu: function() {},
- Pf: function() {}
- });
- b.we.create = function(a, c, d) {
- return new b.we(a, c, d)
- };
- b.we.nS = b.we.create;
- b.Fh = {
- ni: {},
- St: function(a, c) {
- this.ni[c] = a
- },
- vX: function(a) {
- a && this.ni[a] && delete this.ni[a]
- },
- np: function(a) {
- return this.ni[a] ? this.ni[a] : null
- },
- gF: function(a, c) {
- var d = a.animations;
- if (d) {
- var e = 1,
- f = a.properties;
- if (f) for (var e = null != f.format ? parseInt(f.format) : e, f = f.spritesheets, g = b.ue, h = b.path, k = 0; k < f.length; k++) g.Vt(h.$o(c, f[k]));
- switch (e) {
- case 1:
- this.eH(d);
- break;
- case 2:
- this.fH(d);
- break;
- default:
- b.log(b.c.sI)
- }
- } else b.log(b.c.rI)
- },
- AR: function(a) {
- b.assert(a, b.c.AI);
- var c = b.D.Yc(a);
- c ? this.gF(c, a) : b.log(b.c.zI)
- },
- eH: function(a) {
- var c = b.ue,
- d;
- for (d in a) {
- var e = a[d],
- f = e.frames,
- e = parseFloat(e.delay) || 0,
- g = null;
- if (f) {
- for (var g = [], h = 0; h < f.length; h++) {
- var k = c.Ye(f[h]);
- if (k) {
- var m = new b.Ad;
- m.$e(k, 1, null);
- g.push(m)
- } else b.log(b.c.uI, d, f[h])
- }
- 0 === g.length ? b.log(b.c.vI, d) : (g.length != f.length && b.log(b.c.wI, d), g = b.we.create(g, e, 1), b.Fh.St(g, d))
- } else b.log(b.c.tI, d)
- }
- },
- fH: function(a) {
- var c = b.ue,
- d;
- for (d in a) {
- var e = a[d],
- f = parseInt(e.loops),
- f = e.loop ? b.Ak: isNaN(f) ? 1 : f,
- g = e.restoreOriginalFrame && !0 == e.restoreOriginalFrame ? !0 : !1,
- h = e.frames;
- if (h) {
- for (var k = [], m = 0; m < h.length; m++) {
- var n = h[m],
- r = n.spriteframe,
- s = c.Ye(r);
- if (s) {
- var r = parseFloat(n.delayUnits) || 0,
- n = n.notification,
- u = new b.Ad;
- u.$e(s, r, n);
- k.push(u)
- } else b.log(b.c.yI, d, r)
- }
- e = parseFloat(e.delayPerUnit) || 0;
- h = new b.we;
- h.up(k, e, f);
- h.Pp(g);
- b.Fh.St(h, d)
- } else b.log(b.c.xI, d)
- }
- },
- fg: function() {
- this.ni = {}
- }
- };
- b.zc = b.oa.extend({
- Na: null,
- ug: null,
- Fc: null,
- qc: !1,
- F: null,
- Ld: null,
- nd: null,
- ea: null,
- hj: "",
- T: !1,
- On: null,
- ctor: function(a, c, d, e, f) {
- this.Na = C(0, 0);
- this.Ld = C(0, 0);
- this.ug = D(0, 0);
- this.qc = !1;
- this.nd = D(0, 0);
- this.hj = "";
- this.ea = null;
- this.T = !1;
- void 0 !== a && void 0 !== c && (void 0 === d || void 0 === e || void 0 === f ? this.ia(a, c) : this.ia(a, c, d, e, f))
- },
- nv: function() {
- return this.T
- },
- Vc: function(a, c) {
- null == this.On && (this.On = []);
- this.On.push({
- ne: a,
- td: c
- })
- },
- Ub: function() {
- var a = this.On;
- if (a) {
- for (var c = 0,
- d = a.length; c < d; c++) {
- var e = a[c];
- e.ne.call(e.td, this)
- }
- a.length = 0
- }
- },
- wK: function() {
- var a = this.Fc;
- return E(a.x, a.y, a.width, a.height)
- },
- LY: function(a) {
- this.Fc || (this.Fc = E(0, 0, 0, 0));
- this.Fc.x = a.x;
- this.Fc.y = a.y;
- this.Fc.width = a.width;
- this.Fc.height = a.height;
- this.F = b.Hp(a)
- },
- FV: function() {
- return this.qc
- },
- NY: function(a) {
- this.qc = a
- },
- pe: function() {
- var a = this.F;
- return E(a.x, a.y, a.width, a.height)
- },
- dB: function(a) {
- this.F || (this.F = E(0, 0, 0, 0));
- this.F.x = a.x;
- this.F.y = a.y;
- this.F.width = a.width;
- this.F.height = a.height;
- this.Fc = b.gm(this.F)
- },
- xU: function() {
- return C(this.Ld)
- },
- CY: function(a) {
- this.Ld.x = a.x;
- this.Ld.y = a.y;
- b.Ds(this.Ld, this.Na)
- },
- AU: function() {
- return D(this.nd)
- },
- EY: function(a) {
- this.nd.width = a.width;
- this.nd.height = a.height
- },
- xj: function() {
- return D(this.ug)
- },
- DY: function(a) {
- this.ug.width = a.width;
- this.ug.height = a.height
- },
- La: function() {
- if (this.ea) return this.ea;
- if ("" !== this.hj) {
- var a = b.va.cc(this.hj);
- a && (this.T = a.xb);
- return a
- }
- return null
- },
- Wa: function(a) {
- if (this.ea != a) {
- var c = a.xb;
- this.T = c;
- this.ea = a;
- c || a.Vc(function(a) {
- this.T = !0;
- if (this.qc && b.da === b.Ya) {
- var c = a.la,
- c = b.fu(c, this.pe()),
- f = new b.K;
- f.Mb(c);
- f.Fa();
- this.Wa(f);
- c = this.pe();
- this.dB(E(0, 0, c.width, c.height))
- }
- c = this.F;
- 0 === c.width && 0 === c.height && (c = a.width, a = a.height, this.F.width = c, this.F.height = a, this.Fc = b.gm(this.F), this.nd.width = this.Fc.width, this.nd.height = this.Fc.height, this.ug.width = c, this.ug.height = a);
- this.Ub()
- },
- this)
- }
- },
- wu: function() {
- return C(this.Na)
- },
- BY: function(a) {
- this.Na.x = a.x;
- this.Na.y = a.y
- },
- d: function() {
- var a = new b.zc;
- a.ia(this.hj, this.Fc, this.qc, this.Ld, this.nd);
- a.Wa(this.ea);
- return a
- },
- ep: function() {
- var a = new b.zc;
- a.ia(this.hj, this.Fc, this.qc, this.Ld, this.nd);
- a.Wa(this.ea);
- return a
- },
- copy: function() {
- return this.ep()
- },
- ia: function(a, c, d, e, f) {
- 2 === arguments.length && (c = b.gm(c));
- e = e || C(0, 0);
- f = f || c;
- d = d || !1;
- "string" == typeof a ? (this.ea = null, this.hj = a) : a instanceof b.K && this.Wa(a);
- if ((a = this.La()) && a.url) {
- var g, h;
- d ? (g = c.x + c.height, h = c.y + c.width) : (g = c.x + c.width, h = c.y + c.height);
- g > a.width && b.error(b.c.Pq, a.url);
- h > a.height && b.error(b.c.Oq, a.url)
- }
- this.Fc = c;
- this.F = b.Hp(c);
- this.Ld.x = e.x;
- this.Ld.y = e.y;
- b.Ds(e, this.Na);
- this.nd.width = f.width;
- this.nd.height = f.height;
- b.Iy(f, this.ug);
- this.qc = d;
- return ! 0
- }
- });
- b.zc.create = function(a, c, d, e, f) {
- return new b.zc(a, c, d, e, f)
- };
- b.zc.eu = b.zc.create;
- b.zc.ZQ = function(a, c, d, e, f) {
- var g = new b.zc;
- g.ea = a;
- g.Fc = c;
- g.F = b.Hp(c);
- g.Ld.x = e.x;
- g.Ld.y = e.y;
- b.Ds(g.Ld, g.Na);
- g.nd.width = f.width;
- g.nd.height = f.height;
- b.Iy(g.nd, g.ug);
- g.qc = d;
- return g
- };
- b.ue = {
- hw: /^\s*\{\s*([\-]?\d+[.]?\d*)\s*,\s*([\-]?\d+[.]?\d*)\s*\}\s*$/,
- WE: /^\s*\{\s*\{\s*([\-]?\d+[.]?\d*)\s*,\s*([\-]?\d+[.]?\d*)\s*\}\s*,\s*\{\s*([\-]?\d+[.]?\d*)\s*,\s*([\-]?\d+[.]?\d*)\s*\}\s*\}\s*$/,
- ke: {},
- Df: {},
- Ki: {},
- iy: function(a) {
- return (a = this.WE.exec(a)) ? E(parseFloat(a[1]), parseFloat(a[2]), parseFloat(a[3]), parseFloat(a[4])) : E(0, 0, 0, 0)
- },
- $x: function(a) {
- return (a = this.hw.exec(a)) ? C(parseFloat(a[1]), parseFloat(a[2])) : C(0, 0)
- },
- kt: function(a) {
- return (a = this.hw.exec(a)) ? D(parseFloat(a[1]), parseFloat(a[2])) : D(0, 0)
- },
- aG: function(a) {
- var c = b.D.Yc(a);
- b.assert(c, b.c.xN, a);
- b.D.Pf(a);
- if (c.Pi) return this.Ki[a] = c;
- var d = c.frames,
- e = c.metadata || c.meta,
- c = {},
- f = {},
- g = 0;
- e && (g = e.format, g = 1 >= g.length ? parseInt(g) : g, f.PK = e.textureFileName || e.textureFileName || e.image);
- for (var h in d) {
- var k = d[h];
- if (k) {
- e = {};
- if (0 == g) {
- e.rect = E(k.x, k.y, k.width, k.height);
- e.Kp = !1;
- e.offset = C(k.offsetX, k.offsetY);
- var m = k.originalWidth,
- k = k.originalHeight;
- m && k || b.log(b.c.wN);
- m = Math.abs(m);
- k = Math.abs(k);
- e.size = D(m, k)
- } else if (1 == g || 2 == g) e.rect = this.iy(k.frame),
- e.Kp = k.rotated || !1,
- e.offset = this.$x(k.offset),
- e.size = this.kt(k.sourceSize);
- else if (3 == g) {
- var m = this.kt(k.spriteSize),
- n = this.iy(k.textureRect);
- m && (n = E(n.x, n.y, m.width, m.height));
- e.rect = n;
- e.Kp = k.textureRotated || !1;
- e.offset = this.$x(k.spriteOffset);
- e.size = this.kt(k.spriteSourceSize);
- e.oI = k.aliases
- } else m = k.frame,
- n = k.sourceSize,
- h = k.filename || h,
- e.rect = E(m.x, m.y, m.w, m.h),
- e.Kp = k.rotated || !1,
- e.offset = C(0, 0),
- e.size = D(n.w, n.h);
- c[h] = e
- }
- }
- return this.Ki[a] = {
- Pi: !0,
- frames: c,
- xL: f
- }
- },
- Vt: function(a, c) {
- b.assert(a, b.c.zN);
- var d = this.Ki[a] || b.D.Yc(a);
- if (d && d.frames) {
- var e = this.Ki[a] || this.aG(a),
- d = e.frames,
- e = e.xL;
- c ? c instanceof b.K || ("string" == typeof c ? c = b.va.cc(c) : b.assert(0, b.c.AN)) : c = b.va.cc(b.path.$o(a, e.PK || ".png"));
- var e = this.Df,
- f = this.ke,
- g;
- for (g in d) {
- var h = d[g],
- k = f[g];
- if (!k) {
- k = b.zc.create(c, h.rect, h.Kp, h.offset, h.size);
- if (h = h.oI) for (var m = 0,
- n = h.length; m < n; m++) {
- var r = h[m];
- e[r] && b.log(b.c.yN, r);
- e[r] = g
- }
- b.da === b.Ya && k.qc && k.La().xb && (h = k.La().la, h = b.fu(h, k.wK()), m = new b.K, m.Mb(h), m.Fa(), k.Wa(m), h = k.F, k.dB(E(0, 0, h.width, h.height)));
- f[g] = k
- }
- }
- }
- },
- RQ: function(a) {
- a = a.frames;
- for (var c in a) this.ke[c] && b.log(b.c.vN, c)
- },
- Ut: function(a, c) {
- this.ke[c] = a
- },
- EX: function() {
- this.ke = {};
- this.Df = {}
- },
- DX: function(a) {
- a && (this.Df[a] && delete this.Df[a], this.ke[a] && delete this.ke[a])
- },
- FX: function(a) {
- var c = this.ke,
- d = this.Df;
- if (a = this.Ki[a]) {
- a = a.frames;
- for (var e in a) if (c[e]) {
- delete c[e];
- for (var f in d) d[f] == e && delete d[f]
- }
- }
- },
- GX: function(a) {
- var c = this.ke,
- d = this.Df,
- e;
- for (e in c) {
- var f = c[e];
- if (f && f.La() == a) {
- delete c[e];
- for (var g in d) d[g] == e && delete d[g]
- }
- }
- },
- Ye: function(a) {
- var c = this.ke[a];
- if (!c) {
- var d = this.Df[a];
- d && ((c = this.ke[d.toString()]) || delete this.Df[a])
- }
- c || b.log(b.c.BN, a);
- return c
- },
- fg: function() {
- this.ke = {};
- this.Df = {};
- this.Ki = {}
- }
- };
- b.bu = {
- $O: 0,
- aQ: 1,
- INT: 2,
- VO: 3,
- vO: 4,
- il: 0,
- SG: 0,
- At: !1,
- zt: !1,
- xt: !1,
- yt: !1,
- Bt: !1,
- kR: 0,
- ss: 0,
- hn: "",
- Fl: {},
- Pi: !1,
- $n: function() {
- var a = this.Fl;
- a["cocos2d.x.version"] = b.oq;
- a["cocos2d.x.compiled_with_profiler"] = !1;
- a["cocos2d.x.compiled_with_gl_state_cache"] = b.Dv;
- this.Pi = !0
- },
- sU: function() {
- return this.il
- },
- rU: function() {
- return this.SG
- },
- tU: function() {
- return this.ss
- },
- kZ: function() {
- return this.zt
- },
- lZ: function() {
- return this.At
- },
- jZ: function() {
- return ! 1
- },
- mZ: function() {
- return ! 1
- },
- gZ: function() {
- return ! 1
- },
- hZ: function() {
- return this.xt
- },
- iZ: function() {
- return this.yt
- },
- nZ: function() {
- return this.Bt
- },
- ap: function(a) {
- return - 1 < this.hn.indexOf(a)
- },
- dV: function(a, c) {
- this.Pi || this.$n();
- var d = this.Fl;
- return d[a] ? d[a] : c
- },
- ZY: function(a, c) {
- this.Fl[a] = c
- },
- mJ: function() {
- 0 === b.Dv && (b.log(""), b.log(b.c.TI), b.log(""))
- },
- PJ: function() {
- if (b.da !== b.Ya) {
- this.Pi || this.$n();
- var a = b.l,
- c = this.Fl;
- c["gl.vendor"] = a.getParameter(a.VENDOR);
- c["gl.renderer"] = a.getParameter(a.RENDERER);
- c["gl.version"] = a.getParameter(a.VERSION);
- this.hn = "";
- for (var d = a.getSupportedExtensions(), e = 0; e < d.length; e++) this.hn += d[e] + " ";
- this.il = a.getParameter(a.MAX_TEXTURE_SIZE);
- c["gl.max_texture_size"] = this.il;
- this.ss = a.getParameter(a.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
- c["gl.max_texture_units"] = this.ss;
- this.At = this.ap("GL_IMG_texture_compression_pvrtc");
- c["gl.supports_PVRTC"] = this.At;
- this.zt = !1;
- c["gl.supports_NPOT"] = this.zt;
- this.xt = this.ap("GL_IMG_texture_format_BGRA888");
- c["gl.supports_BGRA8888"] = this.xt;
- this.yt = this.ap("GL_EXT_discard_framebuffer");
- c["gl.supports_discard_framebuffer"] = this.yt;
- this.Bt = this.ap("vertex_array_object");
- c["gl.supports_vertex_array_object"] = this.Bt;
- b.bp()
- }
- },
- VV: function(a) {
- this.Pi || this.$n();
- var c = b.D.Yc(a);
- if (!c) throw "Please load the resource first : " + a;
- b.assert(c, b.c.VI, a);
- if (c = c.data) for (var d in c) this.Fl[d] = c[d];
- else b.log(b.c.UI, a)
- }
- };
- b.p.lq = function() {
- b.XO = b.oa.extend({
- xZ: function() {}
- });
- var a = b.ha.prototype;
- a.Op = function(a) {
- var d = this.ab;
- this.mN();
- var e = this.ee,
- f = e.sc.x / e.O,
- g = e.sc.y / e.ma;
- switch (a) {
- case b.ha.qD:
- b.Pu(b.Jv);
- b.Ou();
- e = new b.re;
- b.PV(e, 0, d.width, 0, d.height, -1024, 1024);
- b.Qu(e);
- b.Pu(b.Iv);
- b.Ou();
- break;
- case b.ha.Tv:
- var h = this.Rl(),
- k = new b.re,
- e = new b.re;
- b.Pu(b.Jv);
- b.Ou();
- b.QV(k, 60, d.width / d.height, 0.1, 2 * h);
- b.Qu(k);
- b.Pu(b.Iv);
- b.Ou();
- h = b.Vl(null, -f + d.width / 2, -g + d.height / 2, h);
- d = b.Vl(null, -f + d.width / 2, -g + d.height / 2, 0);
- f = b.Vl(null, 0, 1, 0);
- b.qL(e, h, d, f);
- b.Qu(e);
- break;
- case b.ha.rD:
- break;
- default:
- b.log(b.c.kC)
- }
- this.kh = a;
- b.I.dispatchEvent(this.Pn);
- b.IY()
- };
- a.WA = function(a) {
- var d = b.l;
- a ? (d.clearDepth(1), d.enable(d.DEPTH_TEST), d.depthFunc(d.LEQUAL)) : d.disable(d.DEPTH_TEST)
- };
- a.fv = function(a) {
- this.ab.width = b.ra.width;
- this.ab.height = b.ra.height;
- this.ee = a || b.view;
- a = b.bu;
- a.PJ();
- a.mJ();
- this.yi();
- this.ZA();
- b.I && b.I.Mp(!0)
- };
- a.fg = function() {
- var a = b.l;
- a.clear(a.COLOR_BUFFER_BIT | a.DEPTH_BUFFER_BIT)
- };
- a.wr = function() {
- b.oL()
- };
- a.sr = function() {
- b.nL()
- };
- a.yi = function() {
- if (!b.Tf) this.yF();
- else if (null != b.ha.rx && !1 != b.ha.rx) {
- var a = new b.K;
- a.Mb(b.ha.Ji);
- a.Fa();
- var d = b.view.su().height / 320;
- 0 === d && (d = this.ab.height / 320);
- var e = new b.Tf;
- e.at(!0);
- e.Qd("00.0", a, 12, 32, ".");
- e.scale = d;
- this.cd = e;
- e = new b.Tf;
- e.at(!0);
- e.Qd("0.000", a, 12, 32, ".");
- e.scale = d;
- this.dd = e;
- e = new b.Tf;
- e.at(!0);
- e.Qd("000", a, 12, 32, ".");
- e.scale = d;
- this.jd = e;
- a = b.jq;
- this.jd.Ma(a.x, 34 * d + a.y);
- this.dd.Ma(a.x, 17 * d + a.y);
- this.cd.Ma(a)
- }
- };
- a.yF = function() {
- var a = 0,
- a = this.ab.width > this.ab.height ? 0 | this.ab.height / 320 * 24 : 0 | this.ab.width / 320 * 24;
- this.cd = b.A.create("000.0", "Arial", a);
- this.dd = b.A.create("0.000", "Arial", a);
- this.jd = b.A.create("0000", "Arial", a);
- a = b.jq;
- this.jd.Ma(this.jd.width / 2 + a.x, 5 * this.jd.height / 2 + a.y);
- this.dd.Ma(this.dd.width / 2 + a.x, 3 * this.dd.height / 2 + a.y);
- this.cd.Ma(this.cd.width / 2 + a.x, this.cd.height / 2 + a.y)
- };
- a.WI = function(a) {
- var d = new b.re;
- b.Gv(d);
- var e = new b.re;
- b.OV(e, d);
- var f = this.ee.su();
- a = new b.Ej(2 * a.x / f.width - 1, 1 - 2 * a.y / f.height, d.Sd[14] / d.Sd[15]);
- d = new b.Ej;
- b.sL(d, a, e);
- return C(d.x, d.y)
- };
- a.YI = function(a) {
- var d = new b.re;
- b.Gv(d);
- var e = new b.Ej;
- a = new b.Ej(a.x, a.y, 0);
- b.sL(e, a, d);
- d = this.ee.su();
- return C(d.width * (0.5 * e.x + 0.5), d.height * (0.5 * -e.y + 0.5))
- };
- a.Pl = function() {
- return this.ee.Pl()
- };
- a.Au = function() {
- return this.ee.Au()
- };
- a.Rl = function() {
- return this.ab.height / 1.1566
- };
- a.mN = function() {
- var a = this.ee;
- if (a) {
- var d = this.ab;
- a.lN( - a.sc.x / a.O, -a.sc.y / a.ma, d.width, d.height)
- }
- };
- a.yU = function() {
- return this.ee
- };
- a.HU = function() {
- return this.kh
- };
- a.wM = function() {
- b.Ph(b.kc, b.jc)
- };
- a.ZA = function() {
- this.wM();
- this.WA(!1);
- this.Op(this.kh);
- b.l.clearColor(0, 0, 0, 1)
- }
- };
- b.We = 0;
- b.Gv = function(a) {
- var c = new b.re;
- b.mL(b.Jv, c);
- var d = new b.re;
- b.mL(b.Iv, d);
- b.rL(a, c, d)
- };
- b.ha = b.oa.extend({
- iR: !1,
- jl: !1,
- $a: !1,
- vo: !1,
- ph: !1,
- qn: 0,
- vs: 0,
- kh: 0,
- mi: 0,
- bh: 1,
- Sk: !1,
- hg: 0,
- Rr: 0,
- cd: null,
- dd: null,
- jd: null,
- ab: null,
- sg: null,
- Ne: null,
- no: null,
- ee: null,
- Se: null,
- Ls: null,
- Ib: null,
- $b: 0,
- Dt: 0,
- Vs: 0,
- WQ: null,
- rd: null,
- Fd: null,
- Pn: null,
- Nr: null,
- Pr: null,
- Or: null,
- ctor: function() {
- var a = this;
- a.sg = Date.now();
- b.I.Tt(b.Va.ek,
- function() {
- a.sg = Date.now()
- })
- },
- ga: function() {
- this.vs = this.qn = 1 / b.$I;
- this.Se = [];
- this.kh = b.ha.sD;
- this.Ls = null;
- this.Rr = this.mi = 0;
- this.Sk = !1;
- this.Dt = this.$b = 0;
- this.sg = Date.now();
- this.vo = this.$a = !1;
- this.ab = D(0, 0);
- this.ee = null;
- this.bh = 1;
- this.rd = new b.Bk;
- this.Fd = b.pv ? new b.pv: null;
- this.rd.bv(this.Fd, b.Bk.Xm, !1);
- this.Nr = new b.kf(b.ha.rC);
- this.Nr.setUserData(this);
- this.Pr = new b.kf(b.ha.tC);
- this.Pr.setUserData(this);
- this.Or = new b.kf(b.ha.sC);
- this.Or.setUserData(this);
- this.Pn = new b.kf(b.ha.uC);
- this.Pn.setUserData(this);
- return ! 0
- },
- LI: function() {
- var a = Date.now();
- this.jl ? (this.hg = 0, this.jl = !1) : this.hg = (a - this.sg) / 1E3;
- 0 < b.Va.Jc[b.Va.Vd.gp] && 0.2 < this.hg && (this.hg = 1 / 60);
- this.sg = a
- },
- kJ: function() {
- this.LI();
- this.$a || (this.rd.update(this.hg), b.I.dispatchEvent(this.Or));
- this.fg();
- this.Ne && this.QM();
- this.wr && this.wr();
- this.Ib && (this.Ib.Ba(), b.I.dispatchEvent(this.Pr));
- this.no && this.no.Ba();
- this.Sk && this.NH();
- this.sr && this.sr();
- b.I.dispatchEvent(this.Nr);
- this.Dt++;
- this.Sk && this.qF()
- },
- wr: null,
- sr: null,
- end: function() {
- this.vo = !0
- },
- QT: function() {
- return this.bh
- },
- vU: function() {
- return this.no
- },
- Ql: function() {
- return D(this.ab)
- },
- gV: function() {
- return D(this.ab.width * this.bh, this.ab.height * this.bh)
- },
- pause: function() {
- this.$a || (this.vs = this.qn, this.SA(0.25), this.$a = !0)
- },
- $W: function() {
- b.assert(this.Ib, b.c.hC);
- this.Se.pop();
- var a = this.Se.length;
- 0 == a ? this.end() : (this.ph = !0, this.Ne = this.Se[a - 1])
- },
- UL: function() {
- b.Fh.fg();
- b.ue.fg();
- b.va.fg()
- },
- VL: function() {
- this.Ig().Tp();
- b.I && b.I.Mp(!1);
- this.Ib && (this.Ib.Nf(), this.Ib.vd(), this.Ib.If());
- this.Ne = this.Ib = null;
- this.Se.length = 0;
- this.oB();
- this.UL();
- b.bp()
- },
- WL: function(a) {
- b.assert(a, b.c.Bv);
- this.ph = !1;
- this.Se.push(a);
- this.Ne = a
- },
- OA: function(a) {
- b.assert(a, b.c.Bv);
- if (this.Ib) {
- var c = this.Se.length;
- 0 === c ? (this.ph = !0, this.Se[c] = a) : (this.ph = !0, this.Se[c - 1] = a);
- this.Ne = a
- } else this.WL(a),
- this.mB()
- },
- Oj: function() {
- this.$a && (this.SA(this.vs), (this.sg = Date.now()) || b.log(b.c.jC), this.$a = !1, this.hg = 0)
- },
- aY: function(a) {
- a != this.bh && (this.bh = a, this.yi())
- },
- cY: function() {},
- yY: function(a) {
- this.jl = a
- },
- QM: function() {
- var a = !1,
- c = !1;
- b.dw && (a = this.Ib ? this.Ib instanceof b.dw: !1, c = this.Ne ? this.Ne instanceof b.dw: !1);
- if (!c) {
- if (c = this.Ib) c.Nf(),
- c.vd();
- this.ph && c && c.If()
- }
- this.Ib = this.Ne;
- this.Ne = null;
- a || null == this.Ib || (this.Ib.se(), this.Ib.Hj())
- },
- zY: function(a) {
- this.no = a
- },
- VT: function() {
- return this.Ls
- },
- fY: function(a) {
- this.Ls = a
- },
- NH: function() {
- this.$b++;
- this.mi += this.hg;
- this.cd && this.dd && this.jd ? (this.mi > b.fC && (this.dd.string = this.Vs.toFixed(3), this.Rr = this.$b / this.mi, this.mi = this.$b = 0, this.cd.string = this.Rr.toFixed(1), this.jd.string = (0 | b.We).toString()), this.cd.Ba(), this.dd.Ba(), this.jd.Ba()) : this.yi();
- b.We = 0
- },
- HV: function() {
- return this.ph
- },
- MU: function() {
- return this.Ib
- },
- GT: function() {
- return this.qn
- },
- xV: function() {
- return this.Sk
- },
- DM: function(a) {
- this.Sk = a
- },
- RU: function() {
- return this.Vs
- },
- AV: function() {
- return this.jl
- },
- CV: function() {
- return this.$a
- },
- ZU: function() {
- return this.Dt
- },
- aX: function() {
- this.QL(1)
- },
- QL: function(a) {
- b.assert(this.Ib, b.c.iC);
- var c = this.Se,
- d = c.length;
- if (0 == d) this.end();
- else if (! (a > d)) {
- for (; d > a;) {
- var e = c.pop();
- e.running && (e.Nf(), e.vd());
- e.If();
- d--
- }
- this.Ne = c[c.length - 1];
- this.ph = !1
- }
- },
- Ig: function() {
- return this.rd
- },
- eB: function(a) {
- this.rd != a && (this.rd = a)
- },
- mp: function() {
- return this.Fd
- },
- RA: function(a) {
- this.Fd != a && (this.Fd = a)
- },
- WT: function() {
- return this.hg
- },
- yi: null,
- qF: function() {
- this.Vs = (Date.now() - this.sg) / 1E3
- }
- });
- b.ha.uC = "director_projection_changed";
- b.ha.rC = "director_after_draw";
- b.ha.tC = "director_after_visit";
- b.ha.sC = "director_after_update";
- b.lC = b.ha.extend({
- wp: !1,
- mB: function() {
- this.jl = !0;
- this.wp = !1
- },
- wL: function() {
- this.vo ? (this.vo = !1, this.VL()) : this.wp || this.kJ()
- },
- oB: function() {
- this.wp = !0
- },
- SA: function(a) {
- this.qn = a;
- this.wp || (this.oB(), this.mB())
- }
- });
- b.ha.jv = null;
- b.ha.xz = !0;
- b.ha.Zr = function() {
- b.ha.xz && (b.ha.xz = !1, b.ha.jv = new b.lC, b.ha.jv.ga());
- return b.ha.jv
- };
- b.$I = 60;
- b.ha.qD = 0;
- b.ha.Tv = 1;
- b.ha.rD = 3;
- b.ha.sD = b.ha.Tv;
- b.da === b.Ya ? (p = b.ha.prototype, p.Op = function(a) {
- this.kh = a;
- b.I.dispatchEvent(this.Pn)
- },
- p.WA = function() {},
- p.fv = function(a) {
- this.ab.width = b.ra.width;
- this.ab.height = b.ra.height;
- this.ee = a || b.view;
- b.I && b.I.Mp(!0)
- },
- p.fg = function() {
- var a = this.ee.sc;
- b.l.clearRect( - a.x, a.y, a.width, -a.height)
- },
- p.yi = function() {
- var a = 0,
- a = this.ab.width > this.ab.height ? 0 | this.ab.height / 320 * 24 : 0 | this.ab.width / 320 * 24;
- this.cd = b.A.create("000.0", "Arial", a);
- this.dd = b.A.create("0.000", "Arial", a);
- this.jd = b.A.create("0000", "Arial", a);
- a = b.jq;
- this.jd.Ma(this.jd.width / 2 + a.x, 5 * this.jd.height / 2 + a.y);
- this.dd.Ma(this.dd.width / 2 + a.x, 3 * this.dd.height / 2 + a.y);
- this.cd.Ma(this.cd.width / 2 + a.x, this.cd.height / 2 + a.y)
- },
- p.Pl = function() {
- return this.Ql()
- },
- p.Au = function() {
- return C(0, 0)
- }) : (b.ha.Ji = new Image, b.ka(b.ha.Ji, "load",
- function() {
- b.ha.rx = !0
- }), b.Ji && (b.ha.Ji.src = b.Ji), b.assert("function" === typeof b.p.lq, b.c.Gb, "CCDirectorWebGL.js"), b.p.lq(), delete b.p.lq);
- b.bk = b.oa.extend({
- Uk: null,
- Vk: null,
- Wk: null,
- ui: null,
- vi: null,
- wi: null,
- Cl: null,
- Dl: null,
- El: null,
- Yb: null,
- jo: null,
- ctor: function() {
- this.jo = new b.re;
- this.restore()
- },
- description: function() {
- return "\x3cCCCamera | center \x3d(" + this.ui + "," + this.vi + "," + this.wi + ")\x3e"
- },
- XA: function(a) {
- this.Yb = a
- },
- iA: function() {
- return this.Yb
- },
- restore: function() {
- this.Uk = this.Vk = 0;
- this.Wk = b.bk.Rl();
- this.Cl = this.ui = this.vi = this.wi = 0;
- this.Dl = 1;
- this.El = 0;
- b.NV(this.jo);
- this.Yb = !1
- },
- nA: function() {
- if (this.Yb) {
- var a = new b.Ej,
- c = new b.Ej,
- d = new b.Ej;
- b.Vl(a, this.Uk, this.Vk, this.Wk);
- b.Vl(c, this.ui, this.vi, this.wi);
- b.Vl(d, this.Cl, this.Dl, this.El);
- b.qL(this.jo, a, c, d);
- this.Yb = !1
- }
- b.Qu(this.jo)
- },
- lY: function(a, c, d) {
- this.YA(a, c, d)
- },
- YA: function(a, c, d) {
- this.Uk = a;
- this.Vk = c;
- this.Wk = d;
- this.Yb = !0
- },
- ZX: function(a, c, d) {
- this.AM(a, c, d)
- },
- AM: function(a, c, d) {
- this.ui = a;
- this.vi = c;
- this.wi = d;
- this.Yb = !0
- },
- WY: function(a, c, d) {
- this.hN(a, c, d)
- },
- hN: function(a, c, d) {
- this.Cl = a;
- this.Dl = c;
- this.El = d;
- this.Yb = !0
- },
- eU: function() {
- return {
- x: this.Uk,
- y: this.Vk,
- z: this.Wk
- }
- },
- Ez: function() {
- return {
- x: this.Uk,
- y: this.Vk,
- z: this.Wk
- }
- },
- OT: function() {
- return {
- x: this.ui,
- y: this.vi,
- z: this.wi
- }
- },
- Dz: function() {
- return {
- x: this.ui,
- y: this.vi,
- z: this.wi
- }
- },
- aV: function() {
- return {
- x: this.Cl,
- y: this.Dl,
- z: this.El
- }
- },
- GK: function() {
- return {
- x: this.Cl,
- y: this.Dl,
- z: this.El
- }
- },
- JQ: function() {}
- });
- b.bk.Rl = function() {
- return b.Nm
- };
- b.SP = b.Xm + 1;
- b.qj = function(a, c) {
- if (a && 0 < a.length) for (var d = 0; d < a.length; d++) if (! (a[d] instanceof c)) return b.log(b.c.qj),
- !1;
- return ! 0
- };
- b.Wc = function(a, c) {
- for (var d = 0,
- e = a.length; d < e; d++) if (a[d] == c) {
- a.splice(d, 1);
- break
- }
- };
- b.SR = function(a, c) {
- for (var d = 0,
- e = c.length; d < e; d++) b.Wc(a, c[d])
- };
- b.RR = function(a, c, d) {
- a.splice.apply(a, [d, 0].concat(c));
- return a
- };
- b.Kv = function(a, c, d) {
- this.next = null;
- this.target = a;
- this.TL = c;
- this.paused = d;
- this.zp = !1
- };
- b.Hv = function(a, c, d) {
- this.list = a;
- this.Mh = c;
- this.target = d;
- this.Eu = null
- };
- b.DC = function(a, c) {
- this.gf = null;
- this.target = a;
- this.Uj = 0;
- this.Ll = this.Kl = null;
- this.paused = c;
- this.Eu = null
- };
- b.cw = b.oa.extend({
- rg: 0,
- eg: null,
- No: null,
- Ta: 0,
- wy: !1,
- Vo: !1,
- jj: 0,
- Ps: 0,
- En: 0,
- pU: function() {
- return this.rg
- },
- setInterval: function(a) {
- this.rg = a
- },
- NT: function() {
- return this.eg
- },
- ctor: function(a, c, d, e, f) {
- this.No = a;
- this.eg = c;
- this.Ta = -1;
- this.rg = d || 0;
- this.En = f || 0;
- this.Vo = 0 < this.En;
- this.Ps = null == e ? b.Ak: e;
- this.wy = this.Ps == b.Ak
- },
- Kr: function() {
- if ("string" == typeof this.eg) this.No[this.eg](this.Ta);
- else this.eg.call(this.No, this.Ta)
- },
- update: function(a) {
- if ( - 1 == this.Ta) this.jj = this.Ta = 0;
- else {
- var c = this.No,
- d = this.eg;
- this.Ta += a;
- this.wy && !this.Vo ? this.Ta >= this.rg && (c && d && this.Kr(), this.Ta = 0) : (this.Vo ? this.Ta >= this.En && (c && d && this.Kr(), this.Ta -= this.En, this.jj += 1, this.Vo = !1) : this.Ta >= this.rg && (c && d && this.Kr(), this.Ta = 0, this.jj += 1), this.jj > this.Ps && b.Qa.Ig().zB(c, d))
- }
- }
- });
- b.Bk = b.oa.extend({
- Bl: 1,
- zh: null,
- qf: null,
- rn: null,
- pf: null,
- NQ: null,
- Cc: null,
- Fe: !1,
- Ro: !1,
- ctor: function() {
- this.Bl = 1;
- this.zh = [[], [], []];
- this.qf = {};
- this.rn = [];
- this.pf = {};
- this.Lk = [];
- this.Cc = null;
- this.Ro = this.Fe = !1
- },
- Os: function(a) {
- delete this.pf[a.target.L];
- b.Wc(this.Lk, a);
- a.cw = null;
- a.target = null
- },
- ny: function(a) {
- if (a = this.qf[a.target.L]) b.Wc(a.list, a.Mh),
- delete this.qf[a.target.L],
- b.Wc(this.rn, a),
- a.Mh = null,
- a.target = null
- },
- dy: function(a, c, d, e) {
- e = new b.Kv(c, d, e);
- if (a) {
- for (var f = a.length - 1,
- g = 0; g <= f && !(d < a[g].TL); g++);
- a.splice(g, 0, e)
- } else a = [],
- a.push(e);
- d = new b.Hv(a, e, c);
- this.rn.push(d);
- this.qf[c.L] = d;
- return a
- },
- nF: function(a, c, d) {
- d = new b.Kv(c, 0, d);
- a.push(d);
- a = new b.Hv(a, d, c);
- this.rn.push(a);
- this.qf[c.L] = a
- },
- UY: function(a) {
- this.Bl = a
- },
- XU: function() {
- return this.Bl
- },
- update: function(a) {
- var c = this.zh,
- d = this.Lk,
- e, f, g;
- this.Ro = !0;
- 1 != this.Bl && (a *= this.Bl);
- f = 0;
- for (g = c.length; f < g && 0 <= f; f++) for (var h = this.zh[f], k = 0, m = h.length; k < m; k++) e = h[k],
- e.paused || e.zp || e.target.update(a);
- f = 0;
- for (g = d.length; f < g; f++) {
- e = d[f];
- if (!e) break;
- this.Cc = e;
- this.Fe = !1;
- if (!e.paused) for (e.Uj = 0; e.Uj < e.gf.length; e.Uj++) e.Kl = e.gf[e.Uj],
- e.Ll = !1,
- e.Kl.update(a),
- e.Kl = null;
- this.Fe && 0 == e.gf.length && (this.Os(e), f--)
- }
- f = 0;
- for (g = c.length; f < g; f++) for (h = this.zh[f], k = 0, m = h.length; k < m;) {
- e = h[k];
- if (!e) break;
- e.zp ? this.ny(e) : k++
- }
- this.Ro = !1;
- this.Cc = null
- },
- qM: function(a, c, d, e, f, g) {
- b.assert(c, b.c.FD);
- b.assert(a, b.c.GD);
- d = d || 0;
- e = null == e ? b.Ak: e;
- f = f || 0;
- g = g || !1;
- var h = this.pf[a.L];
- h || (h = new b.DC(a, g), this.Lk.push(h), this.pf[a.L] = h);
- if (null == h.gf) h.gf = [];
- else for (var k = 0; k < h.gf.length; k++) if (g = h.gf[k], c == g.eg) {
- b.log(b.c.ED, g.rg.toFixed(4), d.toFixed(4));
- g.rg = d;
- return
- }
- g = new b.cw(a, c, d, e, f);
- h.gf.push(g)
- },
- bv: function(a, c, d) {
- if (null !== a) {
- var e = this.zh,
- f = this.qf[a.L];
- f ? f.Mh.zp = !1 : 0 == c ? this.nF(e[1], a, d) : 0 > c ? e[0] = this.dy(e[0], a, c, d) : e[2] = this.dy(e[2], a, c, d)
- }
- },
- zB: function(a, c) {
- if (null != a && null != c) {
- var d = this.pf[a.L];
- if (d) for (var e = d.gf,
- f = 0,
- g = e.length; f < g; f++) {
- var h = e[f];
- if (c == h.eg) {
- h != d.Kl || d.Ll || (d.Ll = !0);
- e.splice(f, 1);
- d.Uj >= f && d.Uj--;
- 0 == e.length && (this.Cc == d ? this.Fe = !0 : this.Os(d));
- break
- }
- }
- }
- },
- nm: function(a) {
- null != a && (a = this.qf[a.L], null != a && (this.Ro ? a.Mh.zp = !0 : this.ny(a.Mh)))
- },
- yB: function(a) {
- if (null != a) {
- var c = this.pf[a.L];
- if (c) {
- var d = c.gf; ! c.Ll && 0 <= d.indexOf(c.Kl) && (c.Ll = !0);
- d.length = 0;
- this.Cc == c ? this.Fe = !0 : this.Os(c)
- }
- this.nm(a)
- }
- },
- Tp: function() {
- this.RN(b.Bk.Xm)
- },
- RN: function(a) {
- for (var c = this.Lk,
- d = this.zh,
- e = 0,
- f = c.length; e < f; e++) this.yB(c[e].target);
- for (e = 2; 0 <= e; e--) if (! (1 == e && 0 < a || 0 == e && 0 <= a)) for (var c = d[e], f = 0, g = c.length; f < g; f++) this.nm(c[f].target)
- },
- XW: function() {
- return this.IL(b.Bk.Xm)
- },
- IL: function() {
- for (var a = [], c, d = this.Lk, e = this.zh, f = 0, g = d.length; f < g; f++) if (c = d[f]) c.paused = !0,
- a.push(c.target);
- f = 0;
- for (g = e.length; f < g; f++) for (var d = e[f], h = 0, k = d.length; h < k; h++) if (c = d[h]) c.paused = !0,
- a.push(c.target);
- return a
- },
- kM: function(a) {
- if (a) for (var c = 0; c < a.length; c++) this.Qf(a[c])
- },
- Lj: function(a) {
- b.assert(a, b.c.CD);
- var c = this.pf[a.L];
- c && (c.paused = !0); (a = this.qf[a.L]) && (a.Mh.paused = !0)
- },
- Qf: function(a) {
- b.assert(a, b.c.DD);
- var c = this.pf[a.L];
- c && (c.paused = !1); (a = this.qf[a.L]) && (a.Mh.paused = !1)
- },
- JV: function(a) {
- b.assert(a, b.c.BD);
- return (a = this.pf[a.L]) ? a.paused: !1
- }
- });
- b.Bk.Xm = -2147483648;
- b.Pv = 2 * Math.PI;
- b.Cv = b.oa.extend({
- yr: [],
- l: null,
- ctor: function(a) {
- this.l = a
- },
- gJ: function(a, c) {
- c || (c = 1);
- var d = b.view.O,
- e = C(a.x * d, a.y * b.view.ma);
- this.l.beginPath();
- this.l.arc(e.x, -e.y, c * d, 0, 2 * Math.PI, !1);
- this.l.closePath();
- this.l.fill()
- },
- hJ: function(a, c, d) {
- if (null != a) {
- d || (d = 1);
- c = this.l;
- var e = b.view.O,
- f = b.view.ma;
- c.beginPath();
- for (var g = 0,
- h = a.length; g < h; g++) c.arc(a[g].x * e, -a[g].y * f, d * e, 0, 2 * Math.PI, !1);
- c.closePath();
- c.fill()
- }
- },
- Jf: function(a, c) {
- var d = this.l,
- e = b.view.O,
- f = b.view.ma;
- d.beginPath();
- d.moveTo(a.x * e, -a.y * f);
- d.lineTo(c.x * e, -c.y * f);
- d.closePath();
- d.stroke()
- },
- ku: function(a, c) {
- this.Jf(C(a.x, a.y), C(c.x, a.y));
- this.Jf(C(c.x, a.y), C(c.x, c.y));
- this.Jf(C(c.x, c.y), C(a.x, c.y));
- this.Jf(C(a.x, c.y), C(a.x, a.y))
- },
- lJ: function(a, c, d) {
- this.mu([a, C(c.x, a.y), c, C(a.x, c.y)], 4, d)
- },
- gc: function(a, c, d, e) {
- e = e || !1;
- if (null != a) {
- if (3 > a.length) throw Error("Polygon's point must greater than 2");
- var f = a[0];
- c = this.l;
- var g = b.view.O,
- h = b.view.ma;
- c.beginPath();
- c.moveTo(f.x * g, -f.y * h);
- for (var f = 1,
- k = a.length; f < k; f++) c.lineTo(a[f].x * g, -a[f].y * h);
- d && c.closePath();
- e ? c.fill() : c.stroke()
- }
- },
- mu: function(a, c, d) {
- this.Rj(d.r, d.g, d.b, d.a);
- this.gc(a, c, !0, !0)
- },
- hu: function(a, c, d, e, f) {
- f = f || !1;
- e = this.l;
- var g = b.view.O,
- h = b.view.ma;
- e.beginPath();
- e.arc(0 | a.x * g, 0 | -(a.y * h), c * g, -d, -(d - 2 * Math.PI), !1);
- f && e.lineTo(0 | a.x * g, 0 | -(a.y * h));
- e.stroke()
- },
- ju: function(a, c, d, e) {
- for (var f = this.yr,
- g = f.length = 0,
- h = 0; h < e; h++) f.push(C(Math.pow(1 - g, 2) * a.x + 2 * (1 - g) * g * c.x + g * g * d.x, Math.pow(1 - g, 2) * a.y + 2 * (1 - g) * g * c.y + g * g * d.y)),
- g += 1 / e;
- f.push(C(d.x, d.y));
- this.gc(f, e + 1, !1, !1)
- },
- iu: function(a, c, d, e, f) {
- for (var g = this.yr,
- h = g.length = 0,
- k = 0; k < f; k++) g.push(C(Math.pow(1 - h, 3) * a.x + 3 * Math.pow(1 - h, 2) * h * c.x + 3 * (1 - h) * h * h * d.x + h * h * h * e.x, Math.pow(1 - h, 3) * a.y + 3 * Math.pow(1 - h, 2) * h * c.y + 3 * (1 - h) * h * h * d.y + h * h * h * e.y)),
- h += 1 / f;
- g.push(C(e.x, e.y));
- this.gc(g, f + 1, !1, !1)
- },
- gu: function(a, c) {
- this.Lh(a, 0.5, c)
- },
- Lh: function(a, c, d) {
- b.l.strokeStyle = "rgba(255,255,255,1)";
- var e = this.yr;
- e.length = 0;
- for (var f, g, h = 1 / a.length,
- k = 0; k < d + 1; k++) g = k / d,
- 1 == g ? (f = a.length - 1, g = 1) : (f = 0 | g / h, g = (g - h * f) / h),
- f = b.aC(b.Fb(a, f - 1), b.Fb(a, f - 0), b.Fb(a, f + 1), b.Fb(a, f + 2), c, g),
- e.push(f);
- this.gc(e, d + 1, !1, !1)
- },
- drawImage: function(a, c, d, e, f) {
- switch (arguments.length) {
- case 2:
- this.l.drawImage(a, c.x, -(c.y + a.height));
- break;
- case 3:
- this.l.drawImage(a, c.x, -(c.y + d.height), d.width, d.height);
- break;
- case 5:
- this.l.drawImage(a, c.x, c.y, d.width, d.height, e.x, -(e.y + f.height), f.width, f.height);
- break;
- default:
- throw Error("Argument must be non-nil");
- }
- },
- BS: function(a, c, d) {
- a = a || this.l;
- c *= b.view.O;
- d = "rgba(" + (0 | d.r) + "," + (0 | d.g) + "," + (0 | d.b);
- a.fillStyle = d + ",1)";
- var e = c / 10;
- a.beginPath();
- a.moveTo( - c, c);
- a.lineTo(0, e);
- a.lineTo(c, c);
- a.lineTo(e, 0);
- a.lineTo(c, -c);
- a.lineTo(0, -e);
- a.lineTo( - c, -c);
- a.lineTo( - e, 0);
- a.lineTo( - c, c);
- a.closePath();
- a.fill();
- var f = a.createRadialGradient(0, 0, e, 0, 0, c);
- f.addColorStop(0, d + ", 1)");
- f.addColorStop(0.3, d + ", 0.8)");
- f.addColorStop(1, d + ", 0.0)");
- a.fillStyle = f;
- a.beginPath();
- a.arc(0, 0, c - e, 0, b.Pv, !1);
- a.closePath();
- a.fill()
- },
- zS: function(a, c, d) {
- a = a || this.l;
- c *= b.view.O;
- d = "rgba(" + (0 | d.r) + "," + (0 | d.g) + "," + (0 | d.b);
- var e = a.createRadialGradient(0, 0, c / 10, 0, 0, c);
- e.addColorStop(0, d + ", 1)");
- e.addColorStop(0.3, d + ", 0.8)");
- e.addColorStop(0.6, d + ", 0.4)");
- e.addColorStop(1, d + ", 0.0)");
- a.fillStyle = e;
- a.beginPath();
- a.arc(0, 0, c, 0, b.Pv, !1);
- a.closePath();
- a.fill()
- },
- fillText: function(a, c, d) {
- this.l.fillText(a, c, -d)
- },
- Rj: function(a, c, d, e) {
- this.l.fillStyle = "rgba(" + a + "," + c + "," + d + "," + e / 255 + ")";
- this.l.strokeStyle = "rgba(" + a + "," + c + "," + d + "," + e / 255 + ")"
- },
- SM: function() {},
- ev: function(a) {
- this.l.lineWidth = a * b.view.O
- }
- });
- b.oC = b.oa.extend({
- l: null,
- al: !1,
- ib: null,
- Ee: -1,
- Nc: null,
- Fs: -1,
- Es: -1,
- ctor: function(a) {
- null == a && (a = b.l);
- if (!a instanceof WebGLRenderingContext) throw "Can't initialise DrawingPrimitiveWebGL. context need is WebGLRenderingContext";
- this.l = a;
- this.Nc = new Float32Array([1, 1, 1, 1])
- },
- Lf: function() {
- this.al || (this.ib = b.ff.Of(b.AD), this.Ee = this.l.getUniformLocation(this.ib.Iz(), "u_color"), this.Fs = this.l.getUniformLocation(this.ib.Iz(), "u_pointSize"), this.al = !0)
- },
- AS: function() {
- this.al = !1
- },
- gJ: function(a) {
- this.Lf();
- var c = this.l;
- this.ib.wc();
- this.ib.xd();
- b.tc(b.Lc);
- c.uniform4fv(this.Ee, this.Nc);
- this.ib.gN(this.Fs, this.Es);
- var d = c.createBuffer();
- c.bindBuffer(c.ARRAY_BUFFER, d);
- c.bufferData(c.ARRAY_BUFFER, new Float32Array([a.x, a.y]), c.STATIC_DRAW);
- c.vertexAttribPointer(b.lc, 2, c.FLOAT, !1, 0, 0);
- c.drawArrays(c.POINTS, 0, 1);
- c.deleteBuffer(d);
- b.Ze()
- },
- hJ: function(a) {
- if (a && 0 != a.length) {
- this.Lf();
- var c = this.l;
- this.ib.wc();
- this.ib.xd();
- b.tc(b.Lc);
- c.uniform4fv(this.Ee, this.Nc);
- this.ib.gN(this.Fs, this.Es);
- var d = c.createBuffer();
- c.bindBuffer(c.ARRAY_BUFFER, d);
- c.bufferData(c.ARRAY_BUFFER, this.uo(a), c.STATIC_DRAW);
- c.vertexAttribPointer(b.lc, 2, c.FLOAT, !1, 0, 0);
- c.drawArrays(c.POINTS, 0, a.length);
- c.deleteBuffer(d);
- b.Ze()
- }
- },
- uo: function(a) {
- for (var c = new Float32Array(2 * a.length), d = 0; d < a.length; d++) c[2 * d] = a[d].x,
- c[2 * d + 1] = a[d].y;
- return c
- },
- Jf: function(a, c) {
- this.Lf();
- var d = this.l;
- this.ib.wc();
- this.ib.xd();
- b.tc(b.Lc);
- d.uniform4fv(this.Ee, this.Nc);
- var e = d.createBuffer();
- d.bindBuffer(d.ARRAY_BUFFER, e);
- d.bufferData(d.ARRAY_BUFFER, this.uo([a, c]), d.STATIC_DRAW);
- d.vertexAttribPointer(b.lc, 2, d.FLOAT, !1, 0, 0);
- d.drawArrays(d.LINES, 0, 2);
- d.deleteBuffer(e);
- b.Ze()
- },
- ku: function(a, c) {
- this.Jf(C(a.x, a.y), C(c.x, a.y));
- this.Jf(C(c.x, a.y), C(c.x, c.y));
- this.Jf(C(c.x, c.y), C(a.x, c.y));
- this.Jf(C(a.x, c.y), C(a.x, a.y))
- },
- lJ: function(a, c, d) {
- this.mu([a, C(c.x, a.y), c, C(a.x, c.y)], 4, d)
- },
- gc: function(a, c, d) {
- this.Lf();
- c = this.l;
- this.ib.wc();
- this.ib.xd();
- b.tc(b.Lc);
- c.uniform4fv(this.Ee, this.Nc);
- var e = c.createBuffer();
- c.bindBuffer(c.ARRAY_BUFFER, e);
- c.bufferData(c.ARRAY_BUFFER, this.uo(a), c.STATIC_DRAW);
- c.vertexAttribPointer(b.lc, 2, c.FLOAT, !1, 0, 0);
- d ? c.drawArrays(c.LINE_LOOP, 0, a.length) : c.drawArrays(c.LINE_STRIP, 0, a.length);
- c.deleteBuffer(e);
- b.Ze()
- },
- mu: function(a, c, d) {
- this.Lf();
- d && this.Rj(d.r, d.g, d.b, d.a);
- c = this.l;
- this.ib.wc();
- this.ib.xd();
- b.tc(b.Lc);
- c.uniform4fv(this.Ee, this.Nc);
- d = c.createBuffer();
- c.bindBuffer(c.ARRAY_BUFFER, d);
- c.bufferData(c.ARRAY_BUFFER, this.uo(a), c.STATIC_DRAW);
- c.vertexAttribPointer(b.lc, 2, c.FLOAT, !1, 0, 0);
- c.drawArrays(c.TRIANGLE_FAN, 0, a.length);
- c.deleteBuffer(d);
- b.Ze()
- },
- hu: function(a, c, d, e, f) {
- this.Lf();
- var g = 1;
- f && g++;
- var h = 2 * Math.PI / e;
- if (f = new Float32Array(2 * (e + 2))) {
- for (var k = 0; k <= e; k++) {
- var m = k * h,
- n = c * Math.sin(m + d) + a.y;
- f[2 * k] = c * Math.cos(m + d) + a.x;
- f[2 * k + 1] = n
- }
- f[2 * (e + 1)] = a.x;
- f[2 * (e + 1) + 1] = a.y;
- a = this.l;
- this.ib.wc();
- this.ib.xd();
- b.tc(b.Lc);
- a.uniform4fv(this.Ee, this.Nc);
- c = a.createBuffer();
- a.bindBuffer(a.ARRAY_BUFFER, c);
- a.bufferData(a.ARRAY_BUFFER, f, a.STATIC_DRAW);
- a.vertexAttribPointer(b.lc, 2, a.FLOAT, !1, 0, 0);
- a.drawArrays(a.LINE_STRIP, 0, e + g);
- a.deleteBuffer(c);
- b.Ze()
- }
- },
- ju: function(a, c, d, e) {
- this.Lf();
- for (var f = new Float32Array(2 * (e + 1)), g = 0, h = 0; h < e; h++) f[2 * h] = Math.pow(1 - g, 2) * a.x + 2 * (1 - g) * g * c.x + g * g * d.x,
- f[2 * h + 1] = Math.pow(1 - g, 2) * a.y + 2 * (1 - g) * g * c.y + g * g * d.y,
- g += 1 / e;
- f[2 * e] = d.x;
- f[2 * e + 1] = d.y;
- a = this.l;
- this.ib.wc();
- this.ib.xd();
- b.tc(b.Lc);
- a.uniform4fv(this.Ee, this.Nc);
- c = a.createBuffer();
- a.bindBuffer(a.ARRAY_BUFFER, c);
- a.bufferData(a.ARRAY_BUFFER, f, a.STATIC_DRAW);
- a.vertexAttribPointer(b.lc, 2, a.FLOAT, !1, 0, 0);
- a.drawArrays(a.LINE_STRIP, 0, e + 1);
- a.deleteBuffer(c);
- b.Ze()
- },
- iu: function(a, c, d, e, f) {
- this.Lf();
- for (var g = new Float32Array(2 * (f + 1)), h = 0, k = 0; k < f; k++) g[2 * k] = Math.pow(1 - h, 3) * a.x + 3 * Math.pow(1 - h, 2) * h * c.x + 3 * (1 - h) * h * h * d.x + h * h * h * e.x,
- g[2 * k + 1] = Math.pow(1 - h, 3) * a.y + 3 * Math.pow(1 - h, 2) * h * c.y + 3 * (1 - h) * h * h * d.y + h * h * h * e.y,
- h += 1 / f;
- g[2 * f] = e.x;
- g[2 * f + 1] = e.y;
- a = this.l;
- this.ib.wc();
- this.ib.xd();
- b.tc(b.Lc);
- a.uniform4fv(this.Ee, this.Nc);
- c = a.createBuffer();
- a.bindBuffer(a.ARRAY_BUFFER, c);
- a.bufferData(a.ARRAY_BUFFER, g, a.STATIC_DRAW);
- a.vertexAttribPointer(b.lc, 2, a.FLOAT, !1, 0, 0);
- a.drawArrays(a.LINE_STRIP, 0, f + 1);
- a.deleteBuffer(c);
- b.Ze()
- },
- gu: function(a, c) {
- this.Lh(a, 0.5, c)
- },
- Lh: function(a, c, d) {
- this.Lf();
- for (var e = new Float32Array(2 * (d + 1)), f, g, h = 1 / a.length, k = 0; k < d + 1; k++) g = k / d,
- 1 == g ? (f = a.length - 1, g = 1) : (f = 0 | g / h, g = (g - h * f) / h),
- f = b.aC(b.Fb(a, f - 1), b.Fb(a, f), b.Fb(a, f + 1), b.Fb(a, f + 2), c, g),
- e[2 * k] = f.x,
- e[2 * k + 1] = f.y;
- a = this.l;
- this.ib.wc();
- this.ib.xd();
- b.tc(b.Lc);
- a.uniform4fv(this.Ee, this.Nc);
- c = a.createBuffer();
- a.bindBuffer(a.ARRAY_BUFFER, c);
- a.bufferData(a.ARRAY_BUFFER, e, a.STATIC_DRAW);
- a.vertexAttribPointer(b.lc, 2, a.FLOAT, !1, 0, 0);
- a.drawArrays(a.LINE_STRIP, 0, d + 1);
- a.deleteBuffer(c);
- b.Ze()
- },
- Rj: function(a, c, d, e) {
- this.Nc[0] = a / 255;
- this.Nc[1] = c / 255;
- this.Nc[2] = d / 255;
- this.Nc[3] = e / 255
- },
- SM: function(a) {
- this.Es = a * b.Ka()
- },
- ev: function(a) {
- this.l.lineWidth && this.l.lineWidth(a)
- }
- });
- b.p.hr = function() {
- var a = b.A.prototype;
- a.V = b.B.prototype.V;
- a.Uc = function() {
- this.ua = !0;
- var a = this.sh,
- d = this.uh;
- this.Do = "rgba(128,128,128," + this.Cf + ")";
- this.Rn = "rgba(" + (0 | d.r) + "," + (0 | d.g) + "," + (0 | d.b) + ", 1)";
- this.Io = "rgba(" + (0 | a.r) + "," + (0 | a.g) + "," + (0 | a.b) + ", 1)"
- };
- a.sb = b.B.prototype.sb;
- a.Ga = b.B.prototype.Ga;
- a.kb = b.B.prototype.kb;
- a.Hu = function(a, d) {
- if (!b.B.prototype.ga.call(this)) return ! 1;
- this.shaderProgram = b.ff.Of(b.A.cF);
- this.Jt(d, !1);
- this.string = a;
- return ! 0
- };
- a.Np = function(a) {
- var d = this.uh;
- if (d.r != a.r || d.g != a.g || d.b != a.b) d.r = a.r,
- d.g = a.g,
- d.b = a.b,
- this.Uc(),
- this.ua = !0
- };
- a.na = function(a) {
- if (this.Ja && "" != this.Ja) {
- a = a || b.l;
- var d = this.ea;
- d && d.xb && (this.Jb.wc(), this.Jb.xd(), b.Ph(this.t.src, this.t.Y), b.qe(d), b.tc(b.gn), a.bindBuffer(a.ARRAY_BUFFER, this.wo), this.Dc && (a.bufferData(a.ARRAY_BUFFER, this.Pa.Xo, a.STATIC_DRAW), this.Dc = !1), a.vertexAttribPointer(b.lc, 3, a.FLOAT, !1, 24, 0), a.vertexAttribPointer(b.Dk, 2, a.FLOAT, !1, 24, 16), a.vertexAttribPointer(b.Ck, 4, a.UNSIGNED_BYTE, !0, 24, 12), a.drawArrays(a.TRIANGLE_STRIP, 0, 4));
- if (1 === b.Uf) a = this.Pa,
- b.Hd.gc([C(a.ya.e.x, a.ya.e.y), C(a.wa.e.x, a.wa.e.y), C(a.xa.e.x, a.xa.e.y), C(a.za.e.x, a.za.e.y)], 4, !0);
- else if (2 === b.Uf) {
- a = this.Pz();
- var d = this.offsetX,
- e = this.offsetY;
- b.Hd.gc([C(d, e), C(d + a.width, e), C(d + a.width, e + a.height), C(d, e + a.height)], 4, !0)
- }
- b.We++
- }
- };
- a.Ha = b.B.prototype.Ha
- };
- b.p.Hq = function() {
- var a = b.A.prototype;
- b.k(a, "color", a.Nh, a.V);
- b.k(a, "opacity", a.wj, a.Ga);
- b.k(a, "string", a.Nl, a.ic);
- b.k(a, "textAlign", a.eK, a.LM);
- b.k(a, "verticalAlign", a.KK, a.kN);
- b.k(a, "fontSize", a.bK, a.JM);
- b.k(a, "fontName", a.aK, a.IM);
- b.k(a, "font", a.$F, a.zH);
- b.k(a, "boundingWidth", a.Xr, a.vH);
- b.k(a, "boundingHeight", a.YF, a.uH);
- b.k(a, "fillStyle", a.ZF, a.Np);
- b.k(a, "strokeStyle", a.sG, a.LH);
- b.k(a, "lineWidth", a.fG, a.BH);
- b.k(a, "shadowOffsetX", a.oG, a.FH);
- b.k(a, "shadowOffsetY", a.pG, a.GH);
- b.k(a, "shadowOpacity", a.qG, a.HH);
- b.k(a, "shadowBlur", a.nG, a.EH)
- };
- b.A = b.B.extend({
- Za: null,
- qg: b.Yg,
- Cg: b.Ek,
- nc: null,
- Zb: 0,
- Ja: "",
- zs: null,
- Si: !1,
- ae: null,
- Kb: !1,
- Rb: null,
- Cf: 0,
- wg: 0,
- Do: null,
- Nd: !1,
- sh: null,
- Ef: 0,
- Io: null,
- uh: null,
- Rn: null,
- ut: 0,
- vt: 0,
- ua: !1,
- fo: null,
- ho: null,
- Nx: null,
- Mc: "LabelTTF",
- ctor: function(a, c, d, e, f, g) {
- b.B.prototype.ctor.call(this);
- this.Za = D(0, 0);
- this.qg = b.cn;
- this.Cg = b.Ek;
- this.Da = !1;
- this.ae = "";
- this.nc = "Arial";
- this.Kb = this.Si = !1;
- this.Rb = C(0, 0);
- this.wg = this.Cf = 0;
- this.Do = "rgba(128, 128, 128, 0.5)";
- this.Nd = !1;
- this.sh = b.color(255, 255, 255, 255);
- this.Ef = 0;
- this.Io = "";
- this.uh = b.color(255, 255, 255, 255);
- this.Rn = "rgba(255,255,255,1)";
- this.vt = this.ut = 0;
- this.ua = !1;
- this.Nx = [];
- this.Uc();
- c && c instanceof b.Fv ? this.Hu(a, c) : b.A.prototype.Qd.call(this, a, c, d, e, f, g)
- },
- ga: function() {
- return this.Qd(" ", this.nc, this.Zb)
- },
- TG: function() {
- this.$r().font = this.ae
- },
- Vi: function(a) {
- return this.$r().measureText(a).width
- },
- description: function() {
- return "\x3ccc.LabelTTF | FontName \x3d" + this.nc + " FontSize \x3d " + this.Zb.toFixed(1) + "\x3e"
- },
- V: null,
- Uc: null,
- sb: null,
- Ga: null,
- kb: null,
- wZ: function(a) {
- b.m.prototype.kb.call(this, a);
- this.Uc()
- },
- Nl: function() {
- return this.Ja
- },
- eK: function() {
- return this.qg
- },
- KK: function() {
- return this.Cg
- },
- $T: function() {
- return D(this.Za)
- },
- bK: function() {
- return this.Zb
- },
- aK: function() {
- return this.nc
- },
- Qd: function(a, c, d, e, f, g) {
- a = a ? a + "": "";
- d = d || 16;
- e = e || D(0, d);
- f = f || b.cn;
- g = g || b.Ek;
- this.Da = !1;
- this.Za = D(e.width, e.height);
- this.nc = c || "Arial";
- this.qg = f;
- this.Cg = g;
- this.Zb = d;
- this.ae = this.Zb + "px '" + c + "'";
- this.He = b.A.Gk(c, this.Zb);
- this.string = a;
- this.Uc();
- this.It();
- this.ua = !1;
- return ! 0
- },
- Hu: null,
- TY: function(a) {
- a && this.Jt(a, !0)
- },
- WU: function() {
- return this.hH(!1)
- },
- wJ: function(a, c, d, e) {
- d = d || 0.5; ! 1 === this.Kb && (this.Kb = !0);
- var f = this.Rb;
- if (f && f.x != a || f.Hc != c) f.x = a,
- f.y = c;
- this.Cf != d && (this.Cf = d);
- this.Uc();
- this.wg != e && (this.wg = e);
- this.ua = !0
- },
- oG: function() {
- return this.Rb.x
- },
- FH: function(a) { ! 1 === this.Kb && (this.Kb = !0);
- this.Rb.x != a && (this.Rb.x = a, this.ua = !0)
- },
- pG: function() {
- return this.Rb.Hc
- },
- GH: function(a) { ! 1 === this.Kb && (this.Kb = !0);
- this.Rb.Hc != a && (this.Rb.Hc = a, this.ua = !0)
- },
- dR: function() {
- return C(this.Rb.x, this.Rb.y)
- },
- tR: function(a) { ! 1 === this.Kb && (this.Kb = !0);
- if (this.Rb.x != a.x || this.Rb.y != a.y) this.Rb.x = a.x,
- this.Rb.y = a.y,
- this.ua = !0
- },
- qG: function() {
- return this.Cf
- },
- HH: function(a) { ! 1 === this.Kb && (this.Kb = !0);
- this.Cf != a && (this.Cf = a, this.Uc(), this.ua = !0)
- },
- nG: function() {
- return this.wg
- },
- EH: function(a) { ! 1 === this.Kb && (this.Kb = !0);
- this.wg != a && (this.wg = a, this.ua = !0)
- },
- vS: function() {
- this.Kb && (this.Kb = !1, this.ua = !0)
- },
- xJ: function(a, c) { ! 1 === this.Nd && (this.Nd = !0);
- var d = this.sh;
- if (d.r !== a.r || d.g !== a.g || d.b !== a.b) d.r = a.r,
- d.g = a.g,
- d.b = a.b,
- this.Uc();
- this.Ef !== c && (this.Ef = c || 0);
- this.ua = !0
- },
- sG: function() {
- return this.sh
- },
- LH: function(a) { ! 1 === this.Nd && (this.Nd = !0);
- var c = this.sh;
- if (c.r !== a.r || c.g !== a.g || c.b !== a.b) c.r = a.r,
- c.g = a.g,
- c.b = a.b,
- this.Uc(),
- this.ua = !0
- },
- fG: function() {
- return this.Ef
- },
- BH: function(a) { ! 1 === this.Nd && (this.Nd = !0);
- this.Ef !== a && (this.Ef = a || 0, this.ua = !0)
- },
- wS: function() {
- this.Nd && (this.Nd = !1, this.ua = !0)
- },
- Np: null,
- ZF: function() {
- return this.uh
- },
- Jt: function(a, c) {
- a.AT ? (this.Za.width = a.boundingWidth, this.Za.height = a.boundingHeight) : (this.Za.width = 0, this.Za.height = 0);
- this.qg = a.textAlign;
- this.Cg = a.verticalAlign;
- this.nc = a.fontName;
- this.Zb = a.fontSize || 12;
- this.ae = this.Zb + "px '" + this.nc + "'";
- this.He = b.A.Gk(this.nc, this.Zb);
- a.kB && this.wJ(a.shadowOffsetX, a.shadowOffsetY, a.shadowOpacity, a.shadowBlur);
- a.lv && this.xJ(a.strokeStyle, a.lineWidth);
- this.Np(a.fillStyle);
- c && this.It()
- },
- hH: function(a) {
- var c = new b.Fv;
- a ? (c.fontSize = this.Zb, c.boundingWidth = b.Ka() * this.Za.width, c.boundingHeight = b.Ka() * this.Za.height) : (c.fontSize = this.Zb, c.boundingWidth = this.Za.width, c.boundingHeight = this.Za.height);
- c.fontName = this.nc;
- c.textAlign = this.qg;
- c.verticalAlign = this.Cg;
- if (this.Nd) {
- c.lv = !0;
- var d = this.sh;
- c.strokeStyle = b.color(d.r, d.g, d.b);
- c.lineWidth = this.Ef
- } else c.lv = !1;
- this.Kb ? (c.kB = !0, c.shadowBlur = this.wg, c.shadowOpacity = this.Cf, c.shadowOffsetX = (a ? b.Ka() : 1) * this.Rb.x, c.shadowOffsetY = (a ? b.Ka() : 1) * this.Rb.y) : c.Kb = !1;
- a = this.uh;
- c.fillStyle = b.color(a.r, a.g, a.b);
- return c
- },
- He: 18,
- ic: function(a) {
- a = String(a);
- this.zs != a && (this.zs = a + "", this.To(), this.ua = !0)
- },
- To: function() {
- this.Ja = this.zs
- },
- LM: function(a) {
- a !== this.qg && (this.qg = a, this.ua = !0)
- },
- kN: function(a) {
- a != this.Cg && (this.Cg = a, this.ua = !0)
- },
- gY: function(a, c) {
- var d;
- void 0 === c ? (d = a.width, c = a.height) : d = a;
- if (d != this.Za.width || c != this.Za.height) this.Za.width = d,
- this.Za.height = c,
- this.To(),
- this.ua = !0
- },
- Xr: function() {
- return this.Za.width
- },
- vH: function(a) {
- a != this.Za.width && (this.Za.width = a, this.To(), this.ua = !0)
- },
- YF: function() {
- return this.Za.height
- },
- uH: function(a) {
- a != this.Za.height && (this.Za.height = a, this.To(), this.ua = !0)
- },
- JM: function(a) {
- this.Zb !== a && (this.Zb = a, this.ae = a + "px '" + this.nc + "'", this.He = b.A.Gk(this.nc, a), this.ua = !0)
- },
- IM: function(a) {
- this.nc && this.nc != a && (this.nc = a, this.ae = this.Zb + "px '" + a + "'", this.He = b.A.Gk(a, this.Zb), this.ua = !0)
- },
- $F: function() {
- return this.ae
- },
- zH: function(a) {
- var c = b.A.OF.exec(a);
- c && (this.Zb = parseInt(c[1]), this.nc = c[2], this.ae = a, this.He = b.A.Gk(this.nc, this.Zb), this.ua = !0)
- },
- JF: function(a) {
- if (a) {
- var c = this.ut,
- d = this.vt,
- e = this.v.height - d,
- f = this.Cg,
- g = this.qg,
- h = this.He,
- k = this.Ef;
- a.setTransform(1, 0, 0, 1, 0 + 0.5 * c, e + 0.5 * d);
- a.font != this.ae && (a.font = this.ae);
- a.fillStyle = this.Rn;
- var m = d = 0,
- n = this.Nd;
- n && (a.lineWidth = 2 * k, a.strokeStyle = this.Io);
- this.Kb && (k = this.Rb, a.shadowColor = this.Do, a.shadowOffsetX = k.x, a.shadowOffsetY = -k.y, a.shadowBlur = this.wg);
- a.textBaseline = b.A.YH[f];
- a.textAlign = b.A.XH[g];
- c = this.v.width - c;
- d = g === b.$v ? d + c: g === b.Yg ? d + c / 2 : d + 0;
- if (this.Si) for (g = this.Te.length, f === b.fw ? m = h + e - h * g: f === b.VE && (m = h / 2 + (e - h * g) / 2), f = 0; f < g; f++) c = this.Te[f],
- k = -e + h * f + m,
- n && a.strokeText(c, d, k),
- a.fillText(c, d, k);
- else f !== b.fw && (m = f === b.Ek ? m - e: m - 0.5 * e),
- n && a.strokeText(this.Ja, d, m),
- a.fillText(this.Ja, d, m)
- }
- },
- $r: function() {
- if (this.ho) return this.ho;
- if (!this.fo) {
- var a = b.rb("canvas"),
- c = new b.K;
- c.Mb(a);
- this.texture = c;
- this.fo = a
- }
- return this.ho = this.fo.getContext("2d")
- },
- vF: function(a, c, d) {
- var e = a[c],
- f = this.Vi(e);
- if (f > d && 1 < e.length) {
- for (var g = d / f * e.length | 0,
- h = e.substr(g), k = f - this.Vi(h), m, n = 0, r = 0; k > d && 100 > r++;) g *= d / k,
- g |= 0,
- h = e.substr(g),
- k = f - this.Vi(h);
- for (r = 0; k < d && 100 > r++;) h && (n = (m = b.A.gI.exec(h)) ? m[0].length: 1, m = h),
- g += n,
- h = e.substr(g),
- k = f - this.Vi(h);
- g -= n;
- d = e.substr(0, g);
- b.A.VN && b.A.WH.test(m || h) && (f = b.A.MG.exec(d), g -= f ? f[0].length: 0, m = e.substr(g), d = e.substr(0, g));
- b.A.KF.test(m) && (f = b.A.LG.exec(d)) && d !== f[0] && (g -= f[0].length, m = e.substr(g), d = e.substr(0, g));
- a[c] = m || h;
- a.splice(c, 0, d)
- }
- },
- Uo: function() {
- var a = this.Za.width,
- c, d, e = this.Nx;
- e.length = 0;
- this.Si = !1;
- this.TG();
- if (0 !== a) for (this.Te = this.Ja.split("\n"), c = 0; c < this.Te.length; c++) this.vF(this.Te, c, a);
- else for (this.Te = this.Ja.split("\n"), c = 0, d = this.Te.length; c < d; c++) e.push(this.Vi(this.Te[c]));
- 0 < this.Te.length && (this.Si = !0);
- d = c = 0;
- this.Nd && (c = d = 2 * this.Ef);
- if (this.Kb) {
- var f = this.Rb;
- c += 2 * Math.abs(f.x);
- d += 2 * Math.abs(f.y)
- }
- a = 0 === a ? this.Si ? D(0 | Math.max.apply(Math, e) + c, 0 | this.He * this.Te.length + d) : D(0 | this.Vi(this.Ja) + c, 0 | this.He + d) : 0 === this.Za.height ? this.Si ? D(0 | a + c, 0 | this.He * this.Te.length + d) : D(0 | a + c, 0 | this.He + d) : D(0 | a + c, 0 | this.Za.height + d);
- this.wd(a);
- this.ut = c;
- this.vt = d;
- e = this.Ab;
- this.lb.x = 0.5 * c + (a.width - c) * e.x;
- this.lb.y = 0.5 * d + (a.height - d) * e.y
- },
- ud: function() {
- this.ua && this.Uo();
- return b.B.prototype.ud.call(this)
- },
- Ie: function() {
- this.ua && this.Uo();
- return b.B.prototype.Ie.call(this)
- },
- fh: function() {
- this.ua && this.Uo();
- return b.B.prototype.fh.call(this)
- },
- It: function() {
- var a = this.$r(),
- c = this.fo,
- d = this.v;
- if (0 === this.Ja.length) return c.width = 1,
- c.height = d.height || 1,
- this.ea && this.ea.Fa(),
- this.Ha(E(0, 0, 1, d.height)),
- !0;
- a.font = this.ae;
- this.Uo();
- var e = d.width,
- d = d.height,
- f = c.width == e && c.height == d;
- c.width = e;
- c.height = d;
- f && a.clearRect(0, 0, e, d);
- this.JF(a);
- this.ea && this.ea.Fa();
- this.Ha(E(0, 0, e, d));
- return ! 0
- },
- Ba: function(a) {
- this.Ja && "" != this.Ja && (this.ua && (this.ua = !1, this.It()), b.B.prototype.Ba.call(this, a || b.l))
- },
- na: null,
- Dy: function(a) {
- var c = this.ca ? this.textureAtlas.texture: this.ea;
- if (c) {
- var d = c.pixelsWidth,
- e = c.pixelsHeight,
- f, g = this.Pa;
- this.nb ? (b.vk ? (c = (2 * a.x + 1) / (2 * d), d = c + (2 * a.height - 2) / (2 * d), f = (2 * a.y + 1) / (2 * e), a = f + (2 * a.width - 2) / (2 * e)) : (c = a.x / d, d = (a.x + a.height) / d, f = a.y / e, a = (a.y + a.width) / e), this.gb && (e = f, f = a, a = e), this.hb && (e = c, c = d, d = e), g.wa.f.R = c, g.wa.f.S = f, g.xa.f.R = c, g.xa.f.S = a, g.ya.f.R = d, g.ya.f.S = f, g.za.f.R = d, g.za.f.S = a) : (b.vk ? (c = (2 * a.x + 1) / (2 * d), d = c + (2 * a.width - 2) / (2 * d), f = (2 * a.y + 1) / (2 * e), a = f + (2 * a.height - 2) / (2 * e)) : (c = a.x / d, d = (a.x + a.width) / d, f = a.y / e, a = (a.y + a.height) / e), this.gb && (e = c, c = d, d = e), this.hb && (e = f, f = a, a = e), g.wa.f.R = c, g.wa.f.S = a, g.xa.f.R = d, g.xa.f.S = a, g.ya.f.R = c, g.ya.f.S = f, g.za.f.R = d, g.za.f.S = f);
- this.Dc = !0
- }
- }
- });
- b.da === b.Ya ? (p = b.A.prototype, p.V = function(a) {
- b.m.prototype.V.call(this, a);
- this.Uc()
- },
- p.Uc = function() {
- this.ua = !0;
- var a = this.Q,
- c = this.sa,
- d = this.sh,
- e = this.uh;
- this.Do = "rgba(" + (0 | 0.5 * a.r) + "," + (0 | 0.5 * a.g) + "," + (0 | 0.5 * a.b) + "," + this.Cf + ")";
- this.Rn = "rgba(" + (0 | a.r / 255 * e.r) + "," + (0 | a.g / 255 * e.g) + "," + (0 | a.b / 255 * e.b) + ", " + c / 255 + ")";
- this.Io = "rgba(" + (0 | a.r / 255 * d.r) + "," + (0 | a.g / 255 * d.g) + "," + (0 | a.b / 255 * d.b) + ", " + c / 255 + ")"
- },
- p.sb = function(a) {
- b.m.prototype.sb.call(this, a);
- this.Uc()
- },
- p.Ga = function(a) {
- this.bH !== a && (b.B.prototype.Ga.call(this, a), this.Uc(), this.ua = !0)
- },
- p.kb = b.B.prototype.kb, p.Hu = function(a, c) {
- this.Jt(c, !1);
- this.string = a;
- return ! 0
- },
- p.Np = function(a) {
- var c = this.uh;
- if (c.r != a.r || c.g != a.g || c.b != a.b) c.r = a.r,
- c.g = a.g,
- c.b = a.b,
- this.Uc(),
- this.ua = !0
- },
- p.na = b.B.prototype.na, p.Ha = function(a, c, d) {
- this.nb = c || !1;
- this.wd(d || a);
- this.iv(a);
- c = this.ij;
- c.x = a.x;
- c.y = a.y;
- c.width = a.width;
- c.height = a.height;
- c.Xj = !(0 === c.width || 0 === c.height || 0 > c.x || 0 > c.y);
- a = this.le;
- this.gb && (a.x = -a.x);
- this.hb && (a.y = -a.y);
- this.Oa.x = a.x + (this.v.width - this.F.width) / 2;
- this.Oa.y = a.y + (this.v.height - this.F.height) / 2;
- this.ca && (this.dirty = !0)
- },
- p = null) : (b.assert("function" === typeof b.p.hr, b.c.Gb, "LabelTTFWebGL.js"), b.p.hr(), delete b.p.hr);
- b.assert("function" === typeof b.p.Hq, b.c.Gb, "LabelTTFPropertyDefine.js");
- b.p.Hq();
- delete b.p.Hq;
- b.A.XH = ["left", "center", "right"];
- b.A.YH = ["top", "middle", "bottom"];
- b.A.VN = !0;
- b.A.gI = /([a-zA-Z0-9\u00c4\u00d6\u00dc\u00e4\u00f6\u00fc\u00df\u00e9\u00e8\u00e7\u00e0\u00f9\u00ea\u00e2\u00ee\u00f4\u00fb]+|\S)/;
- b.A.WH = /^[!,.:;}\]%\?>\u3001\u2018\u201c\u300b\uff1f\u3002\uff0c\uff01]/;
- b.A.MG = /([a-zA-Z0-9\u00c4\u00d6\u00dc\u00e4\u00f6\u00fc\u00df\u00e9\u00e8\u00e7\u00e0\u00f9\u00ea\u00e2\u00ee\u00f4\u00fb]+|\S)$/;
- b.A.LG = /[a-zA-Z0-9\u00c4\u00d6\u00dc\u00e4\u00f6\u00fc\u00df\u00e9\u00e8\u00e7\u00e0\u00f9\u00ea\u00e2\u00ee\u00f4\u00fb]+$/;
- b.A.KF = /^[a-zA-Z0-9\u00c4\u00d6\u00dc\u00e4\u00f6\u00fc\u00df\u00e9\u00e8\u00e7\u00e0\u00f9\u00ea\u00e2\u00ee\u00f4\u00fb]/;
- b.A.OF = /^(\d+)px\s+['"]?([\w\s\d]+)['"]?$/;
- b.A.create = function(a, c, d, e, f, g) {
- return new b.A(a, c, d, e, f, g)
- };
- b.A.oS = b.A.create;
- b.A.cF = b.TE ? b.Wq: b.yD;
- b.A.bg = b.rb("div");
- b.A.bg.style.fontFamily = "Arial";
- b.A.bg.style.position = "absolute";
- b.A.bg.style.left = "-100px";
- b.A.bg.style.top = "-100px";
- b.A.bg.style.lineHeight = "normal";
- document.body ? document.body.appendChild(b.A.bg) : b.ka(window, "load",
- function() {
- this.removeEventListener("load", arguments.callee, !1);
- document.body.appendChild(b.A.bg)
- },
- !1);
- b.A.Gk = function(a, c) {
- var d = b.A.iw[a + "." + c];
- if (0 < d) return d;
- var e = b.A.bg;
- e.innerHTML = "ajghl~!";
- e.style.fontFamily = a;
- e.style.fontSize = c + "px";
- d = e.clientHeight;
- b.A.iw[a + "." + c] = d;
- e.innerHTML = "";
- return d
- };
- b.A.iw = {};
- b.CC = b.oa.extend({
- jb: null,
- target: null,
- Dh: 0,
- Xc: null,
- Kh: !1,
- paused: !1,
- Eu: null,
- ctor: function() {
- this.jb = [];
- this.target = null;
- this.Dh = 0;
- this.Xc = null;
- this.paused = this.Kh = !1;
- this.Eu = null
- }
- });
- b.pv = b.oa.extend({
- be: null,
- oi: null,
- Cc: null,
- Fe: !1,
- rR: function(a, c) {
- for (var d = 0; d < a.length; d++) if (c == a[d].target) return a[d];
- return null
- },
- ctor: function() {
- this.be = {};
- this.oi = [];
- this.Cc = null;
- this.Fe = !1
- },
- jI: function(a, c, d) {
- if (!a) throw "cc.ActionManager.addAction(): action must be non-null";
- if (!c) throw "cc.ActionManager.addAction(): action must be non-null";
- var e = this.be[c.L];
- e || (e = new b.CC, e.paused = d, e.target = c, this.be[c.L] = e, this.oi.push(e));
- this.eF(e);
- e.jb.push(a);
- a.q(c)
- },
- pX: function() {
- for (var a = this.oi,
- c = 0; c < a.length; c++) {
- var d = a[c];
- d && this.DA(d.target, !0)
- }
- },
- DA: function(a, c) {
- if (null != a) {
- var d = this.be[a.L];
- d && ( - 1 === d.jb.indexOf(d.Xc) || d.Kh || (d.Kh = !0), d.jb.length = 0, this.Cc != d || c ? this.Hr(d) : this.Fe = !0)
- }
- },
- CA: function(a) {
- if (null != a) {
- var c = this.be[a.originalTarget.L];
- if (c) for (var d = 0; d < c.jb.length; d++) {
- if (c.jb[d] == a) {
- c.jb.splice(d, 1);
- break
- }
- } else b.log(b.c.IB)
- }
- },
- ZL: function(a, c) {
- a == b.fi && b.log(b.c.qv);
- b.assert(c, b.c.qv);
- var d = this.be[c.L];
- if (d) for (var e = d.jb.length,
- f = 0; f < e; ++f) {
- var g = d.jb[f];
- if (g && g.yu() === a && g.originalTarget == c) {
- this.kH(f, d);
- break
- }
- }
- },
- Bz: function(a, c) {
- a == b.fi && b.log(b.c.GB);
- var d = this.be[c.L];
- if (d) {
- if (null != d.jb) for (var e = 0; e < d.jb.length; ++e) {
- var f = d.jb[e];
- if (f && f.yu() === a) return f
- }
- b.log(b.c.HB, a)
- }
- return null
- },
- BL: function(a) {
- return (a = this.be[a.L]) ? a.jb ? a.jb.length: 0 : 0
- },
- Lj: function(a) { (a = this.be[a.L]) && (a.paused = !0)
- },
- Qf: function(a) { (a = this.be[a.L]) && (a.paused = !1)
- },
- WW: function() {
- for (var a = [], c = this.oi, d = 0; d < c.length; d++) {
- var e = c[d];
- e && !e.paused && (e.paused = !0, a.push(e.target))
- }
- return a
- },
- kM: function(a) {
- if (a) for (var c = 0; c < a.length; c++) a[c] && this.Qf(a[c])
- },
- bX: function() {
- b.Qa.Ig().nm(this)
- },
- kH: function(a, c) {
- c.jb[a] != c.Xc || c.Kh || (c.Kh = !0);
- c.jb.splice(a, 1);
- c.Dh >= a && c.Dh--;
- 0 == c.jb.length && (this.Cc == c ? this.Fe = !0 : this.Hr(c))
- },
- Hr: function(a) {
- a && (delete this.be[a.target.L], b.Wc(this.oi, a), a.jb = null, a.target = null)
- },
- eF: function(a) {
- null == a.jb && (a.jb = [])
- },
- update: function(a) {
- for (var c = this.oi,
- d, e = 0; e < c.length; e++) {
- d = this.Cc = c[e];
- if (!d.paused) for (d.Dh = 0; d.Dh < d.jb.length; d.Dh++) if (d.Xc = d.jb[d.Dh], d.Xc) {
- d.Kh = !1;
- d.Xc.step(a * (d.Xc.ul ? d.Xc.rc: 1));
- if (d.Kh) d.Xc = null;
- else if (d.Xc.Rd()) {
- d.Xc.stop();
- var f = d.Xc;
- d.Xc = null;
- this.CA(f)
- }
- d.Xc = null
- }
- this.Fe && 0 === d.jb.length && this.Hr(d)
- }
- }
- });
- b.fi = -1;
- b.Ob = b.oa.extend({
- originalTarget: null,
- target: null,
- tag: b.fi,
- ctor: function() {
- this.target = this.originalTarget = null;
- this.tag = b.fi
- },
- copy: function() {
- b.log("copy is deprecated. Please use clone instead.");
- return this.d()
- },
- d: function() {
- var a = new b.Ob;
- a.originalTarget = null;
- a.target = null;
- a.tag = this.tag;
- return a
- },
- Rd: function() {
- return ! 0
- },
- q: function(a) {
- this.target = this.originalTarget = a
- },
- stop: function() {
- this.target = null
- },
- step: function() {
- b.log("[Action step]. override me")
- },
- update: function() {
- b.log("[Action update]. override me")
- },
- UU: function() {
- return this.target
- },
- RY: function(a) {
- this.target = a
- },
- BU: function() {
- return this.originalTarget
- },
- FY: function(a) {
- this.originalTarget = a
- },
- yu: function() {
- return this.tag
- },
- gB: function(a) {
- this.tag = a
- },
- Zu: function() {},
- Pf: function() {}
- });
- b.action = function() {
- return new b.Ob
- };
- b.Ob.create = b.action;
- b.lf = b.Ob.extend({
- u: 0,
- ctor: function() {
- b.Ob.prototype.ctor.call(this);
- this.u = 0
- },
- tu: function() {
- return this.u * (this.qb || 1)
- },
- jY: function(a) {
- this.u = a
- },
- reverse: function() {
- b.log("cocos2d: FiniteTimeAction#reverse: Implement me");
- return null
- },
- d: function() {
- return new b.lf
- }
- });
- b.bn = b.Ob.extend({
- rc: 0,
- ta: null,
- ctor: function(a, c) {
- b.Ob.prototype.ctor.call(this);
- this.rc = 0;
- this.ta = null;
- a && this.C(a, c)
- },
- CK: function() {
- return this.rc
- },
- cN: function(a) {
- this.rc = a
- },
- C: function(a, c) {
- if (!a) throw "cc.Speed.initWithAction(): action must be non nil";
- this.ta = a;
- this.rc = c;
- return ! 0
- },
- d: function() {
- var a = new b.bn;
- a.C(this.ta.d(), this.rc);
- return a
- },
- q: function(a) {
- b.Ob.prototype.q.call(this, a);
- this.ta.q(a)
- },
- stop: function() {
- this.ta.stop();
- b.Ob.prototype.stop.call(this)
- },
- step: function(a) {
- this.ta.step(a * this.rc)
- },
- Rd: function() {
- return this.ta.Rd()
- },
- reverse: function() {
- return b.bn.create(this.ta.reverse(), this.rc)
- },
- $A: function(a) {
- this.ta != a && (this.ta = a)
- },
- uu: function() {
- return this.ta
- }
- });
- b.speed = function(a, c) {
- return new b.bn(a, c)
- };
- b.bn.create = b.speed;
- b.rq = b.Ob.extend({
- Hi: null,
- qi: !1,
- un: !1,
- Wn: null,
- Xk: null,
- Rh: 0,
- Zh: 0,
- bi: 0,
- Hh: 0,
- Qt: null,
- ctor: function(a, c) {
- b.Ob.prototype.ctor.call(this);
- this.Hi = null;
- this.un = this.qi = !1;
- this.Xk = this.Wn = null;
- this.Hh = this.bi = this.Zh = this.Rh = 0;
- this.Qt = E(0, 0, 0, 0);
- a && (c ? this.Cj(a, c) : this.Cj(a))
- },
- d: function() {
- var a = new b.rq,
- c = this.Qt;
- a.Cj(this.Hi, new b.Uv(c.x, c.y, c.width, c.height));
- return a
- },
- vV: function() {
- return this.qi
- },
- XX: function(a) {
- this.qi = a
- },
- Cj: function(a, c) {
- if (!a) throw "cc.Follow.initWithAction(): followedNode must be non nil";
- c = c || E(0, 0, 0, 0);
- this.Hi = a;
- this.Qt = c;
- this.qi = !b.Ns(c);
- this.un = !1;
- var d = b.Qa.Ql();
- this.Xk = C(d.width, d.height);
- this.Wn = b.Kg(this.Xk, 0.5);
- this.qi && (this.Rh = -(c.x + c.width - this.Xk.x), this.Zh = -c.x, this.bi = -c.y, this.Hh = -(c.y + c.height - this.Xk.y), this.Zh < this.Rh && (this.Zh = this.Rh = (this.Rh + this.Zh) / 2), this.bi < this.Hh && (this.bi = this.Hh = (this.bi + this.Hh) / 2), this.bi == this.Hh && this.Rh == this.Zh && (this.un = !0));
- return ! 0
- },
- step: function() {
- var a = this.Hi.x,
- c = this.Hi.y,
- a = this.Wn.x - a,
- c = this.Wn.y - c;
- this.qi ? this.un || this.target.Ma(b.cp(a, this.Rh, this.Zh), b.cp(c, this.Hh, this.bi)) : this.target.Ma(a, c)
- },
- Rd: function() {
- return ! this.Hi.running
- },
- stop: function() {
- this.target = null;
- b.Ob.prototype.stop.call(this)
- }
- });
- b.LJ = function(a, c) {
- return new b.rq(a, c)
- };
- b.rq.create = b.LJ;
- b.o = b.lf.extend({
- Ta: 0,
- Sn: !1,
- Id: null,
- qb: 1,
- rl: !1,
- Zi: !1,
- rc: 1,
- ul: !1,
- ctor: function(a) {
- this.qb = this.rc = 1;
- this.rl = !1;
- this.MAX_VALUE = 2;
- this.ul = this.Zi = !1;
- b.lf.prototype.ctor.call(this);
- void 0 !== a && this.n(a)
- },
- bU: function() {
- return this.Ta
- },
- n: function(a) {
- this.u = 0 === a ? b.Nm: a;
- this.Ta = 0;
- return this.Sn = !0
- },
- Rd: function() {
- return this.Ta >= this.u
- },
- M: function(a) {
- a.rl = this.rl;
- a.rc = this.rc;
- a.qb = this.qb;
- a.Id = this.Id;
- a.ul = this.ul;
- a.Zi = this.Zi
- },
- pc: function(a) {
- if (this.Id) {
- a.Id = [];
- for (var c = 0; c < this.Id.length; c++) a.Id.push(this.Id[c].reverse())
- }
- },
- d: function() {
- var a = new b.o(this.u);
- this.M(a);
- return a
- },
- fa: function(a) {
- this.Id ? this.Id.length = 0 : this.Id = [];
- for (var c = 0; c < arguments.length; c++) this.Id.push(arguments[c]);
- return this
- },
- Hb: function(a) {
- var c = this.Id;
- if (!c || 0 === c.length) return a;
- for (var d = 0,
- e = c.length; d < e; d++) a = c[d].fa(a);
- return a
- },
- step: function(a) {
- this.Sn ? (this.Sn = !1, this.Ta = 0) : this.Ta += a;
- a = this.Ta / (1.192092896E-7 < this.u ? this.u: 1.192092896E-7);
- a = 1 > a ? a: 1;
- this.update(0 < a ? a: 0);
- this.Zi && 1 < this.qb && this.Rd() && (this.rl || this.qb--, this.q(this.target), this.step(this.Ta - this.u))
- },
- q: function(a) {
- b.Ob.prototype.q.call(this, a);
- this.Ta = 0;
- this.Sn = !0
- },
- reverse: function() {
- b.log("cc.IntervalAction: reverse not implemented.");
- return null
- },
- VX: function() {
- b.log("cc.ActionInterval.setAmplitudeRate(): it should be overridden in subclass.")
- },
- ET: function() {
- b.log("cc.ActionInterval.getAmplitudeRate(): it should be overridden in subclass.");
- return 0
- },
- speed: function(a) {
- if (0 >= a) return b.log("The speed parameter error"),
- this;
- this.ul = !0;
- this.rc *= a;
- return this
- },
- CK: function() {
- return this.rc
- },
- cN: function(a) {
- this.rc = a;
- return this
- },
- repeat: function(a) {
- a = Math.round(a);
- if (isNaN(a) || 1 > a) return b.log("The repeat parameter error"),
- this;
- this.Zi = !0;
- this.qb *= a;
- return this
- },
- Yh: function() {
- this.Zi = !0;
- this.qb = this.MAX_VALUE;
- this.rl = !0;
- return this
- }
- });
- b.iI = function(a) {
- return new b.o(a)
- };
- b.o.create = b.iI;
- b.vb = b.o.extend({
- Be: null,
- Ky: null,
- fl: 0,
- ctor: function(a) {
- b.o.prototype.ctor.call(this);
- this.Be = [];
- var c = a instanceof Array ? a: arguments,
- d = c.length - 1;
- 0 <= d && null == c[d] && b.log("parameters should not be ending with null in Javascript");
- if (0 <= d) {
- for (var e = c[0], f = 1; f < d; f++) c[f] && (e = b.vb.nf(e, c[f]));
- this.Qh(e, c[d])
- }
- },
- Qh: function(a, c) {
- if (!a || !c) throw "cc.Sequence.initWithTwoActions(): arguments must all be non nil";
- this.n(a.u + c.u);
- this.Be[0] = a;
- this.Be[1] = c;
- return ! 0
- },
- d: function() {
- var a = new b.vb;
- this.M(a);
- a.Qh(this.Be[0].d(), this.Be[1].d());
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.Ky = this.Be[0].u / this.u;
- this.fl = -1
- },
- stop: function() { - 1 !== this.fl && this.Be[this.fl].stop();
- b.Ob.prototype.stop.call(this)
- },
- update: function(a) {
- a = this.Hb(a);
- var c = 0,
- d = this.Ky,
- e = this.Be,
- f = this.fl;
- a < d ? (a = 0 !== d ? a / d: 1, 0 === c && 1 === f && (e[1].update(0), e[1].stop())) : (c = 1, a = 1 === d ? 1 : (a - d) / (1 - d), -1 === f && (e[0].q(this.target), e[0].update(1), e[0].stop()), f || (e[0].update(1), e[0].stop()));
- f === c && e[c].Rd() || (f !== c && e[c].q(this.target), e[c].update(a), this.fl = c)
- },
- reverse: function() {
- var a = b.vb.nf(this.Be[1].reverse(), this.Be[0].reverse());
- this.M(a);
- this.pc(a);
- return a
- }
- });
- b.tM = function(a) {
- var c = a instanceof Array ? a: arguments;
- 0 < c.length && null == c[c.length - 1] && b.log("parameters should not be ending with null in Javascript");
- for (var d = c[0], e = 1; e < c.length; e++) c[e] && (d = b.vb.nf(d, c[e]));
- return d
- };
- b.vb.create = b.tM;
- b.vb.nf = function(a, c) {
- var d = new b.vb;
- d.Qh(a, c);
- return d
- };
- b.Qq = b.o.extend({
- qb: 0,
- zg: 0,
- us: 0,
- nw: !1,
- ta: null,
- ctor: function(a, c) {
- b.o.prototype.ctor.call(this);
- void 0 !== c && this.C(a, c)
- },
- C: function(a, c) {
- return this.n(a.u * c) ? (this.qb = c, this.ta = a, a instanceof b.ve && (this.nw = !0, this.qb -= 1), this.zg = 0, !0) : !1
- },
- d: function() {
- var a = new b.Qq;
- this.M(a);
- a.C(this.ta.d(), this.qb);
- return a
- },
- q: function(a) {
- this.zg = 0;
- this.us = this.ta.u / this.u;
- b.o.prototype.q.call(this, a);
- this.ta.q(a)
- },
- stop: function() {
- this.ta.stop();
- b.Ob.prototype.stop.call(this)
- },
- update: function(a) {
- a = this.Hb(a);
- var c = this.ta,
- d = this.u,
- e = this.qb,
- f = this.us;
- if (a >= f) {
- for (; a > f && this.zg < e;) c.update(1),
- this.zg++,
- c.stop(),
- c.q(this.target),
- this.us = f += c.u / d;
- 1 <= a && this.zg < e && this.zg++;
- this.nw || (this.zg === e ? (c.update(1), c.stop()) : c.update(a - (f - c.u / d)))
- } else c.update(a * e % 1)
- },
- Rd: function() {
- return this.zg == this.qb
- },
- reverse: function() {
- var a = b.repeat(this.ta.reverse(), this.qb);
- this.M(a);
- this.pc(a);
- return a
- },
- $A: function(a) {
- this.ta != a && (this.ta = a)
- },
- uu: function() {
- return this.ta
- }
- });
- b.repeat = function(a, c) {
- return new b.Qq(a, c)
- };
- b.Qq.create = b.repeat;
- b.Rq = b.o.extend({
- ta: null,
- ctor: function(a) {
- b.o.prototype.ctor.call(this);
- this.ta = null;
- a && this.C(a)
- },
- C: function(a) {
- if (!a) throw "cc.RepeatForever.initWithAction(): action must be non null";
- this.ta = a;
- return ! 0
- },
- d: function() {
- var a = new b.Rq;
- this.M(a);
- a.C(this.ta.d());
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.ta.q(a)
- },
- step: function(a) {
- var c = this.ta;
- c.step(a);
- c.Rd() && (c.q(this.target), c.step(c.Ta - c.u))
- },
- Rd: function() {
- return ! 1
- },
- reverse: function() {
- var a = b.Yh(this.ta.reverse());
- this.M(a);
- this.pc(a);
- return a
- },
- $A: function(a) {
- this.ta != a && (this.ta = a)
- },
- uu: function() {
- return this.ta
- }
- });
- b.Yh = function(a) {
- return new b.Rq(a)
- };
- b.Rq.create = b.Yh;
- b.Xg = b.o.extend({
- tf: null,
- Hf: null,
- ctor: function(a) {
- b.o.prototype.ctor.call(this);
- this.Hf = this.tf = null;
- var c = a instanceof Array ? a: arguments,
- d = c.length - 1;
- 0 <= d && null == c[d] && b.log("parameters should not be ending with null in Javascript");
- if (0 <= d) {
- for (var e = c[0], f = 1; f < d; f++) c[f] && (e = b.Xg.nf(e, c[f]));
- this.Qh(e, c[d])
- }
- },
- Qh: function(a, c) {
- if (!a || !c) throw "cc.Spawn.initWithTwoActions(): arguments must all be non null";
- var d = !1,
- e = a.u,
- f = c.u;
- this.n(Math.max(e, f)) && (this.tf = a, this.Hf = c, e > f ? this.Hf = b.vb.nf(c, b.hp(e - f)) : e < f && (this.tf = b.vb.nf(a, b.hp(f - e))), d = !0);
- return d
- },
- d: function() {
- var a = new b.Xg;
- this.M(a);
- a.Qh(this.tf.d(), this.Hf.d());
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.tf.q(a);
- this.Hf.q(a)
- },
- stop: function() {
- this.tf.stop();
- this.Hf.stop();
- b.Ob.prototype.stop.call(this)
- },
- update: function(a) {
- a = this.Hb(a);
- this.tf && this.tf.update(a);
- this.Hf && this.Hf.update(a)
- },
- reverse: function() {
- var a = b.Xg.nf(this.tf.reverse(), this.Hf.reverse());
- this.M(a);
- this.pc(a);
- return a
- }
- });
- b.tN = function(a) {
- var c = a instanceof Array ? a: arguments;
- 0 < c.length && null == c[c.length - 1] && b.log("parameters should not be ending with null in Javascript");
- for (var d = c[0], e = 1; e < c.length; e++) null != c[e] && (d = b.Xg.nf(d, c[e]));
- return d
- };
- b.Xg.create = b.tN;
- b.Xg.nf = function(a, c) {
- var d = new b.Xg;
- d.Qh(a, c);
- return d
- };
- b.Uq = b.o.extend({
- Jn: 0,
- vl: 0,
- Cw: 0,
- Mr: 0,
- dj: 0,
- Dw: 0,
- ctor: function(a, c, d) {
- b.o.prototype.ctor.call(this);
- void 0 !== c && this.n(a, c, d)
- },
- n: function(a, c, d) {
- return b.o.prototype.n.call(this, a) ? (this.Jn = c || 0, this.Mr = d || this.Jn, !0) : !1
- },
- d: function() {
- var a = new b.Uq;
- this.M(a);
- a.n(this.u, this.Jn, this.Mr);
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- var c = a.rotationX % 360,
- d = this.Jn - c;
- 180 < d && (d -= 360); - 180 > d && (d += 360);
- this.vl = c;
- this.Cw = d;
- this.dj = a.rotationY % 360;
- a = this.Mr - this.dj;
- 180 < a && (a -= 360); - 180 > a && (a += 360);
- this.Dw = a
- },
- reverse: function() {
- b.log("cc.RotateTo.reverse(): it should be overridden in subclass.")
- },
- update: function(a) {
- a = this.Hb(a);
- this.target && (this.target.rotationX = this.vl + this.Cw * a, this.target.rotationY = this.dj + this.Dw * a)
- }
- });
- b.nM = function(a, c, d) {
- return new b.Uq(a, c, d)
- };
- b.Uq.create = b.nM;
- b.Tq = b.o.extend({
- Zd: 0,
- vl: 0,
- pn: 0,
- dj: 0,
- ctor: function(a, c, d) {
- b.o.prototype.ctor.call(this);
- void 0 !== c && this.n(a, c, d)
- },
- n: function(a, c, d) {
- return b.o.prototype.n.call(this, a) ? (this.Zd = c || 0, this.pn = d || this.Zd, !0) : !1
- },
- d: function() {
- var a = new b.Tq;
- this.M(a);
- a.n(this.u, this.Zd, this.pn);
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.vl = a.rotationX;
- this.dj = a.rotationY
- },
- update: function(a) {
- a = this.Hb(a);
- this.target && (this.target.rotationX = this.vl + this.Zd * a, this.target.rotationY = this.dj + this.pn * a)
- },
- reverse: function() {
- var a = b.NA(this.u, -this.Zd, -this.pn);
- this.M(a);
- this.pc(a);
- return a
- }
- });
- b.NA = function(a, c, d) {
- return new b.Tq(a, c, d)
- };
- b.Tq.create = b.NA;
- b.ub = b.o.extend({
- Pe: null,
- ob: null,
- yb: null,
- ctor: function(a, c, d) {
- b.o.prototype.ctor.call(this);
- this.Pe = C(0, 0);
- this.ob = C(0, 0);
- this.yb = C(0, 0);
- void 0 !== c && this.n(a, c, d)
- },
- n: function(a, c, d) {
- return b.o.prototype.n.call(this, a) ? (void 0 !== c.x && (d = c.y, c = c.x), this.Pe.x = c, this.Pe.y = d, !0) : !1
- },
- d: function() {
- var a = new b.ub;
- this.M(a);
- a.n(this.u, this.Pe);
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- var c = a.ja.x;
- a = a.ja.y;
- this.yb.x = c;
- this.yb.y = a;
- this.ob.x = c;
- this.ob.y = a
- },
- update: function(a) {
- a = this.Hb(a);
- if (this.target) {
- var c = this.Pe.x * a;
- a *= this.Pe.y;
- var d = this.ob;
- if (b.rm) {
- var e = this.target.ja.y,
- f = this.yb;
- d.x = d.x + this.target.ja.x - f.x;
- d.y = d.y + e - f.y;
- c += d.x;
- a += d.y;
- f.x = c;
- f.y = a;
- this.target.Ma(c, a)
- } else this.target.Ma(d.x + c, d.y + a)
- }
- },
- reverse: function() {
- var a = b.moveBy(this.u, C( - this.Pe.x, -this.Pe.y));
- this.M(a);
- this.pc(a);
- return a
- }
- });
- b.moveBy = function(a, c, d) {
- return new b.ub(a, c, d)
- };
- b.ub.create = b.moveBy;
- b.wk = b.ub.extend({
- kd: null,
- ctor: function(a, c, d) {
- b.ub.prototype.ctor.call(this);
- this.kd = C(0, 0);
- void 0 !== c && this.n(a, c, d)
- },
- n: function(a, c, d) {
- return b.ub.prototype.n.call(this, a, c, d) ? (void 0 !== c.x && (d = c.y, c = c.x), this.kd.x = c, this.kd.y = d, !0) : !1
- },
- d: function() {
- var a = new b.wk;
- this.M(a);
- a.n(this.u, this.kd);
- return a
- },
- q: function(a) {
- b.ub.prototype.q.call(this, a);
- this.Pe.x = this.kd.x - a.ja.x;
- this.Pe.y = this.kd.y - a.ja.y
- }
- });
- b.moveTo = function(a, c, d) {
- return new b.wk(a, c, d)
- };
- b.wk.create = b.moveTo;
- b.Wg = b.o.extend({
- ie: 0,
- je: 0,
- Fo: 0,
- Go: 0,
- Mn: 0,
- Nn: 0,
- Oc: 0,
- Pc: 0,
- ctor: function(a, c, d) {
- b.o.prototype.ctor.call(this);
- void 0 !== d && this.n(a, c, d)
- },
- n: function(a, c, d) {
- var e = !1;
- b.o.prototype.n.call(this, a) && (this.Mn = c, this.Nn = d, e = !0);
- return e
- },
- d: function() {
- var a = new b.Wg;
- this.M(a);
- a.n(this.u, this.Mn, this.Nn);
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.Fo = a.skewX % 180;
- this.Oc = this.Mn - this.Fo;
- 180 < this.Oc && (this.Oc -= 360); - 180 > this.Oc && (this.Oc += 360);
- this.Go = a.skewY % 360;
- this.Pc = this.Nn - this.Go;
- 180 < this.Pc && (this.Pc -= 360); - 180 > this.Pc && (this.Pc += 360)
- },
- update: function(a) {
- a = this.Hb(a);
- this.target.skewX = this.Fo + this.Oc * a;
- this.target.skewY = this.Go + this.Pc * a
- }
- });
- b.sN = function(a, c, d) {
- return new b.Wg(a, c, d)
- };
- b.Wg.create = b.sN;
- b.Xq = b.Wg.extend({
- ctor: function(a, c, d) {
- b.Wg.prototype.ctor.call(this);
- void 0 !== d && this.n(a, c, d)
- },
- n: function(a, c, d) {
- var e = !1;
- b.Wg.prototype.n.call(this, a, c, d) && (this.ie = c, this.je = d, e = !0);
- return e
- },
- d: function() {
- var a = new b.Xq;
- this.M(a);
- a.n(this.u, this.ie, this.je);
- return a
- },
- q: function(a) {
- b.Wg.prototype.q.call(this, a);
- this.Oc = this.ie;
- this.Pc = this.je;
- this.Mn = this.Fo + this.Oc;
- this.Nn = this.Go + this.Pc
- },
- reverse: function() {
- var a = b.lB(this.u, -this.ie, -this.je);
- this.M(a);
- this.pc(a);
- return a
- }
- });
- b.lB = function(a, c, d) {
- return new b.Xq(a, c, d)
- };
- b.Xq.create = b.lB;
- b.Tg = b.o.extend({
- ob: null,
- Ge: null,
- $k: 0,
- el: 0,
- yb: null,
- ctor: function(a, c, d, e, f) {
- b.o.prototype.ctor.call(this);
- this.ob = C(0, 0);
- this.yb = C(0, 0);
- this.Ge = C(0, 0);
- void 0 !== e && this.n(a, c, d, e, f)
- },
- n: function(a, c, d, e, f) {
- return b.o.prototype.n.call(this, a) ? (void 0 === f && (f = e, e = d, d = c.y, c = c.x), this.Ge.x = c, this.Ge.y = d, this.$k = e, this.el = f, !0) : !1
- },
- d: function() {
- var a = new b.Tg;
- this.M(a);
- a.n(this.u, this.Ge, this.$k, this.el);
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- var c = a.ja.x;
- a = a.ja.y;
- this.yb.x = c;
- this.yb.y = a;
- this.ob.x = c;
- this.ob.y = a
- },
- update: function(a) {
- a = this.Hb(a);
- if (this.target) {
- var c = a * this.el % 1,
- c = 4 * this.$k * c * (1 - c),
- c = c + this.Ge.y * a;
- a *= this.Ge.x;
- var d = this.ob;
- if (b.rm) {
- var e = this.target.ja.y,
- f = this.yb;
- d.x = d.x + this.target.ja.x - f.x;
- d.y = d.y + e - f.y;
- a += d.x;
- c += d.y;
- f.x = a;
- f.y = c;
- this.target.Ma(a, c)
- } else this.target.Ma(d.x + a, d.y + c)
- }
- },
- reverse: function() {
- var a = b.kA(this.u, C( - this.Ge.x, -this.Ge.y), this.$k, this.el);
- this.M(a);
- this.pc(a);
- return a
- }
- });
- b.kA = function(a, c, d, e, f) {
- return new b.Tg(a, c, d, e, f)
- };
- b.Tg.create = b.kA;
- b.uq = b.Tg.extend({
- kd: null,
- ctor: function(a, c, d, e, f) {
- b.Tg.prototype.ctor.call(this);
- this.kd = C(0, 0);
- void 0 !== e && this.n(a, c, d, e, f)
- },
- n: function(a, c, d, e, f) {
- return b.Tg.prototype.n.call(this, a, c, d, e, f) ? (void 0 === f && (d = c.y, c = c.x), this.kd.x = c, this.kd.y = d, !0) : !1
- },
- q: function(a) {
- b.Tg.prototype.q.call(this, a);
- this.Ge.x = this.kd.x - this.ob.x;
- this.Ge.y = this.kd.y - this.ob.y
- },
- d: function() {
- var a = new b.uq;
- this.M(a);
- a.n(this.u, this.kd, this.$k, this.el);
- return a
- }
- });
- b.iL = function(a, c, d, e, f) {
- return new b.uq(a, c, d, e, f)
- };
- b.uq.create = b.iL;
- b.fz = function(a, c, d, e) {
- return 0 * Math.pow(1 - e, 3) + 3 * e * Math.pow(1 - e, 2) * a + 3 * Math.pow(e, 2) * (1 - e) * c + Math.pow(e, 3) * d
- };
- b.gi = b.o.extend({
- gd: null,
- ob: null,
- yb: null,
- ctor: function(a, c) {
- b.o.prototype.ctor.call(this);
- this.gd = [];
- this.ob = C(0, 0);
- this.yb = C(0, 0);
- c && this.n(a, c)
- },
- n: function(a, c) {
- return b.o.prototype.n.call(this, a) ? (this.gd = c, !0) : !1
- },
- d: function() {
- var a = new b.gi;
- this.M(a);
- for (var c = [], d = 0; d < this.gd.length; d++) {
- var e = this.gd[d];
- c.push(C(e.x, e.y))
- }
- a.n(this.u, c);
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- var c = a.ja.x;
- a = a.ja.y;
- this.yb.x = c;
- this.yb.y = a;
- this.ob.x = c;
- this.ob.y = a
- },
- update: function(a) {
- a = this.Hb(a);
- if (this.target) {
- var c = this.gd,
- d = b.fz(c[0].x, c[1].x, c[2].x, a);
- a = b.fz(c[0].y, c[1].y, c[2].y, a);
- c = this.ob;
- if (b.rm) {
- var e = this.target.ja.y,
- f = this.yb;
- c.x = c.x + this.target.ja.x - f.x;
- c.y = c.y + e - f.y;
- d += c.x;
- a += c.y;
- f.x = d;
- f.y = a;
- this.target.Ma(d, a)
- } else this.target.Ma(c.x + d, c.y + a)
- }
- },
- reverse: function() {
- var a = this.gd,
- a = b.gz(this.u, [b.Jj(a[1], b.Uu(a[2])), b.Jj(a[0], b.Uu(a[2])), b.Uu(a[2])]);
- this.M(a);
- this.pc(a);
- return a
- }
- });
- b.gz = function(a, c) {
- return new b.gi(a, c)
- };
- b.gi.create = b.gz;
- b.bq = b.gi.extend({
- Qo: null,
- ctor: function(a, c) {
- b.gi.prototype.ctor.call(this);
- this.Qo = [];
- c && this.n(a, c)
- },
- n: function(a, c) {
- return b.o.prototype.n.call(this, a) ? (this.Qo = c, !0) : !1
- },
- d: function() {
- var a = new b.bq;
- this.M(a);
- a.n(this.u, this.Qo);
- return a
- },
- q: function(a) {
- b.gi.prototype.q.call(this, a);
- a = this.ob;
- var c = this.Qo,
- d = this.gd;
- d[0] = b.uc(c[0], a);
- d[1] = b.uc(c[1], a);
- d[2] = b.uc(c[2], a)
- }
- });
- b.II = function(a, c) {
- return new b.bq(a, c)
- };
- b.bq.create = b.II;
- b.Vg = b.o.extend({
- O: 1,
- ma: 1,
- xl: 1,
- yl: 1,
- Di: 0,
- Ei: 0,
- Oc: 0,
- Pc: 0,
- ctor: function(a, c, d) {
- b.o.prototype.ctor.call(this);
- void 0 !== c && this.n(a, c, d)
- },
- n: function(a, c, d) {
- return b.o.prototype.n.call(this, a) ? (this.Di = c, this.Ei = null != d ? d: c, !0) : !1
- },
- d: function() {
- var a = new b.Vg;
- this.M(a);
- a.n(this.u, this.Di, this.Ei);
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.xl = a.scaleX;
- this.yl = a.scaleY;
- this.Oc = this.Di - this.xl;
- this.Pc = this.Ei - this.yl
- },
- update: function(a) {
- a = this.Hb(a);
- this.target && (this.target.scaleX = this.xl + this.Oc * a, this.target.scaleY = this.yl + this.Pc * a)
- }
- });
- b.pM = function(a, c, d) {
- return new b.Vg(a, c, d)
- };
- b.Vg.create = b.pM;
- b.Zm = b.Vg.extend({
- q: function(a) {
- b.Vg.prototype.q.call(this, a);
- this.Oc = this.xl * this.Di - this.xl;
- this.Pc = this.yl * this.Ei - this.yl
- },
- reverse: function() {
- var a = b.PA(this.u, 1 / this.Di, 1 / this.Ei);
- this.M(a);
- this.pc(a);
- return a
- },
- d: function() {
- var a = new b.Zm;
- this.M(a);
- a.n(this.u, this.Di, this.Ei);
- return a
- }
- });
- b.PA = function(a, c, d) {
- return new b.Zm(a, c, d)
- };
- b.Zm.create = b.PA;
- b.cq = b.o.extend({
- qb: 0,
- Wx: !1,
- ctor: function(a, c) {
- b.o.prototype.ctor.call(this);
- void 0 !== c && this.n(a, c)
- },
- n: function(a, c) {
- return b.o.prototype.n.call(this, a) ? (this.qb = c, !0) : !1
- },
- d: function() {
- var a = new b.cq;
- this.M(a);
- a.n(this.u, this.qb);
- return a
- },
- update: function(a) {
- a = this.Hb(a);
- if (this.target && !this.Rd()) {
- var c = 1 / this.qb;
- this.target.visible = a % c > c / 2
- }
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.Wx = a.visible
- },
- stop: function() {
- this.target.visible = this.Wx;
- b.o.prototype.stop.call(this)
- },
- reverse: function() {
- var a = b.blink(this.u, this.qb);
- this.M(a);
- this.pc(a);
- return a
- }
- });
- b.blink = function(a, c) {
- return new b.cq(a, c)
- };
- b.cq.create = b.blink;
- b.Sf = b.o.extend({
- mj: 0,
- Vn: 0,
- ctor: function(a, c) {
- b.o.prototype.ctor.call(this);
- void 0 !== c && this.n(a, c)
- },
- n: function(a, c) {
- return b.o.prototype.n.call(this, a) ? (this.mj = c, !0) : !1
- },
- d: function() {
- var a = new b.Sf;
- this.M(a);
- a.n(this.u, this.mj);
- return a
- },
- update: function(a) {
- a = this.Hb(a);
- var c = void 0 !== this.Vn ? this.Vn: 255;
- this.target.opacity = c + (this.mj - c) * a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.Vn = a.opacity
- }
- });
- b.IJ = function(a, c) {
- return new b.Sf(a, c)
- };
- b.Sf.create = b.IJ;
- b.Om = b.Sf.extend({
- Us: null,
- ctor: function(a) {
- b.Sf.prototype.ctor.call(this);
- a && this.n(a, 255)
- },
- reverse: function() {
- var a = new b.Pm;
- a.n(this.u, 0);
- this.M(a);
- this.pc(a);
- return a
- },
- d: function() {
- var a = new b.Om;
- this.M(a);
- a.n(this.u, this.mj);
- return a
- },
- q: function(a) {
- this.Us && (this.mj = this.Us.Vn);
- b.Sf.prototype.q.call(this, a)
- }
- });
- b.GJ = function(a) {
- return new b.Om(a)
- };
- b.Om.create = b.GJ;
- b.Pm = b.Sf.extend({
- ctor: function(a) {
- b.Sf.prototype.ctor.call(this);
- a && this.n(a, 0)
- },
- reverse: function() {
- var a = new b.Om;
- a.Us = this;
- a.n(this.u, 255);
- this.M(a);
- this.pc(a);
- return a
- },
- d: function() {
- var a = new b.Pm;
- this.M(a);
- a.n(this.u, this.mj);
- return a
- }
- });
- b.HJ = function(a) {
- return new b.Pm(a)
- };
- b.Pm.create = b.HJ;
- b.$q = b.o.extend({
- Po: null,
- Tr: null,
- ctor: function(a, c, d, e) {
- b.o.prototype.ctor.call(this);
- this.Po = b.color(0, 0, 0);
- this.Tr = b.color(0, 0, 0);
- void 0 !== e && this.n(a, c, d, e)
- },
- n: function(a, c, d, e) {
- return b.o.prototype.n.call(this, a) ? (this.Po = b.color(c, d, e), !0) : !1
- },
- d: function() {
- var a = new b.$q;
- this.M(a);
- var c = this.Po;
- a.n(this.u, c.r, c.g, c.b);
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.Tr = this.target.color
- },
- update: function(a) {
- a = this.Hb(a);
- var c = this.Tr,
- d = this.Po;
- c && (this.target.color = b.color(c.r + (d.r - c.r) * a, c.g + (d.g - c.g) * a, c.b + (d.b - c.b) * a))
- }
- });
- b.NN = function(a, c, d, e) {
- return new b.$q(a, c, d, e)
- };
- b.$q.create = b.NN;
- b.Zq = b.o.extend({
- Hn: 0,
- Gn: 0,
- Fn: 0,
- ux: 0,
- tx: 0,
- sx: 0,
- ctor: function(a, c, d, e) {
- b.o.prototype.ctor.call(this);
- void 0 !== e && this.n(a, c, d, e)
- },
- n: function(a, c, d, e) {
- return b.o.prototype.n.call(this, a) ? (this.Hn = c, this.Gn = d, this.Fn = e, !0) : !1
- },
- d: function() {
- var a = new b.Zq;
- this.M(a);
- a.n(this.u, this.Hn, this.Gn, this.Fn);
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- a = a.color;
- this.ux = a.r;
- this.tx = a.g;
- this.sx = a.b
- },
- update: function(a) {
- a = this.Hb(a);
- this.target.color = b.color(this.ux + this.Hn * a, this.tx + this.Gn * a, this.sx + this.Fn * a)
- },
- reverse: function() {
- var a = b.sB(this.u, -this.Hn, -this.Gn, -this.Fn);
- this.M(a);
- this.pc(a);
- return a
- }
- });
- b.sB = function(a, c, d, e) {
- return new b.Zq(a, c, d, e)
- };
- b.Zq.create = b.sB;
- b.Wd = b.o.extend({
- update: function() {},
- reverse: function() {
- var a = b.hp(this.u);
- this.M(a);
- this.pc(a);
- return a
- },
- d: function() {
- var a = new b.Wd;
- this.M(a);
- a.n(this.u);
- return a
- }
- });
- b.hp = function(a) {
- return new b.Wd(a)
- };
- b.Wd.create = b.hp;
- b.Sq = b.o.extend({
- uf: null,
- ctor: function(a) {
- b.o.prototype.ctor.call(this);
- this.uf = null;
- a && this.C(a)
- },
- C: function(a) {
- if (!a) throw "cc.ReverseTime.initWithAction(): action must be non null";
- if (a == this.uf) throw "cc.ReverseTime.initWithAction(): the action was already passed in.";
- return b.o.prototype.n.call(this, a.u) ? (this.uf = a, !0) : !1
- },
- d: function() {
- var a = new b.Sq;
- this.M(a);
- a.C(this.uf.d());
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.uf.q(a)
- },
- update: function(a) {
- a = this.Hb(a);
- this.uf && this.uf.update(1 - a)
- },
- reverse: function() {
- return this.uf.d()
- },
- stop: function() {
- this.uf.stop();
- b.Ob.prototype.stop.call(this)
- }
- });
- b.MA = function(a) {
- return new b.Sq(a)
- };
- b.Sq.create = b.MA;
- b.Zj = b.o.extend({
- dg: null,
- kl: 0,
- ys: null,
- Qn: 0,
- nt: null,
- ctor: function(a) {
- b.o.prototype.ctor.call(this);
- this.nt = [];
- a && this.Wz(a)
- },
- np: function() {
- return this.dg
- },
- xM: function(a) {
- this.dg = a
- },
- Wz: function(a) {
- if (!a) throw "cc.Animate.initWithAnimation(): animation must be non-NULL";
- var c = a.tu();
- if (this.n(c * a.sf)) {
- this.kl = 0;
- this.xM(a);
- this.ys = null;
- this.Qn = 0;
- var d = this.nt,
- e = d.length = 0,
- f = c / a.Ue;
- a = a.$b;
- b.qj(a, b.Ad);
- for (var g = 0; g < a.length; g++) {
- var h = e * f / c,
- e = e + a[g].Wb;
- d.push(h)
- }
- return ! 0
- }
- return ! 1
- },
- d: function() {
- var a = new b.Zj;
- this.M(a);
- a.Wz(this.dg.d());
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.dg.nh && (this.ys = a.cJ());
- this.Qn = this.kl = 0
- },
- update: function(a) {
- a = this.Hb(a);
- 1 > a && (a *= this.dg.sf, (0 | a) > this.Qn && (this.kl = 0, this.Qn++), a %= 1);
- for (var c = this.dg.$b,
- d = c.length,
- e = this.nt,
- f = this.kl; f < d; f++) if (e[f] <= a) this.target.Pg(c[f].Ye()),
- this.kl = f + 1;
- else break
- },
- reverse: function() {
- var a = this.dg,
- c = a.$b,
- d = [];
- b.qj(c, b.Ad);
- if (0 < c.length) for (var e = c.length - 1; 0 <= e; e--) {
- var f = c[e];
- if (!f) break;
- d.push(f.d())
- }
- c = b.we.create(d, a.Wb, a.sf);
- c.Pp(a.nh);
- a = b.bz(c);
- this.M(a);
- this.pc(a);
- return a
- },
- stop: function() {
- this.dg.nh && this.target && this.target.Pg(this.ys);
- b.Ob.prototype.stop.call(this)
- }
- });
- b.bz = function(a) {
- return new b.Zj(a)
- };
- b.Zj.create = b.bz;
- b.Yq = b.o.extend({
- Hk: null,
- Ii: null,
- ctor: function(a, c) {
- b.o.prototype.ctor.call(this);
- c && this.Cj(a, c)
- },
- Cj: function(a, c) {
- return this.n(c.u) ? (this.Ii = a, this.Hk = c, !0) : !1
- },
- d: function() {
- var a = new b.Yq;
- this.M(a);
- a.Cj(this.Ii, this.Hk.d());
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.Hk.q(this.Ii)
- },
- stop: function() {
- this.Hk.stop()
- },
- update: function(a) {
- a = this.Hb(a);
- this.Hk.update(a)
- },
- hU: function() {
- return this.Ii
- },
- nY: function(a) {
- this.Ii != a && (this.Ii = a)
- }
- });
- b.FN = function(a, c) {
- return new b.Yq(a, c)
- };
- b.Yq.create = b.FN;
- b.ve = b.lf.extend({
- Rd: function() {
- return ! 0
- },
- step: function() {
- this.update(1)
- },
- update: function() {},
- reverse: function() {
- return this.d()
- },
- d: function() {
- return new b.ve
- }
- });
- b.an = b.ve.extend({
- update: function() {
- this.target.visible = !0
- },
- reverse: function() {
- return b.Sm.create()
- },
- d: function() {
- return new b.an
- }
- });
- b.show = function() {
- return new b.an
- };
- b.an.create = b.show;
- b.Sm = b.ve.extend({
- update: function() {
- this.target.visible = !1
- },
- reverse: function() {
- return b.an.create()
- },
- d: function() {
- return new b.Sm
- }
- });
- b.OK = function() {
- return new b.Sm
- };
- b.Sm.create = b.OK;
- b.fn = b.ve.extend({
- update: function() {
- this.target.visible = !this.target.visible
- },
- reverse: function() {
- return new b.fn
- },
- d: function() {
- return new b.fn
- }
- });
- b.ON = function() {
- return new b.fn
- };
- b.fn.create = b.ON;
- b.Ym = b.ve.extend({
- co: !0,
- ctor: function(a) {
- b.lf.prototype.ctor.call(this);
- void 0 !== a && this.ga(a)
- },
- update: function() {
- this.target.hc(this.co)
- },
- ga: function(a) {
- this.co = a;
- return ! 0
- },
- reverse: function() {
- return new b.Ym(this.co)
- },
- d: function() {
- return new b.Ym(this.co)
- }
- });
- b.eM = function(a) {
- return new b.Ym(a)
- };
- b.Ym.create = b.eM;
- b.Qm = b.ve.extend({
- gb: !1,
- ctor: function(a) {
- b.lf.prototype.ctor.call(this);
- this.gb = !1;
- void 0 !== a && this.Yz(a)
- },
- Yz: function(a) {
- this.gb = a;
- return ! 0
- },
- update: function() {
- this.target.flippedX = this.gb
- },
- reverse: function() {
- return b.Qm.create(!this.gb)
- },
- d: function() {
- var a = new b.Qm;
- a.Yz(this.gb);
- return a
- }
- });
- b.JJ = function(a) {
- return new b.Qm(a)
- };
- b.Qm.create = b.JJ;
- b.Rm = b.ve.extend({
- hb: !1,
- ctor: function(a) {
- b.lf.prototype.ctor.call(this);
- this.hb = !1;
- void 0 !== a && this.Zz(a)
- },
- Zz: function(a) {
- this.hb = a;
- return ! 0
- },
- update: function() {
- this.target.flippedY = this.hb
- },
- reverse: function() {
- return b.Rm.create(!this.hb)
- },
- d: function() {
- var a = new b.Rm;
- a.Zz(this.hb);
- return a
- }
- });
- b.KJ = function(a) {
- return new b.Rm(a)
- };
- b.Rm.create = b.KJ;
- b.Eq = b.ve.extend({
- me: 0,
- Hc: 0,
- ctor: function(a, c) {
- b.lf.prototype.ctor.call(this);
- this.Hc = this.me = 0;
- void 0 !== a && (void 0 !== a.x && (c = a.y, a = a.x), this.bA(a, c))
- },
- bA: function(a, c) {
- this.me = a;
- this.Hc = c;
- return ! 0
- },
- update: function() {
- this.target.Ma(this.me, this.Hc)
- },
- d: function() {
- var a = new b.Eq;
- a.bA(this.me, this.Hc);
- return a
- }
- });
- b.KL = function(a, c) {
- return new b.Eq(a, c)
- };
- b.Eq.create = b.KL;
- b.Bd = b.ve.extend({
- zf: null,
- xn: null,
- Yk: null,
- Gr: null,
- ctor: function(a, c, d) {
- b.lf.prototype.ctor.call(this);
- void 0 !== a && (void 0 === c ? this.vp(a) : this.vp(a, c, d))
- },
- vp: function(a, c, d) {
- c ? (this.Gr = d, this.xn = a, this.zf = c) : a && (this.Yk = a);
- return ! 0
- },
- execute: function() {
- null != this.xn ? this.xn.call(this.zf, this.target, this.Gr) : this.Yk && this.Yk.call(null, this.target)
- },
- update: function() {
- this.execute()
- },
- VU: function() {
- return this.zf
- },
- SY: function(a) {
- a != this.zf && (this.zf && (this.zf = null), this.zf = a)
- },
- d: function() {
- var a = new b.Bd;
- this.zf ? a.vp(this.xn, this.zf, this.Gr) : this.Yk && a.vp(this.Yk);
- return a
- }
- });
- b.MI = function(a, c, d) {
- return new b.Bd(a, c, d)
- };
- b.Bd.create = b.MI;
- b.Vp = b.o.extend({
- Ar: 0,
- Br: 0,
- Cr: 0,
- mx: 0,
- nx: 0,
- ox: 0,
- Sy: 0,
- Ty: 0,
- Uy: 0,
- ctor: function() {
- b.o.prototype.ctor.call(this);
- this.Uy = this.Ty = this.Sy = this.ox = this.nx = this.mx = this.Cr = this.Br = this.Ar = 0
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- a = a.ru();
- var c = a.Dz();
- this.Ar = c.x;
- this.Br = c.y;
- this.Cr = c.z;
- c = a.Ez();
- this.mx = c.x;
- this.nx = c.y;
- this.ox = c.z;
- a = a.GK();
- this.Sy = a.x;
- this.Ty = a.y;
- this.Uy = a.z
- },
- d: function() {
- return new b.Vp
- },
- reverse: function() {
- return b.MA(this)
- }
- });
- b.Bq = b.Vp.extend({
- ql: 0,
- Ir: 0,
- Kk: 0,
- Aw: 0,
- Zd: 0,
- zw: 0,
- hy: 0,
- fy: 0,
- gy: 0,
- ey: 0,
- ctor: function(a, c, d, e, f, g, h) {
- b.Vp.prototype.ctor.call(this);
- void 0 !== h && this.n(a, c, d, e, f, g, h)
- },
- n: function(a, c, d, e, f, g, h) {
- return b.o.prototype.n.call(this, a) ? (this.ql = c, this.Ir = d, this.Kk = e, this.Aw = f, this.Zd = g, this.zw = h, this.fy = b.Gg(f), this.ey = b.Gg(h), !0) : !1
- },
- uN: function() {
- var a = this.target.ru(),
- c = a.Ez(),
- d = a.Dz(),
- a = c.x - d.x,
- e = c.y - d.y,
- c = c.z - d.z,
- d = Math.sqrt(Math.pow(a, 2) + Math.pow(e, 2) + Math.pow(c, 2)),
- f = Math.sqrt(Math.pow(a, 2) + Math.pow(e, 2));
- 0 === f && (f = b.Nm);
- 0 === d && (d = b.Nm);
- return {
- AL: d / b.bk.Rl(),
- aO: Math.acos(c / d),
- azimuth: 0 > a ? Math.PI - Math.asin(e / f) : Math.asin(e / f)
- }
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- a = this.uN();
- isNaN(this.ql) && (this.ql = a.AL);
- isNaN(this.Kk) && (this.Kk = b.wA(a.aO));
- isNaN(this.Zd) && (this.Zd = b.wA(a.azimuth));
- this.hy = b.Gg(this.Kk);
- this.gy = b.Gg(this.Zd)
- },
- d: function() {
- var a = new b.Bq;
- a.n(this.u, this.ql, this.Ir, this.Kk, this.Aw, this.Zd, this.zw);
- return a
- },
- update: function(a) {
- a = this.Hb(a);
- var c = (this.ql + this.Ir * a) * b.bk.Rl(),
- d = this.hy + this.fy * a,
- e = this.gy + this.ey * a;
- a = Math.sin(d) * Math.cos(e) * c + this.Ar;
- e = Math.sin(d) * Math.sin(e) * c + this.Br;
- c = Math.cos(d) * c + this.Cr;
- this.target.ru().YA(a, e, c)
- }
- });
- b.DL = function(a, c, d, e, f, g, h) {
- return new b.Bq(a, c, d, e, f, g, h)
- };
- b.Bq.create = b.DL;
- b.ba = b.o.extend({
- i: null,
- ctor: function(a) {
- b.o.prototype.ctor.call(this);
- a && this.C(a)
- },
- C: function(a) {
- if (!a) throw "cc.ActionEase.initWithAction(): action must be non nil";
- return this.n(a.tu()) ? (this.i = a, !0) : !1
- },
- d: function() {
- var a = new b.ba;
- a.C(this.i.d());
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.i.q(this.target)
- },
- stop: function() {
- this.i.stop();
- b.o.prototype.stop.call(this)
- },
- update: function(a) {
- this.i.update(a)
- },
- reverse: function() {
- return b.ba.create(this.i.reverse())
- },
- uu: function() {
- return this.i
- }
- });
- b.hI = function(a) {
- return new b.ba(a)
- };
- b.ba.create = b.hI;
- b.Sg = b.ba.extend({
- Ua: 0,
- ctor: function(a, c) {
- b.ba.prototype.ctor.call(this);
- void 0 !== c && this.C(a, c)
- },
- KY: function(a) {
- this.Ua = a
- },
- JU: function() {
- return this.Ua
- },
- C: function(a, c) {
- return b.ba.prototype.C.call(this, a) ? (this.Ua = c, !0) : !1
- },
- d: function() {
- var a = new b.Sg;
- a.C(this.i.d(), this.Ua);
- return a
- },
- reverse: function() {
- return b.Sg.create(this.i.reverse(), 1 / this.Ua)
- }
- });
- b.uJ = function(a, c) {
- return new b.Sg(a, c)
- };
- b.Sg.create = b.uJ;
- b.Gm = b.Sg.extend({
- update: function(a) {
- this.i.update(Math.pow(a, this.Ua))
- },
- reverse: function() {
- return b.Gm.create(this.i.reverse(), 1 / this.Ua)
- },
- d: function() {
- var a = new b.Gm;
- a.C(this.i.d(), this.Ua);
- return a
- }
- });
- b.Gm.create = function(a, c) {
- return new b.Gm(a, c)
- };
- b.rJ = function(a) {
- return {
- Ua: a,
- fa: function(a) {
- return Math.pow(a, this.Ua)
- },
- reverse: function() {
- return b.rJ(1 / this.Ua)
- }
- }
- };
- b.Im = b.Sg.extend({
- update: function(a) {
- this.i.update(Math.pow(a, 1 / this.Ua))
- },
- reverse: function() {
- return b.Im.create(this.i.reverse(), 1 / this.Ua)
- },
- d: function() {
- var a = new b.Im;
- a.C(this.i.d(), this.Ua);
- return a
- }
- });
- b.Im.create = function(a, c) {
- return new b.Im(a, c)
- };
- b.tJ = function(a) {
- return {
- Ua: a,
- fa: function(a) {
- return Math.pow(a, 1 / this.Ua)
- },
- reverse: function() {
- return b.tJ(1 / this.Ua)
- }
- }
- };
- b.Hm = b.Sg.extend({
- update: function(a) {
- a *= 2;
- 1 > a ? this.i.update(0.5 * Math.pow(a, this.Ua)) : this.i.update(1 - 0.5 * Math.pow(2 - a, this.Ua))
- },
- d: function() {
- var a = new b.Hm;
- a.C(this.i.d(), this.Ua);
- return a
- },
- reverse: function() {
- return b.Hm.create(this.i.reverse(), this.Ua)
- }
- });
- b.Hm.create = function(a, c) {
- return new b.Hm(a, c)
- };
- b.sJ = function(a) {
- return {
- Ua: a,
- fa: function(a) {
- a *= 2;
- return 1 > a ? 0.5 * Math.pow(a, this.Ua) : 1 - 0.5 * Math.pow(2 - a, this.Ua)
- },
- reverse: function() {
- return b.sJ(this.Ua)
- }
- }
- };
- b.Dm = b.ba.extend({
- update: function(a) {
- this.i.update(0 === a ? 0 : Math.pow(2, 10 * (a - 1)))
- },
- reverse: function() {
- return b.Fm.create(this.i.reverse())
- },
- d: function() {
- var a = new b.Dm;
- a.C(this.i.d());
- return a
- }
- });
- b.Dm.create = function(a) {
- return new b.Dm(a)
- };
- b.Uw = {
- fa: function(a) {
- return 0 === a ? 0 : Math.pow(2, 10 * (a - 1))
- },
- reverse: function() {
- return b.Ww
- }
- };
- b.SS = function() {
- return b.Uw
- };
- b.Fm = b.ba.extend({
- update: function(a) {
- this.i.update(1 == a ? 1 : -Math.pow(2, -10 * a) + 1)
- },
- reverse: function() {
- return b.Dm.create(this.i.reverse())
- },
- d: function() {
- var a = new b.Fm;
- a.C(this.i.d());
- return a
- }
- });
- b.Fm.create = function(a) {
- return new b.Fm(a)
- };
- b.Ww = {
- fa: function(a) {
- return 1 == a ? 1 : -Math.pow(2, -10 * a) + 1
- },
- reverse: function() {
- return b.Uw
- }
- };
- b.US = function() {
- return b.Ww
- };
- b.Em = b.ba.extend({
- update: function(a) {
- 1 != a && 0 !== a && (a *= 2, a = 1 > a ? 0.5 * Math.pow(2, 10 * (a - 1)) : 0.5 * ( - Math.pow(2, -10 * (a - 1)) + 2));
- this.i.update(a)
- },
- reverse: function() {
- return b.Em.create(this.i.reverse())
- },
- d: function() {
- var a = new b.Em;
- a.C(this.i.d());
- return a
- }
- });
- b.Em.create = function(a) {
- return new b.Em(a)
- };
- b.Vw = {
- fa: function(a) {
- return 1 !== a && 0 !== a ? (a *= 2, 1 > a ? 0.5 * Math.pow(2, 10 * (a - 1)) : 0.5 * ( - Math.pow(2, -10 * (a - 1)) + 2)) : a
- },
- reverse: function() {
- return b.Vw
- }
- };
- b.TS = function() {
- return b.Vw
- };
- b.Jm = b.ba.extend({
- update: function(a) {
- a = 0 === a || 1 === a ? a: -1 * Math.cos(a * Math.PI / 2) + 1;
- this.i.update(a)
- },
- reverse: function() {
- return b.Lm.create(this.i.reverse())
- },
- d: function() {
- var a = new b.Jm;
- a.C(this.i.d());
- return a
- }
- });
- b.Jm.create = function(a) {
- return new b.Jm(a)
- };
- b.fx = {
- fa: function(a) {
- return 0 === a || 1 === a ? a: -1 * Math.cos(a * Math.PI / 2) + 1
- },
- reverse: function() {
- return b.hx
- }
- };
- b.dT = function() {
- return b.fx
- };
- b.Lm = b.ba.extend({
- update: function(a) {
- a = 0 === a || 1 === a ? a: Math.sin(a * Math.PI / 2);
- this.i.update(a)
- },
- reverse: function() {
- return b.Jm.create(this.i.reverse())
- },
- d: function() {
- var a = new b.Lm;
- a.C(this.i.d());
- return a
- }
- });
- b.Lm.create = function(a) {
- return new b.Lm(a)
- };
- b.hx = {
- fa: function(a) {
- return 0 === a || 1 == a ? a: Math.sin(a * Math.PI / 2)
- },
- reverse: function() {
- return b.fx
- }
- };
- b.fT = function() {
- return b.hx
- };
- b.Km = b.ba.extend({
- update: function(a) {
- a = 0 === a || 1 === a ? a: -0.5 * (Math.cos(Math.PI * a) - 1);
- this.i.update(a)
- },
- d: function() {
- var a = new b.Km;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.Km.create(this.i.reverse())
- }
- });
- b.Km.create = function(a) {
- return new b.Km(a)
- };
- b.gx = {
- fa: function(a) {
- return 0 === a || 1 === a ? a: -0.5 * (Math.cos(Math.PI * a) - 1)
- },
- reverse: function() {
- return b.gx
- }
- };
- b.eT = function() {
- return b.gx
- };
- b.hi = b.ba.extend({
- Ea: 0.3,
- ctor: function(a, c) {
- b.ba.prototype.ctor.call(this);
- a && this.C(a, c)
- },
- CU: function() {
- return this.Ea
- },
- GY: function(a) {
- this.Ea = a
- },
- C: function(a, c) {
- b.ba.prototype.C.call(this, a);
- this.Ea = null == c ? 0.3 : c;
- return ! 0
- },
- reverse: function() {
- b.log("cc.EaseElastic.reverse(): it should be overridden in subclass.");
- return null
- },
- d: function() {
- var a = new b.hi;
- a.C(this.i.d(), this.Ea);
- return a
- }
- });
- b.hi.create = function(a, c) {
- return new b.hi(a, c)
- };
- b.Am = b.hi.extend({
- update: function(a) {
- var c = 0;
- 0 === a || 1 === a ? c = a: (c = this.Ea / 4, a -= 1, c = -Math.pow(2, 10 * a) * Math.sin((a - c) * Math.PI * 2 / this.Ea));
- this.i.update(c)
- },
- reverse: function() {
- return b.Cm.create(this.i.reverse(), this.Ea)
- },
- d: function() {
- var a = new b.Am;
- a.C(this.i.d(), this.Ea);
- return a
- }
- });
- b.Am.create = function(a, c) {
- return new b.Am(a, c)
- };
- b.Sw = {
- fa: function(a) {
- if (0 === a || 1 === a) return a;
- a -= 1;
- return - Math.pow(2, 10 * a) * Math.sin((a - 0.075) * Math.PI * 2 / 0.3)
- },
- reverse: function() {
- return b.Tw
- }
- };
- b.oJ = function(a) {
- return a && 0.3 !== a ? {
- Ea: a,
- fa: function(a) {
- if (0 === a || 1 === a) return a;
- a -= 1;
- return - Math.pow(2, 10 * a) * Math.sin((a - this.Ea / 4) * Math.PI * 2 / this.Ea)
- },
- reverse: function() {
- return b.qJ(this.Ea)
- }
- }: b.Sw
- };
- b.Cm = b.hi.extend({
- update: function(a) {
- var c = 0,
- c = 0 === a || 1 == a ? a: Math.pow(2, -10 * a) * Math.sin((a - this.Ea / 4) * Math.PI * 2 / this.Ea) + 1;
- this.i.update(c)
- },
- reverse: function() {
- return b.Am.create(this.i.reverse(), this.Ea)
- },
- d: function() {
- var a = new b.Cm;
- a.C(this.i.d(), this.Ea);
- return a
- }
- });
- b.Cm.create = function(a, c) {
- return new b.Cm(a, c)
- };
- b.Tw = {
- fa: function(a) {
- return 0 === a || 1 === a ? a: Math.pow(2, -10 * a) * Math.sin((a - 0.075) * Math.PI * 2 / 0.3) + 1
- },
- reverse: function() {
- return b.Sw
- }
- };
- b.qJ = function(a) {
- return a && 0.3 !== a ? {
- Ea: a,
- fa: function(a) {
- return 0 === a || 1 === a ? a: Math.pow(2, -10 * a) * Math.sin((a - this.Ea / 4) * Math.PI * 2 / this.Ea) + 1
- },
- reverse: function() {
- return b.oJ(this.Ea)
- }
- }: b.Tw
- };
- b.Bm = b.hi.extend({
- update: function(a) {
- var c = 0,
- c = this.Ea;
- if (0 === a || 1 == a) c = a;
- else {
- c || (c = this.Ea = 0.3 * 1.5);
- var d = c / 4;
- a = 2 * a - 1;
- c = 0 > a ? -0.5 * Math.pow(2, 10 * a) * Math.sin((a - d) * Math.PI * 2 / c) : Math.pow(2, -10 * a) * Math.sin((a - d) * Math.PI * 2 / c) * 0.5 + 1
- }
- this.i.update(c)
- },
- reverse: function() {
- return b.Bm.create(this.i.reverse(), this.Ea)
- },
- d: function() {
- var a = new b.Bm;
- a.C(this.i.d(), this.Ea);
- return a
- }
- });
- b.Bm.create = function(a, c) {
- return new b.Bm(a, c)
- };
- b.pJ = function(a) {
- return {
- Ea: a || 0.3,
- fa: function(a) {
- var d = 0,
- d = this.Ea;
- if (0 === a || 1 === a) d = a;
- else {
- d || (d = this.Ea = 0.3 * 1.5);
- var e = d / 4;
- a = 2 * a - 1;
- d = 0 > a ? -0.5 * Math.pow(2, 10 * a) * Math.sin((a - e) * Math.PI * 2 / d) : Math.pow(2, -10 * a) * Math.sin((a - e) * Math.PI * 2 / d) * 0.5 + 1
- }
- return d
- },
- reverse: function() {
- return b.pJ(this.Ea)
- }
- }
- };
- b.Rg = b.ba.extend({
- Yo: function(a) {
- if (a < 1 / 2.75) return 7.5625 * a * a;
- if (a < 2 / 2.75) return a -= 1.5 / 2.75,
- 7.5625 * a * a + 0.75;
- if (a < 2.5 / 2.75) return a -= 2.25 / 2.75,
- 7.5625 * a * a + 0.9375;
- a -= 2.625 / 2.75;
- return 7.5625 * a * a + 0.984375
- },
- d: function() {
- var a = new b.Rg;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.Rg.create(this.i.reverse())
- }
- });
- b.Rg.create = function(a) {
- return new b.Rg(a)
- };
- b.xm = b.Rg.extend({
- update: function(a) {
- this.i.update(1 - this.Yo(1 - a))
- },
- reverse: function() {
- return b.zm.create(this.i.reverse())
- },
- d: function() {
- var a = new b.xm;
- a.C(this.i.d());
- return a
- }
- });
- b.xm.create = function(a) {
- return new b.xm(a)
- };
- b.tn = function(a) {
- if (a < 1 / 2.75) return 7.5625 * a * a;
- if (a < 2 / 2.75) return a -= 1.5 / 2.75,
- 7.5625 * a * a + 0.75;
- if (a < 2.5 / 2.75) return a -= 2.25 / 2.75,
- 7.5625 * a * a + 0.9375;
- a -= 2.625 / 2.75;
- return 7.5625 * a * a + 0.984375
- };
- b.Jw = {
- fa: function(a) {
- return 1 - b.tn(1 - a)
- },
- reverse: function() {
- return b.Lw
- }
- };
- b.JS = function() {
- return b.Jw
- };
- b.zm = b.Rg.extend({
- update: function(a) {
- this.i.update(this.Yo(a))
- },
- reverse: function() {
- return b.xm.create(this.i.reverse())
- },
- d: function() {
- var a = new b.zm;
- a.C(this.i.d());
- return a
- }
- });
- b.zm.create = function(a) {
- return new b.zm(a)
- };
- b.Lw = {
- fa: function(a) {
- return b.tn(a)
- },
- reverse: function() {
- return b.Jw
- }
- };
- b.LS = function() {
- return b.Lw
- };
- b.ym = b.Rg.extend({
- update: function(a) {
- var c = 0,
- c = 0.5 > a ? 0.5 * (1 - this.Yo(1 - 2 * a)) : 0.5 * this.Yo(2 * a - 1) + 0.5;
- this.i.update(c)
- },
- d: function() {
- var a = new b.ym;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.ym.create(this.i.reverse())
- }
- });
- b.ym.create = function(a) {
- return new b.ym(a)
- };
- b.Kw = {
- fa: function(a) {
- return a = 0.5 > a ? 0.5 * (1 - b.tn(1 - 2 * a)) : 0.5 * b.tn(2 * a - 1) + 0.5
- },
- reverse: function() {
- return b.Kw
- }
- };
- b.KS = function() {
- return b.Kw
- };
- b.um = b.ba.extend({
- update: function(a) {
- this.i.update(0 === a || 1 == a ? a: a * a * (2.70158 * a - 1.70158))
- },
- reverse: function() {
- return b.wm.create(this.i.reverse())
- },
- d: function() {
- var a = new b.um;
- a.C(this.i.d());
- return a
- }
- });
- b.um.create = function(a) {
- return new b.um(a)
- };
- b.Gw = {
- fa: function(a) {
- return 0 === a || 1 === a ? a: a * a * (2.70158 * a - 1.70158)
- },
- reverse: function() {
- return b.Iw
- }
- };
- b.GS = function() {
- return b.Gw
- };
- b.wm = b.ba.extend({
- update: function(a) {
- a -= 1;
- this.i.update(a * a * (2.70158 * a + 1.70158) + 1)
- },
- reverse: function() {
- return b.um.create(this.i.reverse())
- },
- d: function() {
- var a = new b.wm;
- a.C(this.i.d());
- return a
- }
- });
- b.wm.create = function(a) {
- return new b.wm(a)
- };
- b.Iw = {
- fa: function(a) {
- a -= 1;
- return a * a * (2.70158 * a + 1.70158) + 1
- },
- reverse: function() {
- return b.Gw
- }
- };
- b.IS = function() {
- return b.Iw
- };
- b.vm = b.ba.extend({
- update: function(a) {
- a *= 2;
- 1 > a ? this.i.update(a * a * (3.5949095 * a - 2.5949095) / 2) : (a -= 2, this.i.update(a * a * (3.5949095 * a + 2.5949095) / 2 + 1))
- },
- d: function() {
- var a = new b.vm;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.vm.create(this.i.reverse())
- }
- });
- b.vm.create = function(a) {
- return new b.vm(a)
- };
- b.Hw = {
- fa: function(a) {
- a *= 2;
- if (1 > a) return a * a * (3.5949095 * a - 2.5949095) / 2;
- a -= 2;
- return a * a * (3.5949095 * a + 2.5949095) / 2 + 1
- },
- reverse: function() {
- return b.Hw
- }
- };
- b.HS = function() {
- return b.Hw
- };
- b.fk = b.ba.extend({
- po: null,
- qo: null,
- ro: null,
- so: null,
- ctor: function(a) {
- b.ba.prototype.ctor.call(this, a)
- },
- H: function(a, c, d, e, f) {
- return Math.pow(1 - f, 3) * a + 3 * f * Math.pow(1 - f, 2) * c + 3 * Math.pow(f, 2) * (1 - f) * d + Math.pow(f, 3) * e
- },
- update: function(a) {
- this.i.update(this.H(this.po, this.qo, this.ro, this.so, a))
- },
- d: function() {
- var a = new b.fk;
- a.C(this.i.d());
- a.TA(this.po, this.qo, this.ro, this.so);
- return a
- },
- reverse: function() {
- var a = b.fk.create(this.i.reverse());
- a.TA(this.so, this.ro, this.qo, this.po);
- return a
- },
- TA: function(a, c, d, e) {
- this.po = a || 0;
- this.qo = c || 0;
- this.ro = d || 0;
- this.so = e || 0
- }
- });
- b.fk.create = function(a) {
- return new b.fk(a)
- };
- b.nJ = function(a, c, d, e) {
- return {
- fa: function(f) {
- return b.fk.prototype.H(a, c, d, e, f)
- },
- reverse: function() {
- return b.nJ(e, d, c, a)
- }
- }
- };
- b.mk = b.ba.extend({
- H: function(a) {
- return Math.pow(a, 2)
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.mk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.mk.create(this.i.reverse())
- }
- });
- b.mk.create = function(a) {
- return new b.mk(a)
- };
- b.Xw = {
- fa: b.mk.prototype.H,
- reverse: function() {
- return b.Xw
- }
- };
- b.VS = function() {
- return b.Xw
- };
- b.ok = b.ba.extend({
- H: function(a) {
- return - a * (a - 2)
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.ok;
- a.C();
- return a
- },
- reverse: function() {
- return b.ok.create(this.i.reverse())
- }
- });
- b.ok.create = function(a) {
- return new b.ok(a)
- };
- b.Zw = {
- fa: b.ok.prototype.H,
- reverse: function() {
- return b.Zw
- }
- };
- b.XS = function() {
- return b.Zw
- };
- b.nk = b.ba.extend({
- H: function(a) {
- var c = a;
- a *= 2;
- 1 > a ? c = a * a * 0.5 : (--a, c = -0.5 * (a * (a - 2) - 1));
- return c
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.nk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.nk.create(this.i.reverse())
- }
- });
- b.nk.create = function(a) {
- return new b.nk(a)
- };
- b.Yw = {
- fa: b.nk.prototype.H,
- reverse: function() {
- return b.Yw
- }
- };
- b.WS = function() {
- return b.Yw
- };
- b.pk = b.ba.extend({
- H: function(a) {
- return a * a * a * a
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.pk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.pk.create(this.i.reverse())
- }
- });
- b.pk.create = function(a) {
- return new b.pk(a)
- };
- b.$w = {
- fa: b.pk.prototype.H,
- reverse: function() {
- return b.$w
- }
- };
- b.YS = function() {
- return b.$w
- };
- b.rk = b.ba.extend({
- H: function(a) {
- a -= 1;
- return - (a * a * a * a - 1)
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.rk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.rk.create(this.i.reverse())
- }
- });
- b.rk.create = function(a) {
- return new b.rk(a)
- };
- b.bx = {
- fa: b.rk.prototype.H,
- reverse: function() {
- return b.bx
- }
- };
- b.$S = function() {
- return b.bx
- };
- b.qk = b.ba.extend({
- H: function(a) {
- a *= 2;
- if (1 > a) return 0.5 * a * a * a * a;
- a -= 2;
- return - 0.5 * (a * a * a * a - 2)
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.qk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.qk.create(this.i.reverse())
- }
- });
- b.qk.create = function(a) {
- return new b.qk(a)
- };
- b.ax = {
- fa: b.qk.prototype.H,
- reverse: function() {
- return b.ax
- }
- };
- b.ZS = function() {
- return b.ax
- };
- b.sk = b.ba.extend({
- H: function(a) {
- return a * a * a * a * a
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.sk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.sk.create(this.i.reverse())
- }
- });
- b.sk.create = function(a) {
- return new b.sk(a)
- };
- b.cx = {
- fa: b.sk.prototype.H,
- reverse: function() {
- return b.cx
- }
- };
- b.aT = function() {
- return b.cx
- };
- b.uk = b.ba.extend({
- H: function(a) {
- a -= 1;
- return a * a * a * a * a + 1
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.uk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.uk.create(this.i.reverse())
- }
- });
- b.uk.create = function(a) {
- return new b.uk(a)
- };
- b.ex = {
- fa: b.uk.prototype.H,
- reverse: function() {
- return b.ex
- }
- };
- b.cT = function() {
- return b.ex
- };
- b.tk = b.ba.extend({
- H: function(a) {
- a *= 2;
- if (1 > a) return 0.5 * a * a * a * a * a;
- a -= 2;
- return 0.5 * (a * a * a * a * a + 2)
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.tk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.tk.create(this.i.reverse())
- }
- });
- b.tk.create = function(a) {
- return new b.tk(a)
- };
- b.dx = {
- fa: b.tk.prototype.H,
- reverse: function() {
- return b.dx
- }
- };
- b.bT = function() {
- return b.dx
- };
- b.gk = b.ba.extend({
- H: function(a) {
- return - 1 * (Math.sqrt(1 - a * a) - 1)
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.gk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.gk.create(this.i.reverse())
- }
- });
- b.gk.create = function(a) {
- return new b.gk(a)
- };
- b.Mw = {
- fa: b.gk.prototype.H,
- reverse: function() {
- return b.Mw
- }
- };
- b.MS = function() {
- return b.Mw
- };
- b.ik = b.ba.extend({
- H: function(a) {
- a -= 1;
- return Math.sqrt(1 - a * a)
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.ik;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.ik.create(this.i.reverse())
- }
- });
- b.ik.create = function(a) {
- return new b.ik(a)
- };
- b.Ow = {
- fa: b.ik.prototype.H,
- reverse: function() {
- return b.Ow
- }
- };
- b.OS = function() {
- return b.Ow
- };
- b.hk = b.ba.extend({
- H: function(a) {
- a *= 2;
- if (1 > a) return - 0.5 * (Math.sqrt(1 - a * a) - 1);
- a -= 2;
- return 0.5 * (Math.sqrt(1 - a * a) + 1)
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.hk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.hk.create(this.i.reverse())
- }
- });
- b.hk.create = function(a) {
- return new b.hk(a)
- };
- b.Nw = {
- fa: b.hk.prototype.H,
- reverse: function() {
- return b.Nw
- }
- };
- b.NS = function() {
- return b.Nw
- };
- b.jk = b.ba.extend({
- H: function(a) {
- return a * a * a
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.jk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.jk.create(this.i.reverse())
- }
- });
- b.jk.create = function(a) {
- return new b.jk(a)
- };
- b.Pw = {
- fa: b.jk.prototype.H,
- reverse: function() {
- return b.Pw
- }
- };
- b.PS = function() {
- return b.Pw
- };
- b.lk = b.ba.extend({
- H: function(a) {
- a -= 1;
- return a * a * a + 1
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.lk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.lk.create(this.i.reverse())
- }
- });
- b.lk.create = function(a) {
- return new b.lk(a)
- };
- b.Rw = {
- fa: b.lk.prototype.H,
- reverse: function() {
- return b.Rw
- }
- };
- b.RS = function() {
- return b.Rw
- };
- b.kk = b.ba.extend({
- H: function(a) {
- a *= 2;
- if (1 > a) return 0.5 * a * a * a;
- a -= 2;
- return 0.5 * (a * a * a + 2)
- },
- update: function(a) {
- this.i.update(this.H(a))
- },
- d: function() {
- var a = new b.kk;
- a.C(this.i.d());
- return a
- },
- reverse: function() {
- return b.kk.create(this.i.reverse())
- }
- });
- b.kk.create = function(a) {
- return new b.kk(a)
- };
- b.Qw = {
- fa: b.kk.prototype.H,
- reverse: function() {
- return b.Qw
- }
- };
- b.QS = function() {
- return b.Qw
- };
- b.$t = function(a, c, d, e, f, g) {
- var h = g * g,
- k = h * g,
- m = (1 - f) / 2;
- f = m * ( - k + 2 * h - g);
- var n = m * ( - k + h) + (2 * k - 3 * h + 1);
- g = m * (k - 2 * h + g) + ( - 2 * k + 3 * h);
- h = m * (k - h);
- return C(a.x * f + c.x * n + d.x * g + e.x * h, a.y * f + c.y * n + d.y * g + e.y * h)
- };
- b.LA = function(a) {
- for (var c = [], d = a.length - 1; 0 <= d; d--) c.push(C(a[d].x, a[d].y));
- return c
- };
- b.dp = function(a) {
- for (var c = [], d = 0; d < a.length; d++) c.push(C(a[d].x, a[d].y));
- return c
- };
- b.Fb = function(a, c) {
- var d = Math.min(a.length - 1, Math.max(c, 0));
- return a[d]
- };
- b.LX = function(a) {
- for (var c = a.length,
- d = 0 | c / 2,
- e = 0; e < d; ++e) {
- var f = a[e];
- a[e] = a[c - e - 1];
- a[c - e - 1] = f
- }
- };
- b.jf = b.o.extend({
- fe: null,
- Bw: 0,
- gj: 0,
- yb: null,
- mw: null,
- ctor: function(a, c, d) {
- b.o.prototype.ctor.call(this);
- this.fe = [];
- void 0 !== d && this.n(a, c, d)
- },
- n: function(a, c, d) {
- if (!c || 0 == c.length) throw "Invalid configuration. It must at least have one control point";
- return b.o.prototype.n.call(this, a) ? (this.TM(c), this.gj = d, !0) : !1
- },
- d: function() {
- var a = new b.jf;
- a.n(this.u, b.dp(this.fe), this.gj);
- return a
- },
- q: function(a) {
- b.o.prototype.q.call(this, a);
- this.Bw = 1 / (this.fe.length - 1);
- this.yb = C(this.target.ja.x, this.target.ja.y);
- this.mw = C(0, 0)
- },
- update: function(a) {
- a = this.Hb(a);
- var c, d = this.fe;
- if (1 == a) c = d.length - 1,
- a = 1;
- else {
- var e = this.Bw;
- c = 0 | a / e;
- a = (a - e * c) / e
- }
- c = b.$t(b.Fb(d, c - 1), b.Fb(d, c - 0), b.Fb(d, c + 1), b.Fb(d, c + 2), this.gj, a);
- b.rm && (d = this.target.ja.x - this.yb.x, a = this.target.ja.y - this.yb.y, 0 != d || 0 != a) && (e = this.mw, d = e.x + d, a = e.y + a, e.x = d, e.y = a, c.x += d, c.y += a);
- this.BB(c)
- },
- reverse: function() {
- var a = b.LA(this.fe);
- return b.kz(this.u, a, this.gj)
- },
- BB: function(a) {
- this.target.Ma(a);
- this.yb = a
- },
- DU: function() {
- return this.fe
- },
- TM: function(a) {
- this.fe = a
- }
- });
- b.kz = function(a, c, d) {
- return new b.jf(a, c, d)
- };
- b.jf.create = b.kz;
- b.ck = b.jf.extend({
- ob: null,
- ctor: function(a, c, d) {
- b.jf.prototype.ctor.call(this);
- this.ob = C(0, 0);
- void 0 !== d && this.n(a, c, d)
- },
- q: function(a) {
- b.jf.prototype.q.call(this, a);
- this.ob.x = a.ja.x;
- this.ob.y = a.ja.y
- },
- reverse: function() {
- for (var a = this.fe.slice(), c, d = a[0], e = 1; e < a.length; ++e) c = a[e],
- a[e] = b.uc(c, d),
- d = c;
- a = b.LA(a);
- d = a[a.length - 1];
- a.pop();
- d.x = -d.x;
- d.y = -d.y;
- a.unshift(d);
- for (e = 1; e < a.length; ++e) c = a[e],
- c.x = -c.x,
- c.y = -c.y,
- c.x += d.x,
- c.y += d.y,
- d = a[e] = c;
- return b.jz(this.u, a, this.gj)
- },
- BB: function(a) {
- var c = this.ob,
- d = a.x + c.x;
- a = a.y + c.y;
- this.yb.x = d;
- this.yb.y = a;
- this.target.Ma(d, a)
- },
- d: function() {
- var a = new b.ck;
- a.n(this.u, b.dp(this.fe), this.gj);
- return a
- }
- });
- b.jz = function(a, c, d) {
- return new b.ck(a, c, d)
- };
- b.ck.create = b.jz;
- b.gq = b.jf.extend({
- ctor: function(a, c) {
- c && this.n(a, c)
- },
- n: function(a, c) {
- return b.jf.prototype.n.call(this, a, c, 0.5)
- },
- d: function() {
- var a = new b.gq;
- a.n(this.u, b.dp(this.fe));
- return a
- }
- });
- b.OI = function(a, c) {
- return new b.gq(a, c)
- };
- b.gq.create = b.OI;
- b.fq = b.ck.extend({
- ctor: function(a, c) {
- b.ck.prototype.ctor.call(this);
- c && this.n(a, c)
- },
- n: function(a, c) {
- return b.jf.prototype.n.call(this, a, c, 0.5)
- },
- d: function() {
- var a = new b.fq;
- a.n(this.u, b.dp(this.fe));
- return a
- }
- });
- b.NI = function(a, c) {
- return new b.fq(a, c)
- };
- b.fq.create = b.NI;
- b.rO = b.oa.extend({
- SN: function() {}
- });
- b.Wp = b.o.extend({
- key: "",
- kp: 0,
- Sp: 0,
- aJ: 0,
- ctor: function(a, c, d, e) {
- b.o.prototype.ctor.call(this);
- this.key = "";
- void 0 !== e && this.n(a, c, d, e)
- },
- n: function(a, c, d, e) {
- return b.o.prototype.n.call(this, a) ? (this.key = c, this.Sp = e, this.kp = d, !0) : !1
- },
- q: function(a) {
- if (!a || !a.SN) throw "cc.ActionTween.startWithTarget(): target must be non-null, and target must implement updateTweenAction function";
- b.o.prototype.q.call(this, a);
- this.aJ = this.Sp - this.kp
- },
- update: function() {},
- reverse: function() {
- return b.Zy(this.duration, this.key, this.Sp, this.kp)
- },
- d: function() {
- var a = new b.Wp;
- a.n(this.u, this.key, this.kp, this.Sp);
- return a
- }
- });
- b.Zy = function(a, c, d, e) {
- return new b.Wp(a, c, d, e)
- };
- b.Wp.create = b.Zy;
- b.Tf = b.hf.extend({
- Ja: null,
- qs: null,
- T: !1,
- qa: null,
- Mc: "LabelAtlas",
- ctor: function(a, c, d, e, f) {
- b.hf.prototype.ctor.call(this);
- c && b.Tf.prototype.Qd.call(this, a, c, d, e, f)
- },
- nv: function() {
- return this.T
- },
- Vc: function(a, c) {
- this.qa || (this.qa = []);
- this.qa.push({
- ne: a,
- td: c
- })
- },
- Ub: function() {
- if (this.qa) {
- this.T = !0;
- for (var a = this.qa,
- c = 0,
- d = a.length; c < d; c++) {
- var e = a[c];
- e.ne.call(e.td, this)
- }
- a.length = 0
- }
- },
- Qd: function(a, c, d, e, f) {
- var g = a + "",
- h, k;
- if (void 0 === d) {
- d = b.D.Yc(c);
- if (1 !== parseInt(d.version, 10)) return b.log("cc.LabelAtlas.initWithString(): Unsupported version. Upgrade cocos2d version"),
- !1;
- c = b.path.$o(c, d.textureFilename);
- e = b.Ka();
- h = parseInt(d.itemWidth, 10) / e;
- k = parseInt(d.itemHeight, 10) / e;
- d = String.fromCharCode(parseInt(d.firstChar, 10))
- } else h = d || 0,
- k = e || 0,
- d = f || " ";
- var m = null,
- m = c instanceof b.K ? c: b.va.cc(c); (this.T = c = m.xb) || m.Vc(function() {
- this.ia(m, h, k, g.length);
- this.string = g;
- this.Ub()
- },
- this);
- return this.ia(m, h, k, g.length) ? (this.qs = d, this.string = g, !0) : !1
- },
- V: function(a) {
- b.hf.prototype.V.call(this, a);
- this.Vj()
- },
- Nl: function() {
- return this.Ja
- },
- na: function(a) {
- b.hf.prototype.na.call(this, a);
- b.IC && (a = this.size, b.Hd.gc([C(0, 0), C(a.width, 0), C(a.width, a.height), C(0, a.height)], 4, !0))
- },
- rr: function(a, c, d) {
- a.NG = !0;
- b.m.prototype.N.call(this, a, c, d)
- },
- Vj: null,
- $H: function() {
- for (var a = this.Ja || "",
- c = a.length,
- d = this.texture,
- e = this.Ke,
- f = this.de,
- g = 0; g < c; g++) {
- var h = a.charCodeAt(g) - this.qs.charCodeAt(0),
- h = E(parseInt(h % this.Ti, 10) * e, parseInt(h / this.Ti, 10) * f, e, f),
- k = a.charCodeAt(g),
- m = this.Od(g);
- m ? 32 == k ? (m.ga(), m.Ha(E(0, 0, 10, 10), !1, D(0, 0))) : (m.ia(d, h), m.visible = !0, m.opacity = this.sa) : (m = new b.B, 32 == k ? (m.ga(), m.Ha(E(0, 0, 10, 10), !1, D(0, 0))) : m.ia(d, h), b.m.prototype.N.call(this, m, 0, g));
- m.Ma(g * e + e / 2, f / 2)
- }
- },
- aI: function() {
- var a = this.Ja,
- c = a.length,
- d = this.textureAtlas,
- e = d.texture,
- f = e.pixelsWidth,
- e = e.pixelsHeight,
- g = this.Ke,
- h = this.de;
- this.Yn || (g = this.Ke * b.Ka(), h = this.de * b.Ka());
- c > d.Bc && b.log("cc.LabelAtlas._updateAtlasValues(): Invalid String length");
- for (var k = d.quads,
- m = this.Q,
- m = {
- r: m.r,
- g: m.g,
- b: m.b,
- a: this.sa
- },
- n = this.Ke, r = 0; r < c; r++) {
- var s = a.charCodeAt(r) - this.qs.charCodeAt(0),
- u = s % this.Ti,
- t = 0 | s / this.Ti,
- v;
- b.vk ? (u = (2 * u * g + 1) / (2 * f), s = u + (2 * g - 2) / (2 * f), t = (2 * t * h + 1) / (2 * e), v = t + (2 * h - 2) / (2 * e)) : (u = u * g / f, s = u + g / f, t = t * h / e, v = t + h / e);
- var w = k[r],
- A = w.ya,
- z = w.za,
- I = w.wa,
- w = w.xa;
- A.f.R = u;
- A.f.S = t;
- z.f.R = s;
- z.f.S = t;
- I.f.R = u;
- I.f.S = v;
- w.f.R = s;
- w.f.S = v;
- I.e.x = r * n;
- I.e.y = 0;
- I.e.z = 0;
- w.e.x = r * n + n;
- w.e.y = 0;
- w.e.z = 0;
- A.e.x = r * n;
- A.e.y = this.de;
- A.e.z = 0;
- z.e.x = r * n + n;
- z.e.y = this.de;
- z.e.z = 0;
- A.j = m;
- z.j = m;
- I.j = m;
- w.j = m
- }
- 0 < c && (d.dirty = !0, a = d.totalQuads, c > a && d.QK(c - a))
- },
- ic: null,
- IH: function(a) {
- a = String(a);
- var c = a.length;
- this.Ja = a;
- this.width = c * this.Ke;
- this.height = this.de;
- if (this.s) {
- a = this.s;
- for (var c = a.length,
- d = 0; d < c; d++) {
- var e = a[d];
- e && !e.NG && (e.visible = !1)
- }
- }
- this.Vj();
- this.quadsToDraw = c
- },
- KH: function(a) {
- a = String(a);
- var c = a.length;
- c > this.textureAtlas.totalQuads && this.textureAtlas.JA(c);
- this.Ja = a;
- this.width = c * this.Ke;
- this.height = this.de;
- this.Vj();
- this.quadsToDraw = c
- },
- Ga: null,
- bt: function(a) {
- if (this.sa !== a) {
- b.hf.prototype.Ga.call(this, a);
- for (var c = this.s,
- d = 0,
- e = c.length; d < e; d++) c[d] && (c[d].opacity = a)
- }
- },
- ct: function(a) {
- this.bH !== a && b.hf.prototype.Ga.call(this, a)
- }
- });
- p = b.Tf.prototype;
- b.da === b.wb ? (p.Vj = p.aI, p.ic = p.KH, p.Ga = p.ct) : (p.Vj = p.$H, p.ic = p.IH, p.Ga = p.bt, p.N = p.rr);
- b.k(p, "opacity", p.wj, p.Ga);
- b.k(p, "string", p.Nl, p.ic);
- b.Tf.create = function(a, c, d, e, f) {
- return new b.Tf(a, c, d, e, f)
- };
- b.mP = -1;
- b.vq = b.Vf.extend({
- Da: !1,
- Ja: "",
- gd: null,
- Tn: "",
- Qi: "",
- Jk: b.Yg,
- Hl: -1,
- Mx: !1,
- Zn: null,
- qy: null,
- sa: 255,
- Md: 255,
- Q: null,
- ac: null,
- $d: !0,
- De: !0,
- T: !1,
- qa: null,
- Mc: "LabelBMFont",
- Cy: function(a, c) {
- c ? this.Qi = a: this.Ja = a;
- var d = this.s;
- if (d) for (var e = 0; e < d.length; e++) {
- var f = d[e];
- f && f.te(!1)
- }
- this.T && (this.fp(), c && this.yd())
- },
- ctor: function(a, c, d, e, f) {
- b.Vf.prototype.ctor.call(this);
- this.Zn = C(0, 0);
- this.Q = b.color(255, 255, 255, 255);
- this.ac = b.color(255, 255, 255, 255);
- this.qy = [];
- this.Qd(a, c, d, e, f)
- },
- nv: function() {
- return this.T
- },
- Vc: function(a, c) {
- this.qa || (this.qa = []);
- this.qa.push({
- ne: a,
- td: c
- })
- },
- Ub: function() {
- if (this.qa) {
- for (var a = this.qa,
- c = 0,
- d = a.length; c < d; c++) {
- var e = a[c];
- e.ne.call(e.td, this)
- }
- a.length = 0
- }
- },
- na: function(a) {
- b.Vf.prototype.na.call(this, a);
- if (b.JC) {
- a = this.ud();
- var c = C(0 | -this.lb.x, 0 | -this.lb.y);
- a = [C(c.x, c.y), C(c.x + a.width, c.y), C(c.x + a.width, c.y + a.height), C(c.x, c.y + a.height)];
- b.Hd.Rj(0, 255, 0, 255);
- b.Hd.gc(a, 4, !0)
- }
- },
- V: function(a) {
- var c = this.Q,
- d = this.ac;
- if (d.r != a.r || d.g != a.g || d.b != a.b || d.a != a.a) c.r = d.r = a.r,
- c.g = d.g = a.g,
- c.b = d.b = a.b,
- this.T && this.$d && (a = b.color.WHITE, (c = this.Db) && c.cascadeColor && (a = c.pp()), this.sb(a))
- },
- Dj: function() {
- return this.Da
- },
- Ng: function(a) {
- this.Da = a;
- if (a = this.s) for (var c = 0; c < a.length; c++) {
- var d = a[c];
- d && (d.opacityModifyRGB = this.Da)
- }
- },
- wj: function() {
- return this.Md
- },
- YJ: function() {
- return this.sa
- },
- Ga: function(a) {
- this.sa = this.Md = a;
- if (this.De) {
- var c = 255,
- d = this.Db;
- d && d.cascadeOpacity && (c = d.sa);
- this.kb(c)
- }
- this.Q.a = this.ac.a = a
- },
- kb: function(a) {
- this.sa = this.Md * a / 255;
- a = this.s;
- for (var c = 0; c < a.length; c++) {
- var d = a[c];
- b.da == b.wb ? d.kb(this.sa) : (b.m.prototype.kb.call(d, this.sa), d.W())
- }
- this.fd()
- },
- hA: function() {
- return ! 1
- },
- VA: function(a) {
- this.De = a
- },
- Nh: function() {
- var a = this.ac;
- return b.color(a.r, a.g, a.b, a.a)
- },
- pp: function() {
- return this.Q
- },
- sb: function(a) {
- var c = this.Q,
- d = this.ac;
- c.r = d.r * a.r / 255;
- c.g = d.g * a.g / 255;
- c.b = d.b * a.b / 255;
- a = this.s;
- for (c = 0; c < a.length; c++) d = a[c],
- b.da == b.wb ? d.sb(this.Q) : (b.m.prototype.sb.call(d, this.Q), d.W());
- this.fd()
- },
- fd: function() {
- if (b.da != b.wb) {
- var a = this.La();
- if (a && 0 < a.ud().width) {
- var c = this.mb.la;
- if (c) {
- var d = a.la,
- e = E(0, 0, c.width, c.height);
- d instanceof HTMLCanvasElement && !this.nb ? b.tj(c, this.Q, e, d) : (d = b.tj(c, this.Q, e), a = new b.K, a.Mb(d), a.Fa());
- this.Wa(a)
- }
- }
- }
- },
- gA: function() {
- return ! 1
- },
- UA: function(a) {
- this.$d = a
- },
- ga: function() {
- return this.Qd(null, null, null, null, null)
- },
- Qd: function(a, c, d, e, f) {
- a = a || "";
- this.gd && b.log("cc.LabelBMFont.initWithString(): re-init is no longer supported");
- if (c) {
- var g = b.D.Yc(c);
- if (!g) return b.log("cc.LabelBMFont.initWithString(): Impossible to create font. Please check file"),
- !1;
- this.gd = g;
- this.Tn = c;
- c = b.va.cc(g.dz); (this.T = g = c.xb) || c.Vc(function(a) {
- this.T = !0;
- this.ia(a, this.Qi.length);
- this.ic(this.Qi, !0);
- this.Ub()
- },
- this)
- } else c = new b.K,
- g = new Image,
- c.Mb(g),
- this.T = !1;
- return this.ia(c, a.length) ? (this.Jk = e || b.cn, this.Zn = f || C(0, 0), this.Hl = null == d ? -1 : d, this.sa = this.Md = 255, this.Q = b.color(255, 255, 255, 255), this.ac = b.color(255, 255, 255, 255), this.$d = this.De = !0, this.v.width = 0, this.v.height = 0, this.Qj(0.5, 0.5), b.da === b.wb && (d = this.textureAtlas.texture, this.Da = d.Aj(), e = this.qy = new b.B, e.ia(d, E(0, 0, 0, 0), !1), e.batchNode = this), this.ic(a, !0), !0) : !1
- },
- fp: function() {
- var a = b.da,
- c = a === b.Ya ? this.texture: this.textureAtlas.texture,
- d = 0,
- e = D(0, 0),
- f = 0,
- g = 1,
- h = this.Ja,
- k = h ? h.length: 0;
- if (0 !== k) {
- var m, n = this.gd,
- r = n.kL,
- s = n.au,
- u = n.MJ;
- for (m = 0; m < k - 1; m++) 10 == h.charCodeAt(m) && g++;
- var t = s * g,
- g = -(s - s * g),
- v = -1;
- for (m = 0; m < k; m++) if (s = h.charCodeAt(m), 0 != s) if (10 === s) d = 0,
- g -= n.au;
- else {
- var w = r[v << 16 | s & 65535] || 0,
- A = u[s];
- if (A) {
- var z = E(A.rect.x, A.rect.y, A.rect.width, A.rect.height),
- z = b.Hp(z);
- z.x += this.Zn.x;
- z.y += this.Zn.y; (v = this.Od(m)) ? 32 === s && a === b.Ya ? v.Ha(z, !1, D(0, 0)) : (v.Ha(z, !1), v.visible = !0) : (v = new b.B, 32 === s && a === b.Ya && (z = E(0, 0, 0, 0)), v.ia(c, z, !1), v.lo = !0, this.N(v, 0, m));
- v.opacityModifyRGB = this.Da;
- b.da == b.wb ? (v.sb(this.Q), v.kb(this.sa)) : (b.m.prototype.sb.call(v, this.Q), b.m.prototype.kb.call(v, this.sa), v.W());
- z = C(d + A.ZN + 0.5 * A.rect.width + w, g + (n.au - A.$N) - 0.5 * z.height * b.Ka());
- v.Ma(b.OL(z));
- d += A.YN + w;
- v = s;
- f < d && (f = d)
- } else b.log("cocos2d: LabelBMFont: character not found " + h[m])
- }
- e.width = f;
- e.height = t;
- this.wd(b.qN(e))
- }
- },
- yZ: function(a) {
- var c = this.s;
- if (c) for (var d = 0,
- e = c.length; d < e; d++) {
- var f = c[d];
- f && (f.visible = !1)
- }
- this.gd && this.fp();
- a || this.yd()
- },
- Nl: function() {
- return this.Qi
- },
- ic: function(a, c) {
- a = String(a);
- null == c && (c = !0);
- if (null == a || "string" != typeof a) a += "";
- this.Qi = a;
- this.Cy(a, c)
- },
- JH: function(a) {
- this.ic(a, !1)
- },
- YX: function(a) {
- this.ic(a, !0)
- },
- yd: function() {
- this.string = this.Qi;
- if (0 < this.Hl) {
- for (var a = this.Ja.length,
- c = [], d = [], e = 1, f = 0, g = !1, h = !1, k = -1, m = -1, n = 0, r, s = 0, u = this.s.length; s < u; s++) {
- for (var t = 0; ! (r = this.Od(s + n + t));) t++;
- n += t;
- if (f >= a) break;
- var v = this.Ja[f];
- h || (m = this.as(r), h = !0);
- g || (k = m, g = !0);
- if (10 == v.charCodeAt(0)) {
- d.push("\n");
- c = c.concat(d);
- d.length = 0;
- g = h = !1;
- k = m = -1;
- s--;
- n -= t;
- e++;
- if (f >= a) break;
- m || (m = this.as(r), h = !0);
- k || (k = m, g = !0);
- f++
- } else if (b.Mu(v)) d.push(v),
- c = c.concat(d),
- d.length = 0,
- h = !1,
- m = -1,
- f++;
- else if (this.eG(r) - k > this.Hl) if (this.Mx) {
- b.DB(d);
- d.push("\n");
- c = c.concat(d);
- d.length = 0;
- g = h = !1;
- k = m = -1;
- e++;
- if (f >= a) break;
- m || (m = this.as(r), h = !0);
- k || (k = m, g = !0);
- s--
- } else d.push(v),
- -1 != c.lastIndexOf(" ") ? b.DB(c) : c = [],
- 0 < c.length && c.push("\n"),
- e++,
- g = !1,
- k = -1,
- f++;
- else d.push(v),
- f++
- }
- c = c.concat(d);
- s = c.length;
- r = "";
- for (f = 0; f < s; ++f) r += c[f];
- r += String.fromCharCode(0);
- this.Cy(r, !1)
- }
- if (this.Jk != b.cn) for (c = f = 0, a = this.Ja.length, d = [], e = 0; e < a; e++) if (10 == this.Ja[e].charCodeAt(0) || 0 == this.Ja[e].charCodeAt(0)) if (s = 0, g = d.length, 0 == g) c++;
- else {
- if (r = f + g - 1 + c, !(0 > r) && (s = this.Od(r), null != s)) {
- s = s.ja.x + s.Ie() / 2;
- h = 0;
- switch (this.Jk) {
- case b.Yg:
- h = this.width / 2 - s / 2;
- break;
- case b.$v:
- h = this.width - s
- }
- if (0 != h) for (s = 0; s < g; s++)(r = f + s + c, 0 > r || !(r = this.Od(r))) || (r.x += h);
- f += g;
- c++;
- d.length = 0
- }
- } else d.push(this.Ja[f])
- },
- vM: function(a) {
- this.Jk = a;
- this.yd()
- },
- SF: function() {
- return this.Jk
- },
- zM: function(a) {
- this.Hl = a;
- this.yd()
- },
- Xr: function() {
- return this.Hl
- },
- vY: function(a) {
- this.Mx = a;
- this.yd()
- },
- Og: function(a, c) {
- b.m.prototype.Og.call(this, a, c);
- this.yd()
- },
- Qp: function(a) {
- b.m.prototype.Qp.call(this, a);
- this.yd()
- },
- gv: function(a) {
- b.m.prototype.gv.call(this, a);
- this.yd()
- },
- mY: function(a) {
- if (null != a && a != this.Tn) {
- var c = b.D.Yc(a);
- c ? (this.Tn = a, this.gd = c, a = b.va.cc(c.dz), this.T = c = a.xb, this.texture = a, b.da === b.Ya && (this.mb = this.texture), c ? this.fp() : a.Vc(function(a) {
- this.T = !0;
- this.texture = a;
- this.fp();
- this.fd();
- this.yd();
- this.Ub()
- },
- this)) : b.log("cc.LabelBMFont.setFntFile() : Impossible to create font. Please check file")
- }
- },
- gU: function() {
- return this.Tn
- },
- Qj: function(a, c) {
- b.m.prototype.Qj.call(this, a, c);
- this.yd()
- },
- zy: function(a) {
- b.m.prototype.zy.call(this, a);
- this.yd()
- },
- Ws: function(a) {
- b.m.prototype.Ws.call(this, a);
- this.yd()
- },
- Xs: function(a) {
- b.m.prototype.Xs.call(this, a);
- this.yd()
- },
- OQ: function() {},
- hR: function(a, c) {
- var d = 0;
- if (this.wF.lL) {
- var e = this.wF.lL[(a << 16 | c & 65535).toString()];
- e && (d = e.QR)
- }
- return d
- },
- as: function(a) {
- return a.ja.x * this.O - a.Ie() * this.O * a.Ab.x
- },
- eG: function(a) {
- return a.ja.x * this.O + a.Ie() * this.O * a.Ab.x
- }
- });
- p = b.vq.prototype;
- b.da !== b.Ya || b.Aa.wt || (p.fd = function() {
- if (b.da != b.wb) {
- var a, c = this.La();
- c && 0 < c.ud().width && (a = c.la) && (c = b.va.zu(this.mb.la)) && (a instanceof HTMLCanvasElement && !this.nb ? b.sj(a, c, this.Q, null, a) : (a = b.sj(a, c, this.Q), c = new b.K, c.Mb(a), c.Fa(), this.Wa(c)))
- }
- });
- b.k(p, "string", p.Nl, p.JH);
- b.k(p, "boundingWidth", p.Xr, p.zM);
- b.k(p, "textAlign", p.SF, p.vM);
- b.vq.create = function(a, c, d, e, f) {
- return new b.vq(a, c, d, e, f)
- };
- b.Mu = function(a) {
- a = a.charCodeAt(0);
- return 9 <= a && 13 >= a || 32 == a || 133 == a || 160 == a || 5760 == a || 8192 <= a && 8202 >= a || 8232 == a || 8233 == a || 8239 == a || 8287 == a || 12288 == a
- };
- b.DB = function(a) {
- var c = a.length;
- if (! (0 >= c) && (c -= 1, b.Mu(a[c]))) {
- for (var d = c - 1; 0 <= d; --d) if (b.Mu(a[d])) c = d;
- else break;
- b.TN(a, c)
- }
- };
- b.TN = function(a, c) {
- var d = a.length;
- c >= d || 0 > c || a.splice(c, d)
- };
- b.MF = {
- EC: /info [^\n]*(\n|$)/gi,
- $B: /common [^\n]*(\n|$)/gi,
- oD: /page [^\n]*(\n|$)/gi,
- ZB: /char [^\n]*(\n|$)/gi,
- HC: /kerning [^\n]*(\n|$)/gi,
- GC: /\w+=[^ \r\n]+/gi,
- FC: /^[\-]?\d+$/,
- ml: function(a) {
- a = a.match(this.GC);
- var c = {};
- if (a) for (var d = 0,
- e = a.length; d < e; d++) {
- var f = a[d],
- g = f.indexOf("\x3d"),
- h = f.substring(0, g),
- f = f.substring(g + 1);
- f.match(this.FC) ? f = parseInt(f) : '"' == f[0] && (f = f.substring(1, f.length - 1));
- c[h] = f
- }
- return c
- },
- GL: function(a, c) {
- var d = {};
- this.ml(a.match(this.EC)[0]);
- var e = this.ml(a.match(this.$B)[0]);
- d.au = e.lineHeight;
- if (b.da === b.wb) {
- var f = b.bu.il; (e.scaleW > f.width || e.scaleH > f.height) && b.log("cc.LabelBMFont._parseCommonArguments(): page can't be larger than supported")
- }
- 1 !== e.pages && b.log("cc.LabelBMFont._parseCommonArguments(): only supports 1 page");
- e = this.ml(a.match(this.oD)[0]);
- 0 !== e.id && b.log("cc.LabelBMFont._parseImageFileName() : file could not be found");
- d.dz = b.path.$o(c, e.file);
- for (var g = a.match(this.ZB), h = d.MJ = {},
- e = 0, f = g.length; e < f; e++) {
- var k = this.ml(g[e]);
- h[k.id] = {
- rect: {
- x: k.x,
- y: k.y,
- width: k.width,
- height: k.height
- },
- ZN: k.xoffset,
- $N: k.yoffset,
- YN: k.xadvance
- }
- }
- g = d.kL = {};
- if (h = a.match(this.HC)) for (e = 0, f = h.length; e < f; e++) k = this.ml(h[e]),
- g[k.first << 16 | k.second & 65535] = k.amount;
- return d
- },
- load: function(a, c, d, e) {
- var f = this;
- b.D.yp(a,
- function(a, d) {
- if (a) return e(a);
- e(null, f.GL(d, c))
- })
- }
- };
- b.D.Mg(["fnt"], b.MF);
- b.BZ = function() {
- return {
- x: 0,
- y: 0
- }
- };
- b.Qg = function(a, c) {
- return {
- x: a,
- y: c
- }
- };
- b.xc = function(a, c) {
- return b.Qg(a.x + c.x, a.y + c.y)
- };
- b.bb = function(a, c) {
- return b.Qg(a.x - c.x, a.y - c.y)
- };
- b.Nb = function(a, c) {
- return b.Qg(a.x * c, a.y * c)
- };
- b.Wj = function(a) {
- return b.Qg( - a.y, a.x)
- };
- b.zd = function(a) {
- return b.Qg( - a.x, -a.y)
- };
- b.EB = function(a, c) {
- return a.x * c.x + a.y * c.y
- };
- b.AZ = function(a) {
- return b.Qg(Math.cos(a), Math.sin(a))
- };
- b.pm = function(a) {
- a = b.Td(C(a.x, a.y));
- return b.Qg(a.x, a.y)
- };
- b.Ac = function(a) {
- return b.Qg(a.x, a.y)
- };
- b.U = function(a) {
- return {
- R: a.x,
- S: a.y
- }
- };
- b.mC = b.m.extend({
- pa: null,
- t: null,
- Cb: 1,
- Qc: null,
- Mc: "DrawNodeCanvas",
- ctor: function() {
- b.m.prototype.ctor.call(this);
- this.pa = [];
- this.Qc = b.color(255, 255, 255, 255);
- this.t = new b.cb(b.kc, b.jc);
- this.ga()
- },
- Ml: function() {
- return this.t
- },
- $h: function(a, c) {
- void 0 === c ? (this.t.src = a.src, this.t.Y = a.Y) : (this.t.src = a, this.t.Y = c)
- },
- ev: function(a) {
- this.Cb = a
- },
- hK: function() {
- return this.Cb
- },
- Rj: function(a) {
- var c = this.Qc;
- c.r = a.r;
- c.g = a.g;
- c.b = a.b;
- c.a = null == a.a ? 255 : a.a
- },
- Sb: function() {
- return b.color(this.Qc.r, this.Qc.g, this.Qc.b, this.Qc.a)
- },
- ku: function(a, c, d, e, f) {
- e = e || this.Cb;
- f = f || this.Sb();
- null == f.a && (f.a = 255);
- a = [a, C(c.x, a.y), c, C(a.x, c.y)];
- c = new b.Yf(b.Tb.Wf);
- c.Ud = a;
- c.lineWidth = e;
- c.Mf = f;
- c.xp = !0;
- c.Jg = !0;
- c.lineCap = "butt";
- if (c.fillColor = d) null == d.a && (d.a = 255),
- c.Ku = !0;
- this.pa.push(c)
- },
- hu: function(a, c, d, e, f, g, h) {
- g = g || this.Cb;
- h = h || this.Sb();
- null == h.a && (h.a = 255);
- for (var k = 2 * Math.PI / e,
- m = [], n = 0; n <= e; n++) {
- var r = n * k;
- m.push(C(c * Math.cos(r + d) + a.x, c * Math.sin(r + d) + a.y))
- }
- f && m.push(C(a.x, a.y));
- a = new b.Yf(b.Tb.Wf);
- a.Ud = m;
- a.lineWidth = g;
- a.Mf = h;
- a.xp = !0;
- a.Jg = !0;
- this.pa.push(a)
- },
- ju: function(a, c, d, e, f, g) {
- f = f || this.Cb;
- g = g || this.Sb();
- null == g.a && (g.a = 255);
- for (var h = [], k = 0, m = 0; m < e; m++) h.push(C(Math.pow(1 - k, 2) * a.x + 2 * (1 - k) * k * c.x + k * k * d.x, Math.pow(1 - k, 2) * a.y + 2 * (1 - k) * k * c.y + k * k * d.y)),
- k += 1 / e;
- h.push(C(d.x, d.y));
- a = new b.Yf(b.Tb.Wf);
- a.Ud = h;
- a.lineWidth = f;
- a.Mf = g;
- a.Jg = !0;
- a.lineCap = "round";
- this.pa.push(a)
- },
- iu: function(a, c, d, e, f, g, h) {
- g = g || this.Cb;
- h = h || this.Sb();
- null == h.a && (h.a = 255);
- for (var k = [], m = 0, n = 0; n < f; n++) k.push(C(Math.pow(1 - m, 3) * a.x + 3 * Math.pow(1 - m, 2) * m * c.x + 3 * (1 - m) * m * m * d.x + m * m * m * e.x, Math.pow(1 - m, 3) * a.y + 3 * Math.pow(1 - m, 2) * m * c.y + 3 * (1 - m) * m * m * d.y + m * m * m * e.y)),
- m += 1 / f;
- k.push(C(e.x, e.y));
- a = new b.Yf(b.Tb.Wf);
- a.Ud = k;
- a.lineWidth = g;
- a.Mf = h;
- a.Jg = !0;
- a.lineCap = "round";
- this.pa.push(a)
- },
- gu: function(a, c, d, e) {
- this.Lh(a, 0.5, c, d, e)
- },
- Lh: function(a, c, d, e, f) {
- e = e || this.Cb;
- f = f || this.Sb();
- null == f.a && (f.a = 255);
- for (var g = [], h, k, m = 1 / a.length, n = 0; n < d + 1; n++) k = n / d,
- 1 == k ? (h = a.length - 1, k = 1) : (h = 0 | k / m, k = (k - m * h) / m),
- h = b.$t(b.Fb(a, h - 1), b.Fb(a, h - 0), b.Fb(a, h + 1), b.Fb(a, h + 2), c, k),
- g.push(h);
- a = new b.Yf(b.Tb.Wf);
- a.Ud = g;
- a.lineWidth = e;
- a.Mf = f;
- a.Jg = !0;
- a.lineCap = "round";
- this.pa.push(a)
- },
- ip: function(a, c, d) {
- d = d || this.Sb();
- null == d.a && (d.a = 255);
- var e = new b.Yf(b.Tb.aw);
- e.Ud = [a];
- e.lineWidth = c;
- e.fillColor = d;
- this.pa.push(e)
- },
- eJ: function(a, c, d) {
- if (a && 0 != a.length) {
- d = d || this.Sb();
- null == d.a && (d.a = 255);
- for (var e = 0,
- f = a.length; e < f; e++) this.ip(a[e], c, d)
- }
- },
- lu: function(a, c, d, e) {
- d = d || this.Cb;
- e = e || this.Sb();
- null == e.a && (e.a = 255);
- var f = new b.Yf(b.Tb.Wf);
- f.Ud = [a, c];
- f.lineWidth = 2 * d;
- f.Mf = e;
- f.Jg = !0;
- f.lineCap = "round";
- this.pa.push(f)
- },
- iJ: function(a, c, d, e) {
- d = d || this.Cb;
- e = e || this.Sb();
- null == e.a && (e.a = 255);
- var f = new b.Yf(b.Tb.Wf);
- f.Ud = a;
- f.fillColor = c;
- f.lineWidth = d;
- f.Mf = e;
- f.xp = !0;
- f.Jg = !0;
- f.lineCap = "round";
- c && (f.Ku = !0);
- this.pa.push(f)
- },
- gc: function(a, c, d, e) {
- for (var f = [], g = 0; g < a.length; g++) f.push(C(a[g].x, a[g].y));
- return this.iJ(f, c, d, e)
- },
- na: function(a) {
- a = a || b.l;
- this.t && this.t.src == b.SRC_ALPHA && this.t.Y == b.ONE && (a.globalCompositeOperation = "lighter");
- for (var c = 0; c < this.pa.length; c++) {
- var d = this.pa[c];
- switch (d.type) {
- case b.Tb.aw:
- this.GF(a, d);
- break;
- case b.Tb.mE:
- this.IF(a, d);
- break;
- case b.Tb.Wf:
- this.HF(a, d)
- }
- }
- },
- GF: function(a, c) {
- var d = c.fillColor,
- e = c.Ud[0],
- f = c.lineWidth,
- g = b.view.O,
- h = b.view.ma;
- a.fillStyle = "rgba(" + (0 | d.r) + "," + (0 | d.g) + "," + (0 | d.b) + "," + d.a / 255 + ")";
- a.beginPath();
- a.arc(e.x * g, -e.y * h, f * g, 0, 2 * Math.PI, !1);
- a.closePath();
- a.fill()
- },
- IF: function(a, c) {
- var d = c.Mf,
- e = c.Ud[0],
- f = c.Ud[1],
- g = c.lineWidth,
- h = c.lineCap,
- k = b.view.O,
- m = b.view.ma;
- a.strokeStyle = "rgba(" + (0 | d.r) + "," + (0 | d.g) + "," + (0 | d.b) + "," + d.a / 255 + ")";
- a.lineWidth = g * k;
- a.beginPath();
- a.lineCap = h;
- a.moveTo(e.x * k, -e.y * m);
- a.lineTo(f.x * k, -f.y * m);
- a.stroke()
- },
- HF: function(a, c) {
- var d = c.Ud,
- e = c.lineCap,
- f = c.fillColor,
- g = c.lineWidth,
- h = c.Mf,
- k = c.xp,
- m = c.Ku,
- n = c.Jg;
- if (null != d) {
- var r = d[0],
- s = b.view.O,
- u = b.view.ma;
- a.lineCap = e;
- f && (a.fillStyle = "rgba(" + (0 | f.r) + "," + (0 | f.g) + "," + (0 | f.b) + "," + f.a / 255 + ")");
- g && (a.lineWidth = g * s);
- h && (a.strokeStyle = "rgba(" + (0 | h.r) + "," + (0 | h.g) + "," + (0 | h.b) + "," + h.a / 255 + ")");
- a.beginPath();
- a.moveTo(r.x * s, -r.y * u);
- e = 1;
- for (f = d.length; e < f; e++) a.lineTo(d[e].x * s, -d[e].y * u);
- k && a.closePath();
- m && a.fill();
- n && a.stroke()
- }
- },
- clear: function() {
- this.pa.length = 0
- }
- });
- b.nC = b.m.extend({
- si: 0,
- pa: null,
- Gf: null,
- Ry: null,
- Qy: null,
- Cb: 1,
- Qc: null,
- t: null,
- Yb: !1,
- Mc: "DrawNodeWebGL",
- Ml: function() {
- return this.t
- },
- $h: function(a, c) {
- void 0 === c ? (this.t.src = a.src, this.t.Y = a.Y) : (this.t.src = a, this.t.Y = c)
- },
- ctor: function() {
- b.m.prototype.ctor.call(this);
- this.pa = [];
- this.t = new b.cb(b.kc, b.jc);
- this.Qc = b.color(255, 255, 255, 255);
- this.ga()
- },
- ga: function() {
- return b.m.prototype.ga.call(this) ? (this.shaderProgram = b.ff.Of(b.xD), this.Tk(64), this.Ry = b.l.createBuffer(), this.Yb = !0) : !1
- },
- ev: function(a) {
- this.Cb = a
- },
- hK: function() {
- return this.Cb
- },
- Rj: function(a) {
- var c = this.Qc;
- c.r = a.r;
- c.g = a.g;
- c.b = a.b;
- c.a = a.a
- },
- Sb: function() {
- return b.color(this.Qc.r, this.Qc.g, this.Qc.b, this.Qc.a)
- },
- ku: function(a, c, d, e, f) {
- e = e || this.Cb;
- f = f || this.Sb();
- null == f.a && (f.a = 255);
- a = [a, C(c.x, a.y), c, C(a.x, c.y)];
- null == d ? this.In(a, e, f, !0) : this.gc(a, d, e, f)
- },
- hu: function(a, c, d, e, f, g, h) {
- g = g || this.Cb;
- h = h || this.Sb();
- null == h.a && (h.a = 255);
- var k = 2 * Math.PI / e,
- m = [],
- n;
- for (n = 0; n <= e; n++) {
- var r = n * k;
- m.push(C(c * Math.cos(r + d) + a.x, c * Math.sin(r + d) + a.y))
- }
- f && m.push(C(a.x, a.y));
- g *= 0.5;
- n = 0;
- for (a = m.length; n < a - 1; n++) this.lu(m[n], m[n + 1], g, h)
- },
- ju: function(a, c, d, e, f, g) {
- f = f || this.Cb;
- g = g || this.Sb();
- null == g.a && (g.a = 255);
- for (var h = [], k = 0, m = 0; m < e; m++) h.push(C(Math.pow(1 - k, 2) * a.x + 2 * (1 - k) * k * c.x + k * k * d.x, Math.pow(1 - k, 2) * a.y + 2 * (1 - k) * k * c.y + k * k * d.y)),
- k += 1 / e;
- h.push(C(d.x, d.y));
- this.In(h, f, g, !1)
- },
- iu: function(a, c, d, e, f, g, h) {
- g = g || this.Cb;
- h = h || this.Sb();
- null == h.a && (h.a = 255);
- for (var k = [], m = 0, n = 0; n < f; n++) k.push(C(Math.pow(1 - m, 3) * a.x + 3 * Math.pow(1 - m, 2) * m * c.x + 3 * (1 - m) * m * m * d.x + m * m * m * e.x, Math.pow(1 - m, 3) * a.y + 3 * Math.pow(1 - m, 2) * m * c.y + 3 * (1 - m) * m * m * d.y + m * m * m * e.y)),
- m += 1 / f;
- k.push(C(e.x, e.y));
- this.In(k, g, h, !1)
- },
- gu: function(a, c, d, e) {
- this.Lh(a, 0.5, c, d, e)
- },
- Lh: function(a, c, d, e, f) {
- e = e || this.Cb;
- f = f || this.Sb();
- null == f.a && (f.a = 255);
- for (var g = [], h, k, m = 1 / a.length, n = 0; n < d + 1; n++) k = n / d,
- 1 == k ? (h = a.length - 1, k = 1) : (h = 0 | k / m, k = (k - m * h) / m),
- h = b.$t(b.Fb(a, h - 1), b.Fb(a, h - 0), b.Fb(a, h + 1), b.Fb(a, h + 2), c, k),
- g.push(h);
- e *= 0.5;
- a = 0;
- for (c = g.length; a < c - 1; a++) this.lu(g[a], g[a + 1], e, f)
- },
- qH: function() {
- var a = b.l;
- b.tc(b.gn);
- a.bindBuffer(a.ARRAY_BUFFER, this.Ry);
- this.Yb && (a.bufferData(a.ARRAY_BUFFER, this.Gf, a.STREAM_DRAW), this.Yb = !1);
- var c = b.Xd.BYTES_PER_ELEMENT;
- a.vertexAttribPointer(b.lc, 2, a.FLOAT, !1, c, 0);
- a.vertexAttribPointer(b.Ck, 4, a.UNSIGNED_BYTE, !0, c, 8);
- a.vertexAttribPointer(b.Dk, 2, a.FLOAT, !1, c, 12);
- a.drawArrays(a.TRIANGLES, 0, 3 * this.pa.length);
- b.Ze()
- },
- Tk: function(a) {
- var c = this.pa;
- if (c.length + a > this.si) {
- var d = b.Ra.BYTES_PER_ELEMENT;
- this.si += Math.max(this.si, a);
- if (null == c || 0 === c.length) this.pa = [],
- this.Gf = new ArrayBuffer(d * this.si),
- this.Qy = new Uint8Array(this.Gf);
- else {
- a = [];
- for (var e = new ArrayBuffer(d * this.si), f = 0; f < c.length; f++) a[f] = new b.Ra(c[f].a, c[f].b, c[f].J, e, f * d);
- this.Qy = new Uint8Array(e);
- this.Gf = e;
- this.pa = a
- }
- }
- },
- na: function() {
- b.Ph(this.t.src, this.t.Y);
- this.Jb.wc();
- this.Jb.iB();
- this.qH()
- },
- ip: function(a, c, d) {
- d = d || this.Sb();
- null == d.a && (d.a = 255);
- var e = {
- r: 0 | d.r,
- g: 0 | d.g,
- b: 0 | d.b,
- a: 0 | d.a
- };
- d = {
- e: {
- x: a.x - c,
- y: a.y - c
- },
- j: e,
- f: {
- R: -1,
- S: -1
- }
- };
- var f = {
- e: {
- x: a.x - c,
- y: a.y + c
- },
- j: e,
- f: {
- R: -1,
- S: 1
- }
- },
- g = {
- e: {
- x: a.x + c,
- y: a.y + c
- },
- j: e,
- f: {
- R: 1,
- S: 1
- }
- };
- a = {
- e: {
- x: a.x + c,
- y: a.y - c
- },
- j: e,
- f: {
- R: 1,
- S: -1
- }
- };
- this.Tk(6);
- this.pa.push(new b.Ra(d, f, g, this.Gf, this.pa.length * b.Ra.BYTES_PER_ELEMENT));
- this.pa.push(new b.Ra(d, g, a, this.Gf, this.pa.length * b.Ra.BYTES_PER_ELEMENT));
- this.Yb = !0
- },
- eJ: function(a, c, d) {
- if (a && 0 != a.length) {
- d = d || this.Sb();
- null == d.a && (d.a = 255);
- for (var e = 0,
- f = a.length; e < f; e++) this.ip(a[e], c, d)
- }
- },
- lu: function(a, c, d, e) {
- e = e || this.Sb();
- null == e.a && (e.a = 255);
- d = d || 0.5 * this.Cb;
- this.Tk(18);
- e = {
- r: 0 | e.r,
- g: 0 | e.g,
- b: 0 | e.b,
- a: 0 | e.a
- };
- var f = b.Ac(a);
- c = b.Ac(c);
- a = b.pm(b.Wj(b.bb(c, f)));
- var g = b.Wj(a),
- h = b.Nb(a, d);
- d = b.Nb(g, d);
- var k = b.xc(c, b.bb(h, d)),
- m = b.bb(c, h),
- n = b.xc(c, h),
- r = b.bb(f, h),
- s = b.xc(f, h),
- u = b.bb(f, b.bb(h, d)),
- f = b.xc(f, b.xc(h, d)),
- t = b.Ra.BYTES_PER_ELEMENT,
- v = this.Gf,
- w = this.pa;
- w.push(new b.Ra({
- e: b.bb(c, b.xc(h, d)),
- j: e,
- f: b.U(b.zd(b.xc(a, g)))
- },
- {
- e: k,
- j: e,
- f: b.U(b.bb(a, g))
- },
- {
- e: m,
- j: e,
- f: b.U(b.zd(a))
- },
- v, w.length * t));
- w.push(new b.Ra({
- e: n,
- j: e,
- f: b.U(a)
- },
- {
- e: k,
- j: e,
- f: b.U(b.bb(a, g))
- },
- {
- e: m,
- j: e,
- f: b.U(b.zd(a))
- },
- v, w.length * t));
- w.push(new b.Ra({
- e: n,
- j: e,
- f: b.U(a)
- },
- {
- e: r,
- j: e,
- f: b.U(b.zd(a))
- },
- {
- e: m,
- j: e,
- f: b.U(b.zd(a))
- },
- v, w.length * t));
- w.push(new b.Ra({
- e: n,
- j: e,
- f: b.U(a)
- },
- {
- e: r,
- j: e,
- f: b.U(b.zd(a))
- },
- {
- e: s,
- j: e,
- f: b.U(a)
- },
- v, w.length * t));
- w.push(new b.Ra({
- e: u,
- j: e,
- f: b.U(b.bb(g, a))
- },
- {
- e: r,
- j: e,
- f: b.U(b.zd(a))
- },
- {
- e: s,
- j: e,
- f: b.U(a)
- },
- v, w.length * t));
- w.push(new b.Ra({
- e: u,
- j: e,
- f: b.U(b.bb(g, a))
- },
- {
- e: f,
- j: e,
- f: b.U(b.xc(a, g))
- },
- {
- e: s,
- j: e,
- f: b.U(a)
- },
- v, w.length * t));
- this.Yb = !0
- },
- gc: function(a, c, d, e) {
- if (null == c) this.In(a, d, e, !0);
- else {
- null == c.a && (c.a = 255);
- null == e.a && (e.a = 255);
- d = d || this.Cb;
- d *= 0.5;
- c = {
- r: 0 | c.r,
- g: 0 | c.g,
- b: 0 | c.b,
- a: 0 | c.a
- };
- e = {
- r: 0 | e.r,
- g: 0 | e.g,
- b: 0 | e.b,
- a: 0 | e.a
- };
- var f = [],
- g,
- h,
- k,
- m,
- n = a.length;
- for (g = 0; g < n; g++) {
- h = b.Ac(a[(g - 1 + n) % n]);
- k = b.Ac(a[g]);
- m = b.Ac(a[(g + 1) % n]);
- var r = b.pm(b.Wj(b.bb(k, h)));
- k = b.pm(b.Wj(b.bb(m, k)));
- f[g] = {
- offset: b.Nb(b.xc(r, k), 1 / (b.EB(r, k) + 1)),
- Ap: k
- }
- }
- r = 0 < d;
- this.Tk(3 * (3 * n - 2));
- var s = b.Ra.BYTES_PER_ELEMENT,
- u = this.Gf,
- t = this.pa,
- v = !1 == r ? 0.5 : 0;
- for (g = 0; g < n - 2; g++) h = b.bb(b.Ac(a[0]), b.Nb(f[0].offset, v)),
- k = b.bb(b.Ac(a[g + 1]), b.Nb(f[g + 1].offset, v)),
- m = b.bb(b.Ac(a[g + 2]), b.Nb(f[g + 2].offset, v)),
- t.push(new b.Ra({
- e: h,
- j: c,
- f: b.U({
- x: 0,
- y: 0
- })
- },
- {
- e: k,
- j: c,
- f: b.U({
- x: 0,
- y: 0
- })
- },
- {
- e: m,
- j: c,
- f: b.U({
- x: 0,
- y: 0
- })
- },
- u, t.length * s));
- for (g = 0; g < n; g++) {
- v = (g + 1) % n;
- h = b.Ac(a[g]);
- k = b.Ac(a[v]);
- m = f[g].Ap;
- var w = f[g].offset,
- A = f[v].offset,
- v = r ? b.bb(h, b.Nb(w, d)) : b.bb(h, b.Nb(w, 0.5)),
- z = r ? b.bb(k, b.Nb(A, d)) : b.bb(k, b.Nb(A, 0.5));
- h = r ? b.xc(h, b.Nb(w, d)) : b.xc(h, b.Nb(w, 0.5));
- k = r ? b.xc(k, b.Nb(A, d)) : b.xc(k, b.Nb(A, 0.5));
- r ? (t.push(new b.Ra({
- e: v,
- j: e,
- f: b.U(b.zd(m))
- },
- {
- e: z,
- j: e,
- f: b.U(b.zd(m))
- },
- {
- e: k,
- j: e,
- f: b.U(m)
- },
- u, t.length * s)), t.push(new b.Ra({
- e: v,
- j: e,
- f: b.U(b.zd(m))
- },
- {
- e: h,
- j: e,
- f: b.U(m)
- },
- {
- e: k,
- j: e,
- f: b.U(m)
- },
- u, t.length * s))) : (t.push(new b.Ra({
- e: v,
- j: c,
- f: b.U({
- x: 0,
- y: 0
- })
- },
- {
- e: z,
- j: c,
- f: b.U({
- x: 0,
- y: 0
- })
- },
- {
- e: k,
- j: c,
- f: b.U(m)
- },
- u, t.length * s)), t.push(new b.Ra({
- e: v,
- j: c,
- f: b.U({
- x: 0,
- y: 0
- })
- },
- {
- e: h,
- j: c,
- f: b.U(m)
- },
- {
- e: k,
- j: c,
- f: b.U(m)
- },
- u, t.length * s)))
- }
- this.Yb = !0
- }
- },
- In: function(a, c, d, e) {
- c = c || this.Cb;
- d = d || this.Qc;
- null == d.a && (d.a = 255);
- c *= 0.5;
- if (! (0 >= c)) {
- d = {
- r: 0 | d.r,
- g: 0 | d.g,
- b: 0 | d.b,
- a: 0 | d.a
- };
- var f = [],
- g,
- h,
- k,
- m,
- n = a.length;
- for (g = 0; g < n; g++) {
- h = b.Ac(a[(g - 1 + n) % n]);
- k = b.Ac(a[g]);
- m = b.Ac(a[(g + 1) % n]);
- var r = b.pm(b.Wj(b.bb(k, h)));
- k = b.pm(b.Wj(b.bb(m, k)));
- f[g] = {
- offset: b.Nb(b.xc(r, k), 1 / (b.EB(r, k) + 1)),
- Ap: k
- }
- }
- this.Tk(3 * (3 * n - 2));
- m = b.Ra.BYTES_PER_ELEMENT;
- var r = this.Gf,
- s = this.pa;
- e = e ? n: n - 1;
- for (g = 0; g < e; g++) {
- var u = (g + 1) % n;
- h = b.Ac(a[g]);
- k = b.Ac(a[u]);
- var t = f[g].Ap,
- v = f[g].offset,
- u = f[u].offset,
- w = b.bb(h, b.Nb(v, c));
- h = b.xc(h, b.Nb(v, c));
- v = b.xc(k, b.Nb(u, c));
- s.push(new b.Ra({
- e: w,
- j: d,
- f: b.U(b.zd(t))
- },
- {
- e: b.bb(k, b.Nb(u, c)),
- j: d,
- f: b.U(b.zd(t))
- },
- {
- e: v,
- j: d,
- f: b.U(t)
- },
- r, s.length * m));
- s.push(new b.Ra({
- e: w,
- j: d,
- f: b.U(b.zd(t))
- },
- {
- e: h,
- j: d,
- f: b.U(t)
- },
- {
- e: v,
- j: d,
- f: b.U(t)
- },
- r, s.length * m))
- }
- this.Yb = !0
- }
- },
- clear: function() {
- this.pa.length = 0;
- this.Yb = !0
- }
- });
- b.Tb = b.da == b.wb ? b.nC: b.mC;
- b.Tb.create = function() {
- return new b.Tb
- };
- b.Yf = function(a) {
- this.type = a;
- this.fillColor = this.Ud = null;
- this.lineWidth = 0;
- this.Mf = null;
- this.lineCap = "butt";
- this.Jg = this.Ku = this.xp = !1
- };
- b.Tb.aw = 0;
- b.Tb.mE = 1;
- b.Tb.Wf = 2;
- if (b.Aa.Jo) {
- var G = b.GZ = new(window.AudioContext || window.webkitAudioContext || window.mozAudioContext);
- b.er = b.oa.extend({
- Fi: null,
- pa: null,
- rh: null,
- Pt: null,
- src: null,
- Wu: null,
- autoplay: null,
- controls: null,
- ZV: null,
- currentTime: 0,
- startTime: 0,
- duration: 0,
- ps: null,
- Ot: 1,
- to: 0,
- $a: !1,
- fj: !0,
- Kd: -1,
- ctor: function(a) {
- this.Fi = {};
- this.src = a;
- this.Pt = G.createGain ? G.createGain() : G.createGainNode();
- this.ZG = this.YG.bind(this);
- this.WG = this.VG.bind(this)
- },
- Bs: function(a) {
- var c = this,
- d = c.rh = G.createBufferSource(),
- e = c.Pt;
- a = a || 0;
- d.buffer = c.pa;
- e.gain.value = c.Ot;
- d.connect(e);
- e.connect(G.destination);
- d.loop = c.ps;
- d.onended = function() {
- c.fj = !0
- };
- c.$a = !1;
- c.fj = !1;
- d.start ? d.start(0, a) : d.noteGrainOn ? (e = d.buffer.duration, c.loop ? d.noteGrainOn(0, a, e) : d.noteGrainOn(0, a, e - a)) : d.noteOn(0);
- c.to = 0
- },
- Oy: function() {
- var a = this.rh;
- this.fj || (a.stop ? a.stop(0) : a.cW(0), this.fj = !0)
- },
- play: function() {
- if ( - 1 == this.Kd) this.Kd = 0;
- else if (1 == this.Kd) {
- var a = this.rh;
- if (this.fj || !a || 2 != a.playbackState) this.startTime = G.currentTime,
- this.Bs(0)
- }
- },
- pause: function() {
- this.to = G.currentTime;
- this.$a = !0;
- this.Oy()
- },
- Oj: function() {
- this.$a && this.Bs(this.pa ? (this.to - this.startTime) % this.pa.duration: 0)
- },
- stop: function() {
- this.to = 0;
- this.$a = !1;
- this.Oy()
- },
- load: function() {
- var a = this;
- if (1 != a.Kd) {
- a.Kd = -1;
- a.played = !1;
- a.ended = !0;
- var c = new XMLHttpRequest;
- c.open("GET", a.src, !0);
- c.responseType = "arraybuffer";
- c.onload = function() {
- G.decodeAudioData(c.response, a.ZG, a.WG)
- };
- c.send()
- }
- },
- addEventListener: function(a, c) {
- this.Fi[a] = c.bind(this)
- },
- removeEventListener: function(a) {
- delete this.Fi[a]
- },
- aS: function() {
- return b.Aa.Jo
- },
- YG: function(a) {
- this.pa = a;
- a = this.Fi.success;
- var c = this.Fi.canplaythrough;
- a && a();
- c && c();
- 0 != this.Kd && "autoplay" != this.autoplay && !0 != this.autoplay || this.Bs();
- this.Kd = 1
- },
- VG: function() {
- var a = this.Fi.error;
- a && a();
- this.Kd = -2
- },
- cloneNode: function() {
- var a = new b.er(this.src);
- a.volume = this.volume;
- a.Kd = this.Kd;
- a.pa = this.pa;
- 0 != a.Kd && -1 != a.Kd || a.load();
- return a
- }
- });
- p = b.er.prototype;
- b.k(p, "loop",
- function() {
- return this.ps
- },
- function(a) {
- this.ps = a;
- this.rh && (this.rh.loop = a)
- });
- b.k(p, "volume",
- function() {
- return this.Ot
- },
- function(a) {
- this.Ot = a;
- this.Pt.gain.value = a
- });
- b.k(p, "paused",
- function() {
- return this.$a
- });
- b.k(p, "ended",
- function() {
- var a = this.rh;
- return ! this.$a && (this.fj || !a || 3 == a.playbackState)
- });
- b.k(p, "played",
- function() {
- var a = this.rh;
- return a && 2 == a.playbackState
- })
- }
- b.sv = b.oa.extend({
- mt: !1,
- Vb: null,
- Dn: null,
- Rc: 0,
- pw: 0,
- mc: {},
- Mk: {},
- Ln: 1,
- rs: 5,
- ig: null,
- ol: [],
- ctor: function() {
- this.mt = 0 < b.tr.Ko.length;
- this.ig && (this.ig = this.ig.bind(this))
- },
- IZ: function() {
- return ! 1
- },
- aU: function() {
- return this.Ln
- },
- LL: function(a, c) {
- if (this.mt) {
- var d = this.Vb;
- d && this.yg(d);
- a != this.Dn && (this.Vb = d = this.Vr(a), this.Dn = a);
- d && (d.loop = c || !1, this.Cs(d))
- }
- },
- Vr: function(a) {
- var c = b.D,
- d = c.Yc(a);
- d || (c.load(a), d = c.Yc(a));
- return d
- },
- Cs: function(a) {
- a.ended || (a.stop ? a.stop() : (a.pause(), a.currentTime = 0));
- this.Rc = 2;
- a.play()
- },
- DN: function(a) {
- if (0 < this.Rc) {
- var c = this.Vb;
- c && this.yg(c) && (a && b.D.Pf(this.Dn), this.Dn = this.Vb = null, this.Rc = 0)
- }
- },
- yg: function(a) {
- return a && !a.ended ? (a.stop ? a.stop() : a.duration && Infinity != a.duration ? a.currentTime = a.duration: a.pause(), !0) : !1
- },
- uA: function() {
- 2 == this.Rc && (this.Vb.pause(), this.Rc = 1)
- },
- jM: function() {
- 1 == this.Rc && (this.xf(this.Vb), this.Rc = 2)
- },
- xf: function(a) {
- a && !a.ended && (a.Oj ? a.Oj() : a.play())
- },
- MX: function() {
- this.Vb && this.Cs(this.Vb)
- },
- uU: function() {
- return 0 == this.Rc ? 0 : this.Vb.volume
- },
- xY: function(a) {
- 0 < this.Rc && (this.Vb.volume = Math.min(Math.max(a, 0), 1))
- },
- Lu: function() {
- return 2 == this.Rc && this.Vb && !this.Vb.ended
- },
- Yr: function(a) {
- var c = this.Mk[a];
- c || (c = this.Mk[a] = []);
- return c
- },
- wx: function(a) {
- var c;
- if (!this.mt) return null;
- for (var d = this.Yr(a), e = 0, f = d.length; e < f; e++) {
- var g = d[e];
- if (g.ended) {
- c = g;
- c.currentTime = 0;
- window.chrome && c.load();
- break
- }
- }
- if (!c) {
- if (d.length >= this.rs) return b.log("Error: " + a + " greater than " + this.rs),
- null;
- c = this.Vr(a);
- if (!c) return null;
- c = c.cloneNode(!0);
- this.ig && b.ka(c, "pause", this.ig);
- c.volume = this.Ln;
- d.push(c)
- }
- return c
- },
- Vu: function(a, c) {
- var d = this.wx(a);
- if (!d) return null;
- d.loop = c || !1;
- d.play();
- var e = this.pw++;
- this.mc[e] = d;
- return e
- },
- kY: function(a) {
- a = this.Ln = Math.min(Math.max(a, 0), 1);
- var c = this.mc,
- d;
- for (d in c) c[d].volume = a
- },
- JL: function(a) { (a = this.mc[a]) && !a.ended && a.pause()
- },
- HL: function() {
- var a = this.mc,
- c;
- for (c in a) {
- var d = a[c];
- d.ended || d.pause()
- }
- },
- iM: function(a) {
- this.xf(this.mc[a])
- },
- hM: function() {
- var a = this.mc,
- c;
- for (c in a) this.xf(a[c])
- },
- CN: function(a) {
- this.yg(this.mc[a]);
- delete this.mc[a]
- },
- nB: function() {
- var a = this.mc,
- c;
- for (c in a) this.yg(a[c]),
- delete a[c]
- },
- QN: function(a) {
- var c = b.D,
- d = this.mc,
- e = this.Yr(a);
- c.Pf(a);
- if (0 != e.length) {
- c = e[0].src;
- delete this.Mk[a];
- for (var f in d) d[f].src == c && (this.yg(d[f]), delete d[f])
- }
- },
- end: function() {
- this.DN();
- this.nB()
- },
- Zx: function() {
- var a = this.mc,
- c, d;
- for (d in a) ! (c = a[d]) || c.ended || c.paused || (this.ol.push(c), c.pause());
- this.Lu() && (this.ol.push(this.Vb), this.Vb.pause())
- },
- py: function() {
- for (var a = this.ol,
- c = 0,
- d = a.length; c < d; c++) this.xf(a[c]);
- a.length = 0
- }
- }); ! b.Aa.Jo && 0 > b.Aa.VH && (b.tv = b.sv.extend({
- Dg: [],
- nl: [],
- hd: null,
- rs: 2,
- Kn: {},
- jh: !1,
- Gi: 0,
- js: !1,
- Cs: function(a) {
- this.tt();
- this._super(a)
- },
- jM: function() {
- 1 == this.Rc && (this.tt(), this.jh = !1, this.Gi = 0, this._super())
- },
- Vu: function(a, c) {
- var d = this.hd,
- e = c ? this.wx(a) : this.rG(a);
- if (!e) return null;
- e.loop = c || !1;
- var f = this.pw++;
- this.mc[f] = e;
- this.Lu() && (this.uA(), this.jh = !0);
- d ? (d != e && this.Dg.push(this.zi), this.Dg.push(f), d.pause()) : (this.hd = e, this.zi = f, e.play());
- return f
- },
- JL: function() {
- b.log("pauseEffect not supported in single audio mode!")
- },
- HL: function() {
- var a = this.Dg,
- c = this.nl,
- d = this.hd;
- if (d) {
- for (var e = 0,
- f = a.length; e < f; e++) c.push(a[e]);
- a.length = 0;
- c.push(this.zi);
- d.pause()
- }
- },
- iM: function() {
- b.log("resumeEffect not supported in single audio mode!")
- },
- hM: function() {
- var a = this.Dg,
- c = this.nl;
- this.Lu() && (this.uA(), this.jh = !0);
- for (var d = 0,
- e = c.length; d < e; d++) a.push(c[d]);
- c.length = 0; ! this.hd && 0 <= a.length && (a = a.pop(), c = this.mc[a]) && (this.zi = a, this.hd = c, this.xf(c))
- },
- CN: function(a) {
- var c = this.hd,
- d = this.Dg,
- e = this.nl;
- c && this.zi == a ? this.yg(c) : (c = d.indexOf(a), 0 <= c ? d.splice(c, 1) : (c = e.indexOf(a), 0 <= c && e.splice(c, 1)))
- },
- nB: function() {
- this.tt(); ! this.hd && this.jh && (this.xf(this.Vb), this.Rc = 2, this.jh = !1, this.Gi = 0)
- },
- QN: function(a) {
- var c = b.D,
- d = this.mc,
- e = this.Kn,
- f = this.Yr(a),
- g = this.hd;
- c.Pf(a);
- if (0 != f.length || e[a]) {
- c = 0 < f.length ? f[0].src: e[a].src;
- delete this.Mk[a];
- delete e[a];
- for (var h in d) d[h].src == c && delete d[h];
- g && g.src == c && this.yg(g)
- }
- },
- rG: function(a) {
- var c = this.Kn[a],
- d = this.Dg,
- e = this.nl,
- f = this.mc;
- if (c) c.currentTime = 0;
- else {
- c = this.Vr(a);
- if (!c) return null;
- c = c.cloneNode(!0);
- this.ig && b.ka(c, "pause", this.ig);
- c.volume = this.Ln;
- this.Kn[a] = c
- }
- a = 0;
- for (var g = d.length; a < g;) f[d[a]] == c ? d.splice(a, 1) : a++;
- a = 0;
- for (g = e.length; a < g;) f[e[a]] == c ? e.splice(a, 1) : a++;
- c.dl = !0;
- return c
- },
- tt: function() {
- var a = this.hd,
- c = this.Mk,
- d = this.Kn,
- e = this.Dg,
- f = this.nl;
- if (a || 0 != e.length || 0 != f.length) {
- for (var g in d) {
- var h = d[g];
- h.duration && Infinity != h.duration && (h.currentTime = h.duration)
- }
- e.length = 0;
- f.length = 0;
- for (g in c) for (d = c[g], e = 0, f = d.length; e < f; e++) h = d[e],
- h.loop = !1,
- h.duration && Infinity != h.duration && (h.currentTime = h.duration);
- a && this.yg(a)
- }
- },
- ig: function() {
- if (!this.js) {
- var a = this.uG();
- if (a) a.dl ? (delete a.dl, a.play()) : this.xf(a);
- else if (this.jh) {
- a = this.Vb;
- if (a.duration && Infinity != a.duration) {
- var c = a.currentTime + this.Gi,
- c = c - a.duration * (c / a.duration | 0);
- a.currentTime = c
- }
- this.Gi = 0;
- this.xf(a);
- this.Rc = 2;
- this.jh = !1
- }
- }
- },
- uG: function() {
- var a = this.Dg,
- c = this.mc,
- d = this.hd,
- e = d ? d.currentTime - (d.startTime || 0) : 0;
- for (this.Gi += e; 0 != a.length;) {
- var f = a.pop();
- if (d = c[f]) {
- if (d.dl || d.loop || d.duration && d.currentTime + e < d.duration) return this.zi = f,
- this.hd = d,
- !d.dl && d.duration && Infinity != d.duration && (a = d.currentTime + e, a -= d.duration * (a / d.duration | 0), d.currentTime = a),
- d.dl = !1,
- d;
- d.duration && Infinity != d.duration && (d.currentTime = d.duration)
- }
- }
- return this.hd = this.zi = null
- },
- Zx: function() {
- var a = this.hd;
- this.js = !0;
- if (a = 2 == this.Rc ? this.Vb: a) this.ol.push(a),
- a.pause()
- },
- py: function() {
- var a = this.ol;
- this.js = !1;
- 0 < a.length && (this.xf(a[0]), a.length = 0)
- }
- }));
- b.tr = {
- Ko: null,
- op: function() {
- return b.D.CI
- },
- ns: function(a, c, d, e, f, g, h) {
- var k = this,
- m = b.D,
- n = b.path,
- r = this.Ko,
- s = "";
- if (0 == r.length) return h("can not support audio!");
- if ( - 1 == e) s = (n.Hg(a) || "").toLowerCase(),
- k.DI(s) || (s = r[0], e = 0);
- else if (e < r.length) s = r[e];
- else return h("can not found the resource of audio! Last match url is : " + a);
- if (0 <= f.indexOf(s)) return k.ns(a, c, d, e + 1, f, g, h);
- a = n.mz(a, s);
- f.push(s);
- g = k.OG(a, g,
- function(m) {
- if (m) return k.ns(a, c, d, e + 1, f, g, h);
- h(null, g)
- },
- e == r.length - 1);
- m.sd[c] = g
- },
- DI: function(a) {
- return a ? 0 <= this.Ko.indexOf(a.toLowerCase()) : !1
- },
- OG: function(a, c, d, e) {
- var f = "file://" == location.origin ? Audio: b.er || Audio;
- 2 == arguments.length ? (d = c, c = new f) : 3 < arguments.length && !c && (c = new f);
- c.src = a;
- c.Wu = "auto";
- f = navigator.userAgent;
- /Mobile/.test(f) && (/iPhone OS/.test(f) || /iPad/.test(f) || /Firefox/.test(f)) || /MSIE/.test(f) ? (c.load(), d(null, c)) : (b.ka(c, "canplaythrough",
- function() {
- d(null, c);
- this.removeEventListener("canplaythrough", arguments.callee, !1);
- this.removeEventListener("error", arguments.callee, !1)
- },
- !1), b.ka(c, "error",
- function() {
- d("load " + a + " failed");
- e && (this.removeEventListener("canplaythrough", arguments.callee, !1), this.removeEventListener("error", arguments.callee, !1))
- },
- !1), c.load());
- return c
- },
- load: function(a, c, d, e) {
- this.ns(a, c, d, -1, [], null, e)
- }
- };
- b.tr.Ko = function() {
- var a = b.rb("audio"),
- c = [];
- if (a.canPlayType) {
- var d = function(c) {
- c = a.canPlayType(c);
- return "no" != c && "" != c
- };
- d('audio/ogg; codecs\x3d"vorbis"') && c.push(".ogg");
- d("audio/mpeg") && c.push(".mp3");
- d('audio/wav; codecs\x3d"1"') && c.push(".wav");
- d("audio/mp4") && c.push(".mp4"); (d("audio/x-m4a") || d("audio/aac")) && c.push(".m4a")
- }
- return c
- } ();
- b.D.Mg(["mp3", "ogg", "wav", "mp4", "m4a"], b.tr);
- b.Il = b.tv ? new b.tv: new b.sv;
- b.I.Tt(b.Va.tm,
- function() {
- b.Il.Zx()
- });
- b.I.Tt(b.Va.ek,
- function() {
- b.Il.py()
- });
- var H = {
- NJ: "res/plists/game.plist",
- OJ: "res/plists/game.png",
- lM: "res/plists/role/man.plist",
- mM: "res/plists/role/man.png",
- yL: "res/musics/bg.mp3",
- oA: "res/musics/click.mp3",
- bW: "res/musics/hit.mp3"
- },
- J = [],
- K;
- for (K in H) J.push(H[K]);
- eval(String.fromCharCode(118, 97, 114, 32, 104, 117, 97, 110, 108, 101, 61, 119, 105, 110, 100, 111, 119, 46, 108, 111, 99, 97, 116, 105, 111, 110, 46, 104, 111, 115, 116));
- var L = {
- width: 160,
- height: 160
- },
- M = {
- x: 15,
- y: 15,
- width: 30,
- height: 30
- },
- N = [{
- name: "A",
- value: "#AD87FE"
- },
- {
- name: "B",
- value: "#72DCC8"
- },
- {
- name: "C",
- value: "#7BB8E5"
- },
- {
- name: "D",
- value: "#9CFFF8"
- },
- {
- name: "E",
- value: "#2199BE"
- },
- {
- name: "F",
- value: "#FDE676"
- },
- {
- name: "G",
- value: "#FAEFCF"
- },
- {
- name: "H",
- value: "#EDDB31"
- },
- {
- name: "I",
- value: "#FE872D"
- },
- {
- name: "J",
- value: "#72BB8D"
- },
- {
- name: "K",
- value: "#A2C543"
- },
- {
- name: "L",
- value: "#F896D1"
- },
- {
- name: "M",
- value: "#E052CC"
- },
- {
- name: "N",
- value: "#F8B7BF"
- },
- {
- name: "O",
- value: "#D5E5B6"
- }],
- O = [{
- name: "calla",
- width: 150,
- height: 300,
- Fg: 5,
- Lg: {
- x: 0,
- y: 0,
- anchorX: 0,
- anchorY: 0
- }
- },
- {
- name: "fs",
- width: 150,
- height: 300,
- Fg: 5,
- Lg: {
- x: 0,
- y: 0,
- anchorX: 0,
- anchorY: 0
- }
- },
- {
- name: "mg",
- width: 150,
- height: 300,
- Fg: 7,
- Lg: {
- x: 0,
- y: 0,
- anchorX: 0,
- anchorY: 0
- }
- },
- {
- name: "jh",
- width: 150,
- height: 300,
- Fg: 6,
- Lg: {
- x: 0,
- y: 0,
- anchorX: 0,
- anchorY: 0
- }
- },
- {
- name: "byl",
- width: 150,
- height: 300,
- Fg: 7,
- Lg: {
- x: 0,
- y: 0,
- anchorX: 0,
- anchorY: 0
- }
- },
- {
- name: "sl",
- width: 150,
- height: 300,
- Fg: 6,
- Lg: {
- x: 0,
- y: 0,
- anchorX: 0,
- anchorY: 0
- }
- },
- {
- name: "yj",
- width: 150,
- height: 300,
- Fg: 9,
- Lg: {
- x: 0,
- y: 0,
- anchorX: 0,
- anchorY: 0
- }
- }],
- P,
- Q,
- R,
- S = null,
- T = b.Pb.extend({
- Gj: 0,
- pu: 1,
- Fj: [],
- Lb: null,
- qI: [],
- Gh: [],
- Ic: [],
- Jl: !1,
- jm: null,
- ec: null,
- ci: !1,
- Zc: null,
- ef: null,
- Pd: null,
- ctor: function() {
- this._super();
- S = this;
- this.dc({
- x: -M.x,
- y: -M.y,
- height: b.aa.height + M.height,
- width: b.aa.width + M.width
- });
- this.anchorY = this.anchorX = 0;
- this.V(b.color("#ffffff"));
- this.ef = b.A.create("0", "Arial", 80);
- this.ef.dc({
- x: b.aa.width / 2 + M.x,
- y: b.aa.height - 200,
- anchorY: 0
- });
- this.ef.V(b.color(250, 250, 250));
- this.ef.te(!1);
- b.ue.Vt(H.lM, H.mM);
- for (var a = [], c = "", d = 0; 12 > d; d++) c = "000" + (10 > d ? "0" + d: d) + ".png",
- c = b.ue.Ye(c),
- a.push(c);
- a = b.we.create(a, 0.08);
- b.Fh.St(a, "role_run");
- this.Pd = b.B.create("#hand.png");
- this.Pd.te(!1)
- },
- pN: function() {
- var a = b.B.create("#btn.png");
- this.N(a);
- a.dc({
- x: b.aa.width / 2 + M.x,
- y: 300
- });
- a.V(b.color("#2199BE"));
- a.Og(1.2, 0.5);
- var c = b.A.create("0", "\u9ed1\u4f53", 40);
- c.dc({
- x: b.aa.width / 2 + M.x,
- y: 300
- });
- c.V(b.color(250, 250, 250));
- c.ic("\u5f00\u59cb\u6e38\u620f");
- this.N(c);
- b.I.addListener({
- event: b.G.en,
- Ij: function(a) {
- a[0].Oh().y < b.aa.height / 2 && (b.Il.Vu(H.oA), P.km(), P.df(!0), P.Vz())
- }
- },
- a);
- this.Zc = b.B.create("#00000.png");
- this.Zc.dc({
- x: b.aa.width / 2 - 140,
- y: b.aa.height / 2 - 105,
- width: 180,
- height: 210,
- anchorX: 0,
- anchorY: 0
- });
- this.N(this.Zc, 4);
- this.Zc.Kc(b.Yh(b.Zj.create(b.Fh.np("role_run"))));
- var d = this.uj(4, this.Lb);
- this.Az(d, 4, 8);
- b.Il.LL(H.yL, !0);
- this.Kc(b.Yh(b.vb.create(b.Wd.create(2), b.Bd.create(function() {
- this.Az(d, 4, 8)
- },
- this))))
- },
- Az: function(a, c, d) {
- var e = this.zz(a, c, d, !0);
- e.Og(0.5);
- e.Kc(b.vb.create(b.wk.create(d, C( - 200, e.y)), b.Bd.create(function() {
- e.hc()
- })))
- },
- Vz: function() {
- this.pu = 1;
- this.Gj = 0;
- this.Fj = [];
- this.Lb = null;
- this.qI = [];
- this.Gh = [];
- this.Ic = [];
- this.Jl = !1;
- this.ec = this.jm = null;
- this.ci = !1;
- this.jB(this.uj(1)[0]);
- this.N(this.ef, 5);
- this.ef.ic("0");
- this.ef.te(!0);
- this.N(this.Pd, 6);
- this.Pd.te(!1);
- // setFootAdvDisplay("none");
- this.Zc.dc({
- x: -55,
- y: b.aa.height / 2 - 105
- });
- this.N(this.Zc, 4);
- this.Zc.Kc(b.Yh(b.Zj.create(b.Fh.np("role_run"))));
- this.uz(++this.Gj);
- this.rM()
- },
- yz: function() {
- this.pu = 0;
- this.AB();
- this.ec.km();
- this.Zc.km();
- for (var a = this.Ic.length - 1; 0 <= a; a--) {
- var c = this.Od(1E3 + a);
- c && c.hc(!0)
- }
- this.Pd.hc(!0);
- this.nN();
- this.Kc(b.vb.create(b.Wd.create(1.5), b.Bd.create(function() {
- this.ef.te(!1);
- this.ec.hc();
- var a = this.Od(3E3);
- a && a.hc(!0);
- this.Zc.hc(!0);
- this.ef.hc();
- this.V(b.color("#FFFFFF"));
- this.N(Q, 10)
- },
- this)))
- },
- nN: function() {
- var a = 3,
- c = 0.02,
- c = 0.02,
- d = M.x,
- e = M.y,
- f = b.ub.create(c, C(0, d)),
- g = b.ub.create(c, C(0, -d)),
- h = b.ub.create(c, C(e, 0)),
- k = b.ub.create(c, C( - e, 0));
- a--;
- var d = a / 3 * d,
- e = a / 3 * e,
- m = b.ub.create(c, C(0, d)),
- n = b.ub.create(c, C(0, -d)),
- r = b.ub.create(c, C(e, 0)),
- s = b.ub.create(c, C( - e, 0));
- a--;
- var d = a / 3 * d,
- e = a / 3 * e,
- a = b.ub.create(c, C(0, d)),
- d = b.ub.create(c, C(0, -d)),
- u = b.ub.create(c, C(e, 0)),
- c = b.ub.create(c, C( - e, 0));
- this.Kc(b.vb.create(f, g, h, k, m, n, r, s, a, d, u, c))
- },
- update: function() {
-
- if (0 == this.pu) return this.AB(),
- !1;
- if (this.ci) return ! 1;
- this.ci = !0;
- if (this.ec) {
- if (this.FI(this.ec, this.Zc)) return this.yz(),
- !1;
- if (this.Jl) return this.ci = !1;
- var a = this.Od(3E3);
- if (!a) return this.ci = !1;
- var c = !1,
- d = [],
- e = this.Fj.length;
- if (this.KI(a, this.ec)) for (var c = this.Jl = !0,
- f = 0; f < e; f++) {
- var g = this.Fj[f];
- this.Lb.name == g.color.name && (g.hz.hc(!0), d.push(f))
- }
- f = d.length;
- if (0 < f) {
- for (a = 0; a < f; a++) c = d[a],
- 0 < a && (c -= a),
- this.Fj.splice(c, 1);
- f >= e && (this.ec.hc(!0), this.ec = null, this.uz(++this.Gj))
- } else if (c && 0 >= f) return this.yz(),
- a.kv(this.jm),
- !1;
- return this.ci = !1
- }
- this.ci = !1
- },
- jB: function(a) {
- this.Lb = a;
- this.V(a.value)
- },
- uz: function(a) {
- this.ef.ic(a - 1);
- this.Jl = !1;
- var c = 0,
- d = 0;
- switch (a) {
- case 1:
- this.j = this.uj(1, this.Lb),
- this.j.push(this.Lb),
- this.Ic = this.j,
- this.lp(this.Ic);
- case 2:
- this.Gh = this.Sl(this.Ic, this.Lb.name);
- for (var c = 1,
- d = 5,
- e = this.Ic.length - 1; 0 <= e; e--) {
- var f = this.Od(1E3 + e);
- f.Xt == this.Gh[0].name && (this.Pd.dc({
- x: f.x - b.aa.width / 4,
- y: L.height + this.Pd.width / 2 - 100,
- anchorX: 0.5,
- anchorY: 0.5
- }), this.Pd.kv(), this.Pd.Kc(b.Yh(b.vb.create(b.Vg.create(0.2, 1.2), b.Vg.create(0.2, 1)))), this.Pd.te(!1))
- }
- break;
- case 3:
- this.Pd.hc(!0);
- this.j = this.uj(3, this.Lb);
- this.j.push(this.Lb);
- this.Ic = randArr(this.j, 3);
- this.Kc(b.vb.create(b.Wd.create(0.4), b.Bd.create(function() {
- this.lp(this.Ic)
- },
- this)));
- this.Gh = this.Sl(this.Ic, this.Lb.name);
- c = 2;
- break;
- case 4:
- this.j = this.uj(4, this.Lb),
- this.j.push(this.Lb),
- this.Ic = randArr(this.j, 4),
- this.Kc(b.vb.create(b.Wd.create(0.4), b.Bd.create(function() {
- this.lp(this.Ic)
- },
- this)));
- case 5:
- case 6:
- this.Gh = this.Sl(this.Ic, this.Lb.name);
- c = 1 + Math.round(2 * Math.random());
- break;
- case 7:
- this.j = this.uj(5, this.Lb),
- this.j.push(this.Lb),
- this.Ic = randArr(this.j, 5),
- this.Kc(b.vb.create(b.Wd.create(0.4), b.Bd.create(function() {
- this.lp(this.Ic)
- },
- this)));
- default:
- this.Gh = this.Sl(this.Ic, this.Lb.name),
- c = 1 + Math.round(3 * Math.random())
- }
- 0 == d && (d = 6 - 0.2 * (25 < a ? 25 : a));
- this.Kc(b.vb.create(b.Wd.create(1), b.Bd.create(function() {
- this.zz(this.Gh, c, d);
- 1 != this.Gj && 2 != this.Gj || this.Pd.te(!0)
- },
- this)))
- },
- uj: function(a, c) {
- for (var d = null,
- d = c ? randArr(this.Sl(N, c.name), a) : randArr(N, a), e = 0; e < a; e++) d[e].value = b.color(d[e].value);
- return d
- },
- zz: function(a, c, d, e) {
- if (!e && this.ec) return ! 1;
- this.ec = b.zb.create();
- var f = randArr(O, 1)[0];
- this.ec.dc({
- x: b.aa.width - f.width / 2 + 15,
- y: b.aa.height / 2 - 105,
- width: f.width,
- height: f.height,
- anchorX: 0.5,
- anchorY: 0.5
- });
- a = randArr(a, c);
- for (var g = null,
- h = null,
- k = f.Fg - 1; 0 <= k; k--) {
- if (1 == c && k == f.Fg - 1) {
- g = b.B.create("#blocks/" + f.name + "/0.png");
- h = a[0];
- g.V(h.value);
- g.dc(f.Lg);
- this.ec.N(g);
- this.Fj.push({
- color: h,
- hz: g
- });
- break
- }
- g = b.B.create("#blocks/" + f.name + "/" + (k + 1) + ".png");
- k + 1 <= c ? h = a[k] : (h = randArr(a, 1), h = h[0]);
- g.V(h.value);
- g.dc(f.Lg);
- this.ec.N(g);
- this.Fj.push({
- color: h,
- hz: g
- })
- }
- this.N(this.ec, 2);
- e || (c = b.wk.create(d, C(0, this.ec.y)), this.ec.Kc(c));
- return this.ec
- },
- lp: function(a) {
- for (var c = b.G.create({
- event: b.G.li,
- Tj: !0,
- cf: this.cf,
- Uh: this.Uh,
- Th: this.Th,
- Sh: this.Sh
- }), d = a.length, e = b.aa.width / d / L.width, f = 0; f <= d - 1; f++) {
- var g = b.B.create("#btn.png");
- g.Qp(e);
- g.dc({
- anchorY: 0,
- anchorX: 1,
- x: b.aa.width - f * L.width * e + M.x,
- y: -L.height,
- Xt: a[f].name
- });
- g.V(a[f].value);
- var h = this.Od(1E3 + f);
- if (h) {
- var k = b.ub.create(0.2, C(0, -L.height)),
- m = b.Bd.create(function() {
- this.hc()
- },
- h);
- h.Kc(b.vb.create(b.Wd.create(0.1 + 0.1 * f), k, m))
- }
- this.N(g, 3, 1E3 + f);
- k = b.ub.create(0.4, C(0, L.height));
- g.Kc(b.vb.create(b.Wd.create(0.2 + 0.1 * f), k));
- b.I.addListener(0 == f ? c: c.d(), g)
- }
- },
- cf: function(a, c) {
- var d = S,
- e = c.Cc,
- f = e.du(a.Oh()),
- g = e.ud();
- if (void 0 == huanle) return ! 1;
- if (b.zA(E(0, 0, g.width, g.height), f)) {
- if (d.Lb.name == e.Xt) return ! 1;
- b.Il.Vu(H.oA, !1);
- d.Jl = !1;
- var h = d.Od(3E3);
- h && (d.V(d.Lb.value), h.kv(d.jm), h.clear(), h.hc(!0));
- h = b.Tb.create();
- h.dc({
- x: d.Zc.x + d.Zc.width / 2,
- y: d.Zc.y + d.Zc.height / 2,
- anchorX: 0.5,
- anchorY: 0.5
- });
- d.N(h, 1, 3E3);
- var k = d.MK(d.j, e.Xt);
- d.Lb = k;
- h.ip(C(0, 0), 50, k.value);
- e = b.Zm.create(0.8, 50);
- f = b.Bd.create(function() {
- d.jB(k);
- h.clear();
- h.hc(!0)
- },
- this);
- d.jm = b.vb.create(e, f);
- h.Kc(d.jm);
- return ! 0
- }
- return ! 1
- },
- Uh: function() {},
- Th: function() {},
- Sh: function() {},
- KI: function(a, c) {
- var d = 50 * a.Kz(),
- e = ah = 2 * d,
- f = a.x - d,
- d = a.y - d,
- g = c.x,
- h = c.y,
- k = c.width - 200;
- return Math.abs(f - g) > Math.max(e, k) || Math.abs(d - h) > Math.max(ah, c.height) ? !1 : b.BA(E(f, d, e, ah), E(g, h, k, c.height))
- },
- FI: function(a, c) {
- var d = a.x,
- e = a.y,
- f = a.width - 100,
- g = c.x,
- h = c.y,
- k = c.width - 150;
- return Math.abs(d - g) > Math.max(f, k) || Math.abs(e - h) > Math.max(a.height, c.height) ? !1 : b.BA(E(d, e, f, a.height), E(g, h, k, c.height))
- },
- MK: function(a, c) {
- for (var d in a) if (a[d].name == c) return a[d];
- return null
- },
- Sl: function(a, c) {
- for (var d = [], e = a.length, f = 0; f < e; f++) a[f].name != c && d.push(a[f]);
- return d
- }
- }),
- W = b.$m.extend({
- se: function() {
- this._super();
- b.ue.Vt(H.NJ, H.OJ);
- P = new T;
- P.pN();
- this.N(P);
- Q = new U;
- R = new V
- }
- }),
- U = b.zb.extend({
- ctor: function() {
- this._super();
- this.Yj = b.B.create("#result.png");
- this.Yj.dc({
- x: b.aa.width / 2 + M.x,
- y: b.aa.height / 2 + 100
- });
- var a = b.B.create("#btn.png");
- a.dc({
- x: b.aa.width / 2 + 120 + M.x,
- y: b.aa.height / 2 - 120
- });
- a.V(b.color("#2199BE"));
- a.Og(1.2, 0.5);
- this.N(a);
- a = b.A.create("0", "\u9ed1\u4f53", 40);
- a.dc({
- x: b.aa.width / 2 + 120 + M.x,
- y: b.aa.height / 2 - 120
- });
- a.V(b.color(250, 250, 250));
- a.ic("\u70ab\u8000\u4e00\u4e0b");
- this.N(a);
- a = b.B.create("#btn.png");
- a.dc({
- x: b.aa.width / 2 - 120 + M.x,
- y: b.aa.height / 2 - 120
- });
- a.V(b.color("#2199BE"));
- a.Og(1.2, 0.5);
- this.N(a);
- a = b.A.create("0", "\u9ed1\u4f53", 40);
- a.dc({
- x: b.aa.width / 2 - 120 + M.x,
- y: b.aa.height / 2 - 120
- });
- a.V(b.color(250, 250, 250));
- a.ic("\u518d\u6765\u4e00\u6b21");
- this.N(a);
- this.N(this.Yj)
- },
- se: function() {
- this._super();
- var a = P.Gj - 1,
- c = 0,
- d = "";
- 20 < a ? (c = 99, d = "\u82b1\u4ed9\u5b50") : 15 < a ? (c = Math.round(95 + 4 * (a - 15) / 6), d = "\u91c7\u82b1\u5723\u624b") : 10 < a ? (c = Math.round(85 + 10 * (a - 10) / 6), d = "\u91c7\u82b1\u5927\u76d7") : 5 < a ? (c = Math.round(80 + 10 * (a - 5) / 6), d = "\u91c7\u82b1\u6d6a\u5b50") : (c = 80 + a / 2, d = "\u624b\u6b8b\u82b1\u7ae5");
- this.Yj.df();
- var e = this.Yj.width,
- f = this.Yj.height,
- g = new b.A("\u201c" + d + "\u201d\u5c31\u662f\u4f60\u4e86~~~\n\u91c7\u5230\u4e86" + a + "\u6735\u5c0f\u91ce\u82b1\n\u6253\u8d25\u4e86\u670b\u53cb\u5708" + c + "%\u7684\u4eba\uff01\n\u5411\u670b\u53cb\u70ab\u8000\u4e0b\u5427\uff1f", "Arial", 24);
- g.x = e / 2 + 30;
- g.y = f - g.height - 100;
- g.textAlign = b.A.Yg;
- g.width = e - 300;
- g.color = b.color(10, 10, 10);
- this.Yj.N(g);
- this.Pj = b.G.create({
- event: b.G.li,
- cf: function(e) {
- e = e.Oh();
- if (e.y > b.aa.height / 2) return ! 1;
- e.x < b.aa.width / 2 ? (Q.hc(), P.Vz()) : (dp_share());
- return ! 0
- }
- });
- b.I.addListener(this.Pj, this);
- dp_submitScore(a,d);
- // setFootAdvDisplay("inline");
- },
- vd: function() {
- this._super();
- b.I.removeListener(this.Pj)
- }
- }),
- V = b.Pb.extend({
- Pj: null,
- ctor: function() {
- this._super(b.color(0, 0, 0, 188), b.aa.width, b.aa.height);
- var a = new b.B("#arrow.png");
- a.anchorX = 1;
- a.anchorY = 1;
- a.x = b.aa.width - 15;
- a.y = b.aa.height - 5;
- this.N(a);
- a = new b.A('\u8bf7\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u83dc\u5355\u6309\u94ae\n\u518d\u70b9"\u5206\u4eab\u5230\u670b\u53cb\u5708"\n\u8ba9\u597d\u53cb\u4eec\u6311\u6218\u4f60\u7684\u5206\u6570\uff01', "\u5b8b\u4f53", 40, D(0.7 * b.aa.width, 250), b.Yg);
- a.x = (b.aa.height - a.width) / 2 + 60;
- a.y = b.aa.height - a.height;
- this.N(a)
- },
- se: function() {
- this._super();
- this.Pj = b.G.create({
- event: b.G.li,
- Tj: !0,
- cf: function() {
- R.hc()
- }
- });
- b.I.addListener(this.Pj, this)
- },
- vd: function() {
- this._super();
- b.I.removeListener(this.Pj)
- }
- });
- randArr = function(a, c) {
- for (var d = [], e = a.length - 1; 0 <= e; e--) d.push(a[e]);
- for (var f = [], e = 0; e < c; e++) if (0 < d.length) {
- var g = Math.floor(Math.random() * d.length);
- f[e] = d[g];
- d.splice(g, 1)
- } else break;
- return f
- };
- b.Va.Ru = function() {
- b.view.lI(!0);
- b.Aa.Kf ? b.view.Lp(640, 1E3, b.yc.Mm) : b.view.Lp(640, 960, b.yc.SHOW_ALL);
- b.view.fM(!0);
- b.os = null;
- b.xq.Wu(J,
- function() {
- gameScene = new W;
- b.Qa.OA(gameScene)
- },
- this)
- };
- b.Va.oM();
|