pb2jsonlib.js 498 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502
  1. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.pb2json = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
  2. /**
  3. * @fileoverview
  4. * @enhanceable
  5. * @public
  6. */
  7. // GENERATED CODE -- DO NOT EDIT!
  8. var jspb = require('google-protobuf');
  9. var goog = jspb;
  10. var global = Function('return this')();
  11. goog.exportSymbol('proto.transit_realtime.Alert', null, global);
  12. goog.exportSymbol('proto.transit_realtime.Alert.Cause', null, global);
  13. goog.exportSymbol('proto.transit_realtime.Alert.Effect', null, global);
  14. goog.exportSymbol('proto.transit_realtime.Alert.SeverityLevel', null, global);
  15. goog.exportSymbol('proto.transit_realtime.EntitySelector', null, global);
  16. goog.exportSymbol('proto.transit_realtime.FeedEntity', null, global);
  17. goog.exportSymbol('proto.transit_realtime.FeedHeader', null, global);
  18. goog.exportSymbol('proto.transit_realtime.FeedHeader.Incrementality', null, global);
  19. goog.exportSymbol('proto.transit_realtime.FeedMessage', null, global);
  20. goog.exportSymbol('proto.transit_realtime.Position', null, global);
  21. goog.exportSymbol('proto.transit_realtime.Shape', null, global);
  22. goog.exportSymbol('proto.transit_realtime.TimeRange', null, global);
  23. goog.exportSymbol('proto.transit_realtime.TranslatedString', null, global);
  24. goog.exportSymbol('proto.transit_realtime.TranslatedString.Translation', null, global);
  25. goog.exportSymbol('proto.transit_realtime.TripDescriptor', null, global);
  26. goog.exportSymbol('proto.transit_realtime.TripDescriptor.ScheduleRelationship', null, global);
  27. goog.exportSymbol('proto.transit_realtime.TripUpdate', null, global);
  28. goog.exportSymbol('proto.transit_realtime.TripUpdate.StopTimeEvent', null, global);
  29. goog.exportSymbol('proto.transit_realtime.TripUpdate.StopTimeUpdate', null, global);
  30. goog.exportSymbol('proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship', null, global);
  31. goog.exportSymbol('proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties', null, global);
  32. goog.exportSymbol('proto.transit_realtime.TripUpdate.TripProperties', null, global);
  33. goog.exportSymbol('proto.transit_realtime.VehicleDescriptor', null, global);
  34. goog.exportSymbol('proto.transit_realtime.VehiclePosition', null, global);
  35. goog.exportSymbol('proto.transit_realtime.VehiclePosition.CarriageDetails', null, global);
  36. goog.exportSymbol('proto.transit_realtime.VehiclePosition.CongestionLevel', null, global);
  37. goog.exportSymbol('proto.transit_realtime.VehiclePosition.OccupancyStatus', null, global);
  38. goog.exportSymbol('proto.transit_realtime.VehiclePosition.VehicleStopStatus', null, global);
  39. /**
  40. * Generated by JsPbCodeGenerator.
  41. * @param {Array=} opt_data Optional initial data array, typically from a
  42. * server response, or constructed directly in Javascript. The array is used
  43. * in place and becomes part of the constructed object. It is not cloned.
  44. * If no data is provided, the constructed object will be empty, but still
  45. * valid.
  46. * @extends {jspb.Message}
  47. * @constructor
  48. */
  49. proto.transit_realtime.FeedMessage = function(opt_data) {
  50. jspb.Message.initialize(this, opt_data, 0, 3, proto.transit_realtime.FeedMessage.repeatedFields_, null);
  51. };
  52. goog.inherits(proto.transit_realtime.FeedMessage, jspb.Message);
  53. if (goog.DEBUG && !COMPILED) {
  54. proto.transit_realtime.FeedMessage.displayName = 'proto.transit_realtime.FeedMessage';
  55. }
  56. /**
  57. * List of repeated fields within this message type.
  58. * @private {!Array<number>}
  59. * @const
  60. */
  61. proto.transit_realtime.FeedMessage.repeatedFields_ = [2];
  62. if (jspb.Message.GENERATE_TO_OBJECT) {
  63. /**
  64. * Creates an object representation of this proto suitable for use in Soy templates.
  65. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  66. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  67. * For the list of reserved names please see:
  68. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  69. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  70. * for transitional soy proto support: http://goto/soy-param-migration
  71. * @return {!Object}
  72. */
  73. proto.transit_realtime.FeedMessage.prototype.toObject = function(opt_includeInstance) {
  74. return proto.transit_realtime.FeedMessage.toObject(opt_includeInstance, this);
  75. };
  76. /**
  77. * Static version of the {@see toObject} method.
  78. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  79. * instance for transitional soy proto support:
  80. * http://goto/soy-param-migration
  81. * @param {!proto.transit_realtime.FeedMessage} msg The msg instance to transform.
  82. * @return {!Object}
  83. */
  84. proto.transit_realtime.FeedMessage.toObject = function(includeInstance, msg) {
  85. var f, obj = {
  86. header: (f = msg.getHeader()) && proto.transit_realtime.FeedHeader.toObject(includeInstance, f),
  87. entityList: jspb.Message.toObjectList(msg.getEntityList(),
  88. proto.transit_realtime.FeedEntity.toObject, includeInstance)
  89. };
  90. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  91. proto.transit_realtime.FeedMessage.extensions, proto.transit_realtime.FeedMessage.prototype.getExtension,
  92. includeInstance);
  93. if (includeInstance) {
  94. obj.$jspbMessageInstance = msg;
  95. }
  96. return obj;
  97. };
  98. }
  99. /**
  100. * Deserializes binary data (in protobuf wire format).
  101. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  102. * @return {!proto.transit_realtime.FeedMessage}
  103. */
  104. proto.transit_realtime.FeedMessage.deserializeBinary = function(bytes) {
  105. var reader = new jspb.BinaryReader(bytes);
  106. var msg = new proto.transit_realtime.FeedMessage;
  107. return proto.transit_realtime.FeedMessage.deserializeBinaryFromReader(msg, reader);
  108. };
  109. /**
  110. * Deserializes binary data (in protobuf wire format) from the
  111. * given reader into the given message object.
  112. * @param {!proto.transit_realtime.FeedMessage} msg The message object to deserialize into.
  113. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  114. * @return {!proto.transit_realtime.FeedMessage}
  115. */
  116. proto.transit_realtime.FeedMessage.deserializeBinaryFromReader = function(msg, reader) {
  117. while (reader.nextField()) {
  118. if (reader.isEndGroup()) {
  119. break;
  120. }
  121. var field = reader.getFieldNumber();
  122. switch (field) {
  123. case 1:
  124. var value = new proto.transit_realtime.FeedHeader;
  125. reader.readMessage(value,proto.transit_realtime.FeedHeader.deserializeBinaryFromReader);
  126. msg.setHeader(value);
  127. break;
  128. case 2:
  129. var value = new proto.transit_realtime.FeedEntity;
  130. reader.readMessage(value,proto.transit_realtime.FeedEntity.deserializeBinaryFromReader);
  131. msg.getEntityList().push(value);
  132. msg.setEntityList(msg.getEntityList());
  133. break;
  134. default:
  135. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.FeedMessage.extensionsBinary,
  136. proto.transit_realtime.FeedMessage.prototype.getExtension,
  137. proto.transit_realtime.FeedMessage.prototype.setExtension);
  138. break;
  139. }
  140. }
  141. return msg;
  142. };
  143. /**
  144. * Class method variant: serializes the given message to binary data
  145. * (in protobuf wire format), writing to the given BinaryWriter.
  146. * @param {!proto.transit_realtime.FeedMessage} message
  147. * @param {!jspb.BinaryWriter} writer
  148. */
  149. proto.transit_realtime.FeedMessage.serializeBinaryToWriter = function(message, writer) {
  150. message.serializeBinaryToWriter(writer);
  151. };
  152. /**
  153. * Serializes the message to binary data (in protobuf wire format).
  154. * @return {!Uint8Array}
  155. */
  156. proto.transit_realtime.FeedMessage.prototype.serializeBinary = function() {
  157. var writer = new jspb.BinaryWriter();
  158. this.serializeBinaryToWriter(writer);
  159. return writer.getResultBuffer();
  160. };
  161. /**
  162. * Serializes the message to binary data (in protobuf wire format),
  163. * writing to the given BinaryWriter.
  164. * @param {!jspb.BinaryWriter} writer
  165. */
  166. proto.transit_realtime.FeedMessage.prototype.serializeBinaryToWriter = function (writer) {
  167. var f = undefined;
  168. f = this.getHeader();
  169. if (f != null) {
  170. writer.writeMessage(
  171. 1,
  172. f,
  173. proto.transit_realtime.FeedHeader.serializeBinaryToWriter
  174. );
  175. }
  176. f = this.getEntityList();
  177. if (f.length > 0) {
  178. writer.writeRepeatedMessage(
  179. 2,
  180. f,
  181. proto.transit_realtime.FeedEntity.serializeBinaryToWriter
  182. );
  183. }
  184. jspb.Message.serializeBinaryExtensions(this, writer,
  185. proto.transit_realtime.FeedMessage.extensionsBinary, proto.transit_realtime.FeedMessage.prototype.getExtension);
  186. };
  187. /**
  188. * Creates a deep clone of this proto. No data is shared with the original.
  189. * @return {!proto.transit_realtime.FeedMessage} The clone.
  190. */
  191. proto.transit_realtime.FeedMessage.prototype.cloneMessage = function() {
  192. return /** @type {!proto.transit_realtime.FeedMessage} */ (jspb.Message.cloneMessage(this));
  193. };
  194. /**
  195. * required FeedHeader header = 1;
  196. * @return {!proto.transit_realtime.FeedHeader}
  197. */
  198. proto.transit_realtime.FeedMessage.prototype.getHeader = function() {
  199. return /** @type{!proto.transit_realtime.FeedHeader} */ (
  200. jspb.Message.getWrapperField(this, proto.transit_realtime.FeedHeader, 1, 1));
  201. };
  202. /** @param {proto.transit_realtime.FeedHeader|undefined} value */
  203. proto.transit_realtime.FeedMessage.prototype.setHeader = function(value) {
  204. jspb.Message.setWrapperField(this, 1, value);
  205. };
  206. proto.transit_realtime.FeedMessage.prototype.clearHeader = function() {
  207. this.setHeader(undefined);
  208. };
  209. /**
  210. * Returns whether this field is set.
  211. * @return{!boolean}
  212. */
  213. proto.transit_realtime.FeedMessage.prototype.hasHeader = function() {
  214. return jspb.Message.getField(this, 1) != null;
  215. };
  216. /**
  217. * repeated FeedEntity entity = 2;
  218. * If you change this array by adding, removing or replacing elements, or if you
  219. * replace the array itself, then you must call the setter to update it.
  220. * @return {!Array.<!proto.transit_realtime.FeedEntity>}
  221. */
  222. proto.transit_realtime.FeedMessage.prototype.getEntityList = function() {
  223. return /** @type{!Array.<!proto.transit_realtime.FeedEntity>} */ (
  224. jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.FeedEntity, 2));
  225. };
  226. /** @param {Array.<!proto.transit_realtime.FeedEntity>} value */
  227. proto.transit_realtime.FeedMessage.prototype.setEntityList = function(value) {
  228. jspb.Message.setRepeatedWrapperField(this, 2, value);
  229. };
  230. proto.transit_realtime.FeedMessage.prototype.clearEntityList = function() {
  231. this.setEntityList([]);
  232. };
  233. /**
  234. * The extensions registered with this message class. This is a map of
  235. * extension field number to fieldInfo object.
  236. *
  237. * For example:
  238. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  239. *
  240. * fieldName contains the JsCompiler renamed field name property so that it
  241. * works in OPTIMIZED mode.
  242. *
  243. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  244. */
  245. proto.transit_realtime.FeedMessage.extensions = {};
  246. /**
  247. * The extensions registered with this message class. This is a map of
  248. * extension field number to fieldInfo object.
  249. *
  250. * For example:
  251. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  252. *
  253. * fieldName contains the JsCompiler renamed field name property so that it
  254. * works in OPTIMIZED mode.
  255. *
  256. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  257. */
  258. proto.transit_realtime.FeedMessage.extensionsBinary = {};
  259. /**
  260. * Generated by JsPbCodeGenerator.
  261. * @param {Array=} opt_data Optional initial data array, typically from a
  262. * server response, or constructed directly in Javascript. The array is used
  263. * in place and becomes part of the constructed object. It is not cloned.
  264. * If no data is provided, the constructed object will be empty, but still
  265. * valid.
  266. * @extends {jspb.Message}
  267. * @constructor
  268. */
  269. proto.transit_realtime.FeedHeader = function(opt_data) {
  270. jspb.Message.initialize(this, opt_data, 0, 4, null, null);
  271. };
  272. goog.inherits(proto.transit_realtime.FeedHeader, jspb.Message);
  273. if (goog.DEBUG && !COMPILED) {
  274. proto.transit_realtime.FeedHeader.displayName = 'proto.transit_realtime.FeedHeader';
  275. }
  276. if (jspb.Message.GENERATE_TO_OBJECT) {
  277. /**
  278. * Creates an object representation of this proto suitable for use in Soy templates.
  279. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  280. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  281. * For the list of reserved names please see:
  282. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  283. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  284. * for transitional soy proto support: http://goto/soy-param-migration
  285. * @return {!Object}
  286. */
  287. proto.transit_realtime.FeedHeader.prototype.toObject = function(opt_includeInstance) {
  288. return proto.transit_realtime.FeedHeader.toObject(opt_includeInstance, this);
  289. };
  290. /**
  291. * Static version of the {@see toObject} method.
  292. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  293. * instance for transitional soy proto support:
  294. * http://goto/soy-param-migration
  295. * @param {!proto.transit_realtime.FeedHeader} msg The msg instance to transform.
  296. * @return {!Object}
  297. */
  298. proto.transit_realtime.FeedHeader.toObject = function(includeInstance, msg) {
  299. var f, obj = {
  300. gtfsRealtimeVersion: jspb.Message.getField(msg, 1),
  301. incrementality: !msg.hasIncrementality() ? 0 : jspb.Message.getField(msg, 2),
  302. timestamp: jspb.Message.getField(msg, 3)
  303. };
  304. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  305. proto.transit_realtime.FeedHeader.extensions, proto.transit_realtime.FeedHeader.prototype.getExtension,
  306. includeInstance);
  307. if (includeInstance) {
  308. obj.$jspbMessageInstance = msg;
  309. }
  310. return obj;
  311. };
  312. }
  313. /**
  314. * Deserializes binary data (in protobuf wire format).
  315. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  316. * @return {!proto.transit_realtime.FeedHeader}
  317. */
  318. proto.transit_realtime.FeedHeader.deserializeBinary = function(bytes) {
  319. var reader = new jspb.BinaryReader(bytes);
  320. var msg = new proto.transit_realtime.FeedHeader;
  321. return proto.transit_realtime.FeedHeader.deserializeBinaryFromReader(msg, reader);
  322. };
  323. /**
  324. * Deserializes binary data (in protobuf wire format) from the
  325. * given reader into the given message object.
  326. * @param {!proto.transit_realtime.FeedHeader} msg The message object to deserialize into.
  327. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  328. * @return {!proto.transit_realtime.FeedHeader}
  329. */
  330. proto.transit_realtime.FeedHeader.deserializeBinaryFromReader = function(msg, reader) {
  331. while (reader.nextField()) {
  332. if (reader.isEndGroup()) {
  333. break;
  334. }
  335. var field = reader.getFieldNumber();
  336. switch (field) {
  337. case 1:
  338. var value = /** @type {string} */ (reader.readString());
  339. msg.setGtfsRealtimeVersion(value);
  340. break;
  341. case 2:
  342. var value = /** @type {!proto.transit_realtime.FeedHeader.Incrementality} */ (reader.readEnum());
  343. msg.setIncrementality(value);
  344. break;
  345. case 3:
  346. var value = /** @type {number} */ (reader.readUint64());
  347. msg.setTimestamp(value);
  348. break;
  349. default:
  350. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.FeedHeader.extensionsBinary,
  351. proto.transit_realtime.FeedHeader.prototype.getExtension,
  352. proto.transit_realtime.FeedHeader.prototype.setExtension);
  353. break;
  354. }
  355. }
  356. return msg;
  357. };
  358. /**
  359. * Class method variant: serializes the given message to binary data
  360. * (in protobuf wire format), writing to the given BinaryWriter.
  361. * @param {!proto.transit_realtime.FeedHeader} message
  362. * @param {!jspb.BinaryWriter} writer
  363. */
  364. proto.transit_realtime.FeedHeader.serializeBinaryToWriter = function(message, writer) {
  365. message.serializeBinaryToWriter(writer);
  366. };
  367. /**
  368. * Serializes the message to binary data (in protobuf wire format).
  369. * @return {!Uint8Array}
  370. */
  371. proto.transit_realtime.FeedHeader.prototype.serializeBinary = function() {
  372. var writer = new jspb.BinaryWriter();
  373. this.serializeBinaryToWriter(writer);
  374. return writer.getResultBuffer();
  375. };
  376. /**
  377. * Serializes the message to binary data (in protobuf wire format),
  378. * writing to the given BinaryWriter.
  379. * @param {!jspb.BinaryWriter} writer
  380. */
  381. proto.transit_realtime.FeedHeader.prototype.serializeBinaryToWriter = function (writer) {
  382. var f = undefined;
  383. f = jspb.Message.getField(this, 1);
  384. if (f != null) {
  385. writer.writeString(
  386. 1,
  387. f
  388. );
  389. }
  390. f = jspb.Message.getField(this, 2);
  391. if (f != null) {
  392. writer.writeEnum(
  393. 2,
  394. f
  395. );
  396. }
  397. f = jspb.Message.getField(this, 3);
  398. if (f != null) {
  399. writer.writeUint64(
  400. 3,
  401. f
  402. );
  403. }
  404. jspb.Message.serializeBinaryExtensions(this, writer,
  405. proto.transit_realtime.FeedHeader.extensionsBinary, proto.transit_realtime.FeedHeader.prototype.getExtension);
  406. };
  407. /**
  408. * Creates a deep clone of this proto. No data is shared with the original.
  409. * @return {!proto.transit_realtime.FeedHeader} The clone.
  410. */
  411. proto.transit_realtime.FeedHeader.prototype.cloneMessage = function() {
  412. return /** @type {!proto.transit_realtime.FeedHeader} */ (jspb.Message.cloneMessage(this));
  413. };
  414. /**
  415. * required string gtfs_realtime_version = 1;
  416. * @return {string}
  417. */
  418. proto.transit_realtime.FeedHeader.prototype.getGtfsRealtimeVersion = function() {
  419. return /** @type {string} */ (!this.hasGtfsRealtimeVersion() ? "" : jspb.Message.getField(this, 1));
  420. };
  421. /** @param {string|undefined} value */
  422. proto.transit_realtime.FeedHeader.prototype.setGtfsRealtimeVersion = function(value) {
  423. jspb.Message.setField(this, 1, value);
  424. };
  425. proto.transit_realtime.FeedHeader.prototype.clearGtfsRealtimeVersion = function() {
  426. jspb.Message.setField(this, 1, undefined);
  427. };
  428. /**
  429. * Returns whether this field is set.
  430. * @return{!boolean}
  431. */
  432. proto.transit_realtime.FeedHeader.prototype.hasGtfsRealtimeVersion = function() {
  433. return jspb.Message.getField(this, 1) != null;
  434. };
  435. /**
  436. * optional Incrementality incrementality = 2;
  437. * @return {proto.transit_realtime.FeedHeader.Incrementality}
  438. */
  439. proto.transit_realtime.FeedHeader.prototype.getIncrementality = function() {
  440. return /** @type {proto.transit_realtime.FeedHeader.Incrementality} */ (!this.hasIncrementality() ? 0 : jspb.Message.getField(this, 2));
  441. };
  442. /** @param {proto.transit_realtime.FeedHeader.Incrementality|undefined} value */
  443. proto.transit_realtime.FeedHeader.prototype.setIncrementality = function(value) {
  444. jspb.Message.setField(this, 2, value);
  445. };
  446. proto.transit_realtime.FeedHeader.prototype.clearIncrementality = function() {
  447. jspb.Message.setField(this, 2, undefined);
  448. };
  449. /**
  450. * Returns whether this field is set.
  451. * @return{!boolean}
  452. */
  453. proto.transit_realtime.FeedHeader.prototype.hasIncrementality = function() {
  454. return jspb.Message.getField(this, 2) != null;
  455. };
  456. /**
  457. * optional uint64 timestamp = 3;
  458. * @return {number}
  459. */
  460. proto.transit_realtime.FeedHeader.prototype.getTimestamp = function() {
  461. return /** @type {number} */ (!this.hasTimestamp() ? 0 : jspb.Message.getField(this, 3));
  462. };
  463. /** @param {number?|undefined} value */
  464. proto.transit_realtime.FeedHeader.prototype.setTimestamp = function(value) {
  465. jspb.Message.setField(this, 3, value);
  466. };
  467. proto.transit_realtime.FeedHeader.prototype.clearTimestamp = function() {
  468. jspb.Message.setField(this, 3, undefined);
  469. };
  470. /**
  471. * Returns whether this field is set.
  472. * @return{!boolean}
  473. */
  474. proto.transit_realtime.FeedHeader.prototype.hasTimestamp = function() {
  475. return jspb.Message.getField(this, 3) != null;
  476. };
  477. /**
  478. * The extensions registered with this message class. This is a map of
  479. * extension field number to fieldInfo object.
  480. *
  481. * For example:
  482. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  483. *
  484. * fieldName contains the JsCompiler renamed field name property so that it
  485. * works in OPTIMIZED mode.
  486. *
  487. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  488. */
  489. proto.transit_realtime.FeedHeader.extensions = {};
  490. /**
  491. * The extensions registered with this message class. This is a map of
  492. * extension field number to fieldInfo object.
  493. *
  494. * For example:
  495. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  496. *
  497. * fieldName contains the JsCompiler renamed field name property so that it
  498. * works in OPTIMIZED mode.
  499. *
  500. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  501. */
  502. proto.transit_realtime.FeedHeader.extensionsBinary = {};
  503. /**
  504. * @enum {number}
  505. */
  506. proto.transit_realtime.FeedHeader.Incrementality = {
  507. FULL_DATASET: 0,
  508. DIFFERENTIAL: 1
  509. };
  510. /**
  511. * Generated by JsPbCodeGenerator.
  512. * @param {Array=} opt_data Optional initial data array, typically from a
  513. * server response, or constructed directly in Javascript. The array is used
  514. * in place and becomes part of the constructed object. It is not cloned.
  515. * If no data is provided, the constructed object will be empty, but still
  516. * valid.
  517. * @extends {jspb.Message}
  518. * @constructor
  519. */
  520. proto.transit_realtime.FeedEntity = function(opt_data) {
  521. jspb.Message.initialize(this, opt_data, 0, 7, null, null);
  522. };
  523. goog.inherits(proto.transit_realtime.FeedEntity, jspb.Message);
  524. if (goog.DEBUG && !COMPILED) {
  525. proto.transit_realtime.FeedEntity.displayName = 'proto.transit_realtime.FeedEntity';
  526. }
  527. if (jspb.Message.GENERATE_TO_OBJECT) {
  528. /**
  529. * Creates an object representation of this proto suitable for use in Soy templates.
  530. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  531. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  532. * For the list of reserved names please see:
  533. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  534. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  535. * for transitional soy proto support: http://goto/soy-param-migration
  536. * @return {!Object}
  537. */
  538. proto.transit_realtime.FeedEntity.prototype.toObject = function(opt_includeInstance) {
  539. return proto.transit_realtime.FeedEntity.toObject(opt_includeInstance, this);
  540. };
  541. /**
  542. * Static version of the {@see toObject} method.
  543. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  544. * instance for transitional soy proto support:
  545. * http://goto/soy-param-migration
  546. * @param {!proto.transit_realtime.FeedEntity} msg The msg instance to transform.
  547. * @return {!Object}
  548. */
  549. proto.transit_realtime.FeedEntity.toObject = function(includeInstance, msg) {
  550. var f, obj = {
  551. id: jspb.Message.getField(msg, 1),
  552. isDeleted: !msg.hasIsDeleted() ? false : jspb.Message.getField(msg, 2),
  553. tripUpdate: (f = msg.getTripUpdate()) && proto.transit_realtime.TripUpdate.toObject(includeInstance, f),
  554. vehicle: (f = msg.getVehicle()) && proto.transit_realtime.VehiclePosition.toObject(includeInstance, f),
  555. alert: (f = msg.getAlert()) && proto.transit_realtime.Alert.toObject(includeInstance, f),
  556. shape: (f = msg.getShape()) && proto.transit_realtime.Shape.toObject(includeInstance, f)
  557. };
  558. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  559. proto.transit_realtime.FeedEntity.extensions, proto.transit_realtime.FeedEntity.prototype.getExtension,
  560. includeInstance);
  561. if (includeInstance) {
  562. obj.$jspbMessageInstance = msg;
  563. }
  564. return obj;
  565. };
  566. }
  567. /**
  568. * Deserializes binary data (in protobuf wire format).
  569. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  570. * @return {!proto.transit_realtime.FeedEntity}
  571. */
  572. proto.transit_realtime.FeedEntity.deserializeBinary = function(bytes) {
  573. var reader = new jspb.BinaryReader(bytes);
  574. var msg = new proto.transit_realtime.FeedEntity;
  575. return proto.transit_realtime.FeedEntity.deserializeBinaryFromReader(msg, reader);
  576. };
  577. /**
  578. * Deserializes binary data (in protobuf wire format) from the
  579. * given reader into the given message object.
  580. * @param {!proto.transit_realtime.FeedEntity} msg The message object to deserialize into.
  581. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  582. * @return {!proto.transit_realtime.FeedEntity}
  583. */
  584. proto.transit_realtime.FeedEntity.deserializeBinaryFromReader = function(msg, reader) {
  585. while (reader.nextField()) {
  586. if (reader.isEndGroup()) {
  587. break;
  588. }
  589. var field = reader.getFieldNumber();
  590. switch (field) {
  591. case 1:
  592. var value = /** @type {string} */ (reader.readString());
  593. msg.setId(value);
  594. break;
  595. case 2:
  596. var value = /** @type {boolean} */ (reader.readBool());
  597. msg.setIsDeleted(value);
  598. break;
  599. case 3:
  600. var value = new proto.transit_realtime.TripUpdate;
  601. reader.readMessage(value,proto.transit_realtime.TripUpdate.deserializeBinaryFromReader);
  602. msg.setTripUpdate(value);
  603. break;
  604. case 4:
  605. var value = new proto.transit_realtime.VehiclePosition;
  606. reader.readMessage(value,proto.transit_realtime.VehiclePosition.deserializeBinaryFromReader);
  607. msg.setVehicle(value);
  608. break;
  609. case 5:
  610. var value = new proto.transit_realtime.Alert;
  611. reader.readMessage(value,proto.transit_realtime.Alert.deserializeBinaryFromReader);
  612. msg.setAlert(value);
  613. break;
  614. case 6:
  615. var value = new proto.transit_realtime.Shape;
  616. reader.readMessage(value,proto.transit_realtime.Shape.deserializeBinaryFromReader);
  617. msg.setShape(value);
  618. break;
  619. default:
  620. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.FeedEntity.extensionsBinary,
  621. proto.transit_realtime.FeedEntity.prototype.getExtension,
  622. proto.transit_realtime.FeedEntity.prototype.setExtension);
  623. break;
  624. }
  625. }
  626. return msg;
  627. };
  628. /**
  629. * Class method variant: serializes the given message to binary data
  630. * (in protobuf wire format), writing to the given BinaryWriter.
  631. * @param {!proto.transit_realtime.FeedEntity} message
  632. * @param {!jspb.BinaryWriter} writer
  633. */
  634. proto.transit_realtime.FeedEntity.serializeBinaryToWriter = function(message, writer) {
  635. message.serializeBinaryToWriter(writer);
  636. };
  637. /**
  638. * Serializes the message to binary data (in protobuf wire format).
  639. * @return {!Uint8Array}
  640. */
  641. proto.transit_realtime.FeedEntity.prototype.serializeBinary = function() {
  642. var writer = new jspb.BinaryWriter();
  643. this.serializeBinaryToWriter(writer);
  644. return writer.getResultBuffer();
  645. };
  646. /**
  647. * Serializes the message to binary data (in protobuf wire format),
  648. * writing to the given BinaryWriter.
  649. * @param {!jspb.BinaryWriter} writer
  650. */
  651. proto.transit_realtime.FeedEntity.prototype.serializeBinaryToWriter = function (writer) {
  652. var f = undefined;
  653. f = jspb.Message.getField(this, 1);
  654. if (f != null) {
  655. writer.writeString(
  656. 1,
  657. f
  658. );
  659. }
  660. f = jspb.Message.getField(this, 2);
  661. if (f != null) {
  662. writer.writeBool(
  663. 2,
  664. f
  665. );
  666. }
  667. f = this.getTripUpdate();
  668. if (f != null) {
  669. writer.writeMessage(
  670. 3,
  671. f,
  672. proto.transit_realtime.TripUpdate.serializeBinaryToWriter
  673. );
  674. }
  675. f = this.getVehicle();
  676. if (f != null) {
  677. writer.writeMessage(
  678. 4,
  679. f,
  680. proto.transit_realtime.VehiclePosition.serializeBinaryToWriter
  681. );
  682. }
  683. f = this.getAlert();
  684. if (f != null) {
  685. writer.writeMessage(
  686. 5,
  687. f,
  688. proto.transit_realtime.Alert.serializeBinaryToWriter
  689. );
  690. }
  691. f = this.getShape();
  692. if (f != null) {
  693. writer.writeMessage(
  694. 6,
  695. f,
  696. proto.transit_realtime.Shape.serializeBinaryToWriter
  697. );
  698. }
  699. jspb.Message.serializeBinaryExtensions(this, writer,
  700. proto.transit_realtime.FeedEntity.extensionsBinary, proto.transit_realtime.FeedEntity.prototype.getExtension);
  701. };
  702. /**
  703. * Creates a deep clone of this proto. No data is shared with the original.
  704. * @return {!proto.transit_realtime.FeedEntity} The clone.
  705. */
  706. proto.transit_realtime.FeedEntity.prototype.cloneMessage = function() {
  707. return /** @type {!proto.transit_realtime.FeedEntity} */ (jspb.Message.cloneMessage(this));
  708. };
  709. /**
  710. * required string id = 1;
  711. * @return {string}
  712. */
  713. proto.transit_realtime.FeedEntity.prototype.getId = function() {
  714. return /** @type {string} */ (!this.hasId() ? "" : jspb.Message.getField(this, 1));
  715. };
  716. /** @param {string|undefined} value */
  717. proto.transit_realtime.FeedEntity.prototype.setId = function(value) {
  718. jspb.Message.setField(this, 1, value);
  719. };
  720. proto.transit_realtime.FeedEntity.prototype.clearId = function() {
  721. jspb.Message.setField(this, 1, undefined);
  722. };
  723. /**
  724. * Returns whether this field is set.
  725. * @return{!boolean}
  726. */
  727. proto.transit_realtime.FeedEntity.prototype.hasId = function() {
  728. return jspb.Message.getField(this, 1) != null;
  729. };
  730. /**
  731. * optional bool is_deleted = 2;
  732. * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
  733. * You should avoid comparisons like {@code val === true/false} in those cases.
  734. * @return {boolean}
  735. */
  736. proto.transit_realtime.FeedEntity.prototype.getIsDeleted = function() {
  737. return /** @type {boolean} */ (!this.hasIsDeleted() ? false : jspb.Message.getField(this, 2));
  738. };
  739. /** @param {boolean?|undefined} value */
  740. proto.transit_realtime.FeedEntity.prototype.setIsDeleted = function(value) {
  741. jspb.Message.setField(this, 2, value);
  742. };
  743. proto.transit_realtime.FeedEntity.prototype.clearIsDeleted = function() {
  744. jspb.Message.setField(this, 2, undefined);
  745. };
  746. /**
  747. * Returns whether this field is set.
  748. * @return{!boolean}
  749. */
  750. proto.transit_realtime.FeedEntity.prototype.hasIsDeleted = function() {
  751. return jspb.Message.getField(this, 2) != null;
  752. };
  753. /**
  754. * optional TripUpdate trip_update = 3;
  755. * @return {proto.transit_realtime.TripUpdate}
  756. */
  757. proto.transit_realtime.FeedEntity.prototype.getTripUpdate = function() {
  758. return /** @type{proto.transit_realtime.TripUpdate} */ (
  759. jspb.Message.getWrapperField(this, proto.transit_realtime.TripUpdate, 3));
  760. };
  761. /** @param {proto.transit_realtime.TripUpdate|undefined} value */
  762. proto.transit_realtime.FeedEntity.prototype.setTripUpdate = function(value) {
  763. jspb.Message.setWrapperField(this, 3, value);
  764. };
  765. proto.transit_realtime.FeedEntity.prototype.clearTripUpdate = function() {
  766. this.setTripUpdate(undefined);
  767. };
  768. /**
  769. * Returns whether this field is set.
  770. * @return{!boolean}
  771. */
  772. proto.transit_realtime.FeedEntity.prototype.hasTripUpdate = function() {
  773. return jspb.Message.getField(this, 3) != null;
  774. };
  775. /**
  776. * optional VehiclePosition vehicle = 4;
  777. * @return {proto.transit_realtime.VehiclePosition}
  778. */
  779. proto.transit_realtime.FeedEntity.prototype.getVehicle = function() {
  780. return /** @type{proto.transit_realtime.VehiclePosition} */ (
  781. jspb.Message.getWrapperField(this, proto.transit_realtime.VehiclePosition, 4));
  782. };
  783. /** @param {proto.transit_realtime.VehiclePosition|undefined} value */
  784. proto.transit_realtime.FeedEntity.prototype.setVehicle = function(value) {
  785. jspb.Message.setWrapperField(this, 4, value);
  786. };
  787. proto.transit_realtime.FeedEntity.prototype.clearVehicle = function() {
  788. this.setVehicle(undefined);
  789. };
  790. /**
  791. * Returns whether this field is set.
  792. * @return{!boolean}
  793. */
  794. proto.transit_realtime.FeedEntity.prototype.hasVehicle = function() {
  795. return jspb.Message.getField(this, 4) != null;
  796. };
  797. /**
  798. * optional Alert alert = 5;
  799. * @return {proto.transit_realtime.Alert}
  800. */
  801. proto.transit_realtime.FeedEntity.prototype.getAlert = function() {
  802. return /** @type{proto.transit_realtime.Alert} */ (
  803. jspb.Message.getWrapperField(this, proto.transit_realtime.Alert, 5));
  804. };
  805. /** @param {proto.transit_realtime.Alert|undefined} value */
  806. proto.transit_realtime.FeedEntity.prototype.setAlert = function(value) {
  807. jspb.Message.setWrapperField(this, 5, value);
  808. };
  809. proto.transit_realtime.FeedEntity.prototype.clearAlert = function() {
  810. this.setAlert(undefined);
  811. };
  812. /**
  813. * Returns whether this field is set.
  814. * @return{!boolean}
  815. */
  816. proto.transit_realtime.FeedEntity.prototype.hasAlert = function() {
  817. return jspb.Message.getField(this, 5) != null;
  818. };
  819. /**
  820. * optional Shape shape = 6;
  821. * @return {proto.transit_realtime.Shape}
  822. */
  823. proto.transit_realtime.FeedEntity.prototype.getShape = function() {
  824. return /** @type{proto.transit_realtime.Shape} */ (
  825. jspb.Message.getWrapperField(this, proto.transit_realtime.Shape, 6));
  826. };
  827. /** @param {proto.transit_realtime.Shape|undefined} value */
  828. proto.transit_realtime.FeedEntity.prototype.setShape = function(value) {
  829. jspb.Message.setWrapperField(this, 6, value);
  830. };
  831. proto.transit_realtime.FeedEntity.prototype.clearShape = function() {
  832. this.setShape(undefined);
  833. };
  834. /**
  835. * Returns whether this field is set.
  836. * @return{!boolean}
  837. */
  838. proto.transit_realtime.FeedEntity.prototype.hasShape = function() {
  839. return jspb.Message.getField(this, 6) != null;
  840. };
  841. /**
  842. * The extensions registered with this message class. This is a map of
  843. * extension field number to fieldInfo object.
  844. *
  845. * For example:
  846. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  847. *
  848. * fieldName contains the JsCompiler renamed field name property so that it
  849. * works in OPTIMIZED mode.
  850. *
  851. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  852. */
  853. proto.transit_realtime.FeedEntity.extensions = {};
  854. /**
  855. * The extensions registered with this message class. This is a map of
  856. * extension field number to fieldInfo object.
  857. *
  858. * For example:
  859. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  860. *
  861. * fieldName contains the JsCompiler renamed field name property so that it
  862. * works in OPTIMIZED mode.
  863. *
  864. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  865. */
  866. proto.transit_realtime.FeedEntity.extensionsBinary = {};
  867. /**
  868. * Generated by JsPbCodeGenerator.
  869. * @param {Array=} opt_data Optional initial data array, typically from a
  870. * server response, or constructed directly in Javascript. The array is used
  871. * in place and becomes part of the constructed object. It is not cloned.
  872. * If no data is provided, the constructed object will be empty, but still
  873. * valid.
  874. * @extends {jspb.Message}
  875. * @constructor
  876. */
  877. proto.transit_realtime.TripUpdate = function(opt_data) {
  878. jspb.Message.initialize(this, opt_data, 0, 7, proto.transit_realtime.TripUpdate.repeatedFields_, null);
  879. };
  880. goog.inherits(proto.transit_realtime.TripUpdate, jspb.Message);
  881. if (goog.DEBUG && !COMPILED) {
  882. proto.transit_realtime.TripUpdate.displayName = 'proto.transit_realtime.TripUpdate';
  883. }
  884. /**
  885. * List of repeated fields within this message type.
  886. * @private {!Array<number>}
  887. * @const
  888. */
  889. proto.transit_realtime.TripUpdate.repeatedFields_ = [2];
  890. if (jspb.Message.GENERATE_TO_OBJECT) {
  891. /**
  892. * Creates an object representation of this proto suitable for use in Soy templates.
  893. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  894. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  895. * For the list of reserved names please see:
  896. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  897. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  898. * for transitional soy proto support: http://goto/soy-param-migration
  899. * @return {!Object}
  900. */
  901. proto.transit_realtime.TripUpdate.prototype.toObject = function(opt_includeInstance) {
  902. return proto.transit_realtime.TripUpdate.toObject(opt_includeInstance, this);
  903. };
  904. /**
  905. * Static version of the {@see toObject} method.
  906. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  907. * instance for transitional soy proto support:
  908. * http://goto/soy-param-migration
  909. * @param {!proto.transit_realtime.TripUpdate} msg The msg instance to transform.
  910. * @return {!Object}
  911. */
  912. proto.transit_realtime.TripUpdate.toObject = function(includeInstance, msg) {
  913. var f, obj = {
  914. trip: (f = msg.getTrip()) && proto.transit_realtime.TripDescriptor.toObject(includeInstance, f),
  915. vehicle: (f = msg.getVehicle()) && proto.transit_realtime.VehicleDescriptor.toObject(includeInstance, f),
  916. stopTimeUpdateList: jspb.Message.toObjectList(msg.getStopTimeUpdateList(),
  917. proto.transit_realtime.TripUpdate.StopTimeUpdate.toObject, includeInstance),
  918. timestamp: jspb.Message.getField(msg, 4),
  919. delay: jspb.Message.getField(msg, 5),
  920. tripProperties: (f = msg.getTripProperties()) && proto.transit_realtime.TripUpdate.TripProperties.toObject(includeInstance, f)
  921. };
  922. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  923. proto.transit_realtime.TripUpdate.extensions, proto.transit_realtime.TripUpdate.prototype.getExtension,
  924. includeInstance);
  925. if (includeInstance) {
  926. obj.$jspbMessageInstance = msg;
  927. }
  928. return obj;
  929. };
  930. }
  931. /**
  932. * Deserializes binary data (in protobuf wire format).
  933. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  934. * @return {!proto.transit_realtime.TripUpdate}
  935. */
  936. proto.transit_realtime.TripUpdate.deserializeBinary = function(bytes) {
  937. var reader = new jspb.BinaryReader(bytes);
  938. var msg = new proto.transit_realtime.TripUpdate;
  939. return proto.transit_realtime.TripUpdate.deserializeBinaryFromReader(msg, reader);
  940. };
  941. /**
  942. * Deserializes binary data (in protobuf wire format) from the
  943. * given reader into the given message object.
  944. * @param {!proto.transit_realtime.TripUpdate} msg The message object to deserialize into.
  945. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  946. * @return {!proto.transit_realtime.TripUpdate}
  947. */
  948. proto.transit_realtime.TripUpdate.deserializeBinaryFromReader = function(msg, reader) {
  949. while (reader.nextField()) {
  950. if (reader.isEndGroup()) {
  951. break;
  952. }
  953. var field = reader.getFieldNumber();
  954. switch (field) {
  955. case 1:
  956. var value = new proto.transit_realtime.TripDescriptor;
  957. reader.readMessage(value,proto.transit_realtime.TripDescriptor.deserializeBinaryFromReader);
  958. msg.setTrip(value);
  959. break;
  960. case 3:
  961. var value = new proto.transit_realtime.VehicleDescriptor;
  962. reader.readMessage(value,proto.transit_realtime.VehicleDescriptor.deserializeBinaryFromReader);
  963. msg.setVehicle(value);
  964. break;
  965. case 2:
  966. var value = new proto.transit_realtime.TripUpdate.StopTimeUpdate;
  967. reader.readMessage(value,proto.transit_realtime.TripUpdate.StopTimeUpdate.deserializeBinaryFromReader);
  968. msg.getStopTimeUpdateList().push(value);
  969. msg.setStopTimeUpdateList(msg.getStopTimeUpdateList());
  970. break;
  971. case 4:
  972. var value = /** @type {number} */ (reader.readUint64());
  973. msg.setTimestamp(value);
  974. break;
  975. case 5:
  976. var value = /** @type {number} */ (reader.readInt32());
  977. msg.setDelay(value);
  978. break;
  979. case 6:
  980. var value = new proto.transit_realtime.TripUpdate.TripProperties;
  981. reader.readMessage(value,proto.transit_realtime.TripUpdate.TripProperties.deserializeBinaryFromReader);
  982. msg.setTripProperties(value);
  983. break;
  984. default:
  985. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.TripUpdate.extensionsBinary,
  986. proto.transit_realtime.TripUpdate.prototype.getExtension,
  987. proto.transit_realtime.TripUpdate.prototype.setExtension);
  988. break;
  989. }
  990. }
  991. return msg;
  992. };
  993. /**
  994. * Class method variant: serializes the given message to binary data
  995. * (in protobuf wire format), writing to the given BinaryWriter.
  996. * @param {!proto.transit_realtime.TripUpdate} message
  997. * @param {!jspb.BinaryWriter} writer
  998. */
  999. proto.transit_realtime.TripUpdate.serializeBinaryToWriter = function(message, writer) {
  1000. message.serializeBinaryToWriter(writer);
  1001. };
  1002. /**
  1003. * Serializes the message to binary data (in protobuf wire format).
  1004. * @return {!Uint8Array}
  1005. */
  1006. proto.transit_realtime.TripUpdate.prototype.serializeBinary = function() {
  1007. var writer = new jspb.BinaryWriter();
  1008. this.serializeBinaryToWriter(writer);
  1009. return writer.getResultBuffer();
  1010. };
  1011. /**
  1012. * Serializes the message to binary data (in protobuf wire format),
  1013. * writing to the given BinaryWriter.
  1014. * @param {!jspb.BinaryWriter} writer
  1015. */
  1016. proto.transit_realtime.TripUpdate.prototype.serializeBinaryToWriter = function (writer) {
  1017. var f = undefined;
  1018. f = this.getTrip();
  1019. if (f != null) {
  1020. writer.writeMessage(
  1021. 1,
  1022. f,
  1023. proto.transit_realtime.TripDescriptor.serializeBinaryToWriter
  1024. );
  1025. }
  1026. f = this.getVehicle();
  1027. if (f != null) {
  1028. writer.writeMessage(
  1029. 3,
  1030. f,
  1031. proto.transit_realtime.VehicleDescriptor.serializeBinaryToWriter
  1032. );
  1033. }
  1034. f = this.getStopTimeUpdateList();
  1035. if (f.length > 0) {
  1036. writer.writeRepeatedMessage(
  1037. 2,
  1038. f,
  1039. proto.transit_realtime.TripUpdate.StopTimeUpdate.serializeBinaryToWriter
  1040. );
  1041. }
  1042. f = jspb.Message.getField(this, 4);
  1043. if (f != null) {
  1044. writer.writeUint64(
  1045. 4,
  1046. f
  1047. );
  1048. }
  1049. f = jspb.Message.getField(this, 5);
  1050. if (f != null) {
  1051. writer.writeInt32(
  1052. 5,
  1053. f
  1054. );
  1055. }
  1056. f = this.getTripProperties();
  1057. if (f != null) {
  1058. writer.writeMessage(
  1059. 6,
  1060. f,
  1061. proto.transit_realtime.TripUpdate.TripProperties.serializeBinaryToWriter
  1062. );
  1063. }
  1064. jspb.Message.serializeBinaryExtensions(this, writer,
  1065. proto.transit_realtime.TripUpdate.extensionsBinary, proto.transit_realtime.TripUpdate.prototype.getExtension);
  1066. };
  1067. /**
  1068. * Creates a deep clone of this proto. No data is shared with the original.
  1069. * @return {!proto.transit_realtime.TripUpdate} The clone.
  1070. */
  1071. proto.transit_realtime.TripUpdate.prototype.cloneMessage = function() {
  1072. return /** @type {!proto.transit_realtime.TripUpdate} */ (jspb.Message.cloneMessage(this));
  1073. };
  1074. /**
  1075. * required TripDescriptor trip = 1;
  1076. * @return {!proto.transit_realtime.TripDescriptor}
  1077. */
  1078. proto.transit_realtime.TripUpdate.prototype.getTrip = function() {
  1079. return /** @type{!proto.transit_realtime.TripDescriptor} */ (
  1080. jspb.Message.getWrapperField(this, proto.transit_realtime.TripDescriptor, 1, 1));
  1081. };
  1082. /** @param {proto.transit_realtime.TripDescriptor|undefined} value */
  1083. proto.transit_realtime.TripUpdate.prototype.setTrip = function(value) {
  1084. jspb.Message.setWrapperField(this, 1, value);
  1085. };
  1086. proto.transit_realtime.TripUpdate.prototype.clearTrip = function() {
  1087. this.setTrip(undefined);
  1088. };
  1089. /**
  1090. * Returns whether this field is set.
  1091. * @return{!boolean}
  1092. */
  1093. proto.transit_realtime.TripUpdate.prototype.hasTrip = function() {
  1094. return jspb.Message.getField(this, 1) != null;
  1095. };
  1096. /**
  1097. * optional VehicleDescriptor vehicle = 3;
  1098. * @return {proto.transit_realtime.VehicleDescriptor}
  1099. */
  1100. proto.transit_realtime.TripUpdate.prototype.getVehicle = function() {
  1101. return /** @type{proto.transit_realtime.VehicleDescriptor} */ (
  1102. jspb.Message.getWrapperField(this, proto.transit_realtime.VehicleDescriptor, 3));
  1103. };
  1104. /** @param {proto.transit_realtime.VehicleDescriptor|undefined} value */
  1105. proto.transit_realtime.TripUpdate.prototype.setVehicle = function(value) {
  1106. jspb.Message.setWrapperField(this, 3, value);
  1107. };
  1108. proto.transit_realtime.TripUpdate.prototype.clearVehicle = function() {
  1109. this.setVehicle(undefined);
  1110. };
  1111. /**
  1112. * Returns whether this field is set.
  1113. * @return{!boolean}
  1114. */
  1115. proto.transit_realtime.TripUpdate.prototype.hasVehicle = function() {
  1116. return jspb.Message.getField(this, 3) != null;
  1117. };
  1118. /**
  1119. * repeated StopTimeUpdate stop_time_update = 2;
  1120. * If you change this array by adding, removing or replacing elements, or if you
  1121. * replace the array itself, then you must call the setter to update it.
  1122. * @return {!Array.<!proto.transit_realtime.TripUpdate.StopTimeUpdate>}
  1123. */
  1124. proto.transit_realtime.TripUpdate.prototype.getStopTimeUpdateList = function() {
  1125. return /** @type{!Array.<!proto.transit_realtime.TripUpdate.StopTimeUpdate>} */ (
  1126. jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.TripUpdate.StopTimeUpdate, 2));
  1127. };
  1128. /** @param {Array.<!proto.transit_realtime.TripUpdate.StopTimeUpdate>} value */
  1129. proto.transit_realtime.TripUpdate.prototype.setStopTimeUpdateList = function(value) {
  1130. jspb.Message.setRepeatedWrapperField(this, 2, value);
  1131. };
  1132. proto.transit_realtime.TripUpdate.prototype.clearStopTimeUpdateList = function() {
  1133. this.setStopTimeUpdateList([]);
  1134. };
  1135. /**
  1136. * optional uint64 timestamp = 4;
  1137. * @return {number}
  1138. */
  1139. proto.transit_realtime.TripUpdate.prototype.getTimestamp = function() {
  1140. return /** @type {number} */ (!this.hasTimestamp() ? 0 : jspb.Message.getField(this, 4));
  1141. };
  1142. /** @param {number?|undefined} value */
  1143. proto.transit_realtime.TripUpdate.prototype.setTimestamp = function(value) {
  1144. jspb.Message.setField(this, 4, value);
  1145. };
  1146. proto.transit_realtime.TripUpdate.prototype.clearTimestamp = function() {
  1147. jspb.Message.setField(this, 4, undefined);
  1148. };
  1149. /**
  1150. * Returns whether this field is set.
  1151. * @return{!boolean}
  1152. */
  1153. proto.transit_realtime.TripUpdate.prototype.hasTimestamp = function() {
  1154. return jspb.Message.getField(this, 4) != null;
  1155. };
  1156. /**
  1157. * optional int32 delay = 5;
  1158. * @return {number}
  1159. */
  1160. proto.transit_realtime.TripUpdate.prototype.getDelay = function() {
  1161. return /** @type {number} */ (!this.hasDelay() ? 0 : jspb.Message.getField(this, 5));
  1162. };
  1163. /** @param {number?|undefined} value */
  1164. proto.transit_realtime.TripUpdate.prototype.setDelay = function(value) {
  1165. jspb.Message.setField(this, 5, value);
  1166. };
  1167. proto.transit_realtime.TripUpdate.prototype.clearDelay = function() {
  1168. jspb.Message.setField(this, 5, undefined);
  1169. };
  1170. /**
  1171. * Returns whether this field is set.
  1172. * @return{!boolean}
  1173. */
  1174. proto.transit_realtime.TripUpdate.prototype.hasDelay = function() {
  1175. return jspb.Message.getField(this, 5) != null;
  1176. };
  1177. /**
  1178. * optional TripProperties trip_properties = 6;
  1179. * @return {proto.transit_realtime.TripUpdate.TripProperties}
  1180. */
  1181. proto.transit_realtime.TripUpdate.prototype.getTripProperties = function() {
  1182. return /** @type{proto.transit_realtime.TripUpdate.TripProperties} */ (
  1183. jspb.Message.getWrapperField(this, proto.transit_realtime.TripUpdate.TripProperties, 6));
  1184. };
  1185. /** @param {proto.transit_realtime.TripUpdate.TripProperties|undefined} value */
  1186. proto.transit_realtime.TripUpdate.prototype.setTripProperties = function(value) {
  1187. jspb.Message.setWrapperField(this, 6, value);
  1188. };
  1189. proto.transit_realtime.TripUpdate.prototype.clearTripProperties = function() {
  1190. this.setTripProperties(undefined);
  1191. };
  1192. /**
  1193. * Returns whether this field is set.
  1194. * @return{!boolean}
  1195. */
  1196. proto.transit_realtime.TripUpdate.prototype.hasTripProperties = function() {
  1197. return jspb.Message.getField(this, 6) != null;
  1198. };
  1199. /**
  1200. * The extensions registered with this message class. This is a map of
  1201. * extension field number to fieldInfo object.
  1202. *
  1203. * For example:
  1204. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  1205. *
  1206. * fieldName contains the JsCompiler renamed field name property so that it
  1207. * works in OPTIMIZED mode.
  1208. *
  1209. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  1210. */
  1211. proto.transit_realtime.TripUpdate.extensions = {};
  1212. /**
  1213. * The extensions registered with this message class. This is a map of
  1214. * extension field number to fieldInfo object.
  1215. *
  1216. * For example:
  1217. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  1218. *
  1219. * fieldName contains the JsCompiler renamed field name property so that it
  1220. * works in OPTIMIZED mode.
  1221. *
  1222. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  1223. */
  1224. proto.transit_realtime.TripUpdate.extensionsBinary = {};
  1225. /**
  1226. * Generated by JsPbCodeGenerator.
  1227. * @param {Array=} opt_data Optional initial data array, typically from a
  1228. * server response, or constructed directly in Javascript. The array is used
  1229. * in place and becomes part of the constructed object. It is not cloned.
  1230. * If no data is provided, the constructed object will be empty, but still
  1231. * valid.
  1232. * @extends {jspb.Message}
  1233. * @constructor
  1234. */
  1235. proto.transit_realtime.TripUpdate.StopTimeEvent = function(opt_data) {
  1236. jspb.Message.initialize(this, opt_data, 0, 4, null, null);
  1237. };
  1238. goog.inherits(proto.transit_realtime.TripUpdate.StopTimeEvent, jspb.Message);
  1239. if (goog.DEBUG && !COMPILED) {
  1240. proto.transit_realtime.TripUpdate.StopTimeEvent.displayName = 'proto.transit_realtime.TripUpdate.StopTimeEvent';
  1241. }
  1242. if (jspb.Message.GENERATE_TO_OBJECT) {
  1243. /**
  1244. * Creates an object representation of this proto suitable for use in Soy templates.
  1245. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1246. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1247. * For the list of reserved names please see:
  1248. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  1249. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  1250. * for transitional soy proto support: http://goto/soy-param-migration
  1251. * @return {!Object}
  1252. */
  1253. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.toObject = function(opt_includeInstance) {
  1254. return proto.transit_realtime.TripUpdate.StopTimeEvent.toObject(opt_includeInstance, this);
  1255. };
  1256. /**
  1257. * Static version of the {@see toObject} method.
  1258. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  1259. * instance for transitional soy proto support:
  1260. * http://goto/soy-param-migration
  1261. * @param {!proto.transit_realtime.TripUpdate.StopTimeEvent} msg The msg instance to transform.
  1262. * @return {!Object}
  1263. */
  1264. proto.transit_realtime.TripUpdate.StopTimeEvent.toObject = function(includeInstance, msg) {
  1265. var f, obj = {
  1266. delay: jspb.Message.getField(msg, 1),
  1267. time: jspb.Message.getField(msg, 2),
  1268. uncertainty: jspb.Message.getField(msg, 3)
  1269. };
  1270. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  1271. proto.transit_realtime.TripUpdate.StopTimeEvent.extensions, proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.getExtension,
  1272. includeInstance);
  1273. if (includeInstance) {
  1274. obj.$jspbMessageInstance = msg;
  1275. }
  1276. return obj;
  1277. };
  1278. }
  1279. /**
  1280. * Deserializes binary data (in protobuf wire format).
  1281. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1282. * @return {!proto.transit_realtime.TripUpdate.StopTimeEvent}
  1283. */
  1284. proto.transit_realtime.TripUpdate.StopTimeEvent.deserializeBinary = function(bytes) {
  1285. var reader = new jspb.BinaryReader(bytes);
  1286. var msg = new proto.transit_realtime.TripUpdate.StopTimeEvent;
  1287. return proto.transit_realtime.TripUpdate.StopTimeEvent.deserializeBinaryFromReader(msg, reader);
  1288. };
  1289. /**
  1290. * Deserializes binary data (in protobuf wire format) from the
  1291. * given reader into the given message object.
  1292. * @param {!proto.transit_realtime.TripUpdate.StopTimeEvent} msg The message object to deserialize into.
  1293. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1294. * @return {!proto.transit_realtime.TripUpdate.StopTimeEvent}
  1295. */
  1296. proto.transit_realtime.TripUpdate.StopTimeEvent.deserializeBinaryFromReader = function(msg, reader) {
  1297. while (reader.nextField()) {
  1298. if (reader.isEndGroup()) {
  1299. break;
  1300. }
  1301. var field = reader.getFieldNumber();
  1302. switch (field) {
  1303. case 1:
  1304. var value = /** @type {number} */ (reader.readInt32());
  1305. msg.setDelay(value);
  1306. break;
  1307. case 2:
  1308. var value = /** @type {number} */ (reader.readInt64());
  1309. msg.setTime(value);
  1310. break;
  1311. case 3:
  1312. var value = /** @type {number} */ (reader.readInt32());
  1313. msg.setUncertainty(value);
  1314. break;
  1315. default:
  1316. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.TripUpdate.StopTimeEvent.extensionsBinary,
  1317. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.getExtension,
  1318. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.setExtension);
  1319. break;
  1320. }
  1321. }
  1322. return msg;
  1323. };
  1324. /**
  1325. * Class method variant: serializes the given message to binary data
  1326. * (in protobuf wire format), writing to the given BinaryWriter.
  1327. * @param {!proto.transit_realtime.TripUpdate.StopTimeEvent} message
  1328. * @param {!jspb.BinaryWriter} writer
  1329. */
  1330. proto.transit_realtime.TripUpdate.StopTimeEvent.serializeBinaryToWriter = function(message, writer) {
  1331. message.serializeBinaryToWriter(writer);
  1332. };
  1333. /**
  1334. * Serializes the message to binary data (in protobuf wire format).
  1335. * @return {!Uint8Array}
  1336. */
  1337. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.serializeBinary = function() {
  1338. var writer = new jspb.BinaryWriter();
  1339. this.serializeBinaryToWriter(writer);
  1340. return writer.getResultBuffer();
  1341. };
  1342. /**
  1343. * Serializes the message to binary data (in protobuf wire format),
  1344. * writing to the given BinaryWriter.
  1345. * @param {!jspb.BinaryWriter} writer
  1346. */
  1347. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.serializeBinaryToWriter = function (writer) {
  1348. var f = undefined;
  1349. f = jspb.Message.getField(this, 1);
  1350. if (f != null) {
  1351. writer.writeInt32(
  1352. 1,
  1353. f
  1354. );
  1355. }
  1356. f = jspb.Message.getField(this, 2);
  1357. if (f != null) {
  1358. writer.writeInt64(
  1359. 2,
  1360. f
  1361. );
  1362. }
  1363. f = jspb.Message.getField(this, 3);
  1364. if (f != null) {
  1365. writer.writeInt32(
  1366. 3,
  1367. f
  1368. );
  1369. }
  1370. jspb.Message.serializeBinaryExtensions(this, writer,
  1371. proto.transit_realtime.TripUpdate.StopTimeEvent.extensionsBinary, proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.getExtension);
  1372. };
  1373. /**
  1374. * Creates a deep clone of this proto. No data is shared with the original.
  1375. * @return {!proto.transit_realtime.TripUpdate.StopTimeEvent} The clone.
  1376. */
  1377. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.cloneMessage = function() {
  1378. return /** @type {!proto.transit_realtime.TripUpdate.StopTimeEvent} */ (jspb.Message.cloneMessage(this));
  1379. };
  1380. /**
  1381. * optional int32 delay = 1;
  1382. * @return {number}
  1383. */
  1384. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.getDelay = function() {
  1385. return /** @type {number} */ (!this.hasDelay() ? 0 : jspb.Message.getField(this, 1));
  1386. };
  1387. /** @param {number?|undefined} value */
  1388. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.setDelay = function(value) {
  1389. jspb.Message.setField(this, 1, value);
  1390. };
  1391. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.clearDelay = function() {
  1392. jspb.Message.setField(this, 1, undefined);
  1393. };
  1394. /**
  1395. * Returns whether this field is set.
  1396. * @return{!boolean}
  1397. */
  1398. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.hasDelay = function() {
  1399. return jspb.Message.getField(this, 1) != null;
  1400. };
  1401. /**
  1402. * optional int64 time = 2;
  1403. * @return {number}
  1404. */
  1405. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.getTime = function() {
  1406. return /** @type {number} */ (!this.hasTime() ? 0 : jspb.Message.getField(this, 2));
  1407. };
  1408. /** @param {number?|undefined} value */
  1409. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.setTime = function(value) {
  1410. jspb.Message.setField(this, 2, value);
  1411. };
  1412. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.clearTime = function() {
  1413. jspb.Message.setField(this, 2, undefined);
  1414. };
  1415. /**
  1416. * Returns whether this field is set.
  1417. * @return{!boolean}
  1418. */
  1419. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.hasTime = function() {
  1420. return jspb.Message.getField(this, 2) != null;
  1421. };
  1422. /**
  1423. * optional int32 uncertainty = 3;
  1424. * @return {number}
  1425. */
  1426. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.getUncertainty = function() {
  1427. return /** @type {number} */ (!this.hasUncertainty() ? 0 : jspb.Message.getField(this, 3));
  1428. };
  1429. /** @param {number?|undefined} value */
  1430. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.setUncertainty = function(value) {
  1431. jspb.Message.setField(this, 3, value);
  1432. };
  1433. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.clearUncertainty = function() {
  1434. jspb.Message.setField(this, 3, undefined);
  1435. };
  1436. /**
  1437. * Returns whether this field is set.
  1438. * @return{!boolean}
  1439. */
  1440. proto.transit_realtime.TripUpdate.StopTimeEvent.prototype.hasUncertainty = function() {
  1441. return jspb.Message.getField(this, 3) != null;
  1442. };
  1443. /**
  1444. * The extensions registered with this message class. This is a map of
  1445. * extension field number to fieldInfo object.
  1446. *
  1447. * For example:
  1448. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  1449. *
  1450. * fieldName contains the JsCompiler renamed field name property so that it
  1451. * works in OPTIMIZED mode.
  1452. *
  1453. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  1454. */
  1455. proto.transit_realtime.TripUpdate.StopTimeEvent.extensions = {};
  1456. /**
  1457. * The extensions registered with this message class. This is a map of
  1458. * extension field number to fieldInfo object.
  1459. *
  1460. * For example:
  1461. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  1462. *
  1463. * fieldName contains the JsCompiler renamed field name property so that it
  1464. * works in OPTIMIZED mode.
  1465. *
  1466. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  1467. */
  1468. proto.transit_realtime.TripUpdate.StopTimeEvent.extensionsBinary = {};
  1469. /**
  1470. * Generated by JsPbCodeGenerator.
  1471. * @param {Array=} opt_data Optional initial data array, typically from a
  1472. * server response, or constructed directly in Javascript. The array is used
  1473. * in place and becomes part of the constructed object. It is not cloned.
  1474. * If no data is provided, the constructed object will be empty, but still
  1475. * valid.
  1476. * @extends {jspb.Message}
  1477. * @constructor
  1478. */
  1479. proto.transit_realtime.TripUpdate.StopTimeUpdate = function(opt_data) {
  1480. jspb.Message.initialize(this, opt_data, 0, 8, null, null);
  1481. };
  1482. goog.inherits(proto.transit_realtime.TripUpdate.StopTimeUpdate, jspb.Message);
  1483. if (goog.DEBUG && !COMPILED) {
  1484. proto.transit_realtime.TripUpdate.StopTimeUpdate.displayName = 'proto.transit_realtime.TripUpdate.StopTimeUpdate';
  1485. }
  1486. if (jspb.Message.GENERATE_TO_OBJECT) {
  1487. /**
  1488. * Creates an object representation of this proto suitable for use in Soy templates.
  1489. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1490. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1491. * For the list of reserved names please see:
  1492. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  1493. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  1494. * for transitional soy proto support: http://goto/soy-param-migration
  1495. * @return {!Object}
  1496. */
  1497. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.toObject = function(opt_includeInstance) {
  1498. return proto.transit_realtime.TripUpdate.StopTimeUpdate.toObject(opt_includeInstance, this);
  1499. };
  1500. /**
  1501. * Static version of the {@see toObject} method.
  1502. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  1503. * instance for transitional soy proto support:
  1504. * http://goto/soy-param-migration
  1505. * @param {!proto.transit_realtime.TripUpdate.StopTimeUpdate} msg The msg instance to transform.
  1506. * @return {!Object}
  1507. */
  1508. proto.transit_realtime.TripUpdate.StopTimeUpdate.toObject = function(includeInstance, msg) {
  1509. var f, obj = {
  1510. stopSequence: jspb.Message.getField(msg, 1),
  1511. stopId: jspb.Message.getField(msg, 4),
  1512. arrival: (f = msg.getArrival()) && proto.transit_realtime.TripUpdate.StopTimeEvent.toObject(includeInstance, f),
  1513. departure: (f = msg.getDeparture()) && proto.transit_realtime.TripUpdate.StopTimeEvent.toObject(includeInstance, f),
  1514. departureOccupancyStatus: jspb.Message.getField(msg, 7),
  1515. scheduleRelationship: !msg.hasScheduleRelationship() ? 0 : jspb.Message.getField(msg, 5),
  1516. stopTimeProperties: (f = msg.getStopTimeProperties()) && proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.toObject(includeInstance, f)
  1517. };
  1518. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  1519. proto.transit_realtime.TripUpdate.StopTimeUpdate.extensions, proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getExtension,
  1520. includeInstance);
  1521. if (includeInstance) {
  1522. obj.$jspbMessageInstance = msg;
  1523. }
  1524. return obj;
  1525. };
  1526. }
  1527. /**
  1528. * Deserializes binary data (in protobuf wire format).
  1529. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1530. * @return {!proto.transit_realtime.TripUpdate.StopTimeUpdate}
  1531. */
  1532. proto.transit_realtime.TripUpdate.StopTimeUpdate.deserializeBinary = function(bytes) {
  1533. var reader = new jspb.BinaryReader(bytes);
  1534. var msg = new proto.transit_realtime.TripUpdate.StopTimeUpdate;
  1535. return proto.transit_realtime.TripUpdate.StopTimeUpdate.deserializeBinaryFromReader(msg, reader);
  1536. };
  1537. /**
  1538. * Deserializes binary data (in protobuf wire format) from the
  1539. * given reader into the given message object.
  1540. * @param {!proto.transit_realtime.TripUpdate.StopTimeUpdate} msg The message object to deserialize into.
  1541. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1542. * @return {!proto.transit_realtime.TripUpdate.StopTimeUpdate}
  1543. */
  1544. proto.transit_realtime.TripUpdate.StopTimeUpdate.deserializeBinaryFromReader = function(msg, reader) {
  1545. while (reader.nextField()) {
  1546. if (reader.isEndGroup()) {
  1547. break;
  1548. }
  1549. var field = reader.getFieldNumber();
  1550. switch (field) {
  1551. case 1:
  1552. var value = /** @type {number} */ (reader.readUint32());
  1553. msg.setStopSequence(value);
  1554. break;
  1555. case 4:
  1556. var value = /** @type {string} */ (reader.readString());
  1557. msg.setStopId(value);
  1558. break;
  1559. case 2:
  1560. var value = new proto.transit_realtime.TripUpdate.StopTimeEvent;
  1561. reader.readMessage(value,proto.transit_realtime.TripUpdate.StopTimeEvent.deserializeBinaryFromReader);
  1562. msg.setArrival(value);
  1563. break;
  1564. case 3:
  1565. var value = new proto.transit_realtime.TripUpdate.StopTimeEvent;
  1566. reader.readMessage(value,proto.transit_realtime.TripUpdate.StopTimeEvent.deserializeBinaryFromReader);
  1567. msg.setDeparture(value);
  1568. break;
  1569. case 7:
  1570. var value = /** @type {!proto.transit_realtime.VehiclePosition.OccupancyStatus} */ (reader.readEnum());
  1571. msg.setDepartureOccupancyStatus(value);
  1572. break;
  1573. case 5:
  1574. var value = /** @type {!proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship} */ (reader.readEnum());
  1575. msg.setScheduleRelationship(value);
  1576. break;
  1577. case 6:
  1578. var value = new proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties;
  1579. reader.readMessage(value,proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.deserializeBinaryFromReader);
  1580. msg.setStopTimeProperties(value);
  1581. break;
  1582. default:
  1583. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.TripUpdate.StopTimeUpdate.extensionsBinary,
  1584. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getExtension,
  1585. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setExtension);
  1586. break;
  1587. }
  1588. }
  1589. return msg;
  1590. };
  1591. /**
  1592. * Class method variant: serializes the given message to binary data
  1593. * (in protobuf wire format), writing to the given BinaryWriter.
  1594. * @param {!proto.transit_realtime.TripUpdate.StopTimeUpdate} message
  1595. * @param {!jspb.BinaryWriter} writer
  1596. */
  1597. proto.transit_realtime.TripUpdate.StopTimeUpdate.serializeBinaryToWriter = function(message, writer) {
  1598. message.serializeBinaryToWriter(writer);
  1599. };
  1600. /**
  1601. * Serializes the message to binary data (in protobuf wire format).
  1602. * @return {!Uint8Array}
  1603. */
  1604. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.serializeBinary = function() {
  1605. var writer = new jspb.BinaryWriter();
  1606. this.serializeBinaryToWriter(writer);
  1607. return writer.getResultBuffer();
  1608. };
  1609. /**
  1610. * Serializes the message to binary data (in protobuf wire format),
  1611. * writing to the given BinaryWriter.
  1612. * @param {!jspb.BinaryWriter} writer
  1613. */
  1614. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.serializeBinaryToWriter = function (writer) {
  1615. var f = undefined;
  1616. f = jspb.Message.getField(this, 1);
  1617. if (f != null) {
  1618. writer.writeUint32(
  1619. 1,
  1620. f
  1621. );
  1622. }
  1623. f = jspb.Message.getField(this, 4);
  1624. if (f != null) {
  1625. writer.writeString(
  1626. 4,
  1627. f
  1628. );
  1629. }
  1630. f = this.getArrival();
  1631. if (f != null) {
  1632. writer.writeMessage(
  1633. 2,
  1634. f,
  1635. proto.transit_realtime.TripUpdate.StopTimeEvent.serializeBinaryToWriter
  1636. );
  1637. }
  1638. f = this.getDeparture();
  1639. if (f != null) {
  1640. writer.writeMessage(
  1641. 3,
  1642. f,
  1643. proto.transit_realtime.TripUpdate.StopTimeEvent.serializeBinaryToWriter
  1644. );
  1645. }
  1646. f = jspb.Message.getField(this, 7);
  1647. if (f != null) {
  1648. writer.writeEnum(
  1649. 7,
  1650. f
  1651. );
  1652. }
  1653. f = jspb.Message.getField(this, 5);
  1654. if (f != null) {
  1655. writer.writeEnum(
  1656. 5,
  1657. f
  1658. );
  1659. }
  1660. f = this.getStopTimeProperties();
  1661. if (f != null) {
  1662. writer.writeMessage(
  1663. 6,
  1664. f,
  1665. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.serializeBinaryToWriter
  1666. );
  1667. }
  1668. jspb.Message.serializeBinaryExtensions(this, writer,
  1669. proto.transit_realtime.TripUpdate.StopTimeUpdate.extensionsBinary, proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getExtension);
  1670. };
  1671. /**
  1672. * Creates a deep clone of this proto. No data is shared with the original.
  1673. * @return {!proto.transit_realtime.TripUpdate.StopTimeUpdate} The clone.
  1674. */
  1675. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.cloneMessage = function() {
  1676. return /** @type {!proto.transit_realtime.TripUpdate.StopTimeUpdate} */ (jspb.Message.cloneMessage(this));
  1677. };
  1678. /**
  1679. * optional uint32 stop_sequence = 1;
  1680. * @return {number}
  1681. */
  1682. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getStopSequence = function() {
  1683. return /** @type {number} */ (!this.hasStopSequence() ? 0 : jspb.Message.getField(this, 1));
  1684. };
  1685. /** @param {number?|undefined} value */
  1686. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setStopSequence = function(value) {
  1687. jspb.Message.setField(this, 1, value);
  1688. };
  1689. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearStopSequence = function() {
  1690. jspb.Message.setField(this, 1, undefined);
  1691. };
  1692. /**
  1693. * Returns whether this field is set.
  1694. * @return{!boolean}
  1695. */
  1696. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasStopSequence = function() {
  1697. return jspb.Message.getField(this, 1) != null;
  1698. };
  1699. /**
  1700. * optional string stop_id = 4;
  1701. * @return {string}
  1702. */
  1703. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getStopId = function() {
  1704. return /** @type {string} */ (!this.hasStopId() ? "" : jspb.Message.getField(this, 4));
  1705. };
  1706. /** @param {string?|undefined} value */
  1707. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setStopId = function(value) {
  1708. jspb.Message.setField(this, 4, value);
  1709. };
  1710. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearStopId = function() {
  1711. jspb.Message.setField(this, 4, undefined);
  1712. };
  1713. /**
  1714. * Returns whether this field is set.
  1715. * @return{!boolean}
  1716. */
  1717. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasStopId = function() {
  1718. return jspb.Message.getField(this, 4) != null;
  1719. };
  1720. /**
  1721. * optional StopTimeEvent arrival = 2;
  1722. * @return {proto.transit_realtime.TripUpdate.StopTimeEvent}
  1723. */
  1724. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getArrival = function() {
  1725. return /** @type{proto.transit_realtime.TripUpdate.StopTimeEvent} */ (
  1726. jspb.Message.getWrapperField(this, proto.transit_realtime.TripUpdate.StopTimeEvent, 2));
  1727. };
  1728. /** @param {proto.transit_realtime.TripUpdate.StopTimeEvent|undefined} value */
  1729. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setArrival = function(value) {
  1730. jspb.Message.setWrapperField(this, 2, value);
  1731. };
  1732. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearArrival = function() {
  1733. this.setArrival(undefined);
  1734. };
  1735. /**
  1736. * Returns whether this field is set.
  1737. * @return{!boolean}
  1738. */
  1739. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasArrival = function() {
  1740. return jspb.Message.getField(this, 2) != null;
  1741. };
  1742. /**
  1743. * optional StopTimeEvent departure = 3;
  1744. * @return {proto.transit_realtime.TripUpdate.StopTimeEvent}
  1745. */
  1746. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getDeparture = function() {
  1747. return /** @type{proto.transit_realtime.TripUpdate.StopTimeEvent} */ (
  1748. jspb.Message.getWrapperField(this, proto.transit_realtime.TripUpdate.StopTimeEvent, 3));
  1749. };
  1750. /** @param {proto.transit_realtime.TripUpdate.StopTimeEvent|undefined} value */
  1751. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setDeparture = function(value) {
  1752. jspb.Message.setWrapperField(this, 3, value);
  1753. };
  1754. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearDeparture = function() {
  1755. this.setDeparture(undefined);
  1756. };
  1757. /**
  1758. * Returns whether this field is set.
  1759. * @return{!boolean}
  1760. */
  1761. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasDeparture = function() {
  1762. return jspb.Message.getField(this, 3) != null;
  1763. };
  1764. /**
  1765. * optional VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
  1766. * @return {proto.transit_realtime.VehiclePosition.OccupancyStatus}
  1767. */
  1768. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getDepartureOccupancyStatus = function() {
  1769. return /** @type {proto.transit_realtime.VehiclePosition.OccupancyStatus} */ (!this.hasDepartureOccupancyStatus() ? 0 : jspb.Message.getField(this, 7));
  1770. };
  1771. /** @param {proto.transit_realtime.VehiclePosition.OccupancyStatus|undefined} value */
  1772. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setDepartureOccupancyStatus = function(value) {
  1773. jspb.Message.setField(this, 7, value);
  1774. };
  1775. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearDepartureOccupancyStatus = function() {
  1776. jspb.Message.setField(this, 7, undefined);
  1777. };
  1778. /**
  1779. * Returns whether this field is set.
  1780. * @return{!boolean}
  1781. */
  1782. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasDepartureOccupancyStatus = function() {
  1783. return jspb.Message.getField(this, 7) != null;
  1784. };
  1785. /**
  1786. * optional ScheduleRelationship schedule_relationship = 5;
  1787. * @return {proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship}
  1788. */
  1789. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getScheduleRelationship = function() {
  1790. return /** @type {proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship} */ (!this.hasScheduleRelationship() ? 0 : jspb.Message.getField(this, 5));
  1791. };
  1792. /** @param {proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship|undefined} value */
  1793. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setScheduleRelationship = function(value) {
  1794. jspb.Message.setField(this, 5, value);
  1795. };
  1796. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearScheduleRelationship = function() {
  1797. jspb.Message.setField(this, 5, undefined);
  1798. };
  1799. /**
  1800. * Returns whether this field is set.
  1801. * @return{!boolean}
  1802. */
  1803. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasScheduleRelationship = function() {
  1804. return jspb.Message.getField(this, 5) != null;
  1805. };
  1806. /**
  1807. * optional StopTimeProperties stop_time_properties = 6;
  1808. * @return {proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties}
  1809. */
  1810. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.getStopTimeProperties = function() {
  1811. return /** @type{proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties} */ (
  1812. jspb.Message.getWrapperField(this, proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties, 6));
  1813. };
  1814. /** @param {proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties|undefined} value */
  1815. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.setStopTimeProperties = function(value) {
  1816. jspb.Message.setWrapperField(this, 6, value);
  1817. };
  1818. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.clearStopTimeProperties = function() {
  1819. this.setStopTimeProperties(undefined);
  1820. };
  1821. /**
  1822. * Returns whether this field is set.
  1823. * @return{!boolean}
  1824. */
  1825. proto.transit_realtime.TripUpdate.StopTimeUpdate.prototype.hasStopTimeProperties = function() {
  1826. return jspb.Message.getField(this, 6) != null;
  1827. };
  1828. /**
  1829. * The extensions registered with this message class. This is a map of
  1830. * extension field number to fieldInfo object.
  1831. *
  1832. * For example:
  1833. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  1834. *
  1835. * fieldName contains the JsCompiler renamed field name property so that it
  1836. * works in OPTIMIZED mode.
  1837. *
  1838. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  1839. */
  1840. proto.transit_realtime.TripUpdate.StopTimeUpdate.extensions = {};
  1841. /**
  1842. * The extensions registered with this message class. This is a map of
  1843. * extension field number to fieldInfo object.
  1844. *
  1845. * For example:
  1846. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  1847. *
  1848. * fieldName contains the JsCompiler renamed field name property so that it
  1849. * works in OPTIMIZED mode.
  1850. *
  1851. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  1852. */
  1853. proto.transit_realtime.TripUpdate.StopTimeUpdate.extensionsBinary = {};
  1854. /**
  1855. * @enum {number}
  1856. */
  1857. proto.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship = {
  1858. SCHEDULED: 0,
  1859. SKIPPED: 1,
  1860. NO_DATA: 2,
  1861. UNSCHEDULED: 3
  1862. };
  1863. /**
  1864. * Generated by JsPbCodeGenerator.
  1865. * @param {Array=} opt_data Optional initial data array, typically from a
  1866. * server response, or constructed directly in Javascript. The array is used
  1867. * in place and becomes part of the constructed object. It is not cloned.
  1868. * If no data is provided, the constructed object will be empty, but still
  1869. * valid.
  1870. * @extends {jspb.Message}
  1871. * @constructor
  1872. */
  1873. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties = function(opt_data) {
  1874. jspb.Message.initialize(this, opt_data, 0, 2, null, null);
  1875. };
  1876. goog.inherits(proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties, jspb.Message);
  1877. if (goog.DEBUG && !COMPILED) {
  1878. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.displayName = 'proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties';
  1879. }
  1880. if (jspb.Message.GENERATE_TO_OBJECT) {
  1881. /**
  1882. * Creates an object representation of this proto suitable for use in Soy templates.
  1883. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  1884. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  1885. * For the list of reserved names please see:
  1886. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  1887. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  1888. * for transitional soy proto support: http://goto/soy-param-migration
  1889. * @return {!Object}
  1890. */
  1891. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.toObject = function(opt_includeInstance) {
  1892. return proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.toObject(opt_includeInstance, this);
  1893. };
  1894. /**
  1895. * Static version of the {@see toObject} method.
  1896. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  1897. * instance for transitional soy proto support:
  1898. * http://goto/soy-param-migration
  1899. * @param {!proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties} msg The msg instance to transform.
  1900. * @return {!Object}
  1901. */
  1902. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.toObject = function(includeInstance, msg) {
  1903. var f, obj = {
  1904. assignedStopId: jspb.Message.getField(msg, 1)
  1905. };
  1906. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  1907. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.extensions, proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.getExtension,
  1908. includeInstance);
  1909. if (includeInstance) {
  1910. obj.$jspbMessageInstance = msg;
  1911. }
  1912. return obj;
  1913. };
  1914. }
  1915. /**
  1916. * Deserializes binary data (in protobuf wire format).
  1917. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  1918. * @return {!proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties}
  1919. */
  1920. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.deserializeBinary = function(bytes) {
  1921. var reader = new jspb.BinaryReader(bytes);
  1922. var msg = new proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties;
  1923. return proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.deserializeBinaryFromReader(msg, reader);
  1924. };
  1925. /**
  1926. * Deserializes binary data (in protobuf wire format) from the
  1927. * given reader into the given message object.
  1928. * @param {!proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties} msg The message object to deserialize into.
  1929. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  1930. * @return {!proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties}
  1931. */
  1932. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.deserializeBinaryFromReader = function(msg, reader) {
  1933. while (reader.nextField()) {
  1934. if (reader.isEndGroup()) {
  1935. break;
  1936. }
  1937. var field = reader.getFieldNumber();
  1938. switch (field) {
  1939. case 1:
  1940. var value = /** @type {string} */ (reader.readString());
  1941. msg.setAssignedStopId(value);
  1942. break;
  1943. default:
  1944. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.extensionsBinary,
  1945. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.getExtension,
  1946. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.setExtension);
  1947. break;
  1948. }
  1949. }
  1950. return msg;
  1951. };
  1952. /**
  1953. * Class method variant: serializes the given message to binary data
  1954. * (in protobuf wire format), writing to the given BinaryWriter.
  1955. * @param {!proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties} message
  1956. * @param {!jspb.BinaryWriter} writer
  1957. */
  1958. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.serializeBinaryToWriter = function(message, writer) {
  1959. message.serializeBinaryToWriter(writer);
  1960. };
  1961. /**
  1962. * Serializes the message to binary data (in protobuf wire format).
  1963. * @return {!Uint8Array}
  1964. */
  1965. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.serializeBinary = function() {
  1966. var writer = new jspb.BinaryWriter();
  1967. this.serializeBinaryToWriter(writer);
  1968. return writer.getResultBuffer();
  1969. };
  1970. /**
  1971. * Serializes the message to binary data (in protobuf wire format),
  1972. * writing to the given BinaryWriter.
  1973. * @param {!jspb.BinaryWriter} writer
  1974. */
  1975. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.serializeBinaryToWriter = function (writer) {
  1976. var f = undefined;
  1977. f = jspb.Message.getField(this, 1);
  1978. if (f != null) {
  1979. writer.writeString(
  1980. 1,
  1981. f
  1982. );
  1983. }
  1984. jspb.Message.serializeBinaryExtensions(this, writer,
  1985. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.extensionsBinary, proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.getExtension);
  1986. };
  1987. /**
  1988. * Creates a deep clone of this proto. No data is shared with the original.
  1989. * @return {!proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties} The clone.
  1990. */
  1991. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.cloneMessage = function() {
  1992. return /** @type {!proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties} */ (jspb.Message.cloneMessage(this));
  1993. };
  1994. /**
  1995. * optional string assigned_stop_id = 1;
  1996. * @return {string}
  1997. */
  1998. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.getAssignedStopId = function() {
  1999. return /** @type {string} */ (!this.hasAssignedStopId() ? "" : jspb.Message.getField(this, 1));
  2000. };
  2001. /** @param {string?|undefined} value */
  2002. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.setAssignedStopId = function(value) {
  2003. jspb.Message.setField(this, 1, value);
  2004. };
  2005. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.clearAssignedStopId = function() {
  2006. jspb.Message.setField(this, 1, undefined);
  2007. };
  2008. /**
  2009. * Returns whether this field is set.
  2010. * @return{!boolean}
  2011. */
  2012. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.prototype.hasAssignedStopId = function() {
  2013. return jspb.Message.getField(this, 1) != null;
  2014. };
  2015. /**
  2016. * The extensions registered with this message class. This is a map of
  2017. * extension field number to fieldInfo object.
  2018. *
  2019. * For example:
  2020. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  2021. *
  2022. * fieldName contains the JsCompiler renamed field name property so that it
  2023. * works in OPTIMIZED mode.
  2024. *
  2025. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  2026. */
  2027. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.extensions = {};
  2028. /**
  2029. * The extensions registered with this message class. This is a map of
  2030. * extension field number to fieldInfo object.
  2031. *
  2032. * For example:
  2033. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  2034. *
  2035. * fieldName contains the JsCompiler renamed field name property so that it
  2036. * works in OPTIMIZED mode.
  2037. *
  2038. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  2039. */
  2040. proto.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.extensionsBinary = {};
  2041. /**
  2042. * Generated by JsPbCodeGenerator.
  2043. * @param {Array=} opt_data Optional initial data array, typically from a
  2044. * server response, or constructed directly in Javascript. The array is used
  2045. * in place and becomes part of the constructed object. It is not cloned.
  2046. * If no data is provided, the constructed object will be empty, but still
  2047. * valid.
  2048. * @extends {jspb.Message}
  2049. * @constructor
  2050. */
  2051. proto.transit_realtime.TripUpdate.TripProperties = function(opt_data) {
  2052. jspb.Message.initialize(this, opt_data, 0, 5, null, null);
  2053. };
  2054. goog.inherits(proto.transit_realtime.TripUpdate.TripProperties, jspb.Message);
  2055. if (goog.DEBUG && !COMPILED) {
  2056. proto.transit_realtime.TripUpdate.TripProperties.displayName = 'proto.transit_realtime.TripUpdate.TripProperties';
  2057. }
  2058. if (jspb.Message.GENERATE_TO_OBJECT) {
  2059. /**
  2060. * Creates an object representation of this proto suitable for use in Soy templates.
  2061. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  2062. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  2063. * For the list of reserved names please see:
  2064. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  2065. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  2066. * for transitional soy proto support: http://goto/soy-param-migration
  2067. * @return {!Object}
  2068. */
  2069. proto.transit_realtime.TripUpdate.TripProperties.prototype.toObject = function(opt_includeInstance) {
  2070. return proto.transit_realtime.TripUpdate.TripProperties.toObject(opt_includeInstance, this);
  2071. };
  2072. /**
  2073. * Static version of the {@see toObject} method.
  2074. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  2075. * instance for transitional soy proto support:
  2076. * http://goto/soy-param-migration
  2077. * @param {!proto.transit_realtime.TripUpdate.TripProperties} msg The msg instance to transform.
  2078. * @return {!Object}
  2079. */
  2080. proto.transit_realtime.TripUpdate.TripProperties.toObject = function(includeInstance, msg) {
  2081. var f, obj = {
  2082. tripId: jspb.Message.getField(msg, 1),
  2083. startDate: jspb.Message.getField(msg, 2),
  2084. startTime: jspb.Message.getField(msg, 3),
  2085. shapeId: jspb.Message.getField(msg, 4)
  2086. };
  2087. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  2088. proto.transit_realtime.TripUpdate.TripProperties.extensions, proto.transit_realtime.TripUpdate.TripProperties.prototype.getExtension,
  2089. includeInstance);
  2090. if (includeInstance) {
  2091. obj.$jspbMessageInstance = msg;
  2092. }
  2093. return obj;
  2094. };
  2095. }
  2096. /**
  2097. * Deserializes binary data (in protobuf wire format).
  2098. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  2099. * @return {!proto.transit_realtime.TripUpdate.TripProperties}
  2100. */
  2101. proto.transit_realtime.TripUpdate.TripProperties.deserializeBinary = function(bytes) {
  2102. var reader = new jspb.BinaryReader(bytes);
  2103. var msg = new proto.transit_realtime.TripUpdate.TripProperties;
  2104. return proto.transit_realtime.TripUpdate.TripProperties.deserializeBinaryFromReader(msg, reader);
  2105. };
  2106. /**
  2107. * Deserializes binary data (in protobuf wire format) from the
  2108. * given reader into the given message object.
  2109. * @param {!proto.transit_realtime.TripUpdate.TripProperties} msg The message object to deserialize into.
  2110. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  2111. * @return {!proto.transit_realtime.TripUpdate.TripProperties}
  2112. */
  2113. proto.transit_realtime.TripUpdate.TripProperties.deserializeBinaryFromReader = function(msg, reader) {
  2114. while (reader.nextField()) {
  2115. if (reader.isEndGroup()) {
  2116. break;
  2117. }
  2118. var field = reader.getFieldNumber();
  2119. switch (field) {
  2120. case 1:
  2121. var value = /** @type {string} */ (reader.readString());
  2122. msg.setTripId(value);
  2123. break;
  2124. case 2:
  2125. var value = /** @type {string} */ (reader.readString());
  2126. msg.setStartDate(value);
  2127. break;
  2128. case 3:
  2129. var value = /** @type {string} */ (reader.readString());
  2130. msg.setStartTime(value);
  2131. break;
  2132. case 4:
  2133. var value = /** @type {string} */ (reader.readString());
  2134. msg.setShapeId(value);
  2135. break;
  2136. default:
  2137. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.TripUpdate.TripProperties.extensionsBinary,
  2138. proto.transit_realtime.TripUpdate.TripProperties.prototype.getExtension,
  2139. proto.transit_realtime.TripUpdate.TripProperties.prototype.setExtension);
  2140. break;
  2141. }
  2142. }
  2143. return msg;
  2144. };
  2145. /**
  2146. * Class method variant: serializes the given message to binary data
  2147. * (in protobuf wire format), writing to the given BinaryWriter.
  2148. * @param {!proto.transit_realtime.TripUpdate.TripProperties} message
  2149. * @param {!jspb.BinaryWriter} writer
  2150. */
  2151. proto.transit_realtime.TripUpdate.TripProperties.serializeBinaryToWriter = function(message, writer) {
  2152. message.serializeBinaryToWriter(writer);
  2153. };
  2154. /**
  2155. * Serializes the message to binary data (in protobuf wire format).
  2156. * @return {!Uint8Array}
  2157. */
  2158. proto.transit_realtime.TripUpdate.TripProperties.prototype.serializeBinary = function() {
  2159. var writer = new jspb.BinaryWriter();
  2160. this.serializeBinaryToWriter(writer);
  2161. return writer.getResultBuffer();
  2162. };
  2163. /**
  2164. * Serializes the message to binary data (in protobuf wire format),
  2165. * writing to the given BinaryWriter.
  2166. * @param {!jspb.BinaryWriter} writer
  2167. */
  2168. proto.transit_realtime.TripUpdate.TripProperties.prototype.serializeBinaryToWriter = function (writer) {
  2169. var f = undefined;
  2170. f = jspb.Message.getField(this, 1);
  2171. if (f != null) {
  2172. writer.writeString(
  2173. 1,
  2174. f
  2175. );
  2176. }
  2177. f = jspb.Message.getField(this, 2);
  2178. if (f != null) {
  2179. writer.writeString(
  2180. 2,
  2181. f
  2182. );
  2183. }
  2184. f = jspb.Message.getField(this, 3);
  2185. if (f != null) {
  2186. writer.writeString(
  2187. 3,
  2188. f
  2189. );
  2190. }
  2191. f = jspb.Message.getField(this, 4);
  2192. if (f != null) {
  2193. writer.writeString(
  2194. 4,
  2195. f
  2196. );
  2197. }
  2198. jspb.Message.serializeBinaryExtensions(this, writer,
  2199. proto.transit_realtime.TripUpdate.TripProperties.extensionsBinary, proto.transit_realtime.TripUpdate.TripProperties.prototype.getExtension);
  2200. };
  2201. /**
  2202. * Creates a deep clone of this proto. No data is shared with the original.
  2203. * @return {!proto.transit_realtime.TripUpdate.TripProperties} The clone.
  2204. */
  2205. proto.transit_realtime.TripUpdate.TripProperties.prototype.cloneMessage = function() {
  2206. return /** @type {!proto.transit_realtime.TripUpdate.TripProperties} */ (jspb.Message.cloneMessage(this));
  2207. };
  2208. /**
  2209. * optional string trip_id = 1;
  2210. * @return {string}
  2211. */
  2212. proto.transit_realtime.TripUpdate.TripProperties.prototype.getTripId = function() {
  2213. return /** @type {string} */ (!this.hasTripId() ? "" : jspb.Message.getField(this, 1));
  2214. };
  2215. /** @param {string?|undefined} value */
  2216. proto.transit_realtime.TripUpdate.TripProperties.prototype.setTripId = function(value) {
  2217. jspb.Message.setField(this, 1, value);
  2218. };
  2219. proto.transit_realtime.TripUpdate.TripProperties.prototype.clearTripId = function() {
  2220. jspb.Message.setField(this, 1, undefined);
  2221. };
  2222. /**
  2223. * Returns whether this field is set.
  2224. * @return{!boolean}
  2225. */
  2226. proto.transit_realtime.TripUpdate.TripProperties.prototype.hasTripId = function() {
  2227. return jspb.Message.getField(this, 1) != null;
  2228. };
  2229. /**
  2230. * optional string start_date = 2;
  2231. * @return {string}
  2232. */
  2233. proto.transit_realtime.TripUpdate.TripProperties.prototype.getStartDate = function() {
  2234. return /** @type {string} */ (!this.hasStartDate() ? "" : jspb.Message.getField(this, 2));
  2235. };
  2236. /** @param {string?|undefined} value */
  2237. proto.transit_realtime.TripUpdate.TripProperties.prototype.setStartDate = function(value) {
  2238. jspb.Message.setField(this, 2, value);
  2239. };
  2240. proto.transit_realtime.TripUpdate.TripProperties.prototype.clearStartDate = function() {
  2241. jspb.Message.setField(this, 2, undefined);
  2242. };
  2243. /**
  2244. * Returns whether this field is set.
  2245. * @return{!boolean}
  2246. */
  2247. proto.transit_realtime.TripUpdate.TripProperties.prototype.hasStartDate = function() {
  2248. return jspb.Message.getField(this, 2) != null;
  2249. };
  2250. /**
  2251. * optional string start_time = 3;
  2252. * @return {string}
  2253. */
  2254. proto.transit_realtime.TripUpdate.TripProperties.prototype.getStartTime = function() {
  2255. return /** @type {string} */ (!this.hasStartTime() ? "" : jspb.Message.getField(this, 3));
  2256. };
  2257. /** @param {string?|undefined} value */
  2258. proto.transit_realtime.TripUpdate.TripProperties.prototype.setStartTime = function(value) {
  2259. jspb.Message.setField(this, 3, value);
  2260. };
  2261. proto.transit_realtime.TripUpdate.TripProperties.prototype.clearStartTime = function() {
  2262. jspb.Message.setField(this, 3, undefined);
  2263. };
  2264. /**
  2265. * Returns whether this field is set.
  2266. * @return{!boolean}
  2267. */
  2268. proto.transit_realtime.TripUpdate.TripProperties.prototype.hasStartTime = function() {
  2269. return jspb.Message.getField(this, 3) != null;
  2270. };
  2271. /**
  2272. * optional string shape_id = 4;
  2273. * @return {string}
  2274. */
  2275. proto.transit_realtime.TripUpdate.TripProperties.prototype.getShapeId = function() {
  2276. return /** @type {string} */ (!this.hasShapeId() ? "" : jspb.Message.getField(this, 4));
  2277. };
  2278. /** @param {string?|undefined} value */
  2279. proto.transit_realtime.TripUpdate.TripProperties.prototype.setShapeId = function(value) {
  2280. jspb.Message.setField(this, 4, value);
  2281. };
  2282. proto.transit_realtime.TripUpdate.TripProperties.prototype.clearShapeId = function() {
  2283. jspb.Message.setField(this, 4, undefined);
  2284. };
  2285. /**
  2286. * Returns whether this field is set.
  2287. * @return{!boolean}
  2288. */
  2289. proto.transit_realtime.TripUpdate.TripProperties.prototype.hasShapeId = function() {
  2290. return jspb.Message.getField(this, 4) != null;
  2291. };
  2292. /**
  2293. * The extensions registered with this message class. This is a map of
  2294. * extension field number to fieldInfo object.
  2295. *
  2296. * For example:
  2297. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  2298. *
  2299. * fieldName contains the JsCompiler renamed field name property so that it
  2300. * works in OPTIMIZED mode.
  2301. *
  2302. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  2303. */
  2304. proto.transit_realtime.TripUpdate.TripProperties.extensions = {};
  2305. /**
  2306. * The extensions registered with this message class. This is a map of
  2307. * extension field number to fieldInfo object.
  2308. *
  2309. * For example:
  2310. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  2311. *
  2312. * fieldName contains the JsCompiler renamed field name property so that it
  2313. * works in OPTIMIZED mode.
  2314. *
  2315. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  2316. */
  2317. proto.transit_realtime.TripUpdate.TripProperties.extensionsBinary = {};
  2318. /**
  2319. * Generated by JsPbCodeGenerator.
  2320. * @param {Array=} opt_data Optional initial data array, typically from a
  2321. * server response, or constructed directly in Javascript. The array is used
  2322. * in place and becomes part of the constructed object. It is not cloned.
  2323. * If no data is provided, the constructed object will be empty, but still
  2324. * valid.
  2325. * @extends {jspb.Message}
  2326. * @constructor
  2327. */
  2328. proto.transit_realtime.VehiclePosition = function(opt_data) {
  2329. jspb.Message.initialize(this, opt_data, 0, 12, proto.transit_realtime.VehiclePosition.repeatedFields_, null);
  2330. };
  2331. goog.inherits(proto.transit_realtime.VehiclePosition, jspb.Message);
  2332. if (goog.DEBUG && !COMPILED) {
  2333. proto.transit_realtime.VehiclePosition.displayName = 'proto.transit_realtime.VehiclePosition';
  2334. }
  2335. /**
  2336. * List of repeated fields within this message type.
  2337. * @private {!Array<number>}
  2338. * @const
  2339. */
  2340. proto.transit_realtime.VehiclePosition.repeatedFields_ = [11];
  2341. if (jspb.Message.GENERATE_TO_OBJECT) {
  2342. /**
  2343. * Creates an object representation of this proto suitable for use in Soy templates.
  2344. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  2345. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  2346. * For the list of reserved names please see:
  2347. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  2348. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  2349. * for transitional soy proto support: http://goto/soy-param-migration
  2350. * @return {!Object}
  2351. */
  2352. proto.transit_realtime.VehiclePosition.prototype.toObject = function(opt_includeInstance) {
  2353. return proto.transit_realtime.VehiclePosition.toObject(opt_includeInstance, this);
  2354. };
  2355. /**
  2356. * Static version of the {@see toObject} method.
  2357. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  2358. * instance for transitional soy proto support:
  2359. * http://goto/soy-param-migration
  2360. * @param {!proto.transit_realtime.VehiclePosition} msg The msg instance to transform.
  2361. * @return {!Object}
  2362. */
  2363. proto.transit_realtime.VehiclePosition.toObject = function(includeInstance, msg) {
  2364. var f, obj = {
  2365. trip: (f = msg.getTrip()) && proto.transit_realtime.TripDescriptor.toObject(includeInstance, f),
  2366. vehicle: (f = msg.getVehicle()) && proto.transit_realtime.VehicleDescriptor.toObject(includeInstance, f),
  2367. position: (f = msg.getPosition()) && proto.transit_realtime.Position.toObject(includeInstance, f),
  2368. currentStopSequence: jspb.Message.getField(msg, 3),
  2369. stopId: jspb.Message.getField(msg, 7),
  2370. currentStatus: !msg.hasCurrentStatus() ? 2 : jspb.Message.getField(msg, 4),
  2371. timestamp: jspb.Message.getField(msg, 5),
  2372. congestionLevel: jspb.Message.getField(msg, 6),
  2373. occupancyStatus: jspb.Message.getField(msg, 9),
  2374. occupancyPercentage: jspb.Message.getField(msg, 10),
  2375. multiCarriageDetailsList: jspb.Message.toObjectList(msg.getMultiCarriageDetailsList(),
  2376. proto.transit_realtime.VehiclePosition.CarriageDetails.toObject, includeInstance)
  2377. };
  2378. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  2379. proto.transit_realtime.VehiclePosition.extensions, proto.transit_realtime.VehiclePosition.prototype.getExtension,
  2380. includeInstance);
  2381. if (includeInstance) {
  2382. obj.$jspbMessageInstance = msg;
  2383. }
  2384. return obj;
  2385. };
  2386. }
  2387. /**
  2388. * Deserializes binary data (in protobuf wire format).
  2389. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  2390. * @return {!proto.transit_realtime.VehiclePosition}
  2391. */
  2392. proto.transit_realtime.VehiclePosition.deserializeBinary = function(bytes) {
  2393. var reader = new jspb.BinaryReader(bytes);
  2394. var msg = new proto.transit_realtime.VehiclePosition;
  2395. return proto.transit_realtime.VehiclePosition.deserializeBinaryFromReader(msg, reader);
  2396. };
  2397. /**
  2398. * Deserializes binary data (in protobuf wire format) from the
  2399. * given reader into the given message object.
  2400. * @param {!proto.transit_realtime.VehiclePosition} msg The message object to deserialize into.
  2401. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  2402. * @return {!proto.transit_realtime.VehiclePosition}
  2403. */
  2404. proto.transit_realtime.VehiclePosition.deserializeBinaryFromReader = function(msg, reader) {
  2405. while (reader.nextField()) {
  2406. if (reader.isEndGroup()) {
  2407. break;
  2408. }
  2409. var field = reader.getFieldNumber();
  2410. switch (field) {
  2411. case 1:
  2412. var value = new proto.transit_realtime.TripDescriptor;
  2413. reader.readMessage(value,proto.transit_realtime.TripDescriptor.deserializeBinaryFromReader);
  2414. msg.setTrip(value);
  2415. break;
  2416. case 8:
  2417. var value = new proto.transit_realtime.VehicleDescriptor;
  2418. reader.readMessage(value,proto.transit_realtime.VehicleDescriptor.deserializeBinaryFromReader);
  2419. msg.setVehicle(value);
  2420. break;
  2421. case 2:
  2422. var value = new proto.transit_realtime.Position;
  2423. reader.readMessage(value,proto.transit_realtime.Position.deserializeBinaryFromReader);
  2424. msg.setPosition(value);
  2425. break;
  2426. case 3:
  2427. var value = /** @type {number} */ (reader.readUint32());
  2428. msg.setCurrentStopSequence(value);
  2429. break;
  2430. case 7:
  2431. var value = /** @type {string} */ (reader.readString());
  2432. msg.setStopId(value);
  2433. break;
  2434. case 4:
  2435. var value = /** @type {!proto.transit_realtime.VehiclePosition.VehicleStopStatus} */ (reader.readEnum());
  2436. msg.setCurrentStatus(value);
  2437. break;
  2438. case 5:
  2439. var value = /** @type {number} */ (reader.readUint64());
  2440. msg.setTimestamp(value);
  2441. break;
  2442. case 6:
  2443. var value = /** @type {!proto.transit_realtime.VehiclePosition.CongestionLevel} */ (reader.readEnum());
  2444. msg.setCongestionLevel(value);
  2445. break;
  2446. case 9:
  2447. var value = /** @type {!proto.transit_realtime.VehiclePosition.OccupancyStatus} */ (reader.readEnum());
  2448. msg.setOccupancyStatus(value);
  2449. break;
  2450. case 10:
  2451. var value = /** @type {number} */ (reader.readUint32());
  2452. msg.setOccupancyPercentage(value);
  2453. break;
  2454. case 11:
  2455. var value = new proto.transit_realtime.VehiclePosition.CarriageDetails;
  2456. reader.readMessage(value,proto.transit_realtime.VehiclePosition.CarriageDetails.deserializeBinaryFromReader);
  2457. msg.getMultiCarriageDetailsList().push(value);
  2458. msg.setMultiCarriageDetailsList(msg.getMultiCarriageDetailsList());
  2459. break;
  2460. default:
  2461. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.VehiclePosition.extensionsBinary,
  2462. proto.transit_realtime.VehiclePosition.prototype.getExtension,
  2463. proto.transit_realtime.VehiclePosition.prototype.setExtension);
  2464. break;
  2465. }
  2466. }
  2467. return msg;
  2468. };
  2469. /**
  2470. * Class method variant: serializes the given message to binary data
  2471. * (in protobuf wire format), writing to the given BinaryWriter.
  2472. * @param {!proto.transit_realtime.VehiclePosition} message
  2473. * @param {!jspb.BinaryWriter} writer
  2474. */
  2475. proto.transit_realtime.VehiclePosition.serializeBinaryToWriter = function(message, writer) {
  2476. message.serializeBinaryToWriter(writer);
  2477. };
  2478. /**
  2479. * Serializes the message to binary data (in protobuf wire format).
  2480. * @return {!Uint8Array}
  2481. */
  2482. proto.transit_realtime.VehiclePosition.prototype.serializeBinary = function() {
  2483. var writer = new jspb.BinaryWriter();
  2484. this.serializeBinaryToWriter(writer);
  2485. return writer.getResultBuffer();
  2486. };
  2487. /**
  2488. * Serializes the message to binary data (in protobuf wire format),
  2489. * writing to the given BinaryWriter.
  2490. * @param {!jspb.BinaryWriter} writer
  2491. */
  2492. proto.transit_realtime.VehiclePosition.prototype.serializeBinaryToWriter = function (writer) {
  2493. var f = undefined;
  2494. f = this.getTrip();
  2495. if (f != null) {
  2496. writer.writeMessage(
  2497. 1,
  2498. f,
  2499. proto.transit_realtime.TripDescriptor.serializeBinaryToWriter
  2500. );
  2501. }
  2502. f = this.getVehicle();
  2503. if (f != null) {
  2504. writer.writeMessage(
  2505. 8,
  2506. f,
  2507. proto.transit_realtime.VehicleDescriptor.serializeBinaryToWriter
  2508. );
  2509. }
  2510. f = this.getPosition();
  2511. if (f != null) {
  2512. writer.writeMessage(
  2513. 2,
  2514. f,
  2515. proto.transit_realtime.Position.serializeBinaryToWriter
  2516. );
  2517. }
  2518. f = jspb.Message.getField(this, 3);
  2519. if (f != null) {
  2520. writer.writeUint32(
  2521. 3,
  2522. f
  2523. );
  2524. }
  2525. f = jspb.Message.getField(this, 7);
  2526. if (f != null) {
  2527. writer.writeString(
  2528. 7,
  2529. f
  2530. );
  2531. }
  2532. f = jspb.Message.getField(this, 4);
  2533. if (f != null) {
  2534. writer.writeEnum(
  2535. 4,
  2536. f
  2537. );
  2538. }
  2539. f = jspb.Message.getField(this, 5);
  2540. if (f != null) {
  2541. writer.writeUint64(
  2542. 5,
  2543. f
  2544. );
  2545. }
  2546. f = jspb.Message.getField(this, 6);
  2547. if (f != null) {
  2548. writer.writeEnum(
  2549. 6,
  2550. f
  2551. );
  2552. }
  2553. f = jspb.Message.getField(this, 9);
  2554. if (f != null) {
  2555. writer.writeEnum(
  2556. 9,
  2557. f
  2558. );
  2559. }
  2560. f = jspb.Message.getField(this, 10);
  2561. if (f != null) {
  2562. writer.writeUint32(
  2563. 10,
  2564. f
  2565. );
  2566. }
  2567. f = this.getMultiCarriageDetailsList();
  2568. if (f.length > 0) {
  2569. writer.writeRepeatedMessage(
  2570. 11,
  2571. f,
  2572. proto.transit_realtime.VehiclePosition.CarriageDetails.serializeBinaryToWriter
  2573. );
  2574. }
  2575. jspb.Message.serializeBinaryExtensions(this, writer,
  2576. proto.transit_realtime.VehiclePosition.extensionsBinary, proto.transit_realtime.VehiclePosition.prototype.getExtension);
  2577. };
  2578. /**
  2579. * Creates a deep clone of this proto. No data is shared with the original.
  2580. * @return {!proto.transit_realtime.VehiclePosition} The clone.
  2581. */
  2582. proto.transit_realtime.VehiclePosition.prototype.cloneMessage = function() {
  2583. return /** @type {!proto.transit_realtime.VehiclePosition} */ (jspb.Message.cloneMessage(this));
  2584. };
  2585. /**
  2586. * optional TripDescriptor trip = 1;
  2587. * @return {proto.transit_realtime.TripDescriptor}
  2588. */
  2589. proto.transit_realtime.VehiclePosition.prototype.getTrip = function() {
  2590. return /** @type{proto.transit_realtime.TripDescriptor} */ (
  2591. jspb.Message.getWrapperField(this, proto.transit_realtime.TripDescriptor, 1));
  2592. };
  2593. /** @param {proto.transit_realtime.TripDescriptor|undefined} value */
  2594. proto.transit_realtime.VehiclePosition.prototype.setTrip = function(value) {
  2595. jspb.Message.setWrapperField(this, 1, value);
  2596. };
  2597. proto.transit_realtime.VehiclePosition.prototype.clearTrip = function() {
  2598. this.setTrip(undefined);
  2599. };
  2600. /**
  2601. * Returns whether this field is set.
  2602. * @return{!boolean}
  2603. */
  2604. proto.transit_realtime.VehiclePosition.prototype.hasTrip = function() {
  2605. return jspb.Message.getField(this, 1) != null;
  2606. };
  2607. /**
  2608. * optional VehicleDescriptor vehicle = 8;
  2609. * @return {proto.transit_realtime.VehicleDescriptor}
  2610. */
  2611. proto.transit_realtime.VehiclePosition.prototype.getVehicle = function() {
  2612. return /** @type{proto.transit_realtime.VehicleDescriptor} */ (
  2613. jspb.Message.getWrapperField(this, proto.transit_realtime.VehicleDescriptor, 8));
  2614. };
  2615. /** @param {proto.transit_realtime.VehicleDescriptor|undefined} value */
  2616. proto.transit_realtime.VehiclePosition.prototype.setVehicle = function(value) {
  2617. jspb.Message.setWrapperField(this, 8, value);
  2618. };
  2619. proto.transit_realtime.VehiclePosition.prototype.clearVehicle = function() {
  2620. this.setVehicle(undefined);
  2621. };
  2622. /**
  2623. * Returns whether this field is set.
  2624. * @return{!boolean}
  2625. */
  2626. proto.transit_realtime.VehiclePosition.prototype.hasVehicle = function() {
  2627. return jspb.Message.getField(this, 8) != null;
  2628. };
  2629. /**
  2630. * optional Position position = 2;
  2631. * @return {proto.transit_realtime.Position}
  2632. */
  2633. proto.transit_realtime.VehiclePosition.prototype.getPosition = function() {
  2634. return /** @type{proto.transit_realtime.Position} */ (
  2635. jspb.Message.getWrapperField(this, proto.transit_realtime.Position, 2));
  2636. };
  2637. /** @param {proto.transit_realtime.Position|undefined} value */
  2638. proto.transit_realtime.VehiclePosition.prototype.setPosition = function(value) {
  2639. jspb.Message.setWrapperField(this, 2, value);
  2640. };
  2641. proto.transit_realtime.VehiclePosition.prototype.clearPosition = function() {
  2642. this.setPosition(undefined);
  2643. };
  2644. /**
  2645. * Returns whether this field is set.
  2646. * @return{!boolean}
  2647. */
  2648. proto.transit_realtime.VehiclePosition.prototype.hasPosition = function() {
  2649. return jspb.Message.getField(this, 2) != null;
  2650. };
  2651. /**
  2652. * optional uint32 current_stop_sequence = 3;
  2653. * @return {number}
  2654. */
  2655. proto.transit_realtime.VehiclePosition.prototype.getCurrentStopSequence = function() {
  2656. return /** @type {number} */ (!this.hasCurrentStopSequence() ? 0 : jspb.Message.getField(this, 3));
  2657. };
  2658. /** @param {number?|undefined} value */
  2659. proto.transit_realtime.VehiclePosition.prototype.setCurrentStopSequence = function(value) {
  2660. jspb.Message.setField(this, 3, value);
  2661. };
  2662. proto.transit_realtime.VehiclePosition.prototype.clearCurrentStopSequence = function() {
  2663. jspb.Message.setField(this, 3, undefined);
  2664. };
  2665. /**
  2666. * Returns whether this field is set.
  2667. * @return{!boolean}
  2668. */
  2669. proto.transit_realtime.VehiclePosition.prototype.hasCurrentStopSequence = function() {
  2670. return jspb.Message.getField(this, 3) != null;
  2671. };
  2672. /**
  2673. * optional string stop_id = 7;
  2674. * @return {string}
  2675. */
  2676. proto.transit_realtime.VehiclePosition.prototype.getStopId = function() {
  2677. return /** @type {string} */ (!this.hasStopId() ? "" : jspb.Message.getField(this, 7));
  2678. };
  2679. /** @param {string?|undefined} value */
  2680. proto.transit_realtime.VehiclePosition.prototype.setStopId = function(value) {
  2681. jspb.Message.setField(this, 7, value);
  2682. };
  2683. proto.transit_realtime.VehiclePosition.prototype.clearStopId = function() {
  2684. jspb.Message.setField(this, 7, undefined);
  2685. };
  2686. /**
  2687. * Returns whether this field is set.
  2688. * @return{!boolean}
  2689. */
  2690. proto.transit_realtime.VehiclePosition.prototype.hasStopId = function() {
  2691. return jspb.Message.getField(this, 7) != null;
  2692. };
  2693. /**
  2694. * optional VehicleStopStatus current_status = 4;
  2695. * @return {proto.transit_realtime.VehiclePosition.VehicleStopStatus}
  2696. */
  2697. proto.transit_realtime.VehiclePosition.prototype.getCurrentStatus = function() {
  2698. return /** @type {proto.transit_realtime.VehiclePosition.VehicleStopStatus} */ (!this.hasCurrentStatus() ? 2 : jspb.Message.getField(this, 4));
  2699. };
  2700. /** @param {proto.transit_realtime.VehiclePosition.VehicleStopStatus|undefined} value */
  2701. proto.transit_realtime.VehiclePosition.prototype.setCurrentStatus = function(value) {
  2702. jspb.Message.setField(this, 4, value);
  2703. };
  2704. proto.transit_realtime.VehiclePosition.prototype.clearCurrentStatus = function() {
  2705. jspb.Message.setField(this, 4, undefined);
  2706. };
  2707. /**
  2708. * Returns whether this field is set.
  2709. * @return{!boolean}
  2710. */
  2711. proto.transit_realtime.VehiclePosition.prototype.hasCurrentStatus = function() {
  2712. return jspb.Message.getField(this, 4) != null;
  2713. };
  2714. /**
  2715. * optional uint64 timestamp = 5;
  2716. * @return {number}
  2717. */
  2718. proto.transit_realtime.VehiclePosition.prototype.getTimestamp = function() {
  2719. return /** @type {number} */ (!this.hasTimestamp() ? 0 : jspb.Message.getField(this, 5));
  2720. };
  2721. /** @param {number?|undefined} value */
  2722. proto.transit_realtime.VehiclePosition.prototype.setTimestamp = function(value) {
  2723. jspb.Message.setField(this, 5, value);
  2724. };
  2725. proto.transit_realtime.VehiclePosition.prototype.clearTimestamp = function() {
  2726. jspb.Message.setField(this, 5, undefined);
  2727. };
  2728. /**
  2729. * Returns whether this field is set.
  2730. * @return{!boolean}
  2731. */
  2732. proto.transit_realtime.VehiclePosition.prototype.hasTimestamp = function() {
  2733. return jspb.Message.getField(this, 5) != null;
  2734. };
  2735. /**
  2736. * optional CongestionLevel congestion_level = 6;
  2737. * @return {proto.transit_realtime.VehiclePosition.CongestionLevel}
  2738. */
  2739. proto.transit_realtime.VehiclePosition.prototype.getCongestionLevel = function() {
  2740. return /** @type {proto.transit_realtime.VehiclePosition.CongestionLevel} */ (!this.hasCongestionLevel() ? 0 : jspb.Message.getField(this, 6));
  2741. };
  2742. /** @param {proto.transit_realtime.VehiclePosition.CongestionLevel|undefined} value */
  2743. proto.transit_realtime.VehiclePosition.prototype.setCongestionLevel = function(value) {
  2744. jspb.Message.setField(this, 6, value);
  2745. };
  2746. proto.transit_realtime.VehiclePosition.prototype.clearCongestionLevel = function() {
  2747. jspb.Message.setField(this, 6, undefined);
  2748. };
  2749. /**
  2750. * Returns whether this field is set.
  2751. * @return{!boolean}
  2752. */
  2753. proto.transit_realtime.VehiclePosition.prototype.hasCongestionLevel = function() {
  2754. return jspb.Message.getField(this, 6) != null;
  2755. };
  2756. /**
  2757. * optional OccupancyStatus occupancy_status = 9;
  2758. * @return {proto.transit_realtime.VehiclePosition.OccupancyStatus}
  2759. */
  2760. proto.transit_realtime.VehiclePosition.prototype.getOccupancyStatus = function() {
  2761. return /** @type {proto.transit_realtime.VehiclePosition.OccupancyStatus} */ (!this.hasOccupancyStatus() ? 0 : jspb.Message.getField(this, 9));
  2762. };
  2763. /** @param {proto.transit_realtime.VehiclePosition.OccupancyStatus|undefined} value */
  2764. proto.transit_realtime.VehiclePosition.prototype.setOccupancyStatus = function(value) {
  2765. jspb.Message.setField(this, 9, value);
  2766. };
  2767. proto.transit_realtime.VehiclePosition.prototype.clearOccupancyStatus = function() {
  2768. jspb.Message.setField(this, 9, undefined);
  2769. };
  2770. /**
  2771. * Returns whether this field is set.
  2772. * @return{!boolean}
  2773. */
  2774. proto.transit_realtime.VehiclePosition.prototype.hasOccupancyStatus = function() {
  2775. return jspb.Message.getField(this, 9) != null;
  2776. };
  2777. /**
  2778. * optional uint32 occupancy_percentage = 10;
  2779. * @return {number}
  2780. */
  2781. proto.transit_realtime.VehiclePosition.prototype.getOccupancyPercentage = function() {
  2782. return /** @type {number} */ (!this.hasOccupancyPercentage() ? 0 : jspb.Message.getField(this, 10));
  2783. };
  2784. /** @param {number?|undefined} value */
  2785. proto.transit_realtime.VehiclePosition.prototype.setOccupancyPercentage = function(value) {
  2786. jspb.Message.setField(this, 10, value);
  2787. };
  2788. proto.transit_realtime.VehiclePosition.prototype.clearOccupancyPercentage = function() {
  2789. jspb.Message.setField(this, 10, undefined);
  2790. };
  2791. /**
  2792. * Returns whether this field is set.
  2793. * @return{!boolean}
  2794. */
  2795. proto.transit_realtime.VehiclePosition.prototype.hasOccupancyPercentage = function() {
  2796. return jspb.Message.getField(this, 10) != null;
  2797. };
  2798. /**
  2799. * repeated CarriageDetails multi_carriage_details = 11;
  2800. * If you change this array by adding, removing or replacing elements, or if you
  2801. * replace the array itself, then you must call the setter to update it.
  2802. * @return {!Array.<!proto.transit_realtime.VehiclePosition.CarriageDetails>}
  2803. */
  2804. proto.transit_realtime.VehiclePosition.prototype.getMultiCarriageDetailsList = function() {
  2805. return /** @type{!Array.<!proto.transit_realtime.VehiclePosition.CarriageDetails>} */ (
  2806. jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.VehiclePosition.CarriageDetails, 11));
  2807. };
  2808. /** @param {Array.<!proto.transit_realtime.VehiclePosition.CarriageDetails>} value */
  2809. proto.transit_realtime.VehiclePosition.prototype.setMultiCarriageDetailsList = function(value) {
  2810. jspb.Message.setRepeatedWrapperField(this, 11, value);
  2811. };
  2812. proto.transit_realtime.VehiclePosition.prototype.clearMultiCarriageDetailsList = function() {
  2813. this.setMultiCarriageDetailsList([]);
  2814. };
  2815. /**
  2816. * The extensions registered with this message class. This is a map of
  2817. * extension field number to fieldInfo object.
  2818. *
  2819. * For example:
  2820. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  2821. *
  2822. * fieldName contains the JsCompiler renamed field name property so that it
  2823. * works in OPTIMIZED mode.
  2824. *
  2825. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  2826. */
  2827. proto.transit_realtime.VehiclePosition.extensions = {};
  2828. /**
  2829. * The extensions registered with this message class. This is a map of
  2830. * extension field number to fieldInfo object.
  2831. *
  2832. * For example:
  2833. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  2834. *
  2835. * fieldName contains the JsCompiler renamed field name property so that it
  2836. * works in OPTIMIZED mode.
  2837. *
  2838. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  2839. */
  2840. proto.transit_realtime.VehiclePosition.extensionsBinary = {};
  2841. /**
  2842. * @enum {number}
  2843. */
  2844. proto.transit_realtime.VehiclePosition.VehicleStopStatus = {
  2845. INCOMING_AT: 0,
  2846. STOPPED_AT: 1,
  2847. IN_TRANSIT_TO: 2
  2848. };
  2849. /**
  2850. * @enum {number}
  2851. */
  2852. proto.transit_realtime.VehiclePosition.CongestionLevel = {
  2853. UNKNOWN_CONGESTION_LEVEL: 0,
  2854. RUNNING_SMOOTHLY: 1,
  2855. STOP_AND_GO: 2,
  2856. CONGESTION: 3,
  2857. SEVERE_CONGESTION: 4
  2858. };
  2859. /**
  2860. * @enum {number}
  2861. */
  2862. proto.transit_realtime.VehiclePosition.OccupancyStatus = {
  2863. EMPTY: 0,
  2864. MANY_SEATS_AVAILABLE: 1,
  2865. FEW_SEATS_AVAILABLE: 2,
  2866. STANDING_ROOM_ONLY: 3,
  2867. CRUSHED_STANDING_ROOM_ONLY: 4,
  2868. FULL: 5,
  2869. NOT_ACCEPTING_PASSENGERS: 6,
  2870. NO_DATA_AVAILABLE: 7,
  2871. NOT_BOARDABLE: 8
  2872. };
  2873. /**
  2874. * Generated by JsPbCodeGenerator.
  2875. * @param {Array=} opt_data Optional initial data array, typically from a
  2876. * server response, or constructed directly in Javascript. The array is used
  2877. * in place and becomes part of the constructed object. It is not cloned.
  2878. * If no data is provided, the constructed object will be empty, but still
  2879. * valid.
  2880. * @extends {jspb.Message}
  2881. * @constructor
  2882. */
  2883. proto.transit_realtime.VehiclePosition.CarriageDetails = function(opt_data) {
  2884. jspb.Message.initialize(this, opt_data, 0, 6, null, null);
  2885. };
  2886. goog.inherits(proto.transit_realtime.VehiclePosition.CarriageDetails, jspb.Message);
  2887. if (goog.DEBUG && !COMPILED) {
  2888. proto.transit_realtime.VehiclePosition.CarriageDetails.displayName = 'proto.transit_realtime.VehiclePosition.CarriageDetails';
  2889. }
  2890. if (jspb.Message.GENERATE_TO_OBJECT) {
  2891. /**
  2892. * Creates an object representation of this proto suitable for use in Soy templates.
  2893. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  2894. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  2895. * For the list of reserved names please see:
  2896. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  2897. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  2898. * for transitional soy proto support: http://goto/soy-param-migration
  2899. * @return {!Object}
  2900. */
  2901. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.toObject = function(opt_includeInstance) {
  2902. return proto.transit_realtime.VehiclePosition.CarriageDetails.toObject(opt_includeInstance, this);
  2903. };
  2904. /**
  2905. * Static version of the {@see toObject} method.
  2906. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  2907. * instance for transitional soy proto support:
  2908. * http://goto/soy-param-migration
  2909. * @param {!proto.transit_realtime.VehiclePosition.CarriageDetails} msg The msg instance to transform.
  2910. * @return {!Object}
  2911. */
  2912. proto.transit_realtime.VehiclePosition.CarriageDetails.toObject = function(includeInstance, msg) {
  2913. var f, obj = {
  2914. id: jspb.Message.getField(msg, 1),
  2915. label: jspb.Message.getField(msg, 2),
  2916. occupancyStatus: !msg.hasOccupancyStatus() ? 7 : jspb.Message.getField(msg, 3),
  2917. occupancyPercentage: !msg.hasOccupancyPercentage() ? -1 : jspb.Message.getField(msg, 4),
  2918. carriageSequence: jspb.Message.getField(msg, 5)
  2919. };
  2920. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  2921. proto.transit_realtime.VehiclePosition.CarriageDetails.extensions, proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getExtension,
  2922. includeInstance);
  2923. if (includeInstance) {
  2924. obj.$jspbMessageInstance = msg;
  2925. }
  2926. return obj;
  2927. };
  2928. }
  2929. /**
  2930. * Deserializes binary data (in protobuf wire format).
  2931. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  2932. * @return {!proto.transit_realtime.VehiclePosition.CarriageDetails}
  2933. */
  2934. proto.transit_realtime.VehiclePosition.CarriageDetails.deserializeBinary = function(bytes) {
  2935. var reader = new jspb.BinaryReader(bytes);
  2936. var msg = new proto.transit_realtime.VehiclePosition.CarriageDetails;
  2937. return proto.transit_realtime.VehiclePosition.CarriageDetails.deserializeBinaryFromReader(msg, reader);
  2938. };
  2939. /**
  2940. * Deserializes binary data (in protobuf wire format) from the
  2941. * given reader into the given message object.
  2942. * @param {!proto.transit_realtime.VehiclePosition.CarriageDetails} msg The message object to deserialize into.
  2943. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  2944. * @return {!proto.transit_realtime.VehiclePosition.CarriageDetails}
  2945. */
  2946. proto.transit_realtime.VehiclePosition.CarriageDetails.deserializeBinaryFromReader = function(msg, reader) {
  2947. while (reader.nextField()) {
  2948. if (reader.isEndGroup()) {
  2949. break;
  2950. }
  2951. var field = reader.getFieldNumber();
  2952. switch (field) {
  2953. case 1:
  2954. var value = /** @type {string} */ (reader.readString());
  2955. msg.setId(value);
  2956. break;
  2957. case 2:
  2958. var value = /** @type {string} */ (reader.readString());
  2959. msg.setLabel(value);
  2960. break;
  2961. case 3:
  2962. var value = /** @type {!proto.transit_realtime.VehiclePosition.OccupancyStatus} */ (reader.readEnum());
  2963. msg.setOccupancyStatus(value);
  2964. break;
  2965. case 4:
  2966. var value = /** @type {number} */ (reader.readInt32());
  2967. msg.setOccupancyPercentage(value);
  2968. break;
  2969. case 5:
  2970. var value = /** @type {number} */ (reader.readUint32());
  2971. msg.setCarriageSequence(value);
  2972. break;
  2973. default:
  2974. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.VehiclePosition.CarriageDetails.extensionsBinary,
  2975. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getExtension,
  2976. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setExtension);
  2977. break;
  2978. }
  2979. }
  2980. return msg;
  2981. };
  2982. /**
  2983. * Class method variant: serializes the given message to binary data
  2984. * (in protobuf wire format), writing to the given BinaryWriter.
  2985. * @param {!proto.transit_realtime.VehiclePosition.CarriageDetails} message
  2986. * @param {!jspb.BinaryWriter} writer
  2987. */
  2988. proto.transit_realtime.VehiclePosition.CarriageDetails.serializeBinaryToWriter = function(message, writer) {
  2989. message.serializeBinaryToWriter(writer);
  2990. };
  2991. /**
  2992. * Serializes the message to binary data (in protobuf wire format).
  2993. * @return {!Uint8Array}
  2994. */
  2995. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.serializeBinary = function() {
  2996. var writer = new jspb.BinaryWriter();
  2997. this.serializeBinaryToWriter(writer);
  2998. return writer.getResultBuffer();
  2999. };
  3000. /**
  3001. * Serializes the message to binary data (in protobuf wire format),
  3002. * writing to the given BinaryWriter.
  3003. * @param {!jspb.BinaryWriter} writer
  3004. */
  3005. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.serializeBinaryToWriter = function (writer) {
  3006. var f = undefined;
  3007. f = jspb.Message.getField(this, 1);
  3008. if (f != null) {
  3009. writer.writeString(
  3010. 1,
  3011. f
  3012. );
  3013. }
  3014. f = jspb.Message.getField(this, 2);
  3015. if (f != null) {
  3016. writer.writeString(
  3017. 2,
  3018. f
  3019. );
  3020. }
  3021. f = jspb.Message.getField(this, 3);
  3022. if (f != null) {
  3023. writer.writeEnum(
  3024. 3,
  3025. f
  3026. );
  3027. }
  3028. f = jspb.Message.getField(this, 4);
  3029. if (f != null) {
  3030. writer.writeInt32(
  3031. 4,
  3032. f
  3033. );
  3034. }
  3035. f = jspb.Message.getField(this, 5);
  3036. if (f != null) {
  3037. writer.writeUint32(
  3038. 5,
  3039. f
  3040. );
  3041. }
  3042. jspb.Message.serializeBinaryExtensions(this, writer,
  3043. proto.transit_realtime.VehiclePosition.CarriageDetails.extensionsBinary, proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getExtension);
  3044. };
  3045. /**
  3046. * Creates a deep clone of this proto. No data is shared with the original.
  3047. * @return {!proto.transit_realtime.VehiclePosition.CarriageDetails} The clone.
  3048. */
  3049. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.cloneMessage = function() {
  3050. return /** @type {!proto.transit_realtime.VehiclePosition.CarriageDetails} */ (jspb.Message.cloneMessage(this));
  3051. };
  3052. /**
  3053. * optional string id = 1;
  3054. * @return {string}
  3055. */
  3056. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getId = function() {
  3057. return /** @type {string} */ (!this.hasId() ? "" : jspb.Message.getField(this, 1));
  3058. };
  3059. /** @param {string?|undefined} value */
  3060. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setId = function(value) {
  3061. jspb.Message.setField(this, 1, value);
  3062. };
  3063. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.clearId = function() {
  3064. jspb.Message.setField(this, 1, undefined);
  3065. };
  3066. /**
  3067. * Returns whether this field is set.
  3068. * @return{!boolean}
  3069. */
  3070. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.hasId = function() {
  3071. return jspb.Message.getField(this, 1) != null;
  3072. };
  3073. /**
  3074. * optional string label = 2;
  3075. * @return {string}
  3076. */
  3077. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getLabel = function() {
  3078. return /** @type {string} */ (!this.hasLabel() ? "" : jspb.Message.getField(this, 2));
  3079. };
  3080. /** @param {string?|undefined} value */
  3081. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setLabel = function(value) {
  3082. jspb.Message.setField(this, 2, value);
  3083. };
  3084. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.clearLabel = function() {
  3085. jspb.Message.setField(this, 2, undefined);
  3086. };
  3087. /**
  3088. * Returns whether this field is set.
  3089. * @return{!boolean}
  3090. */
  3091. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.hasLabel = function() {
  3092. return jspb.Message.getField(this, 2) != null;
  3093. };
  3094. /**
  3095. * optional OccupancyStatus occupancy_status = 3;
  3096. * @return {proto.transit_realtime.VehiclePosition.OccupancyStatus}
  3097. */
  3098. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getOccupancyStatus = function() {
  3099. return /** @type {proto.transit_realtime.VehiclePosition.OccupancyStatus} */ (!this.hasOccupancyStatus() ? 7 : jspb.Message.getField(this, 3));
  3100. };
  3101. /** @param {proto.transit_realtime.VehiclePosition.OccupancyStatus|undefined} value */
  3102. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setOccupancyStatus = function(value) {
  3103. jspb.Message.setField(this, 3, value);
  3104. };
  3105. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.clearOccupancyStatus = function() {
  3106. jspb.Message.setField(this, 3, undefined);
  3107. };
  3108. /**
  3109. * Returns whether this field is set.
  3110. * @return{!boolean}
  3111. */
  3112. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.hasOccupancyStatus = function() {
  3113. return jspb.Message.getField(this, 3) != null;
  3114. };
  3115. /**
  3116. * optional int32 occupancy_percentage = 4;
  3117. * @return {number}
  3118. */
  3119. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getOccupancyPercentage = function() {
  3120. return /** @type {number} */ (!this.hasOccupancyPercentage() ? -1 : jspb.Message.getField(this, 4));
  3121. };
  3122. /** @param {number?|undefined} value */
  3123. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setOccupancyPercentage = function(value) {
  3124. jspb.Message.setField(this, 4, value);
  3125. };
  3126. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.clearOccupancyPercentage = function() {
  3127. jspb.Message.setField(this, 4, undefined);
  3128. };
  3129. /**
  3130. * Returns whether this field is set.
  3131. * @return{!boolean}
  3132. */
  3133. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.hasOccupancyPercentage = function() {
  3134. return jspb.Message.getField(this, 4) != null;
  3135. };
  3136. /**
  3137. * optional uint32 carriage_sequence = 5;
  3138. * @return {number}
  3139. */
  3140. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getCarriageSequence = function() {
  3141. return /** @type {number} */ (!this.hasCarriageSequence() ? 0 : jspb.Message.getField(this, 5));
  3142. };
  3143. /** @param {number?|undefined} value */
  3144. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setCarriageSequence = function(value) {
  3145. jspb.Message.setField(this, 5, value);
  3146. };
  3147. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.clearCarriageSequence = function() {
  3148. jspb.Message.setField(this, 5, undefined);
  3149. };
  3150. /**
  3151. * Returns whether this field is set.
  3152. * @return{!boolean}
  3153. */
  3154. proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.hasCarriageSequence = function() {
  3155. return jspb.Message.getField(this, 5) != null;
  3156. };
  3157. /**
  3158. * The extensions registered with this message class. This is a map of
  3159. * extension field number to fieldInfo object.
  3160. *
  3161. * For example:
  3162. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  3163. *
  3164. * fieldName contains the JsCompiler renamed field name property so that it
  3165. * works in OPTIMIZED mode.
  3166. *
  3167. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  3168. */
  3169. proto.transit_realtime.VehiclePosition.CarriageDetails.extensions = {};
  3170. /**
  3171. * The extensions registered with this message class. This is a map of
  3172. * extension field number to fieldInfo object.
  3173. *
  3174. * For example:
  3175. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  3176. *
  3177. * fieldName contains the JsCompiler renamed field name property so that it
  3178. * works in OPTIMIZED mode.
  3179. *
  3180. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  3181. */
  3182. proto.transit_realtime.VehiclePosition.CarriageDetails.extensionsBinary = {};
  3183. /**
  3184. * Generated by JsPbCodeGenerator.
  3185. * @param {Array=} opt_data Optional initial data array, typically from a
  3186. * server response, or constructed directly in Javascript. The array is used
  3187. * in place and becomes part of the constructed object. It is not cloned.
  3188. * If no data is provided, the constructed object will be empty, but still
  3189. * valid.
  3190. * @extends {jspb.Message}
  3191. * @constructor
  3192. */
  3193. proto.transit_realtime.Alert = function(opt_data) {
  3194. jspb.Message.initialize(this, opt_data, 0, 15, proto.transit_realtime.Alert.repeatedFields_, null);
  3195. };
  3196. goog.inherits(proto.transit_realtime.Alert, jspb.Message);
  3197. if (goog.DEBUG && !COMPILED) {
  3198. proto.transit_realtime.Alert.displayName = 'proto.transit_realtime.Alert';
  3199. }
  3200. /**
  3201. * List of repeated fields within this message type.
  3202. * @private {!Array<number>}
  3203. * @const
  3204. */
  3205. proto.transit_realtime.Alert.repeatedFields_ = [1,5];
  3206. if (jspb.Message.GENERATE_TO_OBJECT) {
  3207. /**
  3208. * Creates an object representation of this proto suitable for use in Soy templates.
  3209. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  3210. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  3211. * For the list of reserved names please see:
  3212. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  3213. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  3214. * for transitional soy proto support: http://goto/soy-param-migration
  3215. * @return {!Object}
  3216. */
  3217. proto.transit_realtime.Alert.prototype.toObject = function(opt_includeInstance) {
  3218. return proto.transit_realtime.Alert.toObject(opt_includeInstance, this);
  3219. };
  3220. /**
  3221. * Static version of the {@see toObject} method.
  3222. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  3223. * instance for transitional soy proto support:
  3224. * http://goto/soy-param-migration
  3225. * @param {!proto.transit_realtime.Alert} msg The msg instance to transform.
  3226. * @return {!Object}
  3227. */
  3228. proto.transit_realtime.Alert.toObject = function(includeInstance, msg) {
  3229. var f, obj = {
  3230. activePeriodList: jspb.Message.toObjectList(msg.getActivePeriodList(),
  3231. proto.transit_realtime.TimeRange.toObject, includeInstance),
  3232. informedEntityList: jspb.Message.toObjectList(msg.getInformedEntityList(),
  3233. proto.transit_realtime.EntitySelector.toObject, includeInstance),
  3234. cause: !msg.hasCause() ? 1 : jspb.Message.getField(msg, 6),
  3235. effect: !msg.hasEffect() ? 8 : jspb.Message.getField(msg, 7),
  3236. url: (f = msg.getUrl()) && proto.transit_realtime.TranslatedString.toObject(includeInstance, f),
  3237. headerText: (f = msg.getHeaderText()) && proto.transit_realtime.TranslatedString.toObject(includeInstance, f),
  3238. descriptionText: (f = msg.getDescriptionText()) && proto.transit_realtime.TranslatedString.toObject(includeInstance, f),
  3239. ttsHeaderText: (f = msg.getTtsHeaderText()) && proto.transit_realtime.TranslatedString.toObject(includeInstance, f),
  3240. ttsDescriptionText: (f = msg.getTtsDescriptionText()) && proto.transit_realtime.TranslatedString.toObject(includeInstance, f),
  3241. severityLevel: !msg.hasSeverityLevel() ? 1 : jspb.Message.getField(msg, 14)
  3242. };
  3243. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  3244. proto.transit_realtime.Alert.extensions, proto.transit_realtime.Alert.prototype.getExtension,
  3245. includeInstance);
  3246. if (includeInstance) {
  3247. obj.$jspbMessageInstance = msg;
  3248. }
  3249. return obj;
  3250. };
  3251. }
  3252. /**
  3253. * Deserializes binary data (in protobuf wire format).
  3254. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  3255. * @return {!proto.transit_realtime.Alert}
  3256. */
  3257. proto.transit_realtime.Alert.deserializeBinary = function(bytes) {
  3258. var reader = new jspb.BinaryReader(bytes);
  3259. var msg = new proto.transit_realtime.Alert;
  3260. return proto.transit_realtime.Alert.deserializeBinaryFromReader(msg, reader);
  3261. };
  3262. /**
  3263. * Deserializes binary data (in protobuf wire format) from the
  3264. * given reader into the given message object.
  3265. * @param {!proto.transit_realtime.Alert} msg The message object to deserialize into.
  3266. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  3267. * @return {!proto.transit_realtime.Alert}
  3268. */
  3269. proto.transit_realtime.Alert.deserializeBinaryFromReader = function(msg, reader) {
  3270. while (reader.nextField()) {
  3271. if (reader.isEndGroup()) {
  3272. break;
  3273. }
  3274. var field = reader.getFieldNumber();
  3275. switch (field) {
  3276. case 1:
  3277. var value = new proto.transit_realtime.TimeRange;
  3278. reader.readMessage(value,proto.transit_realtime.TimeRange.deserializeBinaryFromReader);
  3279. msg.getActivePeriodList().push(value);
  3280. msg.setActivePeriodList(msg.getActivePeriodList());
  3281. break;
  3282. case 5:
  3283. var value = new proto.transit_realtime.EntitySelector;
  3284. reader.readMessage(value,proto.transit_realtime.EntitySelector.deserializeBinaryFromReader);
  3285. msg.getInformedEntityList().push(value);
  3286. msg.setInformedEntityList(msg.getInformedEntityList());
  3287. break;
  3288. case 6:
  3289. var value = /** @type {!proto.transit_realtime.Alert.Cause} */ (reader.readEnum());
  3290. msg.setCause(value);
  3291. break;
  3292. case 7:
  3293. var value = /** @type {!proto.transit_realtime.Alert.Effect} */ (reader.readEnum());
  3294. msg.setEffect(value);
  3295. break;
  3296. case 8:
  3297. var value = new proto.transit_realtime.TranslatedString;
  3298. reader.readMessage(value,proto.transit_realtime.TranslatedString.deserializeBinaryFromReader);
  3299. msg.setUrl(value);
  3300. break;
  3301. case 10:
  3302. var value = new proto.transit_realtime.TranslatedString;
  3303. reader.readMessage(value,proto.transit_realtime.TranslatedString.deserializeBinaryFromReader);
  3304. msg.setHeaderText(value);
  3305. break;
  3306. case 11:
  3307. var value = new proto.transit_realtime.TranslatedString;
  3308. reader.readMessage(value,proto.transit_realtime.TranslatedString.deserializeBinaryFromReader);
  3309. msg.setDescriptionText(value);
  3310. break;
  3311. case 12:
  3312. var value = new proto.transit_realtime.TranslatedString;
  3313. reader.readMessage(value,proto.transit_realtime.TranslatedString.deserializeBinaryFromReader);
  3314. msg.setTtsHeaderText(value);
  3315. break;
  3316. case 13:
  3317. var value = new proto.transit_realtime.TranslatedString;
  3318. reader.readMessage(value,proto.transit_realtime.TranslatedString.deserializeBinaryFromReader);
  3319. msg.setTtsDescriptionText(value);
  3320. break;
  3321. case 14:
  3322. var value = /** @type {!proto.transit_realtime.Alert.SeverityLevel} */ (reader.readEnum());
  3323. msg.setSeverityLevel(value);
  3324. break;
  3325. default:
  3326. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.Alert.extensionsBinary,
  3327. proto.transit_realtime.Alert.prototype.getExtension,
  3328. proto.transit_realtime.Alert.prototype.setExtension);
  3329. break;
  3330. }
  3331. }
  3332. return msg;
  3333. };
  3334. /**
  3335. * Class method variant: serializes the given message to binary data
  3336. * (in protobuf wire format), writing to the given BinaryWriter.
  3337. * @param {!proto.transit_realtime.Alert} message
  3338. * @param {!jspb.BinaryWriter} writer
  3339. */
  3340. proto.transit_realtime.Alert.serializeBinaryToWriter = function(message, writer) {
  3341. message.serializeBinaryToWriter(writer);
  3342. };
  3343. /**
  3344. * Serializes the message to binary data (in protobuf wire format).
  3345. * @return {!Uint8Array}
  3346. */
  3347. proto.transit_realtime.Alert.prototype.serializeBinary = function() {
  3348. var writer = new jspb.BinaryWriter();
  3349. this.serializeBinaryToWriter(writer);
  3350. return writer.getResultBuffer();
  3351. };
  3352. /**
  3353. * Serializes the message to binary data (in protobuf wire format),
  3354. * writing to the given BinaryWriter.
  3355. * @param {!jspb.BinaryWriter} writer
  3356. */
  3357. proto.transit_realtime.Alert.prototype.serializeBinaryToWriter = function (writer) {
  3358. var f = undefined;
  3359. f = this.getActivePeriodList();
  3360. if (f.length > 0) {
  3361. writer.writeRepeatedMessage(
  3362. 1,
  3363. f,
  3364. proto.transit_realtime.TimeRange.serializeBinaryToWriter
  3365. );
  3366. }
  3367. f = this.getInformedEntityList();
  3368. if (f.length > 0) {
  3369. writer.writeRepeatedMessage(
  3370. 5,
  3371. f,
  3372. proto.transit_realtime.EntitySelector.serializeBinaryToWriter
  3373. );
  3374. }
  3375. f = jspb.Message.getField(this, 6);
  3376. if (f != null) {
  3377. writer.writeEnum(
  3378. 6,
  3379. f
  3380. );
  3381. }
  3382. f = jspb.Message.getField(this, 7);
  3383. if (f != null) {
  3384. writer.writeEnum(
  3385. 7,
  3386. f
  3387. );
  3388. }
  3389. f = this.getUrl();
  3390. if (f != null) {
  3391. writer.writeMessage(
  3392. 8,
  3393. f,
  3394. proto.transit_realtime.TranslatedString.serializeBinaryToWriter
  3395. );
  3396. }
  3397. f = this.getHeaderText();
  3398. if (f != null) {
  3399. writer.writeMessage(
  3400. 10,
  3401. f,
  3402. proto.transit_realtime.TranslatedString.serializeBinaryToWriter
  3403. );
  3404. }
  3405. f = this.getDescriptionText();
  3406. if (f != null) {
  3407. writer.writeMessage(
  3408. 11,
  3409. f,
  3410. proto.transit_realtime.TranslatedString.serializeBinaryToWriter
  3411. );
  3412. }
  3413. f = this.getTtsHeaderText();
  3414. if (f != null) {
  3415. writer.writeMessage(
  3416. 12,
  3417. f,
  3418. proto.transit_realtime.TranslatedString.serializeBinaryToWriter
  3419. );
  3420. }
  3421. f = this.getTtsDescriptionText();
  3422. if (f != null) {
  3423. writer.writeMessage(
  3424. 13,
  3425. f,
  3426. proto.transit_realtime.TranslatedString.serializeBinaryToWriter
  3427. );
  3428. }
  3429. f = jspb.Message.getField(this, 14);
  3430. if (f != null) {
  3431. writer.writeEnum(
  3432. 14,
  3433. f
  3434. );
  3435. }
  3436. jspb.Message.serializeBinaryExtensions(this, writer,
  3437. proto.transit_realtime.Alert.extensionsBinary, proto.transit_realtime.Alert.prototype.getExtension);
  3438. };
  3439. /**
  3440. * Creates a deep clone of this proto. No data is shared with the original.
  3441. * @return {!proto.transit_realtime.Alert} The clone.
  3442. */
  3443. proto.transit_realtime.Alert.prototype.cloneMessage = function() {
  3444. return /** @type {!proto.transit_realtime.Alert} */ (jspb.Message.cloneMessage(this));
  3445. };
  3446. /**
  3447. * repeated TimeRange active_period = 1;
  3448. * If you change this array by adding, removing or replacing elements, or if you
  3449. * replace the array itself, then you must call the setter to update it.
  3450. * @return {!Array.<!proto.transit_realtime.TimeRange>}
  3451. */
  3452. proto.transit_realtime.Alert.prototype.getActivePeriodList = function() {
  3453. return /** @type{!Array.<!proto.transit_realtime.TimeRange>} */ (
  3454. jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.TimeRange, 1));
  3455. };
  3456. /** @param {Array.<!proto.transit_realtime.TimeRange>} value */
  3457. proto.transit_realtime.Alert.prototype.setActivePeriodList = function(value) {
  3458. jspb.Message.setRepeatedWrapperField(this, 1, value);
  3459. };
  3460. proto.transit_realtime.Alert.prototype.clearActivePeriodList = function() {
  3461. this.setActivePeriodList([]);
  3462. };
  3463. /**
  3464. * repeated EntitySelector informed_entity = 5;
  3465. * If you change this array by adding, removing or replacing elements, or if you
  3466. * replace the array itself, then you must call the setter to update it.
  3467. * @return {!Array.<!proto.transit_realtime.EntitySelector>}
  3468. */
  3469. proto.transit_realtime.Alert.prototype.getInformedEntityList = function() {
  3470. return /** @type{!Array.<!proto.transit_realtime.EntitySelector>} */ (
  3471. jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.EntitySelector, 5));
  3472. };
  3473. /** @param {Array.<!proto.transit_realtime.EntitySelector>} value */
  3474. proto.transit_realtime.Alert.prototype.setInformedEntityList = function(value) {
  3475. jspb.Message.setRepeatedWrapperField(this, 5, value);
  3476. };
  3477. proto.transit_realtime.Alert.prototype.clearInformedEntityList = function() {
  3478. this.setInformedEntityList([]);
  3479. };
  3480. /**
  3481. * optional Cause cause = 6;
  3482. * @return {proto.transit_realtime.Alert.Cause}
  3483. */
  3484. proto.transit_realtime.Alert.prototype.getCause = function() {
  3485. return /** @type {proto.transit_realtime.Alert.Cause} */ (!this.hasCause() ? 1 : jspb.Message.getField(this, 6));
  3486. };
  3487. /** @param {proto.transit_realtime.Alert.Cause|undefined} value */
  3488. proto.transit_realtime.Alert.prototype.setCause = function(value) {
  3489. jspb.Message.setField(this, 6, value);
  3490. };
  3491. proto.transit_realtime.Alert.prototype.clearCause = function() {
  3492. jspb.Message.setField(this, 6, undefined);
  3493. };
  3494. /**
  3495. * Returns whether this field is set.
  3496. * @return{!boolean}
  3497. */
  3498. proto.transit_realtime.Alert.prototype.hasCause = function() {
  3499. return jspb.Message.getField(this, 6) != null;
  3500. };
  3501. /**
  3502. * optional Effect effect = 7;
  3503. * @return {proto.transit_realtime.Alert.Effect}
  3504. */
  3505. proto.transit_realtime.Alert.prototype.getEffect = function() {
  3506. return /** @type {proto.transit_realtime.Alert.Effect} */ (!this.hasEffect() ? 8 : jspb.Message.getField(this, 7));
  3507. };
  3508. /** @param {proto.transit_realtime.Alert.Effect|undefined} value */
  3509. proto.transit_realtime.Alert.prototype.setEffect = function(value) {
  3510. jspb.Message.setField(this, 7, value);
  3511. };
  3512. proto.transit_realtime.Alert.prototype.clearEffect = function() {
  3513. jspb.Message.setField(this, 7, undefined);
  3514. };
  3515. /**
  3516. * Returns whether this field is set.
  3517. * @return{!boolean}
  3518. */
  3519. proto.transit_realtime.Alert.prototype.hasEffect = function() {
  3520. return jspb.Message.getField(this, 7) != null;
  3521. };
  3522. /**
  3523. * optional TranslatedString url = 8;
  3524. * @return {proto.transit_realtime.TranslatedString}
  3525. */
  3526. proto.transit_realtime.Alert.prototype.getUrl = function() {
  3527. return /** @type{proto.transit_realtime.TranslatedString} */ (
  3528. jspb.Message.getWrapperField(this, proto.transit_realtime.TranslatedString, 8));
  3529. };
  3530. /** @param {proto.transit_realtime.TranslatedString|undefined} value */
  3531. proto.transit_realtime.Alert.prototype.setUrl = function(value) {
  3532. jspb.Message.setWrapperField(this, 8, value);
  3533. };
  3534. proto.transit_realtime.Alert.prototype.clearUrl = function() {
  3535. this.setUrl(undefined);
  3536. };
  3537. /**
  3538. * Returns whether this field is set.
  3539. * @return{!boolean}
  3540. */
  3541. proto.transit_realtime.Alert.prototype.hasUrl = function() {
  3542. return jspb.Message.getField(this, 8) != null;
  3543. };
  3544. /**
  3545. * optional TranslatedString header_text = 10;
  3546. * @return {proto.transit_realtime.TranslatedString}
  3547. */
  3548. proto.transit_realtime.Alert.prototype.getHeaderText = function() {
  3549. return /** @type{proto.transit_realtime.TranslatedString} */ (
  3550. jspb.Message.getWrapperField(this, proto.transit_realtime.TranslatedString, 10));
  3551. };
  3552. /** @param {proto.transit_realtime.TranslatedString|undefined} value */
  3553. proto.transit_realtime.Alert.prototype.setHeaderText = function(value) {
  3554. jspb.Message.setWrapperField(this, 10, value);
  3555. };
  3556. proto.transit_realtime.Alert.prototype.clearHeaderText = function() {
  3557. this.setHeaderText(undefined);
  3558. };
  3559. /**
  3560. * Returns whether this field is set.
  3561. * @return{!boolean}
  3562. */
  3563. proto.transit_realtime.Alert.prototype.hasHeaderText = function() {
  3564. return jspb.Message.getField(this, 10) != null;
  3565. };
  3566. /**
  3567. * optional TranslatedString description_text = 11;
  3568. * @return {proto.transit_realtime.TranslatedString}
  3569. */
  3570. proto.transit_realtime.Alert.prototype.getDescriptionText = function() {
  3571. return /** @type{proto.transit_realtime.TranslatedString} */ (
  3572. jspb.Message.getWrapperField(this, proto.transit_realtime.TranslatedString, 11));
  3573. };
  3574. /** @param {proto.transit_realtime.TranslatedString|undefined} value */
  3575. proto.transit_realtime.Alert.prototype.setDescriptionText = function(value) {
  3576. jspb.Message.setWrapperField(this, 11, value);
  3577. };
  3578. proto.transit_realtime.Alert.prototype.clearDescriptionText = function() {
  3579. this.setDescriptionText(undefined);
  3580. };
  3581. /**
  3582. * Returns whether this field is set.
  3583. * @return{!boolean}
  3584. */
  3585. proto.transit_realtime.Alert.prototype.hasDescriptionText = function() {
  3586. return jspb.Message.getField(this, 11) != null;
  3587. };
  3588. /**
  3589. * optional TranslatedString tts_header_text = 12;
  3590. * @return {proto.transit_realtime.TranslatedString}
  3591. */
  3592. proto.transit_realtime.Alert.prototype.getTtsHeaderText = function() {
  3593. return /** @type{proto.transit_realtime.TranslatedString} */ (
  3594. jspb.Message.getWrapperField(this, proto.transit_realtime.TranslatedString, 12));
  3595. };
  3596. /** @param {proto.transit_realtime.TranslatedString|undefined} value */
  3597. proto.transit_realtime.Alert.prototype.setTtsHeaderText = function(value) {
  3598. jspb.Message.setWrapperField(this, 12, value);
  3599. };
  3600. proto.transit_realtime.Alert.prototype.clearTtsHeaderText = function() {
  3601. this.setTtsHeaderText(undefined);
  3602. };
  3603. /**
  3604. * Returns whether this field is set.
  3605. * @return{!boolean}
  3606. */
  3607. proto.transit_realtime.Alert.prototype.hasTtsHeaderText = function() {
  3608. return jspb.Message.getField(this, 12) != null;
  3609. };
  3610. /**
  3611. * optional TranslatedString tts_description_text = 13;
  3612. * @return {proto.transit_realtime.TranslatedString}
  3613. */
  3614. proto.transit_realtime.Alert.prototype.getTtsDescriptionText = function() {
  3615. return /** @type{proto.transit_realtime.TranslatedString} */ (
  3616. jspb.Message.getWrapperField(this, proto.transit_realtime.TranslatedString, 13));
  3617. };
  3618. /** @param {proto.transit_realtime.TranslatedString|undefined} value */
  3619. proto.transit_realtime.Alert.prototype.setTtsDescriptionText = function(value) {
  3620. jspb.Message.setWrapperField(this, 13, value);
  3621. };
  3622. proto.transit_realtime.Alert.prototype.clearTtsDescriptionText = function() {
  3623. this.setTtsDescriptionText(undefined);
  3624. };
  3625. /**
  3626. * Returns whether this field is set.
  3627. * @return{!boolean}
  3628. */
  3629. proto.transit_realtime.Alert.prototype.hasTtsDescriptionText = function() {
  3630. return jspb.Message.getField(this, 13) != null;
  3631. };
  3632. /**
  3633. * optional SeverityLevel severity_level = 14;
  3634. * @return {proto.transit_realtime.Alert.SeverityLevel}
  3635. */
  3636. proto.transit_realtime.Alert.prototype.getSeverityLevel = function() {
  3637. return /** @type {proto.transit_realtime.Alert.SeverityLevel} */ (!this.hasSeverityLevel() ? 1 : jspb.Message.getField(this, 14));
  3638. };
  3639. /** @param {proto.transit_realtime.Alert.SeverityLevel|undefined} value */
  3640. proto.transit_realtime.Alert.prototype.setSeverityLevel = function(value) {
  3641. jspb.Message.setField(this, 14, value);
  3642. };
  3643. proto.transit_realtime.Alert.prototype.clearSeverityLevel = function() {
  3644. jspb.Message.setField(this, 14, undefined);
  3645. };
  3646. /**
  3647. * Returns whether this field is set.
  3648. * @return{!boolean}
  3649. */
  3650. proto.transit_realtime.Alert.prototype.hasSeverityLevel = function() {
  3651. return jspb.Message.getField(this, 14) != null;
  3652. };
  3653. /**
  3654. * The extensions registered with this message class. This is a map of
  3655. * extension field number to fieldInfo object.
  3656. *
  3657. * For example:
  3658. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  3659. *
  3660. * fieldName contains the JsCompiler renamed field name property so that it
  3661. * works in OPTIMIZED mode.
  3662. *
  3663. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  3664. */
  3665. proto.transit_realtime.Alert.extensions = {};
  3666. /**
  3667. * The extensions registered with this message class. This is a map of
  3668. * extension field number to fieldInfo object.
  3669. *
  3670. * For example:
  3671. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  3672. *
  3673. * fieldName contains the JsCompiler renamed field name property so that it
  3674. * works in OPTIMIZED mode.
  3675. *
  3676. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  3677. */
  3678. proto.transit_realtime.Alert.extensionsBinary = {};
  3679. /**
  3680. * @enum {number}
  3681. */
  3682. proto.transit_realtime.Alert.Cause = {
  3683. UNKNOWN_CAUSE: 1,
  3684. OTHER_CAUSE: 2,
  3685. TECHNICAL_PROBLEM: 3,
  3686. STRIKE: 4,
  3687. DEMONSTRATION: 5,
  3688. ACCIDENT: 6,
  3689. HOLIDAY: 7,
  3690. WEATHER: 8,
  3691. MAINTENANCE: 9,
  3692. CONSTRUCTION: 10,
  3693. POLICE_ACTIVITY: 11,
  3694. MEDICAL_EMERGENCY: 12
  3695. };
  3696. /**
  3697. * @enum {number}
  3698. */
  3699. proto.transit_realtime.Alert.Effect = {
  3700. NO_SERVICE: 1,
  3701. REDUCED_SERVICE: 2,
  3702. SIGNIFICANT_DELAYS: 3,
  3703. DETOUR: 4,
  3704. ADDITIONAL_SERVICE: 5,
  3705. MODIFIED_SERVICE: 6,
  3706. OTHER_EFFECT: 7,
  3707. UNKNOWN_EFFECT: 8,
  3708. STOP_MOVED: 9,
  3709. NO_EFFECT: 10,
  3710. ACCESSIBILITY_ISSUE: 11
  3711. };
  3712. /**
  3713. * @enum {number}
  3714. */
  3715. proto.transit_realtime.Alert.SeverityLevel = {
  3716. UNKNOWN_SEVERITY: 1,
  3717. INFO: 2,
  3718. WARNING: 3,
  3719. SEVERE: 4
  3720. };
  3721. /**
  3722. * Generated by JsPbCodeGenerator.
  3723. * @param {Array=} opt_data Optional initial data array, typically from a
  3724. * server response, or constructed directly in Javascript. The array is used
  3725. * in place and becomes part of the constructed object. It is not cloned.
  3726. * If no data is provided, the constructed object will be empty, but still
  3727. * valid.
  3728. * @extends {jspb.Message}
  3729. * @constructor
  3730. */
  3731. proto.transit_realtime.TimeRange = function(opt_data) {
  3732. jspb.Message.initialize(this, opt_data, 0, 3, null, null);
  3733. };
  3734. goog.inherits(proto.transit_realtime.TimeRange, jspb.Message);
  3735. if (goog.DEBUG && !COMPILED) {
  3736. proto.transit_realtime.TimeRange.displayName = 'proto.transit_realtime.TimeRange';
  3737. }
  3738. if (jspb.Message.GENERATE_TO_OBJECT) {
  3739. /**
  3740. * Creates an object representation of this proto suitable for use in Soy templates.
  3741. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  3742. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  3743. * For the list of reserved names please see:
  3744. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  3745. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  3746. * for transitional soy proto support: http://goto/soy-param-migration
  3747. * @return {!Object}
  3748. */
  3749. proto.transit_realtime.TimeRange.prototype.toObject = function(opt_includeInstance) {
  3750. return proto.transit_realtime.TimeRange.toObject(opt_includeInstance, this);
  3751. };
  3752. /**
  3753. * Static version of the {@see toObject} method.
  3754. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  3755. * instance for transitional soy proto support:
  3756. * http://goto/soy-param-migration
  3757. * @param {!proto.transit_realtime.TimeRange} msg The msg instance to transform.
  3758. * @return {!Object}
  3759. */
  3760. proto.transit_realtime.TimeRange.toObject = function(includeInstance, msg) {
  3761. var f, obj = {
  3762. start: jspb.Message.getField(msg, 1),
  3763. end: jspb.Message.getField(msg, 2)
  3764. };
  3765. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  3766. proto.transit_realtime.TimeRange.extensions, proto.transit_realtime.TimeRange.prototype.getExtension,
  3767. includeInstance);
  3768. if (includeInstance) {
  3769. obj.$jspbMessageInstance = msg;
  3770. }
  3771. return obj;
  3772. };
  3773. }
  3774. /**
  3775. * Deserializes binary data (in protobuf wire format).
  3776. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  3777. * @return {!proto.transit_realtime.TimeRange}
  3778. */
  3779. proto.transit_realtime.TimeRange.deserializeBinary = function(bytes) {
  3780. var reader = new jspb.BinaryReader(bytes);
  3781. var msg = new proto.transit_realtime.TimeRange;
  3782. return proto.transit_realtime.TimeRange.deserializeBinaryFromReader(msg, reader);
  3783. };
  3784. /**
  3785. * Deserializes binary data (in protobuf wire format) from the
  3786. * given reader into the given message object.
  3787. * @param {!proto.transit_realtime.TimeRange} msg The message object to deserialize into.
  3788. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  3789. * @return {!proto.transit_realtime.TimeRange}
  3790. */
  3791. proto.transit_realtime.TimeRange.deserializeBinaryFromReader = function(msg, reader) {
  3792. while (reader.nextField()) {
  3793. if (reader.isEndGroup()) {
  3794. break;
  3795. }
  3796. var field = reader.getFieldNumber();
  3797. switch (field) {
  3798. case 1:
  3799. var value = /** @type {number} */ (reader.readUint64());
  3800. msg.setStart(value);
  3801. break;
  3802. case 2:
  3803. var value = /** @type {number} */ (reader.readUint64());
  3804. msg.setEnd(value);
  3805. break;
  3806. default:
  3807. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.TimeRange.extensionsBinary,
  3808. proto.transit_realtime.TimeRange.prototype.getExtension,
  3809. proto.transit_realtime.TimeRange.prototype.setExtension);
  3810. break;
  3811. }
  3812. }
  3813. return msg;
  3814. };
  3815. /**
  3816. * Class method variant: serializes the given message to binary data
  3817. * (in protobuf wire format), writing to the given BinaryWriter.
  3818. * @param {!proto.transit_realtime.TimeRange} message
  3819. * @param {!jspb.BinaryWriter} writer
  3820. */
  3821. proto.transit_realtime.TimeRange.serializeBinaryToWriter = function(message, writer) {
  3822. message.serializeBinaryToWriter(writer);
  3823. };
  3824. /**
  3825. * Serializes the message to binary data (in protobuf wire format).
  3826. * @return {!Uint8Array}
  3827. */
  3828. proto.transit_realtime.TimeRange.prototype.serializeBinary = function() {
  3829. var writer = new jspb.BinaryWriter();
  3830. this.serializeBinaryToWriter(writer);
  3831. return writer.getResultBuffer();
  3832. };
  3833. /**
  3834. * Serializes the message to binary data (in protobuf wire format),
  3835. * writing to the given BinaryWriter.
  3836. * @param {!jspb.BinaryWriter} writer
  3837. */
  3838. proto.transit_realtime.TimeRange.prototype.serializeBinaryToWriter = function (writer) {
  3839. var f = undefined;
  3840. f = jspb.Message.getField(this, 1);
  3841. if (f != null) {
  3842. writer.writeUint64(
  3843. 1,
  3844. f
  3845. );
  3846. }
  3847. f = jspb.Message.getField(this, 2);
  3848. if (f != null) {
  3849. writer.writeUint64(
  3850. 2,
  3851. f
  3852. );
  3853. }
  3854. jspb.Message.serializeBinaryExtensions(this, writer,
  3855. proto.transit_realtime.TimeRange.extensionsBinary, proto.transit_realtime.TimeRange.prototype.getExtension);
  3856. };
  3857. /**
  3858. * Creates a deep clone of this proto. No data is shared with the original.
  3859. * @return {!proto.transit_realtime.TimeRange} The clone.
  3860. */
  3861. proto.transit_realtime.TimeRange.prototype.cloneMessage = function() {
  3862. return /** @type {!proto.transit_realtime.TimeRange} */ (jspb.Message.cloneMessage(this));
  3863. };
  3864. /**
  3865. * optional uint64 start = 1;
  3866. * @return {number}
  3867. */
  3868. proto.transit_realtime.TimeRange.prototype.getStart = function() {
  3869. return /** @type {number} */ (!this.hasStart() ? 0 : jspb.Message.getField(this, 1));
  3870. };
  3871. /** @param {number?|undefined} value */
  3872. proto.transit_realtime.TimeRange.prototype.setStart = function(value) {
  3873. jspb.Message.setField(this, 1, value);
  3874. };
  3875. proto.transit_realtime.TimeRange.prototype.clearStart = function() {
  3876. jspb.Message.setField(this, 1, undefined);
  3877. };
  3878. /**
  3879. * Returns whether this field is set.
  3880. * @return{!boolean}
  3881. */
  3882. proto.transit_realtime.TimeRange.prototype.hasStart = function() {
  3883. return jspb.Message.getField(this, 1) != null;
  3884. };
  3885. /**
  3886. * optional uint64 end = 2;
  3887. * @return {number}
  3888. */
  3889. proto.transit_realtime.TimeRange.prototype.getEnd = function() {
  3890. return /** @type {number} */ (!this.hasEnd() ? 0 : jspb.Message.getField(this, 2));
  3891. };
  3892. /** @param {number?|undefined} value */
  3893. proto.transit_realtime.TimeRange.prototype.setEnd = function(value) {
  3894. jspb.Message.setField(this, 2, value);
  3895. };
  3896. proto.transit_realtime.TimeRange.prototype.clearEnd = function() {
  3897. jspb.Message.setField(this, 2, undefined);
  3898. };
  3899. /**
  3900. * Returns whether this field is set.
  3901. * @return{!boolean}
  3902. */
  3903. proto.transit_realtime.TimeRange.prototype.hasEnd = function() {
  3904. return jspb.Message.getField(this, 2) != null;
  3905. };
  3906. /**
  3907. * The extensions registered with this message class. This is a map of
  3908. * extension field number to fieldInfo object.
  3909. *
  3910. * For example:
  3911. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  3912. *
  3913. * fieldName contains the JsCompiler renamed field name property so that it
  3914. * works in OPTIMIZED mode.
  3915. *
  3916. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  3917. */
  3918. proto.transit_realtime.TimeRange.extensions = {};
  3919. /**
  3920. * The extensions registered with this message class. This is a map of
  3921. * extension field number to fieldInfo object.
  3922. *
  3923. * For example:
  3924. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  3925. *
  3926. * fieldName contains the JsCompiler renamed field name property so that it
  3927. * works in OPTIMIZED mode.
  3928. *
  3929. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  3930. */
  3931. proto.transit_realtime.TimeRange.extensionsBinary = {};
  3932. /**
  3933. * Generated by JsPbCodeGenerator.
  3934. * @param {Array=} opt_data Optional initial data array, typically from a
  3935. * server response, or constructed directly in Javascript. The array is used
  3936. * in place and becomes part of the constructed object. It is not cloned.
  3937. * If no data is provided, the constructed object will be empty, but still
  3938. * valid.
  3939. * @extends {jspb.Message}
  3940. * @constructor
  3941. */
  3942. proto.transit_realtime.Position = function(opt_data) {
  3943. jspb.Message.initialize(this, opt_data, 0, 6, null, null);
  3944. };
  3945. goog.inherits(proto.transit_realtime.Position, jspb.Message);
  3946. if (goog.DEBUG && !COMPILED) {
  3947. proto.transit_realtime.Position.displayName = 'proto.transit_realtime.Position';
  3948. }
  3949. if (jspb.Message.GENERATE_TO_OBJECT) {
  3950. /**
  3951. * Creates an object representation of this proto suitable for use in Soy templates.
  3952. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  3953. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  3954. * For the list of reserved names please see:
  3955. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  3956. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  3957. * for transitional soy proto support: http://goto/soy-param-migration
  3958. * @return {!Object}
  3959. */
  3960. proto.transit_realtime.Position.prototype.toObject = function(opt_includeInstance) {
  3961. return proto.transit_realtime.Position.toObject(opt_includeInstance, this);
  3962. };
  3963. /**
  3964. * Static version of the {@see toObject} method.
  3965. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  3966. * instance for transitional soy proto support:
  3967. * http://goto/soy-param-migration
  3968. * @param {!proto.transit_realtime.Position} msg The msg instance to transform.
  3969. * @return {!Object}
  3970. */
  3971. proto.transit_realtime.Position.toObject = function(includeInstance, msg) {
  3972. var f, obj = {
  3973. latitude: +jspb.Message.getField(msg, 1),
  3974. longitude: +jspb.Message.getField(msg, 2),
  3975. bearing: jspb.Message.getOptionalFloatingPointField(msg, 3),
  3976. odometer: jspb.Message.getOptionalFloatingPointField(msg, 4),
  3977. speed: jspb.Message.getOptionalFloatingPointField(msg, 5)
  3978. };
  3979. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  3980. proto.transit_realtime.Position.extensions, proto.transit_realtime.Position.prototype.getExtension,
  3981. includeInstance);
  3982. if (includeInstance) {
  3983. obj.$jspbMessageInstance = msg;
  3984. }
  3985. return obj;
  3986. };
  3987. }
  3988. /**
  3989. * Deserializes binary data (in protobuf wire format).
  3990. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  3991. * @return {!proto.transit_realtime.Position}
  3992. */
  3993. proto.transit_realtime.Position.deserializeBinary = function(bytes) {
  3994. var reader = new jspb.BinaryReader(bytes);
  3995. var msg = new proto.transit_realtime.Position;
  3996. return proto.transit_realtime.Position.deserializeBinaryFromReader(msg, reader);
  3997. };
  3998. /**
  3999. * Deserializes binary data (in protobuf wire format) from the
  4000. * given reader into the given message object.
  4001. * @param {!proto.transit_realtime.Position} msg The message object to deserialize into.
  4002. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  4003. * @return {!proto.transit_realtime.Position}
  4004. */
  4005. proto.transit_realtime.Position.deserializeBinaryFromReader = function(msg, reader) {
  4006. while (reader.nextField()) {
  4007. if (reader.isEndGroup()) {
  4008. break;
  4009. }
  4010. var field = reader.getFieldNumber();
  4011. switch (field) {
  4012. case 1:
  4013. var value = /** @type {number} */ (reader.readFloat());
  4014. msg.setLatitude(value);
  4015. break;
  4016. case 2:
  4017. var value = /** @type {number} */ (reader.readFloat());
  4018. msg.setLongitude(value);
  4019. break;
  4020. case 3:
  4021. var value = /** @type {number} */ (reader.readFloat());
  4022. msg.setBearing(value);
  4023. break;
  4024. case 4:
  4025. var value = /** @type {number} */ (reader.readDouble());
  4026. msg.setOdometer(value);
  4027. break;
  4028. case 5:
  4029. var value = /** @type {number} */ (reader.readFloat());
  4030. msg.setSpeed(value);
  4031. break;
  4032. default:
  4033. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.Position.extensionsBinary,
  4034. proto.transit_realtime.Position.prototype.getExtension,
  4035. proto.transit_realtime.Position.prototype.setExtension);
  4036. break;
  4037. }
  4038. }
  4039. return msg;
  4040. };
  4041. /**
  4042. * Class method variant: serializes the given message to binary data
  4043. * (in protobuf wire format), writing to the given BinaryWriter.
  4044. * @param {!proto.transit_realtime.Position} message
  4045. * @param {!jspb.BinaryWriter} writer
  4046. */
  4047. proto.transit_realtime.Position.serializeBinaryToWriter = function(message, writer) {
  4048. message.serializeBinaryToWriter(writer);
  4049. };
  4050. /**
  4051. * Serializes the message to binary data (in protobuf wire format).
  4052. * @return {!Uint8Array}
  4053. */
  4054. proto.transit_realtime.Position.prototype.serializeBinary = function() {
  4055. var writer = new jspb.BinaryWriter();
  4056. this.serializeBinaryToWriter(writer);
  4057. return writer.getResultBuffer();
  4058. };
  4059. /**
  4060. * Serializes the message to binary data (in protobuf wire format),
  4061. * writing to the given BinaryWriter.
  4062. * @param {!jspb.BinaryWriter} writer
  4063. */
  4064. proto.transit_realtime.Position.prototype.serializeBinaryToWriter = function (writer) {
  4065. var f = undefined;
  4066. f = jspb.Message.getField(this, 1);
  4067. if (f != null) {
  4068. writer.writeFloat(
  4069. 1,
  4070. f
  4071. );
  4072. }
  4073. f = jspb.Message.getField(this, 2);
  4074. if (f != null) {
  4075. writer.writeFloat(
  4076. 2,
  4077. f
  4078. );
  4079. }
  4080. f = jspb.Message.getField(this, 3);
  4081. if (f != null) {
  4082. writer.writeFloat(
  4083. 3,
  4084. f
  4085. );
  4086. }
  4087. f = jspb.Message.getField(this, 4);
  4088. if (f != null) {
  4089. writer.writeDouble(
  4090. 4,
  4091. f
  4092. );
  4093. }
  4094. f = jspb.Message.getField(this, 5);
  4095. if (f != null) {
  4096. writer.writeFloat(
  4097. 5,
  4098. f
  4099. );
  4100. }
  4101. jspb.Message.serializeBinaryExtensions(this, writer,
  4102. proto.transit_realtime.Position.extensionsBinary, proto.transit_realtime.Position.prototype.getExtension);
  4103. };
  4104. /**
  4105. * Creates a deep clone of this proto. No data is shared with the original.
  4106. * @return {!proto.transit_realtime.Position} The clone.
  4107. */
  4108. proto.transit_realtime.Position.prototype.cloneMessage = function() {
  4109. return /** @type {!proto.transit_realtime.Position} */ (jspb.Message.cloneMessage(this));
  4110. };
  4111. /**
  4112. * required float latitude = 1;
  4113. * @return {number}
  4114. */
  4115. proto.transit_realtime.Position.prototype.getLatitude = function() {
  4116. return /** @type {number} */ (!this.hasLatitude() ? 0.0 : +jspb.Message.getField(this, 1));
  4117. };
  4118. /** @param {number|undefined} value */
  4119. proto.transit_realtime.Position.prototype.setLatitude = function(value) {
  4120. jspb.Message.setField(this, 1, value);
  4121. };
  4122. proto.transit_realtime.Position.prototype.clearLatitude = function() {
  4123. jspb.Message.setField(this, 1, undefined);
  4124. };
  4125. /**
  4126. * Returns whether this field is set.
  4127. * @return{!boolean}
  4128. */
  4129. proto.transit_realtime.Position.prototype.hasLatitude = function() {
  4130. return jspb.Message.getField(this, 1) != null;
  4131. };
  4132. /**
  4133. * required float longitude = 2;
  4134. * @return {number}
  4135. */
  4136. proto.transit_realtime.Position.prototype.getLongitude = function() {
  4137. return /** @type {number} */ (!this.hasLongitude() ? 0.0 : +jspb.Message.getField(this, 2));
  4138. };
  4139. /** @param {number|undefined} value */
  4140. proto.transit_realtime.Position.prototype.setLongitude = function(value) {
  4141. jspb.Message.setField(this, 2, value);
  4142. };
  4143. proto.transit_realtime.Position.prototype.clearLongitude = function() {
  4144. jspb.Message.setField(this, 2, undefined);
  4145. };
  4146. /**
  4147. * Returns whether this field is set.
  4148. * @return{!boolean}
  4149. */
  4150. proto.transit_realtime.Position.prototype.hasLongitude = function() {
  4151. return jspb.Message.getField(this, 2) != null;
  4152. };
  4153. /**
  4154. * optional float bearing = 3;
  4155. * @return {number}
  4156. */
  4157. proto.transit_realtime.Position.prototype.getBearing = function() {
  4158. return /** @type {number} */ (!this.hasBearing() ? 0.0 : +jspb.Message.getField(this, 3));
  4159. };
  4160. /** @param {number?|undefined} value */
  4161. proto.transit_realtime.Position.prototype.setBearing = function(value) {
  4162. jspb.Message.setField(this, 3, value);
  4163. };
  4164. proto.transit_realtime.Position.prototype.clearBearing = function() {
  4165. jspb.Message.setField(this, 3, undefined);
  4166. };
  4167. /**
  4168. * Returns whether this field is set.
  4169. * @return{!boolean}
  4170. */
  4171. proto.transit_realtime.Position.prototype.hasBearing = function() {
  4172. return jspb.Message.getField(this, 3) != null;
  4173. };
  4174. /**
  4175. * optional double odometer = 4;
  4176. * @return {number}
  4177. */
  4178. proto.transit_realtime.Position.prototype.getOdometer = function() {
  4179. return /** @type {number} */ (!this.hasOdometer() ? 0.0 : +jspb.Message.getField(this, 4));
  4180. };
  4181. /** @param {number?|undefined} value */
  4182. proto.transit_realtime.Position.prototype.setOdometer = function(value) {
  4183. jspb.Message.setField(this, 4, value);
  4184. };
  4185. proto.transit_realtime.Position.prototype.clearOdometer = function() {
  4186. jspb.Message.setField(this, 4, undefined);
  4187. };
  4188. /**
  4189. * Returns whether this field is set.
  4190. * @return{!boolean}
  4191. */
  4192. proto.transit_realtime.Position.prototype.hasOdometer = function() {
  4193. return jspb.Message.getField(this, 4) != null;
  4194. };
  4195. /**
  4196. * optional float speed = 5;
  4197. * @return {number}
  4198. */
  4199. proto.transit_realtime.Position.prototype.getSpeed = function() {
  4200. return /** @type {number} */ (!this.hasSpeed() ? 0.0 : +jspb.Message.getField(this, 5));
  4201. };
  4202. /** @param {number?|undefined} value */
  4203. proto.transit_realtime.Position.prototype.setSpeed = function(value) {
  4204. jspb.Message.setField(this, 5, value);
  4205. };
  4206. proto.transit_realtime.Position.prototype.clearSpeed = function() {
  4207. jspb.Message.setField(this, 5, undefined);
  4208. };
  4209. /**
  4210. * Returns whether this field is set.
  4211. * @return{!boolean}
  4212. */
  4213. proto.transit_realtime.Position.prototype.hasSpeed = function() {
  4214. return jspb.Message.getField(this, 5) != null;
  4215. };
  4216. /**
  4217. * The extensions registered with this message class. This is a map of
  4218. * extension field number to fieldInfo object.
  4219. *
  4220. * For example:
  4221. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  4222. *
  4223. * fieldName contains the JsCompiler renamed field name property so that it
  4224. * works in OPTIMIZED mode.
  4225. *
  4226. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  4227. */
  4228. proto.transit_realtime.Position.extensions = {};
  4229. /**
  4230. * The extensions registered with this message class. This is a map of
  4231. * extension field number to fieldInfo object.
  4232. *
  4233. * For example:
  4234. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  4235. *
  4236. * fieldName contains the JsCompiler renamed field name property so that it
  4237. * works in OPTIMIZED mode.
  4238. *
  4239. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  4240. */
  4241. proto.transit_realtime.Position.extensionsBinary = {};
  4242. /**
  4243. * Generated by JsPbCodeGenerator.
  4244. * @param {Array=} opt_data Optional initial data array, typically from a
  4245. * server response, or constructed directly in Javascript. The array is used
  4246. * in place and becomes part of the constructed object. It is not cloned.
  4247. * If no data is provided, the constructed object will be empty, but still
  4248. * valid.
  4249. * @extends {jspb.Message}
  4250. * @constructor
  4251. */
  4252. proto.transit_realtime.TripDescriptor = function(opt_data) {
  4253. jspb.Message.initialize(this, opt_data, 0, 7, null, null);
  4254. };
  4255. goog.inherits(proto.transit_realtime.TripDescriptor, jspb.Message);
  4256. if (goog.DEBUG && !COMPILED) {
  4257. proto.transit_realtime.TripDescriptor.displayName = 'proto.transit_realtime.TripDescriptor';
  4258. }
  4259. if (jspb.Message.GENERATE_TO_OBJECT) {
  4260. /**
  4261. * Creates an object representation of this proto suitable for use in Soy templates.
  4262. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  4263. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  4264. * For the list of reserved names please see:
  4265. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  4266. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  4267. * for transitional soy proto support: http://goto/soy-param-migration
  4268. * @return {!Object}
  4269. */
  4270. proto.transit_realtime.TripDescriptor.prototype.toObject = function(opt_includeInstance) {
  4271. return proto.transit_realtime.TripDescriptor.toObject(opt_includeInstance, this);
  4272. };
  4273. /**
  4274. * Static version of the {@see toObject} method.
  4275. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  4276. * instance for transitional soy proto support:
  4277. * http://goto/soy-param-migration
  4278. * @param {!proto.transit_realtime.TripDescriptor} msg The msg instance to transform.
  4279. * @return {!Object}
  4280. */
  4281. proto.transit_realtime.TripDescriptor.toObject = function(includeInstance, msg) {
  4282. var f, obj = {
  4283. tripId: jspb.Message.getField(msg, 1),
  4284. routeId: jspb.Message.getField(msg, 5),
  4285. directionId: jspb.Message.getField(msg, 6),
  4286. startTime: jspb.Message.getField(msg, 2),
  4287. startDate: jspb.Message.getField(msg, 3),
  4288. scheduleRelationship: jspb.Message.getField(msg, 4)
  4289. };
  4290. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  4291. proto.transit_realtime.TripDescriptor.extensions, proto.transit_realtime.TripDescriptor.prototype.getExtension,
  4292. includeInstance);
  4293. if (includeInstance) {
  4294. obj.$jspbMessageInstance = msg;
  4295. }
  4296. return obj;
  4297. };
  4298. }
  4299. /**
  4300. * Deserializes binary data (in protobuf wire format).
  4301. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  4302. * @return {!proto.transit_realtime.TripDescriptor}
  4303. */
  4304. proto.transit_realtime.TripDescriptor.deserializeBinary = function(bytes) {
  4305. var reader = new jspb.BinaryReader(bytes);
  4306. var msg = new proto.transit_realtime.TripDescriptor;
  4307. return proto.transit_realtime.TripDescriptor.deserializeBinaryFromReader(msg, reader);
  4308. };
  4309. /**
  4310. * Deserializes binary data (in protobuf wire format) from the
  4311. * given reader into the given message object.
  4312. * @param {!proto.transit_realtime.TripDescriptor} msg The message object to deserialize into.
  4313. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  4314. * @return {!proto.transit_realtime.TripDescriptor}
  4315. */
  4316. proto.transit_realtime.TripDescriptor.deserializeBinaryFromReader = function(msg, reader) {
  4317. while (reader.nextField()) {
  4318. if (reader.isEndGroup()) {
  4319. break;
  4320. }
  4321. var field = reader.getFieldNumber();
  4322. switch (field) {
  4323. case 1:
  4324. var value = /** @type {string} */ (reader.readString());
  4325. msg.setTripId(value);
  4326. break;
  4327. case 5:
  4328. var value = /** @type {string} */ (reader.readString());
  4329. msg.setRouteId(value);
  4330. break;
  4331. case 6:
  4332. var value = /** @type {number} */ (reader.readUint32());
  4333. msg.setDirectionId(value);
  4334. break;
  4335. case 2:
  4336. var value = /** @type {string} */ (reader.readString());
  4337. msg.setStartTime(value);
  4338. break;
  4339. case 3:
  4340. var value = /** @type {string} */ (reader.readString());
  4341. msg.setStartDate(value);
  4342. break;
  4343. case 4:
  4344. var value = /** @type {!proto.transit_realtime.TripDescriptor.ScheduleRelationship} */ (reader.readEnum());
  4345. msg.setScheduleRelationship(value);
  4346. break;
  4347. default:
  4348. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.TripDescriptor.extensionsBinary,
  4349. proto.transit_realtime.TripDescriptor.prototype.getExtension,
  4350. proto.transit_realtime.TripDescriptor.prototype.setExtension);
  4351. break;
  4352. }
  4353. }
  4354. return msg;
  4355. };
  4356. /**
  4357. * Class method variant: serializes the given message to binary data
  4358. * (in protobuf wire format), writing to the given BinaryWriter.
  4359. * @param {!proto.transit_realtime.TripDescriptor} message
  4360. * @param {!jspb.BinaryWriter} writer
  4361. */
  4362. proto.transit_realtime.TripDescriptor.serializeBinaryToWriter = function(message, writer) {
  4363. message.serializeBinaryToWriter(writer);
  4364. };
  4365. /**
  4366. * Serializes the message to binary data (in protobuf wire format).
  4367. * @return {!Uint8Array}
  4368. */
  4369. proto.transit_realtime.TripDescriptor.prototype.serializeBinary = function() {
  4370. var writer = new jspb.BinaryWriter();
  4371. this.serializeBinaryToWriter(writer);
  4372. return writer.getResultBuffer();
  4373. };
  4374. /**
  4375. * Serializes the message to binary data (in protobuf wire format),
  4376. * writing to the given BinaryWriter.
  4377. * @param {!jspb.BinaryWriter} writer
  4378. */
  4379. proto.transit_realtime.TripDescriptor.prototype.serializeBinaryToWriter = function (writer) {
  4380. var f = undefined;
  4381. f = jspb.Message.getField(this, 1);
  4382. if (f != null) {
  4383. writer.writeString(
  4384. 1,
  4385. f
  4386. );
  4387. }
  4388. f = jspb.Message.getField(this, 5);
  4389. if (f != null) {
  4390. writer.writeString(
  4391. 5,
  4392. f
  4393. );
  4394. }
  4395. f = jspb.Message.getField(this, 6);
  4396. if (f != null) {
  4397. writer.writeUint32(
  4398. 6,
  4399. f
  4400. );
  4401. }
  4402. f = jspb.Message.getField(this, 2);
  4403. if (f != null) {
  4404. writer.writeString(
  4405. 2,
  4406. f
  4407. );
  4408. }
  4409. f = jspb.Message.getField(this, 3);
  4410. if (f != null) {
  4411. writer.writeString(
  4412. 3,
  4413. f
  4414. );
  4415. }
  4416. f = jspb.Message.getField(this, 4);
  4417. if (f != null) {
  4418. writer.writeEnum(
  4419. 4,
  4420. f
  4421. );
  4422. }
  4423. jspb.Message.serializeBinaryExtensions(this, writer,
  4424. proto.transit_realtime.TripDescriptor.extensionsBinary, proto.transit_realtime.TripDescriptor.prototype.getExtension);
  4425. };
  4426. /**
  4427. * Creates a deep clone of this proto. No data is shared with the original.
  4428. * @return {!proto.transit_realtime.TripDescriptor} The clone.
  4429. */
  4430. proto.transit_realtime.TripDescriptor.prototype.cloneMessage = function() {
  4431. return /** @type {!proto.transit_realtime.TripDescriptor} */ (jspb.Message.cloneMessage(this));
  4432. };
  4433. /**
  4434. * optional string trip_id = 1;
  4435. * @return {string}
  4436. */
  4437. proto.transit_realtime.TripDescriptor.prototype.getTripId = function() {
  4438. return /** @type {string} */ (!this.hasTripId() ? "" : jspb.Message.getField(this, 1));
  4439. };
  4440. /** @param {string?|undefined} value */
  4441. proto.transit_realtime.TripDescriptor.prototype.setTripId = function(value) {
  4442. jspb.Message.setField(this, 1, value);
  4443. };
  4444. proto.transit_realtime.TripDescriptor.prototype.clearTripId = function() {
  4445. jspb.Message.setField(this, 1, undefined);
  4446. };
  4447. /**
  4448. * Returns whether this field is set.
  4449. * @return{!boolean}
  4450. */
  4451. proto.transit_realtime.TripDescriptor.prototype.hasTripId = function() {
  4452. return jspb.Message.getField(this, 1) != null;
  4453. };
  4454. /**
  4455. * optional string route_id = 5;
  4456. * @return {string}
  4457. */
  4458. proto.transit_realtime.TripDescriptor.prototype.getRouteId = function() {
  4459. return /** @type {string} */ (!this.hasRouteId() ? "" : jspb.Message.getField(this, 5));
  4460. };
  4461. /** @param {string?|undefined} value */
  4462. proto.transit_realtime.TripDescriptor.prototype.setRouteId = function(value) {
  4463. jspb.Message.setField(this, 5, value);
  4464. };
  4465. proto.transit_realtime.TripDescriptor.prototype.clearRouteId = function() {
  4466. jspb.Message.setField(this, 5, undefined);
  4467. };
  4468. /**
  4469. * Returns whether this field is set.
  4470. * @return{!boolean}
  4471. */
  4472. proto.transit_realtime.TripDescriptor.prototype.hasRouteId = function() {
  4473. return jspb.Message.getField(this, 5) != null;
  4474. };
  4475. /**
  4476. * optional uint32 direction_id = 6;
  4477. * @return {number}
  4478. */
  4479. proto.transit_realtime.TripDescriptor.prototype.getDirectionId = function() {
  4480. return /** @type {number} */ (!this.hasDirectionId() ? 0 : jspb.Message.getField(this, 6));
  4481. };
  4482. /** @param {number?|undefined} value */
  4483. proto.transit_realtime.TripDescriptor.prototype.setDirectionId = function(value) {
  4484. jspb.Message.setField(this, 6, value);
  4485. };
  4486. proto.transit_realtime.TripDescriptor.prototype.clearDirectionId = function() {
  4487. jspb.Message.setField(this, 6, undefined);
  4488. };
  4489. /**
  4490. * Returns whether this field is set.
  4491. * @return{!boolean}
  4492. */
  4493. proto.transit_realtime.TripDescriptor.prototype.hasDirectionId = function() {
  4494. return jspb.Message.getField(this, 6) != null;
  4495. };
  4496. /**
  4497. * optional string start_time = 2;
  4498. * @return {string}
  4499. */
  4500. proto.transit_realtime.TripDescriptor.prototype.getStartTime = function() {
  4501. return /** @type {string} */ (!this.hasStartTime() ? "" : jspb.Message.getField(this, 2));
  4502. };
  4503. /** @param {string?|undefined} value */
  4504. proto.transit_realtime.TripDescriptor.prototype.setStartTime = function(value) {
  4505. jspb.Message.setField(this, 2, value);
  4506. };
  4507. proto.transit_realtime.TripDescriptor.prototype.clearStartTime = function() {
  4508. jspb.Message.setField(this, 2, undefined);
  4509. };
  4510. /**
  4511. * Returns whether this field is set.
  4512. * @return{!boolean}
  4513. */
  4514. proto.transit_realtime.TripDescriptor.prototype.hasStartTime = function() {
  4515. return jspb.Message.getField(this, 2) != null;
  4516. };
  4517. /**
  4518. * optional string start_date = 3;
  4519. * @return {string}
  4520. */
  4521. proto.transit_realtime.TripDescriptor.prototype.getStartDate = function() {
  4522. return /** @type {string} */ (!this.hasStartDate() ? "" : jspb.Message.getField(this, 3));
  4523. };
  4524. /** @param {string?|undefined} value */
  4525. proto.transit_realtime.TripDescriptor.prototype.setStartDate = function(value) {
  4526. jspb.Message.setField(this, 3, value);
  4527. };
  4528. proto.transit_realtime.TripDescriptor.prototype.clearStartDate = function() {
  4529. jspb.Message.setField(this, 3, undefined);
  4530. };
  4531. /**
  4532. * Returns whether this field is set.
  4533. * @return{!boolean}
  4534. */
  4535. proto.transit_realtime.TripDescriptor.prototype.hasStartDate = function() {
  4536. return jspb.Message.getField(this, 3) != null;
  4537. };
  4538. /**
  4539. * optional ScheduleRelationship schedule_relationship = 4;
  4540. * @return {proto.transit_realtime.TripDescriptor.ScheduleRelationship}
  4541. */
  4542. proto.transit_realtime.TripDescriptor.prototype.getScheduleRelationship = function() {
  4543. return /** @type {proto.transit_realtime.TripDescriptor.ScheduleRelationship} */ (!this.hasScheduleRelationship() ? 0 : jspb.Message.getField(this, 4));
  4544. };
  4545. /** @param {proto.transit_realtime.TripDescriptor.ScheduleRelationship|undefined} value */
  4546. proto.transit_realtime.TripDescriptor.prototype.setScheduleRelationship = function(value) {
  4547. jspb.Message.setField(this, 4, value);
  4548. };
  4549. proto.transit_realtime.TripDescriptor.prototype.clearScheduleRelationship = function() {
  4550. jspb.Message.setField(this, 4, undefined);
  4551. };
  4552. /**
  4553. * Returns whether this field is set.
  4554. * @return{!boolean}
  4555. */
  4556. proto.transit_realtime.TripDescriptor.prototype.hasScheduleRelationship = function() {
  4557. return jspb.Message.getField(this, 4) != null;
  4558. };
  4559. /**
  4560. * The extensions registered with this message class. This is a map of
  4561. * extension field number to fieldInfo object.
  4562. *
  4563. * For example:
  4564. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  4565. *
  4566. * fieldName contains the JsCompiler renamed field name property so that it
  4567. * works in OPTIMIZED mode.
  4568. *
  4569. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  4570. */
  4571. proto.transit_realtime.TripDescriptor.extensions = {};
  4572. /**
  4573. * The extensions registered with this message class. This is a map of
  4574. * extension field number to fieldInfo object.
  4575. *
  4576. * For example:
  4577. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  4578. *
  4579. * fieldName contains the JsCompiler renamed field name property so that it
  4580. * works in OPTIMIZED mode.
  4581. *
  4582. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  4583. */
  4584. proto.transit_realtime.TripDescriptor.extensionsBinary = {};
  4585. /**
  4586. * @enum {number}
  4587. */
  4588. proto.transit_realtime.TripDescriptor.ScheduleRelationship = {
  4589. SCHEDULED: 0,
  4590. ADDED: 1,
  4591. UNSCHEDULED: 2,
  4592. CANCELED: 3,
  4593. REPLACEMENT: 5,
  4594. DUPLICATED: 6
  4595. };
  4596. /**
  4597. * Generated by JsPbCodeGenerator.
  4598. * @param {Array=} opt_data Optional initial data array, typically from a
  4599. * server response, or constructed directly in Javascript. The array is used
  4600. * in place and becomes part of the constructed object. It is not cloned.
  4601. * If no data is provided, the constructed object will be empty, but still
  4602. * valid.
  4603. * @extends {jspb.Message}
  4604. * @constructor
  4605. */
  4606. proto.transit_realtime.VehicleDescriptor = function(opt_data) {
  4607. jspb.Message.initialize(this, opt_data, 0, 4, null, null);
  4608. };
  4609. goog.inherits(proto.transit_realtime.VehicleDescriptor, jspb.Message);
  4610. if (goog.DEBUG && !COMPILED) {
  4611. proto.transit_realtime.VehicleDescriptor.displayName = 'proto.transit_realtime.VehicleDescriptor';
  4612. }
  4613. if (jspb.Message.GENERATE_TO_OBJECT) {
  4614. /**
  4615. * Creates an object representation of this proto suitable for use in Soy templates.
  4616. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  4617. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  4618. * For the list of reserved names please see:
  4619. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  4620. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  4621. * for transitional soy proto support: http://goto/soy-param-migration
  4622. * @return {!Object}
  4623. */
  4624. proto.transit_realtime.VehicleDescriptor.prototype.toObject = function(opt_includeInstance) {
  4625. return proto.transit_realtime.VehicleDescriptor.toObject(opt_includeInstance, this);
  4626. };
  4627. /**
  4628. * Static version of the {@see toObject} method.
  4629. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  4630. * instance for transitional soy proto support:
  4631. * http://goto/soy-param-migration
  4632. * @param {!proto.transit_realtime.VehicleDescriptor} msg The msg instance to transform.
  4633. * @return {!Object}
  4634. */
  4635. proto.transit_realtime.VehicleDescriptor.toObject = function(includeInstance, msg) {
  4636. var f, obj = {
  4637. id: jspb.Message.getField(msg, 1),
  4638. label: jspb.Message.getField(msg, 2),
  4639. licensePlate: jspb.Message.getField(msg, 3)
  4640. };
  4641. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  4642. proto.transit_realtime.VehicleDescriptor.extensions, proto.transit_realtime.VehicleDescriptor.prototype.getExtension,
  4643. includeInstance);
  4644. if (includeInstance) {
  4645. obj.$jspbMessageInstance = msg;
  4646. }
  4647. return obj;
  4648. };
  4649. }
  4650. /**
  4651. * Deserializes binary data (in protobuf wire format).
  4652. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  4653. * @return {!proto.transit_realtime.VehicleDescriptor}
  4654. */
  4655. proto.transit_realtime.VehicleDescriptor.deserializeBinary = function(bytes) {
  4656. var reader = new jspb.BinaryReader(bytes);
  4657. var msg = new proto.transit_realtime.VehicleDescriptor;
  4658. return proto.transit_realtime.VehicleDescriptor.deserializeBinaryFromReader(msg, reader);
  4659. };
  4660. /**
  4661. * Deserializes binary data (in protobuf wire format) from the
  4662. * given reader into the given message object.
  4663. * @param {!proto.transit_realtime.VehicleDescriptor} msg The message object to deserialize into.
  4664. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  4665. * @return {!proto.transit_realtime.VehicleDescriptor}
  4666. */
  4667. proto.transit_realtime.VehicleDescriptor.deserializeBinaryFromReader = function(msg, reader) {
  4668. while (reader.nextField()) {
  4669. if (reader.isEndGroup()) {
  4670. break;
  4671. }
  4672. var field = reader.getFieldNumber();
  4673. switch (field) {
  4674. case 1:
  4675. var value = /** @type {string} */ (reader.readString());
  4676. msg.setId(value);
  4677. break;
  4678. case 2:
  4679. var value = /** @type {string} */ (reader.readString());
  4680. msg.setLabel(value);
  4681. break;
  4682. case 3:
  4683. var value = /** @type {string} */ (reader.readString());
  4684. msg.setLicensePlate(value);
  4685. break;
  4686. default:
  4687. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.VehicleDescriptor.extensionsBinary,
  4688. proto.transit_realtime.VehicleDescriptor.prototype.getExtension,
  4689. proto.transit_realtime.VehicleDescriptor.prototype.setExtension);
  4690. break;
  4691. }
  4692. }
  4693. return msg;
  4694. };
  4695. /**
  4696. * Class method variant: serializes the given message to binary data
  4697. * (in protobuf wire format), writing to the given BinaryWriter.
  4698. * @param {!proto.transit_realtime.VehicleDescriptor} message
  4699. * @param {!jspb.BinaryWriter} writer
  4700. */
  4701. proto.transit_realtime.VehicleDescriptor.serializeBinaryToWriter = function(message, writer) {
  4702. message.serializeBinaryToWriter(writer);
  4703. };
  4704. /**
  4705. * Serializes the message to binary data (in protobuf wire format).
  4706. * @return {!Uint8Array}
  4707. */
  4708. proto.transit_realtime.VehicleDescriptor.prototype.serializeBinary = function() {
  4709. var writer = new jspb.BinaryWriter();
  4710. this.serializeBinaryToWriter(writer);
  4711. return writer.getResultBuffer();
  4712. };
  4713. /**
  4714. * Serializes the message to binary data (in protobuf wire format),
  4715. * writing to the given BinaryWriter.
  4716. * @param {!jspb.BinaryWriter} writer
  4717. */
  4718. proto.transit_realtime.VehicleDescriptor.prototype.serializeBinaryToWriter = function (writer) {
  4719. var f = undefined;
  4720. f = jspb.Message.getField(this, 1);
  4721. if (f != null) {
  4722. writer.writeString(
  4723. 1,
  4724. f
  4725. );
  4726. }
  4727. f = jspb.Message.getField(this, 2);
  4728. if (f != null) {
  4729. writer.writeString(
  4730. 2,
  4731. f
  4732. );
  4733. }
  4734. f = jspb.Message.getField(this, 3);
  4735. if (f != null) {
  4736. writer.writeString(
  4737. 3,
  4738. f
  4739. );
  4740. }
  4741. jspb.Message.serializeBinaryExtensions(this, writer,
  4742. proto.transit_realtime.VehicleDescriptor.extensionsBinary, proto.transit_realtime.VehicleDescriptor.prototype.getExtension);
  4743. };
  4744. /**
  4745. * Creates a deep clone of this proto. No data is shared with the original.
  4746. * @return {!proto.transit_realtime.VehicleDescriptor} The clone.
  4747. */
  4748. proto.transit_realtime.VehicleDescriptor.prototype.cloneMessage = function() {
  4749. return /** @type {!proto.transit_realtime.VehicleDescriptor} */ (jspb.Message.cloneMessage(this));
  4750. };
  4751. /**
  4752. * optional string id = 1;
  4753. * @return {string}
  4754. */
  4755. proto.transit_realtime.VehicleDescriptor.prototype.getId = function() {
  4756. return /** @type {string} */ (!this.hasId() ? "" : jspb.Message.getField(this, 1));
  4757. };
  4758. /** @param {string?|undefined} value */
  4759. proto.transit_realtime.VehicleDescriptor.prototype.setId = function(value) {
  4760. jspb.Message.setField(this, 1, value);
  4761. };
  4762. proto.transit_realtime.VehicleDescriptor.prototype.clearId = function() {
  4763. jspb.Message.setField(this, 1, undefined);
  4764. };
  4765. /**
  4766. * Returns whether this field is set.
  4767. * @return{!boolean}
  4768. */
  4769. proto.transit_realtime.VehicleDescriptor.prototype.hasId = function() {
  4770. return jspb.Message.getField(this, 1) != null;
  4771. };
  4772. /**
  4773. * optional string label = 2;
  4774. * @return {string}
  4775. */
  4776. proto.transit_realtime.VehicleDescriptor.prototype.getLabel = function() {
  4777. return /** @type {string} */ (!this.hasLabel() ? "" : jspb.Message.getField(this, 2));
  4778. };
  4779. /** @param {string?|undefined} value */
  4780. proto.transit_realtime.VehicleDescriptor.prototype.setLabel = function(value) {
  4781. jspb.Message.setField(this, 2, value);
  4782. };
  4783. proto.transit_realtime.VehicleDescriptor.prototype.clearLabel = function() {
  4784. jspb.Message.setField(this, 2, undefined);
  4785. };
  4786. /**
  4787. * Returns whether this field is set.
  4788. * @return{!boolean}
  4789. */
  4790. proto.transit_realtime.VehicleDescriptor.prototype.hasLabel = function() {
  4791. return jspb.Message.getField(this, 2) != null;
  4792. };
  4793. /**
  4794. * optional string license_plate = 3;
  4795. * @return {string}
  4796. */
  4797. proto.transit_realtime.VehicleDescriptor.prototype.getLicensePlate = function() {
  4798. return /** @type {string} */ (!this.hasLicensePlate() ? "" : jspb.Message.getField(this, 3));
  4799. };
  4800. /** @param {string?|undefined} value */
  4801. proto.transit_realtime.VehicleDescriptor.prototype.setLicensePlate = function(value) {
  4802. jspb.Message.setField(this, 3, value);
  4803. };
  4804. proto.transit_realtime.VehicleDescriptor.prototype.clearLicensePlate = function() {
  4805. jspb.Message.setField(this, 3, undefined);
  4806. };
  4807. /**
  4808. * Returns whether this field is set.
  4809. * @return{!boolean}
  4810. */
  4811. proto.transit_realtime.VehicleDescriptor.prototype.hasLicensePlate = function() {
  4812. return jspb.Message.getField(this, 3) != null;
  4813. };
  4814. /**
  4815. * The extensions registered with this message class. This is a map of
  4816. * extension field number to fieldInfo object.
  4817. *
  4818. * For example:
  4819. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  4820. *
  4821. * fieldName contains the JsCompiler renamed field name property so that it
  4822. * works in OPTIMIZED mode.
  4823. *
  4824. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  4825. */
  4826. proto.transit_realtime.VehicleDescriptor.extensions = {};
  4827. /**
  4828. * The extensions registered with this message class. This is a map of
  4829. * extension field number to fieldInfo object.
  4830. *
  4831. * For example:
  4832. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  4833. *
  4834. * fieldName contains the JsCompiler renamed field name property so that it
  4835. * works in OPTIMIZED mode.
  4836. *
  4837. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  4838. */
  4839. proto.transit_realtime.VehicleDescriptor.extensionsBinary = {};
  4840. /**
  4841. * Generated by JsPbCodeGenerator.
  4842. * @param {Array=} opt_data Optional initial data array, typically from a
  4843. * server response, or constructed directly in Javascript. The array is used
  4844. * in place and becomes part of the constructed object. It is not cloned.
  4845. * If no data is provided, the constructed object will be empty, but still
  4846. * valid.
  4847. * @extends {jspb.Message}
  4848. * @constructor
  4849. */
  4850. proto.transit_realtime.EntitySelector = function(opt_data) {
  4851. jspb.Message.initialize(this, opt_data, 0, 7, null, null);
  4852. };
  4853. goog.inherits(proto.transit_realtime.EntitySelector, jspb.Message);
  4854. if (goog.DEBUG && !COMPILED) {
  4855. proto.transit_realtime.EntitySelector.displayName = 'proto.transit_realtime.EntitySelector';
  4856. }
  4857. if (jspb.Message.GENERATE_TO_OBJECT) {
  4858. /**
  4859. * Creates an object representation of this proto suitable for use in Soy templates.
  4860. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  4861. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  4862. * For the list of reserved names please see:
  4863. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  4864. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  4865. * for transitional soy proto support: http://goto/soy-param-migration
  4866. * @return {!Object}
  4867. */
  4868. proto.transit_realtime.EntitySelector.prototype.toObject = function(opt_includeInstance) {
  4869. return proto.transit_realtime.EntitySelector.toObject(opt_includeInstance, this);
  4870. };
  4871. /**
  4872. * Static version of the {@see toObject} method.
  4873. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  4874. * instance for transitional soy proto support:
  4875. * http://goto/soy-param-migration
  4876. * @param {!proto.transit_realtime.EntitySelector} msg The msg instance to transform.
  4877. * @return {!Object}
  4878. */
  4879. proto.transit_realtime.EntitySelector.toObject = function(includeInstance, msg) {
  4880. var f, obj = {
  4881. agencyId: jspb.Message.getField(msg, 1),
  4882. routeId: jspb.Message.getField(msg, 2),
  4883. routeType: jspb.Message.getField(msg, 3),
  4884. trip: (f = msg.getTrip()) && proto.transit_realtime.TripDescriptor.toObject(includeInstance, f),
  4885. stopId: jspb.Message.getField(msg, 5),
  4886. directionId: jspb.Message.getField(msg, 6)
  4887. };
  4888. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  4889. proto.transit_realtime.EntitySelector.extensions, proto.transit_realtime.EntitySelector.prototype.getExtension,
  4890. includeInstance);
  4891. if (includeInstance) {
  4892. obj.$jspbMessageInstance = msg;
  4893. }
  4894. return obj;
  4895. };
  4896. }
  4897. /**
  4898. * Deserializes binary data (in protobuf wire format).
  4899. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  4900. * @return {!proto.transit_realtime.EntitySelector}
  4901. */
  4902. proto.transit_realtime.EntitySelector.deserializeBinary = function(bytes) {
  4903. var reader = new jspb.BinaryReader(bytes);
  4904. var msg = new proto.transit_realtime.EntitySelector;
  4905. return proto.transit_realtime.EntitySelector.deserializeBinaryFromReader(msg, reader);
  4906. };
  4907. /**
  4908. * Deserializes binary data (in protobuf wire format) from the
  4909. * given reader into the given message object.
  4910. * @param {!proto.transit_realtime.EntitySelector} msg The message object to deserialize into.
  4911. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  4912. * @return {!proto.transit_realtime.EntitySelector}
  4913. */
  4914. proto.transit_realtime.EntitySelector.deserializeBinaryFromReader = function(msg, reader) {
  4915. while (reader.nextField()) {
  4916. if (reader.isEndGroup()) {
  4917. break;
  4918. }
  4919. var field = reader.getFieldNumber();
  4920. switch (field) {
  4921. case 1:
  4922. var value = /** @type {string} */ (reader.readString());
  4923. msg.setAgencyId(value);
  4924. break;
  4925. case 2:
  4926. var value = /** @type {string} */ (reader.readString());
  4927. msg.setRouteId(value);
  4928. break;
  4929. case 3:
  4930. var value = /** @type {number} */ (reader.readInt32());
  4931. msg.setRouteType(value);
  4932. break;
  4933. case 4:
  4934. var value = new proto.transit_realtime.TripDescriptor;
  4935. reader.readMessage(value,proto.transit_realtime.TripDescriptor.deserializeBinaryFromReader);
  4936. msg.setTrip(value);
  4937. break;
  4938. case 5:
  4939. var value = /** @type {string} */ (reader.readString());
  4940. msg.setStopId(value);
  4941. break;
  4942. case 6:
  4943. var value = /** @type {number} */ (reader.readUint32());
  4944. msg.setDirectionId(value);
  4945. break;
  4946. default:
  4947. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.EntitySelector.extensionsBinary,
  4948. proto.transit_realtime.EntitySelector.prototype.getExtension,
  4949. proto.transit_realtime.EntitySelector.prototype.setExtension);
  4950. break;
  4951. }
  4952. }
  4953. return msg;
  4954. };
  4955. /**
  4956. * Class method variant: serializes the given message to binary data
  4957. * (in protobuf wire format), writing to the given BinaryWriter.
  4958. * @param {!proto.transit_realtime.EntitySelector} message
  4959. * @param {!jspb.BinaryWriter} writer
  4960. */
  4961. proto.transit_realtime.EntitySelector.serializeBinaryToWriter = function(message, writer) {
  4962. message.serializeBinaryToWriter(writer);
  4963. };
  4964. /**
  4965. * Serializes the message to binary data (in protobuf wire format).
  4966. * @return {!Uint8Array}
  4967. */
  4968. proto.transit_realtime.EntitySelector.prototype.serializeBinary = function() {
  4969. var writer = new jspb.BinaryWriter();
  4970. this.serializeBinaryToWriter(writer);
  4971. return writer.getResultBuffer();
  4972. };
  4973. /**
  4974. * Serializes the message to binary data (in protobuf wire format),
  4975. * writing to the given BinaryWriter.
  4976. * @param {!jspb.BinaryWriter} writer
  4977. */
  4978. proto.transit_realtime.EntitySelector.prototype.serializeBinaryToWriter = function (writer) {
  4979. var f = undefined;
  4980. f = jspb.Message.getField(this, 1);
  4981. if (f != null) {
  4982. writer.writeString(
  4983. 1,
  4984. f
  4985. );
  4986. }
  4987. f = jspb.Message.getField(this, 2);
  4988. if (f != null) {
  4989. writer.writeString(
  4990. 2,
  4991. f
  4992. );
  4993. }
  4994. f = jspb.Message.getField(this, 3);
  4995. if (f != null) {
  4996. writer.writeInt32(
  4997. 3,
  4998. f
  4999. );
  5000. }
  5001. f = this.getTrip();
  5002. if (f != null) {
  5003. writer.writeMessage(
  5004. 4,
  5005. f,
  5006. proto.transit_realtime.TripDescriptor.serializeBinaryToWriter
  5007. );
  5008. }
  5009. f = jspb.Message.getField(this, 5);
  5010. if (f != null) {
  5011. writer.writeString(
  5012. 5,
  5013. f
  5014. );
  5015. }
  5016. f = jspb.Message.getField(this, 6);
  5017. if (f != null) {
  5018. writer.writeUint32(
  5019. 6,
  5020. f
  5021. );
  5022. }
  5023. jspb.Message.serializeBinaryExtensions(this, writer,
  5024. proto.transit_realtime.EntitySelector.extensionsBinary, proto.transit_realtime.EntitySelector.prototype.getExtension);
  5025. };
  5026. /**
  5027. * Creates a deep clone of this proto. No data is shared with the original.
  5028. * @return {!proto.transit_realtime.EntitySelector} The clone.
  5029. */
  5030. proto.transit_realtime.EntitySelector.prototype.cloneMessage = function() {
  5031. return /** @type {!proto.transit_realtime.EntitySelector} */ (jspb.Message.cloneMessage(this));
  5032. };
  5033. /**
  5034. * optional string agency_id = 1;
  5035. * @return {string}
  5036. */
  5037. proto.transit_realtime.EntitySelector.prototype.getAgencyId = function() {
  5038. return /** @type {string} */ (!this.hasAgencyId() ? "" : jspb.Message.getField(this, 1));
  5039. };
  5040. /** @param {string?|undefined} value */
  5041. proto.transit_realtime.EntitySelector.prototype.setAgencyId = function(value) {
  5042. jspb.Message.setField(this, 1, value);
  5043. };
  5044. proto.transit_realtime.EntitySelector.prototype.clearAgencyId = function() {
  5045. jspb.Message.setField(this, 1, undefined);
  5046. };
  5047. /**
  5048. * Returns whether this field is set.
  5049. * @return{!boolean}
  5050. */
  5051. proto.transit_realtime.EntitySelector.prototype.hasAgencyId = function() {
  5052. return jspb.Message.getField(this, 1) != null;
  5053. };
  5054. /**
  5055. * optional string route_id = 2;
  5056. * @return {string}
  5057. */
  5058. proto.transit_realtime.EntitySelector.prototype.getRouteId = function() {
  5059. return /** @type {string} */ (!this.hasRouteId() ? "" : jspb.Message.getField(this, 2));
  5060. };
  5061. /** @param {string?|undefined} value */
  5062. proto.transit_realtime.EntitySelector.prototype.setRouteId = function(value) {
  5063. jspb.Message.setField(this, 2, value);
  5064. };
  5065. proto.transit_realtime.EntitySelector.prototype.clearRouteId = function() {
  5066. jspb.Message.setField(this, 2, undefined);
  5067. };
  5068. /**
  5069. * Returns whether this field is set.
  5070. * @return{!boolean}
  5071. */
  5072. proto.transit_realtime.EntitySelector.prototype.hasRouteId = function() {
  5073. return jspb.Message.getField(this, 2) != null;
  5074. };
  5075. /**
  5076. * optional int32 route_type = 3;
  5077. * @return {number}
  5078. */
  5079. proto.transit_realtime.EntitySelector.prototype.getRouteType = function() {
  5080. return /** @type {number} */ (!this.hasRouteType() ? 0 : jspb.Message.getField(this, 3));
  5081. };
  5082. /** @param {number?|undefined} value */
  5083. proto.transit_realtime.EntitySelector.prototype.setRouteType = function(value) {
  5084. jspb.Message.setField(this, 3, value);
  5085. };
  5086. proto.transit_realtime.EntitySelector.prototype.clearRouteType = function() {
  5087. jspb.Message.setField(this, 3, undefined);
  5088. };
  5089. /**
  5090. * Returns whether this field is set.
  5091. * @return{!boolean}
  5092. */
  5093. proto.transit_realtime.EntitySelector.prototype.hasRouteType = function() {
  5094. return jspb.Message.getField(this, 3) != null;
  5095. };
  5096. /**
  5097. * optional TripDescriptor trip = 4;
  5098. * @return {proto.transit_realtime.TripDescriptor}
  5099. */
  5100. proto.transit_realtime.EntitySelector.prototype.getTrip = function() {
  5101. return /** @type{proto.transit_realtime.TripDescriptor} */ (
  5102. jspb.Message.getWrapperField(this, proto.transit_realtime.TripDescriptor, 4));
  5103. };
  5104. /** @param {proto.transit_realtime.TripDescriptor|undefined} value */
  5105. proto.transit_realtime.EntitySelector.prototype.setTrip = function(value) {
  5106. jspb.Message.setWrapperField(this, 4, value);
  5107. };
  5108. proto.transit_realtime.EntitySelector.prototype.clearTrip = function() {
  5109. this.setTrip(undefined);
  5110. };
  5111. /**
  5112. * Returns whether this field is set.
  5113. * @return{!boolean}
  5114. */
  5115. proto.transit_realtime.EntitySelector.prototype.hasTrip = function() {
  5116. return jspb.Message.getField(this, 4) != null;
  5117. };
  5118. /**
  5119. * optional string stop_id = 5;
  5120. * @return {string}
  5121. */
  5122. proto.transit_realtime.EntitySelector.prototype.getStopId = function() {
  5123. return /** @type {string} */ (!this.hasStopId() ? "" : jspb.Message.getField(this, 5));
  5124. };
  5125. /** @param {string?|undefined} value */
  5126. proto.transit_realtime.EntitySelector.prototype.setStopId = function(value) {
  5127. jspb.Message.setField(this, 5, value);
  5128. };
  5129. proto.transit_realtime.EntitySelector.prototype.clearStopId = function() {
  5130. jspb.Message.setField(this, 5, undefined);
  5131. };
  5132. /**
  5133. * Returns whether this field is set.
  5134. * @return{!boolean}
  5135. */
  5136. proto.transit_realtime.EntitySelector.prototype.hasStopId = function() {
  5137. return jspb.Message.getField(this, 5) != null;
  5138. };
  5139. /**
  5140. * optional uint32 direction_id = 6;
  5141. * @return {number}
  5142. */
  5143. proto.transit_realtime.EntitySelector.prototype.getDirectionId = function() {
  5144. return /** @type {number} */ (!this.hasDirectionId() ? 0 : jspb.Message.getField(this, 6));
  5145. };
  5146. /** @param {number?|undefined} value */
  5147. proto.transit_realtime.EntitySelector.prototype.setDirectionId = function(value) {
  5148. jspb.Message.setField(this, 6, value);
  5149. };
  5150. proto.transit_realtime.EntitySelector.prototype.clearDirectionId = function() {
  5151. jspb.Message.setField(this, 6, undefined);
  5152. };
  5153. /**
  5154. * Returns whether this field is set.
  5155. * @return{!boolean}
  5156. */
  5157. proto.transit_realtime.EntitySelector.prototype.hasDirectionId = function() {
  5158. return jspb.Message.getField(this, 6) != null;
  5159. };
  5160. /**
  5161. * The extensions registered with this message class. This is a map of
  5162. * extension field number to fieldInfo object.
  5163. *
  5164. * For example:
  5165. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  5166. *
  5167. * fieldName contains the JsCompiler renamed field name property so that it
  5168. * works in OPTIMIZED mode.
  5169. *
  5170. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  5171. */
  5172. proto.transit_realtime.EntitySelector.extensions = {};
  5173. /**
  5174. * The extensions registered with this message class. This is a map of
  5175. * extension field number to fieldInfo object.
  5176. *
  5177. * For example:
  5178. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  5179. *
  5180. * fieldName contains the JsCompiler renamed field name property so that it
  5181. * works in OPTIMIZED mode.
  5182. *
  5183. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  5184. */
  5185. proto.transit_realtime.EntitySelector.extensionsBinary = {};
  5186. /**
  5187. * Generated by JsPbCodeGenerator.
  5188. * @param {Array=} opt_data Optional initial data array, typically from a
  5189. * server response, or constructed directly in Javascript. The array is used
  5190. * in place and becomes part of the constructed object. It is not cloned.
  5191. * If no data is provided, the constructed object will be empty, but still
  5192. * valid.
  5193. * @extends {jspb.Message}
  5194. * @constructor
  5195. */
  5196. proto.transit_realtime.TranslatedString = function(opt_data) {
  5197. jspb.Message.initialize(this, opt_data, 0, 2, proto.transit_realtime.TranslatedString.repeatedFields_, null);
  5198. };
  5199. goog.inherits(proto.transit_realtime.TranslatedString, jspb.Message);
  5200. if (goog.DEBUG && !COMPILED) {
  5201. proto.transit_realtime.TranslatedString.displayName = 'proto.transit_realtime.TranslatedString';
  5202. }
  5203. /**
  5204. * List of repeated fields within this message type.
  5205. * @private {!Array<number>}
  5206. * @const
  5207. */
  5208. proto.transit_realtime.TranslatedString.repeatedFields_ = [1];
  5209. if (jspb.Message.GENERATE_TO_OBJECT) {
  5210. /**
  5211. * Creates an object representation of this proto suitable for use in Soy templates.
  5212. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  5213. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  5214. * For the list of reserved names please see:
  5215. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  5216. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  5217. * for transitional soy proto support: http://goto/soy-param-migration
  5218. * @return {!Object}
  5219. */
  5220. proto.transit_realtime.TranslatedString.prototype.toObject = function(opt_includeInstance) {
  5221. return proto.transit_realtime.TranslatedString.toObject(opt_includeInstance, this);
  5222. };
  5223. /**
  5224. * Static version of the {@see toObject} method.
  5225. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  5226. * instance for transitional soy proto support:
  5227. * http://goto/soy-param-migration
  5228. * @param {!proto.transit_realtime.TranslatedString} msg The msg instance to transform.
  5229. * @return {!Object}
  5230. */
  5231. proto.transit_realtime.TranslatedString.toObject = function(includeInstance, msg) {
  5232. var f, obj = {
  5233. translationList: jspb.Message.toObjectList(msg.getTranslationList(),
  5234. proto.transit_realtime.TranslatedString.Translation.toObject, includeInstance)
  5235. };
  5236. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  5237. proto.transit_realtime.TranslatedString.extensions, proto.transit_realtime.TranslatedString.prototype.getExtension,
  5238. includeInstance);
  5239. if (includeInstance) {
  5240. obj.$jspbMessageInstance = msg;
  5241. }
  5242. return obj;
  5243. };
  5244. }
  5245. /**
  5246. * Deserializes binary data (in protobuf wire format).
  5247. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  5248. * @return {!proto.transit_realtime.TranslatedString}
  5249. */
  5250. proto.transit_realtime.TranslatedString.deserializeBinary = function(bytes) {
  5251. var reader = new jspb.BinaryReader(bytes);
  5252. var msg = new proto.transit_realtime.TranslatedString;
  5253. return proto.transit_realtime.TranslatedString.deserializeBinaryFromReader(msg, reader);
  5254. };
  5255. /**
  5256. * Deserializes binary data (in protobuf wire format) from the
  5257. * given reader into the given message object.
  5258. * @param {!proto.transit_realtime.TranslatedString} msg The message object to deserialize into.
  5259. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  5260. * @return {!proto.transit_realtime.TranslatedString}
  5261. */
  5262. proto.transit_realtime.TranslatedString.deserializeBinaryFromReader = function(msg, reader) {
  5263. while (reader.nextField()) {
  5264. if (reader.isEndGroup()) {
  5265. break;
  5266. }
  5267. var field = reader.getFieldNumber();
  5268. switch (field) {
  5269. case 1:
  5270. var value = new proto.transit_realtime.TranslatedString.Translation;
  5271. reader.readMessage(value,proto.transit_realtime.TranslatedString.Translation.deserializeBinaryFromReader);
  5272. msg.getTranslationList().push(value);
  5273. msg.setTranslationList(msg.getTranslationList());
  5274. break;
  5275. default:
  5276. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.TranslatedString.extensionsBinary,
  5277. proto.transit_realtime.TranslatedString.prototype.getExtension,
  5278. proto.transit_realtime.TranslatedString.prototype.setExtension);
  5279. break;
  5280. }
  5281. }
  5282. return msg;
  5283. };
  5284. /**
  5285. * Class method variant: serializes the given message to binary data
  5286. * (in protobuf wire format), writing to the given BinaryWriter.
  5287. * @param {!proto.transit_realtime.TranslatedString} message
  5288. * @param {!jspb.BinaryWriter} writer
  5289. */
  5290. proto.transit_realtime.TranslatedString.serializeBinaryToWriter = function(message, writer) {
  5291. message.serializeBinaryToWriter(writer);
  5292. };
  5293. /**
  5294. * Serializes the message to binary data (in protobuf wire format).
  5295. * @return {!Uint8Array}
  5296. */
  5297. proto.transit_realtime.TranslatedString.prototype.serializeBinary = function() {
  5298. var writer = new jspb.BinaryWriter();
  5299. this.serializeBinaryToWriter(writer);
  5300. return writer.getResultBuffer();
  5301. };
  5302. /**
  5303. * Serializes the message to binary data (in protobuf wire format),
  5304. * writing to the given BinaryWriter.
  5305. * @param {!jspb.BinaryWriter} writer
  5306. */
  5307. proto.transit_realtime.TranslatedString.prototype.serializeBinaryToWriter = function (writer) {
  5308. var f = undefined;
  5309. f = this.getTranslationList();
  5310. if (f.length > 0) {
  5311. writer.writeRepeatedMessage(
  5312. 1,
  5313. f,
  5314. proto.transit_realtime.TranslatedString.Translation.serializeBinaryToWriter
  5315. );
  5316. }
  5317. jspb.Message.serializeBinaryExtensions(this, writer,
  5318. proto.transit_realtime.TranslatedString.extensionsBinary, proto.transit_realtime.TranslatedString.prototype.getExtension);
  5319. };
  5320. /**
  5321. * Creates a deep clone of this proto. No data is shared with the original.
  5322. * @return {!proto.transit_realtime.TranslatedString} The clone.
  5323. */
  5324. proto.transit_realtime.TranslatedString.prototype.cloneMessage = function() {
  5325. return /** @type {!proto.transit_realtime.TranslatedString} */ (jspb.Message.cloneMessage(this));
  5326. };
  5327. /**
  5328. * repeated Translation translation = 1;
  5329. * If you change this array by adding, removing or replacing elements, or if you
  5330. * replace the array itself, then you must call the setter to update it.
  5331. * @return {!Array.<!proto.transit_realtime.TranslatedString.Translation>}
  5332. */
  5333. proto.transit_realtime.TranslatedString.prototype.getTranslationList = function() {
  5334. return /** @type{!Array.<!proto.transit_realtime.TranslatedString.Translation>} */ (
  5335. jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.TranslatedString.Translation, 1));
  5336. };
  5337. /** @param {Array.<!proto.transit_realtime.TranslatedString.Translation>} value */
  5338. proto.transit_realtime.TranslatedString.prototype.setTranslationList = function(value) {
  5339. jspb.Message.setRepeatedWrapperField(this, 1, value);
  5340. };
  5341. proto.transit_realtime.TranslatedString.prototype.clearTranslationList = function() {
  5342. this.setTranslationList([]);
  5343. };
  5344. /**
  5345. * The extensions registered with this message class. This is a map of
  5346. * extension field number to fieldInfo object.
  5347. *
  5348. * For example:
  5349. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  5350. *
  5351. * fieldName contains the JsCompiler renamed field name property so that it
  5352. * works in OPTIMIZED mode.
  5353. *
  5354. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  5355. */
  5356. proto.transit_realtime.TranslatedString.extensions = {};
  5357. /**
  5358. * The extensions registered with this message class. This is a map of
  5359. * extension field number to fieldInfo object.
  5360. *
  5361. * For example:
  5362. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  5363. *
  5364. * fieldName contains the JsCompiler renamed field name property so that it
  5365. * works in OPTIMIZED mode.
  5366. *
  5367. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  5368. */
  5369. proto.transit_realtime.TranslatedString.extensionsBinary = {};
  5370. /**
  5371. * Generated by JsPbCodeGenerator.
  5372. * @param {Array=} opt_data Optional initial data array, typically from a
  5373. * server response, or constructed directly in Javascript. The array is used
  5374. * in place and becomes part of the constructed object. It is not cloned.
  5375. * If no data is provided, the constructed object will be empty, but still
  5376. * valid.
  5377. * @extends {jspb.Message}
  5378. * @constructor
  5379. */
  5380. proto.transit_realtime.TranslatedString.Translation = function(opt_data) {
  5381. jspb.Message.initialize(this, opt_data, 0, 3, null, null);
  5382. };
  5383. goog.inherits(proto.transit_realtime.TranslatedString.Translation, jspb.Message);
  5384. if (goog.DEBUG && !COMPILED) {
  5385. proto.transit_realtime.TranslatedString.Translation.displayName = 'proto.transit_realtime.TranslatedString.Translation';
  5386. }
  5387. if (jspb.Message.GENERATE_TO_OBJECT) {
  5388. /**
  5389. * Creates an object representation of this proto suitable for use in Soy templates.
  5390. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  5391. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  5392. * For the list of reserved names please see:
  5393. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  5394. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  5395. * for transitional soy proto support: http://goto/soy-param-migration
  5396. * @return {!Object}
  5397. */
  5398. proto.transit_realtime.TranslatedString.Translation.prototype.toObject = function(opt_includeInstance) {
  5399. return proto.transit_realtime.TranslatedString.Translation.toObject(opt_includeInstance, this);
  5400. };
  5401. /**
  5402. * Static version of the {@see toObject} method.
  5403. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  5404. * instance for transitional soy proto support:
  5405. * http://goto/soy-param-migration
  5406. * @param {!proto.transit_realtime.TranslatedString.Translation} msg The msg instance to transform.
  5407. * @return {!Object}
  5408. */
  5409. proto.transit_realtime.TranslatedString.Translation.toObject = function(includeInstance, msg) {
  5410. var f, obj = {
  5411. text: jspb.Message.getField(msg, 1),
  5412. language: jspb.Message.getField(msg, 2)
  5413. };
  5414. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  5415. proto.transit_realtime.TranslatedString.Translation.extensions, proto.transit_realtime.TranslatedString.Translation.prototype.getExtension,
  5416. includeInstance);
  5417. if (includeInstance) {
  5418. obj.$jspbMessageInstance = msg;
  5419. }
  5420. return obj;
  5421. };
  5422. }
  5423. /**
  5424. * Deserializes binary data (in protobuf wire format).
  5425. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  5426. * @return {!proto.transit_realtime.TranslatedString.Translation}
  5427. */
  5428. proto.transit_realtime.TranslatedString.Translation.deserializeBinary = function(bytes) {
  5429. var reader = new jspb.BinaryReader(bytes);
  5430. var msg = new proto.transit_realtime.TranslatedString.Translation;
  5431. return proto.transit_realtime.TranslatedString.Translation.deserializeBinaryFromReader(msg, reader);
  5432. };
  5433. /**
  5434. * Deserializes binary data (in protobuf wire format) from the
  5435. * given reader into the given message object.
  5436. * @param {!proto.transit_realtime.TranslatedString.Translation} msg The message object to deserialize into.
  5437. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  5438. * @return {!proto.transit_realtime.TranslatedString.Translation}
  5439. */
  5440. proto.transit_realtime.TranslatedString.Translation.deserializeBinaryFromReader = function(msg, reader) {
  5441. while (reader.nextField()) {
  5442. if (reader.isEndGroup()) {
  5443. break;
  5444. }
  5445. var field = reader.getFieldNumber();
  5446. switch (field) {
  5447. case 1:
  5448. var value = /** @type {string} */ (reader.readString());
  5449. msg.setText(value);
  5450. break;
  5451. case 2:
  5452. var value = /** @type {string} */ (reader.readString());
  5453. msg.setLanguage(value);
  5454. break;
  5455. default:
  5456. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.TranslatedString.Translation.extensionsBinary,
  5457. proto.transit_realtime.TranslatedString.Translation.prototype.getExtension,
  5458. proto.transit_realtime.TranslatedString.Translation.prototype.setExtension);
  5459. break;
  5460. }
  5461. }
  5462. return msg;
  5463. };
  5464. /**
  5465. * Class method variant: serializes the given message to binary data
  5466. * (in protobuf wire format), writing to the given BinaryWriter.
  5467. * @param {!proto.transit_realtime.TranslatedString.Translation} message
  5468. * @param {!jspb.BinaryWriter} writer
  5469. */
  5470. proto.transit_realtime.TranslatedString.Translation.serializeBinaryToWriter = function(message, writer) {
  5471. message.serializeBinaryToWriter(writer);
  5472. };
  5473. /**
  5474. * Serializes the message to binary data (in protobuf wire format).
  5475. * @return {!Uint8Array}
  5476. */
  5477. proto.transit_realtime.TranslatedString.Translation.prototype.serializeBinary = function() {
  5478. var writer = new jspb.BinaryWriter();
  5479. this.serializeBinaryToWriter(writer);
  5480. return writer.getResultBuffer();
  5481. };
  5482. /**
  5483. * Serializes the message to binary data (in protobuf wire format),
  5484. * writing to the given BinaryWriter.
  5485. * @param {!jspb.BinaryWriter} writer
  5486. */
  5487. proto.transit_realtime.TranslatedString.Translation.prototype.serializeBinaryToWriter = function (writer) {
  5488. var f = undefined;
  5489. f = jspb.Message.getField(this, 1);
  5490. if (f != null) {
  5491. writer.writeString(
  5492. 1,
  5493. f
  5494. );
  5495. }
  5496. f = jspb.Message.getField(this, 2);
  5497. if (f != null) {
  5498. writer.writeString(
  5499. 2,
  5500. f
  5501. );
  5502. }
  5503. jspb.Message.serializeBinaryExtensions(this, writer,
  5504. proto.transit_realtime.TranslatedString.Translation.extensionsBinary, proto.transit_realtime.TranslatedString.Translation.prototype.getExtension);
  5505. };
  5506. /**
  5507. * Creates a deep clone of this proto. No data is shared with the original.
  5508. * @return {!proto.transit_realtime.TranslatedString.Translation} The clone.
  5509. */
  5510. proto.transit_realtime.TranslatedString.Translation.prototype.cloneMessage = function() {
  5511. return /** @type {!proto.transit_realtime.TranslatedString.Translation} */ (jspb.Message.cloneMessage(this));
  5512. };
  5513. /**
  5514. * required string text = 1;
  5515. * @return {string}
  5516. */
  5517. proto.transit_realtime.TranslatedString.Translation.prototype.getText = function() {
  5518. return /** @type {string} */ (!this.hasText() ? "" : jspb.Message.getField(this, 1));
  5519. };
  5520. /** @param {string|undefined} value */
  5521. proto.transit_realtime.TranslatedString.Translation.prototype.setText = function(value) {
  5522. jspb.Message.setField(this, 1, value);
  5523. };
  5524. proto.transit_realtime.TranslatedString.Translation.prototype.clearText = function() {
  5525. jspb.Message.setField(this, 1, undefined);
  5526. };
  5527. /**
  5528. * Returns whether this field is set.
  5529. * @return{!boolean}
  5530. */
  5531. proto.transit_realtime.TranslatedString.Translation.prototype.hasText = function() {
  5532. return jspb.Message.getField(this, 1) != null;
  5533. };
  5534. /**
  5535. * optional string language = 2;
  5536. * @return {string}
  5537. */
  5538. proto.transit_realtime.TranslatedString.Translation.prototype.getLanguage = function() {
  5539. return /** @type {string} */ (!this.hasLanguage() ? "" : jspb.Message.getField(this, 2));
  5540. };
  5541. /** @param {string?|undefined} value */
  5542. proto.transit_realtime.TranslatedString.Translation.prototype.setLanguage = function(value) {
  5543. jspb.Message.setField(this, 2, value);
  5544. };
  5545. proto.transit_realtime.TranslatedString.Translation.prototype.clearLanguage = function() {
  5546. jspb.Message.setField(this, 2, undefined);
  5547. };
  5548. /**
  5549. * Returns whether this field is set.
  5550. * @return{!boolean}
  5551. */
  5552. proto.transit_realtime.TranslatedString.Translation.prototype.hasLanguage = function() {
  5553. return jspb.Message.getField(this, 2) != null;
  5554. };
  5555. /**
  5556. * The extensions registered with this message class. This is a map of
  5557. * extension field number to fieldInfo object.
  5558. *
  5559. * For example:
  5560. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  5561. *
  5562. * fieldName contains the JsCompiler renamed field name property so that it
  5563. * works in OPTIMIZED mode.
  5564. *
  5565. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  5566. */
  5567. proto.transit_realtime.TranslatedString.Translation.extensions = {};
  5568. /**
  5569. * The extensions registered with this message class. This is a map of
  5570. * extension field number to fieldInfo object.
  5571. *
  5572. * For example:
  5573. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  5574. *
  5575. * fieldName contains the JsCompiler renamed field name property so that it
  5576. * works in OPTIMIZED mode.
  5577. *
  5578. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  5579. */
  5580. proto.transit_realtime.TranslatedString.Translation.extensionsBinary = {};
  5581. /**
  5582. * Generated by JsPbCodeGenerator.
  5583. * @param {Array=} opt_data Optional initial data array, typically from a
  5584. * server response, or constructed directly in Javascript. The array is used
  5585. * in place and becomes part of the constructed object. It is not cloned.
  5586. * If no data is provided, the constructed object will be empty, but still
  5587. * valid.
  5588. * @extends {jspb.Message}
  5589. * @constructor
  5590. */
  5591. proto.transit_realtime.Shape = function(opt_data) {
  5592. jspb.Message.initialize(this, opt_data, 0, 3, null, null);
  5593. };
  5594. goog.inherits(proto.transit_realtime.Shape, jspb.Message);
  5595. if (goog.DEBUG && !COMPILED) {
  5596. proto.transit_realtime.Shape.displayName = 'proto.transit_realtime.Shape';
  5597. }
  5598. if (jspb.Message.GENERATE_TO_OBJECT) {
  5599. /**
  5600. * Creates an object representation of this proto suitable for use in Soy templates.
  5601. * Field names that are reserved in JavaScript and will be renamed to pb_name.
  5602. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
  5603. * For the list of reserved names please see:
  5604. * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
  5605. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
  5606. * for transitional soy proto support: http://goto/soy-param-migration
  5607. * @return {!Object}
  5608. */
  5609. proto.transit_realtime.Shape.prototype.toObject = function(opt_includeInstance) {
  5610. return proto.transit_realtime.Shape.toObject(opt_includeInstance, this);
  5611. };
  5612. /**
  5613. * Static version of the {@see toObject} method.
  5614. * @param {boolean|undefined} includeInstance Whether to include the JSPB
  5615. * instance for transitional soy proto support:
  5616. * http://goto/soy-param-migration
  5617. * @param {!proto.transit_realtime.Shape} msg The msg instance to transform.
  5618. * @return {!Object}
  5619. */
  5620. proto.transit_realtime.Shape.toObject = function(includeInstance, msg) {
  5621. var f, obj = {
  5622. shapeId: jspb.Message.getField(msg, 1),
  5623. encodedPolyline: jspb.Message.getField(msg, 2)
  5624. };
  5625. jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
  5626. proto.transit_realtime.Shape.extensions, proto.transit_realtime.Shape.prototype.getExtension,
  5627. includeInstance);
  5628. if (includeInstance) {
  5629. obj.$jspbMessageInstance = msg;
  5630. }
  5631. return obj;
  5632. };
  5633. }
  5634. /**
  5635. * Deserializes binary data (in protobuf wire format).
  5636. * @param {jspb.ByteSource} bytes The bytes to deserialize.
  5637. * @return {!proto.transit_realtime.Shape}
  5638. */
  5639. proto.transit_realtime.Shape.deserializeBinary = function(bytes) {
  5640. var reader = new jspb.BinaryReader(bytes);
  5641. var msg = new proto.transit_realtime.Shape;
  5642. return proto.transit_realtime.Shape.deserializeBinaryFromReader(msg, reader);
  5643. };
  5644. /**
  5645. * Deserializes binary data (in protobuf wire format) from the
  5646. * given reader into the given message object.
  5647. * @param {!proto.transit_realtime.Shape} msg The message object to deserialize into.
  5648. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
  5649. * @return {!proto.transit_realtime.Shape}
  5650. */
  5651. proto.transit_realtime.Shape.deserializeBinaryFromReader = function(msg, reader) {
  5652. while (reader.nextField()) {
  5653. if (reader.isEndGroup()) {
  5654. break;
  5655. }
  5656. var field = reader.getFieldNumber();
  5657. switch (field) {
  5658. case 1:
  5659. var value = /** @type {string} */ (reader.readString());
  5660. msg.setShapeId(value);
  5661. break;
  5662. case 2:
  5663. var value = /** @type {string} */ (reader.readString());
  5664. msg.setEncodedPolyline(value);
  5665. break;
  5666. default:
  5667. jspb.Message.readBinaryExtension(msg, reader, proto.transit_realtime.Shape.extensionsBinary,
  5668. proto.transit_realtime.Shape.prototype.getExtension,
  5669. proto.transit_realtime.Shape.prototype.setExtension);
  5670. break;
  5671. }
  5672. }
  5673. return msg;
  5674. };
  5675. /**
  5676. * Class method variant: serializes the given message to binary data
  5677. * (in protobuf wire format), writing to the given BinaryWriter.
  5678. * @param {!proto.transit_realtime.Shape} message
  5679. * @param {!jspb.BinaryWriter} writer
  5680. */
  5681. proto.transit_realtime.Shape.serializeBinaryToWriter = function(message, writer) {
  5682. message.serializeBinaryToWriter(writer);
  5683. };
  5684. /**
  5685. * Serializes the message to binary data (in protobuf wire format).
  5686. * @return {!Uint8Array}
  5687. */
  5688. proto.transit_realtime.Shape.prototype.serializeBinary = function() {
  5689. var writer = new jspb.BinaryWriter();
  5690. this.serializeBinaryToWriter(writer);
  5691. return writer.getResultBuffer();
  5692. };
  5693. /**
  5694. * Serializes the message to binary data (in protobuf wire format),
  5695. * writing to the given BinaryWriter.
  5696. * @param {!jspb.BinaryWriter} writer
  5697. */
  5698. proto.transit_realtime.Shape.prototype.serializeBinaryToWriter = function (writer) {
  5699. var f = undefined;
  5700. f = jspb.Message.getField(this, 1);
  5701. if (f != null) {
  5702. writer.writeString(
  5703. 1,
  5704. f
  5705. );
  5706. }
  5707. f = jspb.Message.getField(this, 2);
  5708. if (f != null) {
  5709. writer.writeString(
  5710. 2,
  5711. f
  5712. );
  5713. }
  5714. jspb.Message.serializeBinaryExtensions(this, writer,
  5715. proto.transit_realtime.Shape.extensionsBinary, proto.transit_realtime.Shape.prototype.getExtension);
  5716. };
  5717. /**
  5718. * Creates a deep clone of this proto. No data is shared with the original.
  5719. * @return {!proto.transit_realtime.Shape} The clone.
  5720. */
  5721. proto.transit_realtime.Shape.prototype.cloneMessage = function() {
  5722. return /** @type {!proto.transit_realtime.Shape} */ (jspb.Message.cloneMessage(this));
  5723. };
  5724. /**
  5725. * optional string shape_id = 1;
  5726. * @return {string}
  5727. */
  5728. proto.transit_realtime.Shape.prototype.getShapeId = function() {
  5729. return /** @type {string} */ (!this.hasShapeId() ? "" : jspb.Message.getField(this, 1));
  5730. };
  5731. /** @param {string?|undefined} value */
  5732. proto.transit_realtime.Shape.prototype.setShapeId = function(value) {
  5733. jspb.Message.setField(this, 1, value);
  5734. };
  5735. proto.transit_realtime.Shape.prototype.clearShapeId = function() {
  5736. jspb.Message.setField(this, 1, undefined);
  5737. };
  5738. /**
  5739. * Returns whether this field is set.
  5740. * @return{!boolean}
  5741. */
  5742. proto.transit_realtime.Shape.prototype.hasShapeId = function() {
  5743. return jspb.Message.getField(this, 1) != null;
  5744. };
  5745. /**
  5746. * optional string encoded_polyline = 2;
  5747. * @return {string}
  5748. */
  5749. proto.transit_realtime.Shape.prototype.getEncodedPolyline = function() {
  5750. return /** @type {string} */ (!this.hasEncodedPolyline() ? "" : jspb.Message.getField(this, 2));
  5751. };
  5752. /** @param {string?|undefined} value */
  5753. proto.transit_realtime.Shape.prototype.setEncodedPolyline = function(value) {
  5754. jspb.Message.setField(this, 2, value);
  5755. };
  5756. proto.transit_realtime.Shape.prototype.clearEncodedPolyline = function() {
  5757. jspb.Message.setField(this, 2, undefined);
  5758. };
  5759. /**
  5760. * Returns whether this field is set.
  5761. * @return{!boolean}
  5762. */
  5763. proto.transit_realtime.Shape.prototype.hasEncodedPolyline = function() {
  5764. return jspb.Message.getField(this, 2) != null;
  5765. };
  5766. /**
  5767. * The extensions registered with this message class. This is a map of
  5768. * extension field number to fieldInfo object.
  5769. *
  5770. * For example:
  5771. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  5772. *
  5773. * fieldName contains the JsCompiler renamed field name property so that it
  5774. * works in OPTIMIZED mode.
  5775. *
  5776. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  5777. */
  5778. proto.transit_realtime.Shape.extensions = {};
  5779. /**
  5780. * The extensions registered with this message class. This is a map of
  5781. * extension field number to fieldInfo object.
  5782. *
  5783. * For example:
  5784. * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
  5785. *
  5786. * fieldName contains the JsCompiler renamed field name property so that it
  5787. * works in OPTIMIZED mode.
  5788. *
  5789. * @type {!Object.<number, jspb.ExtensionFieldInfo>}
  5790. */
  5791. proto.transit_realtime.Shape.extensionsBinary = {};
  5792. goog.object.extend(exports, proto.transit_realtime);
  5793. },{"google-protobuf":2}],2:[function(require,module,exports){
  5794. (function (global,Buffer){(function (){
  5795. var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
  5796. $jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
  5797. $jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Array.prototype.findIndex",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).i}},"es6","es3");
  5798. $jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};
  5799. $jscomp.polyfill("String.prototype.endsWith",function(a){return a?a:function(a,c){var b=$jscomp.checkStringArgs(this,a,"endsWith");a+="";void 0===c&&(c=b.length);c=Math.max(0,Math.min(c|0,b.length));for(var e=a.length;0<e&&0<c;)if(b[--c]!=a[--e])return!1;return 0>=e}},"es6","es3");$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
  5800. $jscomp.polyfill("String.prototype.startsWith",function(a){return a?a:function(a,c){var b=$jscomp.checkStringArgs(this,a,"startsWith");a+="";var e=b.length,f=a.length;c=Math.max(0,Math.min(c|0,b.length));for(var g=0;g<f&&c<e;)if(b[c++]!=a[g++])return!1;return g>=f}},"es6","es3");
  5801. $jscomp.polyfill("String.prototype.repeat",function(a){return a?a:function(a){var b=$jscomp.checkStringArgs(this,null,"repeat");if(0>a||1342177279<a)throw new RangeError("Invalid count value");a|=0;for(var d="";a;)if(a&1&&(d+=b),a>>>=1)b+=b;return d}},"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self;goog.isDef=function(a){return void 0!==a};goog.isString=function(a){return"string"==typeof a};goog.isBoolean=function(a){return"boolean"==typeof a};
  5802. goog.isNumber=function(a){return"number"==typeof a};goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&goog.isDef(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}};
  5803. goog.define=function(a,b){if(!COMPILED){var c=goog.global.CLOSURE_UNCOMPILED_DEFINES,d=goog.global.CLOSURE_DEFINES;c&&void 0===c.nodeType&&Object.prototype.hasOwnProperty.call(c,a)?b=c[a]:d&&void 0===d.nodeType&&Object.prototype.hasOwnProperty.call(d,a)&&(b=d[a])}return b};goog.FEATURESET_YEAR=2012;goog.DEBUG=!0;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRICT_MODE_COMPATIBLE=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG;goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1;
  5804. goog.provide=function(a){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");if(!COMPILED&&goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');goog.constructNamespace_(a)};goog.constructNamespace_=function(a,b){if(!COMPILED){delete goog.implicitNamespaces_[a];for(var c=a;(c=c.substring(0,c.lastIndexOf(".")))&&!goog.getObjectByName(c);)goog.implicitNamespaces_[c]=!0}goog.exportPath_(a,b)};
  5805. goog.getScriptNonce=function(a){if(a&&a!=goog.global)return goog.getScriptNonce_(a.document);null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document));return goog.cspNonce_};goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/;goog.cspNonce_=null;goog.getScriptNonce_=function(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(a)?a:""};goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
  5806. goog.module=function(a){if(!goog.isString(a)||!a||-1==a.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+a+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");
  5807. if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=a;if(!COMPILED){if(goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');delete goog.implicitNamespaces_[a]}};goog.module.get=function(a){return goog.module.getInternal_(a)};
  5808. goog.module.getInternal_=function(a){if(!COMPILED){if(a in goog.loadedModules_)return goog.loadedModules_[a].exports;if(!goog.implicitNamespaces_[a])return a=goog.getObjectByName(a),null!=a?a:null}return null};goog.ModuleType={ES6:"es6",GOOG:"goog"};goog.moduleLoaderState_=null;goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()};goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG};
  5809. goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var a=goog.global.$jscomp;return a?"function"!=typeof a.getCurrentModulePath?!1:!!a.getCurrentModulePath():!1};
  5810. goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInGoogModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0};
  5811. goog.declareModuleId=function(a){if(!COMPILED){if(!goog.isInEs6ModuleLoader_())throw Error("goog.declareModuleId may only be called from within an ES6 module");if(goog.moduleLoaderState_&&goog.moduleLoaderState_.moduleName)throw Error("goog.declareModuleId may only be called once per module.");if(a in goog.loadedModules_)throw Error('Module with namespace "'+a+'" already exists.');}if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=a;else{var b=goog.global.$jscomp;if(!b||"function"!=typeof b.getCurrentModulePath)throw Error('Module with namespace "'+
  5812. a+'" has been loaded incorrectly.');b=b.require(b.getCurrentModulePath());goog.loadedModules_[a]={exports:b,type:goog.ModuleType.ES6,moduleId:a}}};goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};goog.forwardDeclare=function(a){};
  5813. COMPILED||(goog.isProvided_=function(a){return a in goog.loadedModules_||!goog.implicitNamespaces_[a]&&goog.isDefAndNotNull(goog.getObjectByName(a))},goog.implicitNamespaces_={"goog.module":!0});goog.getObjectByName=function(a,b){a=a.split(".");b=b||goog.global;for(var c=0;c<a.length;c++)if(b=b[a[c]],!goog.isDefAndNotNull(b))return null;return b};goog.globalize=function(a,b){b=b||goog.global;for(var c in a)b[c]=a[c]};
  5814. goog.addDependency=function(a,b,c,d){!COMPILED&&goog.DEPENDENCIES_ENABLED&&goog.debugLoader_.addDependency(a,b,c,d)};goog.ENABLE_DEBUG_LOADER=!0;goog.logToConsole_=function(a){goog.global.console&&goog.global.console.error(a)};
  5815. goog.require=function(a){if(!COMPILED){goog.ENABLE_DEBUG_LOADER&&goog.debugLoader_.requested(a);if(goog.isProvided_(a)){if(goog.isInModuleLoader_())return goog.module.getInternal_(a)}else if(goog.ENABLE_DEBUG_LOADER){var b=goog.moduleLoaderState_;goog.moduleLoaderState_=null;try{goog.debugLoader_.load_(a)}finally{goog.moduleLoaderState_=b}}return null}};goog.requireType=function(a){return{}};goog.basePath="";goog.nullFunction=function(){};
  5816. goog.abstractMethod=function(){throw Error("unimplemented abstract method");};goog.addSingletonGetter=function(a){a.instance_=void 0;a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.LOAD_MODULE_USING_EVAL=!0;goog.SEAL_MODULE_EXPORTS=goog.DEBUG;goog.loadedModules_={};goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER;goog.TRANSPILE="detect";
  5817. goog.ASSUME_ES_MODULES_TRANSPILED=!1;goog.TRANSPILE_TO_LANGUAGE="";goog.TRANSPILER="transpile.js";goog.hasBadLetScoping=null;goog.useSafari10Workaround=function(){if(null==goog.hasBadLetScoping){try{var a=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(b){a=!1}goog.hasBadLetScoping=a}return goog.hasBadLetScoping};goog.workaroundSafari10EvalBug=function(a){return"(function(){"+a+"\n;})();\n"};
  5818. goog.loadModule=function(a){var b=goog.moduleLoaderState_;try{goog.moduleLoaderState_={moduleName:"",declareLegacyNamespace:!1,type:goog.ModuleType.GOOG};if(goog.isFunction(a))var c=a.call(void 0,{});else if(goog.isString(a))goog.useSafari10Workaround()&&(a=goog.workaroundSafari10EvalBug(a)),c=goog.loadModuleFromSource_.call(void 0,a);else throw Error("Invalid module definition");var d=goog.moduleLoaderState_.moduleName;if(goog.isString(d)&&d)goog.moduleLoaderState_.declareLegacyNamespace?goog.constructNamespace_(d,
  5819. c):goog.SEAL_MODULE_EXPORTS&&Object.seal&&"object"==typeof c&&null!=c&&Object.seal(c),goog.loadedModules_[d]={exports:c,type:goog.ModuleType.GOOG,moduleId:goog.moduleLoaderState_.moduleName};else throw Error('Invalid module name "'+d+'"');}finally{goog.moduleLoaderState_=b}};goog.loadModuleFromSource_=function(a){eval(a);return{}};goog.normalizePath_=function(a){a=a.split("/");for(var b=0;b<a.length;)"."==a[b]?a.splice(b,1):b&&".."==a[b]&&a[b-1]&&".."!=a[b-1]?a.splice(--b,2):b++;return a.join("/")};
  5820. goog.loadFileSync_=function(a){if(goog.global.CLOSURE_LOAD_FILE_SYNC)return goog.global.CLOSURE_LOAD_FILE_SYNC(a);try{var b=new goog.global.XMLHttpRequest;b.open("get",a,!1);b.send();return 0==b.status||200==b.status?b.responseText:null}catch(c){return null}};
  5821. goog.transpile_=function(a,b,c){var d=goog.global.$jscomp;d||(goog.global.$jscomp=d={});var e=d.transpile;if(!e){var f=goog.basePath+goog.TRANSPILER,g=goog.loadFileSync_(f);if(g){(function(){(0,eval)(g+"\n//# sourceURL="+f)}).call(goog.global);if(goog.global.$gwtExport&&goog.global.$gwtExport.$jscomp&&!goog.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(goog.global.$gwtExport));goog.global.$jscomp.transpile=
  5822. goog.global.$gwtExport.$jscomp.transpile;d=goog.global.$jscomp;e=d.transpile}}e||(e=d.transpile=function(a,b){goog.logToConsole_(b+" requires transpilation but no transpiler was found.");return a});return e(a,b,c)};
  5823. goog.typeOf=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
  5824. else if("function"==b&&"undefined"==typeof a.call)return"object";return b};goog.isNull=function(a){return null===a};goog.isDefAndNotNull=function(a){return null!=a};goog.isArray=function(a){return"array"==goog.typeOf(a)};goog.isArrayLike=function(a){var b=goog.typeOf(a);return"array"==b||"object"==b&&"number"==typeof a.length};goog.isDateLike=function(a){return goog.isObject(a)&&"function"==typeof a.getFullYear};goog.isFunction=function(a){return"function"==goog.typeOf(a)};
  5825. goog.isObject=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b};goog.getUid=function(a){return a[goog.UID_PROPERTY_]||(a[goog.UID_PROPERTY_]=++goog.uidCounter_)};goog.hasUid=function(a){return!!a[goog.UID_PROPERTY_]};goog.removeUid=function(a){null!==a&&"removeAttribute"in a&&a.removeAttribute(goog.UID_PROPERTY_);try{delete a[goog.UID_PROPERTY_]}catch(b){}};goog.UID_PROPERTY_="closure_uid_"+(1E9*Math.random()>>>0);goog.uidCounter_=0;goog.getHashCode=goog.getUid;
  5826. goog.removeHashCode=goog.removeUid;goog.cloneObject=function(a){var b=goog.typeOf(a);if("object"==b||"array"==b){if("function"===typeof a.clone)return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=goog.cloneObject(a[c]);return b}return a};goog.bindNative_=function(a,b,c){return a.call.apply(a.bind,arguments)};
  5827. goog.bindJs_=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}};goog.bind=function(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_;return goog.bind.apply(null,arguments)};
  5828. goog.partial=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}};goog.mixin=function(a,b){for(var c in b)a[c]=b[c]};goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date};
  5829. goog.globalEval=function(a){if(goog.global.execScript)goog.global.execScript(a,"JavaScript");else if(goog.global.eval){if(null==goog.evalWorksForGlobals_){try{goog.global.eval("var _evalTest_ = 1;")}catch(d){}if("undefined"!=typeof goog.global._evalTest_){try{delete goog.global._evalTest_}catch(d){}goog.evalWorksForGlobals_=!0}else goog.evalWorksForGlobals_=!1}if(goog.evalWorksForGlobals_)goog.global.eval(a);else{var b=goog.global.document,c=b.createElement("SCRIPT");c.type="text/javascript";c.defer=
  5830. !1;c.appendChild(b.createTextNode(a));b.head.appendChild(c);b.head.removeChild(c)}}else throw Error("goog.globalEval not available");};goog.evalWorksForGlobals_=null;
  5831. goog.getCssName=function(a,b){if("."==String(a).charAt(0))throw Error('className passed in goog.getCssName must not start with ".". You passed: '+a);var c=function(a){return goog.cssNameMapping_[a]||a},d=function(a){a=a.split("-");for(var b=[],d=0;d<a.length;d++)b.push(c(a[d]));return b.join("-")};d=goog.cssNameMapping_?"BY_WHOLE"==goog.cssNameMappingStyle_?c:d:function(a){return a};a=b?a+"-"+d(b):d(a);return goog.global.CLOSURE_CSS_NAME_MAP_FN?goog.global.CLOSURE_CSS_NAME_MAP_FN(a):a};
  5832. goog.setCssNameMapping=function(a,b){goog.cssNameMapping_=a;goog.cssNameMappingStyle_=b};!COMPILED&&goog.global.CLOSURE_CSS_NAME_MAPPING&&(goog.cssNameMapping_=goog.global.CLOSURE_CSS_NAME_MAPPING);goog.getMsg=function(a,b,c){c&&c.html&&(a=a.replace(/</g,"&lt;"));b&&(a=a.replace(/\{\$([^}]+)}/g,function(a,c){return null!=b&&c in b?b[c]:a}));return a};goog.getMsgWithFallback=function(a,b){return a};goog.exportSymbol=function(a,b,c){goog.exportPath_(a,b,c)};
  5833. goog.exportProperty=function(a,b,c){a[b]=c};goog.inherits=function(a,b){function c(){}c.prototype=b.prototype;a.superClass_=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};
  5834. goog.base=function(a,b,c){var d=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!d)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if("undefined"!==typeof d.superClass_){for(var e=Array(arguments.length-1),f=1;f<arguments.length;f++)e[f-1]=arguments[f];return d.superClass_.constructor.apply(a,e)}if("string"!=typeof b&&"symbol"!=typeof b)throw Error("method names provided to goog.base must be a string or a symbol");
  5835. e=Array(arguments.length-2);for(f=2;f<arguments.length;f++)e[f-2]=arguments[f];f=!1;for(var g=a.constructor.prototype;g;g=Object.getPrototypeOf(g))if(g[b]===d)f=!0;else if(f)return g[b].apply(a,e);if(a[b]===d)return a.constructor.prototype[b].apply(a,e);throw Error("goog.base called from a method of one name to a method of a different name");};goog.scope=function(a){if(goog.isInModuleLoader_())throw Error("goog.scope is not supported within a module.");a.call(goog.global)};
  5836. COMPILED||(goog.global.COMPILED=COMPILED);goog.defineClass=function(a,b){var c=b.constructor,d=b.statics;c&&c!=Object.prototype.constructor||(c=function(){throw Error("cannot instantiate an interface (no constructor defined).");});c=goog.defineClass.createSealingConstructor_(c,a);a&&goog.inherits(c,a);delete b.constructor;delete b.statics;goog.defineClass.applyProperties_(c.prototype,b);null!=d&&(d instanceof Function?d(c):goog.defineClass.applyProperties_(c,d));return c};
  5837. goog.defineClass.SEAL_CLASS_INSTANCES=goog.DEBUG;goog.defineClass.createSealingConstructor_=function(a,b){if(!goog.defineClass.SEAL_CLASS_INSTANCES)return a;var c=!goog.defineClass.isUnsealable_(b),d=function(){var b=a.apply(this,arguments)||this;b[goog.UID_PROPERTY_]=b[goog.UID_PROPERTY_];this.constructor===d&&c&&Object.seal instanceof Function&&Object.seal(b);return b};return d};goog.defineClass.isUnsealable_=function(a){return a&&a.prototype&&a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]};
  5838. goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");goog.defineClass.applyProperties_=function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c]);for(var d=0;d<goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;d++)c=goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[d],Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])};
  5839. goog.tagUnsealableClass=function(a){!COMPILED&&goog.defineClass.SEAL_CLASS_INSTANCES&&(a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]=!0)};goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable";
  5840. !COMPILED&&goog.DEPENDENCIES_ENABLED&&(goog.inHtmlDocument_=function(){var a=goog.global.document;return null!=a&&"write"in a},goog.isDocumentLoading_=function(){var a=goog.global.document;return a.attachEvent?"complete"!=a.readyState:"loading"==a.readyState},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH)&&goog.isString(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_()){var a=goog.global.document,b=a.currentScript;
  5841. a=b?[b]:a.getElementsByTagName("SCRIPT");for(b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?");d=-1==d?c.length:d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}}},goog.findBasePath_(),goog.Transpiler=function(){this.requiresTranspilation_=null;this.transpilationTarget_=goog.TRANSPILE_TO_LANGUAGE},goog.Transpiler.prototype.createRequiresTranspilation_=function(){function a(a,b){e?d[a]=!0:b()?(c=a,d[a]=!1):e=d[a]=!0}function b(a){try{return!!eval(a)}catch(h){return!1}}
  5842. var c="es3",d={es3:!1},e=!1,f=goog.global.navigator&&goog.global.navigator.userAgent?goog.global.navigator.userAgent:"";a("es5",function(){return b("[1,].length==1")});a("es6",function(){return f.match(/Edge\/(\d+)(\.\d)*/i)?!1:b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')});
  5843. a("es7",function(){return b("2 ** 2 == 4")});a("es8",function(){return b("async () => 1, true")});a("es9",function(){return b("({...rest} = {}), true")});a("es_next",function(){return!1});return{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(a,b){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var c=this.createRequiresTranspilation_();this.requiresTranspilation_=c.map;this.transpilationTarget_=this.transpilationTarget_||
  5844. c.target}if(a in this.requiresTranspilation_)return this.requiresTranspilation_[a]?!0:!goog.inHtmlDocument_()||"es6"!=b||"noModule"in goog.global.document.createElement("script")?!1:!0;throw Error("Unknown language mode: "+a);},goog.Transpiler.prototype.transpile=function(a,b){return goog.transpile_(a,b,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(a){return a.replace(/<\/(SCRIPT)/ig,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={};
  5845. this.idToPath_={};this.written_={};this.loadingDeps_=[];this.depsToLoad_=[];this.paused_=!1;this.factory_=new goog.DependencyFactory(goog.transpiler_);this.deferredCallbacks_={};this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(a,b){function c(){d&&(goog.global.setTimeout(d,0),d=null)}var d=b;if(a.length){b=[];for(var e=0;e<a.length;e++){var f=this.getPathFromDeps_(a[e]);if(!f)throw Error("Unregonized namespace: "+a[e]);b.push(this.dependencies_[f])}f=goog.require;var g=0;for(e=
  5846. 0;e<a.length;e++)f(a[e]),b[e].onLoad(function(){++g==a.length&&c()})}else c()},goog.DebugLoader_.prototype.loadClosureDeps=function(){this.depsToLoad_.push(this.factory_.createDependency(goog.normalizePath_(goog.basePath+"deps.js"),"deps.js",[],[],{},!1));this.loadDeps_()},goog.DebugLoader_.prototype.requested=function(a,b){(a=this.getPathFromDeps_(a))&&(b||this.areDepsLoaded_(this.dependencies_[a].requires))&&(b=this.deferredCallbacks_[a])&&(delete this.deferredCallbacks_[a],b())},goog.DebugLoader_.prototype.setDependencyFactory=
  5847. function(a){this.factory_=a},goog.DebugLoader_.prototype.load_=function(a){if(this.getPathFromDeps_(a)){var b=this,c=[],d=function(a){var e=b.getPathFromDeps_(a);if(!e)throw Error("Bad dependency path or symbol: "+a);if(!b.written_[e]){b.written_[e]=!0;a=b.dependencies_[e];for(e=0;e<a.requires.length;e++)goog.isProvided_(a.requires[e])||d(a.requires[e]);c.push(a)}};d(a);a=!!this.depsToLoad_.length;this.depsToLoad_=this.depsToLoad_.concat(c);this.paused_||a||this.loadDeps_()}else throw a="goog.require could not find: "+
  5848. a,goog.logToConsole_(a),Error(a);},goog.DebugLoader_.prototype.loadDeps_=function(){for(var a=this,b=this.paused_;this.depsToLoad_.length&&!b;)(function(){var c=!1,d=a.depsToLoad_.shift(),e=!1;a.loading_(d);var f={pause:function(){if(c)throw Error("Cannot call pause after the call to load.");b=!0},resume:function(){c?a.resume_():b=!1},loaded:function(){if(e)throw Error("Double call to loaded.");e=!0;a.loaded_(d)},pending:function(){for(var b=[],c=0;c<a.loadingDeps_.length;c++)b.push(a.loadingDeps_[c]);
  5849. return b},setModuleState:function(a){goog.moduleLoaderState_={type:a,moduleName:"",declareLegacyNamespace:!1}},registerEs6ModuleExports:function(a,b,c){c&&(goog.loadedModules_[c]={exports:b,type:goog.ModuleType.ES6,moduleId:c||""})},registerGoogModuleExports:function(a,b){goog.loadedModules_[a]={exports:b,type:goog.ModuleType.GOOG,moduleId:a}},clearModuleState:function(){goog.moduleLoaderState_=null},defer:function(b){if(c)throw Error("Cannot register with defer after the call to load.");a.defer_(d,
  5850. b)},areDepsLoaded:function(){return a.areDepsLoaded_(d.requires)}};try{d.load(f)}finally{c=!0}})();b&&this.pause_()},goog.DebugLoader_.prototype.pause_=function(){this.paused_=!0},goog.DebugLoader_.prototype.resume_=function(){this.paused_&&(this.paused_=!1,this.loadDeps_())},goog.DebugLoader_.prototype.loading_=function(a){this.loadingDeps_.push(a)},goog.DebugLoader_.prototype.loaded_=function(a){for(var b=0;b<this.loadingDeps_.length;b++)if(this.loadingDeps_[b]==a){this.loadingDeps_.splice(b,1);
  5851. break}for(b=0;b<this.deferredQueue_.length;b++)if(this.deferredQueue_[b]==a.path){this.deferredQueue_.splice(b,1);break}if(this.loadingDeps_.length==this.deferredQueue_.length&&!this.depsToLoad_.length)for(;this.deferredQueue_.length;)this.requested(this.deferredQueue_.shift(),!0);a.loaded()},goog.DebugLoader_.prototype.areDepsLoaded_=function(a){for(var b=0;b<a.length;b++){var c=this.getPathFromDeps_(a[b]);if(!c||!(c in this.deferredCallbacks_||goog.isProvided_(a[b])))return!1}return!0},goog.DebugLoader_.prototype.getPathFromDeps_=
  5852. function(a){return a in this.idToPath_?this.idToPath_[a]:a in this.dependencies_?a:null},goog.DebugLoader_.prototype.defer_=function(a,b){this.deferredCallbacks_[a.path]=b;this.deferredQueue_.push(a.path)},goog.LoadController=function(){},goog.LoadController.prototype.pause=function(){},goog.LoadController.prototype.resume=function(){},goog.LoadController.prototype.loaded=function(){},goog.LoadController.prototype.pending=function(){},goog.LoadController.prototype.registerEs6ModuleExports=function(a,
  5853. b,c){},goog.LoadController.prototype.setModuleState=function(a){},goog.LoadController.prototype.clearModuleState=function(){},goog.LoadController.prototype.defer=function(a){},goog.LoadController.prototype.areDepsLoaded=function(){},goog.Dependency=function(a,b,c,d,e){this.path=a;this.relativePath=b;this.provides=c;this.requires=d;this.loadFlags=e;this.loaded_=!1;this.loadCallbacks_=[]},goog.Dependency.prototype.getPathName=function(){var a=this.path,b=a.indexOf("://");0<=b&&(a=a.substring(b+3),b=
  5854. a.indexOf("/"),0<=b&&(a=a.substring(b+1)));return a},goog.Dependency.prototype.onLoad=function(a){this.loaded_?a():this.loadCallbacks_.push(a)},goog.Dependency.prototype.loaded=function(){this.loaded_=!0;var a=this.loadCallbacks_;this.loadCallbacks_=[];for(var b=0;b<a.length;b++)a[b]()},goog.Dependency.defer_=!1,goog.Dependency.callbackMap_={},goog.Dependency.registerCallback_=function(a){var b=Math.random().toString(32);goog.Dependency.callbackMap_[b]=a;return b},goog.Dependency.unregisterCallback_=
  5855. function(a){delete goog.Dependency.callbackMap_[a]},goog.Dependency.callback_=function(a,b){if(a in goog.Dependency.callbackMap_){for(var c=goog.Dependency.callbackMap_[a],d=[],e=1;e<arguments.length;e++)d.push(arguments[e]);c.apply(void 0,d)}else throw Error("Callback key "+a+" does not exist (was base.js loaded more than once?).");},goog.Dependency.prototype.load=function(a){if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?a.loaded():a.pause();else if(goog.inHtmlDocument_()){var b=
  5856. goog.global.document;if("complete"==b.readyState&&!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING){if(/\bdeps.js$/.test(this.path)){a.loaded();return}throw Error('Cannot write "'+this.path+'" after document load');}if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&goog.isDocumentLoading_()){var c=goog.Dependency.registerCallback_(function(b){goog.DebugLoader_.IS_OLD_IE_&&"complete"!=b.readyState||(goog.Dependency.unregisterCallback_(c),a.loaded())}),d=!goog.DebugLoader_.IS_OLD_IE_&&goog.getScriptNonce()?
  5857. ' nonce="'+goog.getScriptNonce()+'"':"";d='<script src="'+this.path+'" '+(goog.DebugLoader_.IS_OLD_IE_?"onreadystatechange":"onload")+"=\"goog.Dependency.callback_('"+c+'\', this)" type="text/javascript" '+(goog.Dependency.defer_?"defer":"")+d+">\x3c/script>";b.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(d):d)}else{var e=b.createElement("script");e.defer=goog.Dependency.defer_;e.async=!1;e.type="text/javascript";(d=goog.getScriptNonce())&&e.setAttribute("nonce",d);goog.DebugLoader_.IS_OLD_IE_?
  5858. (a.pause(),e.onreadystatechange=function(){if("loaded"==e.readyState||"complete"==e.readyState)a.loaded(),a.resume()}):e.onload=function(){e.onload=null;a.loaded()};e.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path;b.head.appendChild(e)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."),
  5859. a.loaded()):a.pause()},goog.Es6ModuleDependency=function(a,b,c,d,e){goog.Dependency.call(this,a,b,c,d,e)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(a){function b(a,b){a=b?'<script type="module" crossorigin>'+b+"\x3c/script>":'<script type="module" crossorigin src="'+a+'">\x3c/script>';d.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(a):a)}function c(a,b){var c=d.createElement("script");c.defer=!0;c.async=!1;c.type=
  5860. "module";c.setAttribute("crossorigin",!0);var e=goog.getScriptNonce();e&&c.setAttribute("nonce",e);b?c.textContent=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScript(b):b:c.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(a):a;d.head.appendChild(c)}if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?a.loaded():a.pause();else if(goog.inHtmlDocument_()){var d=goog.global.document,e=this;if(goog.isDocumentLoading_()){var f=b;goog.Dependency.defer_=
  5861. !0}else f=c;var g=goog.Dependency.registerCallback_(function(){goog.Dependency.unregisterCallback_(g);a.setModuleState(goog.ModuleType.ES6)});f(void 0,'goog.Dependency.callback_("'+g+'")');f(this.path,void 0);var h=goog.Dependency.registerCallback_(function(b){goog.Dependency.unregisterCallback_(h);a.registerEs6ModuleExports(e.path,b,goog.moduleLoaderState_.moduleName)});f(void 0,'import * as m from "'+this.path+'"; goog.Dependency.callback_("'+h+'", m)');var k=goog.Dependency.registerCallback_(function(){goog.Dependency.unregisterCallback_(k);
  5862. a.clearModuleState();a.loaded()});f(void 0,'goog.Dependency.callback_("'+k+'")')}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),a.pause()},goog.TransformedDependency=function(a,b,c,d,e){goog.Dependency.call(this,a,b,c,d,e);this.contents_=null;this.lazyFetch_=!goog.inHtmlDocument_()||!("noModule"in goog.global.document.createElement("script"))},goog.inherits(goog.TransformedDependency,goog.Dependency),goog.TransformedDependency.prototype.load=function(a){function b(){e.contents_=
  5863. goog.loadFileSync_(e.path);e.contents_&&(e.contents_=e.transform(e.contents_),e.contents_&&(e.contents_+="\n//# sourceURL="+e.path))}function c(){e.lazyFetch_&&b();if(e.contents_){f&&a.setModuleState(goog.ModuleType.ES6);try{var c=e.contents_;e.contents_=null;goog.globalEval(c);if(f)var d=goog.moduleLoaderState_.moduleName}finally{f&&a.clearModuleState()}f&&goog.global.$jscomp.require.ensure([e.getPathName()],function(){a.registerEs6ModuleExports(e.path,goog.global.$jscomp.require(e.getPathName()),
  5864. d)});a.loaded()}}function d(){var a=goog.global.document,b=goog.Dependency.registerCallback_(function(){goog.Dependency.unregisterCallback_(b);c()}),d='<script type="text/javascript">'+goog.protectScriptTag_('goog.Dependency.callback_("'+b+'");')+"\x3c/script>";a.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(d):d)}var e=this;if(goog.global.CLOSURE_IMPORT_SCRIPT)b(),this.contents_&&goog.global.CLOSURE_IMPORT_SCRIPT("",this.contents_)?(this.contents_=null,a.loaded()):a.pause();
  5865. else{var f=this.loadFlags.module==goog.ModuleType.ES6;this.lazyFetch_||b();var g=1<a.pending().length,h=g&&goog.DebugLoader_.IS_OLD_IE_;g=goog.Dependency.defer_&&(g||goog.isDocumentLoading_());if(h||g)a.defer(function(){c()});else{var k=goog.global.document;h=goog.inHtmlDocument_()&&"ActiveXObject"in goog.global;if(f&&goog.inHtmlDocument_()&&goog.isDocumentLoading_()&&!h){goog.Dependency.defer_=!0;a.pause();var l=k.onreadystatechange;k.onreadystatechange=function(){"interactive"==k.readyState&&(k.onreadystatechange=
  5866. l,c(),a.resume());goog.isFunction(l)&&l.apply(void 0,arguments)}}else!goog.DebugLoader_.IS_OLD_IE_&&goog.inHtmlDocument_()&&goog.isDocumentLoading_()?d():c()}}},goog.TransformedDependency.prototype.transform=function(a){},goog.TranspiledDependency=function(a,b,c,d,e,f){goog.TransformedDependency.call(this,a,b,c,d,e);this.transpiler=f},goog.inherits(goog.TranspiledDependency,goog.TransformedDependency),goog.TranspiledDependency.prototype.transform=function(a){return this.transpiler.transpile(a,this.getPathName())},
  5867. goog.PreTranspiledEs6ModuleDependency=function(a,b,c,d,e){goog.TransformedDependency.call(this,a,b,c,d,e)},goog.inherits(goog.PreTranspiledEs6ModuleDependency,goog.TransformedDependency),goog.PreTranspiledEs6ModuleDependency.prototype.transform=function(a){return a},goog.GoogModuleDependency=function(a,b,c,d,e,f,g){goog.TransformedDependency.call(this,a,b,c,d,e);this.needsTranspile_=f;this.transpiler_=g},goog.inherits(goog.GoogModuleDependency,goog.TransformedDependency),goog.GoogModuleDependency.prototype.transform=
  5868. function(a){this.needsTranspile_&&(a=this.transpiler_.transpile(a,this.getPathName()));return goog.LOAD_MODULE_USING_EVAL&&goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(a+"\n//# sourceURL="+this.path+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+a+"\n;return exports});\n//# sourceURL="+this.path+"\n"},goog.DebugLoader_.IS_OLD_IE_=!(goog.global.atob||!goog.global.document||!goog.global.document.all),goog.DebugLoader_.prototype.addDependency=function(a,b,
  5869. c,d){b=b||[];a=a.replace(/\\/g,"/");var e=goog.normalizePath_(goog.basePath+a);d&&"boolean"!==typeof d||(d=d?{module:goog.ModuleType.GOOG}:{});c=this.factory_.createDependency(e,a,b,c,d,goog.transpiler_.needsTranspile(d.lang||"es3",d.module));this.dependencies_[e]=c;for(c=0;c<b.length;c++)this.idToPath_[b[c]]=e;this.idToPath_[a]=e},goog.DependencyFactory=function(a){this.transpiler=a},goog.DependencyFactory.prototype.createDependency=function(a,b,c,d,e,f){return e.module==goog.ModuleType.GOOG?new goog.GoogModuleDependency(a,
  5870. b,c,d,e,f,this.transpiler):f?new goog.TranspiledDependency(a,b,c,d,e,this.transpiler):e.module==goog.ModuleType.ES6?"never"==goog.TRANSPILE&&goog.ASSUME_ES_MODULES_TRANSPILED?new goog.PreTranspiledEs6ModuleDependency(a,b,c,d,e):new goog.Es6ModuleDependency(a,b,c,d,e):new goog.Dependency(a,b,c,d,e)},goog.debugLoader_=new goog.DebugLoader_,goog.loadClosureDeps=function(){goog.debugLoader_.loadClosureDeps()},goog.setDependencyFactory=function(a){goog.debugLoader_.setDependencyFactory(a)},goog.global.CLOSURE_NO_DEPS||
  5871. goog.debugLoader_.loadClosureDeps(),goog.bootstrap=function(a,b){goog.debugLoader_.bootstrap(a,b)});goog.TRUSTED_TYPES_POLICY_NAME="";goog.identity_=function(a){return a};goog.createTrustedTypesPolicy=function(a){var b=null;if("undefined"===typeof TrustedTypes||!TrustedTypes.createPolicy)return b;try{b=TrustedTypes.createPolicy(a,{createHTML:goog.identity_,createScript:goog.identity_,createScriptURL:goog.identity_,createURL:goog.identity_})}catch(c){goog.logToConsole_(c.message)}return b};
  5872. goog.TRUSTED_TYPES_POLICY_=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#base"):null;goog.object={};goog.object.is=function(a,b){return a===b?0!==a||1/a===1/b:a!==a&&b!==b};goog.object.forEach=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};goog.object.filter=function(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d};goog.object.map=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d};goog.object.some=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1};
  5873. goog.object.every=function(a,b,c){for(var d in a)if(!b.call(c,a[d],d,a))return!1;return!0};goog.object.getCount=function(a){var b=0,c;for(c in a)b++;return b};goog.object.getAnyKey=function(a){for(var b in a)return b};goog.object.getAnyValue=function(a){for(var b in a)return a[b]};goog.object.contains=function(a,b){return goog.object.containsValue(a,b)};goog.object.getValues=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};
  5874. goog.object.getKeys=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b};goog.object.getValueByKeys=function(a,b){var c=goog.isArrayLike(b),d=c?b:arguments;for(c=c?0:1;c<d.length;c++){if(null==a)return;a=a[d[c]]}return a};goog.object.containsKey=function(a,b){return null!==a&&b in a};goog.object.containsValue=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1};goog.object.findKey=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};
  5875. goog.object.findValue=function(a,b,c){return(b=goog.object.findKey(a,b,c))&&a[b]};goog.object.isEmpty=function(a){for(var b in a)return!1;return!0};goog.object.clear=function(a){for(var b in a)delete a[b]};goog.object.remove=function(a,b){var c;(c=b in a)&&delete a[b];return c};goog.object.add=function(a,b,c){if(null!==a&&b in a)throw Error('The object already contains the key "'+b+'"');goog.object.set(a,b,c)};goog.object.get=function(a,b,c){return null!==a&&b in a?a[b]:c};
  5876. goog.object.set=function(a,b,c){a[b]=c};goog.object.setIfUndefined=function(a,b,c){return b in a?a[b]:a[b]=c};goog.object.setWithReturnValueIfNotSet=function(a,b,c){if(b in a)return a[b];c=c();return a[b]=c};goog.object.equals=function(a,b){for(var c in a)if(!(c in b)||a[c]!==b[c])return!1;for(var d in b)if(!(d in a))return!1;return!0};goog.object.clone=function(a){var b={},c;for(c in a)b[c]=a[c];return b};
  5877. goog.object.unsafeClone=function(a){var b=goog.typeOf(a);if("object"==b||"array"==b){if(goog.isFunction(a.clone))return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=goog.object.unsafeClone(a[c]);return b}return a};goog.object.transpose=function(a){var b={},c;for(c in a)b[a[c]]=c;return b};goog.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
  5878. goog.object.extend=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<goog.object.PROTOTYPE_FIELDS_.length;f++)c=goog.object.PROTOTYPE_FIELDS_[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};
  5879. goog.object.create=function(a){var b=arguments.length;if(1==b&&goog.isArray(arguments[0]))return goog.object.create.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c};goog.object.createSet=function(a){var b=arguments.length;if(1==b&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};
  5880. goog.object.createImmutableView=function(a){var b=a;Object.isFrozen&&!Object.isFrozen(a)&&(b=Object.create(a),Object.freeze(b));return b};goog.object.isImmutableView=function(a){return!!Object.isFrozen&&Object.isFrozen(a)};
  5881. goog.object.getAllPropertyNames=function(a,b,c){if(!a)return[];if(!Object.getOwnPropertyNames||!Object.getPrototypeOf)return goog.object.getKeys(a);for(var d={};a&&(a!==Object.prototype||b)&&(a!==Function.prototype||c);){for(var e=Object.getOwnPropertyNames(a),f=0;f<e.length;f++)d[e[f]]=!0;a=Object.getPrototypeOf(a)}return goog.object.getKeys(d)};goog.object.getSuperClass=function(a){return(a=Object.getPrototypeOf(a.prototype))&&a.constructor};goog.debug={};goog.debug.Error=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,goog.debug.Error);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a));this.reportErrorToServer=!0};goog.inherits(goog.debug.Error,Error);goog.debug.Error.prototype.name="CustomError";goog.dom={};goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};goog.asserts={};goog.asserts.ENABLE_ASSERTS=goog.DEBUG;goog.asserts.AssertionError=function(a,b){goog.debug.Error.call(this,goog.asserts.subs_(a,b));this.messagePattern=a};goog.inherits(goog.asserts.AssertionError,goog.debug.Error);goog.asserts.AssertionError.prototype.name="AssertionError";goog.asserts.DEFAULT_ERROR_HANDLER=function(a){throw a;};goog.asserts.errorHandler_=goog.asserts.DEFAULT_ERROR_HANDLER;
  5882. goog.asserts.subs_=function(a,b){a=a.split("%s");for(var c="",d=a.length-1,e=0;e<d;e++)c+=a[e]+(e<b.length?b[e]:"%s");return c+a[d]};goog.asserts.doAssertFailure_=function(a,b,c,d){var e="Assertion failed";if(c){e+=": "+c;var f=d}else a&&(e+=": "+a,f=b);a=new goog.asserts.AssertionError(""+e,f||[]);goog.asserts.errorHandler_(a)};goog.asserts.setErrorHandler=function(a){goog.asserts.ENABLE_ASSERTS&&(goog.asserts.errorHandler_=a)};
  5883. goog.asserts.assert=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!a&&goog.asserts.doAssertFailure_("",null,b,Array.prototype.slice.call(arguments,2));return a};goog.asserts.assertExists=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&null==a&&goog.asserts.doAssertFailure_("Expected to exist: %s.",[a],b,Array.prototype.slice.call(arguments,2));return a};
  5884. goog.asserts.fail=function(a,b){goog.asserts.ENABLE_ASSERTS&&goog.asserts.errorHandler_(new goog.asserts.AssertionError("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1)))};goog.asserts.assertNumber=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isNumber(a)&&goog.asserts.doAssertFailure_("Expected number but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};
  5885. goog.asserts.assertString=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isString(a)&&goog.asserts.doAssertFailure_("Expected string but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};goog.asserts.assertFunction=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isFunction(a)&&goog.asserts.doAssertFailure_("Expected function but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};
  5886. goog.asserts.assertObject=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isObject(a)&&goog.asserts.doAssertFailure_("Expected object but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};goog.asserts.assertArray=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isArray(a)&&goog.asserts.doAssertFailure_("Expected array but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};
  5887. goog.asserts.assertBoolean=function(a,b,c){goog.asserts.ENABLE_ASSERTS&&!goog.isBoolean(a)&&goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};goog.asserts.assertElement=function(a,b,c){!goog.asserts.ENABLE_ASSERTS||goog.isObject(a)&&a.nodeType==goog.dom.NodeType.ELEMENT||goog.asserts.doAssertFailure_("Expected Element but got %s: %s.",[goog.typeOf(a),a],b,Array.prototype.slice.call(arguments,2));return a};
  5888. goog.asserts.assertInstanceof=function(a,b,c,d){!goog.asserts.ENABLE_ASSERTS||a instanceof b||goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.",[goog.asserts.getType_(b),goog.asserts.getType_(a)],c,Array.prototype.slice.call(arguments,3));return a};goog.asserts.assertFinite=function(a,b,c){!goog.asserts.ENABLE_ASSERTS||"number"==typeof a&&isFinite(a)||goog.asserts.doAssertFailure_("Expected %s to be a finite number but it is not.",[a],b,Array.prototype.slice.call(arguments,2));return a};
  5889. goog.asserts.assertObjectPrototypeIsIntact=function(){for(var a in Object.prototype)goog.asserts.fail(a+" should not be enumerable in Object.prototype.")};goog.asserts.getType_=function(a){return a instanceof Function?a.displayName||a.name||"unknown type name":a instanceof Object?a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a):null===a?"null":typeof a};var jspb={BinaryConstants:{},ConstBinaryMessage:function(){},BinaryMessage:function(){}};jspb.BinaryConstants.FieldType={INVALID:-1,DOUBLE:1,FLOAT:2,INT64:3,UINT64:4,INT32:5,FIXED64:6,FIXED32:7,BOOL:8,STRING:9,GROUP:10,MESSAGE:11,BYTES:12,UINT32:13,ENUM:14,SFIXED32:15,SFIXED64:16,SINT32:17,SINT64:18,FHASH64:30,VHASH64:31};jspb.BinaryConstants.WireType={INVALID:-1,VARINT:0,FIXED64:1,DELIMITED:2,START_GROUP:3,END_GROUP:4,FIXED32:5};
  5890. jspb.BinaryConstants.FieldTypeToWireType=function(a){var b=jspb.BinaryConstants.FieldType,c=jspb.BinaryConstants.WireType;switch(a){case b.INT32:case b.INT64:case b.UINT32:case b.UINT64:case b.SINT32:case b.SINT64:case b.BOOL:case b.ENUM:case b.VHASH64:return c.VARINT;case b.DOUBLE:case b.FIXED64:case b.SFIXED64:case b.FHASH64:return c.FIXED64;case b.STRING:case b.MESSAGE:case b.BYTES:return c.DELIMITED;case b.FLOAT:case b.FIXED32:case b.SFIXED32:return c.FIXED32;default:return c.INVALID}};
  5891. jspb.BinaryConstants.INVALID_FIELD_NUMBER=-1;jspb.BinaryConstants.FLOAT32_EPS=1.401298464324817E-45;jspb.BinaryConstants.FLOAT32_MIN=1.1754943508222875E-38;jspb.BinaryConstants.FLOAT32_MAX=3.4028234663852886E38;jspb.BinaryConstants.FLOAT64_EPS=4.9E-324;jspb.BinaryConstants.FLOAT64_MIN=2.2250738585072014E-308;jspb.BinaryConstants.FLOAT64_MAX=1.7976931348623157E308;jspb.BinaryConstants.TWO_TO_20=1048576;jspb.BinaryConstants.TWO_TO_23=8388608;jspb.BinaryConstants.TWO_TO_31=2147483648;
  5892. jspb.BinaryConstants.TWO_TO_32=4294967296;jspb.BinaryConstants.TWO_TO_52=4503599627370496;jspb.BinaryConstants.TWO_TO_63=0x7fffffffffffffff;jspb.BinaryConstants.TWO_TO_64=1.8446744073709552E19;jspb.BinaryConstants.ZERO_HASH="\x00\x00\x00\x00\x00\x00\x00\x00";goog.array={};goog.NATIVE_ARRAY_PROTOTYPES=goog.TRUSTED_SITE;goog.array.ASSUME_NATIVE_FUNCTIONS=2012<goog.FEATURESET_YEAR;goog.array.peek=function(a){return a[a.length-1]};goog.array.last=goog.array.peek;
  5893. goog.array.indexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.indexOf)?function(a,b,c){goog.asserts.assert(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(goog.isString(a))return goog.isString(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};
  5894. goog.array.lastIndexOf=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.lastIndexOf)?function(a,b,c){goog.asserts.assert(null!=a.length);return Array.prototype.lastIndexOf.call(a,b,null==c?a.length-1:c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if(goog.isString(a))return goog.isString(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1};
  5895. goog.array.forEach=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.forEach)?function(a,b,c){goog.asserts.assert(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=goog.isString(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)};goog.array.forEachRight=function(a,b,c){var d=a.length,e=goog.isString(a)?a.split(""):a;for(--d;0<=d;--d)d in e&&b.call(c,e[d],d,a)};
  5896. goog.array.filter=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.filter)?function(a,b,c){goog.asserts.assert(null!=a.length);return Array.prototype.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=goog.isString(a)?a.split(""):a,h=0;h<d;h++)if(h in g){var k=g[h];b.call(c,k,h,a)&&(e[f++]=k)}return e};
  5897. goog.array.map=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.map)?function(a,b,c){goog.asserts.assert(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=goog.isString(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e};
  5898. goog.array.reduce=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduce)?function(a,b,c,d){goog.asserts.assert(null!=a.length);d&&(b=goog.bind(b,d));return Array.prototype.reduce.call(a,b,c)}:function(a,b,c,d){var e=c;goog.array.forEach(a,function(c,g){e=b.call(d,e,c,g,a)});return e};
  5899. goog.array.reduceRight=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.reduceRight)?function(a,b,c,d){goog.asserts.assert(null!=a.length);goog.asserts.assert(null!=b);d&&(b=goog.bind(b,d));return Array.prototype.reduceRight.call(a,b,c)}:function(a,b,c,d){var e=c;goog.array.forEachRight(a,function(c,g){e=b.call(d,e,c,g,a)});return e};
  5900. goog.array.some=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.some)?function(a,b,c){goog.asserts.assert(null!=a.length);return Array.prototype.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=goog.isString(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1};
  5901. goog.array.every=goog.NATIVE_ARRAY_PROTOTYPES&&(goog.array.ASSUME_NATIVE_FUNCTIONS||Array.prototype.every)?function(a,b,c){goog.asserts.assert(null!=a.length);return Array.prototype.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=goog.isString(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0};goog.array.count=function(a,b,c){var d=0;goog.array.forEach(a,function(a,f,g){b.call(c,a,f,g)&&++d},c);return d};
  5902. goog.array.find=function(a,b,c){b=goog.array.findIndex(a,b,c);return 0>b?null:goog.isString(a)?a.charAt(b):a[b]};goog.array.findIndex=function(a,b,c){for(var d=a.length,e=goog.isString(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return f;return-1};goog.array.findRight=function(a,b,c){b=goog.array.findIndexRight(a,b,c);return 0>b?null:goog.isString(a)?a.charAt(b):a[b]};
  5903. goog.array.findIndexRight=function(a,b,c){var d=a.length,e=goog.isString(a)?a.split(""):a;for(--d;0<=d;d--)if(d in e&&b.call(c,e[d],d,a))return d;return-1};goog.array.contains=function(a,b){return 0<=goog.array.indexOf(a,b)};goog.array.isEmpty=function(a){return 0==a.length};goog.array.clear=function(a){if(!goog.isArray(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0};goog.array.insert=function(a,b){goog.array.contains(a,b)||a.push(b)};
  5904. goog.array.insertAt=function(a,b,c){goog.array.splice(a,c,0,b)};goog.array.insertArrayAt=function(a,b,c){goog.partial(goog.array.splice,a,c,0).apply(null,b)};goog.array.insertBefore=function(a,b,c){var d;2==arguments.length||0>(d=goog.array.indexOf(a,c))?a.push(b):goog.array.insertAt(a,b,d)};goog.array.remove=function(a,b){b=goog.array.indexOf(a,b);var c;(c=0<=b)&&goog.array.removeAt(a,b);return c};
  5905. goog.array.removeLast=function(a,b){b=goog.array.lastIndexOf(a,b);return 0<=b?(goog.array.removeAt(a,b),!0):!1};goog.array.removeAt=function(a,b){goog.asserts.assert(null!=a.length);return 1==Array.prototype.splice.call(a,b,1).length};goog.array.removeIf=function(a,b,c){b=goog.array.findIndex(a,b,c);return 0<=b?(goog.array.removeAt(a,b),!0):!1};goog.array.removeAllIf=function(a,b,c){var d=0;goog.array.forEachRight(a,function(e,f){b.call(c,e,f,a)&&goog.array.removeAt(a,f)&&d++});return d};
  5906. goog.array.concat=function(a){return Array.prototype.concat.apply([],arguments)};goog.array.join=function(a){return Array.prototype.concat.apply([],arguments)};goog.array.toArray=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]};goog.array.clone=goog.array.toArray;goog.array.extend=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(goog.isArrayLike(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var g=0;g<f;g++)a[e+g]=d[g]}else a.push(d)}};
  5907. goog.array.splice=function(a,b,c,d){goog.asserts.assert(null!=a.length);return Array.prototype.splice.apply(a,goog.array.slice(arguments,1))};goog.array.slice=function(a,b,c){goog.asserts.assert(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};
  5908. goog.array.removeDuplicates=function(a,b,c){b=b||a;var d=function(a){return goog.isObject(a)?"o"+goog.getUid(a):(typeof a).charAt(0)+a};c=c||d;d={};for(var e=0,f=0;f<a.length;){var g=a[f++],h=c(g);Object.prototype.hasOwnProperty.call(d,h)||(d[h]=!0,b[e++]=g)}b.length=e};goog.array.binarySearch=function(a,b,c){return goog.array.binarySearch_(a,c||goog.array.defaultCompare,!1,b)};goog.array.binarySelect=function(a,b,c){return goog.array.binarySearch_(a,b,!0,void 0,c)};
  5909. goog.array.binarySearch_=function(a,b,c,d,e){for(var f=0,g=a.length,h;f<g;){var k=f+g>>1;var l=c?b.call(e,a[k],k,a):b(d,a[k]);0<l?f=k+1:(g=k,h=!l)}return h?f:~f};goog.array.sort=function(a,b){a.sort(b||goog.array.defaultCompare)};goog.array.stableSort=function(a,b){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]={index:d,value:a[d]};var e=b||goog.array.defaultCompare;goog.array.sort(c,function(a,b){return e(a.value,b.value)||a.index-b.index});for(d=0;d<a.length;d++)a[d]=c[d].value};
  5910. goog.array.sortByKey=function(a,b,c){var d=c||goog.array.defaultCompare;goog.array.sort(a,function(a,c){return d(b(a),b(c))})};goog.array.sortObjectsByKey=function(a,b,c){goog.array.sortByKey(a,function(a){return a[b]},c)};goog.array.isSorted=function(a,b,c){b=b||goog.array.defaultCompare;for(var d=1;d<a.length;d++){var e=b(a[d-1],a[d]);if(0<e||0==e&&c)return!1}return!0};
  5911. goog.array.equals=function(a,b,c){if(!goog.isArrayLike(a)||!goog.isArrayLike(b)||a.length!=b.length)return!1;var d=a.length;c=c||goog.array.defaultCompareEquality;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0};goog.array.compare3=function(a,b,c){c=c||goog.array.defaultCompare;for(var d=Math.min(a.length,b.length),e=0;e<d;e++){var f=c(a[e],b[e]);if(0!=f)return f}return goog.array.defaultCompare(a.length,b.length)};goog.array.defaultCompare=function(a,b){return a>b?1:a<b?-1:0};
  5912. goog.array.inverseDefaultCompare=function(a,b){return-goog.array.defaultCompare(a,b)};goog.array.defaultCompareEquality=function(a,b){return a===b};goog.array.binaryInsert=function(a,b,c){c=goog.array.binarySearch(a,b,c);return 0>c?(goog.array.insertAt(a,b,-(c+1)),!0):!1};goog.array.binaryRemove=function(a,b,c){b=goog.array.binarySearch(a,b,c);return 0<=b?goog.array.removeAt(a,b):!1};
  5913. goog.array.bucket=function(a,b,c){for(var d={},e=0;e<a.length;e++){var f=a[e],g=b.call(c,f,e,a);goog.isDef(g)&&(d[g]||(d[g]=[])).push(f)}return d};goog.array.toObject=function(a,b,c){var d={};goog.array.forEach(a,function(e,f){d[b.call(c,e,f,a)]=e});return d};goog.array.range=function(a,b,c){var d=[],e=0,f=a;c=c||1;void 0!==b&&(e=a,f=b);if(0>c*(f-e))return[];if(0<c)for(a=e;a<f;a+=c)d.push(a);else for(a=e;a>f;a+=c)d.push(a);return d};
  5914. goog.array.repeat=function(a,b){for(var c=[],d=0;d<b;d++)c[d]=a;return c};goog.array.flatten=function(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];if(goog.isArray(d))for(var e=0;e<d.length;e+=8192){var f=goog.array.slice(d,e,e+8192);f=goog.array.flatten.apply(null,f);for(var g=0;g<f.length;g++)b.push(f[g])}else b.push(d)}return b};
  5915. goog.array.rotate=function(a,b){goog.asserts.assert(null!=a.length);a.length&&(b%=a.length,0<b?Array.prototype.unshift.apply(a,a.splice(-b,b)):0>b&&Array.prototype.push.apply(a,a.splice(0,-b)));return a};goog.array.moveItem=function(a,b,c){goog.asserts.assert(0<=b&&b<a.length);goog.asserts.assert(0<=c&&c<a.length);b=Array.prototype.splice.call(a,b,1);Array.prototype.splice.call(a,c,0,b[0])};
  5916. goog.array.zip=function(a){if(!arguments.length)return[];for(var b=[],c=arguments[0].length,d=1;d<arguments.length;d++)arguments[d].length<c&&(c=arguments[d].length);for(d=0;d<c;d++){for(var e=[],f=0;f<arguments.length;f++)e.push(arguments[f][d]);b.push(e)}return b};goog.array.shuffle=function(a,b){b=b||Math.random;for(var c=a.length-1;0<c;c--){var d=Math.floor(b()*(c+1)),e=a[c];a[c]=a[d];a[d]=e}};goog.array.copyByIndex=function(a,b){var c=[];goog.array.forEach(b,function(b){c.push(a[b])});return c};
  5917. goog.array.concatMap=function(a,b,c){return goog.array.concat.apply([],goog.array.map(a,b,c))};goog.crypt={};goog.crypt.stringToByteArray=function(a){for(var b=[],c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);255<e&&(b[c++]=e&255,e>>=8);b[c++]=e}return b};goog.crypt.byteArrayToString=function(a){if(8192>=a.length)return String.fromCharCode.apply(null,a);for(var b="",c=0;c<a.length;c+=8192){var d=goog.array.slice(a,c,c+8192);b+=String.fromCharCode.apply(null,d)}return b};
  5918. goog.crypt.byteArrayToHex=function(a,b){return goog.array.map(a,function(a){a=a.toString(16);return 1<a.length?a:"0"+a}).join(b||"")};goog.crypt.hexToByteArray=function(a){goog.asserts.assert(0==a.length%2,"Key string length must be multiple of 2");for(var b=[],c=0;c<a.length;c+=2)b.push(parseInt(a.substring(c,c+2),16));return b};
  5919. goog.crypt.stringToUtf8ByteArray=function(a){for(var b=[],c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);128>e?b[c++]=e:(2048>e?b[c++]=e>>6|192:(55296==(e&64512)&&d+1<a.length&&56320==(a.charCodeAt(d+1)&64512)?(e=65536+((e&1023)<<10)+(a.charCodeAt(++d)&1023),b[c++]=e>>18|240,b[c++]=e>>12&63|128):b[c++]=e>>12|224,b[c++]=e>>6&63|128),b[c++]=e&63|128)}return b};
  5920. goog.crypt.utf8ByteArrayToString=function(a){for(var b=[],c=0,d=0;c<a.length;){var e=a[c++];if(128>e)b[d++]=String.fromCharCode(e);else if(191<e&&224>e){var f=a[c++];b[d++]=String.fromCharCode((e&31)<<6|f&63)}else if(239<e&&365>e){f=a[c++];var g=a[c++],h=a[c++];e=((e&7)<<18|(f&63)<<12|(g&63)<<6|h&63)-65536;b[d++]=String.fromCharCode(55296+(e>>10));b[d++]=String.fromCharCode(56320+(e&1023))}else f=a[c++],g=a[c++],b[d++]=String.fromCharCode((e&15)<<12|(f&63)<<6|g&63)}return b.join("")};
  5921. goog.crypt.xorByteArray=function(a,b){goog.asserts.assert(a.length==b.length,"XOR array lengths must match");for(var c=[],d=0;d<a.length;d++)c.push(a[d]^b[d]);return c};goog.dom.asserts={};goog.dom.asserts.assertIsLocation=function(a){if(goog.asserts.ENABLE_ASSERTS){var b=goog.dom.asserts.getWindow_(a);b&&(!a||!(a instanceof b.Location)&&a instanceof b.Element)&&goog.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s",goog.dom.asserts.debugStringForType_(a))}return a};
  5922. goog.dom.asserts.assertIsElementType_=function(a,b){if(goog.asserts.ENABLE_ASSERTS){var c=goog.dom.asserts.getWindow_(a);c&&"undefined"!=typeof c[b]&&(a&&(a instanceof c[b]||!(a instanceof c.Location||a instanceof c.Element))||goog.asserts.fail("Argument is not a %s (or a non-Element, non-Location mock); got: %s",b,goog.dom.asserts.debugStringForType_(a)))}return a};goog.dom.asserts.assertIsHTMLAnchorElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLAnchorElement")};
  5923. goog.dom.asserts.assertIsHTMLButtonElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLButtonElement")};goog.dom.asserts.assertIsHTMLLinkElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLLinkElement")};goog.dom.asserts.assertIsHTMLImageElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLImageElement")};goog.dom.asserts.assertIsHTMLAudioElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLAudioElement")};
  5924. goog.dom.asserts.assertIsHTMLVideoElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLVideoElement")};goog.dom.asserts.assertIsHTMLInputElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLInputElement")};goog.dom.asserts.assertIsHTMLTextAreaElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLTextAreaElement")};goog.dom.asserts.assertIsHTMLCanvasElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLCanvasElement")};
  5925. goog.dom.asserts.assertIsHTMLEmbedElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLEmbedElement")};goog.dom.asserts.assertIsHTMLFormElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLFormElement")};goog.dom.asserts.assertIsHTMLFrameElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLFrameElement")};goog.dom.asserts.assertIsHTMLIFrameElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLIFrameElement")};
  5926. goog.dom.asserts.assertIsHTMLObjectElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLObjectElement")};goog.dom.asserts.assertIsHTMLScriptElement=function(a){return goog.dom.asserts.assertIsElementType_(a,"HTMLScriptElement")};
  5927. goog.dom.asserts.debugStringForType_=function(a){if(goog.isObject(a))try{return a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a)}catch(b){return"<object could not be stringified>"}else return void 0===a?"undefined":null===a?"null":typeof a};goog.dom.asserts.getWindow_=function(a){try{var b=a&&a.ownerDocument,c=b&&(b.defaultView||b.parentWindow);c=c||goog.global;if(c.Element&&c.Location)return c}catch(d){}return null};goog.functions={};goog.functions.constant=function(a){return function(){return a}};goog.functions.FALSE=function(){return!1};goog.functions.TRUE=function(){return!0};goog.functions.NULL=function(){return null};goog.functions.identity=function(a,b){return a};goog.functions.error=function(a){return function(){throw Error(a);}};goog.functions.fail=function(a){return function(){throw a;}};
  5928. goog.functions.lock=function(a,b){b=b||0;return function(){return a.apply(this,Array.prototype.slice.call(arguments,0,b))}};goog.functions.nth=function(a){return function(){return arguments[a]}};goog.functions.partialRight=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.push.apply(b,c);return a.apply(this,b)}};goog.functions.withReturnValue=function(a,b){return goog.functions.sequence(a,goog.functions.constant(b))};
  5929. goog.functions.equalTo=function(a,b){return function(c){return b?a==c:a===c}};goog.functions.compose=function(a,b){var c=arguments,d=c.length;return function(){var a;d&&(a=c[d-1].apply(this,arguments));for(var b=d-2;0<=b;b--)a=c[b].call(this,a);return a}};goog.functions.sequence=function(a){var b=arguments,c=b.length;return function(){for(var a,e=0;e<c;e++)a=b[e].apply(this,arguments);return a}};
  5930. goog.functions.and=function(a){var b=arguments,c=b.length;return function(){for(var a=0;a<c;a++)if(!b[a].apply(this,arguments))return!1;return!0}};goog.functions.or=function(a){var b=arguments,c=b.length;return function(){for(var a=0;a<c;a++)if(b[a].apply(this,arguments))return!0;return!1}};goog.functions.not=function(a){return function(){return!a.apply(this,arguments)}};
  5931. goog.functions.create=function(a,b){var c=function(){};c.prototype=a.prototype;c=new c;a.apply(c,Array.prototype.slice.call(arguments,1));return c};goog.functions.CACHE_RETURN_VALUE=!0;goog.functions.cacheReturnValue=function(a){var b=!1,c;return function(){if(!goog.functions.CACHE_RETURN_VALUE)return a();b||(c=a(),b=!0);return c}};goog.functions.once=function(a){var b=a;return function(){if(b){var a=b;b=null;a()}}};
  5932. goog.functions.debounce=function(a,b,c){var d=0;return function(e){goog.global.clearTimeout(d);var f=arguments;d=goog.global.setTimeout(function(){a.apply(c,f)},b)}};goog.functions.throttle=function(a,b,c){var d=0,e=!1,f=[],g=function(){d=0;e&&(e=!1,h())},h=function(){d=goog.global.setTimeout(g,b);a.apply(c,f)};return function(a){f=arguments;d?e=!0:h()}};goog.functions.rateLimit=function(a,b,c){var d=0,e=function(){d=0};return function(f){d||(d=goog.global.setTimeout(e,b),a.apply(c,arguments))}};goog.dom.HtmlElement=function(){};goog.dom.TagName=function(a){this.tagName_=a};goog.dom.TagName.prototype.toString=function(){return this.tagName_};goog.dom.TagName.A=new goog.dom.TagName("A");goog.dom.TagName.ABBR=new goog.dom.TagName("ABBR");goog.dom.TagName.ACRONYM=new goog.dom.TagName("ACRONYM");goog.dom.TagName.ADDRESS=new goog.dom.TagName("ADDRESS");goog.dom.TagName.APPLET=new goog.dom.TagName("APPLET");goog.dom.TagName.AREA=new goog.dom.TagName("AREA");goog.dom.TagName.ARTICLE=new goog.dom.TagName("ARTICLE");
  5933. goog.dom.TagName.ASIDE=new goog.dom.TagName("ASIDE");goog.dom.TagName.AUDIO=new goog.dom.TagName("AUDIO");goog.dom.TagName.B=new goog.dom.TagName("B");goog.dom.TagName.BASE=new goog.dom.TagName("BASE");goog.dom.TagName.BASEFONT=new goog.dom.TagName("BASEFONT");goog.dom.TagName.BDI=new goog.dom.TagName("BDI");goog.dom.TagName.BDO=new goog.dom.TagName("BDO");goog.dom.TagName.BIG=new goog.dom.TagName("BIG");goog.dom.TagName.BLOCKQUOTE=new goog.dom.TagName("BLOCKQUOTE");goog.dom.TagName.BODY=new goog.dom.TagName("BODY");
  5934. goog.dom.TagName.BR=new goog.dom.TagName("BR");goog.dom.TagName.BUTTON=new goog.dom.TagName("BUTTON");goog.dom.TagName.CANVAS=new goog.dom.TagName("CANVAS");goog.dom.TagName.CAPTION=new goog.dom.TagName("CAPTION");goog.dom.TagName.CENTER=new goog.dom.TagName("CENTER");goog.dom.TagName.CITE=new goog.dom.TagName("CITE");goog.dom.TagName.CODE=new goog.dom.TagName("CODE");goog.dom.TagName.COL=new goog.dom.TagName("COL");goog.dom.TagName.COLGROUP=new goog.dom.TagName("COLGROUP");
  5935. goog.dom.TagName.COMMAND=new goog.dom.TagName("COMMAND");goog.dom.TagName.DATA=new goog.dom.TagName("DATA");goog.dom.TagName.DATALIST=new goog.dom.TagName("DATALIST");goog.dom.TagName.DD=new goog.dom.TagName("DD");goog.dom.TagName.DEL=new goog.dom.TagName("DEL");goog.dom.TagName.DETAILS=new goog.dom.TagName("DETAILS");goog.dom.TagName.DFN=new goog.dom.TagName("DFN");goog.dom.TagName.DIALOG=new goog.dom.TagName("DIALOG");goog.dom.TagName.DIR=new goog.dom.TagName("DIR");goog.dom.TagName.DIV=new goog.dom.TagName("DIV");
  5936. goog.dom.TagName.DL=new goog.dom.TagName("DL");goog.dom.TagName.DT=new goog.dom.TagName("DT");goog.dom.TagName.EM=new goog.dom.TagName("EM");goog.dom.TagName.EMBED=new goog.dom.TagName("EMBED");goog.dom.TagName.FIELDSET=new goog.dom.TagName("FIELDSET");goog.dom.TagName.FIGCAPTION=new goog.dom.TagName("FIGCAPTION");goog.dom.TagName.FIGURE=new goog.dom.TagName("FIGURE");goog.dom.TagName.FONT=new goog.dom.TagName("FONT");goog.dom.TagName.FOOTER=new goog.dom.TagName("FOOTER");goog.dom.TagName.FORM=new goog.dom.TagName("FORM");
  5937. goog.dom.TagName.FRAME=new goog.dom.TagName("FRAME");goog.dom.TagName.FRAMESET=new goog.dom.TagName("FRAMESET");goog.dom.TagName.H1=new goog.dom.TagName("H1");goog.dom.TagName.H2=new goog.dom.TagName("H2");goog.dom.TagName.H3=new goog.dom.TagName("H3");goog.dom.TagName.H4=new goog.dom.TagName("H4");goog.dom.TagName.H5=new goog.dom.TagName("H5");goog.dom.TagName.H6=new goog.dom.TagName("H6");goog.dom.TagName.HEAD=new goog.dom.TagName("HEAD");goog.dom.TagName.HEADER=new goog.dom.TagName("HEADER");
  5938. goog.dom.TagName.HGROUP=new goog.dom.TagName("HGROUP");goog.dom.TagName.HR=new goog.dom.TagName("HR");goog.dom.TagName.HTML=new goog.dom.TagName("HTML");goog.dom.TagName.I=new goog.dom.TagName("I");goog.dom.TagName.IFRAME=new goog.dom.TagName("IFRAME");goog.dom.TagName.IMG=new goog.dom.TagName("IMG");goog.dom.TagName.INPUT=new goog.dom.TagName("INPUT");goog.dom.TagName.INS=new goog.dom.TagName("INS");goog.dom.TagName.ISINDEX=new goog.dom.TagName("ISINDEX");goog.dom.TagName.KBD=new goog.dom.TagName("KBD");
  5939. goog.dom.TagName.KEYGEN=new goog.dom.TagName("KEYGEN");goog.dom.TagName.LABEL=new goog.dom.TagName("LABEL");goog.dom.TagName.LEGEND=new goog.dom.TagName("LEGEND");goog.dom.TagName.LI=new goog.dom.TagName("LI");goog.dom.TagName.LINK=new goog.dom.TagName("LINK");goog.dom.TagName.MAIN=new goog.dom.TagName("MAIN");goog.dom.TagName.MAP=new goog.dom.TagName("MAP");goog.dom.TagName.MARK=new goog.dom.TagName("MARK");goog.dom.TagName.MATH=new goog.dom.TagName("MATH");goog.dom.TagName.MENU=new goog.dom.TagName("MENU");
  5940. goog.dom.TagName.MENUITEM=new goog.dom.TagName("MENUITEM");goog.dom.TagName.META=new goog.dom.TagName("META");goog.dom.TagName.METER=new goog.dom.TagName("METER");goog.dom.TagName.NAV=new goog.dom.TagName("NAV");goog.dom.TagName.NOFRAMES=new goog.dom.TagName("NOFRAMES");goog.dom.TagName.NOSCRIPT=new goog.dom.TagName("NOSCRIPT");goog.dom.TagName.OBJECT=new goog.dom.TagName("OBJECT");goog.dom.TagName.OL=new goog.dom.TagName("OL");goog.dom.TagName.OPTGROUP=new goog.dom.TagName("OPTGROUP");
  5941. goog.dom.TagName.OPTION=new goog.dom.TagName("OPTION");goog.dom.TagName.OUTPUT=new goog.dom.TagName("OUTPUT");goog.dom.TagName.P=new goog.dom.TagName("P");goog.dom.TagName.PARAM=new goog.dom.TagName("PARAM");goog.dom.TagName.PICTURE=new goog.dom.TagName("PICTURE");goog.dom.TagName.PRE=new goog.dom.TagName("PRE");goog.dom.TagName.PROGRESS=new goog.dom.TagName("PROGRESS");goog.dom.TagName.Q=new goog.dom.TagName("Q");goog.dom.TagName.RP=new goog.dom.TagName("RP");goog.dom.TagName.RT=new goog.dom.TagName("RT");
  5942. goog.dom.TagName.RTC=new goog.dom.TagName("RTC");goog.dom.TagName.RUBY=new goog.dom.TagName("RUBY");goog.dom.TagName.S=new goog.dom.TagName("S");goog.dom.TagName.SAMP=new goog.dom.TagName("SAMP");goog.dom.TagName.SCRIPT=new goog.dom.TagName("SCRIPT");goog.dom.TagName.SECTION=new goog.dom.TagName("SECTION");goog.dom.TagName.SELECT=new goog.dom.TagName("SELECT");goog.dom.TagName.SMALL=new goog.dom.TagName("SMALL");goog.dom.TagName.SOURCE=new goog.dom.TagName("SOURCE");goog.dom.TagName.SPAN=new goog.dom.TagName("SPAN");
  5943. goog.dom.TagName.STRIKE=new goog.dom.TagName("STRIKE");goog.dom.TagName.STRONG=new goog.dom.TagName("STRONG");goog.dom.TagName.STYLE=new goog.dom.TagName("STYLE");goog.dom.TagName.SUB=new goog.dom.TagName("SUB");goog.dom.TagName.SUMMARY=new goog.dom.TagName("SUMMARY");goog.dom.TagName.SUP=new goog.dom.TagName("SUP");goog.dom.TagName.SVG=new goog.dom.TagName("SVG");goog.dom.TagName.TABLE=new goog.dom.TagName("TABLE");goog.dom.TagName.TBODY=new goog.dom.TagName("TBODY");goog.dom.TagName.TD=new goog.dom.TagName("TD");
  5944. goog.dom.TagName.TEMPLATE=new goog.dom.TagName("TEMPLATE");goog.dom.TagName.TEXTAREA=new goog.dom.TagName("TEXTAREA");goog.dom.TagName.TFOOT=new goog.dom.TagName("TFOOT");goog.dom.TagName.TH=new goog.dom.TagName("TH");goog.dom.TagName.THEAD=new goog.dom.TagName("THEAD");goog.dom.TagName.TIME=new goog.dom.TagName("TIME");goog.dom.TagName.TITLE=new goog.dom.TagName("TITLE");goog.dom.TagName.TR=new goog.dom.TagName("TR");goog.dom.TagName.TRACK=new goog.dom.TagName("TRACK");goog.dom.TagName.TT=new goog.dom.TagName("TT");
  5945. goog.dom.TagName.U=new goog.dom.TagName("U");goog.dom.TagName.UL=new goog.dom.TagName("UL");goog.dom.TagName.VAR=new goog.dom.TagName("VAR");goog.dom.TagName.VIDEO=new goog.dom.TagName("VIDEO");goog.dom.TagName.WBR=new goog.dom.TagName("WBR");goog.dom.tags={};goog.dom.tags.VOID_TAGS_={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};goog.dom.tags.isVoidTag=function(a){return!0===goog.dom.tags.VOID_TAGS_[a]};goog.html={};goog.html.trustedtypes={};goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#html"):null;goog.string={};goog.string.TypedString=function(){};goog.string.Const=function(a,b){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_=a===goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_&&b||"";this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=goog.string.Const.TYPE_MARKER_};goog.string.Const.prototype.implementsGoogStringTypedString=!0;goog.string.Const.prototype.getTypedStringValue=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_};
  5946. goog.string.Const.prototype.toString=function(){return"Const{"+this.stringConstValueWithSecurityContract__googStringSecurityPrivate_+"}"};goog.string.Const.unwrap=function(a){if(a instanceof goog.string.Const&&a.constructor===goog.string.Const&&a.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===goog.string.Const.TYPE_MARKER_)return a.stringConstValueWithSecurityContract__googStringSecurityPrivate_;goog.asserts.fail("expected object of type Const, got '"+a+"'");return"type_error:Const"};
  5947. goog.string.Const.from=function(a){return new goog.string.Const(goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_,a)};goog.string.Const.TYPE_MARKER_={};goog.string.Const.GOOG_STRING_CONSTRUCTOR_TOKEN_PRIVATE_={};goog.string.Const.EMPTY=goog.string.Const.from("");goog.html.SafeScript=function(){this.privateDoNotAccessOrElseSafeScriptWrappedValue_="";this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};goog.html.SafeScript.prototype.implementsGoogStringTypedString=!0;goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};goog.html.SafeScript.fromConstant=function(a){a=goog.string.Const.unwrap(a);return 0===a.length?goog.html.SafeScript.EMPTY:goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(a)};
  5948. goog.html.SafeScript.fromConstantAndArgs=function(a,b){for(var c=[],d=1;d<arguments.length;d++)c.push(goog.html.SafeScript.stringify_(arguments[d]));return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("("+goog.string.Const.unwrap(a)+")("+c.join(", ")+");")};goog.html.SafeScript.fromJson=function(a){return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(goog.html.SafeScript.stringify_(a))};goog.html.SafeScript.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString()};
  5949. goog.DEBUG&&(goog.html.SafeScript.prototype.toString=function(){return"SafeScript{"+this.privateDoNotAccessOrElseSafeScriptWrappedValue_+"}"});goog.html.SafeScript.unwrap=function(a){return goog.html.SafeScript.unwrapTrustedScript(a).toString()};
  5950. goog.html.SafeScript.unwrapTrustedScript=function(a){if(a instanceof goog.html.SafeScript&&a.constructor===goog.html.SafeScript&&a.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseSafeScriptWrappedValue_;goog.asserts.fail("expected object of type SafeScript, got '"+a+"' of type "+goog.typeOf(a));return"type_error:SafeScript"};
  5951. goog.html.SafeScript.stringify_=function(a){return JSON.stringify(a).replace(/</g,"\\x3c")};goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse=function(a){return(new goog.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(a)};
  5952. goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a){this.privateDoNotAccessOrElseSafeScriptWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScript(a):a;return this};goog.html.SafeScript.EMPTY=goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");goog.fs={};goog.fs.url={};goog.fs.url.createObjectUrl=function(a){return goog.fs.url.getUrlObject_().createObjectURL(a)};goog.fs.url.revokeObjectUrl=function(a){goog.fs.url.getUrlObject_().revokeObjectURL(a)};goog.fs.url.getUrlObject_=function(){var a=goog.fs.url.findUrlObject_();if(null!=a)return a;throw Error("This browser doesn't seem to support blob URLs");};
  5953. goog.fs.url.findUrlObject_=function(){return goog.isDef(goog.global.URL)&&goog.isDef(goog.global.URL.createObjectURL)?goog.global.URL:goog.isDef(goog.global.webkitURL)&&goog.isDef(goog.global.webkitURL.createObjectURL)?goog.global.webkitURL:goog.isDef(goog.global.createObjectURL)?goog.global:null};goog.fs.url.browserSupportsObjectUrls=function(){return null!=goog.fs.url.findUrlObject_()};goog.i18n={};goog.i18n.bidi={};goog.i18n.bidi.FORCE_RTL=!1;
  5954. goog.i18n.bidi.IS_RTL=goog.i18n.bidi.FORCE_RTL||("ar"==goog.LOCALE.substring(0,2).toLowerCase()||"fa"==goog.LOCALE.substring(0,2).toLowerCase()||"he"==goog.LOCALE.substring(0,2).toLowerCase()||"iw"==goog.LOCALE.substring(0,2).toLowerCase()||"ps"==goog.LOCALE.substring(0,2).toLowerCase()||"sd"==goog.LOCALE.substring(0,2).toLowerCase()||"ug"==goog.LOCALE.substring(0,2).toLowerCase()||"ur"==goog.LOCALE.substring(0,2).toLowerCase()||"yi"==goog.LOCALE.substring(0,2).toLowerCase())&&(2==goog.LOCALE.length||
  5955. "-"==goog.LOCALE.substring(2,3)||"_"==goog.LOCALE.substring(2,3))||3<=goog.LOCALE.length&&"ckb"==goog.LOCALE.substring(0,3).toLowerCase()&&(3==goog.LOCALE.length||"-"==goog.LOCALE.substring(3,4)||"_"==goog.LOCALE.substring(3,4))||7<=goog.LOCALE.length&&("-"==goog.LOCALE.substring(2,3)||"_"==goog.LOCALE.substring(2,3))&&("adlm"==goog.LOCALE.substring(3,7).toLowerCase()||"arab"==goog.LOCALE.substring(3,7).toLowerCase()||"hebr"==goog.LOCALE.substring(3,7).toLowerCase()||"nkoo"==goog.LOCALE.substring(3,
  5956. 7).toLowerCase()||"rohg"==goog.LOCALE.substring(3,7).toLowerCase()||"thaa"==goog.LOCALE.substring(3,7).toLowerCase())||8<=goog.LOCALE.length&&("-"==goog.LOCALE.substring(3,4)||"_"==goog.LOCALE.substring(3,4))&&("adlm"==goog.LOCALE.substring(4,8).toLowerCase()||"arab"==goog.LOCALE.substring(4,8).toLowerCase()||"hebr"==goog.LOCALE.substring(4,8).toLowerCase()||"nkoo"==goog.LOCALE.substring(4,8).toLowerCase()||"rohg"==goog.LOCALE.substring(4,8).toLowerCase()||"thaa"==goog.LOCALE.substring(4,8).toLowerCase());
  5957. goog.i18n.bidi.Format={LRE:"\u202a",RLE:"\u202b",PDF:"\u202c",LRM:"\u200e",RLM:"\u200f"};goog.i18n.bidi.Dir={LTR:1,RTL:-1,NEUTRAL:0};goog.i18n.bidi.RIGHT="right";goog.i18n.bidi.LEFT="left";goog.i18n.bidi.I18N_RIGHT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.LEFT:goog.i18n.bidi.RIGHT;goog.i18n.bidi.I18N_LEFT=goog.i18n.bidi.IS_RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT;
  5958. goog.i18n.bidi.toDir=function(a,b){return"number"==typeof a?0<a?goog.i18n.bidi.Dir.LTR:0>a?goog.i18n.bidi.Dir.RTL:b?null:goog.i18n.bidi.Dir.NEUTRAL:null==a?null:a?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR};goog.i18n.bidi.ltrChars_="A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";goog.i18n.bidi.rtlChars_="\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc";
  5959. goog.i18n.bidi.htmlSkipReg_=/<[^>]*>|&[^;]+;/g;goog.i18n.bidi.stripHtmlIfNeeded_=function(a,b){return b?a.replace(goog.i18n.bidi.htmlSkipReg_,""):a};goog.i18n.bidi.rtlCharReg_=new RegExp("["+goog.i18n.bidi.rtlChars_+"]");goog.i18n.bidi.ltrCharReg_=new RegExp("["+goog.i18n.bidi.ltrChars_+"]");goog.i18n.bidi.hasAnyRtl=function(a,b){return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a,b))};goog.i18n.bidi.hasRtlChar=goog.i18n.bidi.hasAnyRtl;
  5960. goog.i18n.bidi.hasAnyLtr=function(a,b){return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a,b))};goog.i18n.bidi.ltrRe_=new RegExp("^["+goog.i18n.bidi.ltrChars_+"]");goog.i18n.bidi.rtlRe_=new RegExp("^["+goog.i18n.bidi.rtlChars_+"]");goog.i18n.bidi.isRtlChar=function(a){return goog.i18n.bidi.rtlRe_.test(a)};goog.i18n.bidi.isLtrChar=function(a){return goog.i18n.bidi.ltrRe_.test(a)};goog.i18n.bidi.isNeutralChar=function(a){return!goog.i18n.bidi.isLtrChar(a)&&!goog.i18n.bidi.isRtlChar(a)};
  5961. goog.i18n.bidi.ltrDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.rtlChars_+"]*["+goog.i18n.bidi.ltrChars_+"]");goog.i18n.bidi.rtlDirCheckRe_=new RegExp("^[^"+goog.i18n.bidi.ltrChars_+"]*["+goog.i18n.bidi.rtlChars_+"]");goog.i18n.bidi.startsWithRtl=function(a,b){return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a,b))};goog.i18n.bidi.isRtlText=goog.i18n.bidi.startsWithRtl;
  5962. goog.i18n.bidi.startsWithLtr=function(a,b){return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a,b))};goog.i18n.bidi.isLtrText=goog.i18n.bidi.startsWithLtr;goog.i18n.bidi.isRequiredLtrRe_=/^http:\/\/.*/;goog.i18n.bidi.isNeutralText=function(a,b){a=goog.i18n.bidi.stripHtmlIfNeeded_(a,b);return goog.i18n.bidi.isRequiredLtrRe_.test(a)||!goog.i18n.bidi.hasAnyLtr(a)&&!goog.i18n.bidi.hasAnyRtl(a)};
  5963. goog.i18n.bidi.ltrExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.ltrChars_+"][^"+goog.i18n.bidi.rtlChars_+"]*$");goog.i18n.bidi.rtlExitDirCheckRe_=new RegExp("["+goog.i18n.bidi.rtlChars_+"][^"+goog.i18n.bidi.ltrChars_+"]*$");goog.i18n.bidi.endsWithLtr=function(a,b){return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a,b))};goog.i18n.bidi.isLtrExitText=goog.i18n.bidi.endsWithLtr;
  5964. goog.i18n.bidi.endsWithRtl=function(a,b){return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a,b))};goog.i18n.bidi.isRtlExitText=goog.i18n.bidi.endsWithRtl;goog.i18n.bidi.rtlLocalesRe_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;goog.i18n.bidi.isRtlLanguage=function(a){return goog.i18n.bidi.rtlLocalesRe_.test(a)};goog.i18n.bidi.bracketGuardTextRe_=/(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
  5965. goog.i18n.bidi.guardBracketInText=function(a,b){b=(void 0===b?goog.i18n.bidi.hasAnyRtl(a):b)?goog.i18n.bidi.Format.RLM:goog.i18n.bidi.Format.LRM;return a.replace(goog.i18n.bidi.bracketGuardTextRe_,b+"$&"+b)};goog.i18n.bidi.enforceRtlInHtml=function(a){return"<"==a.charAt(0)?a.replace(/<\w+/,"$& dir=rtl"):"\n<span dir=rtl>"+a+"</span>"};goog.i18n.bidi.enforceRtlInText=function(a){return goog.i18n.bidi.Format.RLE+a+goog.i18n.bidi.Format.PDF};
  5966. goog.i18n.bidi.enforceLtrInHtml=function(a){return"<"==a.charAt(0)?a.replace(/<\w+/,"$& dir=ltr"):"\n<span dir=ltr>"+a+"</span>"};goog.i18n.bidi.enforceLtrInText=function(a){return goog.i18n.bidi.Format.LRE+a+goog.i18n.bidi.Format.PDF};goog.i18n.bidi.dimensionsRe_=/:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;goog.i18n.bidi.leftRe_=/left/gi;goog.i18n.bidi.rightRe_=/right/gi;goog.i18n.bidi.tempRe_=/%%%%/g;
  5967. goog.i18n.bidi.mirrorCSS=function(a){return a.replace(goog.i18n.bidi.dimensionsRe_,":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_,"%%%%").replace(goog.i18n.bidi.rightRe_,goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_,goog.i18n.bidi.RIGHT)};goog.i18n.bidi.doubleQuoteSubstituteRe_=/([\u0591-\u05f2])"/g;goog.i18n.bidi.singleQuoteSubstituteRe_=/([\u0591-\u05f2])'/g;
  5968. goog.i18n.bidi.normalizeHebrewQuote=function(a){return a.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_,"$1\u05f4").replace(goog.i18n.bidi.singleQuoteSubstituteRe_,"$1\u05f3")};goog.i18n.bidi.wordSeparatorRe_=/\s+/;goog.i18n.bidi.hasNumeralsRe_=/[\d\u06f0-\u06f9]/;goog.i18n.bidi.rtlDetectionThreshold_=.4;
  5969. goog.i18n.bidi.estimateDirection=function(a,b){var c=0,d=0,e=!1;a=goog.i18n.bidi.stripHtmlIfNeeded_(a,b).split(goog.i18n.bidi.wordSeparatorRe_);for(b=0;b<a.length;b++){var f=a[b];goog.i18n.bidi.startsWithRtl(f)?(c++,d++):goog.i18n.bidi.isRequiredLtrRe_.test(f)?e=!0:goog.i18n.bidi.hasAnyLtr(f)?d++:goog.i18n.bidi.hasNumeralsRe_.test(f)&&(e=!0)}return 0==d?e?goog.i18n.bidi.Dir.LTR:goog.i18n.bidi.Dir.NEUTRAL:c/d>goog.i18n.bidi.rtlDetectionThreshold_?goog.i18n.bidi.Dir.RTL:goog.i18n.bidi.Dir.LTR};
  5970. goog.i18n.bidi.detectRtlDirectionality=function(a,b){return goog.i18n.bidi.estimateDirection(a,b)==goog.i18n.bidi.Dir.RTL};goog.i18n.bidi.setElementDirAndAlign=function(a,b){a&&(b=goog.i18n.bidi.toDir(b))&&(a.style.textAlign=b==goog.i18n.bidi.Dir.RTL?goog.i18n.bidi.RIGHT:goog.i18n.bidi.LEFT,a.dir=b==goog.i18n.bidi.Dir.RTL?"rtl":"ltr")};
  5971. goog.i18n.bidi.setElementDirByTextDirectionality=function(a,b){switch(goog.i18n.bidi.estimateDirection(b)){case goog.i18n.bidi.Dir.LTR:a.dir="ltr";break;case goog.i18n.bidi.Dir.RTL:a.dir="rtl";break;default:a.removeAttribute("dir")}};goog.i18n.bidi.DirectionalString=function(){};goog.html.TrustedResourceUrl=function(){this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_="";this.trustedURL_=null;this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString=!0;goog.html.TrustedResourceUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString()};
  5972. goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString=!0;goog.html.TrustedResourceUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR};
  5973. goog.html.TrustedResourceUrl.prototype.cloneWithParams=function(a,b){var c=goog.html.TrustedResourceUrl.unwrap(this);c=goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(c);var d=c[3]||"";return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(c[1]+goog.html.TrustedResourceUrl.stringifyParams_("?",c[2]||"",a)+goog.html.TrustedResourceUrl.stringifyParams_("#",d,b))};
  5974. goog.DEBUG&&(goog.html.TrustedResourceUrl.prototype.toString=function(){return"TrustedResourceUrl{"+this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+"}"});goog.html.TrustedResourceUrl.unwrap=function(a){return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(a).toString()};
  5975. goog.html.TrustedResourceUrl.unwrapTrustedScriptURL=function(a){if(a instanceof goog.html.TrustedResourceUrl&&a.constructor===goog.html.TrustedResourceUrl&&a.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;goog.asserts.fail("expected object of type TrustedResourceUrl, got '"+a+"' of type "+goog.typeOf(a));return"type_error:TrustedResourceUrl"};
  5976. goog.html.TrustedResourceUrl.unwrapTrustedURL=function(a){return a.trustedURL_?a.trustedURL_:goog.html.TrustedResourceUrl.unwrap(a)};
  5977. goog.html.TrustedResourceUrl.format=function(a,b){var c=goog.string.Const.unwrap(a);if(!goog.html.TrustedResourceUrl.BASE_URL_.test(c))throw Error("Invalid TrustedResourceUrl format: "+c);a=c.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_,function(a,e){if(!Object.prototype.hasOwnProperty.call(b,e))throw Error('Found marker, "'+e+'", in format string, "'+c+'", but no valid label mapping found in args: '+JSON.stringify(b));a=b[e];return a instanceof goog.string.Const?goog.string.Const.unwrap(a):
  5978. encodeURIComponent(String(a))});return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(a)};goog.html.TrustedResourceUrl.FORMAT_MARKER_=/%{(\w+)}/g;goog.html.TrustedResourceUrl.BASE_URL_=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i;goog.html.TrustedResourceUrl.URL_PARAM_PARSER_=/^([^?#]*)(\?[^#]*)?(#[\s\S]*)?/;
  5979. goog.html.TrustedResourceUrl.formatWithParams=function(a,b,c,d){return goog.html.TrustedResourceUrl.format(a,b).cloneWithParams(c,d)};goog.html.TrustedResourceUrl.fromConstant=function(a){return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a))};goog.html.TrustedResourceUrl.fromConstants=function(a){for(var b="",c=0;c<a.length;c++)b+=goog.string.Const.unwrap(a[c]);return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)};
  5980. goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
  5981. goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse=function(a){var b=new goog.html.TrustedResourceUrl;b.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScriptURL(a):a;goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY&&(b.trustedURL_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(a));return b};
  5982. goog.html.TrustedResourceUrl.stringifyParams_=function(a,b,c){if(null==c)return b;if(goog.isString(c))return c?a+encodeURIComponent(c):"";for(var d in c){var e=c[d];e=goog.isArray(e)?e:[e];for(var f=0;f<e.length;f++){var g=e[f];null!=g&&(b||(b=a),b+=(b.length>a.length?"&":"")+encodeURIComponent(d)+"="+encodeURIComponent(String(g)))}}return b};goog.string.internal={};goog.string.internal.startsWith=function(a,b){return 0==a.lastIndexOf(b,0)};goog.string.internal.endsWith=function(a,b){var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)==c};goog.string.internal.caseInsensitiveStartsWith=function(a,b){return 0==goog.string.internal.caseInsensitiveCompare(b,a.substr(0,b.length))};goog.string.internal.caseInsensitiveEndsWith=function(a,b){return 0==goog.string.internal.caseInsensitiveCompare(b,a.substr(a.length-b.length,b.length))};
  5983. goog.string.internal.caseInsensitiveEquals=function(a,b){return a.toLowerCase()==b.toLowerCase()};goog.string.internal.isEmptyOrWhitespace=function(a){return/^[\s\xa0]*$/.test(a)};goog.string.internal.trim=goog.TRUSTED_SITE&&String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]};goog.string.internal.caseInsensitiveCompare=function(a,b){a=String(a).toLowerCase();b=String(b).toLowerCase();return a<b?-1:a==b?0:1};
  5984. goog.string.internal.newLineToBr=function(a,b){return a.replace(/(\r\n|\r|\n)/g,b?"<br />":"<br>")};
  5985. goog.string.internal.htmlEscape=function(a,b){if(b)a=a.replace(goog.string.internal.AMP_RE_,"&amp;").replace(goog.string.internal.LT_RE_,"&lt;").replace(goog.string.internal.GT_RE_,"&gt;").replace(goog.string.internal.QUOT_RE_,"&quot;").replace(goog.string.internal.SINGLE_QUOTE_RE_,"&#39;").replace(goog.string.internal.NULL_RE_,"&#0;");else{if(!goog.string.internal.ALL_RE_.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(goog.string.internal.AMP_RE_,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(goog.string.internal.LT_RE_,
  5986. "&lt;"));-1!=a.indexOf(">")&&(a=a.replace(goog.string.internal.GT_RE_,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(goog.string.internal.QUOT_RE_,"&quot;"));-1!=a.indexOf("'")&&(a=a.replace(goog.string.internal.SINGLE_QUOTE_RE_,"&#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(goog.string.internal.NULL_RE_,"&#0;"))}return a};goog.string.internal.AMP_RE_=/&/g;goog.string.internal.LT_RE_=/</g;goog.string.internal.GT_RE_=/>/g;goog.string.internal.QUOT_RE_=/"/g;goog.string.internal.SINGLE_QUOTE_RE_=/'/g;
  5987. goog.string.internal.NULL_RE_=/\x00/g;goog.string.internal.ALL_RE_=/[\x00&<>"']/;goog.string.internal.whitespaceEscape=function(a,b){return goog.string.internal.newLineToBr(a.replace(/ /g," &#160;"),b)};goog.string.internal.contains=function(a,b){return-1!=a.indexOf(b)};goog.string.internal.caseInsensitiveContains=function(a,b){return goog.string.internal.contains(a.toLowerCase(),b.toLowerCase())};
  5988. goog.string.internal.compareVersions=function(a,b){var c=0;a=goog.string.internal.trim(String(a)).split(".");b=goog.string.internal.trim(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;0==c&&e<d;e++){var f=a[e]||"",g=b[e]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];if(0==f[0].length&&0==g[0].length)break;c=0==f[1].length?0:parseInt(f[1],10);var h=0==g[1].length?0:parseInt(g[1],10);c=goog.string.internal.compareElements_(c,h)||goog.string.internal.compareElements_(0==
  5989. f[2].length,0==g[2].length)||goog.string.internal.compareElements_(f[2],g[2]);f=f[3];g=g[3]}while(0==c)}return c};goog.string.internal.compareElements_=function(a,b){return a<b?-1:a>b?1:0};goog.html.SafeUrl=function(){this.privateDoNotAccessOrElseSafeUrlWrappedValue_="";this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};goog.html.SafeUrl.INNOCUOUS_STRING="about:invalid#zClosurez";goog.html.SafeUrl.prototype.implementsGoogStringTypedString=!0;goog.html.SafeUrl.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()};
  5990. goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString=!0;goog.html.SafeUrl.prototype.getDirection=function(){return goog.i18n.bidi.Dir.LTR};goog.DEBUG&&(goog.html.SafeUrl.prototype.toString=function(){return"SafeUrl{"+this.privateDoNotAccessOrElseSafeUrlWrappedValue_+"}"});goog.html.SafeUrl.unwrap=function(a){return goog.html.SafeUrl.unwrapTrustedURL(a).toString()};
  5991. goog.html.SafeUrl.unwrapTrustedURL=function(a){if(a instanceof goog.html.SafeUrl&&a.constructor===goog.html.SafeUrl&&a.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseSafeUrlWrappedValue_;goog.asserts.fail("expected object of type SafeUrl, got '"+a+"' of type "+goog.typeOf(a));return"type_error:SafeUrl"};goog.html.SafeUrl.fromConstant=function(a){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a))};
  5992. goog.html.SAFE_MIME_TYPE_PATTERN_=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))(?:;\w+=(?:\w+|"[\w;=]+"))*$/i;goog.html.SafeUrl.isSafeMimeType=function(a){return goog.html.SAFE_MIME_TYPE_PATTERN_.test(a)};goog.html.SafeUrl.fromBlob=function(a){a=goog.html.SAFE_MIME_TYPE_PATTERN_.test(a.type)?goog.fs.url.createObjectUrl(a):goog.html.SafeUrl.INNOCUOUS_STRING;return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
  5993. goog.html.DATA_URL_PATTERN_=/^data:([^,]*);base64,[a-z0-9+\/]+=*$/i;goog.html.SafeUrl.fromDataUrl=function(a){a=a.replace(/(%0A|%0D)/g,"");var b=a.match(goog.html.DATA_URL_PATTERN_);b=b&&goog.html.SAFE_MIME_TYPE_PATTERN_.test(b[1]);return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b?a:goog.html.SafeUrl.INNOCUOUS_STRING)};goog.html.SafeUrl.fromTelUrl=function(a){goog.string.internal.caseInsensitiveStartsWith(a,"tel:")||(a=goog.html.SafeUrl.INNOCUOUS_STRING);return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
  5994. goog.html.SIP_URL_PATTERN_=/^sip[s]?:[+a-z0-9_.!$%&'*\/=^`{|}~-]+@([a-z0-9-]+\.)+[a-z0-9]{2,63}$/i;goog.html.SafeUrl.fromSipUrl=function(a){goog.html.SIP_URL_PATTERN_.test(decodeURIComponent(a))||(a=goog.html.SafeUrl.INNOCUOUS_STRING);return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};goog.html.SafeUrl.fromFacebookMessengerUrl=function(a){goog.string.internal.caseInsensitiveStartsWith(a,"fb-messenger://share")||(a=goog.html.SafeUrl.INNOCUOUS_STRING);return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
  5995. goog.html.SafeUrl.fromWhatsAppUrl=function(a){goog.string.internal.caseInsensitiveStartsWith(a,"whatsapp://send")||(a=goog.html.SafeUrl.INNOCUOUS_STRING);return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};goog.html.SafeUrl.fromSmsUrl=function(a){goog.string.internal.caseInsensitiveStartsWith(a,"sms:")&&goog.html.SafeUrl.isSmsUrlBodyValid_(a)||(a=goog.html.SafeUrl.INNOCUOUS_STRING);return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
  5996. goog.html.SafeUrl.isSmsUrlBodyValid_=function(a){var b=a.indexOf("#");0<b&&(a=a.substring(0,b));b=a.match(/[?&]body=/gi);if(!b)return!0;if(1<b.length)return!1;a=a.match(/[?&]body=([^&]*)/)[1];if(!a)return!0;try{decodeURIComponent(a)}catch(c){return!1}return/^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(a)};goog.html.SafeUrl.fromSshUrl=function(a){goog.string.internal.caseInsensitiveStartsWith(a,"ssh://")||(a=goog.html.SafeUrl.INNOCUOUS_STRING);return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
  5997. goog.html.SafeUrl.sanitizeChromeExtensionUrl=function(a,b){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^chrome-extension:\/\/([^\/]+)\//,a,b)};goog.html.SafeUrl.sanitizeFirefoxExtensionUrl=function(a,b){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^moz-extension:\/\/([^\/]+)\//,a,b)};goog.html.SafeUrl.sanitizeEdgeExtensionUrl=function(a,b){return goog.html.SafeUrl.sanitizeExtensionUrl_(/^ms-browser-extension:\/\/([^\/]+)\//,a,b)};
  5998. goog.html.SafeUrl.sanitizeExtensionUrl_=function(a,b,c){(a=a.exec(b))?(a=a[1],-1==(c instanceof goog.string.Const?[goog.string.Const.unwrap(c)]:c.map(function(a){return goog.string.Const.unwrap(a)})).indexOf(a)&&(b=goog.html.SafeUrl.INNOCUOUS_STRING)):b=goog.html.SafeUrl.INNOCUOUS_STRING;return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};goog.html.SafeUrl.fromTrustedResourceUrl=function(a){return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.html.TrustedResourceUrl.unwrap(a))};
  5999. goog.html.SAFE_URL_PATTERN_=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;goog.html.SafeUrl.SAFE_URL_PATTERN=goog.html.SAFE_URL_PATTERN_;goog.html.SafeUrl.sanitize=function(a){if(a instanceof goog.html.SafeUrl)return a;a="object"==typeof a&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a);goog.html.SAFE_URL_PATTERN_.test(a)||(a=goog.html.SafeUrl.INNOCUOUS_STRING);return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
  6000. goog.html.SafeUrl.sanitizeAssertUnchanged=function(a,b){if(a instanceof goog.html.SafeUrl)return a;a="object"==typeof a&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a);if(b&&/^data:/i.test(a)&&(b=goog.html.SafeUrl.fromDataUrl(a),b.getTypedStringValue()==a))return b;goog.asserts.assert(goog.html.SAFE_URL_PATTERN_.test(a),"%s does not match the safe URL pattern",a)||(a=goog.html.SafeUrl.INNOCUOUS_STRING);return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};
  6001. goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse=function(a){var b=new goog.html.SafeUrl;b.privateDoNotAccessOrElseSafeUrlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createURL(a):a;return b};goog.html.SafeUrl.ABOUT_BLANK=goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse("about:blank");goog.html.SafeStyle=function(){this.privateDoNotAccessOrElseSafeStyleWrappedValue_="";this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};goog.html.SafeStyle.prototype.implementsGoogStringTypedString=!0;goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
  6002. goog.html.SafeStyle.fromConstant=function(a){a=goog.string.Const.unwrap(a);if(0===a.length)return goog.html.SafeStyle.EMPTY;goog.asserts.assert(goog.string.internal.endsWith(a,";"),"Last character of style string is not ';': "+a);goog.asserts.assert(goog.string.internal.contains(a,":"),"Style string must contain at least one ':', to specify a \"name: value\" pair: "+a);return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a)};
  6003. goog.html.SafeStyle.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_};goog.DEBUG&&(goog.html.SafeStyle.prototype.toString=function(){return"SafeStyle{"+this.privateDoNotAccessOrElseSafeStyleWrappedValue_+"}"});
  6004. goog.html.SafeStyle.unwrap=function(a){if(a instanceof goog.html.SafeStyle&&a.constructor===goog.html.SafeStyle&&a.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;goog.asserts.fail("expected object of type SafeStyle, got '"+a+"' of type "+goog.typeOf(a));return"type_error:SafeStyle"};goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse=function(a){return(new goog.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(a)};
  6005. goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a){this.privateDoNotAccessOrElseSafeStyleWrappedValue_=a;return this};goog.html.SafeStyle.EMPTY=goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");goog.html.SafeStyle.INNOCUOUS_STRING="zClosurez";
  6006. goog.html.SafeStyle.create=function(a){var b="",c;for(c in a){if(!/^[-_a-zA-Z0-9]+$/.test(c))throw Error("Name allows only [-_a-zA-Z0-9], got: "+c);var d=a[c];null!=d&&(d=goog.isArray(d)?goog.array.map(d,goog.html.SafeStyle.sanitizePropertyValue_).join(" "):goog.html.SafeStyle.sanitizePropertyValue_(d),b+=c+":"+d+";")}return b?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b):goog.html.SafeStyle.EMPTY};
  6007. goog.html.SafeStyle.sanitizePropertyValue_=function(a){if(a instanceof goog.html.SafeUrl)return'url("'+goog.html.SafeUrl.unwrap(a).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';a=a instanceof goog.string.Const?goog.string.Const.unwrap(a):goog.html.SafeStyle.sanitizePropertyValueString_(String(a));if(/[{;}]/.test(a))throw new goog.asserts.AssertionError("Value does not allow [{;}], got: %s.",[a]);return a};
  6008. goog.html.SafeStyle.sanitizePropertyValueString_=function(a){var b=a.replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.FUNCTIONS_RE_,"$1").replace(goog.html.SafeStyle.URL_RE_,"url");if(goog.html.SafeStyle.VALUE_RE_.test(b)){if(goog.html.SafeStyle.COMMENT_RE_.test(a))return goog.asserts.fail("String value disallows comments, got: "+a),goog.html.SafeStyle.INNOCUOUS_STRING;if(!goog.html.SafeStyle.hasBalancedQuotes_(a))return goog.asserts.fail("String value requires balanced quotes, got: "+
  6009. a),goog.html.SafeStyle.INNOCUOUS_STRING;if(!goog.html.SafeStyle.hasBalancedSquareBrackets_(a))return goog.asserts.fail("String value requires balanced square brackets and one identifier per pair of brackets, got: "+a),goog.html.SafeStyle.INNOCUOUS_STRING}else return goog.asserts.fail("String value allows only "+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+" and simple functions, got: "+a),goog.html.SafeStyle.INNOCUOUS_STRING;return goog.html.SafeStyle.sanitizeUrl_(a)};
  6010. goog.html.SafeStyle.hasBalancedQuotes_=function(a){for(var b=!0,c=!0,d=0;d<a.length;d++){var e=a.charAt(d);"'"==e&&c?b=!b:'"'==e&&b&&(c=!c)}return b&&c};goog.html.SafeStyle.hasBalancedSquareBrackets_=function(a){for(var b=!0,c=/^[-_a-zA-Z0-9]$/,d=0;d<a.length;d++){var e=a.charAt(d);if("]"==e){if(b)return!1;b=!0}else if("["==e){if(!b)return!1;b=!1}else if(!b&&!c.test(e))return!1}return b};goog.html.SafeStyle.VALUE_ALLOWED_CHARS_="[-,.\"'%_!# a-zA-Z0-9\\[\\]]";
  6011. goog.html.SafeStyle.VALUE_RE_=new RegExp("^"+goog.html.SafeStyle.VALUE_ALLOWED_CHARS_+"+$");goog.html.SafeStyle.URL_RE_=/\b(url\([ \t\n]*)('[ -&(-\[\]-~]*'|"[ !#-\[\]-~]*"|[!#-&*-\[\]-~]*)([ \t\n]*\))/g;goog.html.SafeStyle.FUNCTIONS_RE_=/\b(hsl|hsla|rgb|rgba|matrix|calc|minmax|fit-content|repeat|(rotate|scale|translate)(X|Y|Z|3d)?)\([-+*/0-9a-z.%\[\], ]+\)/g;goog.html.SafeStyle.COMMENT_RE_=/\/\*/;
  6012. goog.html.SafeStyle.sanitizeUrl_=function(a){return a.replace(goog.html.SafeStyle.URL_RE_,function(a,c,d,e){var b="";d=d.replace(/^(['"])(.*)\1$/,function(a,c,d){b=c;return d});a=goog.html.SafeUrl.sanitize(d).getTypedStringValue();return c+b+a+b+e})};goog.html.SafeStyle.concat=function(a){var b="",c=function(a){goog.isArray(a)?goog.array.forEach(a,c):b+=goog.html.SafeStyle.unwrap(a)};goog.array.forEach(arguments,c);return b?goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b):goog.html.SafeStyle.EMPTY};goog.html.SafeStyleSheet=function(){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_="";this.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_};goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString=!0;goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};
  6013. goog.html.SafeStyleSheet.createRule=function(a,b){if(goog.string.internal.contains(a,"<"))throw Error("Selector does not allow '<', got: "+a);var c=a.replace(/('|")((?!\1)[^\r\n\f\\]|\\[\s\S])*\1/g,"");if(!/^[-_a-zA-Z0-9#.:* ,>+~[\]()=^$|]+$/.test(c))throw Error("Selector allows only [-_a-zA-Z0-9#.:* ,>+~[\\]()=^$|] and strings, got: "+a);if(!goog.html.SafeStyleSheet.hasBalancedBrackets_(c))throw Error("() and [] in selector must be balanced, got: "+a);b instanceof goog.html.SafeStyle||(b=goog.html.SafeStyle.create(b));
  6014. a=a+"{"+goog.html.SafeStyle.unwrap(b).replace(/</g,"\\3C ")+"}";return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)};goog.html.SafeStyleSheet.hasBalancedBrackets_=function(a){for(var b={"(":")","[":"]"},c=[],d=0;d<a.length;d++){var e=a[d];if(b[e])c.push(b[e]);else if(goog.object.contains(b,e)&&c.pop()!=e)return!1}return 0==c.length};
  6015. goog.html.SafeStyleSheet.concat=function(a){var b="",c=function(a){goog.isArray(a)?goog.array.forEach(a,c):b+=goog.html.SafeStyleSheet.unwrap(a)};goog.array.forEach(arguments,c);return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)};
  6016. goog.html.SafeStyleSheet.fromConstant=function(a){a=goog.string.Const.unwrap(a);if(0===a.length)return goog.html.SafeStyleSheet.EMPTY;goog.asserts.assert(!goog.string.internal.contains(a,"<"),"Forbidden '<' character in style sheet string: "+a);return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)};goog.html.SafeStyleSheet.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_};
  6017. goog.DEBUG&&(goog.html.SafeStyleSheet.prototype.toString=function(){return"SafeStyleSheet{"+this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_+"}"});
  6018. goog.html.SafeStyleSheet.unwrap=function(a){if(a instanceof goog.html.SafeStyleSheet&&a.constructor===goog.html.SafeStyleSheet&&a.SAFE_STYLE_SHEET_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;goog.asserts.fail("expected object of type SafeStyleSheet, got '"+a+"' of type "+goog.typeOf(a));return"type_error:SafeStyleSheet"};
  6019. goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse=function(a){return(new goog.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(a)};goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a){this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=a;return this};goog.html.SafeStyleSheet.EMPTY=goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse("");goog.labs={};goog.labs.userAgent={};goog.labs.userAgent.util={};goog.labs.userAgent.util.getNativeUserAgentString_=function(){var a=goog.labs.userAgent.util.getNavigator_();return a&&(a=a.userAgent)?a:""};goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator};goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_();goog.labs.userAgent.util.setUserAgent=function(a){goog.labs.userAgent.util.userAgent_=a||goog.labs.userAgent.util.getNativeUserAgentString_()};
  6020. goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_};goog.labs.userAgent.util.matchUserAgent=function(a){var b=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.contains(b,a)};goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(a){var b=goog.labs.userAgent.util.getUserAgent();return goog.string.internal.caseInsensitiveContains(b,a)};
  6021. goog.labs.userAgent.util.extractVersionTuples=function(a){for(var b=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,c=[],d;d=b.exec(a);)c.push([d[1],d[2],d[3]||void 0]);return c};goog.labs.userAgent.browser={};goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")};goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")};goog.labs.userAgent.browser.matchEdgeHtml_=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")};goog.labs.userAgent.browser.matchEdgeChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("Edg/")};
  6022. goog.labs.userAgent.browser.matchOperaChromium_=function(){return goog.labs.userAgent.util.matchUserAgent("OPR")};goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")||goog.labs.userAgent.util.matchUserAgent("FxiOS")};
  6023. goog.labs.userAgent.browser.matchSafari_=function(){return goog.labs.userAgent.util.matchUserAgent("Safari")&&!(goog.labs.userAgent.browser.matchChrome_()||goog.labs.userAgent.browser.matchCoast_()||goog.labs.userAgent.browser.matchOpera_()||goog.labs.userAgent.browser.matchEdgeHtml_()||goog.labs.userAgent.browser.matchEdgeChromium_()||goog.labs.userAgent.browser.matchOperaChromium_()||goog.labs.userAgent.browser.matchFirefox_()||goog.labs.userAgent.browser.isSilk()||goog.labs.userAgent.util.matchUserAgent("Android"))};
  6024. goog.labs.userAgent.browser.matchCoast_=function(){return goog.labs.userAgent.util.matchUserAgent("Coast")};goog.labs.userAgent.browser.matchIosWebview_=function(){return(goog.labs.userAgent.util.matchUserAgent("iPad")||goog.labs.userAgent.util.matchUserAgent("iPhone"))&&!goog.labs.userAgent.browser.matchSafari_()&&!goog.labs.userAgent.browser.matchChrome_()&&!goog.labs.userAgent.browser.matchCoast_()&&!goog.labs.userAgent.browser.matchFirefox_()&&goog.labs.userAgent.util.matchUserAgent("AppleWebKit")};
  6025. goog.labs.userAgent.browser.matchChrome_=function(){return(goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS"))&&!goog.labs.userAgent.browser.matchEdgeHtml_()};goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return goog.labs.userAgent.util.matchUserAgent("Android")&&!(goog.labs.userAgent.browser.isChrome()||goog.labs.userAgent.browser.isFirefox()||goog.labs.userAgent.browser.isOpera()||goog.labs.userAgent.browser.isSilk())};
  6026. goog.labs.userAgent.browser.isOpera=goog.labs.userAgent.browser.matchOpera_;goog.labs.userAgent.browser.isIE=goog.labs.userAgent.browser.matchIE_;goog.labs.userAgent.browser.isEdge=goog.labs.userAgent.browser.matchEdgeHtml_;goog.labs.userAgent.browser.isEdgeChromium=goog.labs.userAgent.browser.matchEdgeChromium_;goog.labs.userAgent.browser.isOperaChromium=goog.labs.userAgent.browser.matchOperaChromium_;goog.labs.userAgent.browser.isFirefox=goog.labs.userAgent.browser.matchFirefox_;
  6027. goog.labs.userAgent.browser.isSafari=goog.labs.userAgent.browser.matchSafari_;goog.labs.userAgent.browser.isCoast=goog.labs.userAgent.browser.matchCoast_;goog.labs.userAgent.browser.isIosWebview=goog.labs.userAgent.browser.matchIosWebview_;goog.labs.userAgent.browser.isChrome=goog.labs.userAgent.browser.matchChrome_;goog.labs.userAgent.browser.isAndroidBrowser=goog.labs.userAgent.browser.matchAndroidBrowser_;goog.labs.userAgent.browser.isSilk=function(){return goog.labs.userAgent.util.matchUserAgent("Silk")};
  6028. goog.labs.userAgent.browser.getVersion=function(){function a(a){a=goog.array.find(a,d);return c[a]||""}var b=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(b);b=goog.labs.userAgent.util.extractVersionTuples(b);var c={};goog.array.forEach(b,function(a){c[a[0]]=a[1]});var d=goog.partial(goog.object.containsKey,c);return goog.labs.userAgent.browser.isOpera()?a(["Version","Opera"]):goog.labs.userAgent.browser.isEdge()?a(["Edge"]):
  6029. goog.labs.userAgent.browser.isEdgeChromium()?a(["Edg"]):goog.labs.userAgent.browser.isChrome()?a(["Chrome","CriOS"]):(b=b[2])&&b[1]||""};goog.labs.userAgent.browser.isVersionOrHigher=function(a){return 0<=goog.string.internal.compareVersions(goog.labs.userAgent.browser.getVersion(),a)};
  6030. goog.labs.userAgent.browser.getIEVersion_=function(a){var b=/rv: *([\d\.]*)/.exec(a);if(b&&b[1])return b[1];b="";var c=/MSIE +([\d\.]+)/.exec(a);if(c&&c[1])if(a=/Trident\/(\d.\d)/.exec(a),"7.0"==c[1])if(a&&a[1])switch(a[1]){case "4.0":b="8.0";break;case "5.0":b="9.0";break;case "6.0":b="10.0";break;case "7.0":b="11.0"}else b="7.0";else b=c[1];return b};goog.html.SafeHtml=function(){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_="";this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_=goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;this.dir_=null};goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString=!0;goog.html.SafeHtml.prototype.getDirection=function(){return this.dir_};goog.html.SafeHtml.prototype.implementsGoogStringTypedString=!0;goog.html.SafeHtml.prototype.getTypedStringValue=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()};
  6031. goog.DEBUG&&(goog.html.SafeHtml.prototype.toString=function(){return"SafeHtml{"+this.privateDoNotAccessOrElseSafeHtmlWrappedValue_+"}"});goog.html.SafeHtml.unwrap=function(a){return goog.html.SafeHtml.unwrapTrustedHTML(a).toString()};
  6032. goog.html.SafeHtml.unwrapTrustedHTML=function(a){if(a instanceof goog.html.SafeHtml&&a.constructor===goog.html.SafeHtml&&a.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_===goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_)return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;goog.asserts.fail("expected object of type SafeHtml, got '"+a+"' of type "+goog.typeOf(a));return"type_error:SafeHtml"};
  6033. goog.html.SafeHtml.htmlEscape=function(a){if(a instanceof goog.html.SafeHtml)return a;var b="object"==typeof a,c=null;b&&a.implementsGoogI18nBidiDirectionalString&&(c=a.getDirection());a=b&&a.implementsGoogStringTypedString?a.getTypedStringValue():String(a);return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.htmlEscape(a),c)};
  6034. goog.html.SafeHtml.htmlEscapePreservingNewlines=function(a){if(a instanceof goog.html.SafeHtml)return a;a=goog.html.SafeHtml.htmlEscape(a);return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.newLineToBr(goog.html.SafeHtml.unwrap(a)),a.getDirection())};
  6035. goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces=function(a){if(a instanceof goog.html.SafeHtml)return a;a=goog.html.SafeHtml.htmlEscape(a);return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.internal.whitespaceEscape(goog.html.SafeHtml.unwrap(a)),a.getDirection())};goog.html.SafeHtml.from=goog.html.SafeHtml.htmlEscape;goog.html.SafeHtml.VALID_NAMES_IN_TAG_=/^[a-zA-Z0-9-]+$/;
  6036. goog.html.SafeHtml.URL_ATTRIBUTES_={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0};goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0};goog.html.SafeHtml.create=function(a,b,c){goog.html.SafeHtml.verifyTagName(String(a));return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(a),b,c)};
  6037. goog.html.SafeHtml.verifyTagName=function(a){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(a))throw Error("Invalid tag name <"+a+">.");if(a.toUpperCase()in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_)throw Error("Tag name <"+a+"> is not allowed for SafeHtml.");};
  6038. goog.html.SafeHtml.createIframe=function(a,b,c,d){a&&goog.html.TrustedResourceUrl.unwrap(a);var e={};e.src=a||null;e.srcdoc=b&&goog.html.SafeHtml.unwrap(b);a=goog.html.SafeHtml.combineAttributes(e,{sandbox:""},c);return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",a,d)};
  6039. goog.html.SafeHtml.createSandboxIframe=function(a,b,c,d){if(!goog.html.SafeHtml.canUseSandboxIframe())throw Error("The browser does not support sandboxed iframes.");var e={};e.src=a?goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(a)):null;e.srcdoc=b||null;e.sandbox="";a=goog.html.SafeHtml.combineAttributes(e,{},c);return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe",a,d)};
  6040. goog.html.SafeHtml.canUseSandboxIframe=function(){return goog.global.HTMLIFrameElement&&"sandbox"in goog.global.HTMLIFrameElement.prototype};goog.html.SafeHtml.createScriptSrc=function(a,b){goog.html.TrustedResourceUrl.unwrap(a);a=goog.html.SafeHtml.combineAttributes({src:a},{},b);return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",a)};
  6041. goog.html.SafeHtml.createScript=function(a,b){for(var c in b){var d=c.toLowerCase();if("language"==d||"src"==d||"text"==d||"type"==d)throw Error('Cannot set "'+d+'" attribute');}c="";a=goog.array.concat(a);for(d=0;d<a.length;d++)c+=goog.html.SafeScript.unwrap(a[d]);a=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c,goog.i18n.bidi.Dir.NEUTRAL);return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("script",b,a)};
  6042. goog.html.SafeHtml.createStyle=function(a,b){b=goog.html.SafeHtml.combineAttributes({type:"text/css"},{},b);var c="";a=goog.array.concat(a);for(var d=0;d<a.length;d++)c+=goog.html.SafeStyleSheet.unwrap(a[d]);a=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c,goog.i18n.bidi.Dir.NEUTRAL);return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style",b,a)};
  6043. goog.html.SafeHtml.createMetaRefresh=function(a,b){a=goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitize(a));(goog.labs.userAgent.browser.isIE()||goog.labs.userAgent.browser.isEdge())&&goog.string.internal.contains(a,";")&&(a="'"+a.replace(/'/g,"%27")+"'");return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("meta",{"http-equiv":"refresh",content:(b||0)+"; url="+a})};
  6044. goog.html.SafeHtml.getAttrNameAndValue_=function(a,b,c){if(c instanceof goog.string.Const)c=goog.string.Const.unwrap(c);else if("style"==b.toLowerCase())c=goog.html.SafeHtml.getStyleValue_(c);else{if(/^on/i.test(b))throw Error('Attribute "'+b+'" requires goog.string.Const value, "'+c+'" given.');if(b.toLowerCase()in goog.html.SafeHtml.URL_ATTRIBUTES_)if(c instanceof goog.html.TrustedResourceUrl)c=goog.html.TrustedResourceUrl.unwrap(c);else if(c instanceof goog.html.SafeUrl)c=goog.html.SafeUrl.unwrap(c);
  6045. else if(goog.isString(c))c=goog.html.SafeUrl.sanitize(c).getTypedStringValue();else throw Error('Attribute "'+b+'" on tag "'+a+'" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+c+'" given.');}c.implementsGoogStringTypedString&&(c=c.getTypedStringValue());goog.asserts.assert(goog.isString(c)||goog.isNumber(c),"String or number value expected, got "+typeof c+" with value: "+c);return b+'="'+goog.string.internal.htmlEscape(String(c))+'"'};
  6046. goog.html.SafeHtml.getStyleValue_=function(a){if(!goog.isObject(a))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof a+" given: "+a);a instanceof goog.html.SafeStyle||(a=goog.html.SafeStyle.create(a));return goog.html.SafeStyle.unwrap(a)};goog.html.SafeHtml.createWithDir=function(a,b,c,d){b=goog.html.SafeHtml.create(b,c,d);b.dir_=a;return b};
  6047. goog.html.SafeHtml.join=function(a,b){a=goog.html.SafeHtml.htmlEscape(a);var c=a.getDirection(),d=[],e=function(a){goog.isArray(a)?goog.array.forEach(a,e):(a=goog.html.SafeHtml.htmlEscape(a),d.push(goog.html.SafeHtml.unwrap(a)),a=a.getDirection(),c==goog.i18n.bidi.Dir.NEUTRAL?c=a:a!=goog.i18n.bidi.Dir.NEUTRAL&&c!=a&&(c=null))};goog.array.forEach(b,e);return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d.join(goog.html.SafeHtml.unwrap(a)),c)};
  6048. goog.html.SafeHtml.concat=function(a){return goog.html.SafeHtml.join(goog.html.SafeHtml.EMPTY,Array.prototype.slice.call(arguments))};goog.html.SafeHtml.concatWithDir=function(a,b){var c=goog.html.SafeHtml.concat(goog.array.slice(arguments,1));c.dir_=a;return c};goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_={};goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse=function(a,b){return(new goog.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(a,b)};
  6049. goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_=function(a,b){this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY?goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createHTML(a):a;this.dir_=b;return this};
  6050. goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse=function(a,b,c){var d=null;var e="<"+a+goog.html.SafeHtml.stringifyAttributes(a,b);goog.isDefAndNotNull(c)?goog.isArray(c)||(c=[c]):c=[];goog.dom.tags.isVoidTag(a.toLowerCase())?(goog.asserts.assert(!c.length,"Void tag <"+a+"> does not allow content."),e+=">"):(d=goog.html.SafeHtml.concat(c),e+=">"+goog.html.SafeHtml.unwrap(d)+"</"+a+">",d=d.getDirection());(a=b&&b.dir)&&(d=/^(ltr|rtl|auto)$/i.test(a)?goog.i18n.bidi.Dir.NEUTRAL:
  6051. null);return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(e,d)};goog.html.SafeHtml.stringifyAttributes=function(a,b){var c="";if(b)for(var d in b){if(!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(d))throw Error('Invalid attribute name "'+d+'".');var e=b[d];goog.isDefAndNotNull(e)&&(c+=" "+goog.html.SafeHtml.getAttrNameAndValue_(a,d,e))}return c};
  6052. goog.html.SafeHtml.combineAttributes=function(a,b,c){var d={},e;for(e in a)goog.asserts.assert(e.toLowerCase()==e,"Must be lower case"),d[e]=a[e];for(e in b)goog.asserts.assert(e.toLowerCase()==e,"Must be lower case"),d[e]=b[e];for(e in c){var f=e.toLowerCase();if(f in a)throw Error('Cannot override "'+f+'" attribute, got "'+e+'" with value "'+c[e]+'"');f in b&&delete d[f];d[e]=c[e]}return d};
  6053. goog.html.SafeHtml.DOCTYPE_HTML=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>",goog.i18n.bidi.Dir.NEUTRAL);goog.html.SafeHtml.EMPTY=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("",goog.i18n.bidi.Dir.NEUTRAL);goog.html.SafeHtml.BR=goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<br>",goog.i18n.bidi.Dir.NEUTRAL);goog.html.uncheckedconversions={};goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(a,b,c){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(b,c||null)};
  6054. goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(b)};
  6055. goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b)};
  6056. goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)};
  6057. goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b)};
  6058. goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b)};goog.dom.safe={};goog.dom.safe.InsertAdjacentHtmlPosition={AFTERBEGIN:"afterbegin",AFTEREND:"afterend",BEFOREBEGIN:"beforebegin",BEFOREEND:"beforeend"};goog.dom.safe.insertAdjacentHtml=function(a,b,c){a.insertAdjacentHTML(b,goog.html.SafeHtml.unwrapTrustedHTML(c))};goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0};
  6059. goog.dom.safe.isInnerHtmlCleanupRecursive_=goog.functions.cacheReturnValue(function(){if(goog.DEBUG&&"undefined"===typeof document)return!1;var a=document.createElement("div"),b=document.createElement("div");b.appendChild(document.createElement("div"));a.appendChild(b);if(goog.DEBUG&&!a.firstChild)return!1;b=a.firstChild.firstChild;a.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(goog.html.SafeHtml.EMPTY);return!b.parentElement});
  6060. goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse=function(a,b){if(goog.dom.safe.isInnerHtmlCleanupRecursive_())for(;a.lastChild;)a.removeChild(a.lastChild);a.innerHTML=goog.html.SafeHtml.unwrapTrustedHTML(b)};
  6061. goog.dom.safe.setInnerHtml=function(a,b){if(goog.asserts.ENABLE_ASSERTS){var c=a.tagName.toUpperCase();if(goog.dom.safe.SET_INNER_HTML_DISALLOWED_TAGS_[c])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+a.tagName+".");}goog.dom.safe.unsafeSetInnerHtmlDoNotUseOrElse(a,b)};goog.dom.safe.setOuterHtml=function(a,b){a.outerHTML=goog.html.SafeHtml.unwrapTrustedHTML(b)};
  6062. goog.dom.safe.setFormElementAction=function(a,b){b=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);goog.dom.asserts.assertIsHTMLFormElement(a).action=goog.html.SafeUrl.unwrapTrustedURL(b)};goog.dom.safe.setButtonFormAction=function(a,b){b=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);goog.dom.asserts.assertIsHTMLButtonElement(a).formAction=goog.html.SafeUrl.unwrapTrustedURL(b)};
  6063. goog.dom.safe.setInputFormAction=function(a,b){b=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);goog.dom.asserts.assertIsHTMLInputElement(a).formAction=goog.html.SafeUrl.unwrapTrustedURL(b)};goog.dom.safe.setStyle=function(a,b){a.style.cssText=goog.html.SafeStyle.unwrap(b)};goog.dom.safe.documentWrite=function(a,b){a.write(goog.html.SafeHtml.unwrapTrustedHTML(b))};
  6064. goog.dom.safe.setAnchorHref=function(a,b){goog.dom.asserts.assertIsHTMLAnchorElement(a);b=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);a.href=goog.html.SafeUrl.unwrapTrustedURL(b)};goog.dom.safe.setImageSrc=function(a,b){goog.dom.asserts.assertIsHTMLImageElement(a);if(!(b instanceof goog.html.SafeUrl)){var c=/^data:image\//i.test(b);b=goog.html.SafeUrl.sanitizeAssertUnchanged(b,c)}a.src=goog.html.SafeUrl.unwrapTrustedURL(b)};
  6065. goog.dom.safe.setAudioSrc=function(a,b){goog.dom.asserts.assertIsHTMLAudioElement(a);if(!(b instanceof goog.html.SafeUrl)){var c=/^data:audio\//i.test(b);b=goog.html.SafeUrl.sanitizeAssertUnchanged(b,c)}a.src=goog.html.SafeUrl.unwrapTrustedURL(b)};goog.dom.safe.setVideoSrc=function(a,b){goog.dom.asserts.assertIsHTMLVideoElement(a);if(!(b instanceof goog.html.SafeUrl)){var c=/^data:video\//i.test(b);b=goog.html.SafeUrl.sanitizeAssertUnchanged(b,c)}a.src=goog.html.SafeUrl.unwrapTrustedURL(b)};
  6066. goog.dom.safe.setEmbedSrc=function(a,b){goog.dom.asserts.assertIsHTMLEmbedElement(a);a.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(b)};goog.dom.safe.setFrameSrc=function(a,b){goog.dom.asserts.assertIsHTMLFrameElement(a);a.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(b)};goog.dom.safe.setIframeSrc=function(a,b){goog.dom.asserts.assertIsHTMLIFrameElement(a);a.src=goog.html.TrustedResourceUrl.unwrapTrustedURL(b)};
  6067. goog.dom.safe.setIframeSrcdoc=function(a,b){goog.dom.asserts.assertIsHTMLIFrameElement(a);a.srcdoc=goog.html.SafeHtml.unwrapTrustedHTML(b)};
  6068. goog.dom.safe.setLinkHrefAndRel=function(a,b,c){goog.dom.asserts.assertIsHTMLLinkElement(a);a.rel=c;goog.string.internal.caseInsensitiveContains(c,"stylesheet")?(goog.asserts.assert(b instanceof goog.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),a.href=goog.html.TrustedResourceUrl.unwrapTrustedURL(b)):a.href=b instanceof goog.html.TrustedResourceUrl?goog.html.TrustedResourceUrl.unwrapTrustedURL(b):b instanceof goog.html.SafeUrl?goog.html.SafeUrl.unwrapTrustedURL(b):
  6069. goog.html.SafeUrl.unwrapTrustedURL(goog.html.SafeUrl.sanitizeAssertUnchanged(b))};goog.dom.safe.setObjectData=function(a,b){goog.dom.asserts.assertIsHTMLObjectElement(a);a.data=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(b)};goog.dom.safe.setScriptSrc=function(a,b){goog.dom.asserts.assertIsHTMLScriptElement(a);a.src=goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(b);(b=goog.getScriptNonce())&&a.setAttribute("nonce",b)};
  6070. goog.dom.safe.setScriptContent=function(a,b){goog.dom.asserts.assertIsHTMLScriptElement(a);a.text=goog.html.SafeScript.unwrapTrustedScript(b);(b=goog.getScriptNonce())&&a.setAttribute("nonce",b)};goog.dom.safe.setLocationHref=function(a,b){goog.dom.asserts.assertIsLocation(a);b=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);a.href=goog.html.SafeUrl.unwrapTrustedURL(b)};
  6071. goog.dom.safe.assignLocation=function(a,b){goog.dom.asserts.assertIsLocation(a);b=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);a.assign(goog.html.SafeUrl.unwrapTrustedURL(b))};goog.dom.safe.replaceLocation=function(a,b){goog.dom.asserts.assertIsLocation(a);b=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);a.replace(goog.html.SafeUrl.unwrapTrustedURL(b))};
  6072. goog.dom.safe.openInWindow=function(a,b,c,d,e){a=a instanceof goog.html.SafeUrl?a:goog.html.SafeUrl.sanitizeAssertUnchanged(a);return(b||goog.global).open(goog.html.SafeUrl.unwrapTrustedURL(a),c?goog.string.Const.unwrap(c):"",d,e)};goog.dom.safe.parseFromStringHtml=function(a,b){return goog.dom.safe.parseFromString(a,b,"text/html")};goog.dom.safe.parseFromString=function(a,b,c){return a.parseFromString(goog.html.SafeHtml.unwrapTrustedHTML(b),c)};
  6073. goog.dom.safe.createImageFromBlob=function(a){if(!/^image\/.*/g.test(a.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var b=goog.global.URL.createObjectURL(a);a=new goog.global.Image;a.onload=function(){goog.global.URL.revokeObjectURL(b)};goog.dom.safe.setImageSrc(a,goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Image blob URL."),b));return a};goog.string.DETECT_DOUBLE_ESCAPING=!1;goog.string.FORCE_NON_DOM_HTML_UNESCAPING=!1;goog.string.Unicode={NBSP:"\u00a0"};goog.string.startsWith=goog.string.internal.startsWith;goog.string.endsWith=goog.string.internal.endsWith;goog.string.caseInsensitiveStartsWith=goog.string.internal.caseInsensitiveStartsWith;goog.string.caseInsensitiveEndsWith=goog.string.internal.caseInsensitiveEndsWith;goog.string.caseInsensitiveEquals=goog.string.internal.caseInsensitiveEquals;
  6074. goog.string.subs=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")};goog.string.collapseWhitespace=function(a){return a.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")};goog.string.isEmptyOrWhitespace=goog.string.internal.isEmptyOrWhitespace;goog.string.isEmptyString=function(a){return 0==a.length};goog.string.isEmpty=goog.string.isEmptyOrWhitespace;goog.string.isEmptyOrWhitespaceSafe=function(a){return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(a))};
  6075. goog.string.isEmptySafe=goog.string.isEmptyOrWhitespaceSafe;goog.string.isBreakingWhitespace=function(a){return!/[^\t\n\r ]/.test(a)};goog.string.isAlpha=function(a){return!/[^a-zA-Z]/.test(a)};goog.string.isNumeric=function(a){return!/[^0-9]/.test(a)};goog.string.isAlphaNumeric=function(a){return!/[^a-zA-Z0-9]/.test(a)};goog.string.isSpace=function(a){return" "==a};goog.string.isUnicodeChar=function(a){return 1==a.length&&" "<=a&&"~">=a||"\u0080"<=a&&"\ufffd">=a};
  6076. goog.string.stripNewlines=function(a){return a.replace(/(\r\n|\r|\n)+/g," ")};goog.string.canonicalizeNewlines=function(a){return a.replace(/(\r\n|\r|\n)/g,"\n")};goog.string.normalizeWhitespace=function(a){return a.replace(/\xa0|\s/g," ")};goog.string.normalizeSpaces=function(a){return a.replace(/\xa0|[ \t]+/g," ")};goog.string.collapseBreakingSpaces=function(a){return a.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")};goog.string.trim=goog.string.internal.trim;
  6077. goog.string.trimLeft=function(a){return a.replace(/^[\s\xa0]+/,"")};goog.string.trimRight=function(a){return a.replace(/[\s\xa0]+$/,"")};goog.string.caseInsensitiveCompare=goog.string.internal.caseInsensitiveCompare;
  6078. goog.string.numberAwareCompare_=function(a,b,c){if(a==b)return 0;if(!a)return-1;if(!b)return 1;for(var d=a.toLowerCase().match(c),e=b.toLowerCase().match(c),f=Math.min(d.length,e.length),g=0;g<f;g++){c=d[g];var h=e[g];if(c!=h)return a=parseInt(c,10),!isNaN(a)&&(b=parseInt(h,10),!isNaN(b)&&a-b)?a-b:c<h?-1:1}return d.length!=e.length?d.length-e.length:a<b?-1:1};goog.string.intAwareCompare=function(a,b){return goog.string.numberAwareCompare_(a,b,/\d+|\D+/g)};
  6079. goog.string.floatAwareCompare=function(a,b){return goog.string.numberAwareCompare_(a,b,/\d+|\.\d+|\D+/g)};goog.string.numerateCompare=goog.string.floatAwareCompare;goog.string.urlEncode=function(a){return encodeURIComponent(String(a))};goog.string.urlDecode=function(a){return decodeURIComponent(a.replace(/\+/g," "))};goog.string.newLineToBr=goog.string.internal.newLineToBr;
  6080. goog.string.htmlEscape=function(a,b){a=goog.string.internal.htmlEscape(a,b);goog.string.DETECT_DOUBLE_ESCAPING&&(a=a.replace(goog.string.E_RE_,"&#101;"));return a};goog.string.E_RE_=/e/g;goog.string.unescapeEntities=function(a){return goog.string.contains(a,"&")?!goog.string.FORCE_NON_DOM_HTML_UNESCAPING&&"document"in goog.global?goog.string.unescapeEntitiesUsingDom_(a):goog.string.unescapePureXmlEntities_(a):a};
  6081. goog.string.unescapeEntitiesWithDocument=function(a,b){return goog.string.contains(a,"&")?goog.string.unescapeEntitiesUsingDom_(a,b):a};
  6082. goog.string.unescapeEntitiesUsingDom_=function(a,b){var c={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"'};var d=b?b.createElement("div"):goog.global.document.createElement("div");return a.replace(goog.string.HTML_ENTITY_PATTERN_,function(a,b){var e=c[a];if(e)return e;"#"==b.charAt(0)&&(b=Number("0"+b.substr(1)),isNaN(b)||(e=String.fromCharCode(b)));e||(goog.dom.safe.setInnerHtml(d,goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Single HTML entity."),
  6083. a+" ")),e=d.firstChild.nodeValue.slice(0,-1));return c[a]=e})};goog.string.unescapePureXmlEntities_=function(a){return a.replace(/&([^;]+);/g,function(a,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:return"#"!=c.charAt(0)||(c=Number("0"+c.substr(1)),isNaN(c))?a:String.fromCharCode(c)}})};goog.string.HTML_ENTITY_PATTERN_=/&([^;\s<&]+);?/g;goog.string.whitespaceEscape=function(a,b){return goog.string.newLineToBr(a.replace(/ /g," &#160;"),b)};
  6084. goog.string.preserveSpaces=function(a){return a.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)};goog.string.stripQuotes=function(a,b){for(var c=b.length,d=0;d<c;d++){var e=1==c?b:b.charAt(d);if(a.charAt(0)==e&&a.charAt(a.length-1)==e)return a.substring(1,a.length-1)}return a};goog.string.truncate=function(a,b,c){c&&(a=goog.string.unescapeEntities(a));a.length>b&&(a=a.substring(0,b-3)+"...");c&&(a=goog.string.htmlEscape(a));return a};
  6085. goog.string.truncateMiddle=function(a,b,c,d){c&&(a=goog.string.unescapeEntities(a));if(d&&a.length>b){d>b&&(d=b);var e=a.length-d;a=a.substring(0,b-d)+"..."+a.substring(e)}else a.length>b&&(d=Math.floor(b/2),e=a.length-d,a=a.substring(0,d+b%2)+"..."+a.substring(e));c&&(a=goog.string.htmlEscape(a));return a};goog.string.specialEscapeChars_={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"};goog.string.jsEscapeCache_={"'":"\\'"};
  6086. goog.string.quote=function(a){a=String(a);for(var b=['"'],c=0;c<a.length;c++){var d=a.charAt(c),e=d.charCodeAt(0);b[c+1]=goog.string.specialEscapeChars_[d]||(31<e&&127>e?d:goog.string.escapeChar(d))}b.push('"');return b.join("")};goog.string.escapeString=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=goog.string.escapeChar(a.charAt(c));return b.join("")};
  6087. goog.string.escapeChar=function(a){if(a in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[a];if(a in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[a]=goog.string.specialEscapeChars_[a];var b=a.charCodeAt(0);if(31<b&&127>b)var c=a;else{if(256>b){if(c="\\x",16>b||256<b)c+="0"}else c="\\u",4096>b&&(c+="0");c+=b.toString(16).toUpperCase()}return goog.string.jsEscapeCache_[a]=c};goog.string.contains=goog.string.internal.contains;goog.string.caseInsensitiveContains=goog.string.internal.caseInsensitiveContains;
  6088. goog.string.countOf=function(a,b){return a&&b?a.split(b).length-1:0};goog.string.removeAt=function(a,b,c){var d=a;0<=b&&b<a.length&&0<c&&(d=a.substr(0,b)+a.substr(b+c,a.length-b-c));return d};goog.string.remove=function(a,b){return a.replace(b,"")};goog.string.removeAll=function(a,b){b=new RegExp(goog.string.regExpEscape(b),"g");return a.replace(b,"")};goog.string.replaceAll=function(a,b,c){b=new RegExp(goog.string.regExpEscape(b),"g");return a.replace(b,c.replace(/\$/g,"$$$$"))};
  6089. goog.string.regExpEscape=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};goog.string.repeat=String.prototype.repeat?function(a,b){return a.repeat(b)}:function(a,b){return Array(b+1).join(a)};goog.string.padNumber=function(a,b,c){a=goog.isDef(c)?a.toFixed(c):String(a);c=a.indexOf(".");-1==c&&(c=a.length);return goog.string.repeat("0",Math.max(0,b-c))+a};goog.string.makeSafe=function(a){return null==a?"":String(a)};
  6090. goog.string.buildString=function(a){return Array.prototype.join.call(arguments,"")};goog.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^goog.now()).toString(36)};goog.string.compareVersions=goog.string.internal.compareVersions;goog.string.hashCode=function(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c)>>>0;return b};goog.string.uniqueStringCounter_=2147483648*Math.random()|0;
  6091. goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++};goog.string.toNumber=function(a){var b=Number(a);return 0==b&&goog.string.isEmptyOrWhitespace(a)?NaN:b};goog.string.isLowerCamelCase=function(a){return/^[a-z]+([A-Z][a-z]*)*$/.test(a)};goog.string.isUpperCamelCase=function(a){return/^([A-Z][a-z]*)+$/.test(a)};goog.string.toCamelCase=function(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};
  6092. goog.string.toSelectorCase=function(a){return String(a).replace(/([A-Z])/g,"-$1").toLowerCase()};goog.string.toTitleCase=function(a,b){b=goog.isString(b)?goog.string.regExpEscape(b):"\\s";return a.replace(new RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(a,b,e){return b+e.toUpperCase()})};goog.string.capitalize=function(a){return String(a.charAt(0)).toUpperCase()+String(a.substr(1)).toLowerCase()};
  6093. goog.string.parseInt=function(a){isFinite(a)&&(a=String(a));return goog.isString(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};goog.string.splitLimit=function(a,b,c){a=a.split(b);for(var d=[];0<c&&a.length;)d.push(a.shift()),c--;a.length&&d.push(a.join(b));return d};goog.string.lastComponent=function(a,b){if(b)"string"==typeof b&&(b=[b]);else return a;for(var c=-1,d=0;d<b.length;d++)if(""!=b[d]){var e=a.lastIndexOf(b[d]);e>c&&(c=e)}return-1==c?a:a.slice(c+1)};
  6094. goog.string.editDistance=function(a,b){var c=[],d=[];if(a==b)return 0;if(!a.length||!b.length)return Math.max(a.length,b.length);for(var e=0;e<b.length+1;e++)c[e]=e;for(e=0;e<a.length;e++){d[0]=e+1;for(var f=0;f<b.length;f++)d[f+1]=Math.min(d[f]+1,c[f+1]+1,c[f]+Number(a[e]!=b[f]));for(f=0;f<c.length;f++)c[f]=d[f]}return d[b.length]};goog.labs.userAgent.engine={};goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")};goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")};goog.labs.userAgent.engine.isEdge=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")};
  6095. goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!goog.labs.userAgent.engine.isEdge()};goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()&&!goog.labs.userAgent.engine.isEdge()};
  6096. goog.labs.userAgent.engine.getVersion=function(){var a=goog.labs.userAgent.util.getUserAgent();if(a){a=goog.labs.userAgent.util.extractVersionTuples(a);var b=goog.labs.userAgent.engine.getEngineTuple_(a);if(b)return"Gecko"==b[0]?goog.labs.userAgent.engine.getVersionForKey_(a,"Firefox"):b[1];a=a[0];var c;if(a&&(c=a[2])&&(c=/Trident\/([^\s;]+)/.exec(c)))return c[1]}return""};
  6097. goog.labs.userAgent.engine.getEngineTuple_=function(a){if(!goog.labs.userAgent.engine.isEdge())return a[1];for(var b=0;b<a.length;b++){var c=a[b];if("Edge"==c[0])return c}};goog.labs.userAgent.engine.isVersionOrHigher=function(a){return 0<=goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(),a)};goog.labs.userAgent.engine.getVersionForKey_=function(a,b){return(a=goog.array.find(a,function(a){return b==a[0]}))&&a[1]||""};goog.labs.userAgent.platform={};goog.labs.userAgent.platform.isAndroid=function(){return goog.labs.userAgent.util.matchUserAgent("Android")};goog.labs.userAgent.platform.isIpod=function(){return goog.labs.userAgent.util.matchUserAgent("iPod")};goog.labs.userAgent.platform.isIphone=function(){return goog.labs.userAgent.util.matchUserAgent("iPhone")&&!goog.labs.userAgent.util.matchUserAgent("iPod")&&!goog.labs.userAgent.util.matchUserAgent("iPad")};goog.labs.userAgent.platform.isIpad=function(){return goog.labs.userAgent.util.matchUserAgent("iPad")};
  6098. goog.labs.userAgent.platform.isIos=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpad()||goog.labs.userAgent.platform.isIpod()};goog.labs.userAgent.platform.isMacintosh=function(){return goog.labs.userAgent.util.matchUserAgent("Macintosh")};goog.labs.userAgent.platform.isLinux=function(){return goog.labs.userAgent.util.matchUserAgent("Linux")};goog.labs.userAgent.platform.isWindows=function(){return goog.labs.userAgent.util.matchUserAgent("Windows")};
  6099. goog.labs.userAgent.platform.isChromeOS=function(){return goog.labs.userAgent.util.matchUserAgent("CrOS")};goog.labs.userAgent.platform.isChromecast=function(){return goog.labs.userAgent.util.matchUserAgent("CrKey")};goog.labs.userAgent.platform.isKaiOS=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("KaiOS")};goog.labs.userAgent.platform.isGo2Phone=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("GAFP")};
  6100. goog.labs.userAgent.platform.getVersion=function(){var a=goog.labs.userAgent.util.getUserAgent(),b="";goog.labs.userAgent.platform.isWindows()?(b=/Windows (?:NT|Phone) ([0-9.]+)/,b=(a=b.exec(a))?a[1]:"0.0"):goog.labs.userAgent.platform.isIos()?(b=/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/,b=(a=b.exec(a))&&a[1].replace(/_/g,".")):goog.labs.userAgent.platform.isMacintosh()?(b=/Mac OS X ([0-9_.]+)/,b=(a=b.exec(a))?a[1].replace(/_/g,"."):"10"):goog.labs.userAgent.platform.isKaiOS()?(b=/(?:KaiOS)\/(\S+)/i,
  6101. b=(a=b.exec(a))&&a[1]):goog.labs.userAgent.platform.isAndroid()?(b=/Android\s+([^\);]+)(\)|;)/,b=(a=b.exec(a))&&a[1]):goog.labs.userAgent.platform.isChromeOS()&&(b=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/,b=(a=b.exec(a))&&a[1]);return b||""};goog.labs.userAgent.platform.isVersionOrHigher=function(a){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),a)};goog.reflect={};goog.reflect.object=function(a,b){return b};goog.reflect.objectProperty=function(a,b){return a};goog.reflect.sinkValue=function(a){goog.reflect.sinkValue[" "](a);return a};goog.reflect.sinkValue[" "]=goog.nullFunction;goog.reflect.canAccessProperty=function(a,b){try{return goog.reflect.sinkValue(a[b]),!0}catch(c){}return!1};goog.reflect.cache=function(a,b,c,d){d=d?d(b):b;return Object.prototype.hasOwnProperty.call(a,d)?a[d]:a[d]=c(b)};goog.userAgent={};goog.userAgent.ASSUME_IE=!1;goog.userAgent.ASSUME_EDGE=!1;goog.userAgent.ASSUME_GECKO=!1;goog.userAgent.ASSUME_WEBKIT=!1;goog.userAgent.ASSUME_MOBILE_WEBKIT=!1;goog.userAgent.ASSUME_OPERA=!1;goog.userAgent.ASSUME_ANY_VERSION=!1;goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA;goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()};
  6102. goog.userAgent.getNavigatorTyped=function(){return goog.global.navigator||null};goog.userAgent.getNavigator=function(){return goog.userAgent.getNavigatorTyped()};goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera();goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE();goog.userAgent.EDGE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_EDGE:goog.labs.userAgent.engine.isEdge();
  6103. goog.userAgent.EDGE_OR_IE=goog.userAgent.EDGE||goog.userAgent.IE;goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko();goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit();goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")};
  6104. goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_();goog.userAgent.SAFARI=goog.userAgent.WEBKIT;goog.userAgent.determinePlatform_=function(){var a=goog.userAgent.getNavigatorTyped();return a&&a.platform||""};goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_();goog.userAgent.ASSUME_MAC=!1;goog.userAgent.ASSUME_WINDOWS=!1;goog.userAgent.ASSUME_LINUX=!1;goog.userAgent.ASSUME_X11=!1;goog.userAgent.ASSUME_ANDROID=!1;goog.userAgent.ASSUME_IPHONE=!1;
  6105. goog.userAgent.ASSUME_IPAD=!1;goog.userAgent.ASSUME_IPOD=!1;goog.userAgent.ASSUME_KAIOS=!1;goog.userAgent.ASSUME_GO2PHONE=!1;goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD;goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh();
  6106. goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows();goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()};goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_();goog.userAgent.isX11_=function(){var a=goog.userAgent.getNavigatorTyped();return!!a&&goog.string.contains(a.appVersion||"","X11")};
  6107. goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_();goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid();goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone();goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad();
  6108. goog.userAgent.IPOD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIpod();goog.userAgent.IOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIos();goog.userAgent.KAIOS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_KAIOS:goog.labs.userAgent.platform.isKaiOS();goog.userAgent.GO2PHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_GO2PHONE:goog.labs.userAgent.platform.isGo2Phone();
  6109. goog.userAgent.determineVersion_=function(){var a="",b=goog.userAgent.getVersionRegexResult_();b&&(a=b?b[1]:"");return goog.userAgent.IE&&(b=goog.userAgent.getDocumentMode_(),null!=b&&b>parseFloat(a))?String(b):a};
  6110. goog.userAgent.getVersionRegexResult_=function(){var a=goog.userAgent.getUserAgentString();if(goog.userAgent.GECKO)return/rv:([^\);]+)(\)|;)/.exec(a);if(goog.userAgent.EDGE)return/Edge\/([\d\.]+)/.exec(a);if(goog.userAgent.IE)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(goog.userAgent.WEBKIT)return/WebKit\/(\S+)/.exec(a);if(goog.userAgent.OPERA)return/(?:Version)[ \/]?(\S+)/.exec(a)};goog.userAgent.getDocumentMode_=function(){var a=goog.global.document;return a?a.documentMode:void 0};
  6111. goog.userAgent.VERSION=goog.userAgent.determineVersion_();goog.userAgent.compare=function(a,b){return goog.string.compareVersions(a,b)};goog.userAgent.isVersionOrHigherCache_={};goog.userAgent.isVersionOrHigher=function(a){return goog.userAgent.ASSUME_ANY_VERSION||goog.reflect.cache(goog.userAgent.isVersionOrHigherCache_,a,function(){return 0<=goog.string.compareVersions(goog.userAgent.VERSION,a)})};goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher;
  6112. goog.userAgent.isDocumentModeOrHigher=function(a){return Number(goog.userAgent.DOCUMENT_MODE)>=a};goog.userAgent.isDocumentMode=goog.userAgent.isDocumentModeOrHigher;goog.userAgent.DOCUMENT_MODE=function(){if(goog.global.document&&goog.userAgent.IE)return goog.userAgent.getDocumentMode_()}();goog.userAgent.product={};goog.userAgent.product.ASSUME_FIREFOX=!1;goog.userAgent.product.ASSUME_IPHONE=!1;goog.userAgent.product.ASSUME_IPAD=!1;goog.userAgent.product.ASSUME_ANDROID=!1;goog.userAgent.product.ASSUME_CHROME=!1;goog.userAgent.product.ASSUME_SAFARI=!1;
  6113. goog.userAgent.product.PRODUCT_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_OPERA||goog.userAgent.product.ASSUME_FIREFOX||goog.userAgent.product.ASSUME_IPHONE||goog.userAgent.product.ASSUME_IPAD||goog.userAgent.product.ASSUME_ANDROID||goog.userAgent.product.ASSUME_CHROME||goog.userAgent.product.ASSUME_SAFARI;goog.userAgent.product.OPERA=goog.userAgent.OPERA;goog.userAgent.product.IE=goog.userAgent.IE;goog.userAgent.product.EDGE=goog.userAgent.EDGE;
  6114. goog.userAgent.product.FIREFOX=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_FIREFOX:goog.labs.userAgent.browser.isFirefox();goog.userAgent.product.isIphoneOrIpod_=function(){return goog.labs.userAgent.platform.isIphone()||goog.labs.userAgent.platform.isIpod()};goog.userAgent.product.IPHONE=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPHONE:goog.userAgent.product.isIphoneOrIpod_();
  6115. goog.userAgent.product.IPAD=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad();goog.userAgent.product.ANDROID=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_ANDROID:goog.labs.userAgent.browser.isAndroidBrowser();goog.userAgent.product.CHROME=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_CHROME:goog.labs.userAgent.browser.isChrome();
  6116. goog.userAgent.product.isSafariDesktop_=function(){return goog.labs.userAgent.browser.isSafari()&&!goog.labs.userAgent.platform.isIos()};goog.userAgent.product.SAFARI=goog.userAgent.product.PRODUCT_KNOWN_?goog.userAgent.product.ASSUME_SAFARI:goog.userAgent.product.isSafariDesktop_();goog.crypt.base64={};goog.crypt.base64.DEFAULT_ALPHABET_COMMON_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";goog.crypt.base64.ENCODED_VALS=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"+/=";goog.crypt.base64.ENCODED_VALS_WEBSAFE=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_+"-_.";goog.crypt.base64.Alphabet={DEFAULT:0,NO_PADDING:1,WEBSAFE:2,WEBSAFE_DOT_PADDING:3,WEBSAFE_NO_PADDING:4};goog.crypt.base64.paddingChars_="=.";
  6117. goog.crypt.base64.isPadding_=function(a){return goog.string.contains(goog.crypt.base64.paddingChars_,a)};goog.crypt.base64.byteToCharMaps_={};goog.crypt.base64.charToByteMap_=null;goog.crypt.base64.ASSUME_NATIVE_SUPPORT_=goog.userAgent.GECKO||goog.userAgent.WEBKIT&&!goog.userAgent.product.SAFARI||goog.userAgent.OPERA;goog.crypt.base64.HAS_NATIVE_ENCODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||"function"==typeof goog.global.btoa;
  6118. goog.crypt.base64.HAS_NATIVE_DECODE_=goog.crypt.base64.ASSUME_NATIVE_SUPPORT_||!goog.userAgent.product.SAFARI&&!goog.userAgent.IE&&"function"==typeof goog.global.atob;
  6119. goog.crypt.base64.encodeByteArray=function(a,b){goog.asserts.assert(goog.isArrayLike(a),"encodeByteArray takes an array as a parameter");void 0===b&&(b=goog.crypt.base64.Alphabet.DEFAULT);goog.crypt.base64.init_();b=goog.crypt.base64.byteToCharMaps_[b];for(var c=[],d=0;d<a.length;d+=3){var e=a[d],f=d+1<a.length,g=f?a[d+1]:0,h=d+2<a.length,k=h?a[d+2]:0,l=e>>2;e=(e&3)<<4|g>>4;g=(g&15)<<2|k>>6;k&=63;h||(k=64,f||(g=64));c.push(b[l],b[e],b[g]||"",b[k]||"")}return c.join("")};
  6120. goog.crypt.base64.encodeString=function(a,b){return goog.crypt.base64.HAS_NATIVE_ENCODE_&&!b?goog.global.btoa(a):goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(a),b)};goog.crypt.base64.decodeString=function(a,b){if(goog.crypt.base64.HAS_NATIVE_DECODE_&&!b)return goog.global.atob(a);var c="";goog.crypt.base64.decodeStringInternal_(a,function(a){c+=String.fromCharCode(a)});return c};
  6121. goog.crypt.base64.decodeStringToByteArray=function(a,b){var c=[];goog.crypt.base64.decodeStringInternal_(a,function(a){c.push(a)});return c};
  6122. goog.crypt.base64.decodeStringToUint8Array=function(a){goog.asserts.assert(!goog.userAgent.IE||goog.userAgent.isVersionOrHigher("10"),"Browser does not support typed arrays");var b=a.length,c=3*b/4;c%3?c=Math.floor(c):goog.crypt.base64.isPadding_(a[b-1])&&(c=goog.crypt.base64.isPadding_(a[b-2])?c-2:c-1);var d=new Uint8Array(c),e=0;goog.crypt.base64.decodeStringInternal_(a,function(a){d[e++]=a});return d.subarray(0,e)};
  6123. goog.crypt.base64.decodeStringInternal_=function(a,b){function c(b){for(;d<a.length;){var c=a.charAt(d++),e=goog.crypt.base64.charToByteMap_[c];if(null!=e)return e;if(!goog.string.isEmptyOrWhitespace(c))throw Error("Unknown base64 encoding at char: "+c);}return b}goog.crypt.base64.init_();for(var d=0;;){var e=c(-1),f=c(0),g=c(64),h=c(64);if(64===h&&-1===e)break;b(e<<2|f>>4);64!=g&&(b(f<<4&240|g>>2),64!=h&&b(g<<6&192|h))}};
  6124. goog.crypt.base64.init_=function(){if(!goog.crypt.base64.charToByteMap_){goog.crypt.base64.charToByteMap_={};for(var a=goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++){var d=a.concat(b[c].split(""));goog.crypt.base64.byteToCharMaps_[c]=d;for(var e=0;e<d.length;e++){var f=d[e],g=goog.crypt.base64.charToByteMap_[f];void 0===g?goog.crypt.base64.charToByteMap_[f]=e:goog.asserts.assert(g===e)}}}};jspb.utils={};jspb.utils.split64Low=0;jspb.utils.split64High=0;jspb.utils.splitUint64=function(a){var b=a>>>0;a=Math.floor((a-b)/jspb.BinaryConstants.TWO_TO_32)>>>0;jspb.utils.split64Low=b;jspb.utils.split64High=a};jspb.utils.splitInt64=function(a){var b=0>a;a=Math.abs(a);var c=a>>>0;a=Math.floor((a-c)/jspb.BinaryConstants.TWO_TO_32);a>>>=0;b&&(a=~a>>>0,c=(~c>>>0)+1,4294967295<c&&(c=0,a++,4294967295<a&&(a=0)));jspb.utils.split64Low=c;jspb.utils.split64High=a};
  6125. jspb.utils.splitZigzag64=function(a){var b=0>a;a=2*Math.abs(a);jspb.utils.splitUint64(a);a=jspb.utils.split64Low;var c=jspb.utils.split64High;b&&(0==a?0==c?c=a=4294967295:(c--,a=4294967295):a--);jspb.utils.split64Low=a;jspb.utils.split64High=c};
  6126. jspb.utils.splitFloat32=function(a){var b=0>a?1:0;a=b?-a:a;if(0===a)0<1/a?(jspb.utils.split64High=0,jspb.utils.split64Low=0):(jspb.utils.split64High=0,jspb.utils.split64Low=2147483648);else if(isNaN(a))jspb.utils.split64High=0,jspb.utils.split64Low=2147483647;else if(a>jspb.BinaryConstants.FLOAT32_MAX)jspb.utils.split64High=0,jspb.utils.split64Low=(b<<31|2139095040)>>>0;else if(a<jspb.BinaryConstants.FLOAT32_MIN)a=Math.round(a/Math.pow(2,-149)),jspb.utils.split64High=0,jspb.utils.split64Low=(b<<31|
  6127. a)>>>0;else{var c=Math.floor(Math.log(a)/Math.LN2);a*=Math.pow(2,-c);a=Math.round(a*jspb.BinaryConstants.TWO_TO_23)&8388607;jspb.utils.split64High=0;jspb.utils.split64Low=(b<<31|c+127<<23|a)>>>0}};
  6128. jspb.utils.splitFloat64=function(a){var b=0>a?1:0;a=b?-a:a;if(0===a)jspb.utils.split64High=0<1/a?0:2147483648,jspb.utils.split64Low=0;else if(isNaN(a))jspb.utils.split64High=2147483647,jspb.utils.split64Low=4294967295;else if(a>jspb.BinaryConstants.FLOAT64_MAX)jspb.utils.split64High=(b<<31|2146435072)>>>0,jspb.utils.split64Low=0;else if(a<jspb.BinaryConstants.FLOAT64_MIN){var c=a/Math.pow(2,-1074);a=c/jspb.BinaryConstants.TWO_TO_32;jspb.utils.split64High=(b<<31|a)>>>0;jspb.utils.split64Low=c>>>0}else{c=
  6129. a;var d=0;if(2<=c)for(;2<=c&&1023>d;)d++,c/=2;else for(;1>c&&-1022<d;)c*=2,d--;c=a*Math.pow(2,-d);a=c*jspb.BinaryConstants.TWO_TO_20&1048575;c=c*jspb.BinaryConstants.TWO_TO_52>>>0;jspb.utils.split64High=(b<<31|d+1023<<20|a)>>>0;jspb.utils.split64Low=c}};
  6130. jspb.utils.splitHash64=function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=a.charCodeAt(4),g=a.charCodeAt(5),h=a.charCodeAt(6);a=a.charCodeAt(7);jspb.utils.split64Low=b+(c<<8)+(d<<16)+(e<<24)>>>0;jspb.utils.split64High=f+(g<<8)+(h<<16)+(a<<24)>>>0};jspb.utils.joinUint64=function(a,b){return b*jspb.BinaryConstants.TWO_TO_32+(a>>>0)};
  6131. jspb.utils.joinInt64=function(a,b){var c=b&2147483648;c&&(a=~a+1>>>0,b=~b>>>0,0==a&&(b=b+1>>>0));a=jspb.utils.joinUint64(a,b);return c?-a:a};jspb.utils.toZigzag64=function(a,b,c){var d=b>>31;return c(a<<1^d,(b<<1|a>>>31)^d)};jspb.utils.joinZigzag64=function(a,b){return jspb.utils.fromZigzag64(a,b,jspb.utils.joinInt64)};jspb.utils.fromZigzag64=function(a,b,c){var d=-(a&1);return c((a>>>1|b<<31)^d,b>>>1^d)};
  6132. jspb.utils.joinFloat32=function(a,b){b=2*(a>>31)+1;var c=a>>>23&255;a&=8388607;return 255==c?a?NaN:Infinity*b:0==c?b*Math.pow(2,-149)*a:b*Math.pow(2,c-150)*(a+Math.pow(2,23))};jspb.utils.joinFloat64=function(a,b){var c=2*(b>>31)+1,d=b>>>20&2047;a=jspb.BinaryConstants.TWO_TO_32*(b&1048575)+a;return 2047==d?a?NaN:Infinity*c:0==d?c*Math.pow(2,-1074)*a:c*Math.pow(2,d-1075)*(a+jspb.BinaryConstants.TWO_TO_52)};
  6133. jspb.utils.joinHash64=function(a,b){return String.fromCharCode(a>>>0&255,a>>>8&255,a>>>16&255,a>>>24&255,b>>>0&255,b>>>8&255,b>>>16&255,b>>>24&255)};jspb.utils.DIGITS="0123456789abcdef".split("");jspb.utils.ZERO_CHAR_CODE_=48;jspb.utils.A_CHAR_CODE_=97;
  6134. jspb.utils.joinUnsignedDecimalString=function(a,b){function c(a,b){a=a?String(a):"";return b?"0000000".slice(a.length)+a:a}if(2097151>=b)return""+jspb.utils.joinUint64(a,b);var d=(a>>>24|b<<8)>>>0&16777215;b=b>>16&65535;a=(a&16777215)+6777216*d+6710656*b;d+=8147497*b;b*=2;1E7<=a&&(d+=Math.floor(a/1E7),a%=1E7);1E7<=d&&(b+=Math.floor(d/1E7),d%=1E7);return c(b,0)+c(d,b)+c(a,1)};
  6135. jspb.utils.joinSignedDecimalString=function(a,b){var c=b&2147483648;c&&(a=~a+1>>>0,b=~b+(0==a?1:0)>>>0);a=jspb.utils.joinUnsignedDecimalString(a,b);return c?"-"+a:a};jspb.utils.hash64ToDecimalString=function(a,b){jspb.utils.splitHash64(a);a=jspb.utils.split64Low;var c=jspb.utils.split64High;return b?jspb.utils.joinSignedDecimalString(a,c):jspb.utils.joinUnsignedDecimalString(a,c)};
  6136. jspb.utils.hash64ArrayToDecimalStrings=function(a,b){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=jspb.utils.hash64ToDecimalString(a[d],b);return c};
  6137. jspb.utils.decimalStringToHash64=function(a){function b(a,b){for(var c=0;8>c&&(1!==a||0<b);c++)b=a*e[c]+b,e[c]=b&255,b>>>=8}function c(){for(var a=0;8>a;a++)e[a]=~e[a]&255}goog.asserts.assert(0<a.length);var d=!1;"-"===a[0]&&(d=!0,a=a.slice(1));for(var e=[0,0,0,0,0,0,0,0],f=0;f<a.length;f++)b(10,a.charCodeAt(f)-jspb.utils.ZERO_CHAR_CODE_);d&&(c(),b(1,1));return goog.crypt.byteArrayToString(e)};jspb.utils.splitDecimalString=function(a){jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(a))};
  6138. jspb.utils.toHexDigit_=function(a){return String.fromCharCode(10>a?jspb.utils.ZERO_CHAR_CODE_+a:jspb.utils.A_CHAR_CODE_-10+a)};jspb.utils.fromHexCharCode_=function(a){return a>=jspb.utils.A_CHAR_CODE_?a-jspb.utils.A_CHAR_CODE_+10:a-jspb.utils.ZERO_CHAR_CODE_};jspb.utils.hash64ToHexString=function(a){var b=Array(18);b[0]="0";b[1]="x";for(var c=0;8>c;c++){var d=a.charCodeAt(7-c);b[2*c+2]=jspb.utils.toHexDigit_(d>>4);b[2*c+3]=jspb.utils.toHexDigit_(d&15)}return b.join("")};
  6139. jspb.utils.hexStringToHash64=function(a){a=a.toLowerCase();goog.asserts.assert(18==a.length);goog.asserts.assert("0"==a[0]);goog.asserts.assert("x"==a[1]);for(var b="",c=0;8>c;c++){var d=jspb.utils.fromHexCharCode_(a.charCodeAt(2*c+2)),e=jspb.utils.fromHexCharCode_(a.charCodeAt(2*c+3));b=String.fromCharCode(16*d+e)+b}return b};
  6140. jspb.utils.hash64ToNumber=function(a,b){jspb.utils.splitHash64(a);a=jspb.utils.split64Low;var c=jspb.utils.split64High;return b?jspb.utils.joinInt64(a,c):jspb.utils.joinUint64(a,c)};jspb.utils.numberToHash64=function(a){jspb.utils.splitInt64(a);return jspb.utils.joinHash64(jspb.utils.split64Low,jspb.utils.split64High)};jspb.utils.countVarints=function(a,b,c){for(var d=0,e=b;e<c;e++)d+=a[e]>>7;return c-b-d};
  6141. jspb.utils.countVarintFields=function(a,b,c,d){var e=0;d=8*d+jspb.BinaryConstants.WireType.VARINT;if(128>d)for(;b<c&&a[b++]==d;)for(e++;;){var f=a[b++];if(0==(f&128))break}else for(;b<c;){for(f=d;128<f;){if(a[b]!=(f&127|128))return e;b++;f>>=7}if(a[b++]!=f)break;for(e++;f=a[b++],0!=(f&128););}return e};jspb.utils.countFixedFields_=function(a,b,c,d,e){var f=0;if(128>d)for(;b<c&&a[b++]==d;)f++,b+=e;else for(;b<c;){for(var g=d;128<g;){if(a[b++]!=(g&127|128))return f;g>>=7}if(a[b++]!=g)break;f++;b+=e}return f};
  6142. jspb.utils.countFixed32Fields=function(a,b,c,d){return jspb.utils.countFixedFields_(a,b,c,8*d+jspb.BinaryConstants.WireType.FIXED32,4)};jspb.utils.countFixed64Fields=function(a,b,c,d){return jspb.utils.countFixedFields_(a,b,c,8*d+jspb.BinaryConstants.WireType.FIXED64,8)};
  6143. jspb.utils.countDelimitedFields=function(a,b,c,d){var e=0;for(d=8*d+jspb.BinaryConstants.WireType.DELIMITED;b<c;){for(var f=d;128<f;){if(a[b++]!=(f&127|128))return e;f>>=7}if(a[b++]!=f)break;e++;for(var g=0,h=1;f=a[b++],g+=(f&127)*h,h*=128,0!=(f&128););b+=g}return e};jspb.utils.debugBytesToTextFormat=function(a){var b='"';if(a){a=jspb.utils.byteSourceToUint8Array(a);for(var c=0;c<a.length;c++)b+="\\x",16>a[c]&&(b+="0"),b+=a[c].toString(16)}return b+'"'};
  6144. jspb.utils.debugScalarToTextFormat=function(a){return"string"===typeof a?goog.string.quote(a):a.toString()};jspb.utils.stringToByteArray=function(a){for(var b=new Uint8Array(a.length),c=0;c<a.length;c++){var d=a.charCodeAt(c);if(255<d)throw Error("Conversion error: string contains codepoint outside of byte range");b[c]=d}return b};
  6145. jspb.utils.byteSourceToUint8Array=function(a){if(a.constructor===Uint8Array)return a;if(a.constructor===ArrayBuffer||"undefined"!=typeof Buffer&&a.constructor===Buffer||a.constructor===Array)return new Uint8Array(a);if(a.constructor===String)return goog.crypt.base64.decodeStringToUint8Array(a);goog.asserts.fail("Type not convertible to Uint8Array.");return new Uint8Array(0)};jspb.BinaryDecoder=function(a,b,c){this.bytes_=null;this.cursor_=this.end_=this.start_=0;this.error_=!1;a&&this.setBlock(a,b,c)};jspb.BinaryDecoder.instanceCache_=[];jspb.BinaryDecoder.alloc=function(a,b,c){if(jspb.BinaryDecoder.instanceCache_.length){var d=jspb.BinaryDecoder.instanceCache_.pop();a&&d.setBlock(a,b,c);return d}return new jspb.BinaryDecoder(a,b,c)};jspb.BinaryDecoder.prototype.free=function(){this.clear();100>jspb.BinaryDecoder.instanceCache_.length&&jspb.BinaryDecoder.instanceCache_.push(this)};
  6146. jspb.BinaryDecoder.prototype.clone=function(){return jspb.BinaryDecoder.alloc(this.bytes_,this.start_,this.end_-this.start_)};jspb.BinaryDecoder.prototype.clear=function(){this.bytes_=null;this.cursor_=this.end_=this.start_=0;this.error_=!1};jspb.BinaryDecoder.prototype.getBuffer=function(){return this.bytes_};
  6147. jspb.BinaryDecoder.prototype.setBlock=function(a,b,c){this.bytes_=jspb.utils.byteSourceToUint8Array(a);this.start_=void 0!==b?b:0;this.end_=void 0!==c?this.start_+c:this.bytes_.length;this.cursor_=this.start_};jspb.BinaryDecoder.prototype.getEnd=function(){return this.end_};jspb.BinaryDecoder.prototype.setEnd=function(a){this.end_=a};jspb.BinaryDecoder.prototype.reset=function(){this.cursor_=this.start_};jspb.BinaryDecoder.prototype.getCursor=function(){return this.cursor_};
  6148. jspb.BinaryDecoder.prototype.setCursor=function(a){this.cursor_=a};jspb.BinaryDecoder.prototype.advance=function(a){this.cursor_+=a;goog.asserts.assert(this.cursor_<=this.end_)};jspb.BinaryDecoder.prototype.atEnd=function(){return this.cursor_==this.end_};jspb.BinaryDecoder.prototype.pastEnd=function(){return this.cursor_>this.end_};jspb.BinaryDecoder.prototype.getError=function(){return this.error_||0>this.cursor_||this.cursor_>this.end_};
  6149. jspb.BinaryDecoder.prototype.readSplitVarint64=function(a){for(var b=128,c=0,d=0,e=0;4>e&&128<=b;e++)b=this.bytes_[this.cursor_++],c|=(b&127)<<7*e;128<=b&&(b=this.bytes_[this.cursor_++],c|=(b&127)<<28,d|=(b&127)>>4);if(128<=b)for(e=0;5>e&&128<=b;e++)b=this.bytes_[this.cursor_++],d|=(b&127)<<7*e+3;if(128>b)return a(c>>>0,d>>>0);goog.asserts.fail("Failed to read varint, encoding is invalid.");this.error_=!0};
  6150. jspb.BinaryDecoder.prototype.readSplitZigzagVarint64=function(a){return this.readSplitVarint64(function(b,c){return jspb.utils.fromZigzag64(b,c,a)})};jspb.BinaryDecoder.prototype.readSplitFixed64=function(a){var b=this.bytes_,c=this.cursor_;this.cursor_+=8;for(var d=0,e=0,f=c+7;f>=c;f--)d=d<<8|b[f],e=e<<8|b[f+4];return a(d,e)};jspb.BinaryDecoder.prototype.skipVarint=function(){for(;this.bytes_[this.cursor_]&128;)this.cursor_++;this.cursor_++};
  6151. jspb.BinaryDecoder.prototype.unskipVarint=function(a){for(;128<a;)this.cursor_--,a>>>=7;this.cursor_--};
  6152. jspb.BinaryDecoder.prototype.readUnsignedVarint32=function(){var a=this.bytes_;var b=a[this.cursor_+0];var c=b&127;if(128>b)return this.cursor_+=1,goog.asserts.assert(this.cursor_<=this.end_),c;b=a[this.cursor_+1];c|=(b&127)<<7;if(128>b)return this.cursor_+=2,goog.asserts.assert(this.cursor_<=this.end_),c;b=a[this.cursor_+2];c|=(b&127)<<14;if(128>b)return this.cursor_+=3,goog.asserts.assert(this.cursor_<=this.end_),c;b=a[this.cursor_+3];c|=(b&127)<<21;if(128>b)return this.cursor_+=4,goog.asserts.assert(this.cursor_<=
  6153. this.end_),c;b=a[this.cursor_+4];c|=(b&15)<<28;if(128>b)return this.cursor_+=5,goog.asserts.assert(this.cursor_<=this.end_),c>>>0;this.cursor_+=5;128<=a[this.cursor_++]&&128<=a[this.cursor_++]&&128<=a[this.cursor_++]&&128<=a[this.cursor_++]&&128<=a[this.cursor_++]&&goog.asserts.assert(!1);goog.asserts.assert(this.cursor_<=this.end_);return c};jspb.BinaryDecoder.prototype.readSignedVarint32=jspb.BinaryDecoder.prototype.readUnsignedVarint32;jspb.BinaryDecoder.prototype.readUnsignedVarint32String=function(){return this.readUnsignedVarint32().toString()};
  6154. jspb.BinaryDecoder.prototype.readSignedVarint32String=function(){return this.readSignedVarint32().toString()};jspb.BinaryDecoder.prototype.readZigzagVarint32=function(){var a=this.readUnsignedVarint32();return a>>>1^-(a&1)};jspb.BinaryDecoder.prototype.readUnsignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinUint64)};jspb.BinaryDecoder.prototype.readUnsignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinUnsignedDecimalString)};
  6155. jspb.BinaryDecoder.prototype.readSignedVarint64=function(){return this.readSplitVarint64(jspb.utils.joinInt64)};jspb.BinaryDecoder.prototype.readSignedVarint64String=function(){return this.readSplitVarint64(jspb.utils.joinSignedDecimalString)};jspb.BinaryDecoder.prototype.readZigzagVarint64=function(){return this.readSplitVarint64(jspb.utils.joinZigzag64)};jspb.BinaryDecoder.prototype.readZigzagVarintHash64=function(){return this.readSplitZigzagVarint64(jspb.utils.joinHash64)};
  6156. jspb.BinaryDecoder.prototype.readZigzagVarint64String=function(){return this.readSplitZigzagVarint64(jspb.utils.joinSignedDecimalString)};jspb.BinaryDecoder.prototype.readUint8=function(){var a=this.bytes_[this.cursor_+0];this.cursor_+=1;goog.asserts.assert(this.cursor_<=this.end_);return a};jspb.BinaryDecoder.prototype.readUint16=function(){var a=this.bytes_[this.cursor_+0],b=this.bytes_[this.cursor_+1];this.cursor_+=2;goog.asserts.assert(this.cursor_<=this.end_);return a<<0|b<<8};
  6157. jspb.BinaryDecoder.prototype.readUint32=function(){var a=this.bytes_[this.cursor_+0],b=this.bytes_[this.cursor_+1],c=this.bytes_[this.cursor_+2],d=this.bytes_[this.cursor_+3];this.cursor_+=4;goog.asserts.assert(this.cursor_<=this.end_);return(a<<0|b<<8|c<<16|d<<24)>>>0};jspb.BinaryDecoder.prototype.readUint64=function(){var a=this.readUint32(),b=this.readUint32();return jspb.utils.joinUint64(a,b)};
  6158. jspb.BinaryDecoder.prototype.readUint64String=function(){var a=this.readUint32(),b=this.readUint32();return jspb.utils.joinUnsignedDecimalString(a,b)};jspb.BinaryDecoder.prototype.readInt8=function(){var a=this.bytes_[this.cursor_+0];this.cursor_+=1;goog.asserts.assert(this.cursor_<=this.end_);return a<<24>>24};
  6159. jspb.BinaryDecoder.prototype.readInt16=function(){var a=this.bytes_[this.cursor_+0],b=this.bytes_[this.cursor_+1];this.cursor_+=2;goog.asserts.assert(this.cursor_<=this.end_);return(a<<0|b<<8)<<16>>16};jspb.BinaryDecoder.prototype.readInt32=function(){var a=this.bytes_[this.cursor_+0],b=this.bytes_[this.cursor_+1],c=this.bytes_[this.cursor_+2],d=this.bytes_[this.cursor_+3];this.cursor_+=4;goog.asserts.assert(this.cursor_<=this.end_);return a<<0|b<<8|c<<16|d<<24};
  6160. jspb.BinaryDecoder.prototype.readInt64=function(){var a=this.readUint32(),b=this.readUint32();return jspb.utils.joinInt64(a,b)};jspb.BinaryDecoder.prototype.readInt64String=function(){var a=this.readUint32(),b=this.readUint32();return jspb.utils.joinSignedDecimalString(a,b)};jspb.BinaryDecoder.prototype.readFloat=function(){var a=this.readUint32();return jspb.utils.joinFloat32(a,0)};
  6161. jspb.BinaryDecoder.prototype.readDouble=function(){var a=this.readUint32(),b=this.readUint32();return jspb.utils.joinFloat64(a,b)};jspb.BinaryDecoder.prototype.readBool=function(){return!!this.bytes_[this.cursor_++]};jspb.BinaryDecoder.prototype.readEnum=function(){return this.readSignedVarint32()};
  6162. jspb.BinaryDecoder.prototype.readString=function(a){var b=this.bytes_,c=this.cursor_;a=c+a;for(var d=[],e="";c<a;){var f=b[c++];if(128>f)d.push(f);else if(192>f)continue;else if(224>f){var g=b[c++];d.push((f&31)<<6|g&63)}else if(240>f){g=b[c++];var h=b[c++];d.push((f&15)<<12|(g&63)<<6|h&63)}else if(248>f){g=b[c++];h=b[c++];var k=b[c++];f=(f&7)<<18|(g&63)<<12|(h&63)<<6|k&63;f-=65536;d.push((f>>10&1023)+55296,(f&1023)+56320)}8192<=d.length&&(e+=String.fromCharCode.apply(null,d),d.length=0)}e+=goog.crypt.byteArrayToString(d);
  6163. this.cursor_=c;return e};jspb.BinaryDecoder.prototype.readStringWithLength=function(){var a=this.readUnsignedVarint32();return this.readString(a)};jspb.BinaryDecoder.prototype.readBytes=function(a){if(0>a||this.cursor_+a>this.bytes_.length)return this.error_=!0,goog.asserts.fail("Invalid byte length!"),new Uint8Array(0);var b=this.bytes_.subarray(this.cursor_,this.cursor_+a);this.cursor_+=a;goog.asserts.assert(this.cursor_<=this.end_);return b};jspb.BinaryDecoder.prototype.readVarintHash64=function(){return this.readSplitVarint64(jspb.utils.joinHash64)};
  6164. jspb.BinaryDecoder.prototype.readFixedHash64=function(){var a=this.bytes_,b=this.cursor_,c=a[b+0],d=a[b+1],e=a[b+2],f=a[b+3],g=a[b+4],h=a[b+5],k=a[b+6];a=a[b+7];this.cursor_+=8;return String.fromCharCode(c,d,e,f,g,h,k,a)};jspb.BinaryReader=function(a,b,c){this.decoder_=jspb.BinaryDecoder.alloc(a,b,c);this.fieldCursor_=this.decoder_.getCursor();this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER;this.nextWireType_=jspb.BinaryConstants.WireType.INVALID;this.error_=!1;this.readCallbacks_=null};jspb.BinaryReader.instanceCache_=[];
  6165. jspb.BinaryReader.alloc=function(a,b,c){if(jspb.BinaryReader.instanceCache_.length){var d=jspb.BinaryReader.instanceCache_.pop();a&&d.decoder_.setBlock(a,b,c);return d}return new jspb.BinaryReader(a,b,c)};jspb.BinaryReader.prototype.alloc=jspb.BinaryReader.alloc;
  6166. jspb.BinaryReader.prototype.free=function(){this.decoder_.clear();this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER;this.nextWireType_=jspb.BinaryConstants.WireType.INVALID;this.error_=!1;this.readCallbacks_=null;100>jspb.BinaryReader.instanceCache_.length&&jspb.BinaryReader.instanceCache_.push(this)};jspb.BinaryReader.prototype.getFieldCursor=function(){return this.fieldCursor_};jspb.BinaryReader.prototype.getCursor=function(){return this.decoder_.getCursor()};
  6167. jspb.BinaryReader.prototype.getBuffer=function(){return this.decoder_.getBuffer()};jspb.BinaryReader.prototype.getFieldNumber=function(){return this.nextField_};jspb.BinaryReader.prototype.getWireType=function(){return this.nextWireType_};jspb.BinaryReader.prototype.isDelimited=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED};jspb.BinaryReader.prototype.isEndGroup=function(){return this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP};
  6168. jspb.BinaryReader.prototype.getError=function(){return this.error_||this.decoder_.getError()};jspb.BinaryReader.prototype.setBlock=function(a,b,c){this.decoder_.setBlock(a,b,c);this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER;this.nextWireType_=jspb.BinaryConstants.WireType.INVALID};jspb.BinaryReader.prototype.reset=function(){this.decoder_.reset();this.nextField_=jspb.BinaryConstants.INVALID_FIELD_NUMBER;this.nextWireType_=jspb.BinaryConstants.WireType.INVALID};
  6169. jspb.BinaryReader.prototype.advance=function(a){this.decoder_.advance(a)};
  6170. jspb.BinaryReader.prototype.nextField=function(){if(this.decoder_.atEnd())return!1;if(this.getError())return goog.asserts.fail("Decoder hit an error"),!1;this.fieldCursor_=this.decoder_.getCursor();var a=this.decoder_.readUnsignedVarint32(),b=a>>>3;a&=7;if(a!=jspb.BinaryConstants.WireType.VARINT&&a!=jspb.BinaryConstants.WireType.FIXED32&&a!=jspb.BinaryConstants.WireType.FIXED64&&a!=jspb.BinaryConstants.WireType.DELIMITED&&a!=jspb.BinaryConstants.WireType.START_GROUP&&a!=jspb.BinaryConstants.WireType.END_GROUP)return goog.asserts.fail("Invalid wire type: %s (at position %s)",
  6171. a,this.fieldCursor_),this.error_=!0,!1;this.nextField_=b;this.nextWireType_=a;return!0};jspb.BinaryReader.prototype.unskipHeader=function(){this.decoder_.unskipVarint(this.nextField_<<3|this.nextWireType_)};jspb.BinaryReader.prototype.skipMatchingFields=function(){var a=this.nextField_;for(this.unskipHeader();this.nextField()&&this.getFieldNumber()==a;)this.skipField();this.decoder_.atEnd()||this.unskipHeader()};
  6172. jspb.BinaryReader.prototype.skipVarintField=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.VARINT?(goog.asserts.fail("Invalid wire type for skipVarintField"),this.skipField()):this.decoder_.skipVarint()};jspb.BinaryReader.prototype.skipDelimitedField=function(){if(this.nextWireType_!=jspb.BinaryConstants.WireType.DELIMITED)goog.asserts.fail("Invalid wire type for skipDelimitedField"),this.skipField();else{var a=this.decoder_.readUnsignedVarint32();this.decoder_.advance(a)}};
  6173. jspb.BinaryReader.prototype.skipFixed32Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED32?(goog.asserts.fail("Invalid wire type for skipFixed32Field"),this.skipField()):this.decoder_.advance(4)};jspb.BinaryReader.prototype.skipFixed64Field=function(){this.nextWireType_!=jspb.BinaryConstants.WireType.FIXED64?(goog.asserts.fail("Invalid wire type for skipFixed64Field"),this.skipField()):this.decoder_.advance(8)};
  6174. jspb.BinaryReader.prototype.skipGroup=function(){var a=this.nextField_;do{if(!this.nextField()){goog.asserts.fail("Unmatched start-group tag: stream EOF");this.error_=!0;break}if(this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP){this.nextField_!=a&&(goog.asserts.fail("Unmatched end-group tag"),this.error_=!0);break}this.skipField()}while(1)};
  6175. jspb.BinaryReader.prototype.skipField=function(){switch(this.nextWireType_){case jspb.BinaryConstants.WireType.VARINT:this.skipVarintField();break;case jspb.BinaryConstants.WireType.FIXED64:this.skipFixed64Field();break;case jspb.BinaryConstants.WireType.DELIMITED:this.skipDelimitedField();break;case jspb.BinaryConstants.WireType.FIXED32:this.skipFixed32Field();break;case jspb.BinaryConstants.WireType.START_GROUP:this.skipGroup();break;default:goog.asserts.fail("Invalid wire encoding for field.")}};
  6176. jspb.BinaryReader.prototype.registerReadCallback=function(a,b){null===this.readCallbacks_&&(this.readCallbacks_={});goog.asserts.assert(!this.readCallbacks_[a]);this.readCallbacks_[a]=b};jspb.BinaryReader.prototype.runReadCallback=function(a){goog.asserts.assert(null!==this.readCallbacks_);a=this.readCallbacks_[a];goog.asserts.assert(a);return a(this)};
  6177. jspb.BinaryReader.prototype.readAny=function(a){this.nextWireType_=jspb.BinaryConstants.FieldTypeToWireType(a);var b=jspb.BinaryConstants.FieldType;switch(a){case b.DOUBLE:return this.readDouble();case b.FLOAT:return this.readFloat();case b.INT64:return this.readInt64();case b.UINT64:return this.readUint64();case b.INT32:return this.readInt32();case b.FIXED64:return this.readFixed64();case b.FIXED32:return this.readFixed32();case b.BOOL:return this.readBool();case b.STRING:return this.readString();
  6178. case b.GROUP:goog.asserts.fail("Group field type not supported in readAny()");case b.MESSAGE:goog.asserts.fail("Message field type not supported in readAny()");case b.BYTES:return this.readBytes();case b.UINT32:return this.readUint32();case b.ENUM:return this.readEnum();case b.SFIXED32:return this.readSfixed32();case b.SFIXED64:return this.readSfixed64();case b.SINT32:return this.readSint32();case b.SINT64:return this.readSint64();case b.FHASH64:return this.readFixedHash64();case b.VHASH64:return this.readVarintHash64();
  6179. default:goog.asserts.fail("Invalid field type in readAny()")}return 0};jspb.BinaryReader.prototype.readMessage=function(a,b){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var c=this.decoder_.getEnd(),d=this.decoder_.readUnsignedVarint32();d=this.decoder_.getCursor()+d;this.decoder_.setEnd(d);b(a,this);this.decoder_.setCursor(d);this.decoder_.setEnd(c)};
  6180. jspb.BinaryReader.prototype.readGroup=function(a,b,c){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.START_GROUP);goog.asserts.assert(this.nextField_==a);c(b,this);this.error_||this.nextWireType_==jspb.BinaryConstants.WireType.END_GROUP||(goog.asserts.fail("Group submessage did not end with an END_GROUP tag"),this.error_=!0)};
  6181. jspb.BinaryReader.prototype.getFieldDecoder=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var a=this.decoder_.readUnsignedVarint32(),b=this.decoder_.getCursor(),c=b+a;a=jspb.BinaryDecoder.alloc(this.decoder_.getBuffer(),b,a);this.decoder_.setCursor(c);return a};jspb.BinaryReader.prototype.readInt32=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readSignedVarint32()};
  6182. jspb.BinaryReader.prototype.readInt32String=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readSignedVarint32String()};jspb.BinaryReader.prototype.readInt64=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readSignedVarint64()};jspb.BinaryReader.prototype.readInt64String=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readSignedVarint64String()};
  6183. jspb.BinaryReader.prototype.readUint32=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readUnsignedVarint32()};jspb.BinaryReader.prototype.readUint32String=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readUnsignedVarint32String()};jspb.BinaryReader.prototype.readUint64=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readUnsignedVarint64()};
  6184. jspb.BinaryReader.prototype.readUint64String=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readUnsignedVarint64String()};jspb.BinaryReader.prototype.readSint32=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readZigzagVarint32()};jspb.BinaryReader.prototype.readSint64=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readZigzagVarint64()};
  6185. jspb.BinaryReader.prototype.readSint64String=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readZigzagVarint64String()};jspb.BinaryReader.prototype.readFixed32=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32);return this.decoder_.readUint32()};jspb.BinaryReader.prototype.readFixed64=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64);return this.decoder_.readUint64()};
  6186. jspb.BinaryReader.prototype.readFixed64String=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64);return this.decoder_.readUint64String()};jspb.BinaryReader.prototype.readSfixed32=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32);return this.decoder_.readInt32()};jspb.BinaryReader.prototype.readSfixed32String=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32);return this.decoder_.readInt32().toString()};
  6187. jspb.BinaryReader.prototype.readSfixed64=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64);return this.decoder_.readInt64()};jspb.BinaryReader.prototype.readSfixed64String=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64);return this.decoder_.readInt64String()};jspb.BinaryReader.prototype.readFloat=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED32);return this.decoder_.readFloat()};
  6188. jspb.BinaryReader.prototype.readDouble=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64);return this.decoder_.readDouble()};jspb.BinaryReader.prototype.readBool=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return!!this.decoder_.readUnsignedVarint32()};jspb.BinaryReader.prototype.readEnum=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readSignedVarint64()};
  6189. jspb.BinaryReader.prototype.readString=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var a=this.decoder_.readUnsignedVarint32();return this.decoder_.readString(a)};jspb.BinaryReader.prototype.readBytes=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var a=this.decoder_.readUnsignedVarint32();return this.decoder_.readBytes(a)};
  6190. jspb.BinaryReader.prototype.readVarintHash64=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readVarintHash64()};jspb.BinaryReader.prototype.readSintHash64=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readZigzagVarintHash64()};jspb.BinaryReader.prototype.readSplitVarint64=function(a){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readSplitVarint64(a)};
  6191. jspb.BinaryReader.prototype.readSplitZigzagVarint64=function(a){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.VARINT);return this.decoder_.readSplitVarint64(function(b,c){return jspb.utils.fromZigzag64(b,c,a)})};jspb.BinaryReader.prototype.readFixedHash64=function(){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64);return this.decoder_.readFixedHash64()};
  6192. jspb.BinaryReader.prototype.readSplitFixed64=function(a){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.FIXED64);return this.decoder_.readSplitFixed64(a)};jspb.BinaryReader.prototype.readPackedField_=function(a){goog.asserts.assert(this.nextWireType_==jspb.BinaryConstants.WireType.DELIMITED);var b=this.decoder_.readUnsignedVarint32();b=this.decoder_.getCursor()+b;for(var c=[];this.decoder_.getCursor()<b;)c.push(a.call(this.decoder_));return c};
  6193. jspb.BinaryReader.prototype.readPackedInt32=function(){return this.readPackedField_(this.decoder_.readSignedVarint32)};jspb.BinaryReader.prototype.readPackedInt32String=function(){return this.readPackedField_(this.decoder_.readSignedVarint32String)};jspb.BinaryReader.prototype.readPackedInt64=function(){return this.readPackedField_(this.decoder_.readSignedVarint64)};jspb.BinaryReader.prototype.readPackedInt64String=function(){return this.readPackedField_(this.decoder_.readSignedVarint64String)};
  6194. jspb.BinaryReader.prototype.readPackedUint32=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32)};jspb.BinaryReader.prototype.readPackedUint32String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint32String)};jspb.BinaryReader.prototype.readPackedUint64=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64)};jspb.BinaryReader.prototype.readPackedUint64String=function(){return this.readPackedField_(this.decoder_.readUnsignedVarint64String)};
  6195. jspb.BinaryReader.prototype.readPackedSint32=function(){return this.readPackedField_(this.decoder_.readZigzagVarint32)};jspb.BinaryReader.prototype.readPackedSint64=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64)};jspb.BinaryReader.prototype.readPackedSint64String=function(){return this.readPackedField_(this.decoder_.readZigzagVarint64String)};jspb.BinaryReader.prototype.readPackedFixed32=function(){return this.readPackedField_(this.decoder_.readUint32)};
  6196. jspb.BinaryReader.prototype.readPackedFixed64=function(){return this.readPackedField_(this.decoder_.readUint64)};jspb.BinaryReader.prototype.readPackedFixed64String=function(){return this.readPackedField_(this.decoder_.readUint64String)};jspb.BinaryReader.prototype.readPackedSfixed32=function(){return this.readPackedField_(this.decoder_.readInt32)};jspb.BinaryReader.prototype.readPackedSfixed64=function(){return this.readPackedField_(this.decoder_.readInt64)};
  6197. jspb.BinaryReader.prototype.readPackedSfixed64String=function(){return this.readPackedField_(this.decoder_.readInt64String)};jspb.BinaryReader.prototype.readPackedFloat=function(){return this.readPackedField_(this.decoder_.readFloat)};jspb.BinaryReader.prototype.readPackedDouble=function(){return this.readPackedField_(this.decoder_.readDouble)};jspb.BinaryReader.prototype.readPackedBool=function(){return this.readPackedField_(this.decoder_.readBool)};jspb.BinaryReader.prototype.readPackedEnum=function(){return this.readPackedField_(this.decoder_.readEnum)};
  6198. jspb.BinaryReader.prototype.readPackedVarintHash64=function(){return this.readPackedField_(this.decoder_.readVarintHash64)};jspb.BinaryReader.prototype.readPackedFixedHash64=function(){return this.readPackedField_(this.decoder_.readFixedHash64)};jspb.BinaryEncoder=function(){this.buffer_=[]};jspb.BinaryEncoder.prototype.length=function(){return this.buffer_.length};jspb.BinaryEncoder.prototype.end=function(){var a=this.buffer_;this.buffer_=[];return a};
  6199. jspb.BinaryEncoder.prototype.writeSplitVarint64=function(a,b){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(b==Math.floor(b));goog.asserts.assert(0<=a&&a<jspb.BinaryConstants.TWO_TO_32);for(goog.asserts.assert(0<=b&&b<jspb.BinaryConstants.TWO_TO_32);0<b||127<a;)this.buffer_.push(a&127|128),a=(a>>>7|b<<25)>>>0,b>>>=7;this.buffer_.push(a)};
  6200. jspb.BinaryEncoder.prototype.writeSplitFixed64=function(a,b){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(b==Math.floor(b));goog.asserts.assert(0<=a&&a<jspb.BinaryConstants.TWO_TO_32);goog.asserts.assert(0<=b&&b<jspb.BinaryConstants.TWO_TO_32);this.writeUint32(a);this.writeUint32(b)};
  6201. jspb.BinaryEncoder.prototype.writeUnsignedVarint32=function(a){goog.asserts.assert(a==Math.floor(a));for(goog.asserts.assert(0<=a&&a<jspb.BinaryConstants.TWO_TO_32);127<a;)this.buffer_.push(a&127|128),a>>>=7;this.buffer_.push(a)};
  6202. jspb.BinaryEncoder.prototype.writeSignedVarint32=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(a>=-jspb.BinaryConstants.TWO_TO_31&&a<jspb.BinaryConstants.TWO_TO_31);if(0<=a)this.writeUnsignedVarint32(a);else{for(var b=0;9>b;b++)this.buffer_.push(a&127|128),a>>=7;this.buffer_.push(1)}};
  6203. jspb.BinaryEncoder.prototype.writeUnsignedVarint64=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(0<=a&&a<jspb.BinaryConstants.TWO_TO_64);jspb.utils.splitInt64(a);this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)};
  6204. jspb.BinaryEncoder.prototype.writeSignedVarint64=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(a>=-jspb.BinaryConstants.TWO_TO_63&&a<jspb.BinaryConstants.TWO_TO_63);jspb.utils.splitInt64(a);this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)};
  6205. jspb.BinaryEncoder.prototype.writeZigzagVarint32=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(a>=-jspb.BinaryConstants.TWO_TO_31&&a<jspb.BinaryConstants.TWO_TO_31);this.writeUnsignedVarint32((a<<1^a>>31)>>>0)};jspb.BinaryEncoder.prototype.writeZigzagVarint64=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(a>=-jspb.BinaryConstants.TWO_TO_63&&a<jspb.BinaryConstants.TWO_TO_63);jspb.utils.splitZigzag64(a);this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)};
  6206. jspb.BinaryEncoder.prototype.writeZigzagVarint64String=function(a){this.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(a))};jspb.BinaryEncoder.prototype.writeZigzagVarintHash64=function(a){var b=this;jspb.utils.splitHash64(a);jspb.utils.toZigzag64(jspb.utils.split64Low,jspb.utils.split64High,function(a,d){b.writeSplitVarint64(a>>>0,d>>>0)})};
  6207. jspb.BinaryEncoder.prototype.writeUint8=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(0<=a&&256>a);this.buffer_.push(a>>>0&255)};jspb.BinaryEncoder.prototype.writeUint16=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(0<=a&&65536>a);this.buffer_.push(a>>>0&255);this.buffer_.push(a>>>8&255)};
  6208. jspb.BinaryEncoder.prototype.writeUint32=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(0<=a&&a<jspb.BinaryConstants.TWO_TO_32);this.buffer_.push(a>>>0&255);this.buffer_.push(a>>>8&255);this.buffer_.push(a>>>16&255);this.buffer_.push(a>>>24&255)};jspb.BinaryEncoder.prototype.writeUint64=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(0<=a&&a<jspb.BinaryConstants.TWO_TO_64);jspb.utils.splitUint64(a);this.writeUint32(jspb.utils.split64Low);this.writeUint32(jspb.utils.split64High)};
  6209. jspb.BinaryEncoder.prototype.writeInt8=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(-128<=a&&128>a);this.buffer_.push(a>>>0&255)};jspb.BinaryEncoder.prototype.writeInt16=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(-32768<=a&&32768>a);this.buffer_.push(a>>>0&255);this.buffer_.push(a>>>8&255)};
  6210. jspb.BinaryEncoder.prototype.writeInt32=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(a>=-jspb.BinaryConstants.TWO_TO_31&&a<jspb.BinaryConstants.TWO_TO_31);this.buffer_.push(a>>>0&255);this.buffer_.push(a>>>8&255);this.buffer_.push(a>>>16&255);this.buffer_.push(a>>>24&255)};
  6211. jspb.BinaryEncoder.prototype.writeInt64=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(a>=-jspb.BinaryConstants.TWO_TO_63&&a<jspb.BinaryConstants.TWO_TO_63);jspb.utils.splitInt64(a);this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)};
  6212. jspb.BinaryEncoder.prototype.writeInt64String=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(+a>=-jspb.BinaryConstants.TWO_TO_63&&+a<jspb.BinaryConstants.TWO_TO_63);jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(a));this.writeSplitFixed64(jspb.utils.split64Low,jspb.utils.split64High)};
  6213. jspb.BinaryEncoder.prototype.writeFloat=function(a){goog.asserts.assert(Infinity===a||-Infinity===a||isNaN(a)||a>=-jspb.BinaryConstants.FLOAT32_MAX&&a<=jspb.BinaryConstants.FLOAT32_MAX);jspb.utils.splitFloat32(a);this.writeUint32(jspb.utils.split64Low)};
  6214. jspb.BinaryEncoder.prototype.writeDouble=function(a){goog.asserts.assert(Infinity===a||-Infinity===a||isNaN(a)||a>=-jspb.BinaryConstants.FLOAT64_MAX&&a<=jspb.BinaryConstants.FLOAT64_MAX);jspb.utils.splitFloat64(a);this.writeUint32(jspb.utils.split64Low);this.writeUint32(jspb.utils.split64High)};jspb.BinaryEncoder.prototype.writeBool=function(a){goog.asserts.assert("boolean"===typeof a||"number"===typeof a);this.buffer_.push(a?1:0)};
  6215. jspb.BinaryEncoder.prototype.writeEnum=function(a){goog.asserts.assert(a==Math.floor(a));goog.asserts.assert(a>=-jspb.BinaryConstants.TWO_TO_31&&a<jspb.BinaryConstants.TWO_TO_31);this.writeSignedVarint32(a)};jspb.BinaryEncoder.prototype.writeBytes=function(a){this.buffer_.push.apply(this.buffer_,a)};jspb.BinaryEncoder.prototype.writeVarintHash64=function(a){jspb.utils.splitHash64(a);this.writeSplitVarint64(jspb.utils.split64Low,jspb.utils.split64High)};
  6216. jspb.BinaryEncoder.prototype.writeFixedHash64=function(a){jspb.utils.splitHash64(a);this.writeUint32(jspb.utils.split64Low);this.writeUint32(jspb.utils.split64High)};
  6217. jspb.BinaryEncoder.prototype.writeString=function(a){for(var b=this.buffer_.length,c=0;c<a.length;c++){var d=a.charCodeAt(c);if(128>d)this.buffer_.push(d);else if(2048>d)this.buffer_.push(d>>6|192),this.buffer_.push(d&63|128);else if(65536>d)if(55296<=d&&56319>=d&&c+1<a.length){var e=a.charCodeAt(c+1);56320<=e&&57343>=e&&(d=1024*(d-55296)+e-56320+65536,this.buffer_.push(d>>18|240),this.buffer_.push(d>>12&63|128),this.buffer_.push(d>>6&63|128),this.buffer_.push(d&63|128),c++)}else this.buffer_.push(d>>
  6218. 12|224),this.buffer_.push(d>>6&63|128),this.buffer_.push(d&63|128)}return this.buffer_.length-b};jspb.arith={};jspb.arith.UInt64=function(a,b){this.lo=a;this.hi=b};jspb.arith.UInt64.prototype.cmp=function(a){return this.hi<a.hi||this.hi==a.hi&&this.lo<a.lo?-1:this.hi==a.hi&&this.lo==a.lo?0:1};jspb.arith.UInt64.prototype.rightShift=function(){return new jspb.arith.UInt64((this.lo>>>1|(this.hi&1)<<31)>>>0,this.hi>>>1>>>0)};jspb.arith.UInt64.prototype.leftShift=function(){return new jspb.arith.UInt64(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)};
  6219. jspb.arith.UInt64.prototype.msb=function(){return!!(this.hi&2147483648)};jspb.arith.UInt64.prototype.lsb=function(){return!!(this.lo&1)};jspb.arith.UInt64.prototype.zero=function(){return 0==this.lo&&0==this.hi};jspb.arith.UInt64.prototype.add=function(a){return new jspb.arith.UInt64((this.lo+a.lo&4294967295)>>>0>>>0,((this.hi+a.hi&4294967295)>>>0)+(4294967296<=this.lo+a.lo?1:0)>>>0)};
  6220. jspb.arith.UInt64.prototype.sub=function(a){return new jspb.arith.UInt64((this.lo-a.lo&4294967295)>>>0>>>0,((this.hi-a.hi&4294967295)>>>0)-(0>this.lo-a.lo?1:0)>>>0)};jspb.arith.UInt64.mul32x32=function(a,b){var c=a&65535;a>>>=16;var d=b&65535,e=b>>>16;b=c*d+65536*(c*e&65535)+65536*(a*d&65535);for(c=a*e+(c*e>>>16)+(a*d>>>16);4294967296<=b;)b-=4294967296,c+=1;return new jspb.arith.UInt64(b>>>0,c>>>0)};
  6221. jspb.arith.UInt64.prototype.mul=function(a){var b=jspb.arith.UInt64.mul32x32(this.lo,a);a=jspb.arith.UInt64.mul32x32(this.hi,a);a.hi=a.lo;a.lo=0;return b.add(a)};
  6222. jspb.arith.UInt64.prototype.div=function(a){if(0==a)return[];var b=new jspb.arith.UInt64(0,0),c=new jspb.arith.UInt64(this.lo,this.hi);a=new jspb.arith.UInt64(a,0);for(var d=new jspb.arith.UInt64(1,0);!a.msb();)a=a.leftShift(),d=d.leftShift();for(;!d.zero();)0>=a.cmp(c)&&(b=b.add(d),c=c.sub(a)),a=a.rightShift(),d=d.rightShift();return[b,c]};jspb.arith.UInt64.prototype.toString=function(){for(var a="",b=this;!b.zero();){b=b.div(10);var c=b[0];a=b[1].lo+a;b=c}""==a&&(a="0");return a};
  6223. jspb.arith.UInt64.fromString=function(a){for(var b=new jspb.arith.UInt64(0,0),c=new jspb.arith.UInt64(0,0),d=0;d<a.length;d++){if("0">a[d]||"9"<a[d])return null;var e=parseInt(a[d],10);c.lo=e;b=b.mul(10).add(c)}return b};jspb.arith.UInt64.prototype.clone=function(){return new jspb.arith.UInt64(this.lo,this.hi)};jspb.arith.Int64=function(a,b){this.lo=a;this.hi=b};
  6224. jspb.arith.Int64.prototype.add=function(a){return new jspb.arith.Int64((this.lo+a.lo&4294967295)>>>0>>>0,((this.hi+a.hi&4294967295)>>>0)+(4294967296<=this.lo+a.lo?1:0)>>>0)};jspb.arith.Int64.prototype.sub=function(a){return new jspb.arith.Int64((this.lo-a.lo&4294967295)>>>0>>>0,((this.hi-a.hi&4294967295)>>>0)-(0>this.lo-a.lo?1:0)>>>0)};jspb.arith.Int64.prototype.clone=function(){return new jspb.arith.Int64(this.lo,this.hi)};
  6225. jspb.arith.Int64.prototype.toString=function(){var a=0!=(this.hi&2147483648),b=new jspb.arith.UInt64(this.lo,this.hi);a&&(b=(new jspb.arith.UInt64(0,0)).sub(b));return(a?"-":"")+b.toString()};jspb.arith.Int64.fromString=function(a){var b=0<a.length&&"-"==a[0];b&&(a=a.substring(1));a=jspb.arith.UInt64.fromString(a);if(null===a)return null;b&&(a=(new jspb.arith.UInt64(0,0)).sub(a));return new jspb.arith.Int64(a.lo,a.hi)};jspb.BinaryWriter=function(){this.blocks_=[];this.totalLength_=0;this.encoder_=new jspb.BinaryEncoder;this.bookmarks_=[]};jspb.BinaryWriter.prototype.appendUint8Array_=function(a){var b=this.encoder_.end();this.blocks_.push(b);this.blocks_.push(a);this.totalLength_+=b.length+a.length};
  6226. jspb.BinaryWriter.prototype.beginDelimited_=function(a){this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED);a=this.encoder_.end();this.blocks_.push(a);this.totalLength_+=a.length;a.push(this.totalLength_);return a};jspb.BinaryWriter.prototype.endDelimited_=function(a){var b=a.pop();b=this.totalLength_+this.encoder_.length()-b;for(goog.asserts.assert(0<=b);127<b;)a.push(b&127|128),b>>>=7,this.totalLength_++;a.push(b);this.totalLength_++};
  6227. jspb.BinaryWriter.prototype.writeSerializedMessage=function(a,b,c){this.appendUint8Array_(a.subarray(b,c))};jspb.BinaryWriter.prototype.maybeWriteSerializedMessage=function(a,b,c){null!=a&&null!=b&&null!=c&&this.writeSerializedMessage(a,b,c)};jspb.BinaryWriter.prototype.reset=function(){this.blocks_=[];this.encoder_.end();this.totalLength_=0;this.bookmarks_=[]};
  6228. jspb.BinaryWriter.prototype.getResultBuffer=function(){goog.asserts.assert(0==this.bookmarks_.length);for(var a=new Uint8Array(this.totalLength_+this.encoder_.length()),b=this.blocks_,c=b.length,d=0,e=0;e<c;e++){var f=b[e];a.set(f,d);d+=f.length}b=this.encoder_.end();a.set(b,d);d+=b.length;goog.asserts.assert(d==a.length);this.blocks_=[a];return a};jspb.BinaryWriter.prototype.getResultBase64String=function(a){return goog.crypt.base64.encodeByteArray(this.getResultBuffer(),a)};
  6229. jspb.BinaryWriter.prototype.beginSubMessage=function(a){this.bookmarks_.push(this.beginDelimited_(a))};jspb.BinaryWriter.prototype.endSubMessage=function(){goog.asserts.assert(0<=this.bookmarks_.length);this.endDelimited_(this.bookmarks_.pop())};jspb.BinaryWriter.prototype.writeFieldHeader_=function(a,b){goog.asserts.assert(1<=a&&a==Math.floor(a));this.encoder_.writeUnsignedVarint32(8*a+b)};
  6230. jspb.BinaryWriter.prototype.writeAny=function(a,b,c){var d=jspb.BinaryConstants.FieldType;switch(a){case d.DOUBLE:this.writeDouble(b,c);break;case d.FLOAT:this.writeFloat(b,c);break;case d.INT64:this.writeInt64(b,c);break;case d.UINT64:this.writeUint64(b,c);break;case d.INT32:this.writeInt32(b,c);break;case d.FIXED64:this.writeFixed64(b,c);break;case d.FIXED32:this.writeFixed32(b,c);break;case d.BOOL:this.writeBool(b,c);break;case d.STRING:this.writeString(b,c);break;case d.GROUP:goog.asserts.fail("Group field type not supported in writeAny()");
  6231. break;case d.MESSAGE:goog.asserts.fail("Message field type not supported in writeAny()");break;case d.BYTES:this.writeBytes(b,c);break;case d.UINT32:this.writeUint32(b,c);break;case d.ENUM:this.writeEnum(b,c);break;case d.SFIXED32:this.writeSfixed32(b,c);break;case d.SFIXED64:this.writeSfixed64(b,c);break;case d.SINT32:this.writeSint32(b,c);break;case d.SINT64:this.writeSint64(b,c);break;case d.FHASH64:this.writeFixedHash64(b,c);break;case d.VHASH64:this.writeVarintHash64(b,c);break;default:goog.asserts.fail("Invalid field type in writeAny()")}};
  6232. jspb.BinaryWriter.prototype.writeUnsignedVarint32_=function(a,b){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint32(b))};jspb.BinaryWriter.prototype.writeSignedVarint32_=function(a,b){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(b))};jspb.BinaryWriter.prototype.writeUnsignedVarint64_=function(a,b){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeUnsignedVarint64(b))};
  6233. jspb.BinaryWriter.prototype.writeSignedVarint64_=function(a,b){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint64(b))};jspb.BinaryWriter.prototype.writeZigzagVarint32_=function(a,b){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint32(b))};jspb.BinaryWriter.prototype.writeZigzagVarint64_=function(a,b){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64(b))};
  6234. jspb.BinaryWriter.prototype.writeZigzagVarint64String_=function(a,b){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarint64String(b))};jspb.BinaryWriter.prototype.writeZigzagVarintHash64_=function(a,b){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeZigzagVarintHash64(b))};
  6235. jspb.BinaryWriter.prototype.writeInt32=function(a,b){null!=b&&(goog.asserts.assert(b>=-jspb.BinaryConstants.TWO_TO_31&&b<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(a,b))};jspb.BinaryWriter.prototype.writeInt32String=function(a,b){null!=b&&(b=parseInt(b,10),goog.asserts.assert(b>=-jspb.BinaryConstants.TWO_TO_31&&b<jspb.BinaryConstants.TWO_TO_31),this.writeSignedVarint32_(a,b))};
  6236. jspb.BinaryWriter.prototype.writeInt64=function(a,b){null!=b&&(goog.asserts.assert(b>=-jspb.BinaryConstants.TWO_TO_63&&b<jspb.BinaryConstants.TWO_TO_63),this.writeSignedVarint64_(a,b))};jspb.BinaryWriter.prototype.writeInt64String=function(a,b){null!=b&&(b=jspb.arith.Int64.fromString(b),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(b.lo,b.hi))};
  6237. jspb.BinaryWriter.prototype.writeUint32=function(a,b){null!=b&&(goog.asserts.assert(0<=b&&b<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(a,b))};jspb.BinaryWriter.prototype.writeUint32String=function(a,b){null!=b&&(b=parseInt(b,10),goog.asserts.assert(0<=b&&b<jspb.BinaryConstants.TWO_TO_32),this.writeUnsignedVarint32_(a,b))};jspb.BinaryWriter.prototype.writeUint64=function(a,b){null!=b&&(goog.asserts.assert(0<=b&&b<jspb.BinaryConstants.TWO_TO_64),this.writeUnsignedVarint64_(a,b))};
  6238. jspb.BinaryWriter.prototype.writeUint64String=function(a,b){null!=b&&(b=jspb.arith.UInt64.fromString(b),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSplitVarint64(b.lo,b.hi))};jspb.BinaryWriter.prototype.writeSint32=function(a,b){null!=b&&(goog.asserts.assert(b>=-jspb.BinaryConstants.TWO_TO_31&&b<jspb.BinaryConstants.TWO_TO_31),this.writeZigzagVarint32_(a,b))};
  6239. jspb.BinaryWriter.prototype.writeSint64=function(a,b){null!=b&&(goog.asserts.assert(b>=-jspb.BinaryConstants.TWO_TO_63&&b<jspb.BinaryConstants.TWO_TO_63),this.writeZigzagVarint64_(a,b))};jspb.BinaryWriter.prototype.writeSintHash64=function(a,b){null!=b&&this.writeZigzagVarintHash64_(a,b)};jspb.BinaryWriter.prototype.writeSint64String=function(a,b){null!=b&&this.writeZigzagVarint64String_(a,b)};
  6240. jspb.BinaryWriter.prototype.writeFixed32=function(a,b){null!=b&&(goog.asserts.assert(0<=b&&b<jspb.BinaryConstants.TWO_TO_32),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeUint32(b))};jspb.BinaryWriter.prototype.writeFixed64=function(a,b){null!=b&&(goog.asserts.assert(0<=b&&b<jspb.BinaryConstants.TWO_TO_64),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeUint64(b))};
  6241. jspb.BinaryWriter.prototype.writeFixed64String=function(a,b){null!=b&&(b=jspb.arith.UInt64.fromString(b),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(b.lo,b.hi))};jspb.BinaryWriter.prototype.writeSfixed32=function(a,b){null!=b&&(goog.asserts.assert(b>=-jspb.BinaryConstants.TWO_TO_31&&b<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeInt32(b))};
  6242. jspb.BinaryWriter.prototype.writeSfixed64=function(a,b){null!=b&&(goog.asserts.assert(b>=-jspb.BinaryConstants.TWO_TO_63&&b<jspb.BinaryConstants.TWO_TO_63),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeInt64(b))};jspb.BinaryWriter.prototype.writeSfixed64String=function(a,b){null!=b&&(b=jspb.arith.Int64.fromString(b),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeSplitFixed64(b.lo,b.hi))};
  6243. jspb.BinaryWriter.prototype.writeFloat=function(a,b){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.FIXED32),this.encoder_.writeFloat(b))};jspb.BinaryWriter.prototype.writeDouble=function(a,b){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeDouble(b))};
  6244. jspb.BinaryWriter.prototype.writeBool=function(a,b){null!=b&&(goog.asserts.assert("boolean"===typeof b||"number"===typeof b),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeBool(b))};jspb.BinaryWriter.prototype.writeEnum=function(a,b){null!=b&&(goog.asserts.assert(b>=-jspb.BinaryConstants.TWO_TO_31&&b<jspb.BinaryConstants.TWO_TO_31),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(b))};
  6245. jspb.BinaryWriter.prototype.writeString=function(a,b){null!=b&&(a=this.beginDelimited_(a),this.encoder_.writeString(b),this.endDelimited_(a))};jspb.BinaryWriter.prototype.writeBytes=function(a,b){null!=b&&(b=jspb.utils.byteSourceToUint8Array(b),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(b.length),this.appendUint8Array_(b))};jspb.BinaryWriter.prototype.writeMessage=function(a,b,c){null!=b&&(a=this.beginDelimited_(a),c(b,this),this.endDelimited_(a))};
  6246. jspb.BinaryWriter.prototype.writeMessageSet=function(a,b,c){null!=b&&(this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.START_GROUP),this.writeFieldHeader_(2,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeSignedVarint32(a),a=this.beginDelimited_(3),c(b,this),this.endDelimited_(a),this.writeFieldHeader_(1,jspb.BinaryConstants.WireType.END_GROUP))};
  6247. jspb.BinaryWriter.prototype.writeGroup=function(a,b,c){null!=b&&(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.START_GROUP),c(b,this),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.END_GROUP))};jspb.BinaryWriter.prototype.writeFixedHash64=function(a,b){null!=b&&(goog.asserts.assert(8==b.length),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.FIXED64),this.encoder_.writeFixedHash64(b))};
  6248. jspb.BinaryWriter.prototype.writeVarintHash64=function(a,b){null!=b&&(goog.asserts.assert(8==b.length),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT),this.encoder_.writeVarintHash64(b))};jspb.BinaryWriter.prototype.writeSplitFixed64=function(a,b,c){this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.FIXED64);this.encoder_.writeSplitFixed64(b,c)};
  6249. jspb.BinaryWriter.prototype.writeSplitVarint64=function(a,b,c){this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT);this.encoder_.writeSplitVarint64(b,c)};jspb.BinaryWriter.prototype.writeSplitZigzagVarint64=function(a,b,c){this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.VARINT);var d=this.encoder_;jspb.utils.toZigzag64(b,c,function(a,b){d.writeSplitVarint64(a>>>0,b>>>0)})};
  6250. jspb.BinaryWriter.prototype.writeRepeatedInt32=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeSignedVarint32_(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedInt32String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeInt32String(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedInt64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeSignedVarint64_(a,b[c])};
  6251. jspb.BinaryWriter.prototype.writeRepeatedSplitFixed64=function(a,b,c,d){if(null!=b)for(var e=0;e<b.length;e++)this.writeSplitFixed64(a,c(b[e]),d(b[e]))};jspb.BinaryWriter.prototype.writeRepeatedSplitVarint64=function(a,b,c,d){if(null!=b)for(var e=0;e<b.length;e++)this.writeSplitVarint64(a,c(b[e]),d(b[e]))};jspb.BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64=function(a,b,c,d){if(null!=b)for(var e=0;e<b.length;e++)this.writeSplitZigzagVarint64(a,c(b[e]),d(b[e]))};
  6252. jspb.BinaryWriter.prototype.writeRepeatedInt64String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeInt64String(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedUint32=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeUnsignedVarint32_(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedUint32String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeUint32String(a,b[c])};
  6253. jspb.BinaryWriter.prototype.writeRepeatedUint64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeUnsignedVarint64_(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedUint64String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeUint64String(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedSint32=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeZigzagVarint32_(a,b[c])};
  6254. jspb.BinaryWriter.prototype.writeRepeatedSint64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeZigzagVarint64_(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedSint64String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeZigzagVarint64String_(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedSintHash64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeZigzagVarintHash64_(a,b[c])};
  6255. jspb.BinaryWriter.prototype.writeRepeatedFixed32=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeFixed32(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedFixed64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeFixed64(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedFixed64String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeFixed64String(a,b[c])};
  6256. jspb.BinaryWriter.prototype.writeRepeatedSfixed32=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeSfixed32(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedSfixed64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeSfixed64(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedSfixed64String=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeSfixed64String(a,b[c])};
  6257. jspb.BinaryWriter.prototype.writeRepeatedFloat=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeFloat(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedDouble=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeDouble(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedBool=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeBool(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedEnum=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeEnum(a,b[c])};
  6258. jspb.BinaryWriter.prototype.writeRepeatedString=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeString(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedBytes=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeBytes(a,b[c])};jspb.BinaryWriter.prototype.writeRepeatedMessage=function(a,b,c){if(null!=b)for(var d=0;d<b.length;d++){var e=this.beginDelimited_(a);c(b[d],this);this.endDelimited_(e)}};
  6259. jspb.BinaryWriter.prototype.writeRepeatedGroup=function(a,b,c){if(null!=b)for(var d=0;d<b.length;d++)this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.START_GROUP),c(b[d],this),this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.END_GROUP)};jspb.BinaryWriter.prototype.writeRepeatedFixedHash64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeFixedHash64(a,b[c])};
  6260. jspb.BinaryWriter.prototype.writeRepeatedVarintHash64=function(a,b){if(null!=b)for(var c=0;c<b.length;c++)this.writeVarintHash64(a,b[c])};jspb.BinaryWriter.prototype.writePackedInt32=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeSignedVarint32(b[c]);this.endDelimited_(a)}};
  6261. jspb.BinaryWriter.prototype.writePackedInt32String=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeSignedVarint32(parseInt(b[c],10));this.endDelimited_(a)}};jspb.BinaryWriter.prototype.writePackedInt64=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeSignedVarint64(b[c]);this.endDelimited_(a)}};
  6262. jspb.BinaryWriter.prototype.writePackedSplitFixed64=function(a,b,c,d){if(null!=b){a=this.beginDelimited_(a);for(var e=0;e<b.length;e++)this.encoder_.writeSplitFixed64(c(b[e]),d(b[e]));this.endDelimited_(a)}};jspb.BinaryWriter.prototype.writePackedSplitVarint64=function(a,b,c,d){if(null!=b){a=this.beginDelimited_(a);for(var e=0;e<b.length;e++)this.encoder_.writeSplitVarint64(c(b[e]),d(b[e]));this.endDelimited_(a)}};
  6263. jspb.BinaryWriter.prototype.writePackedSplitZigzagVarint64=function(a,b,c,d){if(null!=b){a=this.beginDelimited_(a);for(var e=this.encoder_,f=0;f<b.length;f++)jspb.utils.toZigzag64(c(b[f]),d(b[f]),function(a,b){e.writeSplitVarint64(a>>>0,b>>>0)});this.endDelimited_(a)}};jspb.BinaryWriter.prototype.writePackedInt64String=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++){var d=jspb.arith.Int64.fromString(b[c]);this.encoder_.writeSplitVarint64(d.lo,d.hi)}this.endDelimited_(a)}};
  6264. jspb.BinaryWriter.prototype.writePackedUint32=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeUnsignedVarint32(b[c]);this.endDelimited_(a)}};jspb.BinaryWriter.prototype.writePackedUint32String=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeUnsignedVarint32(parseInt(b[c],10));this.endDelimited_(a)}};
  6265. jspb.BinaryWriter.prototype.writePackedUint64=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeUnsignedVarint64(b[c]);this.endDelimited_(a)}};jspb.BinaryWriter.prototype.writePackedUint64String=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++){var d=jspb.arith.UInt64.fromString(b[c]);this.encoder_.writeSplitVarint64(d.lo,d.hi)}this.endDelimited_(a)}};
  6266. jspb.BinaryWriter.prototype.writePackedSint32=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeZigzagVarint32(b[c]);this.endDelimited_(a)}};jspb.BinaryWriter.prototype.writePackedSint64=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeZigzagVarint64(b[c]);this.endDelimited_(a)}};
  6267. jspb.BinaryWriter.prototype.writePackedSint64String=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeZigzagVarintHash64(jspb.utils.decimalStringToHash64(b[c]));this.endDelimited_(a)}};jspb.BinaryWriter.prototype.writePackedSintHash64=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeZigzagVarintHash64(b[c]);this.endDelimited_(a)}};
  6268. jspb.BinaryWriter.prototype.writePackedFixed32=function(a,b){if(null!=b&&b.length)for(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*b.length),a=0;a<b.length;a++)this.encoder_.writeUint32(b[a])};jspb.BinaryWriter.prototype.writePackedFixed64=function(a,b){if(null!=b&&b.length)for(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*b.length),a=0;a<b.length;a++)this.encoder_.writeUint64(b[a])};
  6269. jspb.BinaryWriter.prototype.writePackedFixed64String=function(a,b){if(null!=b&&b.length)for(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*b.length),a=0;a<b.length;a++){var c=jspb.arith.UInt64.fromString(b[a]);this.encoder_.writeSplitFixed64(c.lo,c.hi)}};
  6270. jspb.BinaryWriter.prototype.writePackedSfixed32=function(a,b){if(null!=b&&b.length)for(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*b.length),a=0;a<b.length;a++)this.encoder_.writeInt32(b[a])};jspb.BinaryWriter.prototype.writePackedSfixed64=function(a,b){if(null!=b&&b.length)for(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*b.length),a=0;a<b.length;a++)this.encoder_.writeInt64(b[a])};
  6271. jspb.BinaryWriter.prototype.writePackedSfixed64String=function(a,b){if(null!=b&&b.length)for(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*b.length),a=0;a<b.length;a++)this.encoder_.writeInt64String(b[a])};jspb.BinaryWriter.prototype.writePackedFloat=function(a,b){if(null!=b&&b.length)for(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(4*b.length),a=0;a<b.length;a++)this.encoder_.writeFloat(b[a])};
  6272. jspb.BinaryWriter.prototype.writePackedDouble=function(a,b){if(null!=b&&b.length)for(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*b.length),a=0;a<b.length;a++)this.encoder_.writeDouble(b[a])};jspb.BinaryWriter.prototype.writePackedBool=function(a,b){if(null!=b&&b.length)for(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(b.length),a=0;a<b.length;a++)this.encoder_.writeBool(b[a])};
  6273. jspb.BinaryWriter.prototype.writePackedEnum=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeEnum(b[c]);this.endDelimited_(a)}};jspb.BinaryWriter.prototype.writePackedFixedHash64=function(a,b){if(null!=b&&b.length)for(this.writeFieldHeader_(a,jspb.BinaryConstants.WireType.DELIMITED),this.encoder_.writeUnsignedVarint32(8*b.length),a=0;a<b.length;a++)this.encoder_.writeFixedHash64(b[a])};
  6274. jspb.BinaryWriter.prototype.writePackedVarintHash64=function(a,b){if(null!=b&&b.length){a=this.beginDelimited_(a);for(var c=0;c<b.length;c++)this.encoder_.writeVarintHash64(b[c]);this.endDelimited_(a)}};jspb.Map=function(a,b){this.arr_=a;this.valueCtor_=b;this.map_={};this.arrClean=!0;0<this.arr_.length&&this.loadFromArray_()};jspb.Map.prototype.loadFromArray_=function(){for(var a=0;a<this.arr_.length;a++){var b=this.arr_[a],c=b[0];this.map_[c.toString()]=new jspb.Map.Entry_(c,b[1])}this.arrClean=!0};
  6275. jspb.Map.prototype.toArray=function(){if(this.arrClean){if(this.valueCtor_){var a=this.map_,b;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){var c=a[b].valueWrapper;c&&c.toArray()}}}else{this.arr_.length=0;a=this.stringKeys_();a.sort();for(b=0;b<a.length;b++){var d=this.map_[a[b]];(c=d.valueWrapper)&&c.toArray();this.arr_.push([d.key,d.value])}this.arrClean=!0}return this.arr_};
  6276. jspb.Map.prototype.toObject=function(a,b){for(var c=this.toArray(),d=[],e=0;e<c.length;e++){var f=this.map_[c[e][0].toString()];this.wrapEntry_(f);var g=f.valueWrapper;g?(goog.asserts.assert(b),d.push([f.key,b(a,g)])):d.push([f.key,f.value])}return d};jspb.Map.fromObject=function(a,b,c){b=new jspb.Map([],b);for(var d=0;d<a.length;d++){var e=a[d][0],f=c(a[d][1]);b.set(e,f)}return b};jspb.Map.ArrayIteratorIterable_=function(a){this.idx_=0;this.arr_=a};
  6277. jspb.Map.ArrayIteratorIterable_.prototype.next=function(){return this.idx_<this.arr_.length?{done:!1,value:this.arr_[this.idx_++]}:{done:!0,value:void 0}};"undefined"!=typeof Symbol&&(jspb.Map.ArrayIteratorIterable_.prototype[Symbol.iterator]=function(){return this});jspb.Map.prototype.getLength=function(){return this.stringKeys_().length};jspb.Map.prototype.clear=function(){this.map_={};this.arrClean=!1};
  6278. jspb.Map.prototype.del=function(a){a=a.toString();var b=this.map_.hasOwnProperty(a);delete this.map_[a];this.arrClean=!1;return b};jspb.Map.prototype.getEntryList=function(){var a=[],b=this.stringKeys_();b.sort();for(var c=0;c<b.length;c++){var d=this.map_[b[c]];a.push([d.key,d.value])}return a};jspb.Map.prototype.entries=function(){var a=[],b=this.stringKeys_();b.sort();for(var c=0;c<b.length;c++){var d=this.map_[b[c]];a.push([d.key,this.wrapEntry_(d)])}return new jspb.Map.ArrayIteratorIterable_(a)};
  6279. jspb.Map.prototype.keys=function(){var a=[],b=this.stringKeys_();b.sort();for(var c=0;c<b.length;c++)a.push(this.map_[b[c]].key);return new jspb.Map.ArrayIteratorIterable_(a)};jspb.Map.prototype.values=function(){var a=[],b=this.stringKeys_();b.sort();for(var c=0;c<b.length;c++)a.push(this.wrapEntry_(this.map_[b[c]]));return new jspb.Map.ArrayIteratorIterable_(a)};
  6280. jspb.Map.prototype.forEach=function(a,b){var c=this.stringKeys_();c.sort();for(var d=0;d<c.length;d++){var e=this.map_[c[d]];a.call(b,this.wrapEntry_(e),e.key,this)}};jspb.Map.prototype.set=function(a,b){var c=new jspb.Map.Entry_(a);this.valueCtor_?(c.valueWrapper=b,c.value=b.toArray()):c.value=b;this.map_[a.toString()]=c;this.arrClean=!1;return this};jspb.Map.prototype.wrapEntry_=function(a){return this.valueCtor_?(a.valueWrapper||(a.valueWrapper=new this.valueCtor_(a.value)),a.valueWrapper):a.value};
  6281. jspb.Map.prototype.get=function(a){if(a=this.map_[a.toString()])return this.wrapEntry_(a)};jspb.Map.prototype.has=function(a){return a.toString()in this.map_};jspb.Map.prototype.serializeBinary=function(a,b,c,d,e){var f=this.stringKeys_();f.sort();for(var g=0;g<f.length;g++){var h=this.map_[f[g]];b.beginSubMessage(a);c.call(b,1,h.key);this.valueCtor_?d.call(b,2,this.wrapEntry_(h),e):d.call(b,2,h.value);b.endSubMessage()}};
  6282. jspb.Map.deserializeBinary=function(a,b,c,d,e,f,g){for(;b.nextField()&&!b.isEndGroup();){var h=b.getFieldNumber();1==h?f=c.call(b):2==h&&(a.valueCtor_?(goog.asserts.assert(e),g||(g=new a.valueCtor_),d.call(b,g,e)):g=d.call(b))}goog.asserts.assert(void 0!=f);goog.asserts.assert(void 0!=g);a.set(f,g)};jspb.Map.prototype.stringKeys_=function(){var a=this.map_,b=[],c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c);return b};
  6283. jspb.Map.Entry_=function(a,b){this.key=a;this.value=b;this.valueWrapper=void 0};jspb.ExtensionFieldInfo=function(a,b,c,d,e){this.fieldIndex=a;this.fieldName=b;this.ctor=c;this.toObjectFn=d;this.isRepeated=e};jspb.ExtensionFieldBinaryInfo=function(a,b,c,d,e,f){this.fieldInfo=a;this.binaryReaderFn=b;this.binaryWriterFn=c;this.binaryMessageSerializeFn=d;this.binaryMessageDeserializeFn=e;this.isPacked=f};jspb.ExtensionFieldInfo.prototype.isMessageType=function(){return!!this.ctor};jspb.Message=function(){};jspb.Message.GENERATE_TO_OBJECT=!0;jspb.Message.GENERATE_FROM_OBJECT=!goog.DISALLOW_TEST_ONLY_CODE;
  6284. jspb.Message.GENERATE_TO_STRING=!0;jspb.Message.ASSUME_LOCAL_ARRAYS=!1;jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS=!0;jspb.Message.SUPPORTS_UINT8ARRAY_="function"==typeof Uint8Array;jspb.Message.prototype.getJsPbMessageId=function(){return this.messageId_};jspb.Message.getIndex_=function(a,b){return b+a.arrayIndexOffset_};jspb.Message.hiddenES6Property_=function(){};jspb.Message.getFieldNumber_=function(a,b){return b-a.arrayIndexOffset_};
  6285. jspb.Message.initialize=function(a,b,c,d,e,f){a.wrappers_=null;b||(b=c?[c]:[]);a.messageId_=c?String(c):void 0;a.arrayIndexOffset_=0===c?-1:0;a.array=b;jspb.Message.initPivotAndExtensionObject_(a,d);a.convertedPrimitiveFields_={};jspb.Message.SERIALIZE_EMPTY_TRAILING_FIELDS||(a.repeatedFields=e);if(e)for(b=0;b<e.length;b++)c=e[b],c<a.pivot_?(c=jspb.Message.getIndex_(a,c),a.array[c]=a.array[c]||jspb.Message.EMPTY_LIST_SENTINEL_):(jspb.Message.maybeInitEmptyExtensionObject_(a),a.extensionObject_[c]=
  6286. a.extensionObject_[c]||jspb.Message.EMPTY_LIST_SENTINEL_);if(f&&f.length)for(b=0;b<f.length;b++)jspb.Message.computeOneofCase(a,f[b])};jspb.Message.EMPTY_LIST_SENTINEL_=goog.DEBUG&&Object.freeze?Object.freeze([]):[];jspb.Message.isArray_=function(a){return jspb.Message.ASSUME_LOCAL_ARRAYS?a instanceof Array:Array.isArray(a)};jspb.Message.isExtensionObject_=function(a){return null!==a&&"object"==typeof a&&!jspb.Message.isArray_(a)&&!(jspb.Message.SUPPORTS_UINT8ARRAY_&&a instanceof Uint8Array)};
  6287. jspb.Message.initPivotAndExtensionObject_=function(a,b){var c=a.array.length,d=-1;if(c&&(d=c-1,c=a.array[d],jspb.Message.isExtensionObject_(c))){a.pivot_=jspb.Message.getFieldNumber_(a,d);a.extensionObject_=c;return}-1<b?(a.pivot_=Math.max(b,jspb.Message.getFieldNumber_(a,d+1)),a.extensionObject_=null):a.pivot_=Number.MAX_VALUE};jspb.Message.maybeInitEmptyExtensionObject_=function(a){var b=jspb.Message.getIndex_(a,a.pivot_);a.array[b]||(a.extensionObject_=a.array[b]={})};
  6288. jspb.Message.toObjectList=function(a,b,c){for(var d=[],e=0;e<a.length;e++)d[e]=b.call(a[e],c,a[e]);return d};jspb.Message.toObjectExtension=function(a,b,c,d,e){for(var f in c){var g=c[f],h=d.call(a,g);if(null!=h){for(var k in g.fieldName)if(g.fieldName.hasOwnProperty(k))break;b[k]=g.toObjectFn?g.isRepeated?jspb.Message.toObjectList(h,g.toObjectFn,e):g.toObjectFn(e,h):h}}};
  6289. jspb.Message.serializeBinaryExtensions=function(a,b,c,d){for(var e in c){var f=c[e],g=f.fieldInfo;if(!f.binaryWriterFn)throw Error("Message extension present that was generated without binary serialization support");var h=d.call(a,g);if(null!=h)if(g.isMessageType())if(f.binaryMessageSerializeFn)f.binaryWriterFn.call(b,g.fieldIndex,h,f.binaryMessageSerializeFn);else throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");
  6290. else f.binaryWriterFn.call(b,g.fieldIndex,h)}};jspb.Message.readBinaryExtension=function(a,b,c,d,e){var f=c[b.getFieldNumber()];if(f){c=f.fieldInfo;if(!f.binaryReaderFn)throw Error("Deserializing extension whose generated code does not support binary format");if(c.isMessageType()){var g=new c.ctor;f.binaryReaderFn.call(b,g,f.binaryMessageDeserializeFn)}else g=f.binaryReaderFn.call(b);c.isRepeated&&!f.isPacked?(b=d.call(a,c))?b.push(g):e.call(a,c,[g]):e.call(a,c,g)}else b.skipField()};
  6291. jspb.Message.getField=function(a,b){if(b<a.pivot_){b=jspb.Message.getIndex_(a,b);var c=a.array[b];return c===jspb.Message.EMPTY_LIST_SENTINEL_?a.array[b]=[]:c}if(a.extensionObject_)return c=a.extensionObject_[b],c===jspb.Message.EMPTY_LIST_SENTINEL_?a.extensionObject_[b]=[]:c};jspb.Message.getRepeatedField=function(a,b){return jspb.Message.getField(a,b)};jspb.Message.getOptionalFloatingPointField=function(a,b){a=jspb.Message.getField(a,b);return null==a?a:+a};
  6292. jspb.Message.getBooleanField=function(a,b){a=jspb.Message.getField(a,b);return null==a?a:!!a};jspb.Message.getRepeatedFloatingPointField=function(a,b){var c=jspb.Message.getRepeatedField(a,b);a.convertedPrimitiveFields_||(a.convertedPrimitiveFields_={});if(!a.convertedPrimitiveFields_[b]){for(var d=0;d<c.length;d++)c[d]=+c[d];a.convertedPrimitiveFields_[b]=!0}return c};
  6293. jspb.Message.getRepeatedBooleanField=function(a,b){var c=jspb.Message.getRepeatedField(a,b);a.convertedPrimitiveFields_||(a.convertedPrimitiveFields_={});if(!a.convertedPrimitiveFields_[b]){for(var d=0;d<c.length;d++)c[d]=!!c[d];a.convertedPrimitiveFields_[b]=!0}return c};
  6294. jspb.Message.bytesAsB64=function(a){if(null==a||"string"===typeof a)return a;if(jspb.Message.SUPPORTS_UINT8ARRAY_&&a instanceof Uint8Array)return goog.crypt.base64.encodeByteArray(a);goog.asserts.fail("Cannot coerce to b64 string: "+goog.typeOf(a));return null};jspb.Message.bytesAsU8=function(a){if(null==a||a instanceof Uint8Array)return a;if("string"===typeof a)return goog.crypt.base64.decodeStringToUint8Array(a);goog.asserts.fail("Cannot coerce to Uint8Array: "+goog.typeOf(a));return null};
  6295. jspb.Message.bytesListAsB64=function(a){jspb.Message.assertConsistentTypes_(a);return a.length&&"string"!==typeof a[0]?goog.array.map(a,jspb.Message.bytesAsB64):a};jspb.Message.bytesListAsU8=function(a){jspb.Message.assertConsistentTypes_(a);return!a.length||a[0]instanceof Uint8Array?a:goog.array.map(a,jspb.Message.bytesAsU8)};
  6296. jspb.Message.assertConsistentTypes_=function(a){if(goog.DEBUG&&a&&1<a.length){var b=goog.typeOf(a[0]);goog.array.forEach(a,function(a){goog.typeOf(a)!=b&&goog.asserts.fail("Inconsistent type in JSPB repeated field array. Got "+goog.typeOf(a)+" expected "+b)})}};jspb.Message.getFieldWithDefault=function(a,b,c){a=jspb.Message.getField(a,b);return null==a?c:a};jspb.Message.getBooleanFieldWithDefault=function(a,b,c){a=jspb.Message.getBooleanField(a,b);return null==a?c:a};
  6297. jspb.Message.getFloatingPointFieldWithDefault=function(a,b,c){a=jspb.Message.getOptionalFloatingPointField(a,b);return null==a?c:a};jspb.Message.getFieldProto3=jspb.Message.getFieldWithDefault;jspb.Message.getMapField=function(a,b,c,d){a.wrappers_||(a.wrappers_={});if(b in a.wrappers_)return a.wrappers_[b];var e=jspb.Message.getField(a,b);if(!e){if(c)return;e=[];jspb.Message.setField(a,b,e)}return a.wrappers_[b]=new jspb.Map(e,d)};
  6298. jspb.Message.setField=function(a,b,c){goog.asserts.assertInstanceof(a,jspb.Message);b<a.pivot_?a.array[jspb.Message.getIndex_(a,b)]=c:(jspb.Message.maybeInitEmptyExtensionObject_(a),a.extensionObject_[b]=c);return a};jspb.Message.setProto3IntField=function(a,b,c){return jspb.Message.setFieldIgnoringDefault_(a,b,c,0)};jspb.Message.setProto3FloatField=function(a,b,c){return jspb.Message.setFieldIgnoringDefault_(a,b,c,0)};
  6299. jspb.Message.setProto3BooleanField=function(a,b,c){return jspb.Message.setFieldIgnoringDefault_(a,b,c,!1)};jspb.Message.setProto3StringField=function(a,b,c){return jspb.Message.setFieldIgnoringDefault_(a,b,c,"")};jspb.Message.setProto3BytesField=function(a,b,c){return jspb.Message.setFieldIgnoringDefault_(a,b,c,"")};jspb.Message.setProto3EnumField=function(a,b,c){return jspb.Message.setFieldIgnoringDefault_(a,b,c,0)};
  6300. jspb.Message.setProto3StringIntField=function(a,b,c){return jspb.Message.setFieldIgnoringDefault_(a,b,c,"0")};jspb.Message.setFieldIgnoringDefault_=function(a,b,c,d){goog.asserts.assertInstanceof(a,jspb.Message);c!==d?jspb.Message.setField(a,b,c):b<a.pivot_?a.array[jspb.Message.getIndex_(a,b)]=null:(jspb.Message.maybeInitEmptyExtensionObject_(a),delete a.extensionObject_[b]);return a};
  6301. jspb.Message.addToRepeatedField=function(a,b,c,d){goog.asserts.assertInstanceof(a,jspb.Message);b=jspb.Message.getRepeatedField(a,b);void 0!=d?b.splice(d,0,c):b.push(c);return a};jspb.Message.setOneofField=function(a,b,c,d){goog.asserts.assertInstanceof(a,jspb.Message);(c=jspb.Message.computeOneofCase(a,c))&&c!==b&&void 0!==d&&(a.wrappers_&&c in a.wrappers_&&(a.wrappers_[c]=void 0),jspb.Message.setField(a,c,void 0));return jspb.Message.setField(a,b,d)};
  6302. jspb.Message.computeOneofCase=function(a,b){for(var c,d,e=0;e<b.length;e++){var f=b[e],g=jspb.Message.getField(a,f);null!=g&&(c=f,d=g,jspb.Message.setField(a,f,void 0))}return c?(jspb.Message.setField(a,c,d),c):0};jspb.Message.getWrapperField=function(a,b,c,d){a.wrappers_||(a.wrappers_={});if(!a.wrappers_[c]){var e=jspb.Message.getField(a,c);if(d||e)a.wrappers_[c]=new b(e)}return a.wrappers_[c]};
  6303. jspb.Message.getRepeatedWrapperField=function(a,b,c){jspb.Message.wrapRepeatedField_(a,b,c);b=a.wrappers_[c];b==jspb.Message.EMPTY_LIST_SENTINEL_&&(b=a.wrappers_[c]=[]);return b};jspb.Message.wrapRepeatedField_=function(a,b,c){a.wrappers_||(a.wrappers_={});if(!a.wrappers_[c]){for(var d=jspb.Message.getRepeatedField(a,c),e=[],f=0;f<d.length;f++)e[f]=new b(d[f]);a.wrappers_[c]=e}};
  6304. jspb.Message.setWrapperField=function(a,b,c){goog.asserts.assertInstanceof(a,jspb.Message);a.wrappers_||(a.wrappers_={});var d=c?c.toArray():c;a.wrappers_[b]=c;return jspb.Message.setField(a,b,d)};jspb.Message.setOneofWrapperField=function(a,b,c,d){goog.asserts.assertInstanceof(a,jspb.Message);a.wrappers_||(a.wrappers_={});var e=d?d.toArray():d;a.wrappers_[b]=d;return jspb.Message.setOneofField(a,b,c,e)};
  6305. jspb.Message.setRepeatedWrapperField=function(a,b,c){goog.asserts.assertInstanceof(a,jspb.Message);a.wrappers_||(a.wrappers_={});c=c||[];for(var d=[],e=0;e<c.length;e++)d[e]=c[e].toArray();a.wrappers_[b]=c;return jspb.Message.setField(a,b,d)};
  6306. jspb.Message.addToRepeatedWrapperField=function(a,b,c,d,e){jspb.Message.wrapRepeatedField_(a,d,b);var f=a.wrappers_[b];f||(f=a.wrappers_[b]=[]);c=c?c:new d;a=jspb.Message.getRepeatedField(a,b);void 0!=e?(f.splice(e,0,c),a.splice(e,0,c.toArray())):(f.push(c),a.push(c.toArray()));return c};jspb.Message.toMap=function(a,b,c,d){for(var e={},f=0;f<a.length;f++)e[b.call(a[f])]=c?c.call(a[f],d,a[f]):a[f];return e};
  6307. jspb.Message.prototype.syncMapFields_=function(){if(this.wrappers_)for(var a in this.wrappers_){var b=this.wrappers_[a];if(Array.isArray(b))for(var c=0;c<b.length;c++)b[c]&&b[c].toArray();else b&&b.toArray()}};jspb.Message.prototype.toArray=function(){this.syncMapFields_();return this.array};jspb.Message.GENERATE_TO_STRING&&(jspb.Message.prototype.toString=function(){this.syncMapFields_();return this.array.toString()});
  6308. jspb.Message.prototype.getExtension=function(a){if(this.extensionObject_){this.wrappers_||(this.wrappers_={});var b=a.fieldIndex;if(a.isRepeated){if(a.isMessageType())return this.wrappers_[b]||(this.wrappers_[b]=goog.array.map(this.extensionObject_[b]||[],function(b){return new a.ctor(b)})),this.wrappers_[b]}else if(a.isMessageType())return!this.wrappers_[b]&&this.extensionObject_[b]&&(this.wrappers_[b]=new a.ctor(this.extensionObject_[b])),this.wrappers_[b];return this.extensionObject_[b]}};
  6309. jspb.Message.prototype.setExtension=function(a,b){this.wrappers_||(this.wrappers_={});jspb.Message.maybeInitEmptyExtensionObject_(this);var c=a.fieldIndex;a.isRepeated?(b=b||[],a.isMessageType()?(this.wrappers_[c]=b,this.extensionObject_[c]=goog.array.map(b,function(a){return a.toArray()})):this.extensionObject_[c]=b):a.isMessageType()?(this.wrappers_[c]=b,this.extensionObject_[c]=b?b.toArray():b):this.extensionObject_[c]=b;return this};
  6310. jspb.Message.difference=function(a,b){if(!(a instanceof b.constructor))throw Error("Messages have different types.");var c=a.toArray();b=b.toArray();var d=[],e=0,f=c.length>b.length?c.length:b.length;a.getJsPbMessageId()&&(d[0]=a.getJsPbMessageId(),e=1);for(;e<f;e++)jspb.Message.compareFields(c[e],b[e])||(d[e]=b[e]);return new a.constructor(d)};jspb.Message.equals=function(a,b){return a==b||!(!a||!b)&&a instanceof b.constructor&&jspb.Message.compareFields(a.toArray(),b.toArray())};
  6311. jspb.Message.compareExtensions=function(a,b){a=a||{};b=b||{};var c={},d;for(d in a)c[d]=0;for(d in b)c[d]=0;for(d in c)if(!jspb.Message.compareFields(a[d],b[d]))return!1;return!0};
  6312. jspb.Message.compareFields=function(a,b){if(a==b)return!0;if(!goog.isObject(a)||!goog.isObject(b))return"number"===typeof a&&isNaN(a)||"number"===typeof b&&isNaN(b)?String(a)==String(b):!1;if(a.constructor!=b.constructor)return!1;if(jspb.Message.SUPPORTS_UINT8ARRAY_&&a.constructor===Uint8Array){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}if(a.constructor===Array){var d=void 0,e=void 0,f=Math.max(a.length,b.length);for(c=0;c<f;c++){var g=a[c],h=b[c];g&&
  6313. g.constructor==Object&&(goog.asserts.assert(void 0===d),goog.asserts.assert(c===a.length-1),d=g,g=void 0);h&&h.constructor==Object&&(goog.asserts.assert(void 0===e),goog.asserts.assert(c===b.length-1),e=h,h=void 0);if(!jspb.Message.compareFields(g,h))return!1}return d||e?(d=d||{},e=e||{},jspb.Message.compareExtensions(d,e)):!0}if(a.constructor===Object)return jspb.Message.compareExtensions(a,b);throw Error("Invalid type in JSPB array");};jspb.Message.prototype.cloneMessage=function(){return jspb.Message.cloneMessage(this)};
  6314. jspb.Message.prototype.clone=function(){return jspb.Message.cloneMessage(this)};jspb.Message.clone=function(a){return jspb.Message.cloneMessage(a)};jspb.Message.cloneMessage=function(a){return new a.constructor(jspb.Message.clone_(a.toArray()))};
  6315. jspb.Message.copyInto=function(a,b){goog.asserts.assertInstanceof(a,jspb.Message);goog.asserts.assertInstanceof(b,jspb.Message);goog.asserts.assert(a.constructor==b.constructor,"Copy source and target message should have the same type.");a=jspb.Message.clone(a);for(var c=b.toArray(),d=a.toArray(),e=c.length=0;e<d.length;e++)c[e]=d[e];b.wrappers_=a.wrappers_;b.extensionObject_=a.extensionObject_};
  6316. jspb.Message.clone_=function(a){if(Array.isArray(a)){for(var b=Array(a.length),c=0;c<a.length;c++){var d=a[c];null!=d&&(b[c]="object"==typeof d?jspb.Message.clone_(goog.asserts.assert(d)):d)}return b}if(jspb.Message.SUPPORTS_UINT8ARRAY_&&a instanceof Uint8Array)return new Uint8Array(a);b={};for(c in a)d=a[c],null!=d&&(b[c]="object"==typeof d?jspb.Message.clone_(goog.asserts.assert(d)):d);return b};jspb.Message.registerMessageType=function(a,b){b.messageId=a};jspb.Message.messageSetExtensions={};
  6317. jspb.Message.messageSetExtensionsBinary={};jspb.Export={};exports.Map=jspb.Map;exports.Message=jspb.Message;exports.BinaryReader=jspb.BinaryReader;exports.BinaryWriter=jspb.BinaryWriter;exports.ExtensionFieldInfo=jspb.ExtensionFieldInfo;exports.ExtensionFieldBinaryInfo=jspb.ExtensionFieldBinaryInfo;exports.exportSymbol=goog.exportSymbol;exports.inherits=goog.inherits;exports.object={extend:goog.object.extend};exports.typeOf=goog.typeOf;
  6318. }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
  6319. },{"buffer":5}],3:[function(require,module,exports){
  6320. // simple wrapper to convert from protobuf to JSON
  6321. //
  6322. var jspb = require("google-protobuf");
  6323. var goog = jspb;
  6324. var pb = require("./gtfs-realtime_pb.js");
  6325. function pb2json(payload) {
  6326. var fm = pb.FeedMessage.deserializeBinary( new Uint8Array(payload) );
  6327. return fm.toObject();
  6328. }
  6329. module.exports = {
  6330. "pb2json" : pb2json
  6331. }
  6332. },{"./gtfs-realtime_pb.js":1,"google-protobuf":2}],4:[function(require,module,exports){
  6333. 'use strict'
  6334. exports.byteLength = byteLength
  6335. exports.toByteArray = toByteArray
  6336. exports.fromByteArray = fromByteArray
  6337. var lookup = []
  6338. var revLookup = []
  6339. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  6340. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  6341. for (var i = 0, len = code.length; i < len; ++i) {
  6342. lookup[i] = code[i]
  6343. revLookup[code.charCodeAt(i)] = i
  6344. }
  6345. // Support decoding URL-safe base64 strings, as Node.js does.
  6346. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  6347. revLookup['-'.charCodeAt(0)] = 62
  6348. revLookup['_'.charCodeAt(0)] = 63
  6349. function getLens (b64) {
  6350. var len = b64.length
  6351. if (len % 4 > 0) {
  6352. throw new Error('Invalid string. Length must be a multiple of 4')
  6353. }
  6354. // Trim off extra bytes after placeholder bytes are found
  6355. // See: https://github.com/beatgammit/base64-js/issues/42
  6356. var validLen = b64.indexOf('=')
  6357. if (validLen === -1) validLen = len
  6358. var placeHoldersLen = validLen === len
  6359. ? 0
  6360. : 4 - (validLen % 4)
  6361. return [validLen, placeHoldersLen]
  6362. }
  6363. // base64 is 4/3 + up to two characters of the original data
  6364. function byteLength (b64) {
  6365. var lens = getLens(b64)
  6366. var validLen = lens[0]
  6367. var placeHoldersLen = lens[1]
  6368. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  6369. }
  6370. function _byteLength (b64, validLen, placeHoldersLen) {
  6371. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  6372. }
  6373. function toByteArray (b64) {
  6374. var tmp
  6375. var lens = getLens(b64)
  6376. var validLen = lens[0]
  6377. var placeHoldersLen = lens[1]
  6378. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  6379. var curByte = 0
  6380. // if there are placeholders, only get up to the last complete 4 chars
  6381. var len = placeHoldersLen > 0
  6382. ? validLen - 4
  6383. : validLen
  6384. var i
  6385. for (i = 0; i < len; i += 4) {
  6386. tmp =
  6387. (revLookup[b64.charCodeAt(i)] << 18) |
  6388. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  6389. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  6390. revLookup[b64.charCodeAt(i + 3)]
  6391. arr[curByte++] = (tmp >> 16) & 0xFF
  6392. arr[curByte++] = (tmp >> 8) & 0xFF
  6393. arr[curByte++] = tmp & 0xFF
  6394. }
  6395. if (placeHoldersLen === 2) {
  6396. tmp =
  6397. (revLookup[b64.charCodeAt(i)] << 2) |
  6398. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  6399. arr[curByte++] = tmp & 0xFF
  6400. }
  6401. if (placeHoldersLen === 1) {
  6402. tmp =
  6403. (revLookup[b64.charCodeAt(i)] << 10) |
  6404. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  6405. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  6406. arr[curByte++] = (tmp >> 8) & 0xFF
  6407. arr[curByte++] = tmp & 0xFF
  6408. }
  6409. return arr
  6410. }
  6411. function tripletToBase64 (num) {
  6412. return lookup[num >> 18 & 0x3F] +
  6413. lookup[num >> 12 & 0x3F] +
  6414. lookup[num >> 6 & 0x3F] +
  6415. lookup[num & 0x3F]
  6416. }
  6417. function encodeChunk (uint8, start, end) {
  6418. var tmp
  6419. var output = []
  6420. for (var i = start; i < end; i += 3) {
  6421. tmp =
  6422. ((uint8[i] << 16) & 0xFF0000) +
  6423. ((uint8[i + 1] << 8) & 0xFF00) +
  6424. (uint8[i + 2] & 0xFF)
  6425. output.push(tripletToBase64(tmp))
  6426. }
  6427. return output.join('')
  6428. }
  6429. function fromByteArray (uint8) {
  6430. var tmp
  6431. var len = uint8.length
  6432. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  6433. var parts = []
  6434. var maxChunkLength = 16383 // must be multiple of 3
  6435. // go through the array every three bytes, we'll deal with trailing stuff later
  6436. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  6437. parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
  6438. }
  6439. // pad the end with zeros, but make sure to not forget the extra bytes
  6440. if (extraBytes === 1) {
  6441. tmp = uint8[len - 1]
  6442. parts.push(
  6443. lookup[tmp >> 2] +
  6444. lookup[(tmp << 4) & 0x3F] +
  6445. '=='
  6446. )
  6447. } else if (extraBytes === 2) {
  6448. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  6449. parts.push(
  6450. lookup[tmp >> 10] +
  6451. lookup[(tmp >> 4) & 0x3F] +
  6452. lookup[(tmp << 2) & 0x3F] +
  6453. '='
  6454. )
  6455. }
  6456. return parts.join('')
  6457. }
  6458. },{}],5:[function(require,module,exports){
  6459. (function (Buffer){(function (){
  6460. /*!
  6461. * The buffer module from node.js, for the browser.
  6462. *
  6463. * @author Feross Aboukhadijeh <https://feross.org>
  6464. * @license MIT
  6465. */
  6466. /* eslint-disable no-proto */
  6467. 'use strict'
  6468. var base64 = require('base64-js')
  6469. var ieee754 = require('ieee754')
  6470. exports.Buffer = Buffer
  6471. exports.SlowBuffer = SlowBuffer
  6472. exports.INSPECT_MAX_BYTES = 50
  6473. var K_MAX_LENGTH = 0x7fffffff
  6474. exports.kMaxLength = K_MAX_LENGTH
  6475. /**
  6476. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  6477. * === true Use Uint8Array implementation (fastest)
  6478. * === false Print warning and recommend using `buffer` v4.x which has an Object
  6479. * implementation (most compatible, even IE6)
  6480. *
  6481. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  6482. * Opera 11.6+, iOS 4.2+.
  6483. *
  6484. * We report that the browser does not support typed arrays if the are not subclassable
  6485. * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
  6486. * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
  6487. * for __proto__ and has a buggy typed array implementation.
  6488. */
  6489. Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
  6490. if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&
  6491. typeof console.error === 'function') {
  6492. console.error(
  6493. 'This browser lacks typed array (Uint8Array) support which is required by ' +
  6494. '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'
  6495. )
  6496. }
  6497. function typedArraySupport () {
  6498. // Can typed array instances can be augmented?
  6499. try {
  6500. var arr = new Uint8Array(1)
  6501. arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }
  6502. return arr.foo() === 42
  6503. } catch (e) {
  6504. return false
  6505. }
  6506. }
  6507. Object.defineProperty(Buffer.prototype, 'parent', {
  6508. enumerable: true,
  6509. get: function () {
  6510. if (!Buffer.isBuffer(this)) return undefined
  6511. return this.buffer
  6512. }
  6513. })
  6514. Object.defineProperty(Buffer.prototype, 'offset', {
  6515. enumerable: true,
  6516. get: function () {
  6517. if (!Buffer.isBuffer(this)) return undefined
  6518. return this.byteOffset
  6519. }
  6520. })
  6521. function createBuffer (length) {
  6522. if (length > K_MAX_LENGTH) {
  6523. throw new RangeError('The value "' + length + '" is invalid for option "size"')
  6524. }
  6525. // Return an augmented `Uint8Array` instance
  6526. var buf = new Uint8Array(length)
  6527. buf.__proto__ = Buffer.prototype
  6528. return buf
  6529. }
  6530. /**
  6531. * The Buffer constructor returns instances of `Uint8Array` that have their
  6532. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  6533. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  6534. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  6535. * returns a single octet.
  6536. *
  6537. * The `Uint8Array` prototype remains unmodified.
  6538. */
  6539. function Buffer (arg, encodingOrOffset, length) {
  6540. // Common case.
  6541. if (typeof arg === 'number') {
  6542. if (typeof encodingOrOffset === 'string') {
  6543. throw new TypeError(
  6544. 'The "string" argument must be of type string. Received type number'
  6545. )
  6546. }
  6547. return allocUnsafe(arg)
  6548. }
  6549. return from(arg, encodingOrOffset, length)
  6550. }
  6551. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  6552. if (typeof Symbol !== 'undefined' && Symbol.species != null &&
  6553. Buffer[Symbol.species] === Buffer) {
  6554. Object.defineProperty(Buffer, Symbol.species, {
  6555. value: null,
  6556. configurable: true,
  6557. enumerable: false,
  6558. writable: false
  6559. })
  6560. }
  6561. Buffer.poolSize = 8192 // not used by this implementation
  6562. function from (value, encodingOrOffset, length) {
  6563. if (typeof value === 'string') {
  6564. return fromString(value, encodingOrOffset)
  6565. }
  6566. if (ArrayBuffer.isView(value)) {
  6567. return fromArrayLike(value)
  6568. }
  6569. if (value == null) {
  6570. throw TypeError(
  6571. 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
  6572. 'or Array-like Object. Received type ' + (typeof value)
  6573. )
  6574. }
  6575. if (isInstance(value, ArrayBuffer) ||
  6576. (value && isInstance(value.buffer, ArrayBuffer))) {
  6577. return fromArrayBuffer(value, encodingOrOffset, length)
  6578. }
  6579. if (typeof value === 'number') {
  6580. throw new TypeError(
  6581. 'The "value" argument must not be of type number. Received type number'
  6582. )
  6583. }
  6584. var valueOf = value.valueOf && value.valueOf()
  6585. if (valueOf != null && valueOf !== value) {
  6586. return Buffer.from(valueOf, encodingOrOffset, length)
  6587. }
  6588. var b = fromObject(value)
  6589. if (b) return b
  6590. if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&
  6591. typeof value[Symbol.toPrimitive] === 'function') {
  6592. return Buffer.from(
  6593. value[Symbol.toPrimitive]('string'), encodingOrOffset, length
  6594. )
  6595. }
  6596. throw new TypeError(
  6597. 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
  6598. 'or Array-like Object. Received type ' + (typeof value)
  6599. )
  6600. }
  6601. /**
  6602. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  6603. * if value is a number.
  6604. * Buffer.from(str[, encoding])
  6605. * Buffer.from(array)
  6606. * Buffer.from(buffer)
  6607. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  6608. **/
  6609. Buffer.from = function (value, encodingOrOffset, length) {
  6610. return from(value, encodingOrOffset, length)
  6611. }
  6612. // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
  6613. // https://github.com/feross/buffer/pull/148
  6614. Buffer.prototype.__proto__ = Uint8Array.prototype
  6615. Buffer.__proto__ = Uint8Array
  6616. function assertSize (size) {
  6617. if (typeof size !== 'number') {
  6618. throw new TypeError('"size" argument must be of type number')
  6619. } else if (size < 0) {
  6620. throw new RangeError('The value "' + size + '" is invalid for option "size"')
  6621. }
  6622. }
  6623. function alloc (size, fill, encoding) {
  6624. assertSize(size)
  6625. if (size <= 0) {
  6626. return createBuffer(size)
  6627. }
  6628. if (fill !== undefined) {
  6629. // Only pay attention to encoding if it's a string. This
  6630. // prevents accidentally sending in a number that would
  6631. // be interpretted as a start offset.
  6632. return typeof encoding === 'string'
  6633. ? createBuffer(size).fill(fill, encoding)
  6634. : createBuffer(size).fill(fill)
  6635. }
  6636. return createBuffer(size)
  6637. }
  6638. /**
  6639. * Creates a new filled Buffer instance.
  6640. * alloc(size[, fill[, encoding]])
  6641. **/
  6642. Buffer.alloc = function (size, fill, encoding) {
  6643. return alloc(size, fill, encoding)
  6644. }
  6645. function allocUnsafe (size) {
  6646. assertSize(size)
  6647. return createBuffer(size < 0 ? 0 : checked(size) | 0)
  6648. }
  6649. /**
  6650. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  6651. * */
  6652. Buffer.allocUnsafe = function (size) {
  6653. return allocUnsafe(size)
  6654. }
  6655. /**
  6656. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  6657. */
  6658. Buffer.allocUnsafeSlow = function (size) {
  6659. return allocUnsafe(size)
  6660. }
  6661. function fromString (string, encoding) {
  6662. if (typeof encoding !== 'string' || encoding === '') {
  6663. encoding = 'utf8'
  6664. }
  6665. if (!Buffer.isEncoding(encoding)) {
  6666. throw new TypeError('Unknown encoding: ' + encoding)
  6667. }
  6668. var length = byteLength(string, encoding) | 0
  6669. var buf = createBuffer(length)
  6670. var actual = buf.write(string, encoding)
  6671. if (actual !== length) {
  6672. // Writing a hex string, for example, that contains invalid characters will
  6673. // cause everything after the first invalid character to be ignored. (e.g.
  6674. // 'abxxcd' will be treated as 'ab')
  6675. buf = buf.slice(0, actual)
  6676. }
  6677. return buf
  6678. }
  6679. function fromArrayLike (array) {
  6680. var length = array.length < 0 ? 0 : checked(array.length) | 0
  6681. var buf = createBuffer(length)
  6682. for (var i = 0; i < length; i += 1) {
  6683. buf[i] = array[i] & 255
  6684. }
  6685. return buf
  6686. }
  6687. function fromArrayBuffer (array, byteOffset, length) {
  6688. if (byteOffset < 0 || array.byteLength < byteOffset) {
  6689. throw new RangeError('"offset" is outside of buffer bounds')
  6690. }
  6691. if (array.byteLength < byteOffset + (length || 0)) {
  6692. throw new RangeError('"length" is outside of buffer bounds')
  6693. }
  6694. var buf
  6695. if (byteOffset === undefined && length === undefined) {
  6696. buf = new Uint8Array(array)
  6697. } else if (length === undefined) {
  6698. buf = new Uint8Array(array, byteOffset)
  6699. } else {
  6700. buf = new Uint8Array(array, byteOffset, length)
  6701. }
  6702. // Return an augmented `Uint8Array` instance
  6703. buf.__proto__ = Buffer.prototype
  6704. return buf
  6705. }
  6706. function fromObject (obj) {
  6707. if (Buffer.isBuffer(obj)) {
  6708. var len = checked(obj.length) | 0
  6709. var buf = createBuffer(len)
  6710. if (buf.length === 0) {
  6711. return buf
  6712. }
  6713. obj.copy(buf, 0, 0, len)
  6714. return buf
  6715. }
  6716. if (obj.length !== undefined) {
  6717. if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
  6718. return createBuffer(0)
  6719. }
  6720. return fromArrayLike(obj)
  6721. }
  6722. if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
  6723. return fromArrayLike(obj.data)
  6724. }
  6725. }
  6726. function checked (length) {
  6727. // Note: cannot use `length < K_MAX_LENGTH` here because that fails when
  6728. // length is NaN (which is otherwise coerced to zero.)
  6729. if (length >= K_MAX_LENGTH) {
  6730. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  6731. 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')
  6732. }
  6733. return length | 0
  6734. }
  6735. function SlowBuffer (length) {
  6736. if (+length != length) { // eslint-disable-line eqeqeq
  6737. length = 0
  6738. }
  6739. return Buffer.alloc(+length)
  6740. }
  6741. Buffer.isBuffer = function isBuffer (b) {
  6742. return b != null && b._isBuffer === true &&
  6743. b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false
  6744. }
  6745. Buffer.compare = function compare (a, b) {
  6746. if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)
  6747. if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)
  6748. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  6749. throw new TypeError(
  6750. 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
  6751. )
  6752. }
  6753. if (a === b) return 0
  6754. var x = a.length
  6755. var y = b.length
  6756. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  6757. if (a[i] !== b[i]) {
  6758. x = a[i]
  6759. y = b[i]
  6760. break
  6761. }
  6762. }
  6763. if (x < y) return -1
  6764. if (y < x) return 1
  6765. return 0
  6766. }
  6767. Buffer.isEncoding = function isEncoding (encoding) {
  6768. switch (String(encoding).toLowerCase()) {
  6769. case 'hex':
  6770. case 'utf8':
  6771. case 'utf-8':
  6772. case 'ascii':
  6773. case 'latin1':
  6774. case 'binary':
  6775. case 'base64':
  6776. case 'ucs2':
  6777. case 'ucs-2':
  6778. case 'utf16le':
  6779. case 'utf-16le':
  6780. return true
  6781. default:
  6782. return false
  6783. }
  6784. }
  6785. Buffer.concat = function concat (list, length) {
  6786. if (!Array.isArray(list)) {
  6787. throw new TypeError('"list" argument must be an Array of Buffers')
  6788. }
  6789. if (list.length === 0) {
  6790. return Buffer.alloc(0)
  6791. }
  6792. var i
  6793. if (length === undefined) {
  6794. length = 0
  6795. for (i = 0; i < list.length; ++i) {
  6796. length += list[i].length
  6797. }
  6798. }
  6799. var buffer = Buffer.allocUnsafe(length)
  6800. var pos = 0
  6801. for (i = 0; i < list.length; ++i) {
  6802. var buf = list[i]
  6803. if (isInstance(buf, Uint8Array)) {
  6804. buf = Buffer.from(buf)
  6805. }
  6806. if (!Buffer.isBuffer(buf)) {
  6807. throw new TypeError('"list" argument must be an Array of Buffers')
  6808. }
  6809. buf.copy(buffer, pos)
  6810. pos += buf.length
  6811. }
  6812. return buffer
  6813. }
  6814. function byteLength (string, encoding) {
  6815. if (Buffer.isBuffer(string)) {
  6816. return string.length
  6817. }
  6818. if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
  6819. return string.byteLength
  6820. }
  6821. if (typeof string !== 'string') {
  6822. throw new TypeError(
  6823. 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' +
  6824. 'Received type ' + typeof string
  6825. )
  6826. }
  6827. var len = string.length
  6828. var mustMatch = (arguments.length > 2 && arguments[2] === true)
  6829. if (!mustMatch && len === 0) return 0
  6830. // Use a for loop to avoid recursion
  6831. var loweredCase = false
  6832. for (;;) {
  6833. switch (encoding) {
  6834. case 'ascii':
  6835. case 'latin1':
  6836. case 'binary':
  6837. return len
  6838. case 'utf8':
  6839. case 'utf-8':
  6840. return utf8ToBytes(string).length
  6841. case 'ucs2':
  6842. case 'ucs-2':
  6843. case 'utf16le':
  6844. case 'utf-16le':
  6845. return len * 2
  6846. case 'hex':
  6847. return len >>> 1
  6848. case 'base64':
  6849. return base64ToBytes(string).length
  6850. default:
  6851. if (loweredCase) {
  6852. return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8
  6853. }
  6854. encoding = ('' + encoding).toLowerCase()
  6855. loweredCase = true
  6856. }
  6857. }
  6858. }
  6859. Buffer.byteLength = byteLength
  6860. function slowToString (encoding, start, end) {
  6861. var loweredCase = false
  6862. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  6863. // property of a typed array.
  6864. // This behaves neither like String nor Uint8Array in that we set start/end
  6865. // to their upper/lower bounds if the value passed is out of range.
  6866. // undefined is handled specially as per ECMA-262 6th Edition,
  6867. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  6868. if (start === undefined || start < 0) {
  6869. start = 0
  6870. }
  6871. // Return early if start > this.length. Done here to prevent potential uint32
  6872. // coercion fail below.
  6873. if (start > this.length) {
  6874. return ''
  6875. }
  6876. if (end === undefined || end > this.length) {
  6877. end = this.length
  6878. }
  6879. if (end <= 0) {
  6880. return ''
  6881. }
  6882. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  6883. end >>>= 0
  6884. start >>>= 0
  6885. if (end <= start) {
  6886. return ''
  6887. }
  6888. if (!encoding) encoding = 'utf8'
  6889. while (true) {
  6890. switch (encoding) {
  6891. case 'hex':
  6892. return hexSlice(this, start, end)
  6893. case 'utf8':
  6894. case 'utf-8':
  6895. return utf8Slice(this, start, end)
  6896. case 'ascii':
  6897. return asciiSlice(this, start, end)
  6898. case 'latin1':
  6899. case 'binary':
  6900. return latin1Slice(this, start, end)
  6901. case 'base64':
  6902. return base64Slice(this, start, end)
  6903. case 'ucs2':
  6904. case 'ucs-2':
  6905. case 'utf16le':
  6906. case 'utf-16le':
  6907. return utf16leSlice(this, start, end)
  6908. default:
  6909. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  6910. encoding = (encoding + '').toLowerCase()
  6911. loweredCase = true
  6912. }
  6913. }
  6914. }
  6915. // This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
  6916. // to detect a Buffer instance. It's not possible to use `instanceof Buffer`
  6917. // reliably in a browserify context because there could be multiple different
  6918. // copies of the 'buffer' package in use. This method works even for Buffer
  6919. // instances that were created from another copy of the `buffer` package.
  6920. // See: https://github.com/feross/buffer/issues/154
  6921. Buffer.prototype._isBuffer = true
  6922. function swap (b, n, m) {
  6923. var i = b[n]
  6924. b[n] = b[m]
  6925. b[m] = i
  6926. }
  6927. Buffer.prototype.swap16 = function swap16 () {
  6928. var len = this.length
  6929. if (len % 2 !== 0) {
  6930. throw new RangeError('Buffer size must be a multiple of 16-bits')
  6931. }
  6932. for (var i = 0; i < len; i += 2) {
  6933. swap(this, i, i + 1)
  6934. }
  6935. return this
  6936. }
  6937. Buffer.prototype.swap32 = function swap32 () {
  6938. var len = this.length
  6939. if (len % 4 !== 0) {
  6940. throw new RangeError('Buffer size must be a multiple of 32-bits')
  6941. }
  6942. for (var i = 0; i < len; i += 4) {
  6943. swap(this, i, i + 3)
  6944. swap(this, i + 1, i + 2)
  6945. }
  6946. return this
  6947. }
  6948. Buffer.prototype.swap64 = function swap64 () {
  6949. var len = this.length
  6950. if (len % 8 !== 0) {
  6951. throw new RangeError('Buffer size must be a multiple of 64-bits')
  6952. }
  6953. for (var i = 0; i < len; i += 8) {
  6954. swap(this, i, i + 7)
  6955. swap(this, i + 1, i + 6)
  6956. swap(this, i + 2, i + 5)
  6957. swap(this, i + 3, i + 4)
  6958. }
  6959. return this
  6960. }
  6961. Buffer.prototype.toString = function toString () {
  6962. var length = this.length
  6963. if (length === 0) return ''
  6964. if (arguments.length === 0) return utf8Slice(this, 0, length)
  6965. return slowToString.apply(this, arguments)
  6966. }
  6967. Buffer.prototype.toLocaleString = Buffer.prototype.toString
  6968. Buffer.prototype.equals = function equals (b) {
  6969. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  6970. if (this === b) return true
  6971. return Buffer.compare(this, b) === 0
  6972. }
  6973. Buffer.prototype.inspect = function inspect () {
  6974. var str = ''
  6975. var max = exports.INSPECT_MAX_BYTES
  6976. str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()
  6977. if (this.length > max) str += ' ... '
  6978. return '<Buffer ' + str + '>'
  6979. }
  6980. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  6981. if (isInstance(target, Uint8Array)) {
  6982. target = Buffer.from(target, target.offset, target.byteLength)
  6983. }
  6984. if (!Buffer.isBuffer(target)) {
  6985. throw new TypeError(
  6986. 'The "target" argument must be one of type Buffer or Uint8Array. ' +
  6987. 'Received type ' + (typeof target)
  6988. )
  6989. }
  6990. if (start === undefined) {
  6991. start = 0
  6992. }
  6993. if (end === undefined) {
  6994. end = target ? target.length : 0
  6995. }
  6996. if (thisStart === undefined) {
  6997. thisStart = 0
  6998. }
  6999. if (thisEnd === undefined) {
  7000. thisEnd = this.length
  7001. }
  7002. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  7003. throw new RangeError('out of range index')
  7004. }
  7005. if (thisStart >= thisEnd && start >= end) {
  7006. return 0
  7007. }
  7008. if (thisStart >= thisEnd) {
  7009. return -1
  7010. }
  7011. if (start >= end) {
  7012. return 1
  7013. }
  7014. start >>>= 0
  7015. end >>>= 0
  7016. thisStart >>>= 0
  7017. thisEnd >>>= 0
  7018. if (this === target) return 0
  7019. var x = thisEnd - thisStart
  7020. var y = end - start
  7021. var len = Math.min(x, y)
  7022. var thisCopy = this.slice(thisStart, thisEnd)
  7023. var targetCopy = target.slice(start, end)
  7024. for (var i = 0; i < len; ++i) {
  7025. if (thisCopy[i] !== targetCopy[i]) {
  7026. x = thisCopy[i]
  7027. y = targetCopy[i]
  7028. break
  7029. }
  7030. }
  7031. if (x < y) return -1
  7032. if (y < x) return 1
  7033. return 0
  7034. }
  7035. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  7036. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  7037. //
  7038. // Arguments:
  7039. // - buffer - a Buffer to search
  7040. // - val - a string, Buffer, or number
  7041. // - byteOffset - an index into `buffer`; will be clamped to an int32
  7042. // - encoding - an optional encoding, relevant is val is a string
  7043. // - dir - true for indexOf, false for lastIndexOf
  7044. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  7045. // Empty buffer means no match
  7046. if (buffer.length === 0) return -1
  7047. // Normalize byteOffset
  7048. if (typeof byteOffset === 'string') {
  7049. encoding = byteOffset
  7050. byteOffset = 0
  7051. } else if (byteOffset > 0x7fffffff) {
  7052. byteOffset = 0x7fffffff
  7053. } else if (byteOffset < -0x80000000) {
  7054. byteOffset = -0x80000000
  7055. }
  7056. byteOffset = +byteOffset // Coerce to Number.
  7057. if (numberIsNaN(byteOffset)) {
  7058. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  7059. byteOffset = dir ? 0 : (buffer.length - 1)
  7060. }
  7061. // Normalize byteOffset: negative offsets start from the end of the buffer
  7062. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  7063. if (byteOffset >= buffer.length) {
  7064. if (dir) return -1
  7065. else byteOffset = buffer.length - 1
  7066. } else if (byteOffset < 0) {
  7067. if (dir) byteOffset = 0
  7068. else return -1
  7069. }
  7070. // Normalize val
  7071. if (typeof val === 'string') {
  7072. val = Buffer.from(val, encoding)
  7073. }
  7074. // Finally, search either indexOf (if dir is true) or lastIndexOf
  7075. if (Buffer.isBuffer(val)) {
  7076. // Special case: looking for empty string/buffer always fails
  7077. if (val.length === 0) {
  7078. return -1
  7079. }
  7080. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  7081. } else if (typeof val === 'number') {
  7082. val = val & 0xFF // Search for a byte value [0-255]
  7083. if (typeof Uint8Array.prototype.indexOf === 'function') {
  7084. if (dir) {
  7085. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  7086. } else {
  7087. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  7088. }
  7089. }
  7090. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  7091. }
  7092. throw new TypeError('val must be string, number or Buffer')
  7093. }
  7094. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  7095. var indexSize = 1
  7096. var arrLength = arr.length
  7097. var valLength = val.length
  7098. if (encoding !== undefined) {
  7099. encoding = String(encoding).toLowerCase()
  7100. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  7101. encoding === 'utf16le' || encoding === 'utf-16le') {
  7102. if (arr.length < 2 || val.length < 2) {
  7103. return -1
  7104. }
  7105. indexSize = 2
  7106. arrLength /= 2
  7107. valLength /= 2
  7108. byteOffset /= 2
  7109. }
  7110. }
  7111. function read (buf, i) {
  7112. if (indexSize === 1) {
  7113. return buf[i]
  7114. } else {
  7115. return buf.readUInt16BE(i * indexSize)
  7116. }
  7117. }
  7118. var i
  7119. if (dir) {
  7120. var foundIndex = -1
  7121. for (i = byteOffset; i < arrLength; i++) {
  7122. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  7123. if (foundIndex === -1) foundIndex = i
  7124. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  7125. } else {
  7126. if (foundIndex !== -1) i -= i - foundIndex
  7127. foundIndex = -1
  7128. }
  7129. }
  7130. } else {
  7131. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  7132. for (i = byteOffset; i >= 0; i--) {
  7133. var found = true
  7134. for (var j = 0; j < valLength; j++) {
  7135. if (read(arr, i + j) !== read(val, j)) {
  7136. found = false
  7137. break
  7138. }
  7139. }
  7140. if (found) return i
  7141. }
  7142. }
  7143. return -1
  7144. }
  7145. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  7146. return this.indexOf(val, byteOffset, encoding) !== -1
  7147. }
  7148. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  7149. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  7150. }
  7151. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  7152. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  7153. }
  7154. function hexWrite (buf, string, offset, length) {
  7155. offset = Number(offset) || 0
  7156. var remaining = buf.length - offset
  7157. if (!length) {
  7158. length = remaining
  7159. } else {
  7160. length = Number(length)
  7161. if (length > remaining) {
  7162. length = remaining
  7163. }
  7164. }
  7165. var strLen = string.length
  7166. if (length > strLen / 2) {
  7167. length = strLen / 2
  7168. }
  7169. for (var i = 0; i < length; ++i) {
  7170. var parsed = parseInt(string.substr(i * 2, 2), 16)
  7171. if (numberIsNaN(parsed)) return i
  7172. buf[offset + i] = parsed
  7173. }
  7174. return i
  7175. }
  7176. function utf8Write (buf, string, offset, length) {
  7177. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  7178. }
  7179. function asciiWrite (buf, string, offset, length) {
  7180. return blitBuffer(asciiToBytes(string), buf, offset, length)
  7181. }
  7182. function latin1Write (buf, string, offset, length) {
  7183. return asciiWrite(buf, string, offset, length)
  7184. }
  7185. function base64Write (buf, string, offset, length) {
  7186. return blitBuffer(base64ToBytes(string), buf, offset, length)
  7187. }
  7188. function ucs2Write (buf, string, offset, length) {
  7189. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  7190. }
  7191. Buffer.prototype.write = function write (string, offset, length, encoding) {
  7192. // Buffer#write(string)
  7193. if (offset === undefined) {
  7194. encoding = 'utf8'
  7195. length = this.length
  7196. offset = 0
  7197. // Buffer#write(string, encoding)
  7198. } else if (length === undefined && typeof offset === 'string') {
  7199. encoding = offset
  7200. length = this.length
  7201. offset = 0
  7202. // Buffer#write(string, offset[, length][, encoding])
  7203. } else if (isFinite(offset)) {
  7204. offset = offset >>> 0
  7205. if (isFinite(length)) {
  7206. length = length >>> 0
  7207. if (encoding === undefined) encoding = 'utf8'
  7208. } else {
  7209. encoding = length
  7210. length = undefined
  7211. }
  7212. } else {
  7213. throw new Error(
  7214. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  7215. )
  7216. }
  7217. var remaining = this.length - offset
  7218. if (length === undefined || length > remaining) length = remaining
  7219. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  7220. throw new RangeError('Attempt to write outside buffer bounds')
  7221. }
  7222. if (!encoding) encoding = 'utf8'
  7223. var loweredCase = false
  7224. for (;;) {
  7225. switch (encoding) {
  7226. case 'hex':
  7227. return hexWrite(this, string, offset, length)
  7228. case 'utf8':
  7229. case 'utf-8':
  7230. return utf8Write(this, string, offset, length)
  7231. case 'ascii':
  7232. return asciiWrite(this, string, offset, length)
  7233. case 'latin1':
  7234. case 'binary':
  7235. return latin1Write(this, string, offset, length)
  7236. case 'base64':
  7237. // Warning: maxLength not taken into account in base64Write
  7238. return base64Write(this, string, offset, length)
  7239. case 'ucs2':
  7240. case 'ucs-2':
  7241. case 'utf16le':
  7242. case 'utf-16le':
  7243. return ucs2Write(this, string, offset, length)
  7244. default:
  7245. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  7246. encoding = ('' + encoding).toLowerCase()
  7247. loweredCase = true
  7248. }
  7249. }
  7250. }
  7251. Buffer.prototype.toJSON = function toJSON () {
  7252. return {
  7253. type: 'Buffer',
  7254. data: Array.prototype.slice.call(this._arr || this, 0)
  7255. }
  7256. }
  7257. function base64Slice (buf, start, end) {
  7258. if (start === 0 && end === buf.length) {
  7259. return base64.fromByteArray(buf)
  7260. } else {
  7261. return base64.fromByteArray(buf.slice(start, end))
  7262. }
  7263. }
  7264. function utf8Slice (buf, start, end) {
  7265. end = Math.min(buf.length, end)
  7266. var res = []
  7267. var i = start
  7268. while (i < end) {
  7269. var firstByte = buf[i]
  7270. var codePoint = null
  7271. var bytesPerSequence = (firstByte > 0xEF) ? 4
  7272. : (firstByte > 0xDF) ? 3
  7273. : (firstByte > 0xBF) ? 2
  7274. : 1
  7275. if (i + bytesPerSequence <= end) {
  7276. var secondByte, thirdByte, fourthByte, tempCodePoint
  7277. switch (bytesPerSequence) {
  7278. case 1:
  7279. if (firstByte < 0x80) {
  7280. codePoint = firstByte
  7281. }
  7282. break
  7283. case 2:
  7284. secondByte = buf[i + 1]
  7285. if ((secondByte & 0xC0) === 0x80) {
  7286. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  7287. if (tempCodePoint > 0x7F) {
  7288. codePoint = tempCodePoint
  7289. }
  7290. }
  7291. break
  7292. case 3:
  7293. secondByte = buf[i + 1]
  7294. thirdByte = buf[i + 2]
  7295. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  7296. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  7297. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  7298. codePoint = tempCodePoint
  7299. }
  7300. }
  7301. break
  7302. case 4:
  7303. secondByte = buf[i + 1]
  7304. thirdByte = buf[i + 2]
  7305. fourthByte = buf[i + 3]
  7306. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  7307. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  7308. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  7309. codePoint = tempCodePoint
  7310. }
  7311. }
  7312. }
  7313. }
  7314. if (codePoint === null) {
  7315. // we did not generate a valid codePoint so insert a
  7316. // replacement char (U+FFFD) and advance only 1 byte
  7317. codePoint = 0xFFFD
  7318. bytesPerSequence = 1
  7319. } else if (codePoint > 0xFFFF) {
  7320. // encode to utf16 (surrogate pair dance)
  7321. codePoint -= 0x10000
  7322. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  7323. codePoint = 0xDC00 | codePoint & 0x3FF
  7324. }
  7325. res.push(codePoint)
  7326. i += bytesPerSequence
  7327. }
  7328. return decodeCodePointsArray(res)
  7329. }
  7330. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  7331. // the lowest limit is Chrome, with 0x10000 args.
  7332. // We go 1 magnitude less, for safety
  7333. var MAX_ARGUMENTS_LENGTH = 0x1000
  7334. function decodeCodePointsArray (codePoints) {
  7335. var len = codePoints.length
  7336. if (len <= MAX_ARGUMENTS_LENGTH) {
  7337. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  7338. }
  7339. // Decode in chunks to avoid "call stack size exceeded".
  7340. var res = ''
  7341. var i = 0
  7342. while (i < len) {
  7343. res += String.fromCharCode.apply(
  7344. String,
  7345. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  7346. )
  7347. }
  7348. return res
  7349. }
  7350. function asciiSlice (buf, start, end) {
  7351. var ret = ''
  7352. end = Math.min(buf.length, end)
  7353. for (var i = start; i < end; ++i) {
  7354. ret += String.fromCharCode(buf[i] & 0x7F)
  7355. }
  7356. return ret
  7357. }
  7358. function latin1Slice (buf, start, end) {
  7359. var ret = ''
  7360. end = Math.min(buf.length, end)
  7361. for (var i = start; i < end; ++i) {
  7362. ret += String.fromCharCode(buf[i])
  7363. }
  7364. return ret
  7365. }
  7366. function hexSlice (buf, start, end) {
  7367. var len = buf.length
  7368. if (!start || start < 0) start = 0
  7369. if (!end || end < 0 || end > len) end = len
  7370. var out = ''
  7371. for (var i = start; i < end; ++i) {
  7372. out += toHex(buf[i])
  7373. }
  7374. return out
  7375. }
  7376. function utf16leSlice (buf, start, end) {
  7377. var bytes = buf.slice(start, end)
  7378. var res = ''
  7379. for (var i = 0; i < bytes.length; i += 2) {
  7380. res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))
  7381. }
  7382. return res
  7383. }
  7384. Buffer.prototype.slice = function slice (start, end) {
  7385. var len = this.length
  7386. start = ~~start
  7387. end = end === undefined ? len : ~~end
  7388. if (start < 0) {
  7389. start += len
  7390. if (start < 0) start = 0
  7391. } else if (start > len) {
  7392. start = len
  7393. }
  7394. if (end < 0) {
  7395. end += len
  7396. if (end < 0) end = 0
  7397. } else if (end > len) {
  7398. end = len
  7399. }
  7400. if (end < start) end = start
  7401. var newBuf = this.subarray(start, end)
  7402. // Return an augmented `Uint8Array` instance
  7403. newBuf.__proto__ = Buffer.prototype
  7404. return newBuf
  7405. }
  7406. /*
  7407. * Need to make sure that buffer isn't trying to write out of bounds.
  7408. */
  7409. function checkOffset (offset, ext, length) {
  7410. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  7411. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  7412. }
  7413. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  7414. offset = offset >>> 0
  7415. byteLength = byteLength >>> 0
  7416. if (!noAssert) checkOffset(offset, byteLength, this.length)
  7417. var val = this[offset]
  7418. var mul = 1
  7419. var i = 0
  7420. while (++i < byteLength && (mul *= 0x100)) {
  7421. val += this[offset + i] * mul
  7422. }
  7423. return val
  7424. }
  7425. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  7426. offset = offset >>> 0
  7427. byteLength = byteLength >>> 0
  7428. if (!noAssert) {
  7429. checkOffset(offset, byteLength, this.length)
  7430. }
  7431. var val = this[offset + --byteLength]
  7432. var mul = 1
  7433. while (byteLength > 0 && (mul *= 0x100)) {
  7434. val += this[offset + --byteLength] * mul
  7435. }
  7436. return val
  7437. }
  7438. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  7439. offset = offset >>> 0
  7440. if (!noAssert) checkOffset(offset, 1, this.length)
  7441. return this[offset]
  7442. }
  7443. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  7444. offset = offset >>> 0
  7445. if (!noAssert) checkOffset(offset, 2, this.length)
  7446. return this[offset] | (this[offset + 1] << 8)
  7447. }
  7448. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  7449. offset = offset >>> 0
  7450. if (!noAssert) checkOffset(offset, 2, this.length)
  7451. return (this[offset] << 8) | this[offset + 1]
  7452. }
  7453. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  7454. offset = offset >>> 0
  7455. if (!noAssert) checkOffset(offset, 4, this.length)
  7456. return ((this[offset]) |
  7457. (this[offset + 1] << 8) |
  7458. (this[offset + 2] << 16)) +
  7459. (this[offset + 3] * 0x1000000)
  7460. }
  7461. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  7462. offset = offset >>> 0
  7463. if (!noAssert) checkOffset(offset, 4, this.length)
  7464. return (this[offset] * 0x1000000) +
  7465. ((this[offset + 1] << 16) |
  7466. (this[offset + 2] << 8) |
  7467. this[offset + 3])
  7468. }
  7469. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  7470. offset = offset >>> 0
  7471. byteLength = byteLength >>> 0
  7472. if (!noAssert) checkOffset(offset, byteLength, this.length)
  7473. var val = this[offset]
  7474. var mul = 1
  7475. var i = 0
  7476. while (++i < byteLength && (mul *= 0x100)) {
  7477. val += this[offset + i] * mul
  7478. }
  7479. mul *= 0x80
  7480. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  7481. return val
  7482. }
  7483. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  7484. offset = offset >>> 0
  7485. byteLength = byteLength >>> 0
  7486. if (!noAssert) checkOffset(offset, byteLength, this.length)
  7487. var i = byteLength
  7488. var mul = 1
  7489. var val = this[offset + --i]
  7490. while (i > 0 && (mul *= 0x100)) {
  7491. val += this[offset + --i] * mul
  7492. }
  7493. mul *= 0x80
  7494. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  7495. return val
  7496. }
  7497. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  7498. offset = offset >>> 0
  7499. if (!noAssert) checkOffset(offset, 1, this.length)
  7500. if (!(this[offset] & 0x80)) return (this[offset])
  7501. return ((0xff - this[offset] + 1) * -1)
  7502. }
  7503. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  7504. offset = offset >>> 0
  7505. if (!noAssert) checkOffset(offset, 2, this.length)
  7506. var val = this[offset] | (this[offset + 1] << 8)
  7507. return (val & 0x8000) ? val | 0xFFFF0000 : val
  7508. }
  7509. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  7510. offset = offset >>> 0
  7511. if (!noAssert) checkOffset(offset, 2, this.length)
  7512. var val = this[offset + 1] | (this[offset] << 8)
  7513. return (val & 0x8000) ? val | 0xFFFF0000 : val
  7514. }
  7515. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  7516. offset = offset >>> 0
  7517. if (!noAssert) checkOffset(offset, 4, this.length)
  7518. return (this[offset]) |
  7519. (this[offset + 1] << 8) |
  7520. (this[offset + 2] << 16) |
  7521. (this[offset + 3] << 24)
  7522. }
  7523. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  7524. offset = offset >>> 0
  7525. if (!noAssert) checkOffset(offset, 4, this.length)
  7526. return (this[offset] << 24) |
  7527. (this[offset + 1] << 16) |
  7528. (this[offset + 2] << 8) |
  7529. (this[offset + 3])
  7530. }
  7531. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  7532. offset = offset >>> 0
  7533. if (!noAssert) checkOffset(offset, 4, this.length)
  7534. return ieee754.read(this, offset, true, 23, 4)
  7535. }
  7536. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  7537. offset = offset >>> 0
  7538. if (!noAssert) checkOffset(offset, 4, this.length)
  7539. return ieee754.read(this, offset, false, 23, 4)
  7540. }
  7541. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  7542. offset = offset >>> 0
  7543. if (!noAssert) checkOffset(offset, 8, this.length)
  7544. return ieee754.read(this, offset, true, 52, 8)
  7545. }
  7546. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  7547. offset = offset >>> 0
  7548. if (!noAssert) checkOffset(offset, 8, this.length)
  7549. return ieee754.read(this, offset, false, 52, 8)
  7550. }
  7551. function checkInt (buf, value, offset, ext, max, min) {
  7552. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  7553. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  7554. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  7555. }
  7556. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  7557. value = +value
  7558. offset = offset >>> 0
  7559. byteLength = byteLength >>> 0
  7560. if (!noAssert) {
  7561. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  7562. checkInt(this, value, offset, byteLength, maxBytes, 0)
  7563. }
  7564. var mul = 1
  7565. var i = 0
  7566. this[offset] = value & 0xFF
  7567. while (++i < byteLength && (mul *= 0x100)) {
  7568. this[offset + i] = (value / mul) & 0xFF
  7569. }
  7570. return offset + byteLength
  7571. }
  7572. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  7573. value = +value
  7574. offset = offset >>> 0
  7575. byteLength = byteLength >>> 0
  7576. if (!noAssert) {
  7577. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  7578. checkInt(this, value, offset, byteLength, maxBytes, 0)
  7579. }
  7580. var i = byteLength - 1
  7581. var mul = 1
  7582. this[offset + i] = value & 0xFF
  7583. while (--i >= 0 && (mul *= 0x100)) {
  7584. this[offset + i] = (value / mul) & 0xFF
  7585. }
  7586. return offset + byteLength
  7587. }
  7588. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  7589. value = +value
  7590. offset = offset >>> 0
  7591. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  7592. this[offset] = (value & 0xff)
  7593. return offset + 1
  7594. }
  7595. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  7596. value = +value
  7597. offset = offset >>> 0
  7598. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  7599. this[offset] = (value & 0xff)
  7600. this[offset + 1] = (value >>> 8)
  7601. return offset + 2
  7602. }
  7603. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  7604. value = +value
  7605. offset = offset >>> 0
  7606. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  7607. this[offset] = (value >>> 8)
  7608. this[offset + 1] = (value & 0xff)
  7609. return offset + 2
  7610. }
  7611. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  7612. value = +value
  7613. offset = offset >>> 0
  7614. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  7615. this[offset + 3] = (value >>> 24)
  7616. this[offset + 2] = (value >>> 16)
  7617. this[offset + 1] = (value >>> 8)
  7618. this[offset] = (value & 0xff)
  7619. return offset + 4
  7620. }
  7621. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  7622. value = +value
  7623. offset = offset >>> 0
  7624. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  7625. this[offset] = (value >>> 24)
  7626. this[offset + 1] = (value >>> 16)
  7627. this[offset + 2] = (value >>> 8)
  7628. this[offset + 3] = (value & 0xff)
  7629. return offset + 4
  7630. }
  7631. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  7632. value = +value
  7633. offset = offset >>> 0
  7634. if (!noAssert) {
  7635. var limit = Math.pow(2, (8 * byteLength) - 1)
  7636. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  7637. }
  7638. var i = 0
  7639. var mul = 1
  7640. var sub = 0
  7641. this[offset] = value & 0xFF
  7642. while (++i < byteLength && (mul *= 0x100)) {
  7643. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  7644. sub = 1
  7645. }
  7646. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  7647. }
  7648. return offset + byteLength
  7649. }
  7650. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  7651. value = +value
  7652. offset = offset >>> 0
  7653. if (!noAssert) {
  7654. var limit = Math.pow(2, (8 * byteLength) - 1)
  7655. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  7656. }
  7657. var i = byteLength - 1
  7658. var mul = 1
  7659. var sub = 0
  7660. this[offset + i] = value & 0xFF
  7661. while (--i >= 0 && (mul *= 0x100)) {
  7662. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  7663. sub = 1
  7664. }
  7665. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  7666. }
  7667. return offset + byteLength
  7668. }
  7669. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  7670. value = +value
  7671. offset = offset >>> 0
  7672. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  7673. if (value < 0) value = 0xff + value + 1
  7674. this[offset] = (value & 0xff)
  7675. return offset + 1
  7676. }
  7677. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  7678. value = +value
  7679. offset = offset >>> 0
  7680. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  7681. this[offset] = (value & 0xff)
  7682. this[offset + 1] = (value >>> 8)
  7683. return offset + 2
  7684. }
  7685. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  7686. value = +value
  7687. offset = offset >>> 0
  7688. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  7689. this[offset] = (value >>> 8)
  7690. this[offset + 1] = (value & 0xff)
  7691. return offset + 2
  7692. }
  7693. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  7694. value = +value
  7695. offset = offset >>> 0
  7696. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  7697. this[offset] = (value & 0xff)
  7698. this[offset + 1] = (value >>> 8)
  7699. this[offset + 2] = (value >>> 16)
  7700. this[offset + 3] = (value >>> 24)
  7701. return offset + 4
  7702. }
  7703. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  7704. value = +value
  7705. offset = offset >>> 0
  7706. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  7707. if (value < 0) value = 0xffffffff + value + 1
  7708. this[offset] = (value >>> 24)
  7709. this[offset + 1] = (value >>> 16)
  7710. this[offset + 2] = (value >>> 8)
  7711. this[offset + 3] = (value & 0xff)
  7712. return offset + 4
  7713. }
  7714. function checkIEEE754 (buf, value, offset, ext, max, min) {
  7715. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  7716. if (offset < 0) throw new RangeError('Index out of range')
  7717. }
  7718. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  7719. value = +value
  7720. offset = offset >>> 0
  7721. if (!noAssert) {
  7722. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  7723. }
  7724. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  7725. return offset + 4
  7726. }
  7727. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  7728. return writeFloat(this, value, offset, true, noAssert)
  7729. }
  7730. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  7731. return writeFloat(this, value, offset, false, noAssert)
  7732. }
  7733. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  7734. value = +value
  7735. offset = offset >>> 0
  7736. if (!noAssert) {
  7737. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  7738. }
  7739. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  7740. return offset + 8
  7741. }
  7742. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  7743. return writeDouble(this, value, offset, true, noAssert)
  7744. }
  7745. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  7746. return writeDouble(this, value, offset, false, noAssert)
  7747. }
  7748. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  7749. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  7750. if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')
  7751. if (!start) start = 0
  7752. if (!end && end !== 0) end = this.length
  7753. if (targetStart >= target.length) targetStart = target.length
  7754. if (!targetStart) targetStart = 0
  7755. if (end > 0 && end < start) end = start
  7756. // Copy 0 bytes; we're done
  7757. if (end === start) return 0
  7758. if (target.length === 0 || this.length === 0) return 0
  7759. // Fatal error conditions
  7760. if (targetStart < 0) {
  7761. throw new RangeError('targetStart out of bounds')
  7762. }
  7763. if (start < 0 || start >= this.length) throw new RangeError('Index out of range')
  7764. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  7765. // Are we oob?
  7766. if (end > this.length) end = this.length
  7767. if (target.length - targetStart < end - start) {
  7768. end = target.length - targetStart + start
  7769. }
  7770. var len = end - start
  7771. if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
  7772. // Use built-in when available, missing from IE11
  7773. this.copyWithin(targetStart, start, end)
  7774. } else if (this === target && start < targetStart && targetStart < end) {
  7775. // descending copy from end
  7776. for (var i = len - 1; i >= 0; --i) {
  7777. target[i + targetStart] = this[i + start]
  7778. }
  7779. } else {
  7780. Uint8Array.prototype.set.call(
  7781. target,
  7782. this.subarray(start, end),
  7783. targetStart
  7784. )
  7785. }
  7786. return len
  7787. }
  7788. // Usage:
  7789. // buffer.fill(number[, offset[, end]])
  7790. // buffer.fill(buffer[, offset[, end]])
  7791. // buffer.fill(string[, offset[, end]][, encoding])
  7792. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  7793. // Handle string cases:
  7794. if (typeof val === 'string') {
  7795. if (typeof start === 'string') {
  7796. encoding = start
  7797. start = 0
  7798. end = this.length
  7799. } else if (typeof end === 'string') {
  7800. encoding = end
  7801. end = this.length
  7802. }
  7803. if (encoding !== undefined && typeof encoding !== 'string') {
  7804. throw new TypeError('encoding must be a string')
  7805. }
  7806. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  7807. throw new TypeError('Unknown encoding: ' + encoding)
  7808. }
  7809. if (val.length === 1) {
  7810. var code = val.charCodeAt(0)
  7811. if ((encoding === 'utf8' && code < 128) ||
  7812. encoding === 'latin1') {
  7813. // Fast path: If `val` fits into a single byte, use that numeric value.
  7814. val = code
  7815. }
  7816. }
  7817. } else if (typeof val === 'number') {
  7818. val = val & 255
  7819. }
  7820. // Invalid ranges are not set to a default, so can range check early.
  7821. if (start < 0 || this.length < start || this.length < end) {
  7822. throw new RangeError('Out of range index')
  7823. }
  7824. if (end <= start) {
  7825. return this
  7826. }
  7827. start = start >>> 0
  7828. end = end === undefined ? this.length : end >>> 0
  7829. if (!val) val = 0
  7830. var i
  7831. if (typeof val === 'number') {
  7832. for (i = start; i < end; ++i) {
  7833. this[i] = val
  7834. }
  7835. } else {
  7836. var bytes = Buffer.isBuffer(val)
  7837. ? val
  7838. : Buffer.from(val, encoding)
  7839. var len = bytes.length
  7840. if (len === 0) {
  7841. throw new TypeError('The value "' + val +
  7842. '" is invalid for argument "value"')
  7843. }
  7844. for (i = 0; i < end - start; ++i) {
  7845. this[i + start] = bytes[i % len]
  7846. }
  7847. }
  7848. return this
  7849. }
  7850. // HELPER FUNCTIONS
  7851. // ================
  7852. var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g
  7853. function base64clean (str) {
  7854. // Node takes equal signs as end of the Base64 encoding
  7855. str = str.split('=')[0]
  7856. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  7857. str = str.trim().replace(INVALID_BASE64_RE, '')
  7858. // Node converts strings with length < 2 to ''
  7859. if (str.length < 2) return ''
  7860. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  7861. while (str.length % 4 !== 0) {
  7862. str = str + '='
  7863. }
  7864. return str
  7865. }
  7866. function toHex (n) {
  7867. if (n < 16) return '0' + n.toString(16)
  7868. return n.toString(16)
  7869. }
  7870. function utf8ToBytes (string, units) {
  7871. units = units || Infinity
  7872. var codePoint
  7873. var length = string.length
  7874. var leadSurrogate = null
  7875. var bytes = []
  7876. for (var i = 0; i < length; ++i) {
  7877. codePoint = string.charCodeAt(i)
  7878. // is surrogate component
  7879. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  7880. // last char was a lead
  7881. if (!leadSurrogate) {
  7882. // no lead yet
  7883. if (codePoint > 0xDBFF) {
  7884. // unexpected trail
  7885. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  7886. continue
  7887. } else if (i + 1 === length) {
  7888. // unpaired lead
  7889. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  7890. continue
  7891. }
  7892. // valid lead
  7893. leadSurrogate = codePoint
  7894. continue
  7895. }
  7896. // 2 leads in a row
  7897. if (codePoint < 0xDC00) {
  7898. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  7899. leadSurrogate = codePoint
  7900. continue
  7901. }
  7902. // valid surrogate pair
  7903. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  7904. } else if (leadSurrogate) {
  7905. // valid bmp char, but last char was a lead
  7906. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  7907. }
  7908. leadSurrogate = null
  7909. // encode utf8
  7910. if (codePoint < 0x80) {
  7911. if ((units -= 1) < 0) break
  7912. bytes.push(codePoint)
  7913. } else if (codePoint < 0x800) {
  7914. if ((units -= 2) < 0) break
  7915. bytes.push(
  7916. codePoint >> 0x6 | 0xC0,
  7917. codePoint & 0x3F | 0x80
  7918. )
  7919. } else if (codePoint < 0x10000) {
  7920. if ((units -= 3) < 0) break
  7921. bytes.push(
  7922. codePoint >> 0xC | 0xE0,
  7923. codePoint >> 0x6 & 0x3F | 0x80,
  7924. codePoint & 0x3F | 0x80
  7925. )
  7926. } else if (codePoint < 0x110000) {
  7927. if ((units -= 4) < 0) break
  7928. bytes.push(
  7929. codePoint >> 0x12 | 0xF0,
  7930. codePoint >> 0xC & 0x3F | 0x80,
  7931. codePoint >> 0x6 & 0x3F | 0x80,
  7932. codePoint & 0x3F | 0x80
  7933. )
  7934. } else {
  7935. throw new Error('Invalid code point')
  7936. }
  7937. }
  7938. return bytes
  7939. }
  7940. function asciiToBytes (str) {
  7941. var byteArray = []
  7942. for (var i = 0; i < str.length; ++i) {
  7943. // Node's code seems to be doing this and not & 0x7F..
  7944. byteArray.push(str.charCodeAt(i) & 0xFF)
  7945. }
  7946. return byteArray
  7947. }
  7948. function utf16leToBytes (str, units) {
  7949. var c, hi, lo
  7950. var byteArray = []
  7951. for (var i = 0; i < str.length; ++i) {
  7952. if ((units -= 2) < 0) break
  7953. c = str.charCodeAt(i)
  7954. hi = c >> 8
  7955. lo = c % 256
  7956. byteArray.push(lo)
  7957. byteArray.push(hi)
  7958. }
  7959. return byteArray
  7960. }
  7961. function base64ToBytes (str) {
  7962. return base64.toByteArray(base64clean(str))
  7963. }
  7964. function blitBuffer (src, dst, offset, length) {
  7965. for (var i = 0; i < length; ++i) {
  7966. if ((i + offset >= dst.length) || (i >= src.length)) break
  7967. dst[i + offset] = src[i]
  7968. }
  7969. return i
  7970. }
  7971. // ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
  7972. // the `instanceof` check but they should be treated as of that type.
  7973. // See: https://github.com/feross/buffer/issues/166
  7974. function isInstance (obj, type) {
  7975. return obj instanceof type ||
  7976. (obj != null && obj.constructor != null && obj.constructor.name != null &&
  7977. obj.constructor.name === type.name)
  7978. }
  7979. function numberIsNaN (obj) {
  7980. // For IE11 support
  7981. return obj !== obj // eslint-disable-line no-self-compare
  7982. }
  7983. }).call(this)}).call(this,require("buffer").Buffer)
  7984. },{"base64-js":4,"buffer":5,"ieee754":6}],6:[function(require,module,exports){
  7985. /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
  7986. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  7987. var e, m
  7988. var eLen = (nBytes * 8) - mLen - 1
  7989. var eMax = (1 << eLen) - 1
  7990. var eBias = eMax >> 1
  7991. var nBits = -7
  7992. var i = isLE ? (nBytes - 1) : 0
  7993. var d = isLE ? -1 : 1
  7994. var s = buffer[offset + i]
  7995. i += d
  7996. e = s & ((1 << (-nBits)) - 1)
  7997. s >>= (-nBits)
  7998. nBits += eLen
  7999. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  8000. m = e & ((1 << (-nBits)) - 1)
  8001. e >>= (-nBits)
  8002. nBits += mLen
  8003. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  8004. if (e === 0) {
  8005. e = 1 - eBias
  8006. } else if (e === eMax) {
  8007. return m ? NaN : ((s ? -1 : 1) * Infinity)
  8008. } else {
  8009. m = m + Math.pow(2, mLen)
  8010. e = e - eBias
  8011. }
  8012. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  8013. }
  8014. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  8015. var e, m, c
  8016. var eLen = (nBytes * 8) - mLen - 1
  8017. var eMax = (1 << eLen) - 1
  8018. var eBias = eMax >> 1
  8019. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  8020. var i = isLE ? 0 : (nBytes - 1)
  8021. var d = isLE ? 1 : -1
  8022. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  8023. value = Math.abs(value)
  8024. if (isNaN(value) || value === Infinity) {
  8025. m = isNaN(value) ? 1 : 0
  8026. e = eMax
  8027. } else {
  8028. e = Math.floor(Math.log(value) / Math.LN2)
  8029. if (value * (c = Math.pow(2, -e)) < 1) {
  8030. e--
  8031. c *= 2
  8032. }
  8033. if (e + eBias >= 1) {
  8034. value += rt / c
  8035. } else {
  8036. value += rt * Math.pow(2, 1 - eBias)
  8037. }
  8038. if (value * c >= 2) {
  8039. e++
  8040. c /= 2
  8041. }
  8042. if (e + eBias >= eMax) {
  8043. m = 0
  8044. e = eMax
  8045. } else if (e + eBias >= 1) {
  8046. m = ((value * c) - 1) * Math.pow(2, mLen)
  8047. e = e + eBias
  8048. } else {
  8049. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  8050. e = 0
  8051. }
  8052. }
  8053. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  8054. e = (e << mLen) | m
  8055. eLen += mLen
  8056. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  8057. buffer[offset + i - d] |= s * 128
  8058. }
  8059. },{}]},{},[3])(3)
  8060. });