ReactFabric-prod.js 252 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @noflow
  8. * @nolint
  9. * @providesModule ReactFabric-prod
  10. * @preventMunge
  11. * @generated
  12. */
  13. "use strict";
  14. require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore");
  15. var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"),
  16. React = require("react"),
  17. Scheduler = require("scheduler");
  18. function getParent(inst) {
  19. do inst = inst.return;
  20. while (inst && 5 !== inst.tag);
  21. return inst ? inst : null;
  22. }
  23. function traverseTwoPhase(inst, fn, arg) {
  24. for (var path = []; inst; ) path.push(inst), (inst = getParent(inst));
  25. for (inst = path.length; 0 < inst--; ) fn(path[inst], "captured", arg);
  26. for (inst = 0; inst < path.length; inst++) fn(path[inst], "bubbled", arg);
  27. }
  28. function invokeGuardedCallbackImpl(name, func, context, a, b, c, d, e, f) {
  29. var funcArgs = Array.prototype.slice.call(arguments, 3);
  30. try {
  31. func.apply(context, funcArgs);
  32. } catch (error) {
  33. this.onError(error);
  34. }
  35. }
  36. var hasError = !1,
  37. caughtError = null,
  38. hasRethrowError = !1,
  39. rethrowError = null,
  40. reporter = {
  41. onError: function(error) {
  42. hasError = !0;
  43. caughtError = error;
  44. }
  45. };
  46. function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
  47. hasError = !1;
  48. caughtError = null;
  49. invokeGuardedCallbackImpl.apply(reporter, arguments);
  50. }
  51. function invokeGuardedCallbackAndCatchFirstError(
  52. name,
  53. func,
  54. context,
  55. a,
  56. b,
  57. c,
  58. d,
  59. e,
  60. f
  61. ) {
  62. invokeGuardedCallback.apply(this, arguments);
  63. if (hasError) {
  64. if (hasError) {
  65. var error = caughtError;
  66. hasError = !1;
  67. caughtError = null;
  68. } else
  69. throw Error(
  70. "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue."
  71. );
  72. hasRethrowError || ((hasRethrowError = !0), (rethrowError = error));
  73. }
  74. }
  75. var getFiberCurrentPropsFromNode = null,
  76. getInstanceFromNode = null,
  77. getNodeFromInstance = null;
  78. function executeDispatch(event, listener, inst) {
  79. var type = event.type || "unknown-event";
  80. event.currentTarget = getNodeFromInstance(inst);
  81. invokeGuardedCallbackAndCatchFirstError(type, listener, void 0, event);
  82. event.currentTarget = null;
  83. }
  84. function executeDirectDispatch(event) {
  85. var dispatchListener = event._dispatchListeners,
  86. dispatchInstance = event._dispatchInstances;
  87. if (Array.isArray(dispatchListener))
  88. throw Error("executeDirectDispatch(...): Invalid `event`.");
  89. event.currentTarget = dispatchListener
  90. ? getNodeFromInstance(dispatchInstance)
  91. : null;
  92. dispatchListener = dispatchListener ? dispatchListener(event) : null;
  93. event.currentTarget = null;
  94. event._dispatchListeners = null;
  95. event._dispatchInstances = null;
  96. return dispatchListener;
  97. }
  98. function getListener(inst, registrationName) {
  99. var listener = inst.stateNode;
  100. if (!listener) return null;
  101. var props = getFiberCurrentPropsFromNode(listener);
  102. if (!props) return null;
  103. listener = props[registrationName];
  104. a: switch (registrationName) {
  105. case "onClick":
  106. case "onClickCapture":
  107. case "onDoubleClick":
  108. case "onDoubleClickCapture":
  109. case "onMouseDown":
  110. case "onMouseDownCapture":
  111. case "onMouseMove":
  112. case "onMouseMoveCapture":
  113. case "onMouseUp":
  114. case "onMouseUpCapture":
  115. case "onMouseEnter":
  116. (props = !props.disabled) ||
  117. ((inst = inst.type),
  118. (props = !(
  119. "button" === inst ||
  120. "input" === inst ||
  121. "select" === inst ||
  122. "textarea" === inst
  123. )));
  124. inst = !props;
  125. break a;
  126. default:
  127. inst = !1;
  128. }
  129. if (inst) return null;
  130. if (listener && "function" !== typeof listener)
  131. throw Error(
  132. "Expected `" +
  133. registrationName +
  134. "` listener to be a function, instead got a value of `" +
  135. typeof listener +
  136. "` type."
  137. );
  138. return listener;
  139. }
  140. function accumulateInto(current, next) {
  141. if (null == next)
  142. throw Error(
  143. "accumulateInto(...): Accumulated items must not be null or undefined."
  144. );
  145. if (null == current) return next;
  146. if (Array.isArray(current)) {
  147. if (Array.isArray(next)) return current.push.apply(current, next), current;
  148. current.push(next);
  149. return current;
  150. }
  151. return Array.isArray(next) ? [current].concat(next) : [current, next];
  152. }
  153. function forEachAccumulated(arr, cb, scope) {
  154. Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
  155. }
  156. function accumulateDirectionalDispatches(inst, phase, event) {
  157. if (
  158. (phase = getListener(
  159. inst,
  160. event.dispatchConfig.phasedRegistrationNames[phase]
  161. ))
  162. )
  163. (event._dispatchListeners = accumulateInto(
  164. event._dispatchListeners,
  165. phase
  166. )),
  167. (event._dispatchInstances = accumulateInto(
  168. event._dispatchInstances,
  169. inst
  170. ));
  171. }
  172. function accumulateTwoPhaseDispatchesSingle(event) {
  173. event &&
  174. event.dispatchConfig.phasedRegistrationNames &&
  175. traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
  176. }
  177. function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
  178. if (event && event.dispatchConfig.phasedRegistrationNames) {
  179. var targetInst = event._targetInst;
  180. targetInst = targetInst ? getParent(targetInst) : null;
  181. traverseTwoPhase(targetInst, accumulateDirectionalDispatches, event);
  182. }
  183. }
  184. function accumulateDirectDispatchesSingle(event) {
  185. if (event && event.dispatchConfig.registrationName) {
  186. var inst = event._targetInst;
  187. if (inst && event && event.dispatchConfig.registrationName) {
  188. var listener = getListener(inst, event.dispatchConfig.registrationName);
  189. listener &&
  190. ((event._dispatchListeners = accumulateInto(
  191. event._dispatchListeners,
  192. listener
  193. )),
  194. (event._dispatchInstances = accumulateInto(
  195. event._dispatchInstances,
  196. inst
  197. )));
  198. }
  199. }
  200. }
  201. function functionThatReturnsTrue() {
  202. return !0;
  203. }
  204. function functionThatReturnsFalse() {
  205. return !1;
  206. }
  207. function SyntheticEvent(
  208. dispatchConfig,
  209. targetInst,
  210. nativeEvent,
  211. nativeEventTarget
  212. ) {
  213. this.dispatchConfig = dispatchConfig;
  214. this._targetInst = targetInst;
  215. this.nativeEvent = nativeEvent;
  216. dispatchConfig = this.constructor.Interface;
  217. for (var propName in dispatchConfig)
  218. dispatchConfig.hasOwnProperty(propName) &&
  219. ((targetInst = dispatchConfig[propName])
  220. ? (this[propName] = targetInst(nativeEvent))
  221. : "target" === propName
  222. ? (this.target = nativeEventTarget)
  223. : (this[propName] = nativeEvent[propName]));
  224. this.isDefaultPrevented = (null != nativeEvent.defaultPrevented
  225. ? nativeEvent.defaultPrevented
  226. : !1 === nativeEvent.returnValue)
  227. ? functionThatReturnsTrue
  228. : functionThatReturnsFalse;
  229. this.isPropagationStopped = functionThatReturnsFalse;
  230. return this;
  231. }
  232. Object.assign(SyntheticEvent.prototype, {
  233. preventDefault: function() {
  234. this.defaultPrevented = !0;
  235. var event = this.nativeEvent;
  236. event &&
  237. (event.preventDefault
  238. ? event.preventDefault()
  239. : "unknown" !== typeof event.returnValue && (event.returnValue = !1),
  240. (this.isDefaultPrevented = functionThatReturnsTrue));
  241. },
  242. stopPropagation: function() {
  243. var event = this.nativeEvent;
  244. event &&
  245. (event.stopPropagation
  246. ? event.stopPropagation()
  247. : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = !0),
  248. (this.isPropagationStopped = functionThatReturnsTrue));
  249. },
  250. persist: function() {
  251. this.isPersistent = functionThatReturnsTrue;
  252. },
  253. isPersistent: functionThatReturnsFalse,
  254. destructor: function() {
  255. var Interface = this.constructor.Interface,
  256. propName;
  257. for (propName in Interface) this[propName] = null;
  258. this.nativeEvent = this._targetInst = this.dispatchConfig = null;
  259. this.isPropagationStopped = this.isDefaultPrevented = functionThatReturnsFalse;
  260. this._dispatchInstances = this._dispatchListeners = null;
  261. }
  262. });
  263. SyntheticEvent.Interface = {
  264. type: null,
  265. target: null,
  266. currentTarget: function() {
  267. return null;
  268. },
  269. eventPhase: null,
  270. bubbles: null,
  271. cancelable: null,
  272. timeStamp: function(event) {
  273. return event.timeStamp || Date.now();
  274. },
  275. defaultPrevented: null,
  276. isTrusted: null
  277. };
  278. SyntheticEvent.extend = function(Interface) {
  279. function E() {}
  280. function Class() {
  281. return Super.apply(this, arguments);
  282. }
  283. var Super = this;
  284. E.prototype = Super.prototype;
  285. var prototype = new E();
  286. Object.assign(prototype, Class.prototype);
  287. Class.prototype = prototype;
  288. Class.prototype.constructor = Class;
  289. Class.Interface = Object.assign({}, Super.Interface, Interface);
  290. Class.extend = Super.extend;
  291. addEventPoolingTo(Class);
  292. return Class;
  293. };
  294. addEventPoolingTo(SyntheticEvent);
  295. function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
  296. if (this.eventPool.length) {
  297. var instance = this.eventPool.pop();
  298. this.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
  299. return instance;
  300. }
  301. return new this(dispatchConfig, targetInst, nativeEvent, nativeInst);
  302. }
  303. function releasePooledEvent(event) {
  304. if (!(event instanceof this))
  305. throw Error(
  306. "Trying to release an event instance into a pool of a different type."
  307. );
  308. event.destructor();
  309. 10 > this.eventPool.length && this.eventPool.push(event);
  310. }
  311. function addEventPoolingTo(EventConstructor) {
  312. EventConstructor.eventPool = [];
  313. EventConstructor.getPooled = getPooledEvent;
  314. EventConstructor.release = releasePooledEvent;
  315. }
  316. var ResponderSyntheticEvent = SyntheticEvent.extend({
  317. touchHistory: function() {
  318. return null;
  319. }
  320. });
  321. function isStartish(topLevelType) {
  322. return "topTouchStart" === topLevelType;
  323. }
  324. function isMoveish(topLevelType) {
  325. return "topTouchMove" === topLevelType;
  326. }
  327. var startDependencies = ["topTouchStart"],
  328. moveDependencies = ["topTouchMove"],
  329. endDependencies = ["topTouchCancel", "topTouchEnd"],
  330. touchBank = [],
  331. touchHistory = {
  332. touchBank: touchBank,
  333. numberActiveTouches: 0,
  334. indexOfSingleActiveTouch: -1,
  335. mostRecentTimeStamp: 0
  336. };
  337. function timestampForTouch(touch) {
  338. return touch.timeStamp || touch.timestamp;
  339. }
  340. function getTouchIdentifier(_ref) {
  341. _ref = _ref.identifier;
  342. if (null == _ref) throw Error("Touch object is missing identifier.");
  343. return _ref;
  344. }
  345. function recordTouchStart(touch) {
  346. var identifier = getTouchIdentifier(touch),
  347. touchRecord = touchBank[identifier];
  348. touchRecord
  349. ? ((touchRecord.touchActive = !0),
  350. (touchRecord.startPageX = touch.pageX),
  351. (touchRecord.startPageY = touch.pageY),
  352. (touchRecord.startTimeStamp = timestampForTouch(touch)),
  353. (touchRecord.currentPageX = touch.pageX),
  354. (touchRecord.currentPageY = touch.pageY),
  355. (touchRecord.currentTimeStamp = timestampForTouch(touch)),
  356. (touchRecord.previousPageX = touch.pageX),
  357. (touchRecord.previousPageY = touch.pageY),
  358. (touchRecord.previousTimeStamp = timestampForTouch(touch)))
  359. : ((touchRecord = {
  360. touchActive: !0,
  361. startPageX: touch.pageX,
  362. startPageY: touch.pageY,
  363. startTimeStamp: timestampForTouch(touch),
  364. currentPageX: touch.pageX,
  365. currentPageY: touch.pageY,
  366. currentTimeStamp: timestampForTouch(touch),
  367. previousPageX: touch.pageX,
  368. previousPageY: touch.pageY,
  369. previousTimeStamp: timestampForTouch(touch)
  370. }),
  371. (touchBank[identifier] = touchRecord));
  372. touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
  373. }
  374. function recordTouchMove(touch) {
  375. var touchRecord = touchBank[getTouchIdentifier(touch)];
  376. touchRecord &&
  377. ((touchRecord.touchActive = !0),
  378. (touchRecord.previousPageX = touchRecord.currentPageX),
  379. (touchRecord.previousPageY = touchRecord.currentPageY),
  380. (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),
  381. (touchRecord.currentPageX = touch.pageX),
  382. (touchRecord.currentPageY = touch.pageY),
  383. (touchRecord.currentTimeStamp = timestampForTouch(touch)),
  384. (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)));
  385. }
  386. function recordTouchEnd(touch) {
  387. var touchRecord = touchBank[getTouchIdentifier(touch)];
  388. touchRecord &&
  389. ((touchRecord.touchActive = !1),
  390. (touchRecord.previousPageX = touchRecord.currentPageX),
  391. (touchRecord.previousPageY = touchRecord.currentPageY),
  392. (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),
  393. (touchRecord.currentPageX = touch.pageX),
  394. (touchRecord.currentPageY = touch.pageY),
  395. (touchRecord.currentTimeStamp = timestampForTouch(touch)),
  396. (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)));
  397. }
  398. var ResponderTouchHistoryStore = {
  399. recordTouchTrack: function(topLevelType, nativeEvent) {
  400. if (isMoveish(topLevelType))
  401. nativeEvent.changedTouches.forEach(recordTouchMove);
  402. else if (isStartish(topLevelType))
  403. nativeEvent.changedTouches.forEach(recordTouchStart),
  404. (touchHistory.numberActiveTouches = nativeEvent.touches.length),
  405. 1 === touchHistory.numberActiveTouches &&
  406. (touchHistory.indexOfSingleActiveTouch =
  407. nativeEvent.touches[0].identifier);
  408. else if (
  409. "topTouchEnd" === topLevelType ||
  410. "topTouchCancel" === topLevelType
  411. )
  412. if (
  413. (nativeEvent.changedTouches.forEach(recordTouchEnd),
  414. (touchHistory.numberActiveTouches = nativeEvent.touches.length),
  415. 1 === touchHistory.numberActiveTouches)
  416. )
  417. for (topLevelType = 0; topLevelType < touchBank.length; topLevelType++)
  418. if (
  419. ((nativeEvent = touchBank[topLevelType]),
  420. null != nativeEvent && nativeEvent.touchActive)
  421. ) {
  422. touchHistory.indexOfSingleActiveTouch = topLevelType;
  423. break;
  424. }
  425. },
  426. touchHistory: touchHistory
  427. };
  428. function accumulate(current, next) {
  429. if (null == next)
  430. throw Error(
  431. "accumulate(...): Accumulated items must not be null or undefined."
  432. );
  433. return null == current
  434. ? next
  435. : Array.isArray(current)
  436. ? current.concat(next)
  437. : Array.isArray(next)
  438. ? [current].concat(next)
  439. : [current, next];
  440. }
  441. var responderInst = null,
  442. trackedTouchCount = 0;
  443. function changeResponder(nextResponderInst, blockHostResponder) {
  444. var oldResponderInst = responderInst;
  445. responderInst = nextResponderInst;
  446. if (null !== ResponderEventPlugin.GlobalResponderHandler)
  447. ResponderEventPlugin.GlobalResponderHandler.onChange(
  448. oldResponderInst,
  449. nextResponderInst,
  450. blockHostResponder
  451. );
  452. }
  453. var eventTypes = {
  454. startShouldSetResponder: {
  455. phasedRegistrationNames: {
  456. bubbled: "onStartShouldSetResponder",
  457. captured: "onStartShouldSetResponderCapture"
  458. },
  459. dependencies: startDependencies
  460. },
  461. scrollShouldSetResponder: {
  462. phasedRegistrationNames: {
  463. bubbled: "onScrollShouldSetResponder",
  464. captured: "onScrollShouldSetResponderCapture"
  465. },
  466. dependencies: ["topScroll"]
  467. },
  468. selectionChangeShouldSetResponder: {
  469. phasedRegistrationNames: {
  470. bubbled: "onSelectionChangeShouldSetResponder",
  471. captured: "onSelectionChangeShouldSetResponderCapture"
  472. },
  473. dependencies: ["topSelectionChange"]
  474. },
  475. moveShouldSetResponder: {
  476. phasedRegistrationNames: {
  477. bubbled: "onMoveShouldSetResponder",
  478. captured: "onMoveShouldSetResponderCapture"
  479. },
  480. dependencies: moveDependencies
  481. },
  482. responderStart: {
  483. registrationName: "onResponderStart",
  484. dependencies: startDependencies
  485. },
  486. responderMove: {
  487. registrationName: "onResponderMove",
  488. dependencies: moveDependencies
  489. },
  490. responderEnd: {
  491. registrationName: "onResponderEnd",
  492. dependencies: endDependencies
  493. },
  494. responderRelease: {
  495. registrationName: "onResponderRelease",
  496. dependencies: endDependencies
  497. },
  498. responderTerminationRequest: {
  499. registrationName: "onResponderTerminationRequest",
  500. dependencies: []
  501. },
  502. responderGrant: { registrationName: "onResponderGrant", dependencies: [] },
  503. responderReject: {
  504. registrationName: "onResponderReject",
  505. dependencies: []
  506. },
  507. responderTerminate: {
  508. registrationName: "onResponderTerminate",
  509. dependencies: []
  510. }
  511. },
  512. ResponderEventPlugin = {
  513. _getResponder: function() {
  514. return responderInst;
  515. },
  516. eventTypes: eventTypes,
  517. extractEvents: function(
  518. topLevelType,
  519. targetInst,
  520. nativeEvent,
  521. nativeEventTarget
  522. ) {
  523. if (isStartish(topLevelType)) trackedTouchCount += 1;
  524. else if (
  525. "topTouchEnd" === topLevelType ||
  526. "topTouchCancel" === topLevelType
  527. )
  528. if (0 <= trackedTouchCount) --trackedTouchCount;
  529. else return null;
  530. ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);
  531. if (
  532. targetInst &&
  533. (("topScroll" === topLevelType && !nativeEvent.responderIgnoreScroll) ||
  534. (0 < trackedTouchCount && "topSelectionChange" === topLevelType) ||
  535. isStartish(topLevelType) ||
  536. isMoveish(topLevelType))
  537. ) {
  538. var shouldSetEventType = isStartish(topLevelType)
  539. ? eventTypes.startShouldSetResponder
  540. : isMoveish(topLevelType)
  541. ? eventTypes.moveShouldSetResponder
  542. : "topSelectionChange" === topLevelType
  543. ? eventTypes.selectionChangeShouldSetResponder
  544. : eventTypes.scrollShouldSetResponder;
  545. if (responderInst)
  546. b: {
  547. var JSCompiler_temp = responderInst;
  548. for (
  549. var depthA = 0, tempA = JSCompiler_temp;
  550. tempA;
  551. tempA = getParent(tempA)
  552. )
  553. depthA++;
  554. tempA = 0;
  555. for (var tempB = targetInst; tempB; tempB = getParent(tempB))
  556. tempA++;
  557. for (; 0 < depthA - tempA; )
  558. (JSCompiler_temp = getParent(JSCompiler_temp)), depthA--;
  559. for (; 0 < tempA - depthA; )
  560. (targetInst = getParent(targetInst)), tempA--;
  561. for (; depthA--; ) {
  562. if (
  563. JSCompiler_temp === targetInst ||
  564. JSCompiler_temp === targetInst.alternate
  565. )
  566. break b;
  567. JSCompiler_temp = getParent(JSCompiler_temp);
  568. targetInst = getParent(targetInst);
  569. }
  570. JSCompiler_temp = null;
  571. }
  572. else JSCompiler_temp = targetInst;
  573. targetInst = JSCompiler_temp === responderInst;
  574. JSCompiler_temp = ResponderSyntheticEvent.getPooled(
  575. shouldSetEventType,
  576. JSCompiler_temp,
  577. nativeEvent,
  578. nativeEventTarget
  579. );
  580. JSCompiler_temp.touchHistory = ResponderTouchHistoryStore.touchHistory;
  581. targetInst
  582. ? forEachAccumulated(
  583. JSCompiler_temp,
  584. accumulateTwoPhaseDispatchesSingleSkipTarget
  585. )
  586. : forEachAccumulated(
  587. JSCompiler_temp,
  588. accumulateTwoPhaseDispatchesSingle
  589. );
  590. b: {
  591. shouldSetEventType = JSCompiler_temp._dispatchListeners;
  592. targetInst = JSCompiler_temp._dispatchInstances;
  593. if (Array.isArray(shouldSetEventType))
  594. for (
  595. depthA = 0;
  596. depthA < shouldSetEventType.length &&
  597. !JSCompiler_temp.isPropagationStopped();
  598. depthA++
  599. ) {
  600. if (
  601. shouldSetEventType[depthA](JSCompiler_temp, targetInst[depthA])
  602. ) {
  603. shouldSetEventType = targetInst[depthA];
  604. break b;
  605. }
  606. }
  607. else if (
  608. shouldSetEventType &&
  609. shouldSetEventType(JSCompiler_temp, targetInst)
  610. ) {
  611. shouldSetEventType = targetInst;
  612. break b;
  613. }
  614. shouldSetEventType = null;
  615. }
  616. JSCompiler_temp._dispatchInstances = null;
  617. JSCompiler_temp._dispatchListeners = null;
  618. JSCompiler_temp.isPersistent() ||
  619. JSCompiler_temp.constructor.release(JSCompiler_temp);
  620. if (shouldSetEventType && shouldSetEventType !== responderInst)
  621. if (
  622. ((JSCompiler_temp = ResponderSyntheticEvent.getPooled(
  623. eventTypes.responderGrant,
  624. shouldSetEventType,
  625. nativeEvent,
  626. nativeEventTarget
  627. )),
  628. (JSCompiler_temp.touchHistory =
  629. ResponderTouchHistoryStore.touchHistory),
  630. forEachAccumulated(
  631. JSCompiler_temp,
  632. accumulateDirectDispatchesSingle
  633. ),
  634. (targetInst = !0 === executeDirectDispatch(JSCompiler_temp)),
  635. responderInst)
  636. )
  637. if (
  638. ((depthA = ResponderSyntheticEvent.getPooled(
  639. eventTypes.responderTerminationRequest,
  640. responderInst,
  641. nativeEvent,
  642. nativeEventTarget
  643. )),
  644. (depthA.touchHistory = ResponderTouchHistoryStore.touchHistory),
  645. forEachAccumulated(depthA, accumulateDirectDispatchesSingle),
  646. (tempA =
  647. !depthA._dispatchListeners || executeDirectDispatch(depthA)),
  648. depthA.isPersistent() || depthA.constructor.release(depthA),
  649. tempA)
  650. ) {
  651. depthA = ResponderSyntheticEvent.getPooled(
  652. eventTypes.responderTerminate,
  653. responderInst,
  654. nativeEvent,
  655. nativeEventTarget
  656. );
  657. depthA.touchHistory = ResponderTouchHistoryStore.touchHistory;
  658. forEachAccumulated(depthA, accumulateDirectDispatchesSingle);
  659. var JSCompiler_temp$jscomp$0 = accumulate(
  660. JSCompiler_temp$jscomp$0,
  661. [JSCompiler_temp, depthA]
  662. );
  663. changeResponder(shouldSetEventType, targetInst);
  664. } else
  665. (shouldSetEventType = ResponderSyntheticEvent.getPooled(
  666. eventTypes.responderReject,
  667. shouldSetEventType,
  668. nativeEvent,
  669. nativeEventTarget
  670. )),
  671. (shouldSetEventType.touchHistory =
  672. ResponderTouchHistoryStore.touchHistory),
  673. forEachAccumulated(
  674. shouldSetEventType,
  675. accumulateDirectDispatchesSingle
  676. ),
  677. (JSCompiler_temp$jscomp$0 = accumulate(
  678. JSCompiler_temp$jscomp$0,
  679. shouldSetEventType
  680. ));
  681. else
  682. (JSCompiler_temp$jscomp$0 = accumulate(
  683. JSCompiler_temp$jscomp$0,
  684. JSCompiler_temp
  685. )),
  686. changeResponder(shouldSetEventType, targetInst);
  687. else JSCompiler_temp$jscomp$0 = null;
  688. } else JSCompiler_temp$jscomp$0 = null;
  689. shouldSetEventType = responderInst && isStartish(topLevelType);
  690. JSCompiler_temp = responderInst && isMoveish(topLevelType);
  691. targetInst =
  692. responderInst &&
  693. ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType);
  694. if (
  695. (shouldSetEventType = shouldSetEventType
  696. ? eventTypes.responderStart
  697. : JSCompiler_temp
  698. ? eventTypes.responderMove
  699. : targetInst
  700. ? eventTypes.responderEnd
  701. : null)
  702. )
  703. (shouldSetEventType = ResponderSyntheticEvent.getPooled(
  704. shouldSetEventType,
  705. responderInst,
  706. nativeEvent,
  707. nativeEventTarget
  708. )),
  709. (shouldSetEventType.touchHistory =
  710. ResponderTouchHistoryStore.touchHistory),
  711. forEachAccumulated(
  712. shouldSetEventType,
  713. accumulateDirectDispatchesSingle
  714. ),
  715. (JSCompiler_temp$jscomp$0 = accumulate(
  716. JSCompiler_temp$jscomp$0,
  717. shouldSetEventType
  718. ));
  719. shouldSetEventType = responderInst && "topTouchCancel" === topLevelType;
  720. if (
  721. (topLevelType =
  722. responderInst &&
  723. !shouldSetEventType &&
  724. ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType))
  725. )
  726. a: {
  727. if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length)
  728. for (
  729. JSCompiler_temp = 0;
  730. JSCompiler_temp < topLevelType.length;
  731. JSCompiler_temp++
  732. )
  733. if (
  734. ((targetInst = topLevelType[JSCompiler_temp].target),
  735. null !== targetInst &&
  736. void 0 !== targetInst &&
  737. 0 !== targetInst)
  738. ) {
  739. depthA = getInstanceFromNode(targetInst);
  740. b: {
  741. for (targetInst = responderInst; depthA; ) {
  742. if (
  743. targetInst === depthA ||
  744. targetInst === depthA.alternate
  745. ) {
  746. targetInst = !0;
  747. break b;
  748. }
  749. depthA = getParent(depthA);
  750. }
  751. targetInst = !1;
  752. }
  753. if (targetInst) {
  754. topLevelType = !1;
  755. break a;
  756. }
  757. }
  758. topLevelType = !0;
  759. }
  760. if (
  761. (topLevelType = shouldSetEventType
  762. ? eventTypes.responderTerminate
  763. : topLevelType
  764. ? eventTypes.responderRelease
  765. : null)
  766. )
  767. (nativeEvent = ResponderSyntheticEvent.getPooled(
  768. topLevelType,
  769. responderInst,
  770. nativeEvent,
  771. nativeEventTarget
  772. )),
  773. (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory),
  774. forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle),
  775. (JSCompiler_temp$jscomp$0 = accumulate(
  776. JSCompiler_temp$jscomp$0,
  777. nativeEvent
  778. )),
  779. changeResponder(null);
  780. return JSCompiler_temp$jscomp$0;
  781. },
  782. GlobalResponderHandler: null,
  783. injection: {
  784. injectGlobalResponderHandler: function(GlobalResponderHandler) {
  785. ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;
  786. }
  787. }
  788. },
  789. eventPluginOrder = null,
  790. namesToPlugins = {};
  791. function recomputePluginOrdering() {
  792. if (eventPluginOrder)
  793. for (var pluginName in namesToPlugins) {
  794. var pluginModule = namesToPlugins[pluginName],
  795. pluginIndex = eventPluginOrder.indexOf(pluginName);
  796. if (!(-1 < pluginIndex))
  797. throw Error(
  798. "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" +
  799. pluginName +
  800. "`."
  801. );
  802. if (!plugins[pluginIndex]) {
  803. if (!pluginModule.extractEvents)
  804. throw Error(
  805. "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" +
  806. pluginName +
  807. "` does not."
  808. );
  809. plugins[pluginIndex] = pluginModule;
  810. pluginIndex = pluginModule.eventTypes;
  811. for (var eventName in pluginIndex) {
  812. var JSCompiler_inline_result = void 0;
  813. var dispatchConfig = pluginIndex[eventName],
  814. pluginModule$jscomp$0 = pluginModule,
  815. eventName$jscomp$0 = eventName;
  816. if (eventNameDispatchConfigs.hasOwnProperty(eventName$jscomp$0))
  817. throw Error(
  818. "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" +
  819. eventName$jscomp$0 +
  820. "`."
  821. );
  822. eventNameDispatchConfigs[eventName$jscomp$0] = dispatchConfig;
  823. var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
  824. if (phasedRegistrationNames) {
  825. for (JSCompiler_inline_result in phasedRegistrationNames)
  826. phasedRegistrationNames.hasOwnProperty(
  827. JSCompiler_inline_result
  828. ) &&
  829. publishRegistrationName(
  830. phasedRegistrationNames[JSCompiler_inline_result],
  831. pluginModule$jscomp$0,
  832. eventName$jscomp$0
  833. );
  834. JSCompiler_inline_result = !0;
  835. } else
  836. dispatchConfig.registrationName
  837. ? (publishRegistrationName(
  838. dispatchConfig.registrationName,
  839. pluginModule$jscomp$0,
  840. eventName$jscomp$0
  841. ),
  842. (JSCompiler_inline_result = !0))
  843. : (JSCompiler_inline_result = !1);
  844. if (!JSCompiler_inline_result)
  845. throw Error(
  846. "EventPluginRegistry: Failed to publish event `" +
  847. eventName +
  848. "` for plugin `" +
  849. pluginName +
  850. "`."
  851. );
  852. }
  853. }
  854. }
  855. }
  856. function publishRegistrationName(registrationName, pluginModule) {
  857. if (registrationNameModules[registrationName])
  858. throw Error(
  859. "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" +
  860. registrationName +
  861. "`."
  862. );
  863. registrationNameModules[registrationName] = pluginModule;
  864. }
  865. var plugins = [],
  866. eventNameDispatchConfigs = {},
  867. registrationNameModules = {},
  868. customBubblingEventTypes =
  869. ReactNativePrivateInterface.ReactNativeViewConfigRegistry
  870. .customBubblingEventTypes,
  871. customDirectEventTypes =
  872. ReactNativePrivateInterface.ReactNativeViewConfigRegistry
  873. .customDirectEventTypes;
  874. if (eventPluginOrder)
  875. throw Error(
  876. "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."
  877. );
  878. eventPluginOrder = Array.prototype.slice.call([
  879. "ResponderEventPlugin",
  880. "ReactNativeBridgeEventPlugin"
  881. ]);
  882. recomputePluginOrdering();
  883. var injectedNamesToPlugins$jscomp$inline_92 = {
  884. ResponderEventPlugin: ResponderEventPlugin,
  885. ReactNativeBridgeEventPlugin: {
  886. eventTypes: {},
  887. extractEvents: function(
  888. topLevelType,
  889. targetInst,
  890. nativeEvent,
  891. nativeEventTarget
  892. ) {
  893. if (null == targetInst) return null;
  894. var bubbleDispatchConfig = customBubblingEventTypes[topLevelType],
  895. directDispatchConfig = customDirectEventTypes[topLevelType];
  896. if (!bubbleDispatchConfig && !directDispatchConfig)
  897. throw Error(
  898. 'Unsupported top level event type "' + topLevelType + '" dispatched'
  899. );
  900. topLevelType = SyntheticEvent.getPooled(
  901. bubbleDispatchConfig || directDispatchConfig,
  902. targetInst,
  903. nativeEvent,
  904. nativeEventTarget
  905. );
  906. if (bubbleDispatchConfig)
  907. forEachAccumulated(topLevelType, accumulateTwoPhaseDispatchesSingle);
  908. else if (directDispatchConfig)
  909. forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle);
  910. else return null;
  911. return topLevelType;
  912. }
  913. }
  914. },
  915. isOrderingDirty$jscomp$inline_93 = !1,
  916. pluginName$jscomp$inline_94;
  917. for (pluginName$jscomp$inline_94 in injectedNamesToPlugins$jscomp$inline_92)
  918. if (
  919. injectedNamesToPlugins$jscomp$inline_92.hasOwnProperty(
  920. pluginName$jscomp$inline_94
  921. )
  922. ) {
  923. var pluginModule$jscomp$inline_95 =
  924. injectedNamesToPlugins$jscomp$inline_92[pluginName$jscomp$inline_94];
  925. if (
  926. !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_94) ||
  927. namesToPlugins[pluginName$jscomp$inline_94] !==
  928. pluginModule$jscomp$inline_95
  929. ) {
  930. if (namesToPlugins[pluginName$jscomp$inline_94])
  931. throw Error(
  932. "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
  933. pluginName$jscomp$inline_94 +
  934. "`."
  935. );
  936. namesToPlugins[
  937. pluginName$jscomp$inline_94
  938. ] = pluginModule$jscomp$inline_95;
  939. isOrderingDirty$jscomp$inline_93 = !0;
  940. }
  941. }
  942. isOrderingDirty$jscomp$inline_93 && recomputePluginOrdering();
  943. function getInstanceFromInstance(instanceHandle) {
  944. return instanceHandle;
  945. }
  946. getFiberCurrentPropsFromNode = function(inst) {
  947. return inst.canonical.currentProps;
  948. };
  949. getInstanceFromNode = getInstanceFromInstance;
  950. getNodeFromInstance = function(inst) {
  951. inst = inst.stateNode.canonical;
  952. if (!inst._nativeTag) throw Error("All native instances should have a tag.");
  953. return inst;
  954. };
  955. ResponderEventPlugin.injection.injectGlobalResponderHandler({
  956. onChange: function(from, to, blockNativeResponder) {
  957. null !== to
  958. ? ReactNativePrivateInterface.UIManager.setJSResponder(
  959. to.stateNode.canonical._nativeTag,
  960. blockNativeResponder
  961. )
  962. : ReactNativePrivateInterface.UIManager.clearJSResponder();
  963. }
  964. });
  965. var ReactSharedInternals =
  966. React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
  967. ReactSharedInternals.hasOwnProperty("ReactCurrentDispatcher") ||
  968. (ReactSharedInternals.ReactCurrentDispatcher = { current: null });
  969. ReactSharedInternals.hasOwnProperty("ReactCurrentBatchConfig") ||
  970. (ReactSharedInternals.ReactCurrentBatchConfig = { suspense: null });
  971. var hasSymbol = "function" === typeof Symbol && Symbol.for,
  972. REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103,
  973. REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106,
  974. REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107,
  975. REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108,
  976. REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114,
  977. REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109,
  978. REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110,
  979. REACT_CONCURRENT_MODE_TYPE = hasSymbol
  980. ? Symbol.for("react.concurrent_mode")
  981. : 60111,
  982. REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112,
  983. REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113,
  984. REACT_SUSPENSE_LIST_TYPE = hasSymbol
  985. ? Symbol.for("react.suspense_list")
  986. : 60120,
  987. REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115,
  988. REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116,
  989. REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121,
  990. MAYBE_ITERATOR_SYMBOL = "function" === typeof Symbol && Symbol.iterator;
  991. function getIteratorFn(maybeIterable) {
  992. if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
  993. maybeIterable =
  994. (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
  995. maybeIterable["@@iterator"];
  996. return "function" === typeof maybeIterable ? maybeIterable : null;
  997. }
  998. function initializeLazyComponentType(lazyComponent) {
  999. if (-1 === lazyComponent._status) {
  1000. var ctor = lazyComponent._result;
  1001. ctor || (ctor = lazyComponent._ctor);
  1002. ctor = ctor();
  1003. lazyComponent._status = 0;
  1004. lazyComponent._result = ctor;
  1005. ctor.then(
  1006. function(moduleObject) {
  1007. 0 === lazyComponent._status &&
  1008. ((moduleObject = moduleObject.default),
  1009. (lazyComponent._status = 1),
  1010. (lazyComponent._result = moduleObject));
  1011. },
  1012. function(error) {
  1013. 0 === lazyComponent._status &&
  1014. ((lazyComponent._status = 2), (lazyComponent._result = error));
  1015. }
  1016. );
  1017. }
  1018. }
  1019. function getComponentName(type) {
  1020. if (null == type) return null;
  1021. if ("function" === typeof type) return type.displayName || type.name || null;
  1022. if ("string" === typeof type) return type;
  1023. switch (type) {
  1024. case REACT_FRAGMENT_TYPE:
  1025. return "Fragment";
  1026. case REACT_PORTAL_TYPE:
  1027. return "Portal";
  1028. case REACT_PROFILER_TYPE:
  1029. return "Profiler";
  1030. case REACT_STRICT_MODE_TYPE:
  1031. return "StrictMode";
  1032. case REACT_SUSPENSE_TYPE:
  1033. return "Suspense";
  1034. case REACT_SUSPENSE_LIST_TYPE:
  1035. return "SuspenseList";
  1036. }
  1037. if ("object" === typeof type)
  1038. switch (type.$$typeof) {
  1039. case REACT_CONTEXT_TYPE:
  1040. return (type.displayName || "Context") + ".Consumer";
  1041. case REACT_PROVIDER_TYPE:
  1042. return (type._context.displayName || "Context") + ".Provider";
  1043. case REACT_FORWARD_REF_TYPE:
  1044. var innerType = type.render;
  1045. innerType = innerType.displayName || innerType.name || "";
  1046. return (
  1047. type.displayName ||
  1048. ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef")
  1049. );
  1050. case REACT_MEMO_TYPE:
  1051. return getComponentName(type.type);
  1052. case REACT_BLOCK_TYPE:
  1053. return getComponentName(type.render);
  1054. case REACT_LAZY_TYPE:
  1055. if ((type = 1 === type._status ? type._result : null))
  1056. return getComponentName(type);
  1057. }
  1058. return null;
  1059. }
  1060. function getNearestMountedFiber(fiber) {
  1061. var node = fiber,
  1062. nearestMounted = fiber;
  1063. if (fiber.alternate) for (; node.return; ) node = node.return;
  1064. else {
  1065. fiber = node;
  1066. do
  1067. (node = fiber),
  1068. 0 !== (node.effectTag & 1026) && (nearestMounted = node.return),
  1069. (fiber = node.return);
  1070. while (fiber);
  1071. }
  1072. return 3 === node.tag ? nearestMounted : null;
  1073. }
  1074. function assertIsMounted(fiber) {
  1075. if (getNearestMountedFiber(fiber) !== fiber)
  1076. throw Error("Unable to find node on an unmounted component.");
  1077. }
  1078. function findCurrentFiberUsingSlowPath(fiber) {
  1079. var alternate = fiber.alternate;
  1080. if (!alternate) {
  1081. alternate = getNearestMountedFiber(fiber);
  1082. if (null === alternate)
  1083. throw Error("Unable to find node on an unmounted component.");
  1084. return alternate !== fiber ? null : fiber;
  1085. }
  1086. for (var a = fiber, b = alternate; ; ) {
  1087. var parentA = a.return;
  1088. if (null === parentA) break;
  1089. var parentB = parentA.alternate;
  1090. if (null === parentB) {
  1091. b = parentA.return;
  1092. if (null !== b) {
  1093. a = b;
  1094. continue;
  1095. }
  1096. break;
  1097. }
  1098. if (parentA.child === parentB.child) {
  1099. for (parentB = parentA.child; parentB; ) {
  1100. if (parentB === a) return assertIsMounted(parentA), fiber;
  1101. if (parentB === b) return assertIsMounted(parentA), alternate;
  1102. parentB = parentB.sibling;
  1103. }
  1104. throw Error("Unable to find node on an unmounted component.");
  1105. }
  1106. if (a.return !== b.return) (a = parentA), (b = parentB);
  1107. else {
  1108. for (var didFindChild = !1, _child = parentA.child; _child; ) {
  1109. if (_child === a) {
  1110. didFindChild = !0;
  1111. a = parentA;
  1112. b = parentB;
  1113. break;
  1114. }
  1115. if (_child === b) {
  1116. didFindChild = !0;
  1117. b = parentA;
  1118. a = parentB;
  1119. break;
  1120. }
  1121. _child = _child.sibling;
  1122. }
  1123. if (!didFindChild) {
  1124. for (_child = parentB.child; _child; ) {
  1125. if (_child === a) {
  1126. didFindChild = !0;
  1127. a = parentB;
  1128. b = parentA;
  1129. break;
  1130. }
  1131. if (_child === b) {
  1132. didFindChild = !0;
  1133. b = parentB;
  1134. a = parentA;
  1135. break;
  1136. }
  1137. _child = _child.sibling;
  1138. }
  1139. if (!didFindChild)
  1140. throw Error(
  1141. "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
  1142. );
  1143. }
  1144. }
  1145. if (a.alternate !== b)
  1146. throw Error(
  1147. "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
  1148. );
  1149. }
  1150. if (3 !== a.tag)
  1151. throw Error("Unable to find node on an unmounted component.");
  1152. return a.stateNode.current === a ? fiber : alternate;
  1153. }
  1154. function findCurrentHostFiber(parent) {
  1155. parent = findCurrentFiberUsingSlowPath(parent);
  1156. if (!parent) return null;
  1157. for (var node = parent; ; ) {
  1158. if (5 === node.tag || 6 === node.tag) return node;
  1159. if (node.child) (node.child.return = node), (node = node.child);
  1160. else {
  1161. if (node === parent) break;
  1162. for (; !node.sibling; ) {
  1163. if (!node.return || node.return === parent) return null;
  1164. node = node.return;
  1165. }
  1166. node.sibling.return = node.return;
  1167. node = node.sibling;
  1168. }
  1169. }
  1170. return null;
  1171. }
  1172. function mountSafeCallback_NOT_REALLY_SAFE(context, callback) {
  1173. return function() {
  1174. if (
  1175. callback &&
  1176. ("boolean" !== typeof context.__isMounted || context.__isMounted)
  1177. )
  1178. return callback.apply(context, arguments);
  1179. };
  1180. }
  1181. var emptyObject = {},
  1182. removedKeys = null,
  1183. removedKeyCount = 0,
  1184. deepDifferOptions = { unsafelyIgnoreFunctions: !0 };
  1185. function defaultDiffer(prevProp, nextProp) {
  1186. return "object" !== typeof nextProp || null === nextProp
  1187. ? !0
  1188. : ReactNativePrivateInterface.deepDiffer(
  1189. prevProp,
  1190. nextProp,
  1191. deepDifferOptions
  1192. );
  1193. }
  1194. function restoreDeletedValuesInNestedArray(
  1195. updatePayload,
  1196. node,
  1197. validAttributes
  1198. ) {
  1199. if (Array.isArray(node))
  1200. for (var i = node.length; i-- && 0 < removedKeyCount; )
  1201. restoreDeletedValuesInNestedArray(
  1202. updatePayload,
  1203. node[i],
  1204. validAttributes
  1205. );
  1206. else if (node && 0 < removedKeyCount)
  1207. for (i in removedKeys)
  1208. if (removedKeys[i]) {
  1209. var nextProp = node[i];
  1210. if (void 0 !== nextProp) {
  1211. var attributeConfig = validAttributes[i];
  1212. if (attributeConfig) {
  1213. "function" === typeof nextProp && (nextProp = !0);
  1214. "undefined" === typeof nextProp && (nextProp = null);
  1215. if ("object" !== typeof attributeConfig)
  1216. updatePayload[i] = nextProp;
  1217. else if (
  1218. "function" === typeof attributeConfig.diff ||
  1219. "function" === typeof attributeConfig.process
  1220. )
  1221. (nextProp =
  1222. "function" === typeof attributeConfig.process
  1223. ? attributeConfig.process(nextProp)
  1224. : nextProp),
  1225. (updatePayload[i] = nextProp);
  1226. removedKeys[i] = !1;
  1227. removedKeyCount--;
  1228. }
  1229. }
  1230. }
  1231. }
  1232. function diffNestedProperty(
  1233. updatePayload,
  1234. prevProp,
  1235. nextProp,
  1236. validAttributes
  1237. ) {
  1238. if (!updatePayload && prevProp === nextProp) return updatePayload;
  1239. if (!prevProp || !nextProp)
  1240. return nextProp
  1241. ? addNestedProperty(updatePayload, nextProp, validAttributes)
  1242. : prevProp
  1243. ? clearNestedProperty(updatePayload, prevProp, validAttributes)
  1244. : updatePayload;
  1245. if (!Array.isArray(prevProp) && !Array.isArray(nextProp))
  1246. return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
  1247. if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
  1248. var minLength =
  1249. prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
  1250. i;
  1251. for (i = 0; i < minLength; i++)
  1252. updatePayload = diffNestedProperty(
  1253. updatePayload,
  1254. prevProp[i],
  1255. nextProp[i],
  1256. validAttributes
  1257. );
  1258. for (; i < prevProp.length; i++)
  1259. updatePayload = clearNestedProperty(
  1260. updatePayload,
  1261. prevProp[i],
  1262. validAttributes
  1263. );
  1264. for (; i < nextProp.length; i++)
  1265. updatePayload = addNestedProperty(
  1266. updatePayload,
  1267. nextProp[i],
  1268. validAttributes
  1269. );
  1270. return updatePayload;
  1271. }
  1272. return Array.isArray(prevProp)
  1273. ? diffProperties(
  1274. updatePayload,
  1275. ReactNativePrivateInterface.flattenStyle(prevProp),
  1276. nextProp,
  1277. validAttributes
  1278. )
  1279. : diffProperties(
  1280. updatePayload,
  1281. prevProp,
  1282. ReactNativePrivateInterface.flattenStyle(nextProp),
  1283. validAttributes
  1284. );
  1285. }
  1286. function addNestedProperty(updatePayload, nextProp, validAttributes) {
  1287. if (!nextProp) return updatePayload;
  1288. if (!Array.isArray(nextProp))
  1289. return diffProperties(
  1290. updatePayload,
  1291. emptyObject,
  1292. nextProp,
  1293. validAttributes
  1294. );
  1295. for (var i = 0; i < nextProp.length; i++)
  1296. updatePayload = addNestedProperty(
  1297. updatePayload,
  1298. nextProp[i],
  1299. validAttributes
  1300. );
  1301. return updatePayload;
  1302. }
  1303. function clearNestedProperty(updatePayload, prevProp, validAttributes) {
  1304. if (!prevProp) return updatePayload;
  1305. if (!Array.isArray(prevProp))
  1306. return diffProperties(
  1307. updatePayload,
  1308. prevProp,
  1309. emptyObject,
  1310. validAttributes
  1311. );
  1312. for (var i = 0; i < prevProp.length; i++)
  1313. updatePayload = clearNestedProperty(
  1314. updatePayload,
  1315. prevProp[i],
  1316. validAttributes
  1317. );
  1318. return updatePayload;
  1319. }
  1320. function diffProperties(updatePayload, prevProps, nextProps, validAttributes) {
  1321. var attributeConfig, propKey;
  1322. for (propKey in nextProps)
  1323. if ((attributeConfig = validAttributes[propKey])) {
  1324. var prevProp = prevProps[propKey];
  1325. var nextProp = nextProps[propKey];
  1326. "function" === typeof nextProp &&
  1327. ((nextProp = !0), "function" === typeof prevProp && (prevProp = !0));
  1328. "undefined" === typeof nextProp &&
  1329. ((nextProp = null),
  1330. "undefined" === typeof prevProp && (prevProp = null));
  1331. removedKeys && (removedKeys[propKey] = !1);
  1332. if (updatePayload && void 0 !== updatePayload[propKey])
  1333. if ("object" !== typeof attributeConfig)
  1334. updatePayload[propKey] = nextProp;
  1335. else {
  1336. if (
  1337. "function" === typeof attributeConfig.diff ||
  1338. "function" === typeof attributeConfig.process
  1339. )
  1340. (attributeConfig =
  1341. "function" === typeof attributeConfig.process
  1342. ? attributeConfig.process(nextProp)
  1343. : nextProp),
  1344. (updatePayload[propKey] = attributeConfig);
  1345. }
  1346. else if (prevProp !== nextProp)
  1347. if ("object" !== typeof attributeConfig)
  1348. defaultDiffer(prevProp, nextProp) &&
  1349. ((updatePayload || (updatePayload = {}))[propKey] = nextProp);
  1350. else if (
  1351. "function" === typeof attributeConfig.diff ||
  1352. "function" === typeof attributeConfig.process
  1353. ) {
  1354. if (
  1355. void 0 === prevProp ||
  1356. ("function" === typeof attributeConfig.diff
  1357. ? attributeConfig.diff(prevProp, nextProp)
  1358. : defaultDiffer(prevProp, nextProp))
  1359. )
  1360. (attributeConfig =
  1361. "function" === typeof attributeConfig.process
  1362. ? attributeConfig.process(nextProp)
  1363. : nextProp),
  1364. ((updatePayload || (updatePayload = {}))[
  1365. propKey
  1366. ] = attributeConfig);
  1367. } else
  1368. (removedKeys = null),
  1369. (removedKeyCount = 0),
  1370. (updatePayload = diffNestedProperty(
  1371. updatePayload,
  1372. prevProp,
  1373. nextProp,
  1374. attributeConfig
  1375. )),
  1376. 0 < removedKeyCount &&
  1377. updatePayload &&
  1378. (restoreDeletedValuesInNestedArray(
  1379. updatePayload,
  1380. nextProp,
  1381. attributeConfig
  1382. ),
  1383. (removedKeys = null));
  1384. }
  1385. for (var _propKey in prevProps)
  1386. void 0 === nextProps[_propKey] &&
  1387. (!(attributeConfig = validAttributes[_propKey]) ||
  1388. (updatePayload && void 0 !== updatePayload[_propKey]) ||
  1389. ((prevProp = prevProps[_propKey]),
  1390. void 0 !== prevProp &&
  1391. ("object" !== typeof attributeConfig ||
  1392. "function" === typeof attributeConfig.diff ||
  1393. "function" === typeof attributeConfig.process
  1394. ? (((updatePayload || (updatePayload = {}))[_propKey] = null),
  1395. removedKeys || (removedKeys = {}),
  1396. removedKeys[_propKey] ||
  1397. ((removedKeys[_propKey] = !0), removedKeyCount++))
  1398. : (updatePayload = clearNestedProperty(
  1399. updatePayload,
  1400. prevProp,
  1401. attributeConfig
  1402. )))));
  1403. return updatePayload;
  1404. }
  1405. function batchedUpdatesImpl(fn, bookkeeping) {
  1406. return fn(bookkeeping);
  1407. }
  1408. var isInsideEventHandler = !1;
  1409. function batchedUpdates(fn, bookkeeping) {
  1410. if (isInsideEventHandler) return fn(bookkeeping);
  1411. isInsideEventHandler = !0;
  1412. try {
  1413. return batchedUpdatesImpl(fn, bookkeeping);
  1414. } finally {
  1415. isInsideEventHandler = !1;
  1416. }
  1417. }
  1418. var eventQueue = null;
  1419. function executeDispatchesAndReleaseTopLevel(e) {
  1420. if (e) {
  1421. var dispatchListeners = e._dispatchListeners,
  1422. dispatchInstances = e._dispatchInstances;
  1423. if (Array.isArray(dispatchListeners))
  1424. for (
  1425. var i = 0;
  1426. i < dispatchListeners.length && !e.isPropagationStopped();
  1427. i++
  1428. )
  1429. executeDispatch(e, dispatchListeners[i], dispatchInstances[i]);
  1430. else
  1431. dispatchListeners &&
  1432. executeDispatch(e, dispatchListeners, dispatchInstances);
  1433. e._dispatchListeners = null;
  1434. e._dispatchInstances = null;
  1435. e.isPersistent() || e.constructor.release(e);
  1436. }
  1437. }
  1438. function dispatchEvent(target, topLevelType, nativeEvent) {
  1439. var eventTarget = null;
  1440. if (null != target) {
  1441. var stateNode = target.stateNode;
  1442. null != stateNode && (eventTarget = stateNode.canonical);
  1443. }
  1444. batchedUpdates(function() {
  1445. var events = eventTarget;
  1446. for (var events$jscomp$0 = null, i = 0; i < plugins.length; i++) {
  1447. var possiblePlugin = plugins[i];
  1448. possiblePlugin &&
  1449. (possiblePlugin = possiblePlugin.extractEvents(
  1450. topLevelType,
  1451. target,
  1452. nativeEvent,
  1453. events,
  1454. 1
  1455. )) &&
  1456. (events$jscomp$0 = accumulateInto(events$jscomp$0, possiblePlugin));
  1457. }
  1458. events = events$jscomp$0;
  1459. null !== events && (eventQueue = accumulateInto(eventQueue, events));
  1460. events = eventQueue;
  1461. eventQueue = null;
  1462. if (events) {
  1463. forEachAccumulated(events, executeDispatchesAndReleaseTopLevel);
  1464. if (eventQueue)
  1465. throw Error(
  1466. "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."
  1467. );
  1468. if (hasRethrowError)
  1469. throw ((events = rethrowError),
  1470. (hasRethrowError = !1),
  1471. (rethrowError = null),
  1472. events);
  1473. }
  1474. });
  1475. }
  1476. function shim$1() {
  1477. throw Error(
  1478. "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue."
  1479. );
  1480. }
  1481. var _nativeFabricUIManage = nativeFabricUIManager,
  1482. createNode = _nativeFabricUIManage.createNode,
  1483. cloneNode = _nativeFabricUIManage.cloneNode,
  1484. cloneNodeWithNewChildren = _nativeFabricUIManage.cloneNodeWithNewChildren,
  1485. cloneNodeWithNewChildrenAndProps =
  1486. _nativeFabricUIManage.cloneNodeWithNewChildrenAndProps,
  1487. cloneNodeWithNewProps = _nativeFabricUIManage.cloneNodeWithNewProps,
  1488. createChildNodeSet = _nativeFabricUIManage.createChildSet,
  1489. appendChildNode = _nativeFabricUIManage.appendChild,
  1490. appendChildNodeToSet = _nativeFabricUIManage.appendChildToSet,
  1491. completeRoot = _nativeFabricUIManage.completeRoot,
  1492. registerEventHandler = _nativeFabricUIManage.registerEventHandler,
  1493. fabricMeasure = _nativeFabricUIManage.measure,
  1494. fabricMeasureInWindow = _nativeFabricUIManage.measureInWindow,
  1495. fabricMeasureLayout = _nativeFabricUIManage.measureLayout,
  1496. getViewConfigForType =
  1497. ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
  1498. nextReactTag = 2;
  1499. registerEventHandler && registerEventHandler(dispatchEvent);
  1500. var ReactFabricHostComponent = (function() {
  1501. function ReactFabricHostComponent(
  1502. tag,
  1503. viewConfig,
  1504. props,
  1505. internalInstanceHandle
  1506. ) {
  1507. this._nativeTag = tag;
  1508. this.viewConfig = viewConfig;
  1509. this.currentProps = props;
  1510. this._internalInstanceHandle = internalInstanceHandle;
  1511. }
  1512. var _proto = ReactFabricHostComponent.prototype;
  1513. _proto.blur = function() {
  1514. ReactNativePrivateInterface.TextInputState.blurTextInput(this);
  1515. };
  1516. _proto.focus = function() {
  1517. ReactNativePrivateInterface.TextInputState.focusTextInput(this);
  1518. };
  1519. _proto.measure = function(callback) {
  1520. fabricMeasure(
  1521. this._internalInstanceHandle.stateNode.node,
  1522. mountSafeCallback_NOT_REALLY_SAFE(this, callback)
  1523. );
  1524. };
  1525. _proto.measureInWindow = function(callback) {
  1526. fabricMeasureInWindow(
  1527. this._internalInstanceHandle.stateNode.node,
  1528. mountSafeCallback_NOT_REALLY_SAFE(this, callback)
  1529. );
  1530. };
  1531. _proto.measureLayout = function(relativeToNativeNode, onSuccess, onFail) {
  1532. "number" !== typeof relativeToNativeNode &&
  1533. relativeToNativeNode instanceof ReactFabricHostComponent &&
  1534. fabricMeasureLayout(
  1535. this._internalInstanceHandle.stateNode.node,
  1536. relativeToNativeNode._internalInstanceHandle.stateNode.node,
  1537. mountSafeCallback_NOT_REALLY_SAFE(this, onFail),
  1538. mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)
  1539. );
  1540. };
  1541. _proto.setNativeProps = function() {};
  1542. return ReactFabricHostComponent;
  1543. })();
  1544. function createTextInstance(
  1545. text,
  1546. rootContainerInstance,
  1547. hostContext,
  1548. internalInstanceHandle
  1549. ) {
  1550. if (!hostContext.isInAParentText)
  1551. throw Error("Text strings must be rendered within a <Text> component.");
  1552. hostContext = nextReactTag;
  1553. nextReactTag += 2;
  1554. return {
  1555. node: createNode(
  1556. hostContext,
  1557. "RCTRawText",
  1558. rootContainerInstance,
  1559. { text: text },
  1560. internalInstanceHandle
  1561. )
  1562. };
  1563. }
  1564. var scheduleTimeout = setTimeout,
  1565. cancelTimeout = clearTimeout;
  1566. function cloneHiddenInstance(instance) {
  1567. var node = instance.node;
  1568. var updatePayload = diffProperties(
  1569. null,
  1570. emptyObject,
  1571. { style: { display: "none" } },
  1572. instance.canonical.viewConfig.validAttributes
  1573. );
  1574. return {
  1575. node: cloneNodeWithNewProps(node, updatePayload),
  1576. canonical: instance.canonical
  1577. };
  1578. }
  1579. var valueStack = [],
  1580. index = -1;
  1581. function pop(cursor) {
  1582. 0 > index ||
  1583. ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);
  1584. }
  1585. function push(cursor, value) {
  1586. index++;
  1587. valueStack[index] = cursor.current;
  1588. cursor.current = value;
  1589. }
  1590. var emptyContextObject = {},
  1591. contextStackCursor = { current: emptyContextObject },
  1592. didPerformWorkStackCursor = { current: !1 },
  1593. previousContext = emptyContextObject;
  1594. function getMaskedContext(workInProgress, unmaskedContext) {
  1595. var contextTypes = workInProgress.type.contextTypes;
  1596. if (!contextTypes) return emptyContextObject;
  1597. var instance = workInProgress.stateNode;
  1598. if (
  1599. instance &&
  1600. instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext
  1601. )
  1602. return instance.__reactInternalMemoizedMaskedChildContext;
  1603. var context = {},
  1604. key;
  1605. for (key in contextTypes) context[key] = unmaskedContext[key];
  1606. instance &&
  1607. ((workInProgress = workInProgress.stateNode),
  1608. (workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext),
  1609. (workInProgress.__reactInternalMemoizedMaskedChildContext = context));
  1610. return context;
  1611. }
  1612. function isContextProvider(type) {
  1613. type = type.childContextTypes;
  1614. return null !== type && void 0 !== type;
  1615. }
  1616. function popContext() {
  1617. pop(didPerformWorkStackCursor);
  1618. pop(contextStackCursor);
  1619. }
  1620. function pushTopLevelContextObject(fiber, context, didChange) {
  1621. if (contextStackCursor.current !== emptyContextObject)
  1622. throw Error(
  1623. "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."
  1624. );
  1625. push(contextStackCursor, context);
  1626. push(didPerformWorkStackCursor, didChange);
  1627. }
  1628. function processChildContext(fiber, type, parentContext) {
  1629. var instance = fiber.stateNode;
  1630. fiber = type.childContextTypes;
  1631. if ("function" !== typeof instance.getChildContext) return parentContext;
  1632. instance = instance.getChildContext();
  1633. for (var contextKey in instance)
  1634. if (!(contextKey in fiber))
  1635. throw Error(
  1636. (getComponentName(type) || "Unknown") +
  1637. '.getChildContext(): key "' +
  1638. contextKey +
  1639. '" is not defined in childContextTypes.'
  1640. );
  1641. return Object.assign({}, parentContext, {}, instance);
  1642. }
  1643. function pushContextProvider(workInProgress) {
  1644. workInProgress =
  1645. ((workInProgress = workInProgress.stateNode) &&
  1646. workInProgress.__reactInternalMemoizedMergedChildContext) ||
  1647. emptyContextObject;
  1648. previousContext = contextStackCursor.current;
  1649. push(contextStackCursor, workInProgress);
  1650. push(didPerformWorkStackCursor, didPerformWorkStackCursor.current);
  1651. return !0;
  1652. }
  1653. function invalidateContextProvider(workInProgress, type, didChange) {
  1654. var instance = workInProgress.stateNode;
  1655. if (!instance)
  1656. throw Error(
  1657. "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."
  1658. );
  1659. didChange
  1660. ? ((workInProgress = processChildContext(
  1661. workInProgress,
  1662. type,
  1663. previousContext
  1664. )),
  1665. (instance.__reactInternalMemoizedMergedChildContext = workInProgress),
  1666. pop(didPerformWorkStackCursor),
  1667. pop(contextStackCursor),
  1668. push(contextStackCursor, workInProgress))
  1669. : pop(didPerformWorkStackCursor);
  1670. push(didPerformWorkStackCursor, didChange);
  1671. }
  1672. var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
  1673. Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
  1674. Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
  1675. Scheduler_requestPaint = Scheduler.unstable_requestPaint,
  1676. Scheduler_now = Scheduler.unstable_now,
  1677. Scheduler_getCurrentPriorityLevel =
  1678. Scheduler.unstable_getCurrentPriorityLevel,
  1679. Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
  1680. Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
  1681. Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
  1682. Scheduler_LowPriority = Scheduler.unstable_LowPriority,
  1683. Scheduler_IdlePriority = Scheduler.unstable_IdlePriority,
  1684. fakeCallbackNode = {},
  1685. shouldYield = Scheduler.unstable_shouldYield,
  1686. requestPaint =
  1687. void 0 !== Scheduler_requestPaint ? Scheduler_requestPaint : function() {},
  1688. syncQueue = null,
  1689. immediateQueueCallbackNode = null,
  1690. isFlushingSyncQueue = !1,
  1691. initialTimeMs = Scheduler_now(),
  1692. now =
  1693. 1e4 > initialTimeMs
  1694. ? Scheduler_now
  1695. : function() {
  1696. return Scheduler_now() - initialTimeMs;
  1697. };
  1698. function getCurrentPriorityLevel() {
  1699. switch (Scheduler_getCurrentPriorityLevel()) {
  1700. case Scheduler_ImmediatePriority:
  1701. return 99;
  1702. case Scheduler_UserBlockingPriority:
  1703. return 98;
  1704. case Scheduler_NormalPriority:
  1705. return 97;
  1706. case Scheduler_LowPriority:
  1707. return 96;
  1708. case Scheduler_IdlePriority:
  1709. return 95;
  1710. default:
  1711. throw Error("Unknown priority level.");
  1712. }
  1713. }
  1714. function reactPriorityToSchedulerPriority(reactPriorityLevel) {
  1715. switch (reactPriorityLevel) {
  1716. case 99:
  1717. return Scheduler_ImmediatePriority;
  1718. case 98:
  1719. return Scheduler_UserBlockingPriority;
  1720. case 97:
  1721. return Scheduler_NormalPriority;
  1722. case 96:
  1723. return Scheduler_LowPriority;
  1724. case 95:
  1725. return Scheduler_IdlePriority;
  1726. default:
  1727. throw Error("Unknown priority level.");
  1728. }
  1729. }
  1730. function runWithPriority(reactPriorityLevel, fn) {
  1731. reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  1732. return Scheduler_runWithPriority(reactPriorityLevel, fn);
  1733. }
  1734. function scheduleCallback(reactPriorityLevel, callback, options) {
  1735. reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  1736. return Scheduler_scheduleCallback(reactPriorityLevel, callback, options);
  1737. }
  1738. function scheduleSyncCallback(callback) {
  1739. null === syncQueue
  1740. ? ((syncQueue = [callback]),
  1741. (immediateQueueCallbackNode = Scheduler_scheduleCallback(
  1742. Scheduler_ImmediatePriority,
  1743. flushSyncCallbackQueueImpl
  1744. )))
  1745. : syncQueue.push(callback);
  1746. return fakeCallbackNode;
  1747. }
  1748. function flushSyncCallbackQueue() {
  1749. if (null !== immediateQueueCallbackNode) {
  1750. var node = immediateQueueCallbackNode;
  1751. immediateQueueCallbackNode = null;
  1752. Scheduler_cancelCallback(node);
  1753. }
  1754. flushSyncCallbackQueueImpl();
  1755. }
  1756. function flushSyncCallbackQueueImpl() {
  1757. if (!isFlushingSyncQueue && null !== syncQueue) {
  1758. isFlushingSyncQueue = !0;
  1759. var i = 0;
  1760. try {
  1761. var queue = syncQueue;
  1762. runWithPriority(99, function() {
  1763. for (; i < queue.length; i++) {
  1764. var callback = queue[i];
  1765. do callback = callback(!0);
  1766. while (null !== callback);
  1767. }
  1768. });
  1769. syncQueue = null;
  1770. } catch (error) {
  1771. throw (null !== syncQueue && (syncQueue = syncQueue.slice(i + 1)),
  1772. Scheduler_scheduleCallback(
  1773. Scheduler_ImmediatePriority,
  1774. flushSyncCallbackQueue
  1775. ),
  1776. error);
  1777. } finally {
  1778. isFlushingSyncQueue = !1;
  1779. }
  1780. }
  1781. }
  1782. function is(x, y) {
  1783. return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
  1784. }
  1785. var objectIs = "function" === typeof Object.is ? Object.is : is,
  1786. hasOwnProperty = Object.prototype.hasOwnProperty;
  1787. function shallowEqual(objA, objB) {
  1788. if (objectIs(objA, objB)) return !0;
  1789. if (
  1790. "object" !== typeof objA ||
  1791. null === objA ||
  1792. "object" !== typeof objB ||
  1793. null === objB
  1794. )
  1795. return !1;
  1796. var keysA = Object.keys(objA),
  1797. keysB = Object.keys(objB);
  1798. if (keysA.length !== keysB.length) return !1;
  1799. for (keysB = 0; keysB < keysA.length; keysB++)
  1800. if (
  1801. !hasOwnProperty.call(objB, keysA[keysB]) ||
  1802. !objectIs(objA[keysA[keysB]], objB[keysA[keysB]])
  1803. )
  1804. return !1;
  1805. return !0;
  1806. }
  1807. var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
  1808. function getStackByFiberInDevAndProd(workInProgress) {
  1809. var info = "";
  1810. do {
  1811. a: switch (workInProgress.tag) {
  1812. case 3:
  1813. case 4:
  1814. case 6:
  1815. case 7:
  1816. case 10:
  1817. case 9:
  1818. var JSCompiler_inline_result = "";
  1819. break a;
  1820. default:
  1821. var owner = workInProgress._debugOwner,
  1822. source = workInProgress._debugSource,
  1823. name = getComponentName(workInProgress.type);
  1824. JSCompiler_inline_result = null;
  1825. owner && (JSCompiler_inline_result = getComponentName(owner.type));
  1826. owner = name;
  1827. name = "";
  1828. source
  1829. ? (name =
  1830. " (at " +
  1831. source.fileName.replace(BEFORE_SLASH_RE, "") +
  1832. ":" +
  1833. source.lineNumber +
  1834. ")")
  1835. : JSCompiler_inline_result &&
  1836. (name = " (created by " + JSCompiler_inline_result + ")");
  1837. JSCompiler_inline_result = "\n in " + (owner || "Unknown") + name;
  1838. }
  1839. info += JSCompiler_inline_result;
  1840. workInProgress = workInProgress.return;
  1841. } while (workInProgress);
  1842. return info;
  1843. }
  1844. function resolveDefaultProps(Component, baseProps) {
  1845. if (Component && Component.defaultProps) {
  1846. baseProps = Object.assign({}, baseProps);
  1847. Component = Component.defaultProps;
  1848. for (var propName in Component)
  1849. void 0 === baseProps[propName] &&
  1850. (baseProps[propName] = Component[propName]);
  1851. }
  1852. return baseProps;
  1853. }
  1854. var valueCursor = { current: null },
  1855. currentlyRenderingFiber = null,
  1856. lastContextDependency = null,
  1857. lastContextWithAllBitsObserved = null;
  1858. function resetContextDependencies() {
  1859. lastContextWithAllBitsObserved = lastContextDependency = currentlyRenderingFiber = null;
  1860. }
  1861. function popProvider(providerFiber) {
  1862. var currentValue = valueCursor.current;
  1863. pop(valueCursor);
  1864. providerFiber.type._context._currentValue2 = currentValue;
  1865. }
  1866. function scheduleWorkOnParentPath(parent, renderExpirationTime) {
  1867. for (; null !== parent; ) {
  1868. var alternate = parent.alternate;
  1869. if (parent.childExpirationTime < renderExpirationTime)
  1870. (parent.childExpirationTime = renderExpirationTime),
  1871. null !== alternate &&
  1872. alternate.childExpirationTime < renderExpirationTime &&
  1873. (alternate.childExpirationTime = renderExpirationTime);
  1874. else if (
  1875. null !== alternate &&
  1876. alternate.childExpirationTime < renderExpirationTime
  1877. )
  1878. alternate.childExpirationTime = renderExpirationTime;
  1879. else break;
  1880. parent = parent.return;
  1881. }
  1882. }
  1883. function prepareToReadContext(workInProgress, renderExpirationTime) {
  1884. currentlyRenderingFiber = workInProgress;
  1885. lastContextWithAllBitsObserved = lastContextDependency = null;
  1886. workInProgress = workInProgress.dependencies;
  1887. null !== workInProgress &&
  1888. null !== workInProgress.firstContext &&
  1889. (workInProgress.expirationTime >= renderExpirationTime &&
  1890. (didReceiveUpdate = !0),
  1891. (workInProgress.firstContext = null));
  1892. }
  1893. function readContext(context, observedBits) {
  1894. if (
  1895. lastContextWithAllBitsObserved !== context &&
  1896. !1 !== observedBits &&
  1897. 0 !== observedBits
  1898. ) {
  1899. if ("number" !== typeof observedBits || 1073741823 === observedBits)
  1900. (lastContextWithAllBitsObserved = context), (observedBits = 1073741823);
  1901. observedBits = { context: context, observedBits: observedBits, next: null };
  1902. if (null === lastContextDependency) {
  1903. if (null === currentlyRenderingFiber)
  1904. throw Error(
  1905. "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
  1906. );
  1907. lastContextDependency = observedBits;
  1908. currentlyRenderingFiber.dependencies = {
  1909. expirationTime: 0,
  1910. firstContext: observedBits,
  1911. responders: null
  1912. };
  1913. } else lastContextDependency = lastContextDependency.next = observedBits;
  1914. }
  1915. return context._currentValue2;
  1916. }
  1917. var hasForceUpdate = !1;
  1918. function initializeUpdateQueue(fiber) {
  1919. fiber.updateQueue = {
  1920. baseState: fiber.memoizedState,
  1921. baseQueue: null,
  1922. shared: { pending: null },
  1923. effects: null
  1924. };
  1925. }
  1926. function cloneUpdateQueue(current, workInProgress) {
  1927. current = current.updateQueue;
  1928. workInProgress.updateQueue === current &&
  1929. (workInProgress.updateQueue = {
  1930. baseState: current.baseState,
  1931. baseQueue: current.baseQueue,
  1932. shared: current.shared,
  1933. effects: current.effects
  1934. });
  1935. }
  1936. function createUpdate(expirationTime, suspenseConfig) {
  1937. expirationTime = {
  1938. expirationTime: expirationTime,
  1939. suspenseConfig: suspenseConfig,
  1940. tag: 0,
  1941. payload: null,
  1942. callback: null,
  1943. next: null
  1944. };
  1945. return (expirationTime.next = expirationTime);
  1946. }
  1947. function enqueueUpdate(fiber, update) {
  1948. fiber = fiber.updateQueue;
  1949. if (null !== fiber) {
  1950. fiber = fiber.shared;
  1951. var pending = fiber.pending;
  1952. null === pending
  1953. ? (update.next = update)
  1954. : ((update.next = pending.next), (pending.next = update));
  1955. fiber.pending = update;
  1956. }
  1957. }
  1958. function enqueueCapturedUpdate(workInProgress, update) {
  1959. var current = workInProgress.alternate;
  1960. null !== current && cloneUpdateQueue(current, workInProgress);
  1961. workInProgress = workInProgress.updateQueue;
  1962. current = workInProgress.baseQueue;
  1963. null === current
  1964. ? ((workInProgress.baseQueue = update.next = update),
  1965. (update.next = update))
  1966. : ((update.next = current.next), (current.next = update));
  1967. }
  1968. function processUpdateQueue(
  1969. workInProgress$jscomp$0,
  1970. props,
  1971. instance,
  1972. renderExpirationTime
  1973. ) {
  1974. var queue = workInProgress$jscomp$0.updateQueue;
  1975. hasForceUpdate = !1;
  1976. var baseQueue = queue.baseQueue,
  1977. pendingQueue = queue.shared.pending;
  1978. if (null !== pendingQueue) {
  1979. if (null !== baseQueue) {
  1980. var baseFirst = baseQueue.next;
  1981. baseQueue.next = pendingQueue.next;
  1982. pendingQueue.next = baseFirst;
  1983. }
  1984. baseQueue = pendingQueue;
  1985. queue.shared.pending = null;
  1986. baseFirst = workInProgress$jscomp$0.alternate;
  1987. null !== baseFirst &&
  1988. ((baseFirst = baseFirst.updateQueue),
  1989. null !== baseFirst && (baseFirst.baseQueue = pendingQueue));
  1990. }
  1991. if (null !== baseQueue) {
  1992. baseFirst = baseQueue.next;
  1993. var newState = queue.baseState,
  1994. newExpirationTime = 0,
  1995. newBaseState = null,
  1996. newBaseQueueFirst = null,
  1997. newBaseQueueLast = null;
  1998. if (null !== baseFirst) {
  1999. var update = baseFirst;
  2000. do {
  2001. pendingQueue = update.expirationTime;
  2002. if (pendingQueue < renderExpirationTime) {
  2003. var clone = {
  2004. expirationTime: update.expirationTime,
  2005. suspenseConfig: update.suspenseConfig,
  2006. tag: update.tag,
  2007. payload: update.payload,
  2008. callback: update.callback,
  2009. next: null
  2010. };
  2011. null === newBaseQueueLast
  2012. ? ((newBaseQueueFirst = newBaseQueueLast = clone),
  2013. (newBaseState = newState))
  2014. : (newBaseQueueLast = newBaseQueueLast.next = clone);
  2015. pendingQueue > newExpirationTime &&
  2016. (newExpirationTime = pendingQueue);
  2017. } else {
  2018. null !== newBaseQueueLast &&
  2019. (newBaseQueueLast = newBaseQueueLast.next = {
  2020. expirationTime: 1073741823,
  2021. suspenseConfig: update.suspenseConfig,
  2022. tag: update.tag,
  2023. payload: update.payload,
  2024. callback: update.callback,
  2025. next: null
  2026. });
  2027. markRenderEventTimeAndConfig(pendingQueue, update.suspenseConfig);
  2028. a: {
  2029. var workInProgress = workInProgress$jscomp$0,
  2030. update$jscomp$0 = update;
  2031. pendingQueue = props;
  2032. clone = instance;
  2033. switch (update$jscomp$0.tag) {
  2034. case 1:
  2035. workInProgress = update$jscomp$0.payload;
  2036. if ("function" === typeof workInProgress) {
  2037. newState = workInProgress.call(clone, newState, pendingQueue);
  2038. break a;
  2039. }
  2040. newState = workInProgress;
  2041. break a;
  2042. case 3:
  2043. workInProgress.effectTag =
  2044. (workInProgress.effectTag & -4097) | 64;
  2045. case 0:
  2046. workInProgress = update$jscomp$0.payload;
  2047. pendingQueue =
  2048. "function" === typeof workInProgress
  2049. ? workInProgress.call(clone, newState, pendingQueue)
  2050. : workInProgress;
  2051. if (null === pendingQueue || void 0 === pendingQueue) break a;
  2052. newState = Object.assign({}, newState, pendingQueue);
  2053. break a;
  2054. case 2:
  2055. hasForceUpdate = !0;
  2056. }
  2057. }
  2058. null !== update.callback &&
  2059. ((workInProgress$jscomp$0.effectTag |= 32),
  2060. (pendingQueue = queue.effects),
  2061. null === pendingQueue
  2062. ? (queue.effects = [update])
  2063. : pendingQueue.push(update));
  2064. }
  2065. update = update.next;
  2066. if (null === update || update === baseFirst)
  2067. if (((pendingQueue = queue.shared.pending), null === pendingQueue))
  2068. break;
  2069. else
  2070. (update = baseQueue.next = pendingQueue.next),
  2071. (pendingQueue.next = baseFirst),
  2072. (queue.baseQueue = baseQueue = pendingQueue),
  2073. (queue.shared.pending = null);
  2074. } while (1);
  2075. }
  2076. null === newBaseQueueLast
  2077. ? (newBaseState = newState)
  2078. : (newBaseQueueLast.next = newBaseQueueFirst);
  2079. queue.baseState = newBaseState;
  2080. queue.baseQueue = newBaseQueueLast;
  2081. markUnprocessedUpdateTime(newExpirationTime);
  2082. workInProgress$jscomp$0.expirationTime = newExpirationTime;
  2083. workInProgress$jscomp$0.memoizedState = newState;
  2084. }
  2085. }
  2086. function commitUpdateQueue(finishedWork, finishedQueue, instance) {
  2087. finishedWork = finishedQueue.effects;
  2088. finishedQueue.effects = null;
  2089. if (null !== finishedWork)
  2090. for (
  2091. finishedQueue = 0;
  2092. finishedQueue < finishedWork.length;
  2093. finishedQueue++
  2094. ) {
  2095. var effect = finishedWork[finishedQueue],
  2096. callback = effect.callback;
  2097. if (null !== callback) {
  2098. effect.callback = null;
  2099. if ("function" !== typeof callback)
  2100. throw Error(
  2101. "Invalid argument passed as callback. Expected a function. Instead received: " +
  2102. callback
  2103. );
  2104. callback.call(instance);
  2105. }
  2106. }
  2107. }
  2108. var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
  2109. emptyRefsObject = new React.Component().refs;
  2110. function applyDerivedStateFromProps(
  2111. workInProgress,
  2112. ctor,
  2113. getDerivedStateFromProps,
  2114. nextProps
  2115. ) {
  2116. ctor = workInProgress.memoizedState;
  2117. getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
  2118. getDerivedStateFromProps =
  2119. null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
  2120. ? ctor
  2121. : Object.assign({}, ctor, getDerivedStateFromProps);
  2122. workInProgress.memoizedState = getDerivedStateFromProps;
  2123. 0 === workInProgress.expirationTime &&
  2124. (workInProgress.updateQueue.baseState = getDerivedStateFromProps);
  2125. }
  2126. var classComponentUpdater = {
  2127. isMounted: function(component) {
  2128. return (component = component._reactInternalFiber)
  2129. ? getNearestMountedFiber(component) === component
  2130. : !1;
  2131. },
  2132. enqueueSetState: function(inst, payload, callback) {
  2133. inst = inst._reactInternalFiber;
  2134. var currentTime = requestCurrentTimeForUpdate(),
  2135. suspenseConfig = ReactCurrentBatchConfig.suspense;
  2136. currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
  2137. suspenseConfig = createUpdate(currentTime, suspenseConfig);
  2138. suspenseConfig.payload = payload;
  2139. void 0 !== callback &&
  2140. null !== callback &&
  2141. (suspenseConfig.callback = callback);
  2142. enqueueUpdate(inst, suspenseConfig);
  2143. scheduleWork(inst, currentTime);
  2144. },
  2145. enqueueReplaceState: function(inst, payload, callback) {
  2146. inst = inst._reactInternalFiber;
  2147. var currentTime = requestCurrentTimeForUpdate(),
  2148. suspenseConfig = ReactCurrentBatchConfig.suspense;
  2149. currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
  2150. suspenseConfig = createUpdate(currentTime, suspenseConfig);
  2151. suspenseConfig.tag = 1;
  2152. suspenseConfig.payload = payload;
  2153. void 0 !== callback &&
  2154. null !== callback &&
  2155. (suspenseConfig.callback = callback);
  2156. enqueueUpdate(inst, suspenseConfig);
  2157. scheduleWork(inst, currentTime);
  2158. },
  2159. enqueueForceUpdate: function(inst, callback) {
  2160. inst = inst._reactInternalFiber;
  2161. var currentTime = requestCurrentTimeForUpdate(),
  2162. suspenseConfig = ReactCurrentBatchConfig.suspense;
  2163. currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
  2164. suspenseConfig = createUpdate(currentTime, suspenseConfig);
  2165. suspenseConfig.tag = 2;
  2166. void 0 !== callback &&
  2167. null !== callback &&
  2168. (suspenseConfig.callback = callback);
  2169. enqueueUpdate(inst, suspenseConfig);
  2170. scheduleWork(inst, currentTime);
  2171. }
  2172. };
  2173. function checkShouldComponentUpdate(
  2174. workInProgress,
  2175. ctor,
  2176. oldProps,
  2177. newProps,
  2178. oldState,
  2179. newState,
  2180. nextContext
  2181. ) {
  2182. workInProgress = workInProgress.stateNode;
  2183. return "function" === typeof workInProgress.shouldComponentUpdate
  2184. ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)
  2185. : ctor.prototype && ctor.prototype.isPureReactComponent
  2186. ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)
  2187. : !0;
  2188. }
  2189. function constructClassInstance(workInProgress, ctor, props) {
  2190. var isLegacyContextConsumer = !1,
  2191. unmaskedContext = emptyContextObject;
  2192. var context = ctor.contextType;
  2193. "object" === typeof context && null !== context
  2194. ? (context = readContext(context))
  2195. : ((unmaskedContext = isContextProvider(ctor)
  2196. ? previousContext
  2197. : contextStackCursor.current),
  2198. (isLegacyContextConsumer = ctor.contextTypes),
  2199. (context = (isLegacyContextConsumer =
  2200. null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer)
  2201. ? getMaskedContext(workInProgress, unmaskedContext)
  2202. : emptyContextObject));
  2203. ctor = new ctor(props, context);
  2204. workInProgress.memoizedState =
  2205. null !== ctor.state && void 0 !== ctor.state ? ctor.state : null;
  2206. ctor.updater = classComponentUpdater;
  2207. workInProgress.stateNode = ctor;
  2208. ctor._reactInternalFiber = workInProgress;
  2209. isLegacyContextConsumer &&
  2210. ((workInProgress = workInProgress.stateNode),
  2211. (workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext),
  2212. (workInProgress.__reactInternalMemoizedMaskedChildContext = context));
  2213. return ctor;
  2214. }
  2215. function callComponentWillReceiveProps(
  2216. workInProgress,
  2217. instance,
  2218. newProps,
  2219. nextContext
  2220. ) {
  2221. workInProgress = instance.state;
  2222. "function" === typeof instance.componentWillReceiveProps &&
  2223. instance.componentWillReceiveProps(newProps, nextContext);
  2224. "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
  2225. instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  2226. instance.state !== workInProgress &&
  2227. classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  2228. }
  2229. function mountClassInstance(
  2230. workInProgress,
  2231. ctor,
  2232. newProps,
  2233. renderExpirationTime
  2234. ) {
  2235. var instance = workInProgress.stateNode;
  2236. instance.props = newProps;
  2237. instance.state = workInProgress.memoizedState;
  2238. instance.refs = emptyRefsObject;
  2239. initializeUpdateQueue(workInProgress);
  2240. var contextType = ctor.contextType;
  2241. "object" === typeof contextType && null !== contextType
  2242. ? (instance.context = readContext(contextType))
  2243. : ((contextType = isContextProvider(ctor)
  2244. ? previousContext
  2245. : contextStackCursor.current),
  2246. (instance.context = getMaskedContext(workInProgress, contextType)));
  2247. processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
  2248. instance.state = workInProgress.memoizedState;
  2249. contextType = ctor.getDerivedStateFromProps;
  2250. "function" === typeof contextType &&
  2251. (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps),
  2252. (instance.state = workInProgress.memoizedState));
  2253. "function" === typeof ctor.getDerivedStateFromProps ||
  2254. "function" === typeof instance.getSnapshotBeforeUpdate ||
  2255. ("function" !== typeof instance.UNSAFE_componentWillMount &&
  2256. "function" !== typeof instance.componentWillMount) ||
  2257. ((ctor = instance.state),
  2258. "function" === typeof instance.componentWillMount &&
  2259. instance.componentWillMount(),
  2260. "function" === typeof instance.UNSAFE_componentWillMount &&
  2261. instance.UNSAFE_componentWillMount(),
  2262. ctor !== instance.state &&
  2263. classComponentUpdater.enqueueReplaceState(instance, instance.state, null),
  2264. processUpdateQueue(
  2265. workInProgress,
  2266. newProps,
  2267. instance,
  2268. renderExpirationTime
  2269. ),
  2270. (instance.state = workInProgress.memoizedState));
  2271. "function" === typeof instance.componentDidMount &&
  2272. (workInProgress.effectTag |= 4);
  2273. }
  2274. var isArray = Array.isArray;
  2275. function coerceRef(returnFiber, current, element) {
  2276. returnFiber = element.ref;
  2277. if (
  2278. null !== returnFiber &&
  2279. "function" !== typeof returnFiber &&
  2280. "object" !== typeof returnFiber
  2281. ) {
  2282. if (element._owner) {
  2283. element = element._owner;
  2284. if (element) {
  2285. if (1 !== element.tag)
  2286. throw Error(
  2287. "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref"
  2288. );
  2289. var inst = element.stateNode;
  2290. }
  2291. if (!inst)
  2292. throw Error(
  2293. "Missing owner for string ref " +
  2294. returnFiber +
  2295. ". This error is likely caused by a bug in React. Please file an issue."
  2296. );
  2297. var stringRef = "" + returnFiber;
  2298. if (
  2299. null !== current &&
  2300. null !== current.ref &&
  2301. "function" === typeof current.ref &&
  2302. current.ref._stringRef === stringRef
  2303. )
  2304. return current.ref;
  2305. current = function(value) {
  2306. var refs = inst.refs;
  2307. refs === emptyRefsObject && (refs = inst.refs = {});
  2308. null === value ? delete refs[stringRef] : (refs[stringRef] = value);
  2309. };
  2310. current._stringRef = stringRef;
  2311. return current;
  2312. }
  2313. if ("string" !== typeof returnFiber)
  2314. throw Error(
  2315. "Expected ref to be a function, a string, an object returned by React.createRef(), or null."
  2316. );
  2317. if (!element._owner)
  2318. throw Error(
  2319. "Element ref was specified as a string (" +
  2320. returnFiber +
  2321. ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information."
  2322. );
  2323. }
  2324. return returnFiber;
  2325. }
  2326. function throwOnInvalidObjectType(returnFiber, newChild) {
  2327. if ("textarea" !== returnFiber.type)
  2328. throw Error(
  2329. "Objects are not valid as a React child (found: " +
  2330. ("[object Object]" === Object.prototype.toString.call(newChild)
  2331. ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
  2332. : newChild) +
  2333. ")."
  2334. );
  2335. }
  2336. function ChildReconciler(shouldTrackSideEffects) {
  2337. function deleteChild(returnFiber, childToDelete) {
  2338. if (shouldTrackSideEffects) {
  2339. var last = returnFiber.lastEffect;
  2340. null !== last
  2341. ? ((last.nextEffect = childToDelete),
  2342. (returnFiber.lastEffect = childToDelete))
  2343. : (returnFiber.firstEffect = returnFiber.lastEffect = childToDelete);
  2344. childToDelete.nextEffect = null;
  2345. childToDelete.effectTag = 8;
  2346. }
  2347. }
  2348. function deleteRemainingChildren(returnFiber, currentFirstChild) {
  2349. if (!shouldTrackSideEffects) return null;
  2350. for (; null !== currentFirstChild; )
  2351. deleteChild(returnFiber, currentFirstChild),
  2352. (currentFirstChild = currentFirstChild.sibling);
  2353. return null;
  2354. }
  2355. function mapRemainingChildren(returnFiber, currentFirstChild) {
  2356. for (returnFiber = new Map(); null !== currentFirstChild; )
  2357. null !== currentFirstChild.key
  2358. ? returnFiber.set(currentFirstChild.key, currentFirstChild)
  2359. : returnFiber.set(currentFirstChild.index, currentFirstChild),
  2360. (currentFirstChild = currentFirstChild.sibling);
  2361. return returnFiber;
  2362. }
  2363. function useFiber(fiber, pendingProps) {
  2364. fiber = createWorkInProgress(fiber, pendingProps);
  2365. fiber.index = 0;
  2366. fiber.sibling = null;
  2367. return fiber;
  2368. }
  2369. function placeChild(newFiber, lastPlacedIndex, newIndex) {
  2370. newFiber.index = newIndex;
  2371. if (!shouldTrackSideEffects) return lastPlacedIndex;
  2372. newIndex = newFiber.alternate;
  2373. if (null !== newIndex)
  2374. return (
  2375. (newIndex = newIndex.index),
  2376. newIndex < lastPlacedIndex
  2377. ? ((newFiber.effectTag = 2), lastPlacedIndex)
  2378. : newIndex
  2379. );
  2380. newFiber.effectTag = 2;
  2381. return lastPlacedIndex;
  2382. }
  2383. function placeSingleChild(newFiber) {
  2384. shouldTrackSideEffects &&
  2385. null === newFiber.alternate &&
  2386. (newFiber.effectTag = 2);
  2387. return newFiber;
  2388. }
  2389. function updateTextNode(returnFiber, current, textContent, expirationTime) {
  2390. if (null === current || 6 !== current.tag)
  2391. return (
  2392. (current = createFiberFromText(
  2393. textContent,
  2394. returnFiber.mode,
  2395. expirationTime
  2396. )),
  2397. (current.return = returnFiber),
  2398. current
  2399. );
  2400. current = useFiber(current, textContent);
  2401. current.return = returnFiber;
  2402. return current;
  2403. }
  2404. function updateElement(returnFiber, current, element, expirationTime) {
  2405. if (null !== current && current.elementType === element.type)
  2406. return (
  2407. (expirationTime = useFiber(current, element.props)),
  2408. (expirationTime.ref = coerceRef(returnFiber, current, element)),
  2409. (expirationTime.return = returnFiber),
  2410. expirationTime
  2411. );
  2412. expirationTime = createFiberFromTypeAndProps(
  2413. element.type,
  2414. element.key,
  2415. element.props,
  2416. null,
  2417. returnFiber.mode,
  2418. expirationTime
  2419. );
  2420. expirationTime.ref = coerceRef(returnFiber, current, element);
  2421. expirationTime.return = returnFiber;
  2422. return expirationTime;
  2423. }
  2424. function updatePortal(returnFiber, current, portal, expirationTime) {
  2425. if (
  2426. null === current ||
  2427. 4 !== current.tag ||
  2428. current.stateNode.containerInfo !== portal.containerInfo ||
  2429. current.stateNode.implementation !== portal.implementation
  2430. )
  2431. return (
  2432. (current = createFiberFromPortal(
  2433. portal,
  2434. returnFiber.mode,
  2435. expirationTime
  2436. )),
  2437. (current.return = returnFiber),
  2438. current
  2439. );
  2440. current = useFiber(current, portal.children || []);
  2441. current.return = returnFiber;
  2442. return current;
  2443. }
  2444. function updateFragment(returnFiber, current, fragment, expirationTime, key) {
  2445. if (null === current || 7 !== current.tag)
  2446. return (
  2447. (current = createFiberFromFragment(
  2448. fragment,
  2449. returnFiber.mode,
  2450. expirationTime,
  2451. key
  2452. )),
  2453. (current.return = returnFiber),
  2454. current
  2455. );
  2456. current = useFiber(current, fragment);
  2457. current.return = returnFiber;
  2458. return current;
  2459. }
  2460. function createChild(returnFiber, newChild, expirationTime) {
  2461. if ("string" === typeof newChild || "number" === typeof newChild)
  2462. return (
  2463. (newChild = createFiberFromText(
  2464. "" + newChild,
  2465. returnFiber.mode,
  2466. expirationTime
  2467. )),
  2468. (newChild.return = returnFiber),
  2469. newChild
  2470. );
  2471. if ("object" === typeof newChild && null !== newChild) {
  2472. switch (newChild.$$typeof) {
  2473. case REACT_ELEMENT_TYPE:
  2474. return (
  2475. (expirationTime = createFiberFromTypeAndProps(
  2476. newChild.type,
  2477. newChild.key,
  2478. newChild.props,
  2479. null,
  2480. returnFiber.mode,
  2481. expirationTime
  2482. )),
  2483. (expirationTime.ref = coerceRef(returnFiber, null, newChild)),
  2484. (expirationTime.return = returnFiber),
  2485. expirationTime
  2486. );
  2487. case REACT_PORTAL_TYPE:
  2488. return (
  2489. (newChild = createFiberFromPortal(
  2490. newChild,
  2491. returnFiber.mode,
  2492. expirationTime
  2493. )),
  2494. (newChild.return = returnFiber),
  2495. newChild
  2496. );
  2497. }
  2498. if (isArray(newChild) || getIteratorFn(newChild))
  2499. return (
  2500. (newChild = createFiberFromFragment(
  2501. newChild,
  2502. returnFiber.mode,
  2503. expirationTime,
  2504. null
  2505. )),
  2506. (newChild.return = returnFiber),
  2507. newChild
  2508. );
  2509. throwOnInvalidObjectType(returnFiber, newChild);
  2510. }
  2511. return null;
  2512. }
  2513. function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
  2514. var key = null !== oldFiber ? oldFiber.key : null;
  2515. if ("string" === typeof newChild || "number" === typeof newChild)
  2516. return null !== key
  2517. ? null
  2518. : updateTextNode(returnFiber, oldFiber, "" + newChild, expirationTime);
  2519. if ("object" === typeof newChild && null !== newChild) {
  2520. switch (newChild.$$typeof) {
  2521. case REACT_ELEMENT_TYPE:
  2522. return newChild.key === key
  2523. ? newChild.type === REACT_FRAGMENT_TYPE
  2524. ? updateFragment(
  2525. returnFiber,
  2526. oldFiber,
  2527. newChild.props.children,
  2528. expirationTime,
  2529. key
  2530. )
  2531. : updateElement(returnFiber, oldFiber, newChild, expirationTime)
  2532. : null;
  2533. case REACT_PORTAL_TYPE:
  2534. return newChild.key === key
  2535. ? updatePortal(returnFiber, oldFiber, newChild, expirationTime)
  2536. : null;
  2537. }
  2538. if (isArray(newChild) || getIteratorFn(newChild))
  2539. return null !== key
  2540. ? null
  2541. : updateFragment(
  2542. returnFiber,
  2543. oldFiber,
  2544. newChild,
  2545. expirationTime,
  2546. null
  2547. );
  2548. throwOnInvalidObjectType(returnFiber, newChild);
  2549. }
  2550. return null;
  2551. }
  2552. function updateFromMap(
  2553. existingChildren,
  2554. returnFiber,
  2555. newIdx,
  2556. newChild,
  2557. expirationTime
  2558. ) {
  2559. if ("string" === typeof newChild || "number" === typeof newChild)
  2560. return (
  2561. (existingChildren = existingChildren.get(newIdx) || null),
  2562. updateTextNode(
  2563. returnFiber,
  2564. existingChildren,
  2565. "" + newChild,
  2566. expirationTime
  2567. )
  2568. );
  2569. if ("object" === typeof newChild && null !== newChild) {
  2570. switch (newChild.$$typeof) {
  2571. case REACT_ELEMENT_TYPE:
  2572. return (
  2573. (existingChildren =
  2574. existingChildren.get(
  2575. null === newChild.key ? newIdx : newChild.key
  2576. ) || null),
  2577. newChild.type === REACT_FRAGMENT_TYPE
  2578. ? updateFragment(
  2579. returnFiber,
  2580. existingChildren,
  2581. newChild.props.children,
  2582. expirationTime,
  2583. newChild.key
  2584. )
  2585. : updateElement(
  2586. returnFiber,
  2587. existingChildren,
  2588. newChild,
  2589. expirationTime
  2590. )
  2591. );
  2592. case REACT_PORTAL_TYPE:
  2593. return (
  2594. (existingChildren =
  2595. existingChildren.get(
  2596. null === newChild.key ? newIdx : newChild.key
  2597. ) || null),
  2598. updatePortal(
  2599. returnFiber,
  2600. existingChildren,
  2601. newChild,
  2602. expirationTime
  2603. )
  2604. );
  2605. }
  2606. if (isArray(newChild) || getIteratorFn(newChild))
  2607. return (
  2608. (existingChildren = existingChildren.get(newIdx) || null),
  2609. updateFragment(
  2610. returnFiber,
  2611. existingChildren,
  2612. newChild,
  2613. expirationTime,
  2614. null
  2615. )
  2616. );
  2617. throwOnInvalidObjectType(returnFiber, newChild);
  2618. }
  2619. return null;
  2620. }
  2621. function reconcileChildrenArray(
  2622. returnFiber,
  2623. currentFirstChild,
  2624. newChildren,
  2625. expirationTime
  2626. ) {
  2627. for (
  2628. var resultingFirstChild = null,
  2629. previousNewFiber = null,
  2630. oldFiber = currentFirstChild,
  2631. newIdx = (currentFirstChild = 0),
  2632. nextOldFiber = null;
  2633. null !== oldFiber && newIdx < newChildren.length;
  2634. newIdx++
  2635. ) {
  2636. oldFiber.index > newIdx
  2637. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  2638. : (nextOldFiber = oldFiber.sibling);
  2639. var newFiber = updateSlot(
  2640. returnFiber,
  2641. oldFiber,
  2642. newChildren[newIdx],
  2643. expirationTime
  2644. );
  2645. if (null === newFiber) {
  2646. null === oldFiber && (oldFiber = nextOldFiber);
  2647. break;
  2648. }
  2649. shouldTrackSideEffects &&
  2650. oldFiber &&
  2651. null === newFiber.alternate &&
  2652. deleteChild(returnFiber, oldFiber);
  2653. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  2654. null === previousNewFiber
  2655. ? (resultingFirstChild = newFiber)
  2656. : (previousNewFiber.sibling = newFiber);
  2657. previousNewFiber = newFiber;
  2658. oldFiber = nextOldFiber;
  2659. }
  2660. if (newIdx === newChildren.length)
  2661. return (
  2662. deleteRemainingChildren(returnFiber, oldFiber), resultingFirstChild
  2663. );
  2664. if (null === oldFiber) {
  2665. for (; newIdx < newChildren.length; newIdx++)
  2666. (oldFiber = createChild(
  2667. returnFiber,
  2668. newChildren[newIdx],
  2669. expirationTime
  2670. )),
  2671. null !== oldFiber &&
  2672. ((currentFirstChild = placeChild(
  2673. oldFiber,
  2674. currentFirstChild,
  2675. newIdx
  2676. )),
  2677. null === previousNewFiber
  2678. ? (resultingFirstChild = oldFiber)
  2679. : (previousNewFiber.sibling = oldFiber),
  2680. (previousNewFiber = oldFiber));
  2681. return resultingFirstChild;
  2682. }
  2683. for (
  2684. oldFiber = mapRemainingChildren(returnFiber, oldFiber);
  2685. newIdx < newChildren.length;
  2686. newIdx++
  2687. )
  2688. (nextOldFiber = updateFromMap(
  2689. oldFiber,
  2690. returnFiber,
  2691. newIdx,
  2692. newChildren[newIdx],
  2693. expirationTime
  2694. )),
  2695. null !== nextOldFiber &&
  2696. (shouldTrackSideEffects &&
  2697. null !== nextOldFiber.alternate &&
  2698. oldFiber.delete(
  2699. null === nextOldFiber.key ? newIdx : nextOldFiber.key
  2700. ),
  2701. (currentFirstChild = placeChild(
  2702. nextOldFiber,
  2703. currentFirstChild,
  2704. newIdx
  2705. )),
  2706. null === previousNewFiber
  2707. ? (resultingFirstChild = nextOldFiber)
  2708. : (previousNewFiber.sibling = nextOldFiber),
  2709. (previousNewFiber = nextOldFiber));
  2710. shouldTrackSideEffects &&
  2711. oldFiber.forEach(function(child) {
  2712. return deleteChild(returnFiber, child);
  2713. });
  2714. return resultingFirstChild;
  2715. }
  2716. function reconcileChildrenIterator(
  2717. returnFiber,
  2718. currentFirstChild,
  2719. newChildrenIterable,
  2720. expirationTime
  2721. ) {
  2722. var iteratorFn = getIteratorFn(newChildrenIterable);
  2723. if ("function" !== typeof iteratorFn)
  2724. throw Error(
  2725. "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
  2726. );
  2727. newChildrenIterable = iteratorFn.call(newChildrenIterable);
  2728. if (null == newChildrenIterable)
  2729. throw Error("An iterable object provided no iterator.");
  2730. for (
  2731. var previousNewFiber = (iteratorFn = null),
  2732. oldFiber = currentFirstChild,
  2733. newIdx = (currentFirstChild = 0),
  2734. nextOldFiber = null,
  2735. step = newChildrenIterable.next();
  2736. null !== oldFiber && !step.done;
  2737. newIdx++, step = newChildrenIterable.next()
  2738. ) {
  2739. oldFiber.index > newIdx
  2740. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  2741. : (nextOldFiber = oldFiber.sibling);
  2742. var newFiber = updateSlot(
  2743. returnFiber,
  2744. oldFiber,
  2745. step.value,
  2746. expirationTime
  2747. );
  2748. if (null === newFiber) {
  2749. null === oldFiber && (oldFiber = nextOldFiber);
  2750. break;
  2751. }
  2752. shouldTrackSideEffects &&
  2753. oldFiber &&
  2754. null === newFiber.alternate &&
  2755. deleteChild(returnFiber, oldFiber);
  2756. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  2757. null === previousNewFiber
  2758. ? (iteratorFn = newFiber)
  2759. : (previousNewFiber.sibling = newFiber);
  2760. previousNewFiber = newFiber;
  2761. oldFiber = nextOldFiber;
  2762. }
  2763. if (step.done)
  2764. return deleteRemainingChildren(returnFiber, oldFiber), iteratorFn;
  2765. if (null === oldFiber) {
  2766. for (; !step.done; newIdx++, step = newChildrenIterable.next())
  2767. (step = createChild(returnFiber, step.value, expirationTime)),
  2768. null !== step &&
  2769. ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
  2770. null === previousNewFiber
  2771. ? (iteratorFn = step)
  2772. : (previousNewFiber.sibling = step),
  2773. (previousNewFiber = step));
  2774. return iteratorFn;
  2775. }
  2776. for (
  2777. oldFiber = mapRemainingChildren(returnFiber, oldFiber);
  2778. !step.done;
  2779. newIdx++, step = newChildrenIterable.next()
  2780. )
  2781. (step = updateFromMap(
  2782. oldFiber,
  2783. returnFiber,
  2784. newIdx,
  2785. step.value,
  2786. expirationTime
  2787. )),
  2788. null !== step &&
  2789. (shouldTrackSideEffects &&
  2790. null !== step.alternate &&
  2791. oldFiber.delete(null === step.key ? newIdx : step.key),
  2792. (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
  2793. null === previousNewFiber
  2794. ? (iteratorFn = step)
  2795. : (previousNewFiber.sibling = step),
  2796. (previousNewFiber = step));
  2797. shouldTrackSideEffects &&
  2798. oldFiber.forEach(function(child) {
  2799. return deleteChild(returnFiber, child);
  2800. });
  2801. return iteratorFn;
  2802. }
  2803. return function(returnFiber, currentFirstChild, newChild, expirationTime) {
  2804. var isUnkeyedTopLevelFragment =
  2805. "object" === typeof newChild &&
  2806. null !== newChild &&
  2807. newChild.type === REACT_FRAGMENT_TYPE &&
  2808. null === newChild.key;
  2809. isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
  2810. var isObject = "object" === typeof newChild && null !== newChild;
  2811. if (isObject)
  2812. switch (newChild.$$typeof) {
  2813. case REACT_ELEMENT_TYPE:
  2814. a: {
  2815. isObject = newChild.key;
  2816. for (
  2817. isUnkeyedTopLevelFragment = currentFirstChild;
  2818. null !== isUnkeyedTopLevelFragment;
  2819. ) {
  2820. if (isUnkeyedTopLevelFragment.key === isObject) {
  2821. switch (isUnkeyedTopLevelFragment.tag) {
  2822. case 7:
  2823. if (newChild.type === REACT_FRAGMENT_TYPE) {
  2824. deleteRemainingChildren(
  2825. returnFiber,
  2826. isUnkeyedTopLevelFragment.sibling
  2827. );
  2828. currentFirstChild = useFiber(
  2829. isUnkeyedTopLevelFragment,
  2830. newChild.props.children
  2831. );
  2832. currentFirstChild.return = returnFiber;
  2833. returnFiber = currentFirstChild;
  2834. break a;
  2835. }
  2836. break;
  2837. default:
  2838. if (
  2839. isUnkeyedTopLevelFragment.elementType === newChild.type
  2840. ) {
  2841. deleteRemainingChildren(
  2842. returnFiber,
  2843. isUnkeyedTopLevelFragment.sibling
  2844. );
  2845. currentFirstChild = useFiber(
  2846. isUnkeyedTopLevelFragment,
  2847. newChild.props
  2848. );
  2849. currentFirstChild.ref = coerceRef(
  2850. returnFiber,
  2851. isUnkeyedTopLevelFragment,
  2852. newChild
  2853. );
  2854. currentFirstChild.return = returnFiber;
  2855. returnFiber = currentFirstChild;
  2856. break a;
  2857. }
  2858. }
  2859. deleteRemainingChildren(returnFiber, isUnkeyedTopLevelFragment);
  2860. break;
  2861. } else deleteChild(returnFiber, isUnkeyedTopLevelFragment);
  2862. isUnkeyedTopLevelFragment = isUnkeyedTopLevelFragment.sibling;
  2863. }
  2864. newChild.type === REACT_FRAGMENT_TYPE
  2865. ? ((currentFirstChild = createFiberFromFragment(
  2866. newChild.props.children,
  2867. returnFiber.mode,
  2868. expirationTime,
  2869. newChild.key
  2870. )),
  2871. (currentFirstChild.return = returnFiber),
  2872. (returnFiber = currentFirstChild))
  2873. : ((expirationTime = createFiberFromTypeAndProps(
  2874. newChild.type,
  2875. newChild.key,
  2876. newChild.props,
  2877. null,
  2878. returnFiber.mode,
  2879. expirationTime
  2880. )),
  2881. (expirationTime.ref = coerceRef(
  2882. returnFiber,
  2883. currentFirstChild,
  2884. newChild
  2885. )),
  2886. (expirationTime.return = returnFiber),
  2887. (returnFiber = expirationTime));
  2888. }
  2889. return placeSingleChild(returnFiber);
  2890. case REACT_PORTAL_TYPE:
  2891. a: {
  2892. for (
  2893. isUnkeyedTopLevelFragment = newChild.key;
  2894. null !== currentFirstChild;
  2895. ) {
  2896. if (currentFirstChild.key === isUnkeyedTopLevelFragment)
  2897. if (
  2898. 4 === currentFirstChild.tag &&
  2899. currentFirstChild.stateNode.containerInfo ===
  2900. newChild.containerInfo &&
  2901. currentFirstChild.stateNode.implementation ===
  2902. newChild.implementation
  2903. ) {
  2904. deleteRemainingChildren(
  2905. returnFiber,
  2906. currentFirstChild.sibling
  2907. );
  2908. currentFirstChild = useFiber(
  2909. currentFirstChild,
  2910. newChild.children || []
  2911. );
  2912. currentFirstChild.return = returnFiber;
  2913. returnFiber = currentFirstChild;
  2914. break a;
  2915. } else {
  2916. deleteRemainingChildren(returnFiber, currentFirstChild);
  2917. break;
  2918. }
  2919. else deleteChild(returnFiber, currentFirstChild);
  2920. currentFirstChild = currentFirstChild.sibling;
  2921. }
  2922. currentFirstChild = createFiberFromPortal(
  2923. newChild,
  2924. returnFiber.mode,
  2925. expirationTime
  2926. );
  2927. currentFirstChild.return = returnFiber;
  2928. returnFiber = currentFirstChild;
  2929. }
  2930. return placeSingleChild(returnFiber);
  2931. }
  2932. if ("string" === typeof newChild || "number" === typeof newChild)
  2933. return (
  2934. (newChild = "" + newChild),
  2935. null !== currentFirstChild && 6 === currentFirstChild.tag
  2936. ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
  2937. (currentFirstChild = useFiber(currentFirstChild, newChild)),
  2938. (currentFirstChild.return = returnFiber),
  2939. (returnFiber = currentFirstChild))
  2940. : (deleteRemainingChildren(returnFiber, currentFirstChild),
  2941. (currentFirstChild = createFiberFromText(
  2942. newChild,
  2943. returnFiber.mode,
  2944. expirationTime
  2945. )),
  2946. (currentFirstChild.return = returnFiber),
  2947. (returnFiber = currentFirstChild)),
  2948. placeSingleChild(returnFiber)
  2949. );
  2950. if (isArray(newChild))
  2951. return reconcileChildrenArray(
  2952. returnFiber,
  2953. currentFirstChild,
  2954. newChild,
  2955. expirationTime
  2956. );
  2957. if (getIteratorFn(newChild))
  2958. return reconcileChildrenIterator(
  2959. returnFiber,
  2960. currentFirstChild,
  2961. newChild,
  2962. expirationTime
  2963. );
  2964. isObject && throwOnInvalidObjectType(returnFiber, newChild);
  2965. if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
  2966. switch (returnFiber.tag) {
  2967. case 1:
  2968. case 0:
  2969. throw ((returnFiber = returnFiber.type),
  2970. Error(
  2971. (returnFiber.displayName || returnFiber.name || "Component") +
  2972. "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."
  2973. ));
  2974. }
  2975. return deleteRemainingChildren(returnFiber, currentFirstChild);
  2976. };
  2977. }
  2978. var reconcileChildFibers = ChildReconciler(!0),
  2979. mountChildFibers = ChildReconciler(!1),
  2980. NO_CONTEXT = {},
  2981. contextStackCursor$1 = { current: NO_CONTEXT },
  2982. contextFiberStackCursor = { current: NO_CONTEXT },
  2983. rootInstanceStackCursor = { current: NO_CONTEXT };
  2984. function requiredContext(c) {
  2985. if (c === NO_CONTEXT)
  2986. throw Error(
  2987. "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
  2988. );
  2989. return c;
  2990. }
  2991. function pushHostContainer(fiber, nextRootInstance) {
  2992. push(rootInstanceStackCursor, nextRootInstance);
  2993. push(contextFiberStackCursor, fiber);
  2994. push(contextStackCursor$1, NO_CONTEXT);
  2995. pop(contextStackCursor$1);
  2996. push(contextStackCursor$1, { isInAParentText: !1 });
  2997. }
  2998. function popHostContainer() {
  2999. pop(contextStackCursor$1);
  3000. pop(contextFiberStackCursor);
  3001. pop(rootInstanceStackCursor);
  3002. }
  3003. function pushHostContext(fiber) {
  3004. requiredContext(rootInstanceStackCursor.current);
  3005. var context = requiredContext(contextStackCursor$1.current);
  3006. var nextContext = fiber.type;
  3007. nextContext =
  3008. "AndroidTextInput" === nextContext ||
  3009. "RCTMultilineTextInputView" === nextContext ||
  3010. "RCTSinglelineTextInputView" === nextContext ||
  3011. "RCTText" === nextContext ||
  3012. "RCTVirtualText" === nextContext;
  3013. nextContext =
  3014. context.isInAParentText !== nextContext
  3015. ? { isInAParentText: nextContext }
  3016. : context;
  3017. context !== nextContext &&
  3018. (push(contextFiberStackCursor, fiber),
  3019. push(contextStackCursor$1, nextContext));
  3020. }
  3021. function popHostContext(fiber) {
  3022. contextFiberStackCursor.current === fiber &&
  3023. (pop(contextStackCursor$1), pop(contextFiberStackCursor));
  3024. }
  3025. var suspenseStackCursor = { current: 0 };
  3026. function findFirstSuspended(row) {
  3027. for (var node = row; null !== node; ) {
  3028. if (13 === node.tag) {
  3029. var state = node.memoizedState;
  3030. if (null !== state && (null === state.dehydrated || shim$1() || shim$1()))
  3031. return node;
  3032. } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
  3033. if (0 !== (node.effectTag & 64)) return node;
  3034. } else if (null !== node.child) {
  3035. node.child.return = node;
  3036. node = node.child;
  3037. continue;
  3038. }
  3039. if (node === row) break;
  3040. for (; null === node.sibling; ) {
  3041. if (null === node.return || node.return === row) return null;
  3042. node = node.return;
  3043. }
  3044. node.sibling.return = node.return;
  3045. node = node.sibling;
  3046. }
  3047. return null;
  3048. }
  3049. function createDeprecatedResponderListener(responder, props) {
  3050. return { responder: responder, props: props };
  3051. }
  3052. var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
  3053. ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig,
  3054. renderExpirationTime = 0,
  3055. currentlyRenderingFiber$1 = null,
  3056. currentHook = null,
  3057. workInProgressHook = null,
  3058. didScheduleRenderPhaseUpdate = !1;
  3059. function throwInvalidHookError() {
  3060. throw Error(
  3061. "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."
  3062. );
  3063. }
  3064. function areHookInputsEqual(nextDeps, prevDeps) {
  3065. if (null === prevDeps) return !1;
  3066. for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
  3067. if (!objectIs(nextDeps[i], prevDeps[i])) return !1;
  3068. return !0;
  3069. }
  3070. function renderWithHooks(
  3071. current,
  3072. workInProgress,
  3073. Component,
  3074. props,
  3075. secondArg,
  3076. nextRenderExpirationTime
  3077. ) {
  3078. renderExpirationTime = nextRenderExpirationTime;
  3079. currentlyRenderingFiber$1 = workInProgress;
  3080. workInProgress.memoizedState = null;
  3081. workInProgress.updateQueue = null;
  3082. workInProgress.expirationTime = 0;
  3083. ReactCurrentDispatcher.current =
  3084. null === current || null === current.memoizedState
  3085. ? HooksDispatcherOnMount
  3086. : HooksDispatcherOnUpdate;
  3087. current = Component(props, secondArg);
  3088. if (workInProgress.expirationTime === renderExpirationTime) {
  3089. nextRenderExpirationTime = 0;
  3090. do {
  3091. workInProgress.expirationTime = 0;
  3092. if (!(25 > nextRenderExpirationTime))
  3093. throw Error(
  3094. "Too many re-renders. React limits the number of renders to prevent an infinite loop."
  3095. );
  3096. nextRenderExpirationTime += 1;
  3097. workInProgressHook = currentHook = null;
  3098. workInProgress.updateQueue = null;
  3099. ReactCurrentDispatcher.current = HooksDispatcherOnRerender;
  3100. current = Component(props, secondArg);
  3101. } while (workInProgress.expirationTime === renderExpirationTime);
  3102. }
  3103. ReactCurrentDispatcher.current = ContextOnlyDispatcher;
  3104. workInProgress = null !== currentHook && null !== currentHook.next;
  3105. renderExpirationTime = 0;
  3106. workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
  3107. didScheduleRenderPhaseUpdate = !1;
  3108. if (workInProgress)
  3109. throw Error(
  3110. "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
  3111. );
  3112. return current;
  3113. }
  3114. function mountWorkInProgressHook() {
  3115. var hook = {
  3116. memoizedState: null,
  3117. baseState: null,
  3118. baseQueue: null,
  3119. queue: null,
  3120. next: null
  3121. };
  3122. null === workInProgressHook
  3123. ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook)
  3124. : (workInProgressHook = workInProgressHook.next = hook);
  3125. return workInProgressHook;
  3126. }
  3127. function updateWorkInProgressHook() {
  3128. if (null === currentHook) {
  3129. var nextCurrentHook = currentlyRenderingFiber$1.alternate;
  3130. nextCurrentHook =
  3131. null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
  3132. } else nextCurrentHook = currentHook.next;
  3133. var nextWorkInProgressHook =
  3134. null === workInProgressHook
  3135. ? currentlyRenderingFiber$1.memoizedState
  3136. : workInProgressHook.next;
  3137. if (null !== nextWorkInProgressHook)
  3138. (workInProgressHook = nextWorkInProgressHook),
  3139. (currentHook = nextCurrentHook);
  3140. else {
  3141. if (null === nextCurrentHook)
  3142. throw Error("Rendered more hooks than during the previous render.");
  3143. currentHook = nextCurrentHook;
  3144. nextCurrentHook = {
  3145. memoizedState: currentHook.memoizedState,
  3146. baseState: currentHook.baseState,
  3147. baseQueue: currentHook.baseQueue,
  3148. queue: currentHook.queue,
  3149. next: null
  3150. };
  3151. null === workInProgressHook
  3152. ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = nextCurrentHook)
  3153. : (workInProgressHook = workInProgressHook.next = nextCurrentHook);
  3154. }
  3155. return workInProgressHook;
  3156. }
  3157. function basicStateReducer(state, action) {
  3158. return "function" === typeof action ? action(state) : action;
  3159. }
  3160. function updateReducer(reducer) {
  3161. var hook = updateWorkInProgressHook(),
  3162. queue = hook.queue;
  3163. if (null === queue)
  3164. throw Error(
  3165. "Should have a queue. This is likely a bug in React. Please file an issue."
  3166. );
  3167. queue.lastRenderedReducer = reducer;
  3168. var current = currentHook,
  3169. baseQueue = current.baseQueue,
  3170. pendingQueue = queue.pending;
  3171. if (null !== pendingQueue) {
  3172. if (null !== baseQueue) {
  3173. var baseFirst = baseQueue.next;
  3174. baseQueue.next = pendingQueue.next;
  3175. pendingQueue.next = baseFirst;
  3176. }
  3177. current.baseQueue = baseQueue = pendingQueue;
  3178. queue.pending = null;
  3179. }
  3180. if (null !== baseQueue) {
  3181. baseQueue = baseQueue.next;
  3182. current = current.baseState;
  3183. var newBaseQueueLast = (baseFirst = pendingQueue = null),
  3184. update = baseQueue;
  3185. do {
  3186. var updateExpirationTime = update.expirationTime;
  3187. if (updateExpirationTime < renderExpirationTime) {
  3188. var clone = {
  3189. expirationTime: update.expirationTime,
  3190. suspenseConfig: update.suspenseConfig,
  3191. action: update.action,
  3192. eagerReducer: update.eagerReducer,
  3193. eagerState: update.eagerState,
  3194. next: null
  3195. };
  3196. null === newBaseQueueLast
  3197. ? ((baseFirst = newBaseQueueLast = clone), (pendingQueue = current))
  3198. : (newBaseQueueLast = newBaseQueueLast.next = clone);
  3199. updateExpirationTime > currentlyRenderingFiber$1.expirationTime &&
  3200. ((currentlyRenderingFiber$1.expirationTime = updateExpirationTime),
  3201. markUnprocessedUpdateTime(updateExpirationTime));
  3202. } else
  3203. null !== newBaseQueueLast &&
  3204. (newBaseQueueLast = newBaseQueueLast.next = {
  3205. expirationTime: 1073741823,
  3206. suspenseConfig: update.suspenseConfig,
  3207. action: update.action,
  3208. eagerReducer: update.eagerReducer,
  3209. eagerState: update.eagerState,
  3210. next: null
  3211. }),
  3212. markRenderEventTimeAndConfig(
  3213. updateExpirationTime,
  3214. update.suspenseConfig
  3215. ),
  3216. (current =
  3217. update.eagerReducer === reducer
  3218. ? update.eagerState
  3219. : reducer(current, update.action));
  3220. update = update.next;
  3221. } while (null !== update && update !== baseQueue);
  3222. null === newBaseQueueLast
  3223. ? (pendingQueue = current)
  3224. : (newBaseQueueLast.next = baseFirst);
  3225. objectIs(current, hook.memoizedState) || (didReceiveUpdate = !0);
  3226. hook.memoizedState = current;
  3227. hook.baseState = pendingQueue;
  3228. hook.baseQueue = newBaseQueueLast;
  3229. queue.lastRenderedState = current;
  3230. }
  3231. return [hook.memoizedState, queue.dispatch];
  3232. }
  3233. function rerenderReducer(reducer) {
  3234. var hook = updateWorkInProgressHook(),
  3235. queue = hook.queue;
  3236. if (null === queue)
  3237. throw Error(
  3238. "Should have a queue. This is likely a bug in React. Please file an issue."
  3239. );
  3240. queue.lastRenderedReducer = reducer;
  3241. var dispatch = queue.dispatch,
  3242. lastRenderPhaseUpdate = queue.pending,
  3243. newState = hook.memoizedState;
  3244. if (null !== lastRenderPhaseUpdate) {
  3245. queue.pending = null;
  3246. var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);
  3247. do (newState = reducer(newState, update.action)), (update = update.next);
  3248. while (update !== lastRenderPhaseUpdate);
  3249. objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);
  3250. hook.memoizedState = newState;
  3251. null === hook.baseQueue && (hook.baseState = newState);
  3252. queue.lastRenderedState = newState;
  3253. }
  3254. return [newState, dispatch];
  3255. }
  3256. function mountState(initialState) {
  3257. var hook = mountWorkInProgressHook();
  3258. "function" === typeof initialState && (initialState = initialState());
  3259. hook.memoizedState = hook.baseState = initialState;
  3260. initialState = hook.queue = {
  3261. pending: null,
  3262. dispatch: null,
  3263. lastRenderedReducer: basicStateReducer,
  3264. lastRenderedState: initialState
  3265. };
  3266. initialState = initialState.dispatch = dispatchAction.bind(
  3267. null,
  3268. currentlyRenderingFiber$1,
  3269. initialState
  3270. );
  3271. return [hook.memoizedState, initialState];
  3272. }
  3273. function pushEffect(tag, create, destroy, deps) {
  3274. tag = { tag: tag, create: create, destroy: destroy, deps: deps, next: null };
  3275. create = currentlyRenderingFiber$1.updateQueue;
  3276. null === create
  3277. ? ((create = { lastEffect: null }),
  3278. (currentlyRenderingFiber$1.updateQueue = create),
  3279. (create.lastEffect = tag.next = tag))
  3280. : ((destroy = create.lastEffect),
  3281. null === destroy
  3282. ? (create.lastEffect = tag.next = tag)
  3283. : ((deps = destroy.next),
  3284. (destroy.next = tag),
  3285. (tag.next = deps),
  3286. (create.lastEffect = tag)));
  3287. return tag;
  3288. }
  3289. function updateRef() {
  3290. return updateWorkInProgressHook().memoizedState;
  3291. }
  3292. function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  3293. var hook = mountWorkInProgressHook();
  3294. currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
  3295. hook.memoizedState = pushEffect(
  3296. 1 | hookEffectTag,
  3297. create,
  3298. void 0,
  3299. void 0 === deps ? null : deps
  3300. );
  3301. }
  3302. function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  3303. var hook = updateWorkInProgressHook();
  3304. deps = void 0 === deps ? null : deps;
  3305. var destroy = void 0;
  3306. if (null !== currentHook) {
  3307. var prevEffect = currentHook.memoizedState;
  3308. destroy = prevEffect.destroy;
  3309. if (null !== deps && areHookInputsEqual(deps, prevEffect.deps)) {
  3310. pushEffect(hookEffectTag, create, destroy, deps);
  3311. return;
  3312. }
  3313. }
  3314. currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
  3315. hook.memoizedState = pushEffect(1 | hookEffectTag, create, destroy, deps);
  3316. }
  3317. function mountEffect(create, deps) {
  3318. return mountEffectImpl(516, 4, create, deps);
  3319. }
  3320. function updateEffect(create, deps) {
  3321. return updateEffectImpl(516, 4, create, deps);
  3322. }
  3323. function updateLayoutEffect(create, deps) {
  3324. return updateEffectImpl(4, 2, create, deps);
  3325. }
  3326. function imperativeHandleEffect(create, ref) {
  3327. if ("function" === typeof ref)
  3328. return (
  3329. (create = create()),
  3330. ref(create),
  3331. function() {
  3332. ref(null);
  3333. }
  3334. );
  3335. if (null !== ref && void 0 !== ref)
  3336. return (
  3337. (create = create()),
  3338. (ref.current = create),
  3339. function() {
  3340. ref.current = null;
  3341. }
  3342. );
  3343. }
  3344. function updateImperativeHandle(ref, create, deps) {
  3345. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  3346. return updateEffectImpl(
  3347. 4,
  3348. 2,
  3349. imperativeHandleEffect.bind(null, create, ref),
  3350. deps
  3351. );
  3352. }
  3353. function mountDebugValue() {}
  3354. function mountCallback(callback, deps) {
  3355. mountWorkInProgressHook().memoizedState = [
  3356. callback,
  3357. void 0 === deps ? null : deps
  3358. ];
  3359. return callback;
  3360. }
  3361. function updateCallback(callback, deps) {
  3362. var hook = updateWorkInProgressHook();
  3363. deps = void 0 === deps ? null : deps;
  3364. var prevState = hook.memoizedState;
  3365. if (
  3366. null !== prevState &&
  3367. null !== deps &&
  3368. areHookInputsEqual(deps, prevState[1])
  3369. )
  3370. return prevState[0];
  3371. hook.memoizedState = [callback, deps];
  3372. return callback;
  3373. }
  3374. function updateMemo(nextCreate, deps) {
  3375. var hook = updateWorkInProgressHook();
  3376. deps = void 0 === deps ? null : deps;
  3377. var prevState = hook.memoizedState;
  3378. if (
  3379. null !== prevState &&
  3380. null !== deps &&
  3381. areHookInputsEqual(deps, prevState[1])
  3382. )
  3383. return prevState[0];
  3384. nextCreate = nextCreate();
  3385. hook.memoizedState = [nextCreate, deps];
  3386. return nextCreate;
  3387. }
  3388. function startTransition(setPending, config, callback) {
  3389. var priorityLevel = getCurrentPriorityLevel();
  3390. runWithPriority(98 > priorityLevel ? 98 : priorityLevel, function() {
  3391. setPending(!0);
  3392. });
  3393. runWithPriority(97 < priorityLevel ? 97 : priorityLevel, function() {
  3394. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3395. ReactCurrentBatchConfig$1.suspense = void 0 === config ? null : config;
  3396. try {
  3397. setPending(!1), callback();
  3398. } finally {
  3399. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3400. }
  3401. });
  3402. }
  3403. function dispatchAction(fiber, queue, action) {
  3404. var currentTime = requestCurrentTimeForUpdate(),
  3405. suspenseConfig = ReactCurrentBatchConfig.suspense;
  3406. currentTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
  3407. suspenseConfig = {
  3408. expirationTime: currentTime,
  3409. suspenseConfig: suspenseConfig,
  3410. action: action,
  3411. eagerReducer: null,
  3412. eagerState: null,
  3413. next: null
  3414. };
  3415. var pending = queue.pending;
  3416. null === pending
  3417. ? (suspenseConfig.next = suspenseConfig)
  3418. : ((suspenseConfig.next = pending.next), (pending.next = suspenseConfig));
  3419. queue.pending = suspenseConfig;
  3420. pending = fiber.alternate;
  3421. if (
  3422. fiber === currentlyRenderingFiber$1 ||
  3423. (null !== pending && pending === currentlyRenderingFiber$1)
  3424. )
  3425. (didScheduleRenderPhaseUpdate = !0),
  3426. (suspenseConfig.expirationTime = renderExpirationTime),
  3427. (currentlyRenderingFiber$1.expirationTime = renderExpirationTime);
  3428. else {
  3429. if (
  3430. 0 === fiber.expirationTime &&
  3431. (null === pending || 0 === pending.expirationTime) &&
  3432. ((pending = queue.lastRenderedReducer), null !== pending)
  3433. )
  3434. try {
  3435. var currentState = queue.lastRenderedState,
  3436. eagerState = pending(currentState, action);
  3437. suspenseConfig.eagerReducer = pending;
  3438. suspenseConfig.eagerState = eagerState;
  3439. if (objectIs(eagerState, currentState)) return;
  3440. } catch (error) {
  3441. } finally {
  3442. }
  3443. scheduleWork(fiber, currentTime);
  3444. }
  3445. }
  3446. function updateEventListener() {}
  3447. var ContextOnlyDispatcher = {
  3448. readContext: readContext,
  3449. useCallback: throwInvalidHookError,
  3450. useContext: throwInvalidHookError,
  3451. useEffect: throwInvalidHookError,
  3452. useImperativeHandle: throwInvalidHookError,
  3453. useLayoutEffect: throwInvalidHookError,
  3454. useMemo: throwInvalidHookError,
  3455. useReducer: throwInvalidHookError,
  3456. useRef: throwInvalidHookError,
  3457. useState: throwInvalidHookError,
  3458. useDebugValue: throwInvalidHookError,
  3459. useResponder: throwInvalidHookError,
  3460. useDeferredValue: throwInvalidHookError,
  3461. useTransition: throwInvalidHookError,
  3462. useEvent: throwInvalidHookError
  3463. },
  3464. HooksDispatcherOnMount = {
  3465. readContext: readContext,
  3466. useCallback: mountCallback,
  3467. useContext: readContext,
  3468. useEffect: mountEffect,
  3469. useImperativeHandle: function(ref, create, deps) {
  3470. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  3471. return mountEffectImpl(
  3472. 4,
  3473. 2,
  3474. imperativeHandleEffect.bind(null, create, ref),
  3475. deps
  3476. );
  3477. },
  3478. useLayoutEffect: function(create, deps) {
  3479. return mountEffectImpl(4, 2, create, deps);
  3480. },
  3481. useMemo: function(nextCreate, deps) {
  3482. var hook = mountWorkInProgressHook();
  3483. deps = void 0 === deps ? null : deps;
  3484. nextCreate = nextCreate();
  3485. hook.memoizedState = [nextCreate, deps];
  3486. return nextCreate;
  3487. },
  3488. useReducer: function(reducer, initialArg, init) {
  3489. var hook = mountWorkInProgressHook();
  3490. initialArg = void 0 !== init ? init(initialArg) : initialArg;
  3491. hook.memoizedState = hook.baseState = initialArg;
  3492. reducer = hook.queue = {
  3493. pending: null,
  3494. dispatch: null,
  3495. lastRenderedReducer: reducer,
  3496. lastRenderedState: initialArg
  3497. };
  3498. reducer = reducer.dispatch = dispatchAction.bind(
  3499. null,
  3500. currentlyRenderingFiber$1,
  3501. reducer
  3502. );
  3503. return [hook.memoizedState, reducer];
  3504. },
  3505. useRef: function(initialValue) {
  3506. var hook = mountWorkInProgressHook();
  3507. initialValue = { current: initialValue };
  3508. return (hook.memoizedState = initialValue);
  3509. },
  3510. useState: mountState,
  3511. useDebugValue: mountDebugValue,
  3512. useResponder: createDeprecatedResponderListener,
  3513. useDeferredValue: function(value, config) {
  3514. var _mountState = mountState(value),
  3515. prevValue = _mountState[0],
  3516. setValue = _mountState[1];
  3517. mountEffect(
  3518. function() {
  3519. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3520. ReactCurrentBatchConfig$1.suspense =
  3521. void 0 === config ? null : config;
  3522. try {
  3523. setValue(value);
  3524. } finally {
  3525. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3526. }
  3527. },
  3528. [value, config]
  3529. );
  3530. return prevValue;
  3531. },
  3532. useTransition: function(config) {
  3533. var _mountState2 = mountState(!1),
  3534. isPending = _mountState2[0];
  3535. _mountState2 = _mountState2[1];
  3536. return [
  3537. mountCallback(startTransition.bind(null, _mountState2, config), [
  3538. _mountState2,
  3539. config
  3540. ]),
  3541. isPending
  3542. ];
  3543. },
  3544. useEvent: function() {}
  3545. },
  3546. HooksDispatcherOnUpdate = {
  3547. readContext: readContext,
  3548. useCallback: updateCallback,
  3549. useContext: readContext,
  3550. useEffect: updateEffect,
  3551. useImperativeHandle: updateImperativeHandle,
  3552. useLayoutEffect: updateLayoutEffect,
  3553. useMemo: updateMemo,
  3554. useReducer: updateReducer,
  3555. useRef: updateRef,
  3556. useState: function() {
  3557. return updateReducer(basicStateReducer);
  3558. },
  3559. useDebugValue: mountDebugValue,
  3560. useResponder: createDeprecatedResponderListener,
  3561. useDeferredValue: function(value, config) {
  3562. var _updateState = updateReducer(basicStateReducer),
  3563. prevValue = _updateState[0],
  3564. setValue = _updateState[1];
  3565. updateEffect(
  3566. function() {
  3567. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3568. ReactCurrentBatchConfig$1.suspense =
  3569. void 0 === config ? null : config;
  3570. try {
  3571. setValue(value);
  3572. } finally {
  3573. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3574. }
  3575. },
  3576. [value, config]
  3577. );
  3578. return prevValue;
  3579. },
  3580. useTransition: function(config) {
  3581. var _updateState2 = updateReducer(basicStateReducer),
  3582. isPending = _updateState2[0];
  3583. _updateState2 = _updateState2[1];
  3584. return [
  3585. updateCallback(startTransition.bind(null, _updateState2, config), [
  3586. _updateState2,
  3587. config
  3588. ]),
  3589. isPending
  3590. ];
  3591. },
  3592. useEvent: updateEventListener
  3593. },
  3594. HooksDispatcherOnRerender = {
  3595. readContext: readContext,
  3596. useCallback: updateCallback,
  3597. useContext: readContext,
  3598. useEffect: updateEffect,
  3599. useImperativeHandle: updateImperativeHandle,
  3600. useLayoutEffect: updateLayoutEffect,
  3601. useMemo: updateMemo,
  3602. useReducer: rerenderReducer,
  3603. useRef: updateRef,
  3604. useState: function() {
  3605. return rerenderReducer(basicStateReducer);
  3606. },
  3607. useDebugValue: mountDebugValue,
  3608. useResponder: createDeprecatedResponderListener,
  3609. useDeferredValue: function(value, config) {
  3610. var _rerenderState = rerenderReducer(basicStateReducer),
  3611. prevValue = _rerenderState[0],
  3612. setValue = _rerenderState[1];
  3613. updateEffect(
  3614. function() {
  3615. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3616. ReactCurrentBatchConfig$1.suspense =
  3617. void 0 === config ? null : config;
  3618. try {
  3619. setValue(value);
  3620. } finally {
  3621. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3622. }
  3623. },
  3624. [value, config]
  3625. );
  3626. return prevValue;
  3627. },
  3628. useTransition: function(config) {
  3629. var _rerenderState2 = rerenderReducer(basicStateReducer),
  3630. isPending = _rerenderState2[0];
  3631. _rerenderState2 = _rerenderState2[1];
  3632. return [
  3633. updateCallback(startTransition.bind(null, _rerenderState2, config), [
  3634. _rerenderState2,
  3635. config
  3636. ]),
  3637. isPending
  3638. ];
  3639. },
  3640. useEvent: updateEventListener
  3641. },
  3642. ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
  3643. didReceiveUpdate = !1;
  3644. function reconcileChildren(
  3645. current,
  3646. workInProgress,
  3647. nextChildren,
  3648. renderExpirationTime
  3649. ) {
  3650. workInProgress.child =
  3651. null === current
  3652. ? mountChildFibers(
  3653. workInProgress,
  3654. null,
  3655. nextChildren,
  3656. renderExpirationTime
  3657. )
  3658. : reconcileChildFibers(
  3659. workInProgress,
  3660. current.child,
  3661. nextChildren,
  3662. renderExpirationTime
  3663. );
  3664. }
  3665. function updateForwardRef(
  3666. current,
  3667. workInProgress,
  3668. Component,
  3669. nextProps,
  3670. renderExpirationTime
  3671. ) {
  3672. Component = Component.render;
  3673. var ref = workInProgress.ref;
  3674. prepareToReadContext(workInProgress, renderExpirationTime);
  3675. nextProps = renderWithHooks(
  3676. current,
  3677. workInProgress,
  3678. Component,
  3679. nextProps,
  3680. ref,
  3681. renderExpirationTime
  3682. );
  3683. if (null !== current && !didReceiveUpdate)
  3684. return (
  3685. (workInProgress.updateQueue = current.updateQueue),
  3686. (workInProgress.effectTag &= -517),
  3687. current.expirationTime <= renderExpirationTime &&
  3688. (current.expirationTime = 0),
  3689. bailoutOnAlreadyFinishedWork(
  3690. current,
  3691. workInProgress,
  3692. renderExpirationTime
  3693. )
  3694. );
  3695. workInProgress.effectTag |= 1;
  3696. reconcileChildren(current, workInProgress, nextProps, renderExpirationTime);
  3697. return workInProgress.child;
  3698. }
  3699. function updateMemoComponent(
  3700. current,
  3701. workInProgress,
  3702. Component,
  3703. nextProps,
  3704. updateExpirationTime,
  3705. renderExpirationTime
  3706. ) {
  3707. if (null === current) {
  3708. var type = Component.type;
  3709. if (
  3710. "function" === typeof type &&
  3711. !shouldConstruct(type) &&
  3712. void 0 === type.defaultProps &&
  3713. null === Component.compare &&
  3714. void 0 === Component.defaultProps
  3715. )
  3716. return (
  3717. (workInProgress.tag = 15),
  3718. (workInProgress.type = type),
  3719. updateSimpleMemoComponent(
  3720. current,
  3721. workInProgress,
  3722. type,
  3723. nextProps,
  3724. updateExpirationTime,
  3725. renderExpirationTime
  3726. )
  3727. );
  3728. current = createFiberFromTypeAndProps(
  3729. Component.type,
  3730. null,
  3731. nextProps,
  3732. null,
  3733. workInProgress.mode,
  3734. renderExpirationTime
  3735. );
  3736. current.ref = workInProgress.ref;
  3737. current.return = workInProgress;
  3738. return (workInProgress.child = current);
  3739. }
  3740. type = current.child;
  3741. if (
  3742. updateExpirationTime < renderExpirationTime &&
  3743. ((updateExpirationTime = type.memoizedProps),
  3744. (Component = Component.compare),
  3745. (Component = null !== Component ? Component : shallowEqual),
  3746. Component(updateExpirationTime, nextProps) &&
  3747. current.ref === workInProgress.ref)
  3748. )
  3749. return bailoutOnAlreadyFinishedWork(
  3750. current,
  3751. workInProgress,
  3752. renderExpirationTime
  3753. );
  3754. workInProgress.effectTag |= 1;
  3755. current = createWorkInProgress(type, nextProps);
  3756. current.ref = workInProgress.ref;
  3757. current.return = workInProgress;
  3758. return (workInProgress.child = current);
  3759. }
  3760. function updateSimpleMemoComponent(
  3761. current,
  3762. workInProgress,
  3763. Component,
  3764. nextProps,
  3765. updateExpirationTime,
  3766. renderExpirationTime
  3767. ) {
  3768. return null !== current &&
  3769. shallowEqual(current.memoizedProps, nextProps) &&
  3770. current.ref === workInProgress.ref &&
  3771. ((didReceiveUpdate = !1), updateExpirationTime < renderExpirationTime)
  3772. ? ((workInProgress.expirationTime = current.expirationTime),
  3773. bailoutOnAlreadyFinishedWork(
  3774. current,
  3775. workInProgress,
  3776. renderExpirationTime
  3777. ))
  3778. : updateFunctionComponent(
  3779. current,
  3780. workInProgress,
  3781. Component,
  3782. nextProps,
  3783. renderExpirationTime
  3784. );
  3785. }
  3786. function markRef(current, workInProgress) {
  3787. var ref = workInProgress.ref;
  3788. if (
  3789. (null === current && null !== ref) ||
  3790. (null !== current && current.ref !== ref)
  3791. )
  3792. workInProgress.effectTag |= 128;
  3793. }
  3794. function updateFunctionComponent(
  3795. current,
  3796. workInProgress,
  3797. Component,
  3798. nextProps,
  3799. renderExpirationTime
  3800. ) {
  3801. var context = isContextProvider(Component)
  3802. ? previousContext
  3803. : contextStackCursor.current;
  3804. context = getMaskedContext(workInProgress, context);
  3805. prepareToReadContext(workInProgress, renderExpirationTime);
  3806. Component = renderWithHooks(
  3807. current,
  3808. workInProgress,
  3809. Component,
  3810. nextProps,
  3811. context,
  3812. renderExpirationTime
  3813. );
  3814. if (null !== current && !didReceiveUpdate)
  3815. return (
  3816. (workInProgress.updateQueue = current.updateQueue),
  3817. (workInProgress.effectTag &= -517),
  3818. current.expirationTime <= renderExpirationTime &&
  3819. (current.expirationTime = 0),
  3820. bailoutOnAlreadyFinishedWork(
  3821. current,
  3822. workInProgress,
  3823. renderExpirationTime
  3824. )
  3825. );
  3826. workInProgress.effectTag |= 1;
  3827. reconcileChildren(current, workInProgress, Component, renderExpirationTime);
  3828. return workInProgress.child;
  3829. }
  3830. function updateClassComponent(
  3831. current,
  3832. workInProgress,
  3833. Component,
  3834. nextProps,
  3835. renderExpirationTime
  3836. ) {
  3837. if (isContextProvider(Component)) {
  3838. var hasContext = !0;
  3839. pushContextProvider(workInProgress);
  3840. } else hasContext = !1;
  3841. prepareToReadContext(workInProgress, renderExpirationTime);
  3842. if (null === workInProgress.stateNode)
  3843. null !== current &&
  3844. ((current.alternate = null),
  3845. (workInProgress.alternate = null),
  3846. (workInProgress.effectTag |= 2)),
  3847. constructClassInstance(workInProgress, Component, nextProps),
  3848. mountClassInstance(
  3849. workInProgress,
  3850. Component,
  3851. nextProps,
  3852. renderExpirationTime
  3853. ),
  3854. (nextProps = !0);
  3855. else if (null === current) {
  3856. var instance = workInProgress.stateNode,
  3857. oldProps = workInProgress.memoizedProps;
  3858. instance.props = oldProps;
  3859. var oldContext = instance.context,
  3860. contextType = Component.contextType;
  3861. "object" === typeof contextType && null !== contextType
  3862. ? (contextType = readContext(contextType))
  3863. : ((contextType = isContextProvider(Component)
  3864. ? previousContext
  3865. : contextStackCursor.current),
  3866. (contextType = getMaskedContext(workInProgress, contextType)));
  3867. var getDerivedStateFromProps = Component.getDerivedStateFromProps,
  3868. hasNewLifecycles =
  3869. "function" === typeof getDerivedStateFromProps ||
  3870. "function" === typeof instance.getSnapshotBeforeUpdate;
  3871. hasNewLifecycles ||
  3872. ("function" !== typeof instance.UNSAFE_componentWillReceiveProps &&
  3873. "function" !== typeof instance.componentWillReceiveProps) ||
  3874. ((oldProps !== nextProps || oldContext !== contextType) &&
  3875. callComponentWillReceiveProps(
  3876. workInProgress,
  3877. instance,
  3878. nextProps,
  3879. contextType
  3880. ));
  3881. hasForceUpdate = !1;
  3882. var oldState = workInProgress.memoizedState;
  3883. instance.state = oldState;
  3884. processUpdateQueue(
  3885. workInProgress,
  3886. nextProps,
  3887. instance,
  3888. renderExpirationTime
  3889. );
  3890. oldContext = workInProgress.memoizedState;
  3891. oldProps !== nextProps ||
  3892. oldState !== oldContext ||
  3893. didPerformWorkStackCursor.current ||
  3894. hasForceUpdate
  3895. ? ("function" === typeof getDerivedStateFromProps &&
  3896. (applyDerivedStateFromProps(
  3897. workInProgress,
  3898. Component,
  3899. getDerivedStateFromProps,
  3900. nextProps
  3901. ),
  3902. (oldContext = workInProgress.memoizedState)),
  3903. (oldProps =
  3904. hasForceUpdate ||
  3905. checkShouldComponentUpdate(
  3906. workInProgress,
  3907. Component,
  3908. oldProps,
  3909. nextProps,
  3910. oldState,
  3911. oldContext,
  3912. contextType
  3913. ))
  3914. ? (hasNewLifecycles ||
  3915. ("function" !== typeof instance.UNSAFE_componentWillMount &&
  3916. "function" !== typeof instance.componentWillMount) ||
  3917. ("function" === typeof instance.componentWillMount &&
  3918. instance.componentWillMount(),
  3919. "function" === typeof instance.UNSAFE_componentWillMount &&
  3920. instance.UNSAFE_componentWillMount()),
  3921. "function" === typeof instance.componentDidMount &&
  3922. (workInProgress.effectTag |= 4))
  3923. : ("function" === typeof instance.componentDidMount &&
  3924. (workInProgress.effectTag |= 4),
  3925. (workInProgress.memoizedProps = nextProps),
  3926. (workInProgress.memoizedState = oldContext)),
  3927. (instance.props = nextProps),
  3928. (instance.state = oldContext),
  3929. (instance.context = contextType),
  3930. (nextProps = oldProps))
  3931. : ("function" === typeof instance.componentDidMount &&
  3932. (workInProgress.effectTag |= 4),
  3933. (nextProps = !1));
  3934. } else
  3935. (instance = workInProgress.stateNode),
  3936. cloneUpdateQueue(current, workInProgress),
  3937. (oldProps = workInProgress.memoizedProps),
  3938. (instance.props =
  3939. workInProgress.type === workInProgress.elementType
  3940. ? oldProps
  3941. : resolveDefaultProps(workInProgress.type, oldProps)),
  3942. (oldContext = instance.context),
  3943. (contextType = Component.contextType),
  3944. "object" === typeof contextType && null !== contextType
  3945. ? (contextType = readContext(contextType))
  3946. : ((contextType = isContextProvider(Component)
  3947. ? previousContext
  3948. : contextStackCursor.current),
  3949. (contextType = getMaskedContext(workInProgress, contextType))),
  3950. (getDerivedStateFromProps = Component.getDerivedStateFromProps),
  3951. (hasNewLifecycles =
  3952. "function" === typeof getDerivedStateFromProps ||
  3953. "function" === typeof instance.getSnapshotBeforeUpdate) ||
  3954. ("function" !== typeof instance.UNSAFE_componentWillReceiveProps &&
  3955. "function" !== typeof instance.componentWillReceiveProps) ||
  3956. ((oldProps !== nextProps || oldContext !== contextType) &&
  3957. callComponentWillReceiveProps(
  3958. workInProgress,
  3959. instance,
  3960. nextProps,
  3961. contextType
  3962. )),
  3963. (hasForceUpdate = !1),
  3964. (oldContext = workInProgress.memoizedState),
  3965. (instance.state = oldContext),
  3966. processUpdateQueue(
  3967. workInProgress,
  3968. nextProps,
  3969. instance,
  3970. renderExpirationTime
  3971. ),
  3972. (oldState = workInProgress.memoizedState),
  3973. oldProps !== nextProps ||
  3974. oldContext !== oldState ||
  3975. didPerformWorkStackCursor.current ||
  3976. hasForceUpdate
  3977. ? ("function" === typeof getDerivedStateFromProps &&
  3978. (applyDerivedStateFromProps(
  3979. workInProgress,
  3980. Component,
  3981. getDerivedStateFromProps,
  3982. nextProps
  3983. ),
  3984. (oldState = workInProgress.memoizedState)),
  3985. (getDerivedStateFromProps =
  3986. hasForceUpdate ||
  3987. checkShouldComponentUpdate(
  3988. workInProgress,
  3989. Component,
  3990. oldProps,
  3991. nextProps,
  3992. oldContext,
  3993. oldState,
  3994. contextType
  3995. ))
  3996. ? (hasNewLifecycles ||
  3997. ("function" !== typeof instance.UNSAFE_componentWillUpdate &&
  3998. "function" !== typeof instance.componentWillUpdate) ||
  3999. ("function" === typeof instance.componentWillUpdate &&
  4000. instance.componentWillUpdate(
  4001. nextProps,
  4002. oldState,
  4003. contextType
  4004. ),
  4005. "function" === typeof instance.UNSAFE_componentWillUpdate &&
  4006. instance.UNSAFE_componentWillUpdate(
  4007. nextProps,
  4008. oldState,
  4009. contextType
  4010. )),
  4011. "function" === typeof instance.componentDidUpdate &&
  4012. (workInProgress.effectTag |= 4),
  4013. "function" === typeof instance.getSnapshotBeforeUpdate &&
  4014. (workInProgress.effectTag |= 256))
  4015. : ("function" !== typeof instance.componentDidUpdate ||
  4016. (oldProps === current.memoizedProps &&
  4017. oldContext === current.memoizedState) ||
  4018. (workInProgress.effectTag |= 4),
  4019. "function" !== typeof instance.getSnapshotBeforeUpdate ||
  4020. (oldProps === current.memoizedProps &&
  4021. oldContext === current.memoizedState) ||
  4022. (workInProgress.effectTag |= 256),
  4023. (workInProgress.memoizedProps = nextProps),
  4024. (workInProgress.memoizedState = oldState)),
  4025. (instance.props = nextProps),
  4026. (instance.state = oldState),
  4027. (instance.context = contextType),
  4028. (nextProps = getDerivedStateFromProps))
  4029. : ("function" !== typeof instance.componentDidUpdate ||
  4030. (oldProps === current.memoizedProps &&
  4031. oldContext === current.memoizedState) ||
  4032. (workInProgress.effectTag |= 4),
  4033. "function" !== typeof instance.getSnapshotBeforeUpdate ||
  4034. (oldProps === current.memoizedProps &&
  4035. oldContext === current.memoizedState) ||
  4036. (workInProgress.effectTag |= 256),
  4037. (nextProps = !1));
  4038. return finishClassComponent(
  4039. current,
  4040. workInProgress,
  4041. Component,
  4042. nextProps,
  4043. hasContext,
  4044. renderExpirationTime
  4045. );
  4046. }
  4047. function finishClassComponent(
  4048. current,
  4049. workInProgress,
  4050. Component,
  4051. shouldUpdate,
  4052. hasContext,
  4053. renderExpirationTime
  4054. ) {
  4055. markRef(current, workInProgress);
  4056. var didCaptureError = 0 !== (workInProgress.effectTag & 64);
  4057. if (!shouldUpdate && !didCaptureError)
  4058. return (
  4059. hasContext && invalidateContextProvider(workInProgress, Component, !1),
  4060. bailoutOnAlreadyFinishedWork(
  4061. current,
  4062. workInProgress,
  4063. renderExpirationTime
  4064. )
  4065. );
  4066. shouldUpdate = workInProgress.stateNode;
  4067. ReactCurrentOwner$1.current = workInProgress;
  4068. var nextChildren =
  4069. didCaptureError && "function" !== typeof Component.getDerivedStateFromError
  4070. ? null
  4071. : shouldUpdate.render();
  4072. workInProgress.effectTag |= 1;
  4073. null !== current && didCaptureError
  4074. ? ((workInProgress.child = reconcileChildFibers(
  4075. workInProgress,
  4076. current.child,
  4077. null,
  4078. renderExpirationTime
  4079. )),
  4080. (workInProgress.child = reconcileChildFibers(
  4081. workInProgress,
  4082. null,
  4083. nextChildren,
  4084. renderExpirationTime
  4085. )))
  4086. : reconcileChildren(
  4087. current,
  4088. workInProgress,
  4089. nextChildren,
  4090. renderExpirationTime
  4091. );
  4092. workInProgress.memoizedState = shouldUpdate.state;
  4093. hasContext && invalidateContextProvider(workInProgress, Component, !0);
  4094. return workInProgress.child;
  4095. }
  4096. function pushHostRootContext(workInProgress) {
  4097. var root = workInProgress.stateNode;
  4098. root.pendingContext
  4099. ? pushTopLevelContextObject(
  4100. workInProgress,
  4101. root.pendingContext,
  4102. root.pendingContext !== root.context
  4103. )
  4104. : root.context &&
  4105. pushTopLevelContextObject(workInProgress, root.context, !1);
  4106. pushHostContainer(workInProgress, root.containerInfo);
  4107. }
  4108. var SUSPENDED_MARKER = { dehydrated: null, retryTime: 0 };
  4109. function updateSuspenseComponent(
  4110. current,
  4111. workInProgress,
  4112. renderExpirationTime
  4113. ) {
  4114. var mode = workInProgress.mode,
  4115. nextProps = workInProgress.pendingProps,
  4116. suspenseContext = suspenseStackCursor.current,
  4117. nextDidTimeout = !1,
  4118. JSCompiler_temp;
  4119. (JSCompiler_temp = 0 !== (workInProgress.effectTag & 64)) ||
  4120. (JSCompiler_temp =
  4121. 0 !== (suspenseContext & 2) &&
  4122. (null === current || null !== current.memoizedState));
  4123. JSCompiler_temp
  4124. ? ((nextDidTimeout = !0), (workInProgress.effectTag &= -65))
  4125. : (null !== current && null === current.memoizedState) ||
  4126. void 0 === nextProps.fallback ||
  4127. !0 === nextProps.unstable_avoidThisFallback ||
  4128. (suspenseContext |= 1);
  4129. push(suspenseStackCursor, suspenseContext & 1);
  4130. if (null === current) {
  4131. if (nextDidTimeout) {
  4132. nextDidTimeout = nextProps.fallback;
  4133. nextProps = createFiberFromFragment(null, mode, 0, null);
  4134. nextProps.return = workInProgress;
  4135. if (0 === (workInProgress.mode & 2))
  4136. for (
  4137. current =
  4138. null !== workInProgress.memoizedState
  4139. ? workInProgress.child.child
  4140. : workInProgress.child,
  4141. nextProps.child = current;
  4142. null !== current;
  4143. )
  4144. (current.return = nextProps), (current = current.sibling);
  4145. renderExpirationTime = createFiberFromFragment(
  4146. nextDidTimeout,
  4147. mode,
  4148. renderExpirationTime,
  4149. null
  4150. );
  4151. renderExpirationTime.return = workInProgress;
  4152. nextProps.sibling = renderExpirationTime;
  4153. workInProgress.memoizedState = SUSPENDED_MARKER;
  4154. workInProgress.child = nextProps;
  4155. return renderExpirationTime;
  4156. }
  4157. mode = nextProps.children;
  4158. workInProgress.memoizedState = null;
  4159. return (workInProgress.child = mountChildFibers(
  4160. workInProgress,
  4161. null,
  4162. mode,
  4163. renderExpirationTime
  4164. ));
  4165. }
  4166. if (null !== current.memoizedState) {
  4167. current = current.child;
  4168. mode = current.sibling;
  4169. if (nextDidTimeout) {
  4170. nextProps = nextProps.fallback;
  4171. renderExpirationTime = createWorkInProgress(
  4172. current,
  4173. current.pendingProps
  4174. );
  4175. renderExpirationTime.return = workInProgress;
  4176. if (
  4177. 0 === (workInProgress.mode & 2) &&
  4178. ((nextDidTimeout =
  4179. null !== workInProgress.memoizedState
  4180. ? workInProgress.child.child
  4181. : workInProgress.child),
  4182. nextDidTimeout !== current.child)
  4183. )
  4184. for (
  4185. renderExpirationTime.child = nextDidTimeout;
  4186. null !== nextDidTimeout;
  4187. )
  4188. (nextDidTimeout.return = renderExpirationTime),
  4189. (nextDidTimeout = nextDidTimeout.sibling);
  4190. mode = createWorkInProgress(mode, nextProps);
  4191. mode.return = workInProgress;
  4192. renderExpirationTime.sibling = mode;
  4193. renderExpirationTime.childExpirationTime = 0;
  4194. workInProgress.memoizedState = SUSPENDED_MARKER;
  4195. workInProgress.child = renderExpirationTime;
  4196. return mode;
  4197. }
  4198. renderExpirationTime = reconcileChildFibers(
  4199. workInProgress,
  4200. current.child,
  4201. nextProps.children,
  4202. renderExpirationTime
  4203. );
  4204. workInProgress.memoizedState = null;
  4205. return (workInProgress.child = renderExpirationTime);
  4206. }
  4207. current = current.child;
  4208. if (nextDidTimeout) {
  4209. nextDidTimeout = nextProps.fallback;
  4210. nextProps = createFiberFromFragment(null, mode, 0, null);
  4211. nextProps.return = workInProgress;
  4212. nextProps.child = current;
  4213. null !== current && (current.return = nextProps);
  4214. if (0 === (workInProgress.mode & 2))
  4215. for (
  4216. current =
  4217. null !== workInProgress.memoizedState
  4218. ? workInProgress.child.child
  4219. : workInProgress.child,
  4220. nextProps.child = current;
  4221. null !== current;
  4222. )
  4223. (current.return = nextProps), (current = current.sibling);
  4224. renderExpirationTime = createFiberFromFragment(
  4225. nextDidTimeout,
  4226. mode,
  4227. renderExpirationTime,
  4228. null
  4229. );
  4230. renderExpirationTime.return = workInProgress;
  4231. nextProps.sibling = renderExpirationTime;
  4232. renderExpirationTime.effectTag |= 2;
  4233. nextProps.childExpirationTime = 0;
  4234. workInProgress.memoizedState = SUSPENDED_MARKER;
  4235. workInProgress.child = nextProps;
  4236. return renderExpirationTime;
  4237. }
  4238. workInProgress.memoizedState = null;
  4239. return (workInProgress.child = reconcileChildFibers(
  4240. workInProgress,
  4241. current,
  4242. nextProps.children,
  4243. renderExpirationTime
  4244. ));
  4245. }
  4246. function scheduleWorkOnFiber(fiber, renderExpirationTime) {
  4247. fiber.expirationTime < renderExpirationTime &&
  4248. (fiber.expirationTime = renderExpirationTime);
  4249. var alternate = fiber.alternate;
  4250. null !== alternate &&
  4251. alternate.expirationTime < renderExpirationTime &&
  4252. (alternate.expirationTime = renderExpirationTime);
  4253. scheduleWorkOnParentPath(fiber.return, renderExpirationTime);
  4254. }
  4255. function initSuspenseListRenderState(
  4256. workInProgress,
  4257. isBackwards,
  4258. tail,
  4259. lastContentRow,
  4260. tailMode,
  4261. lastEffectBeforeRendering
  4262. ) {
  4263. var renderState = workInProgress.memoizedState;
  4264. null === renderState
  4265. ? (workInProgress.memoizedState = {
  4266. isBackwards: isBackwards,
  4267. rendering: null,
  4268. renderingStartTime: 0,
  4269. last: lastContentRow,
  4270. tail: tail,
  4271. tailExpiration: 0,
  4272. tailMode: tailMode,
  4273. lastEffect: lastEffectBeforeRendering
  4274. })
  4275. : ((renderState.isBackwards = isBackwards),
  4276. (renderState.rendering = null),
  4277. (renderState.renderingStartTime = 0),
  4278. (renderState.last = lastContentRow),
  4279. (renderState.tail = tail),
  4280. (renderState.tailExpiration = 0),
  4281. (renderState.tailMode = tailMode),
  4282. (renderState.lastEffect = lastEffectBeforeRendering));
  4283. }
  4284. function updateSuspenseListComponent(
  4285. current,
  4286. workInProgress,
  4287. renderExpirationTime
  4288. ) {
  4289. var nextProps = workInProgress.pendingProps,
  4290. revealOrder = nextProps.revealOrder,
  4291. tailMode = nextProps.tail;
  4292. reconcileChildren(
  4293. current,
  4294. workInProgress,
  4295. nextProps.children,
  4296. renderExpirationTime
  4297. );
  4298. nextProps = suspenseStackCursor.current;
  4299. if (0 !== (nextProps & 2))
  4300. (nextProps = (nextProps & 1) | 2), (workInProgress.effectTag |= 64);
  4301. else {
  4302. if (null !== current && 0 !== (current.effectTag & 64))
  4303. a: for (current = workInProgress.child; null !== current; ) {
  4304. if (13 === current.tag)
  4305. null !== current.memoizedState &&
  4306. scheduleWorkOnFiber(current, renderExpirationTime);
  4307. else if (19 === current.tag)
  4308. scheduleWorkOnFiber(current, renderExpirationTime);
  4309. else if (null !== current.child) {
  4310. current.child.return = current;
  4311. current = current.child;
  4312. continue;
  4313. }
  4314. if (current === workInProgress) break a;
  4315. for (; null === current.sibling; ) {
  4316. if (null === current.return || current.return === workInProgress)
  4317. break a;
  4318. current = current.return;
  4319. }
  4320. current.sibling.return = current.return;
  4321. current = current.sibling;
  4322. }
  4323. nextProps &= 1;
  4324. }
  4325. push(suspenseStackCursor, nextProps);
  4326. if (0 === (workInProgress.mode & 2)) workInProgress.memoizedState = null;
  4327. else
  4328. switch (revealOrder) {
  4329. case "forwards":
  4330. renderExpirationTime = workInProgress.child;
  4331. for (revealOrder = null; null !== renderExpirationTime; )
  4332. (current = renderExpirationTime.alternate),
  4333. null !== current &&
  4334. null === findFirstSuspended(current) &&
  4335. (revealOrder = renderExpirationTime),
  4336. (renderExpirationTime = renderExpirationTime.sibling);
  4337. renderExpirationTime = revealOrder;
  4338. null === renderExpirationTime
  4339. ? ((revealOrder = workInProgress.child),
  4340. (workInProgress.child = null))
  4341. : ((revealOrder = renderExpirationTime.sibling),
  4342. (renderExpirationTime.sibling = null));
  4343. initSuspenseListRenderState(
  4344. workInProgress,
  4345. !1,
  4346. revealOrder,
  4347. renderExpirationTime,
  4348. tailMode,
  4349. workInProgress.lastEffect
  4350. );
  4351. break;
  4352. case "backwards":
  4353. renderExpirationTime = null;
  4354. revealOrder = workInProgress.child;
  4355. for (workInProgress.child = null; null !== revealOrder; ) {
  4356. current = revealOrder.alternate;
  4357. if (null !== current && null === findFirstSuspended(current)) {
  4358. workInProgress.child = revealOrder;
  4359. break;
  4360. }
  4361. current = revealOrder.sibling;
  4362. revealOrder.sibling = renderExpirationTime;
  4363. renderExpirationTime = revealOrder;
  4364. revealOrder = current;
  4365. }
  4366. initSuspenseListRenderState(
  4367. workInProgress,
  4368. !0,
  4369. renderExpirationTime,
  4370. null,
  4371. tailMode,
  4372. workInProgress.lastEffect
  4373. );
  4374. break;
  4375. case "together":
  4376. initSuspenseListRenderState(
  4377. workInProgress,
  4378. !1,
  4379. null,
  4380. null,
  4381. void 0,
  4382. workInProgress.lastEffect
  4383. );
  4384. break;
  4385. default:
  4386. workInProgress.memoizedState = null;
  4387. }
  4388. return workInProgress.child;
  4389. }
  4390. function bailoutOnAlreadyFinishedWork(
  4391. current,
  4392. workInProgress,
  4393. renderExpirationTime
  4394. ) {
  4395. null !== current && (workInProgress.dependencies = current.dependencies);
  4396. var updateExpirationTime = workInProgress.expirationTime;
  4397. 0 !== updateExpirationTime && markUnprocessedUpdateTime(updateExpirationTime);
  4398. if (workInProgress.childExpirationTime < renderExpirationTime) return null;
  4399. if (null !== current && workInProgress.child !== current.child)
  4400. throw Error("Resuming work not yet implemented.");
  4401. if (null !== workInProgress.child) {
  4402. current = workInProgress.child;
  4403. renderExpirationTime = createWorkInProgress(current, current.pendingProps);
  4404. workInProgress.child = renderExpirationTime;
  4405. for (
  4406. renderExpirationTime.return = workInProgress;
  4407. null !== current.sibling;
  4408. )
  4409. (current = current.sibling),
  4410. (renderExpirationTime = renderExpirationTime.sibling = createWorkInProgress(
  4411. current,
  4412. current.pendingProps
  4413. )),
  4414. (renderExpirationTime.return = workInProgress);
  4415. renderExpirationTime.sibling = null;
  4416. }
  4417. return workInProgress.child;
  4418. }
  4419. var appendAllChildren,
  4420. updateHostContainer,
  4421. updateHostComponent$1,
  4422. updateHostText$1;
  4423. appendAllChildren = function(
  4424. parent,
  4425. workInProgress,
  4426. needsVisibilityToggle,
  4427. isHidden
  4428. ) {
  4429. for (var node = workInProgress.child; null !== node; ) {
  4430. if (5 === node.tag) {
  4431. var instance = node.stateNode;
  4432. needsVisibilityToggle &&
  4433. isHidden &&
  4434. (instance = cloneHiddenInstance(instance));
  4435. appendChildNode(parent.node, instance.node);
  4436. } else if (6 === node.tag) {
  4437. instance = node.stateNode;
  4438. if (needsVisibilityToggle && isHidden)
  4439. throw Error("Not yet implemented.");
  4440. appendChildNode(parent.node, instance.node);
  4441. } else if (4 !== node.tag) {
  4442. if (
  4443. 13 === node.tag &&
  4444. 0 !== (node.effectTag & 4) &&
  4445. (instance = null !== node.memoizedState)
  4446. ) {
  4447. var primaryChildParent = node.child;
  4448. if (
  4449. null !== primaryChildParent &&
  4450. (null !== primaryChildParent.child &&
  4451. ((primaryChildParent.child.return = primaryChildParent),
  4452. appendAllChildren(parent, primaryChildParent, !0, instance)),
  4453. (instance = primaryChildParent.sibling),
  4454. null !== instance)
  4455. ) {
  4456. instance.return = node;
  4457. node = instance;
  4458. continue;
  4459. }
  4460. }
  4461. if (null !== node.child) {
  4462. node.child.return = node;
  4463. node = node.child;
  4464. continue;
  4465. }
  4466. }
  4467. if (node === workInProgress) break;
  4468. for (; null === node.sibling; ) {
  4469. if (null === node.return || node.return === workInProgress) return;
  4470. node = node.return;
  4471. }
  4472. node.sibling.return = node.return;
  4473. node = node.sibling;
  4474. }
  4475. };
  4476. function appendAllChildrenToContainer(
  4477. containerChildSet,
  4478. workInProgress,
  4479. needsVisibilityToggle,
  4480. isHidden
  4481. ) {
  4482. for (var node = workInProgress.child; null !== node; ) {
  4483. if (5 === node.tag) {
  4484. var instance = node.stateNode;
  4485. needsVisibilityToggle &&
  4486. isHidden &&
  4487. (instance = cloneHiddenInstance(instance));
  4488. appendChildNodeToSet(containerChildSet, instance.node);
  4489. } else if (6 === node.tag) {
  4490. instance = node.stateNode;
  4491. if (needsVisibilityToggle && isHidden)
  4492. throw Error("Not yet implemented.");
  4493. appendChildNodeToSet(containerChildSet, instance.node);
  4494. } else if (4 !== node.tag) {
  4495. if (
  4496. 13 === node.tag &&
  4497. 0 !== (node.effectTag & 4) &&
  4498. (instance = null !== node.memoizedState)
  4499. ) {
  4500. var primaryChildParent = node.child;
  4501. if (
  4502. null !== primaryChildParent &&
  4503. (null !== primaryChildParent.child &&
  4504. ((primaryChildParent.child.return = primaryChildParent),
  4505. appendAllChildrenToContainer(
  4506. containerChildSet,
  4507. primaryChildParent,
  4508. !0,
  4509. instance
  4510. )),
  4511. (instance = primaryChildParent.sibling),
  4512. null !== instance)
  4513. ) {
  4514. instance.return = node;
  4515. node = instance;
  4516. continue;
  4517. }
  4518. }
  4519. if (null !== node.child) {
  4520. node.child.return = node;
  4521. node = node.child;
  4522. continue;
  4523. }
  4524. }
  4525. if (node === workInProgress) break;
  4526. for (; null === node.sibling; ) {
  4527. if (null === node.return || node.return === workInProgress) return;
  4528. node = node.return;
  4529. }
  4530. node.sibling.return = node.return;
  4531. node = node.sibling;
  4532. }
  4533. }
  4534. updateHostContainer = function(workInProgress) {
  4535. var portalOrRoot = workInProgress.stateNode;
  4536. if (null !== workInProgress.firstEffect) {
  4537. var container = portalOrRoot.containerInfo,
  4538. newChildSet = createChildNodeSet(container);
  4539. appendAllChildrenToContainer(newChildSet, workInProgress, !1, !1);
  4540. portalOrRoot.pendingChildren = newChildSet;
  4541. workInProgress.effectTag |= 4;
  4542. completeRoot(container, newChildSet);
  4543. }
  4544. };
  4545. updateHostComponent$1 = function(current, workInProgress, type, newProps) {
  4546. type = current.stateNode;
  4547. var oldProps = current.memoizedProps;
  4548. if ((current = null === workInProgress.firstEffect) && oldProps === newProps)
  4549. workInProgress.stateNode = type;
  4550. else {
  4551. var recyclableInstance = workInProgress.stateNode;
  4552. requiredContext(contextStackCursor$1.current);
  4553. var updatePayload = null;
  4554. oldProps !== newProps &&
  4555. ((oldProps = diffProperties(
  4556. null,
  4557. oldProps,
  4558. newProps,
  4559. recyclableInstance.canonical.viewConfig.validAttributes
  4560. )),
  4561. (recyclableInstance.canonical.currentProps = newProps),
  4562. (updatePayload = oldProps));
  4563. current && null === updatePayload
  4564. ? (workInProgress.stateNode = type)
  4565. : ((newProps = updatePayload),
  4566. (recyclableInstance = type.node),
  4567. (type = {
  4568. node: current
  4569. ? null !== newProps
  4570. ? cloneNodeWithNewProps(recyclableInstance, newProps)
  4571. : cloneNode(recyclableInstance)
  4572. : null !== newProps
  4573. ? cloneNodeWithNewChildrenAndProps(recyclableInstance, newProps)
  4574. : cloneNodeWithNewChildren(recyclableInstance),
  4575. canonical: type.canonical
  4576. }),
  4577. (workInProgress.stateNode = type),
  4578. current
  4579. ? (workInProgress.effectTag |= 4)
  4580. : appendAllChildren(type, workInProgress, !1, !1));
  4581. }
  4582. };
  4583. updateHostText$1 = function(current, workInProgress, oldText, newText) {
  4584. oldText !== newText
  4585. ? ((current = requiredContext(rootInstanceStackCursor.current)),
  4586. (oldText = requiredContext(contextStackCursor$1.current)),
  4587. (workInProgress.stateNode = createTextInstance(
  4588. newText,
  4589. current,
  4590. oldText,
  4591. workInProgress
  4592. )),
  4593. (workInProgress.effectTag |= 4))
  4594. : (workInProgress.stateNode = current.stateNode);
  4595. };
  4596. function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  4597. switch (renderState.tailMode) {
  4598. case "hidden":
  4599. hasRenderedATailFallback = renderState.tail;
  4600. for (var lastTailNode = null; null !== hasRenderedATailFallback; )
  4601. null !== hasRenderedATailFallback.alternate &&
  4602. (lastTailNode = hasRenderedATailFallback),
  4603. (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
  4604. null === lastTailNode
  4605. ? (renderState.tail = null)
  4606. : (lastTailNode.sibling = null);
  4607. break;
  4608. case "collapsed":
  4609. lastTailNode = renderState.tail;
  4610. for (var _lastTailNode = null; null !== lastTailNode; )
  4611. null !== lastTailNode.alternate && (_lastTailNode = lastTailNode),
  4612. (lastTailNode = lastTailNode.sibling);
  4613. null === _lastTailNode
  4614. ? hasRenderedATailFallback || null === renderState.tail
  4615. ? (renderState.tail = null)
  4616. : (renderState.tail.sibling = null)
  4617. : (_lastTailNode.sibling = null);
  4618. }
  4619. }
  4620. function completeWork(current, workInProgress, renderExpirationTime) {
  4621. var newProps = workInProgress.pendingProps;
  4622. switch (workInProgress.tag) {
  4623. case 2:
  4624. case 16:
  4625. case 15:
  4626. case 0:
  4627. case 11:
  4628. case 7:
  4629. case 8:
  4630. case 12:
  4631. case 9:
  4632. case 14:
  4633. return null;
  4634. case 1:
  4635. return isContextProvider(workInProgress.type) && popContext(), null;
  4636. case 3:
  4637. return (
  4638. popHostContainer(),
  4639. pop(didPerformWorkStackCursor),
  4640. pop(contextStackCursor),
  4641. (current = workInProgress.stateNode),
  4642. current.pendingContext &&
  4643. ((current.context = current.pendingContext),
  4644. (current.pendingContext = null)),
  4645. updateHostContainer(workInProgress),
  4646. null
  4647. );
  4648. case 5:
  4649. popHostContext(workInProgress);
  4650. var rootContainerInstance = requiredContext(
  4651. rootInstanceStackCursor.current
  4652. );
  4653. renderExpirationTime = workInProgress.type;
  4654. if (null !== current && null != workInProgress.stateNode)
  4655. updateHostComponent$1(
  4656. current,
  4657. workInProgress,
  4658. renderExpirationTime,
  4659. newProps,
  4660. rootContainerInstance
  4661. ),
  4662. current.ref !== workInProgress.ref &&
  4663. (workInProgress.effectTag |= 128);
  4664. else {
  4665. if (!newProps) {
  4666. if (null === workInProgress.stateNode)
  4667. throw Error(
  4668. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  4669. );
  4670. return null;
  4671. }
  4672. requiredContext(contextStackCursor$1.current);
  4673. current = nextReactTag;
  4674. nextReactTag += 2;
  4675. renderExpirationTime = getViewConfigForType(renderExpirationTime);
  4676. var updatePayload = diffProperties(
  4677. null,
  4678. emptyObject,
  4679. newProps,
  4680. renderExpirationTime.validAttributes
  4681. );
  4682. rootContainerInstance = createNode(
  4683. current,
  4684. renderExpirationTime.uiViewClassName,
  4685. rootContainerInstance,
  4686. updatePayload,
  4687. workInProgress
  4688. );
  4689. current = new ReactFabricHostComponent(
  4690. current,
  4691. renderExpirationTime,
  4692. newProps,
  4693. workInProgress
  4694. );
  4695. current = { node: rootContainerInstance, canonical: current };
  4696. appendAllChildren(current, workInProgress, !1, !1);
  4697. workInProgress.stateNode = current;
  4698. null !== workInProgress.ref && (workInProgress.effectTag |= 128);
  4699. }
  4700. return null;
  4701. case 6:
  4702. if (current && null != workInProgress.stateNode)
  4703. updateHostText$1(
  4704. current,
  4705. workInProgress,
  4706. current.memoizedProps,
  4707. newProps
  4708. );
  4709. else {
  4710. if ("string" !== typeof newProps && null === workInProgress.stateNode)
  4711. throw Error(
  4712. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  4713. );
  4714. current = requiredContext(rootInstanceStackCursor.current);
  4715. rootContainerInstance = requiredContext(contextStackCursor$1.current);
  4716. workInProgress.stateNode = createTextInstance(
  4717. newProps,
  4718. current,
  4719. rootContainerInstance,
  4720. workInProgress
  4721. );
  4722. }
  4723. return null;
  4724. case 13:
  4725. pop(suspenseStackCursor);
  4726. newProps = workInProgress.memoizedState;
  4727. if (0 !== (workInProgress.effectTag & 64))
  4728. return (
  4729. (workInProgress.expirationTime = renderExpirationTime), workInProgress
  4730. );
  4731. newProps = null !== newProps;
  4732. rootContainerInstance = !1;
  4733. null !== current &&
  4734. ((renderExpirationTime = current.memoizedState),
  4735. (rootContainerInstance = null !== renderExpirationTime),
  4736. newProps ||
  4737. null === renderExpirationTime ||
  4738. ((renderExpirationTime = current.child.sibling),
  4739. null !== renderExpirationTime &&
  4740. ((updatePayload = workInProgress.firstEffect),
  4741. null !== updatePayload
  4742. ? ((workInProgress.firstEffect = renderExpirationTime),
  4743. (renderExpirationTime.nextEffect = updatePayload))
  4744. : ((workInProgress.firstEffect = workInProgress.lastEffect = renderExpirationTime),
  4745. (renderExpirationTime.nextEffect = null)),
  4746. (renderExpirationTime.effectTag = 8))));
  4747. if (newProps && !rootContainerInstance && 0 !== (workInProgress.mode & 2))
  4748. if (
  4749. (null === current &&
  4750. !0 !== workInProgress.memoizedProps.unstable_avoidThisFallback) ||
  4751. 0 !== (suspenseStackCursor.current & 1)
  4752. )
  4753. workInProgressRootExitStatus === RootIncomplete &&
  4754. (workInProgressRootExitStatus = RootSuspended);
  4755. else {
  4756. if (
  4757. workInProgressRootExitStatus === RootIncomplete ||
  4758. workInProgressRootExitStatus === RootSuspended
  4759. )
  4760. workInProgressRootExitStatus = RootSuspendedWithDelay;
  4761. 0 !== workInProgressRootNextUnprocessedUpdateTime &&
  4762. null !== workInProgressRoot &&
  4763. (markRootSuspendedAtTime(
  4764. workInProgressRoot,
  4765. renderExpirationTime$1
  4766. ),
  4767. markRootUpdatedAtTime(
  4768. workInProgressRoot,
  4769. workInProgressRootNextUnprocessedUpdateTime
  4770. ));
  4771. }
  4772. newProps && (workInProgress.effectTag |= 4);
  4773. return null;
  4774. case 4:
  4775. return popHostContainer(), updateHostContainer(workInProgress), null;
  4776. case 10:
  4777. return popProvider(workInProgress), null;
  4778. case 17:
  4779. return isContextProvider(workInProgress.type) && popContext(), null;
  4780. case 19:
  4781. pop(suspenseStackCursor);
  4782. newProps = workInProgress.memoizedState;
  4783. if (null === newProps) return null;
  4784. rootContainerInstance = 0 !== (workInProgress.effectTag & 64);
  4785. updatePayload = newProps.rendering;
  4786. if (null === updatePayload)
  4787. if (rootContainerInstance) cutOffTailIfNeeded(newProps, !1);
  4788. else {
  4789. if (
  4790. workInProgressRootExitStatus !== RootIncomplete ||
  4791. (null !== current && 0 !== (current.effectTag & 64))
  4792. )
  4793. for (current = workInProgress.child; null !== current; ) {
  4794. updatePayload = findFirstSuspended(current);
  4795. if (null !== updatePayload) {
  4796. workInProgress.effectTag |= 64;
  4797. cutOffTailIfNeeded(newProps, !1);
  4798. current = updatePayload.updateQueue;
  4799. null !== current &&
  4800. ((workInProgress.updateQueue = current),
  4801. (workInProgress.effectTag |= 4));
  4802. null === newProps.lastEffect &&
  4803. (workInProgress.firstEffect = null);
  4804. workInProgress.lastEffect = newProps.lastEffect;
  4805. current = renderExpirationTime;
  4806. for (newProps = workInProgress.child; null !== newProps; )
  4807. (rootContainerInstance = newProps),
  4808. (renderExpirationTime = current),
  4809. (rootContainerInstance.effectTag &= 2),
  4810. (rootContainerInstance.nextEffect = null),
  4811. (rootContainerInstance.firstEffect = null),
  4812. (rootContainerInstance.lastEffect = null),
  4813. (updatePayload = rootContainerInstance.alternate),
  4814. null === updatePayload
  4815. ? ((rootContainerInstance.childExpirationTime = 0),
  4816. (rootContainerInstance.expirationTime = renderExpirationTime),
  4817. (rootContainerInstance.child = null),
  4818. (rootContainerInstance.memoizedProps = null),
  4819. (rootContainerInstance.memoizedState = null),
  4820. (rootContainerInstance.updateQueue = null),
  4821. (rootContainerInstance.dependencies = null))
  4822. : ((rootContainerInstance.childExpirationTime =
  4823. updatePayload.childExpirationTime),
  4824. (rootContainerInstance.expirationTime =
  4825. updatePayload.expirationTime),
  4826. (rootContainerInstance.child = updatePayload.child),
  4827. (rootContainerInstance.memoizedProps =
  4828. updatePayload.memoizedProps),
  4829. (rootContainerInstance.memoizedState =
  4830. updatePayload.memoizedState),
  4831. (rootContainerInstance.updateQueue =
  4832. updatePayload.updateQueue),
  4833. (renderExpirationTime = updatePayload.dependencies),
  4834. (rootContainerInstance.dependencies =
  4835. null === renderExpirationTime
  4836. ? null
  4837. : {
  4838. expirationTime:
  4839. renderExpirationTime.expirationTime,
  4840. firstContext: renderExpirationTime.firstContext,
  4841. responders: renderExpirationTime.responders
  4842. })),
  4843. (newProps = newProps.sibling);
  4844. push(
  4845. suspenseStackCursor,
  4846. (suspenseStackCursor.current & 1) | 2
  4847. );
  4848. return workInProgress.child;
  4849. }
  4850. current = current.sibling;
  4851. }
  4852. }
  4853. else {
  4854. if (!rootContainerInstance)
  4855. if (
  4856. ((current = findFirstSuspended(updatePayload)), null !== current)
  4857. ) {
  4858. if (
  4859. ((workInProgress.effectTag |= 64),
  4860. (rootContainerInstance = !0),
  4861. (current = current.updateQueue),
  4862. null !== current &&
  4863. ((workInProgress.updateQueue = current),
  4864. (workInProgress.effectTag |= 4)),
  4865. cutOffTailIfNeeded(newProps, !0),
  4866. null === newProps.tail &&
  4867. "hidden" === newProps.tailMode &&
  4868. !updatePayload.alternate)
  4869. )
  4870. return (
  4871. (workInProgress = workInProgress.lastEffect =
  4872. newProps.lastEffect),
  4873. null !== workInProgress && (workInProgress.nextEffect = null),
  4874. null
  4875. );
  4876. } else
  4877. 2 * now() - newProps.renderingStartTime > newProps.tailExpiration &&
  4878. 1 < renderExpirationTime &&
  4879. ((workInProgress.effectTag |= 64),
  4880. (rootContainerInstance = !0),
  4881. cutOffTailIfNeeded(newProps, !1),
  4882. (workInProgress.expirationTime = workInProgress.childExpirationTime =
  4883. renderExpirationTime - 1));
  4884. newProps.isBackwards
  4885. ? ((updatePayload.sibling = workInProgress.child),
  4886. (workInProgress.child = updatePayload))
  4887. : ((current = newProps.last),
  4888. null !== current
  4889. ? (current.sibling = updatePayload)
  4890. : (workInProgress.child = updatePayload),
  4891. (newProps.last = updatePayload));
  4892. }
  4893. return null !== newProps.tail
  4894. ? (0 === newProps.tailExpiration &&
  4895. (newProps.tailExpiration = now() + 500),
  4896. (current = newProps.tail),
  4897. (newProps.rendering = current),
  4898. (newProps.tail = current.sibling),
  4899. (newProps.lastEffect = workInProgress.lastEffect),
  4900. (newProps.renderingStartTime = now()),
  4901. (current.sibling = null),
  4902. (workInProgress = suspenseStackCursor.current),
  4903. push(
  4904. suspenseStackCursor,
  4905. rootContainerInstance
  4906. ? (workInProgress & 1) | 2
  4907. : workInProgress & 1
  4908. ),
  4909. current)
  4910. : null;
  4911. }
  4912. throw Error(
  4913. "Unknown unit of work tag (" +
  4914. workInProgress.tag +
  4915. "). This error is likely caused by a bug in React. Please file an issue."
  4916. );
  4917. }
  4918. function unwindWork(workInProgress) {
  4919. switch (workInProgress.tag) {
  4920. case 1:
  4921. isContextProvider(workInProgress.type) && popContext();
  4922. var effectTag = workInProgress.effectTag;
  4923. return effectTag & 4096
  4924. ? ((workInProgress.effectTag = (effectTag & -4097) | 64),
  4925. workInProgress)
  4926. : null;
  4927. case 3:
  4928. popHostContainer();
  4929. pop(didPerformWorkStackCursor);
  4930. pop(contextStackCursor);
  4931. effectTag = workInProgress.effectTag;
  4932. if (0 !== (effectTag & 64))
  4933. throw Error(
  4934. "The root failed to unmount after an error. This is likely a bug in React. Please file an issue."
  4935. );
  4936. workInProgress.effectTag = (effectTag & -4097) | 64;
  4937. return workInProgress;
  4938. case 5:
  4939. return popHostContext(workInProgress), null;
  4940. case 13:
  4941. return (
  4942. pop(suspenseStackCursor),
  4943. (effectTag = workInProgress.effectTag),
  4944. effectTag & 4096
  4945. ? ((workInProgress.effectTag = (effectTag & -4097) | 64),
  4946. workInProgress)
  4947. : null
  4948. );
  4949. case 19:
  4950. return pop(suspenseStackCursor), null;
  4951. case 4:
  4952. return popHostContainer(), null;
  4953. case 10:
  4954. return popProvider(workInProgress), null;
  4955. default:
  4956. return null;
  4957. }
  4958. }
  4959. function createCapturedValue(value, source) {
  4960. return {
  4961. value: value,
  4962. source: source,
  4963. stack: getStackByFiberInDevAndProd(source)
  4964. };
  4965. }
  4966. if (
  4967. "function" !==
  4968. typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog
  4969. )
  4970. throw Error(
  4971. "Expected ReactFiberErrorDialog.showErrorDialog to be a function."
  4972. );
  4973. function logCapturedError(capturedError) {
  4974. !1 !==
  4975. ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog(
  4976. capturedError
  4977. ) && console.error(capturedError.error);
  4978. }
  4979. var PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set;
  4980. function logError(boundary, errorInfo) {
  4981. var source = errorInfo.source,
  4982. stack = errorInfo.stack;
  4983. null === stack &&
  4984. null !== source &&
  4985. (stack = getStackByFiberInDevAndProd(source));
  4986. errorInfo = {
  4987. componentName: null !== source ? getComponentName(source.type) : null,
  4988. componentStack: null !== stack ? stack : "",
  4989. error: errorInfo.value,
  4990. errorBoundary: null,
  4991. errorBoundaryName: null,
  4992. errorBoundaryFound: !1,
  4993. willRetry: !1
  4994. };
  4995. null !== boundary &&
  4996. 1 === boundary.tag &&
  4997. ((errorInfo.errorBoundary = boundary.stateNode),
  4998. (errorInfo.errorBoundaryName = getComponentName(boundary.type)),
  4999. (errorInfo.errorBoundaryFound = !0),
  5000. (errorInfo.willRetry = !0));
  5001. try {
  5002. logCapturedError(errorInfo);
  5003. } catch (e) {
  5004. setTimeout(function() {
  5005. throw e;
  5006. });
  5007. }
  5008. }
  5009. function safelyCallComponentWillUnmount(current, instance) {
  5010. try {
  5011. (instance.props = current.memoizedProps),
  5012. (instance.state = current.memoizedState),
  5013. instance.componentWillUnmount();
  5014. } catch (unmountError) {
  5015. captureCommitPhaseError(current, unmountError);
  5016. }
  5017. }
  5018. function safelyDetachRef(current) {
  5019. var ref = current.ref;
  5020. if (null !== ref)
  5021. if ("function" === typeof ref)
  5022. try {
  5023. ref(null);
  5024. } catch (refError) {
  5025. captureCommitPhaseError(current, refError);
  5026. }
  5027. else ref.current = null;
  5028. }
  5029. function commitBeforeMutationLifeCycles(current, finishedWork) {
  5030. switch (finishedWork.tag) {
  5031. case 0:
  5032. case 11:
  5033. case 15:
  5034. case 22:
  5035. return;
  5036. case 1:
  5037. if (finishedWork.effectTag & 256 && null !== current) {
  5038. var prevProps = current.memoizedProps,
  5039. prevState = current.memoizedState;
  5040. current = finishedWork.stateNode;
  5041. finishedWork = current.getSnapshotBeforeUpdate(
  5042. finishedWork.elementType === finishedWork.type
  5043. ? prevProps
  5044. : resolveDefaultProps(finishedWork.type, prevProps),
  5045. prevState
  5046. );
  5047. current.__reactInternalSnapshotBeforeUpdate = finishedWork;
  5048. }
  5049. return;
  5050. case 3:
  5051. case 5:
  5052. case 6:
  5053. case 4:
  5054. case 17:
  5055. return;
  5056. }
  5057. throw Error(
  5058. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  5059. );
  5060. }
  5061. function commitHookEffectListUnmount(tag, finishedWork) {
  5062. finishedWork = finishedWork.updateQueue;
  5063. finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
  5064. if (null !== finishedWork) {
  5065. var effect = (finishedWork = finishedWork.next);
  5066. do {
  5067. if ((effect.tag & tag) === tag) {
  5068. var destroy = effect.destroy;
  5069. effect.destroy = void 0;
  5070. void 0 !== destroy && destroy();
  5071. }
  5072. effect = effect.next;
  5073. } while (effect !== finishedWork);
  5074. }
  5075. }
  5076. function commitHookEffectListMount(tag, finishedWork) {
  5077. finishedWork = finishedWork.updateQueue;
  5078. finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
  5079. if (null !== finishedWork) {
  5080. var effect = (finishedWork = finishedWork.next);
  5081. do {
  5082. if ((effect.tag & tag) === tag) {
  5083. var create = effect.create;
  5084. effect.destroy = create();
  5085. }
  5086. effect = effect.next;
  5087. } while (effect !== finishedWork);
  5088. }
  5089. }
  5090. function commitLifeCycles(finishedRoot, current, finishedWork) {
  5091. switch (finishedWork.tag) {
  5092. case 0:
  5093. case 11:
  5094. case 15:
  5095. case 22:
  5096. commitHookEffectListMount(3, finishedWork);
  5097. return;
  5098. case 1:
  5099. finishedRoot = finishedWork.stateNode;
  5100. if (finishedWork.effectTag & 4)
  5101. if (null === current) finishedRoot.componentDidMount();
  5102. else {
  5103. var prevProps =
  5104. finishedWork.elementType === finishedWork.type
  5105. ? current.memoizedProps
  5106. : resolveDefaultProps(finishedWork.type, current.memoizedProps);
  5107. finishedRoot.componentDidUpdate(
  5108. prevProps,
  5109. current.memoizedState,
  5110. finishedRoot.__reactInternalSnapshotBeforeUpdate
  5111. );
  5112. }
  5113. current = finishedWork.updateQueue;
  5114. null !== current &&
  5115. commitUpdateQueue(finishedWork, current, finishedRoot);
  5116. return;
  5117. case 3:
  5118. current = finishedWork.updateQueue;
  5119. if (null !== current) {
  5120. finishedRoot = null;
  5121. if (null !== finishedWork.child)
  5122. switch (finishedWork.child.tag) {
  5123. case 5:
  5124. finishedRoot = finishedWork.child.stateNode.canonical;
  5125. break;
  5126. case 1:
  5127. finishedRoot = finishedWork.child.stateNode;
  5128. }
  5129. commitUpdateQueue(finishedWork, current, finishedRoot);
  5130. }
  5131. return;
  5132. case 5:
  5133. if (null === current && finishedWork.effectTag & 4)
  5134. throw Error(
  5135. "The current renderer does not support mutation. This error is likely caused by a bug in React. Please file an issue."
  5136. );
  5137. return;
  5138. case 6:
  5139. return;
  5140. case 4:
  5141. return;
  5142. case 12:
  5143. return;
  5144. case 13:
  5145. return;
  5146. case 19:
  5147. case 17:
  5148. case 20:
  5149. case 21:
  5150. return;
  5151. }
  5152. throw Error(
  5153. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  5154. );
  5155. }
  5156. function commitUnmount(finishedRoot, current$jscomp$0, renderPriorityLevel) {
  5157. "function" === typeof onCommitFiberUnmount &&
  5158. onCommitFiberUnmount(current$jscomp$0);
  5159. switch (current$jscomp$0.tag) {
  5160. case 0:
  5161. case 11:
  5162. case 14:
  5163. case 15:
  5164. case 22:
  5165. finishedRoot = current$jscomp$0.updateQueue;
  5166. if (
  5167. null !== finishedRoot &&
  5168. ((finishedRoot = finishedRoot.lastEffect), null !== finishedRoot)
  5169. ) {
  5170. var firstEffect = finishedRoot.next;
  5171. runWithPriority(
  5172. 97 < renderPriorityLevel ? 97 : renderPriorityLevel,
  5173. function() {
  5174. var effect = firstEffect;
  5175. do {
  5176. var _destroy = effect.destroy;
  5177. if (void 0 !== _destroy) {
  5178. var current = current$jscomp$0;
  5179. try {
  5180. _destroy();
  5181. } catch (error) {
  5182. captureCommitPhaseError(current, error);
  5183. }
  5184. }
  5185. effect = effect.next;
  5186. } while (effect !== firstEffect);
  5187. }
  5188. );
  5189. }
  5190. break;
  5191. case 1:
  5192. safelyDetachRef(current$jscomp$0);
  5193. renderPriorityLevel = current$jscomp$0.stateNode;
  5194. "function" === typeof renderPriorityLevel.componentWillUnmount &&
  5195. safelyCallComponentWillUnmount(current$jscomp$0, renderPriorityLevel);
  5196. break;
  5197. case 5:
  5198. safelyDetachRef(current$jscomp$0);
  5199. break;
  5200. case 4:
  5201. createChildNodeSet(current$jscomp$0.stateNode.containerInfo);
  5202. }
  5203. }
  5204. function detachFiber(current) {
  5205. var alternate = current.alternate;
  5206. current.return = null;
  5207. current.child = null;
  5208. current.memoizedState = null;
  5209. current.updateQueue = null;
  5210. current.dependencies = null;
  5211. current.alternate = null;
  5212. current.firstEffect = null;
  5213. current.lastEffect = null;
  5214. current.pendingProps = null;
  5215. current.memoizedProps = null;
  5216. current.stateNode = null;
  5217. null !== alternate && detachFiber(alternate);
  5218. }
  5219. function commitWork(current, finishedWork) {
  5220. switch (finishedWork.tag) {
  5221. case 0:
  5222. case 11:
  5223. case 14:
  5224. case 15:
  5225. case 22:
  5226. commitHookEffectListUnmount(3, finishedWork);
  5227. return;
  5228. case 12:
  5229. return;
  5230. case 13:
  5231. null !== finishedWork.memoizedState &&
  5232. (globalMostRecentFallbackTime = now());
  5233. attachSuspenseRetryListeners(finishedWork);
  5234. return;
  5235. case 19:
  5236. attachSuspenseRetryListeners(finishedWork);
  5237. return;
  5238. }
  5239. a: {
  5240. switch (finishedWork.tag) {
  5241. case 1:
  5242. case 5:
  5243. case 6:
  5244. case 20:
  5245. break a;
  5246. case 3:
  5247. case 4:
  5248. break a;
  5249. }
  5250. throw Error(
  5251. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  5252. );
  5253. }
  5254. }
  5255. function attachSuspenseRetryListeners(finishedWork) {
  5256. var thenables = finishedWork.updateQueue;
  5257. if (null !== thenables) {
  5258. finishedWork.updateQueue = null;
  5259. var retryCache = finishedWork.stateNode;
  5260. null === retryCache &&
  5261. (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
  5262. thenables.forEach(function(thenable) {
  5263. var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
  5264. retryCache.has(thenable) ||
  5265. (retryCache.add(thenable), thenable.then(retry, retry));
  5266. });
  5267. }
  5268. }
  5269. var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map;
  5270. function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
  5271. expirationTime = createUpdate(expirationTime, null);
  5272. expirationTime.tag = 3;
  5273. expirationTime.payload = { element: null };
  5274. var error = errorInfo.value;
  5275. expirationTime.callback = function() {
  5276. hasUncaughtError || ((hasUncaughtError = !0), (firstUncaughtError = error));
  5277. logError(fiber, errorInfo);
  5278. };
  5279. return expirationTime;
  5280. }
  5281. function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
  5282. expirationTime = createUpdate(expirationTime, null);
  5283. expirationTime.tag = 3;
  5284. var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
  5285. if ("function" === typeof getDerivedStateFromError) {
  5286. var error = errorInfo.value;
  5287. expirationTime.payload = function() {
  5288. logError(fiber, errorInfo);
  5289. return getDerivedStateFromError(error);
  5290. };
  5291. }
  5292. var inst = fiber.stateNode;
  5293. null !== inst &&
  5294. "function" === typeof inst.componentDidCatch &&
  5295. (expirationTime.callback = function() {
  5296. "function" !== typeof getDerivedStateFromError &&
  5297. (null === legacyErrorBoundariesThatAlreadyFailed
  5298. ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
  5299. : legacyErrorBoundariesThatAlreadyFailed.add(this),
  5300. logError(fiber, errorInfo));
  5301. var stack = errorInfo.stack;
  5302. this.componentDidCatch(errorInfo.value, {
  5303. componentStack: null !== stack ? stack : ""
  5304. });
  5305. });
  5306. return expirationTime;
  5307. }
  5308. var ceil = Math.ceil,
  5309. ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
  5310. ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
  5311. NoContext = 0,
  5312. LegacyUnbatchedContext = 8,
  5313. RenderContext = 16,
  5314. CommitContext = 32,
  5315. RootIncomplete = 0,
  5316. RootFatalErrored = 1,
  5317. RootErrored = 2,
  5318. RootSuspended = 3,
  5319. RootSuspendedWithDelay = 4,
  5320. RootCompleted = 5,
  5321. executionContext = NoContext,
  5322. workInProgressRoot = null,
  5323. workInProgress = null,
  5324. renderExpirationTime$1 = 0,
  5325. workInProgressRootExitStatus = RootIncomplete,
  5326. workInProgressRootFatalError = null,
  5327. workInProgressRootLatestProcessedExpirationTime = 1073741823,
  5328. workInProgressRootLatestSuspenseTimeout = 1073741823,
  5329. workInProgressRootCanSuspendUsingConfig = null,
  5330. workInProgressRootNextUnprocessedUpdateTime = 0,
  5331. workInProgressRootHasPendingPing = !1,
  5332. globalMostRecentFallbackTime = 0,
  5333. FALLBACK_THROTTLE_MS = 500,
  5334. nextEffect = null,
  5335. hasUncaughtError = !1,
  5336. firstUncaughtError = null,
  5337. legacyErrorBoundariesThatAlreadyFailed = null,
  5338. rootDoesHavePassiveEffects = !1,
  5339. rootWithPendingPassiveEffects = null,
  5340. pendingPassiveEffectsRenderPriority = 90,
  5341. rootsWithPendingDiscreteUpdates = null,
  5342. nestedUpdateCount = 0,
  5343. rootWithNestedUpdates = null,
  5344. currentEventTime = 0;
  5345. function requestCurrentTimeForUpdate() {
  5346. return (executionContext & (RenderContext | CommitContext)) !== NoContext
  5347. ? 1073741821 - ((now() / 10) | 0)
  5348. : 0 !== currentEventTime
  5349. ? currentEventTime
  5350. : (currentEventTime = 1073741821 - ((now() / 10) | 0));
  5351. }
  5352. function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
  5353. fiber = fiber.mode;
  5354. if (0 === (fiber & 2)) return 1073741823;
  5355. var priorityLevel = getCurrentPriorityLevel();
  5356. if (0 === (fiber & 4)) return 99 === priorityLevel ? 1073741823 : 1073741822;
  5357. if ((executionContext & RenderContext) !== NoContext)
  5358. return renderExpirationTime$1;
  5359. if (null !== suspenseConfig)
  5360. currentTime =
  5361. 1073741821 -
  5362. 25 *
  5363. ((((1073741821 -
  5364. currentTime +
  5365. (suspenseConfig.timeoutMs | 0 || 5e3) / 10) /
  5366. 25) |
  5367. 0) +
  5368. 1);
  5369. else
  5370. switch (priorityLevel) {
  5371. case 99:
  5372. currentTime = 1073741823;
  5373. break;
  5374. case 98:
  5375. currentTime =
  5376. 1073741821 - 10 * ((((1073741821 - currentTime + 15) / 10) | 0) + 1);
  5377. break;
  5378. case 97:
  5379. case 96:
  5380. currentTime =
  5381. 1073741821 - 25 * ((((1073741821 - currentTime + 500) / 25) | 0) + 1);
  5382. break;
  5383. case 95:
  5384. currentTime = 2;
  5385. break;
  5386. default:
  5387. throw Error("Expected a valid priority level");
  5388. }
  5389. null !== workInProgressRoot &&
  5390. currentTime === renderExpirationTime$1 &&
  5391. --currentTime;
  5392. return currentTime;
  5393. }
  5394. function scheduleWork(fiber, expirationTime) {
  5395. if (50 < nestedUpdateCount)
  5396. throw ((nestedUpdateCount = 0),
  5397. (rootWithNestedUpdates = null),
  5398. Error(
  5399. "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."
  5400. ));
  5401. fiber = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
  5402. if (null !== fiber) {
  5403. var priorityLevel = getCurrentPriorityLevel();
  5404. 1073741823 === expirationTime
  5405. ? (executionContext & LegacyUnbatchedContext) !== NoContext &&
  5406. (executionContext & (RenderContext | CommitContext)) === NoContext
  5407. ? performSyncWorkOnRoot(fiber)
  5408. : (ensureRootIsScheduled(fiber),
  5409. executionContext === NoContext && flushSyncCallbackQueue())
  5410. : ensureRootIsScheduled(fiber);
  5411. (executionContext & 4) === NoContext ||
  5412. (98 !== priorityLevel && 99 !== priorityLevel) ||
  5413. (null === rootsWithPendingDiscreteUpdates
  5414. ? (rootsWithPendingDiscreteUpdates = new Map([[fiber, expirationTime]]))
  5415. : ((priorityLevel = rootsWithPendingDiscreteUpdates.get(fiber)),
  5416. (void 0 === priorityLevel || priorityLevel > expirationTime) &&
  5417. rootsWithPendingDiscreteUpdates.set(fiber, expirationTime)));
  5418. }
  5419. }
  5420. function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
  5421. fiber.expirationTime < expirationTime &&
  5422. (fiber.expirationTime = expirationTime);
  5423. var alternate = fiber.alternate;
  5424. null !== alternate &&
  5425. alternate.expirationTime < expirationTime &&
  5426. (alternate.expirationTime = expirationTime);
  5427. var node = fiber.return,
  5428. root = null;
  5429. if (null === node && 3 === fiber.tag) root = fiber.stateNode;
  5430. else
  5431. for (; null !== node; ) {
  5432. alternate = node.alternate;
  5433. node.childExpirationTime < expirationTime &&
  5434. (node.childExpirationTime = expirationTime);
  5435. null !== alternate &&
  5436. alternate.childExpirationTime < expirationTime &&
  5437. (alternate.childExpirationTime = expirationTime);
  5438. if (null === node.return && 3 === node.tag) {
  5439. root = node.stateNode;
  5440. break;
  5441. }
  5442. node = node.return;
  5443. }
  5444. null !== root &&
  5445. (workInProgressRoot === root &&
  5446. (markUnprocessedUpdateTime(expirationTime),
  5447. workInProgressRootExitStatus === RootSuspendedWithDelay &&
  5448. markRootSuspendedAtTime(root, renderExpirationTime$1)),
  5449. markRootUpdatedAtTime(root, expirationTime));
  5450. return root;
  5451. }
  5452. function getNextRootExpirationTimeToWorkOn(root) {
  5453. var lastExpiredTime = root.lastExpiredTime;
  5454. if (0 !== lastExpiredTime) return lastExpiredTime;
  5455. lastExpiredTime = root.firstPendingTime;
  5456. if (!isRootSuspendedAtTime(root, lastExpiredTime)) return lastExpiredTime;
  5457. var lastPingedTime = root.lastPingedTime;
  5458. root = root.nextKnownPendingLevel;
  5459. root = lastPingedTime > root ? lastPingedTime : root;
  5460. return 2 >= root && lastExpiredTime !== root ? 0 : root;
  5461. }
  5462. function ensureRootIsScheduled(root) {
  5463. if (0 !== root.lastExpiredTime)
  5464. (root.callbackExpirationTime = 1073741823),
  5465. (root.callbackPriority = 99),
  5466. (root.callbackNode = scheduleSyncCallback(
  5467. performSyncWorkOnRoot.bind(null, root)
  5468. ));
  5469. else {
  5470. var expirationTime = getNextRootExpirationTimeToWorkOn(root),
  5471. existingCallbackNode = root.callbackNode;
  5472. if (0 === expirationTime)
  5473. null !== existingCallbackNode &&
  5474. ((root.callbackNode = null),
  5475. (root.callbackExpirationTime = 0),
  5476. (root.callbackPriority = 90));
  5477. else {
  5478. var priorityLevel = requestCurrentTimeForUpdate();
  5479. 1073741823 === expirationTime
  5480. ? (priorityLevel = 99)
  5481. : 1 === expirationTime || 2 === expirationTime
  5482. ? (priorityLevel = 95)
  5483. : ((priorityLevel =
  5484. 10 * (1073741821 - expirationTime) -
  5485. 10 * (1073741821 - priorityLevel)),
  5486. (priorityLevel =
  5487. 0 >= priorityLevel
  5488. ? 99
  5489. : 250 >= priorityLevel
  5490. ? 98
  5491. : 5250 >= priorityLevel
  5492. ? 97
  5493. : 95));
  5494. if (null !== existingCallbackNode) {
  5495. var existingCallbackPriority = root.callbackPriority;
  5496. if (
  5497. root.callbackExpirationTime === expirationTime &&
  5498. existingCallbackPriority >= priorityLevel
  5499. )
  5500. return;
  5501. existingCallbackNode !== fakeCallbackNode &&
  5502. Scheduler_cancelCallback(existingCallbackNode);
  5503. }
  5504. root.callbackExpirationTime = expirationTime;
  5505. root.callbackPriority = priorityLevel;
  5506. expirationTime =
  5507. 1073741823 === expirationTime
  5508. ? scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root))
  5509. : scheduleCallback(
  5510. priorityLevel,
  5511. performConcurrentWorkOnRoot.bind(null, root),
  5512. { timeout: 10 * (1073741821 - expirationTime) - now() }
  5513. );
  5514. root.callbackNode = expirationTime;
  5515. }
  5516. }
  5517. }
  5518. function performConcurrentWorkOnRoot(root, didTimeout) {
  5519. currentEventTime = 0;
  5520. if (didTimeout) {
  5521. didTimeout = requestCurrentTimeForUpdate();
  5522. var lastExpiredTime = root.lastExpiredTime;
  5523. if (0 === lastExpiredTime || lastExpiredTime > didTimeout)
  5524. root.lastExpiredTime = didTimeout;
  5525. ensureRootIsScheduled(root);
  5526. return null;
  5527. }
  5528. lastExpiredTime = getNextRootExpirationTimeToWorkOn(root);
  5529. if (0 === lastExpiredTime) return null;
  5530. didTimeout = root.callbackNode;
  5531. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  5532. throw Error("Should not already be working.");
  5533. flushPassiveEffects();
  5534. var expirationTime = lastExpiredTime;
  5535. var exitStatus = executionContext;
  5536. executionContext |= RenderContext;
  5537. var prevDispatcher = pushDispatcher();
  5538. (root === workInProgressRoot && expirationTime === renderExpirationTime$1) ||
  5539. prepareFreshStack(root, expirationTime);
  5540. do
  5541. try {
  5542. workLoopConcurrent();
  5543. break;
  5544. } catch (thrownValue) {
  5545. handleError(root, thrownValue);
  5546. }
  5547. while (1);
  5548. resetContextDependencies();
  5549. ReactCurrentDispatcher$1.current = prevDispatcher;
  5550. executionContext = exitStatus;
  5551. null !== workInProgress
  5552. ? (exitStatus = RootIncomplete)
  5553. : ((workInProgressRoot = null),
  5554. (exitStatus = workInProgressRootExitStatus));
  5555. if (exitStatus !== RootIncomplete) {
  5556. exitStatus === RootErrored &&
  5557. ((lastExpiredTime = 2 < lastExpiredTime ? 2 : lastExpiredTime),
  5558. (exitStatus = renderRootSync(root, lastExpiredTime)));
  5559. if (exitStatus === RootFatalErrored)
  5560. throw ((didTimeout = workInProgressRootFatalError),
  5561. prepareFreshStack(root, lastExpiredTime),
  5562. markRootSuspendedAtTime(root, lastExpiredTime),
  5563. ensureRootIsScheduled(root),
  5564. didTimeout);
  5565. expirationTime = root.finishedWork = root.current.alternate;
  5566. root.finishedExpirationTime = lastExpiredTime;
  5567. switch (exitStatus) {
  5568. case RootIncomplete:
  5569. case RootFatalErrored:
  5570. throw Error("Root did not complete. This is a bug in React.");
  5571. case RootErrored:
  5572. commitRoot(root);
  5573. break;
  5574. case RootSuspended:
  5575. markRootSuspendedAtTime(root, lastExpiredTime);
  5576. exitStatus = root.lastSuspendedTime;
  5577. lastExpiredTime === exitStatus &&
  5578. (root.nextKnownPendingLevel = getRemainingExpirationTime(
  5579. expirationTime
  5580. ));
  5581. if (
  5582. 1073741823 === workInProgressRootLatestProcessedExpirationTime &&
  5583. ((expirationTime =
  5584. globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now()),
  5585. 10 < expirationTime)
  5586. ) {
  5587. if (
  5588. workInProgressRootHasPendingPing &&
  5589. ((prevDispatcher = root.lastPingedTime),
  5590. 0 === prevDispatcher || prevDispatcher >= lastExpiredTime)
  5591. ) {
  5592. root.lastPingedTime = lastExpiredTime;
  5593. prepareFreshStack(root, lastExpiredTime);
  5594. break;
  5595. }
  5596. prevDispatcher = getNextRootExpirationTimeToWorkOn(root);
  5597. if (0 !== prevDispatcher && prevDispatcher !== lastExpiredTime) break;
  5598. if (0 !== exitStatus && exitStatus !== lastExpiredTime) {
  5599. root.lastPingedTime = exitStatus;
  5600. break;
  5601. }
  5602. root.timeoutHandle = scheduleTimeout(
  5603. commitRoot.bind(null, root),
  5604. expirationTime
  5605. );
  5606. break;
  5607. }
  5608. commitRoot(root);
  5609. break;
  5610. case RootSuspendedWithDelay:
  5611. markRootSuspendedAtTime(root, lastExpiredTime);
  5612. exitStatus = root.lastSuspendedTime;
  5613. lastExpiredTime === exitStatus &&
  5614. (root.nextKnownPendingLevel = getRemainingExpirationTime(
  5615. expirationTime
  5616. ));
  5617. if (
  5618. workInProgressRootHasPendingPing &&
  5619. ((expirationTime = root.lastPingedTime),
  5620. 0 === expirationTime || expirationTime >= lastExpiredTime)
  5621. ) {
  5622. root.lastPingedTime = lastExpiredTime;
  5623. prepareFreshStack(root, lastExpiredTime);
  5624. break;
  5625. }
  5626. expirationTime = getNextRootExpirationTimeToWorkOn(root);
  5627. if (0 !== expirationTime && expirationTime !== lastExpiredTime) break;
  5628. if (0 !== exitStatus && exitStatus !== lastExpiredTime) {
  5629. root.lastPingedTime = exitStatus;
  5630. break;
  5631. }
  5632. 1073741823 !== workInProgressRootLatestSuspenseTimeout
  5633. ? (expirationTime =
  5634. 10 * (1073741821 - workInProgressRootLatestSuspenseTimeout) -
  5635. now())
  5636. : 1073741823 === workInProgressRootLatestProcessedExpirationTime
  5637. ? (expirationTime = 0)
  5638. : ((expirationTime =
  5639. 10 *
  5640. (1073741821 - workInProgressRootLatestProcessedExpirationTime) -
  5641. 5e3),
  5642. (exitStatus = now()),
  5643. (lastExpiredTime =
  5644. 10 * (1073741821 - lastExpiredTime) - exitStatus),
  5645. (expirationTime = exitStatus - expirationTime),
  5646. 0 > expirationTime && (expirationTime = 0),
  5647. (expirationTime =
  5648. (120 > expirationTime
  5649. ? 120
  5650. : 480 > expirationTime
  5651. ? 480
  5652. : 1080 > expirationTime
  5653. ? 1080
  5654. : 1920 > expirationTime
  5655. ? 1920
  5656. : 3e3 > expirationTime
  5657. ? 3e3
  5658. : 4320 > expirationTime
  5659. ? 4320
  5660. : 1960 * ceil(expirationTime / 1960)) - expirationTime),
  5661. lastExpiredTime < expirationTime &&
  5662. (expirationTime = lastExpiredTime));
  5663. if (10 < expirationTime) {
  5664. root.timeoutHandle = scheduleTimeout(
  5665. commitRoot.bind(null, root),
  5666. expirationTime
  5667. );
  5668. break;
  5669. }
  5670. commitRoot(root);
  5671. break;
  5672. case RootCompleted:
  5673. if (
  5674. 1073741823 !== workInProgressRootLatestProcessedExpirationTime &&
  5675. null !== workInProgressRootCanSuspendUsingConfig
  5676. ) {
  5677. prevDispatcher = workInProgressRootLatestProcessedExpirationTime;
  5678. var suspenseConfig = workInProgressRootCanSuspendUsingConfig;
  5679. expirationTime = suspenseConfig.busyMinDurationMs | 0;
  5680. 0 >= expirationTime
  5681. ? (expirationTime = 0)
  5682. : ((exitStatus = suspenseConfig.busyDelayMs | 0),
  5683. (prevDispatcher =
  5684. now() -
  5685. (10 * (1073741821 - prevDispatcher) -
  5686. (suspenseConfig.timeoutMs | 0 || 5e3))),
  5687. (expirationTime =
  5688. prevDispatcher <= exitStatus
  5689. ? 0
  5690. : exitStatus + expirationTime - prevDispatcher));
  5691. if (10 < expirationTime) {
  5692. markRootSuspendedAtTime(root, lastExpiredTime);
  5693. root.timeoutHandle = scheduleTimeout(
  5694. commitRoot.bind(null, root),
  5695. expirationTime
  5696. );
  5697. break;
  5698. }
  5699. }
  5700. commitRoot(root);
  5701. break;
  5702. default:
  5703. throw Error("Unknown root exit status.");
  5704. }
  5705. }
  5706. ensureRootIsScheduled(root);
  5707. return root.callbackNode === didTimeout
  5708. ? performConcurrentWorkOnRoot.bind(null, root)
  5709. : null;
  5710. }
  5711. function performSyncWorkOnRoot(root) {
  5712. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  5713. throw Error("Should not already be working.");
  5714. flushPassiveEffects();
  5715. var lastExpiredTime = root.lastExpiredTime;
  5716. lastExpiredTime =
  5717. 0 !== lastExpiredTime
  5718. ? root === workInProgressRoot && renderExpirationTime$1 >= lastExpiredTime
  5719. ? renderExpirationTime$1
  5720. : lastExpiredTime
  5721. : 1073741823;
  5722. var exitStatus = renderRootSync(root, lastExpiredTime);
  5723. 0 !== root.tag &&
  5724. exitStatus === RootErrored &&
  5725. ((lastExpiredTime = 2 < lastExpiredTime ? 2 : lastExpiredTime),
  5726. (exitStatus = renderRootSync(root, lastExpiredTime)));
  5727. if (exitStatus === RootFatalErrored)
  5728. throw ((exitStatus = workInProgressRootFatalError),
  5729. prepareFreshStack(root, lastExpiredTime),
  5730. markRootSuspendedAtTime(root, lastExpiredTime),
  5731. ensureRootIsScheduled(root),
  5732. exitStatus);
  5733. root.finishedWork = root.current.alternate;
  5734. root.finishedExpirationTime = lastExpiredTime;
  5735. commitRoot(root);
  5736. ensureRootIsScheduled(root);
  5737. return null;
  5738. }
  5739. function prepareFreshStack(root, expirationTime) {
  5740. root.finishedWork = null;
  5741. root.finishedExpirationTime = 0;
  5742. var timeoutHandle = root.timeoutHandle;
  5743. -1 !== timeoutHandle &&
  5744. ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
  5745. if (null !== workInProgress)
  5746. for (timeoutHandle = workInProgress.return; null !== timeoutHandle; ) {
  5747. var interruptedWork = timeoutHandle;
  5748. switch (interruptedWork.tag) {
  5749. case 1:
  5750. interruptedWork = interruptedWork.type.childContextTypes;
  5751. null !== interruptedWork &&
  5752. void 0 !== interruptedWork &&
  5753. popContext();
  5754. break;
  5755. case 3:
  5756. popHostContainer();
  5757. pop(didPerformWorkStackCursor);
  5758. pop(contextStackCursor);
  5759. break;
  5760. case 5:
  5761. popHostContext(interruptedWork);
  5762. break;
  5763. case 4:
  5764. popHostContainer();
  5765. break;
  5766. case 13:
  5767. pop(suspenseStackCursor);
  5768. break;
  5769. case 19:
  5770. pop(suspenseStackCursor);
  5771. break;
  5772. case 10:
  5773. popProvider(interruptedWork);
  5774. }
  5775. timeoutHandle = timeoutHandle.return;
  5776. }
  5777. workInProgressRoot = root;
  5778. workInProgress = createWorkInProgress(root.current, null);
  5779. renderExpirationTime$1 = expirationTime;
  5780. workInProgressRootExitStatus = RootIncomplete;
  5781. workInProgressRootFatalError = null;
  5782. workInProgressRootLatestSuspenseTimeout = workInProgressRootLatestProcessedExpirationTime = 1073741823;
  5783. workInProgressRootCanSuspendUsingConfig = null;
  5784. workInProgressRootNextUnprocessedUpdateTime = 0;
  5785. workInProgressRootHasPendingPing = !1;
  5786. }
  5787. function handleError(root$jscomp$0, thrownValue) {
  5788. do {
  5789. try {
  5790. resetContextDependencies();
  5791. ReactCurrentDispatcher.current = ContextOnlyDispatcher;
  5792. if (didScheduleRenderPhaseUpdate)
  5793. for (
  5794. var hook = currentlyRenderingFiber$1.memoizedState;
  5795. null !== hook;
  5796. ) {
  5797. var queue = hook.queue;
  5798. null !== queue && (queue.pending = null);
  5799. hook = hook.next;
  5800. }
  5801. renderExpirationTime = 0;
  5802. workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
  5803. didScheduleRenderPhaseUpdate = !1;
  5804. if (null === workInProgress || null === workInProgress.return)
  5805. return (
  5806. (workInProgressRootExitStatus = RootFatalErrored),
  5807. (workInProgressRootFatalError = thrownValue),
  5808. (workInProgress = null)
  5809. );
  5810. a: {
  5811. var root = root$jscomp$0,
  5812. returnFiber = workInProgress.return,
  5813. sourceFiber = workInProgress,
  5814. value = thrownValue;
  5815. thrownValue = renderExpirationTime$1;
  5816. sourceFiber.effectTag |= 2048;
  5817. sourceFiber.firstEffect = sourceFiber.lastEffect = null;
  5818. if (
  5819. null !== value &&
  5820. "object" === typeof value &&
  5821. "function" === typeof value.then
  5822. ) {
  5823. var thenable = value;
  5824. if (0 === (sourceFiber.mode & 2)) {
  5825. var currentSource = sourceFiber.alternate;
  5826. currentSource
  5827. ? ((sourceFiber.updateQueue = currentSource.updateQueue),
  5828. (sourceFiber.memoizedState = currentSource.memoizedState),
  5829. (sourceFiber.expirationTime = currentSource.expirationTime))
  5830. : ((sourceFiber.updateQueue = null),
  5831. (sourceFiber.memoizedState = null));
  5832. }
  5833. var hasInvisibleParentBoundary =
  5834. 0 !== (suspenseStackCursor.current & 1),
  5835. _workInProgress = returnFiber;
  5836. do {
  5837. var JSCompiler_temp;
  5838. if ((JSCompiler_temp = 13 === _workInProgress.tag)) {
  5839. var nextState = _workInProgress.memoizedState;
  5840. if (null !== nextState)
  5841. JSCompiler_temp = null !== nextState.dehydrated ? !0 : !1;
  5842. else {
  5843. var props = _workInProgress.memoizedProps;
  5844. JSCompiler_temp =
  5845. void 0 === props.fallback
  5846. ? !1
  5847. : !0 !== props.unstable_avoidThisFallback
  5848. ? !0
  5849. : hasInvisibleParentBoundary
  5850. ? !1
  5851. : !0;
  5852. }
  5853. }
  5854. if (JSCompiler_temp) {
  5855. var thenables = _workInProgress.updateQueue;
  5856. if (null === thenables) {
  5857. var updateQueue = new Set();
  5858. updateQueue.add(thenable);
  5859. _workInProgress.updateQueue = updateQueue;
  5860. } else thenables.add(thenable);
  5861. if (0 === (_workInProgress.mode & 2)) {
  5862. _workInProgress.effectTag |= 64;
  5863. sourceFiber.effectTag &= -2981;
  5864. if (1 === sourceFiber.tag)
  5865. if (null === sourceFiber.alternate) sourceFiber.tag = 17;
  5866. else {
  5867. var update = createUpdate(1073741823, null);
  5868. update.tag = 2;
  5869. enqueueUpdate(sourceFiber, update);
  5870. }
  5871. sourceFiber.expirationTime = 1073741823;
  5872. break a;
  5873. }
  5874. value = void 0;
  5875. sourceFiber = thrownValue;
  5876. var pingCache = root.pingCache;
  5877. null === pingCache
  5878. ? ((pingCache = root.pingCache = new PossiblyWeakMap()),
  5879. (value = new Set()),
  5880. pingCache.set(thenable, value))
  5881. : ((value = pingCache.get(thenable)),
  5882. void 0 === value &&
  5883. ((value = new Set()), pingCache.set(thenable, value)));
  5884. if (!value.has(sourceFiber)) {
  5885. value.add(sourceFiber);
  5886. var ping = pingSuspendedRoot.bind(
  5887. null,
  5888. root,
  5889. thenable,
  5890. sourceFiber
  5891. );
  5892. thenable.then(ping, ping);
  5893. }
  5894. _workInProgress.effectTag |= 4096;
  5895. _workInProgress.expirationTime = thrownValue;
  5896. break a;
  5897. }
  5898. _workInProgress = _workInProgress.return;
  5899. } while (null !== _workInProgress);
  5900. value = Error(
  5901. (getComponentName(sourceFiber.type) || "A React component") +
  5902. " suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." +
  5903. getStackByFiberInDevAndProd(sourceFiber)
  5904. );
  5905. }
  5906. workInProgressRootExitStatus !== RootCompleted &&
  5907. (workInProgressRootExitStatus = RootErrored);
  5908. value = createCapturedValue(value, sourceFiber);
  5909. _workInProgress = returnFiber;
  5910. do {
  5911. switch (_workInProgress.tag) {
  5912. case 3:
  5913. thenable = value;
  5914. _workInProgress.effectTag |= 4096;
  5915. _workInProgress.expirationTime = thrownValue;
  5916. var _update = createRootErrorUpdate(
  5917. _workInProgress,
  5918. thenable,
  5919. thrownValue
  5920. );
  5921. enqueueCapturedUpdate(_workInProgress, _update);
  5922. break a;
  5923. case 1:
  5924. thenable = value;
  5925. var ctor = _workInProgress.type,
  5926. instance = _workInProgress.stateNode;
  5927. if (
  5928. 0 === (_workInProgress.effectTag & 64) &&
  5929. ("function" === typeof ctor.getDerivedStateFromError ||
  5930. (null !== instance &&
  5931. "function" === typeof instance.componentDidCatch &&
  5932. (null === legacyErrorBoundariesThatAlreadyFailed ||
  5933. !legacyErrorBoundariesThatAlreadyFailed.has(instance))))
  5934. ) {
  5935. _workInProgress.effectTag |= 4096;
  5936. _workInProgress.expirationTime = thrownValue;
  5937. var _update2 = createClassErrorUpdate(
  5938. _workInProgress,
  5939. thenable,
  5940. thrownValue
  5941. );
  5942. enqueueCapturedUpdate(_workInProgress, _update2);
  5943. break a;
  5944. }
  5945. }
  5946. _workInProgress = _workInProgress.return;
  5947. } while (null !== _workInProgress);
  5948. }
  5949. workInProgress = completeUnitOfWork(workInProgress);
  5950. } catch (yetAnotherThrownValue) {
  5951. thrownValue = yetAnotherThrownValue;
  5952. continue;
  5953. }
  5954. break;
  5955. } while (1);
  5956. }
  5957. function pushDispatcher() {
  5958. var prevDispatcher = ReactCurrentDispatcher$1.current;
  5959. ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
  5960. return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
  5961. }
  5962. function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
  5963. expirationTime < workInProgressRootLatestProcessedExpirationTime &&
  5964. 2 < expirationTime &&
  5965. (workInProgressRootLatestProcessedExpirationTime = expirationTime);
  5966. null !== suspenseConfig &&
  5967. expirationTime < workInProgressRootLatestSuspenseTimeout &&
  5968. 2 < expirationTime &&
  5969. ((workInProgressRootLatestSuspenseTimeout = expirationTime),
  5970. (workInProgressRootCanSuspendUsingConfig = suspenseConfig));
  5971. }
  5972. function markUnprocessedUpdateTime(expirationTime) {
  5973. expirationTime > workInProgressRootNextUnprocessedUpdateTime &&
  5974. (workInProgressRootNextUnprocessedUpdateTime = expirationTime);
  5975. }
  5976. function renderRootSync(root, expirationTime) {
  5977. var prevExecutionContext = executionContext;
  5978. executionContext |= RenderContext;
  5979. var prevDispatcher = pushDispatcher();
  5980. (root === workInProgressRoot && expirationTime === renderExpirationTime$1) ||
  5981. prepareFreshStack(root, expirationTime);
  5982. do
  5983. try {
  5984. workLoopSync();
  5985. break;
  5986. } catch (thrownValue) {
  5987. handleError(root, thrownValue);
  5988. }
  5989. while (1);
  5990. resetContextDependencies();
  5991. executionContext = prevExecutionContext;
  5992. ReactCurrentDispatcher$1.current = prevDispatcher;
  5993. if (null !== workInProgress)
  5994. throw Error(
  5995. "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."
  5996. );
  5997. workInProgressRoot = null;
  5998. return workInProgressRootExitStatus;
  5999. }
  6000. function workLoopSync() {
  6001. for (; null !== workInProgress; )
  6002. workInProgress = performUnitOfWork(workInProgress);
  6003. }
  6004. function workLoopConcurrent() {
  6005. for (; null !== workInProgress && !shouldYield(); )
  6006. workInProgress = performUnitOfWork(workInProgress);
  6007. }
  6008. function performUnitOfWork(unitOfWork) {
  6009. var next = beginWork$1(
  6010. unitOfWork.alternate,
  6011. unitOfWork,
  6012. renderExpirationTime$1
  6013. );
  6014. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  6015. null === next && (next = completeUnitOfWork(unitOfWork));
  6016. ReactCurrentOwner$2.current = null;
  6017. return next;
  6018. }
  6019. function completeUnitOfWork(unitOfWork) {
  6020. workInProgress = unitOfWork;
  6021. do {
  6022. var current = workInProgress.alternate;
  6023. unitOfWork = workInProgress.return;
  6024. if (0 === (workInProgress.effectTag & 2048)) {
  6025. current = completeWork(current, workInProgress, renderExpirationTime$1);
  6026. if (
  6027. 1 === renderExpirationTime$1 ||
  6028. 1 !== workInProgress.childExpirationTime
  6029. ) {
  6030. for (
  6031. var newChildExpirationTime = 0, _child = workInProgress.child;
  6032. null !== _child;
  6033. ) {
  6034. var _childUpdateExpirationTime = _child.expirationTime,
  6035. _childChildExpirationTime = _child.childExpirationTime;
  6036. _childUpdateExpirationTime > newChildExpirationTime &&
  6037. (newChildExpirationTime = _childUpdateExpirationTime);
  6038. _childChildExpirationTime > newChildExpirationTime &&
  6039. (newChildExpirationTime = _childChildExpirationTime);
  6040. _child = _child.sibling;
  6041. }
  6042. workInProgress.childExpirationTime = newChildExpirationTime;
  6043. }
  6044. if (null !== current) return current;
  6045. null !== unitOfWork &&
  6046. 0 === (unitOfWork.effectTag & 2048) &&
  6047. (null === unitOfWork.firstEffect &&
  6048. (unitOfWork.firstEffect = workInProgress.firstEffect),
  6049. null !== workInProgress.lastEffect &&
  6050. (null !== unitOfWork.lastEffect &&
  6051. (unitOfWork.lastEffect.nextEffect = workInProgress.firstEffect),
  6052. (unitOfWork.lastEffect = workInProgress.lastEffect)),
  6053. 1 < workInProgress.effectTag &&
  6054. (null !== unitOfWork.lastEffect
  6055. ? (unitOfWork.lastEffect.nextEffect = workInProgress)
  6056. : (unitOfWork.firstEffect = workInProgress),
  6057. (unitOfWork.lastEffect = workInProgress)));
  6058. } else {
  6059. current = unwindWork(workInProgress);
  6060. if (null !== current) return (current.effectTag &= 2047), current;
  6061. null !== unitOfWork &&
  6062. ((unitOfWork.firstEffect = unitOfWork.lastEffect = null),
  6063. (unitOfWork.effectTag |= 2048));
  6064. }
  6065. current = workInProgress.sibling;
  6066. if (null !== current) return current;
  6067. workInProgress = unitOfWork;
  6068. } while (null !== workInProgress);
  6069. workInProgressRootExitStatus === RootIncomplete &&
  6070. (workInProgressRootExitStatus = RootCompleted);
  6071. return null;
  6072. }
  6073. function getRemainingExpirationTime(fiber) {
  6074. var updateExpirationTime = fiber.expirationTime;
  6075. fiber = fiber.childExpirationTime;
  6076. return updateExpirationTime > fiber ? updateExpirationTime : fiber;
  6077. }
  6078. function commitRoot(root) {
  6079. var renderPriorityLevel = getCurrentPriorityLevel();
  6080. runWithPriority(99, commitRootImpl.bind(null, root, renderPriorityLevel));
  6081. return null;
  6082. }
  6083. function commitRootImpl(root$jscomp$1, renderPriorityLevel$jscomp$1) {
  6084. do flushPassiveEffects();
  6085. while (null !== rootWithPendingPassiveEffects);
  6086. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  6087. throw Error("Should not already be working.");
  6088. var finishedWork = root$jscomp$1.finishedWork,
  6089. expirationTime = root$jscomp$1.finishedExpirationTime;
  6090. if (null === finishedWork) return null;
  6091. root$jscomp$1.finishedWork = null;
  6092. root$jscomp$1.finishedExpirationTime = 0;
  6093. if (finishedWork === root$jscomp$1.current)
  6094. throw Error(
  6095. "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
  6096. );
  6097. root$jscomp$1.callbackNode = null;
  6098. root$jscomp$1.callbackExpirationTime = 0;
  6099. root$jscomp$1.callbackPriority = 90;
  6100. root$jscomp$1.nextKnownPendingLevel = 0;
  6101. var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(
  6102. finishedWork
  6103. );
  6104. root$jscomp$1.firstPendingTime = remainingExpirationTimeBeforeCommit;
  6105. expirationTime <= root$jscomp$1.lastSuspendedTime
  6106. ? (root$jscomp$1.firstSuspendedTime = root$jscomp$1.lastSuspendedTime = root$jscomp$1.nextKnownPendingLevel = 0)
  6107. : expirationTime <= root$jscomp$1.firstSuspendedTime &&
  6108. (root$jscomp$1.firstSuspendedTime = expirationTime - 1);
  6109. expirationTime <= root$jscomp$1.lastPingedTime &&
  6110. (root$jscomp$1.lastPingedTime = 0);
  6111. expirationTime <= root$jscomp$1.lastExpiredTime &&
  6112. (root$jscomp$1.lastExpiredTime = 0);
  6113. root$jscomp$1 === workInProgressRoot &&
  6114. ((workInProgress = workInProgressRoot = null),
  6115. (renderExpirationTime$1 = 0));
  6116. 1 < finishedWork.effectTag
  6117. ? null !== finishedWork.lastEffect
  6118. ? ((finishedWork.lastEffect.nextEffect = finishedWork),
  6119. (remainingExpirationTimeBeforeCommit = finishedWork.firstEffect))
  6120. : (remainingExpirationTimeBeforeCommit = finishedWork)
  6121. : (remainingExpirationTimeBeforeCommit = finishedWork.firstEffect);
  6122. if (null !== remainingExpirationTimeBeforeCommit) {
  6123. var prevExecutionContext = executionContext;
  6124. executionContext |= CommitContext;
  6125. ReactCurrentOwner$2.current = null;
  6126. nextEffect = remainingExpirationTimeBeforeCommit;
  6127. do
  6128. try {
  6129. commitBeforeMutationEffects();
  6130. } catch (error) {
  6131. if (null === nextEffect) throw Error("Should be working on an effect.");
  6132. captureCommitPhaseError(nextEffect, error);
  6133. nextEffect = nextEffect.nextEffect;
  6134. }
  6135. while (null !== nextEffect);
  6136. nextEffect = remainingExpirationTimeBeforeCommit;
  6137. do
  6138. try {
  6139. for (
  6140. var root = root$jscomp$1,
  6141. renderPriorityLevel = renderPriorityLevel$jscomp$1;
  6142. null !== nextEffect;
  6143. ) {
  6144. var effectTag = nextEffect.effectTag;
  6145. if (effectTag & 128) {
  6146. var current = nextEffect.alternate;
  6147. if (null !== current) {
  6148. var currentRef = current.ref;
  6149. null !== currentRef &&
  6150. ("function" === typeof currentRef
  6151. ? currentRef(null)
  6152. : (currentRef.current = null));
  6153. }
  6154. }
  6155. switch (effectTag & 1038) {
  6156. case 2:
  6157. nextEffect.effectTag &= -3;
  6158. break;
  6159. case 6:
  6160. nextEffect.effectTag &= -3;
  6161. commitWork(nextEffect.alternate, nextEffect);
  6162. break;
  6163. case 1024:
  6164. nextEffect.effectTag &= -1025;
  6165. break;
  6166. case 1028:
  6167. nextEffect.effectTag &= -1025;
  6168. commitWork(nextEffect.alternate, nextEffect);
  6169. break;
  6170. case 4:
  6171. commitWork(nextEffect.alternate, nextEffect);
  6172. break;
  6173. case 8:
  6174. var current$jscomp$0 = nextEffect;
  6175. a: for (
  6176. var finishedRoot = root,
  6177. root$jscomp$0 = current$jscomp$0,
  6178. renderPriorityLevel$jscomp$0 = renderPriorityLevel,
  6179. node = root$jscomp$0;
  6180. ;
  6181. )
  6182. if (
  6183. (commitUnmount(
  6184. finishedRoot,
  6185. node,
  6186. renderPriorityLevel$jscomp$0
  6187. ),
  6188. null !== node.child)
  6189. )
  6190. (node.child.return = node), (node = node.child);
  6191. else {
  6192. if (node === root$jscomp$0) break;
  6193. for (; null === node.sibling; ) {
  6194. if (null === node.return || node.return === root$jscomp$0)
  6195. break a;
  6196. node = node.return;
  6197. }
  6198. node.sibling.return = node.return;
  6199. node = node.sibling;
  6200. }
  6201. detachFiber(current$jscomp$0);
  6202. }
  6203. nextEffect = nextEffect.nextEffect;
  6204. }
  6205. } catch (error) {
  6206. if (null === nextEffect) throw Error("Should be working on an effect.");
  6207. captureCommitPhaseError(nextEffect, error);
  6208. nextEffect = nextEffect.nextEffect;
  6209. }
  6210. while (null !== nextEffect);
  6211. root$jscomp$1.current = finishedWork;
  6212. nextEffect = remainingExpirationTimeBeforeCommit;
  6213. do
  6214. try {
  6215. for (effectTag = root$jscomp$1; null !== nextEffect; ) {
  6216. var effectTag$jscomp$0 = nextEffect.effectTag;
  6217. effectTag$jscomp$0 & 36 &&
  6218. commitLifeCycles(effectTag, nextEffect.alternate, nextEffect);
  6219. if (effectTag$jscomp$0 & 128) {
  6220. current = void 0;
  6221. var ref = nextEffect.ref;
  6222. if (null !== ref) {
  6223. var instance = nextEffect.stateNode;
  6224. switch (nextEffect.tag) {
  6225. case 5:
  6226. current = instance.canonical;
  6227. break;
  6228. default:
  6229. current = instance;
  6230. }
  6231. "function" === typeof ref
  6232. ? ref(current)
  6233. : (ref.current = current);
  6234. }
  6235. }
  6236. nextEffect = nextEffect.nextEffect;
  6237. }
  6238. } catch (error) {
  6239. if (null === nextEffect) throw Error("Should be working on an effect.");
  6240. captureCommitPhaseError(nextEffect, error);
  6241. nextEffect = nextEffect.nextEffect;
  6242. }
  6243. while (null !== nextEffect);
  6244. nextEffect = null;
  6245. requestPaint();
  6246. executionContext = prevExecutionContext;
  6247. } else root$jscomp$1.current = finishedWork;
  6248. if (rootDoesHavePassiveEffects)
  6249. (rootDoesHavePassiveEffects = !1),
  6250. (rootWithPendingPassiveEffects = root$jscomp$1),
  6251. (pendingPassiveEffectsRenderPriority = renderPriorityLevel$jscomp$1);
  6252. else
  6253. for (
  6254. nextEffect = remainingExpirationTimeBeforeCommit;
  6255. null !== nextEffect;
  6256. )
  6257. (renderPriorityLevel$jscomp$1 = nextEffect.nextEffect),
  6258. (nextEffect.nextEffect = null),
  6259. (nextEffect = renderPriorityLevel$jscomp$1);
  6260. renderPriorityLevel$jscomp$1 = root$jscomp$1.firstPendingTime;
  6261. 0 === renderPriorityLevel$jscomp$1 &&
  6262. (legacyErrorBoundariesThatAlreadyFailed = null);
  6263. 1073741823 === renderPriorityLevel$jscomp$1
  6264. ? root$jscomp$1 === rootWithNestedUpdates
  6265. ? nestedUpdateCount++
  6266. : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root$jscomp$1))
  6267. : (nestedUpdateCount = 0);
  6268. "function" === typeof onCommitFiberRoot &&
  6269. onCommitFiberRoot(finishedWork.stateNode, expirationTime);
  6270. ensureRootIsScheduled(root$jscomp$1);
  6271. if (hasUncaughtError)
  6272. throw ((hasUncaughtError = !1),
  6273. (root$jscomp$1 = firstUncaughtError),
  6274. (firstUncaughtError = null),
  6275. root$jscomp$1);
  6276. if ((executionContext & LegacyUnbatchedContext) !== NoContext) return null;
  6277. flushSyncCallbackQueue();
  6278. return null;
  6279. }
  6280. function commitBeforeMutationEffects() {
  6281. for (; null !== nextEffect; ) {
  6282. var effectTag = nextEffect.effectTag;
  6283. 0 !== (effectTag & 256) &&
  6284. commitBeforeMutationLifeCycles(nextEffect.alternate, nextEffect);
  6285. 0 === (effectTag & 512) ||
  6286. rootDoesHavePassiveEffects ||
  6287. ((rootDoesHavePassiveEffects = !0),
  6288. scheduleCallback(97, function() {
  6289. flushPassiveEffects();
  6290. return null;
  6291. }));
  6292. nextEffect = nextEffect.nextEffect;
  6293. }
  6294. }
  6295. function flushPassiveEffects() {
  6296. if (90 !== pendingPassiveEffectsRenderPriority) {
  6297. var priorityLevel =
  6298. 97 < pendingPassiveEffectsRenderPriority
  6299. ? 97
  6300. : pendingPassiveEffectsRenderPriority;
  6301. pendingPassiveEffectsRenderPriority = 90;
  6302. return runWithPriority(priorityLevel, flushPassiveEffectsImpl);
  6303. }
  6304. }
  6305. function flushPassiveEffectsImpl() {
  6306. if (null === rootWithPendingPassiveEffects) return !1;
  6307. var root = rootWithPendingPassiveEffects;
  6308. rootWithPendingPassiveEffects = null;
  6309. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  6310. throw Error("Cannot flush passive effects while already rendering.");
  6311. var prevExecutionContext = executionContext;
  6312. executionContext |= CommitContext;
  6313. for (root = root.current.firstEffect; null !== root; ) {
  6314. try {
  6315. var finishedWork = root;
  6316. if (0 !== (finishedWork.effectTag & 512))
  6317. switch (finishedWork.tag) {
  6318. case 0:
  6319. case 11:
  6320. case 15:
  6321. case 22:
  6322. commitHookEffectListUnmount(5, finishedWork),
  6323. commitHookEffectListMount(5, finishedWork);
  6324. }
  6325. } catch (error) {
  6326. if (null === root) throw Error("Should be working on an effect.");
  6327. captureCommitPhaseError(root, error);
  6328. }
  6329. finishedWork = root.nextEffect;
  6330. root.nextEffect = null;
  6331. root = finishedWork;
  6332. }
  6333. executionContext = prevExecutionContext;
  6334. flushSyncCallbackQueue();
  6335. return !0;
  6336. }
  6337. function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
  6338. sourceFiber = createCapturedValue(error, sourceFiber);
  6339. sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 1073741823);
  6340. enqueueUpdate(rootFiber, sourceFiber);
  6341. rootFiber = markUpdateTimeFromFiberToRoot(rootFiber, 1073741823);
  6342. null !== rootFiber && ensureRootIsScheduled(rootFiber);
  6343. }
  6344. function captureCommitPhaseError(sourceFiber, error) {
  6345. if (3 === sourceFiber.tag)
  6346. captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
  6347. else
  6348. for (var fiber = sourceFiber.return; null !== fiber; ) {
  6349. if (3 === fiber.tag) {
  6350. captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
  6351. break;
  6352. } else if (1 === fiber.tag) {
  6353. var instance = fiber.stateNode;
  6354. if (
  6355. "function" === typeof fiber.type.getDerivedStateFromError ||
  6356. ("function" === typeof instance.componentDidCatch &&
  6357. (null === legacyErrorBoundariesThatAlreadyFailed ||
  6358. !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
  6359. ) {
  6360. sourceFiber = createCapturedValue(error, sourceFiber);
  6361. sourceFiber = createClassErrorUpdate(fiber, sourceFiber, 1073741823);
  6362. enqueueUpdate(fiber, sourceFiber);
  6363. fiber = markUpdateTimeFromFiberToRoot(fiber, 1073741823);
  6364. null !== fiber && ensureRootIsScheduled(fiber);
  6365. break;
  6366. }
  6367. }
  6368. fiber = fiber.return;
  6369. }
  6370. }
  6371. function pingSuspendedRoot(root, thenable, suspendedTime) {
  6372. var pingCache = root.pingCache;
  6373. null !== pingCache && pingCache.delete(thenable);
  6374. workInProgressRoot === root && renderExpirationTime$1 === suspendedTime
  6375. ? workInProgressRootExitStatus === RootSuspendedWithDelay ||
  6376. (workInProgressRootExitStatus === RootSuspended &&
  6377. 1073741823 === workInProgressRootLatestProcessedExpirationTime &&
  6378. now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)
  6379. ? prepareFreshStack(root, renderExpirationTime$1)
  6380. : (workInProgressRootHasPendingPing = !0)
  6381. : isRootSuspendedAtTime(root, suspendedTime) &&
  6382. ((thenable = root.lastPingedTime),
  6383. (0 !== thenable && thenable < suspendedTime) ||
  6384. ((root.lastPingedTime = suspendedTime), ensureRootIsScheduled(root)));
  6385. }
  6386. function resolveRetryThenable(boundaryFiber, thenable) {
  6387. var retryCache = boundaryFiber.stateNode;
  6388. null !== retryCache && retryCache.delete(thenable);
  6389. thenable = 0;
  6390. 0 === thenable &&
  6391. ((thenable = requestCurrentTimeForUpdate()),
  6392. (thenable = computeExpirationForFiber(thenable, boundaryFiber, null)));
  6393. boundaryFiber = markUpdateTimeFromFiberToRoot(boundaryFiber, thenable);
  6394. null !== boundaryFiber && ensureRootIsScheduled(boundaryFiber);
  6395. }
  6396. var beginWork$1;
  6397. beginWork$1 = function(current, workInProgress, renderExpirationTime) {
  6398. var updateExpirationTime = workInProgress.expirationTime;
  6399. if (null !== current)
  6400. if (
  6401. current.memoizedProps !== workInProgress.pendingProps ||
  6402. didPerformWorkStackCursor.current
  6403. )
  6404. didReceiveUpdate = !0;
  6405. else {
  6406. if (updateExpirationTime < renderExpirationTime) {
  6407. didReceiveUpdate = !1;
  6408. switch (workInProgress.tag) {
  6409. case 3:
  6410. pushHostRootContext(workInProgress);
  6411. break;
  6412. case 5:
  6413. pushHostContext(workInProgress);
  6414. break;
  6415. case 1:
  6416. isContextProvider(workInProgress.type) &&
  6417. pushContextProvider(workInProgress);
  6418. break;
  6419. case 4:
  6420. pushHostContainer(
  6421. workInProgress,
  6422. workInProgress.stateNode.containerInfo
  6423. );
  6424. break;
  6425. case 10:
  6426. updateExpirationTime = workInProgress.memoizedProps.value;
  6427. var context = workInProgress.type._context;
  6428. push(valueCursor, context._currentValue2);
  6429. context._currentValue2 = updateExpirationTime;
  6430. break;
  6431. case 13:
  6432. if (null !== workInProgress.memoizedState) {
  6433. updateExpirationTime = workInProgress.child.childExpirationTime;
  6434. if (
  6435. 0 !== updateExpirationTime &&
  6436. updateExpirationTime >= renderExpirationTime
  6437. )
  6438. return updateSuspenseComponent(
  6439. current,
  6440. workInProgress,
  6441. renderExpirationTime
  6442. );
  6443. push(suspenseStackCursor, suspenseStackCursor.current & 1);
  6444. workInProgress = bailoutOnAlreadyFinishedWork(
  6445. current,
  6446. workInProgress,
  6447. renderExpirationTime
  6448. );
  6449. return null !== workInProgress ? workInProgress.sibling : null;
  6450. }
  6451. push(suspenseStackCursor, suspenseStackCursor.current & 1);
  6452. break;
  6453. case 19:
  6454. updateExpirationTime =
  6455. workInProgress.childExpirationTime >= renderExpirationTime;
  6456. if (0 !== (current.effectTag & 64)) {
  6457. if (updateExpirationTime)
  6458. return updateSuspenseListComponent(
  6459. current,
  6460. workInProgress,
  6461. renderExpirationTime
  6462. );
  6463. workInProgress.effectTag |= 64;
  6464. }
  6465. context = workInProgress.memoizedState;
  6466. null !== context &&
  6467. ((context.rendering = null), (context.tail = null));
  6468. push(suspenseStackCursor, suspenseStackCursor.current);
  6469. if (!updateExpirationTime) return null;
  6470. }
  6471. return bailoutOnAlreadyFinishedWork(
  6472. current,
  6473. workInProgress,
  6474. renderExpirationTime
  6475. );
  6476. }
  6477. didReceiveUpdate = !1;
  6478. }
  6479. else didReceiveUpdate = !1;
  6480. workInProgress.expirationTime = 0;
  6481. switch (workInProgress.tag) {
  6482. case 2:
  6483. updateExpirationTime = workInProgress.type;
  6484. null !== current &&
  6485. ((current.alternate = null),
  6486. (workInProgress.alternate = null),
  6487. (workInProgress.effectTag |= 2));
  6488. current = workInProgress.pendingProps;
  6489. context = getMaskedContext(workInProgress, contextStackCursor.current);
  6490. prepareToReadContext(workInProgress, renderExpirationTime);
  6491. context = renderWithHooks(
  6492. null,
  6493. workInProgress,
  6494. updateExpirationTime,
  6495. current,
  6496. context,
  6497. renderExpirationTime
  6498. );
  6499. workInProgress.effectTag |= 1;
  6500. if (
  6501. "object" === typeof context &&
  6502. null !== context &&
  6503. "function" === typeof context.render &&
  6504. void 0 === context.$$typeof
  6505. ) {
  6506. workInProgress.tag = 1;
  6507. workInProgress.memoizedState = null;
  6508. workInProgress.updateQueue = null;
  6509. if (isContextProvider(updateExpirationTime)) {
  6510. var hasContext = !0;
  6511. pushContextProvider(workInProgress);
  6512. } else hasContext = !1;
  6513. workInProgress.memoizedState =
  6514. null !== context.state && void 0 !== context.state
  6515. ? context.state
  6516. : null;
  6517. initializeUpdateQueue(workInProgress);
  6518. var getDerivedStateFromProps =
  6519. updateExpirationTime.getDerivedStateFromProps;
  6520. "function" === typeof getDerivedStateFromProps &&
  6521. applyDerivedStateFromProps(
  6522. workInProgress,
  6523. updateExpirationTime,
  6524. getDerivedStateFromProps,
  6525. current
  6526. );
  6527. context.updater = classComponentUpdater;
  6528. workInProgress.stateNode = context;
  6529. context._reactInternalFiber = workInProgress;
  6530. mountClassInstance(
  6531. workInProgress,
  6532. updateExpirationTime,
  6533. current,
  6534. renderExpirationTime
  6535. );
  6536. workInProgress = finishClassComponent(
  6537. null,
  6538. workInProgress,
  6539. updateExpirationTime,
  6540. !0,
  6541. hasContext,
  6542. renderExpirationTime
  6543. );
  6544. } else
  6545. (workInProgress.tag = 0),
  6546. reconcileChildren(
  6547. null,
  6548. workInProgress,
  6549. context,
  6550. renderExpirationTime
  6551. ),
  6552. (workInProgress = workInProgress.child);
  6553. return workInProgress;
  6554. case 16:
  6555. a: {
  6556. context = workInProgress.elementType;
  6557. null !== current &&
  6558. ((current.alternate = null),
  6559. (workInProgress.alternate = null),
  6560. (workInProgress.effectTag |= 2));
  6561. current = workInProgress.pendingProps;
  6562. initializeLazyComponentType(context);
  6563. if (1 !== context._status) throw context._result;
  6564. context = context._result;
  6565. workInProgress.type = context;
  6566. hasContext = workInProgress.tag = resolveLazyComponentTag(context);
  6567. current = resolveDefaultProps(context, current);
  6568. switch (hasContext) {
  6569. case 0:
  6570. workInProgress = updateFunctionComponent(
  6571. null,
  6572. workInProgress,
  6573. context,
  6574. current,
  6575. renderExpirationTime
  6576. );
  6577. break a;
  6578. case 1:
  6579. workInProgress = updateClassComponent(
  6580. null,
  6581. workInProgress,
  6582. context,
  6583. current,
  6584. renderExpirationTime
  6585. );
  6586. break a;
  6587. case 11:
  6588. workInProgress = updateForwardRef(
  6589. null,
  6590. workInProgress,
  6591. context,
  6592. current,
  6593. renderExpirationTime
  6594. );
  6595. break a;
  6596. case 14:
  6597. workInProgress = updateMemoComponent(
  6598. null,
  6599. workInProgress,
  6600. context,
  6601. resolveDefaultProps(context.type, current),
  6602. updateExpirationTime,
  6603. renderExpirationTime
  6604. );
  6605. break a;
  6606. }
  6607. throw Error(
  6608. "Element type is invalid. Received a promise that resolves to: " +
  6609. context +
  6610. ". Lazy element type must resolve to a class or function."
  6611. );
  6612. }
  6613. return workInProgress;
  6614. case 0:
  6615. return (
  6616. (updateExpirationTime = workInProgress.type),
  6617. (context = workInProgress.pendingProps),
  6618. (context =
  6619. workInProgress.elementType === updateExpirationTime
  6620. ? context
  6621. : resolveDefaultProps(updateExpirationTime, context)),
  6622. updateFunctionComponent(
  6623. current,
  6624. workInProgress,
  6625. updateExpirationTime,
  6626. context,
  6627. renderExpirationTime
  6628. )
  6629. );
  6630. case 1:
  6631. return (
  6632. (updateExpirationTime = workInProgress.type),
  6633. (context = workInProgress.pendingProps),
  6634. (context =
  6635. workInProgress.elementType === updateExpirationTime
  6636. ? context
  6637. : resolveDefaultProps(updateExpirationTime, context)),
  6638. updateClassComponent(
  6639. current,
  6640. workInProgress,
  6641. updateExpirationTime,
  6642. context,
  6643. renderExpirationTime
  6644. )
  6645. );
  6646. case 3:
  6647. pushHostRootContext(workInProgress);
  6648. updateExpirationTime = workInProgress.updateQueue;
  6649. if (null === current || null === updateExpirationTime)
  6650. throw Error(
  6651. "If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
  6652. );
  6653. updateExpirationTime = workInProgress.pendingProps;
  6654. context = workInProgress.memoizedState;
  6655. context = null !== context ? context.element : null;
  6656. cloneUpdateQueue(current, workInProgress);
  6657. processUpdateQueue(
  6658. workInProgress,
  6659. updateExpirationTime,
  6660. null,
  6661. renderExpirationTime
  6662. );
  6663. updateExpirationTime = workInProgress.memoizedState.element;
  6664. updateExpirationTime === context
  6665. ? (workInProgress = bailoutOnAlreadyFinishedWork(
  6666. current,
  6667. workInProgress,
  6668. renderExpirationTime
  6669. ))
  6670. : (reconcileChildren(
  6671. current,
  6672. workInProgress,
  6673. updateExpirationTime,
  6674. renderExpirationTime
  6675. ),
  6676. (workInProgress = workInProgress.child));
  6677. return workInProgress;
  6678. case 5:
  6679. return (
  6680. pushHostContext(workInProgress),
  6681. (updateExpirationTime = workInProgress.pendingProps.children),
  6682. markRef(current, workInProgress),
  6683. reconcileChildren(
  6684. current,
  6685. workInProgress,
  6686. updateExpirationTime,
  6687. renderExpirationTime
  6688. ),
  6689. (workInProgress = workInProgress.child),
  6690. workInProgress
  6691. );
  6692. case 6:
  6693. return null;
  6694. case 13:
  6695. return updateSuspenseComponent(
  6696. current,
  6697. workInProgress,
  6698. renderExpirationTime
  6699. );
  6700. case 4:
  6701. return (
  6702. pushHostContainer(
  6703. workInProgress,
  6704. workInProgress.stateNode.containerInfo
  6705. ),
  6706. (updateExpirationTime = workInProgress.pendingProps),
  6707. null === current
  6708. ? (workInProgress.child = reconcileChildFibers(
  6709. workInProgress,
  6710. null,
  6711. updateExpirationTime,
  6712. renderExpirationTime
  6713. ))
  6714. : reconcileChildren(
  6715. current,
  6716. workInProgress,
  6717. updateExpirationTime,
  6718. renderExpirationTime
  6719. ),
  6720. workInProgress.child
  6721. );
  6722. case 11:
  6723. return (
  6724. (updateExpirationTime = workInProgress.type),
  6725. (context = workInProgress.pendingProps),
  6726. (context =
  6727. workInProgress.elementType === updateExpirationTime
  6728. ? context
  6729. : resolveDefaultProps(updateExpirationTime, context)),
  6730. updateForwardRef(
  6731. current,
  6732. workInProgress,
  6733. updateExpirationTime,
  6734. context,
  6735. renderExpirationTime
  6736. )
  6737. );
  6738. case 7:
  6739. return (
  6740. reconcileChildren(
  6741. current,
  6742. workInProgress,
  6743. workInProgress.pendingProps,
  6744. renderExpirationTime
  6745. ),
  6746. workInProgress.child
  6747. );
  6748. case 8:
  6749. return (
  6750. reconcileChildren(
  6751. current,
  6752. workInProgress,
  6753. workInProgress.pendingProps.children,
  6754. renderExpirationTime
  6755. ),
  6756. workInProgress.child
  6757. );
  6758. case 12:
  6759. return (
  6760. reconcileChildren(
  6761. current,
  6762. workInProgress,
  6763. workInProgress.pendingProps.children,
  6764. renderExpirationTime
  6765. ),
  6766. workInProgress.child
  6767. );
  6768. case 10:
  6769. a: {
  6770. updateExpirationTime = workInProgress.type._context;
  6771. context = workInProgress.pendingProps;
  6772. getDerivedStateFromProps = workInProgress.memoizedProps;
  6773. hasContext = context.value;
  6774. var context$jscomp$0 = workInProgress.type._context;
  6775. push(valueCursor, context$jscomp$0._currentValue2);
  6776. context$jscomp$0._currentValue2 = hasContext;
  6777. if (null !== getDerivedStateFromProps)
  6778. if (
  6779. ((context$jscomp$0 = getDerivedStateFromProps.value),
  6780. (hasContext = objectIs(context$jscomp$0, hasContext)
  6781. ? 0
  6782. : ("function" ===
  6783. typeof updateExpirationTime._calculateChangedBits
  6784. ? updateExpirationTime._calculateChangedBits(
  6785. context$jscomp$0,
  6786. hasContext
  6787. )
  6788. : 1073741823) | 0),
  6789. 0 === hasContext)
  6790. ) {
  6791. if (
  6792. getDerivedStateFromProps.children === context.children &&
  6793. !didPerformWorkStackCursor.current
  6794. ) {
  6795. workInProgress = bailoutOnAlreadyFinishedWork(
  6796. current,
  6797. workInProgress,
  6798. renderExpirationTime
  6799. );
  6800. break a;
  6801. }
  6802. } else
  6803. for (
  6804. context$jscomp$0 = workInProgress.child,
  6805. null !== context$jscomp$0 &&
  6806. (context$jscomp$0.return = workInProgress);
  6807. null !== context$jscomp$0;
  6808. ) {
  6809. var list = context$jscomp$0.dependencies;
  6810. if (null !== list) {
  6811. getDerivedStateFromProps = context$jscomp$0.child;
  6812. for (
  6813. var dependency = list.firstContext;
  6814. null !== dependency;
  6815. ) {
  6816. if (
  6817. dependency.context === updateExpirationTime &&
  6818. 0 !== (dependency.observedBits & hasContext)
  6819. ) {
  6820. 1 === context$jscomp$0.tag &&
  6821. ((dependency = createUpdate(renderExpirationTime, null)),
  6822. (dependency.tag = 2),
  6823. enqueueUpdate(context$jscomp$0, dependency));
  6824. context$jscomp$0.expirationTime < renderExpirationTime &&
  6825. (context$jscomp$0.expirationTime = renderExpirationTime);
  6826. dependency = context$jscomp$0.alternate;
  6827. null !== dependency &&
  6828. dependency.expirationTime < renderExpirationTime &&
  6829. (dependency.expirationTime = renderExpirationTime);
  6830. scheduleWorkOnParentPath(
  6831. context$jscomp$0.return,
  6832. renderExpirationTime
  6833. );
  6834. list.expirationTime < renderExpirationTime &&
  6835. (list.expirationTime = renderExpirationTime);
  6836. break;
  6837. }
  6838. dependency = dependency.next;
  6839. }
  6840. } else
  6841. getDerivedStateFromProps =
  6842. 10 === context$jscomp$0.tag
  6843. ? context$jscomp$0.type === workInProgress.type
  6844. ? null
  6845. : context$jscomp$0.child
  6846. : context$jscomp$0.child;
  6847. if (null !== getDerivedStateFromProps)
  6848. getDerivedStateFromProps.return = context$jscomp$0;
  6849. else
  6850. for (
  6851. getDerivedStateFromProps = context$jscomp$0;
  6852. null !== getDerivedStateFromProps;
  6853. ) {
  6854. if (getDerivedStateFromProps === workInProgress) {
  6855. getDerivedStateFromProps = null;
  6856. break;
  6857. }
  6858. context$jscomp$0 = getDerivedStateFromProps.sibling;
  6859. if (null !== context$jscomp$0) {
  6860. context$jscomp$0.return = getDerivedStateFromProps.return;
  6861. getDerivedStateFromProps = context$jscomp$0;
  6862. break;
  6863. }
  6864. getDerivedStateFromProps = getDerivedStateFromProps.return;
  6865. }
  6866. context$jscomp$0 = getDerivedStateFromProps;
  6867. }
  6868. reconcileChildren(
  6869. current,
  6870. workInProgress,
  6871. context.children,
  6872. renderExpirationTime
  6873. );
  6874. workInProgress = workInProgress.child;
  6875. }
  6876. return workInProgress;
  6877. case 9:
  6878. return (
  6879. (context = workInProgress.type),
  6880. (hasContext = workInProgress.pendingProps),
  6881. (updateExpirationTime = hasContext.children),
  6882. prepareToReadContext(workInProgress, renderExpirationTime),
  6883. (context = readContext(context, hasContext.unstable_observedBits)),
  6884. (updateExpirationTime = updateExpirationTime(context)),
  6885. (workInProgress.effectTag |= 1),
  6886. reconcileChildren(
  6887. current,
  6888. workInProgress,
  6889. updateExpirationTime,
  6890. renderExpirationTime
  6891. ),
  6892. workInProgress.child
  6893. );
  6894. case 14:
  6895. return (
  6896. (context = workInProgress.type),
  6897. (hasContext = resolveDefaultProps(
  6898. context,
  6899. workInProgress.pendingProps
  6900. )),
  6901. (hasContext = resolveDefaultProps(context.type, hasContext)),
  6902. updateMemoComponent(
  6903. current,
  6904. workInProgress,
  6905. context,
  6906. hasContext,
  6907. updateExpirationTime,
  6908. renderExpirationTime
  6909. )
  6910. );
  6911. case 15:
  6912. return updateSimpleMemoComponent(
  6913. current,
  6914. workInProgress,
  6915. workInProgress.type,
  6916. workInProgress.pendingProps,
  6917. updateExpirationTime,
  6918. renderExpirationTime
  6919. );
  6920. case 17:
  6921. return (
  6922. (updateExpirationTime = workInProgress.type),
  6923. (context = workInProgress.pendingProps),
  6924. (context =
  6925. workInProgress.elementType === updateExpirationTime
  6926. ? context
  6927. : resolveDefaultProps(updateExpirationTime, context)),
  6928. null !== current &&
  6929. ((current.alternate = null),
  6930. (workInProgress.alternate = null),
  6931. (workInProgress.effectTag |= 2)),
  6932. (workInProgress.tag = 1),
  6933. isContextProvider(updateExpirationTime)
  6934. ? ((current = !0), pushContextProvider(workInProgress))
  6935. : (current = !1),
  6936. prepareToReadContext(workInProgress, renderExpirationTime),
  6937. constructClassInstance(workInProgress, updateExpirationTime, context),
  6938. mountClassInstance(
  6939. workInProgress,
  6940. updateExpirationTime,
  6941. context,
  6942. renderExpirationTime
  6943. ),
  6944. finishClassComponent(
  6945. null,
  6946. workInProgress,
  6947. updateExpirationTime,
  6948. !0,
  6949. current,
  6950. renderExpirationTime
  6951. )
  6952. );
  6953. case 19:
  6954. return updateSuspenseListComponent(
  6955. current,
  6956. workInProgress,
  6957. renderExpirationTime
  6958. );
  6959. }
  6960. throw Error(
  6961. "Unknown unit of work tag (" +
  6962. workInProgress.tag +
  6963. "). This error is likely caused by a bug in React. Please file an issue."
  6964. );
  6965. };
  6966. var onCommitFiberRoot = null,
  6967. onCommitFiberUnmount = null;
  6968. function injectInternals(internals) {
  6969. if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
  6970. var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  6971. if (hook.isDisabled || !hook.supportsFiber) return !0;
  6972. try {
  6973. var rendererID = hook.inject(internals);
  6974. onCommitFiberRoot = function(root) {
  6975. try {
  6976. hook.onCommitFiberRoot(
  6977. rendererID,
  6978. root,
  6979. void 0,
  6980. 64 === (root.current.effectTag & 64)
  6981. );
  6982. } catch (err) {}
  6983. };
  6984. onCommitFiberUnmount = function(fiber) {
  6985. try {
  6986. hook.onCommitFiberUnmount(rendererID, fiber);
  6987. } catch (err) {}
  6988. };
  6989. } catch (err) {}
  6990. return !0;
  6991. }
  6992. function FiberNode(tag, pendingProps, key, mode) {
  6993. this.tag = tag;
  6994. this.key = key;
  6995. this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
  6996. this.index = 0;
  6997. this.ref = null;
  6998. this.pendingProps = pendingProps;
  6999. this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
  7000. this.mode = mode;
  7001. this.effectTag = 0;
  7002. this.lastEffect = this.firstEffect = this.nextEffect = null;
  7003. this.childExpirationTime = this.expirationTime = 0;
  7004. this.alternate = null;
  7005. }
  7006. function shouldConstruct(Component) {
  7007. Component = Component.prototype;
  7008. return !(!Component || !Component.isReactComponent);
  7009. }
  7010. function resolveLazyComponentTag(Component) {
  7011. if ("function" === typeof Component)
  7012. return shouldConstruct(Component) ? 1 : 0;
  7013. if (void 0 !== Component && null !== Component) {
  7014. Component = Component.$$typeof;
  7015. if (Component === REACT_FORWARD_REF_TYPE) return 11;
  7016. if (Component === REACT_MEMO_TYPE) return 14;
  7017. }
  7018. return 2;
  7019. }
  7020. function createWorkInProgress(current, pendingProps) {
  7021. var workInProgress = current.alternate;
  7022. null === workInProgress
  7023. ? ((workInProgress = new FiberNode(
  7024. current.tag,
  7025. pendingProps,
  7026. current.key,
  7027. current.mode
  7028. )),
  7029. (workInProgress.elementType = current.elementType),
  7030. (workInProgress.type = current.type),
  7031. (workInProgress.stateNode = current.stateNode),
  7032. (workInProgress.alternate = current),
  7033. (current.alternate = workInProgress))
  7034. : ((workInProgress.pendingProps = pendingProps),
  7035. (workInProgress.effectTag = 0),
  7036. (workInProgress.nextEffect = null),
  7037. (workInProgress.firstEffect = null),
  7038. (workInProgress.lastEffect = null));
  7039. workInProgress.childExpirationTime = current.childExpirationTime;
  7040. workInProgress.expirationTime = current.expirationTime;
  7041. workInProgress.child = current.child;
  7042. workInProgress.memoizedProps = current.memoizedProps;
  7043. workInProgress.memoizedState = current.memoizedState;
  7044. workInProgress.updateQueue = current.updateQueue;
  7045. pendingProps = current.dependencies;
  7046. workInProgress.dependencies =
  7047. null === pendingProps
  7048. ? null
  7049. : {
  7050. expirationTime: pendingProps.expirationTime,
  7051. firstContext: pendingProps.firstContext,
  7052. responders: pendingProps.responders
  7053. };
  7054. workInProgress.sibling = current.sibling;
  7055. workInProgress.index = current.index;
  7056. workInProgress.ref = current.ref;
  7057. return workInProgress;
  7058. }
  7059. function createFiberFromTypeAndProps(
  7060. type,
  7061. key,
  7062. pendingProps,
  7063. owner,
  7064. mode,
  7065. expirationTime
  7066. ) {
  7067. var fiberTag = 2;
  7068. owner = type;
  7069. if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
  7070. else if ("string" === typeof type) fiberTag = 5;
  7071. else
  7072. a: switch (type) {
  7073. case REACT_FRAGMENT_TYPE:
  7074. return createFiberFromFragment(
  7075. pendingProps.children,
  7076. mode,
  7077. expirationTime,
  7078. key
  7079. );
  7080. case REACT_CONCURRENT_MODE_TYPE:
  7081. fiberTag = 8;
  7082. mode |= 7;
  7083. break;
  7084. case REACT_STRICT_MODE_TYPE:
  7085. fiberTag = 8;
  7086. mode |= 1;
  7087. break;
  7088. case REACT_PROFILER_TYPE:
  7089. return (
  7090. (type = new FiberNode(12, pendingProps, key, mode | 8)),
  7091. (type.elementType = REACT_PROFILER_TYPE),
  7092. (type.type = REACT_PROFILER_TYPE),
  7093. (type.expirationTime = expirationTime),
  7094. type
  7095. );
  7096. case REACT_SUSPENSE_TYPE:
  7097. return (
  7098. (type = new FiberNode(13, pendingProps, key, mode)),
  7099. (type.type = REACT_SUSPENSE_TYPE),
  7100. (type.elementType = REACT_SUSPENSE_TYPE),
  7101. (type.expirationTime = expirationTime),
  7102. type
  7103. );
  7104. case REACT_SUSPENSE_LIST_TYPE:
  7105. return (
  7106. (type = new FiberNode(19, pendingProps, key, mode)),
  7107. (type.elementType = REACT_SUSPENSE_LIST_TYPE),
  7108. (type.expirationTime = expirationTime),
  7109. type
  7110. );
  7111. default:
  7112. if ("object" === typeof type && null !== type)
  7113. switch (type.$$typeof) {
  7114. case REACT_PROVIDER_TYPE:
  7115. fiberTag = 10;
  7116. break a;
  7117. case REACT_CONTEXT_TYPE:
  7118. fiberTag = 9;
  7119. break a;
  7120. case REACT_FORWARD_REF_TYPE:
  7121. fiberTag = 11;
  7122. break a;
  7123. case REACT_MEMO_TYPE:
  7124. fiberTag = 14;
  7125. break a;
  7126. case REACT_LAZY_TYPE:
  7127. fiberTag = 16;
  7128. owner = null;
  7129. break a;
  7130. case REACT_BLOCK_TYPE:
  7131. fiberTag = 22;
  7132. break a;
  7133. }
  7134. throw Error(
  7135. "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
  7136. (null == type ? type : typeof type) +
  7137. "."
  7138. );
  7139. }
  7140. key = new FiberNode(fiberTag, pendingProps, key, mode);
  7141. key.elementType = type;
  7142. key.type = owner;
  7143. key.expirationTime = expirationTime;
  7144. return key;
  7145. }
  7146. function createFiberFromFragment(elements, mode, expirationTime, key) {
  7147. elements = new FiberNode(7, elements, key, mode);
  7148. elements.expirationTime = expirationTime;
  7149. return elements;
  7150. }
  7151. function createFiberFromText(content, mode, expirationTime) {
  7152. content = new FiberNode(6, content, null, mode);
  7153. content.expirationTime = expirationTime;
  7154. return content;
  7155. }
  7156. function createFiberFromPortal(portal, mode, expirationTime) {
  7157. mode = new FiberNode(
  7158. 4,
  7159. null !== portal.children ? portal.children : [],
  7160. portal.key,
  7161. mode
  7162. );
  7163. mode.expirationTime = expirationTime;
  7164. mode.stateNode = {
  7165. containerInfo: portal.containerInfo,
  7166. pendingChildren: null,
  7167. implementation: portal.implementation
  7168. };
  7169. return mode;
  7170. }
  7171. function FiberRootNode(containerInfo, tag, hydrate) {
  7172. this.tag = tag;
  7173. this.current = null;
  7174. this.containerInfo = containerInfo;
  7175. this.pingCache = this.pendingChildren = null;
  7176. this.finishedExpirationTime = 0;
  7177. this.finishedWork = null;
  7178. this.timeoutHandle = -1;
  7179. this.pendingContext = this.context = null;
  7180. this.hydrate = hydrate;
  7181. this.callbackNode = null;
  7182. this.callbackPriority = 90;
  7183. this.lastExpiredTime = this.lastPingedTime = this.nextKnownPendingLevel = this.lastSuspendedTime = this.firstSuspendedTime = this.firstPendingTime = 0;
  7184. }
  7185. function isRootSuspendedAtTime(root, expirationTime) {
  7186. var firstSuspendedTime = root.firstSuspendedTime;
  7187. root = root.lastSuspendedTime;
  7188. return (
  7189. 0 !== firstSuspendedTime &&
  7190. firstSuspendedTime >= expirationTime &&
  7191. root <= expirationTime
  7192. );
  7193. }
  7194. function markRootSuspendedAtTime(root, expirationTime) {
  7195. var firstSuspendedTime = root.firstSuspendedTime,
  7196. lastSuspendedTime = root.lastSuspendedTime;
  7197. firstSuspendedTime < expirationTime &&
  7198. (root.firstSuspendedTime = expirationTime);
  7199. if (lastSuspendedTime > expirationTime || 0 === firstSuspendedTime)
  7200. root.lastSuspendedTime = expirationTime;
  7201. expirationTime <= root.lastPingedTime && (root.lastPingedTime = 0);
  7202. expirationTime <= root.lastExpiredTime && (root.lastExpiredTime = 0);
  7203. }
  7204. function markRootUpdatedAtTime(root, expirationTime) {
  7205. expirationTime > root.firstPendingTime &&
  7206. (root.firstPendingTime = expirationTime);
  7207. var firstSuspendedTime = root.firstSuspendedTime;
  7208. 0 !== firstSuspendedTime &&
  7209. (expirationTime >= firstSuspendedTime
  7210. ? (root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = 0)
  7211. : expirationTime >= root.lastSuspendedTime &&
  7212. (root.lastSuspendedTime = expirationTime + 1),
  7213. expirationTime > root.nextKnownPendingLevel &&
  7214. (root.nextKnownPendingLevel = expirationTime));
  7215. }
  7216. function findHostInstance(component) {
  7217. var fiber = component._reactInternalFiber;
  7218. if (void 0 === fiber) {
  7219. if ("function" === typeof component.render)
  7220. throw Error("Unable to find node on an unmounted component.");
  7221. throw Error(
  7222. "Argument appears to not be a ReactComponent. Keys: " +
  7223. Object.keys(component)
  7224. );
  7225. }
  7226. component = findCurrentHostFiber(fiber);
  7227. return null === component ? null : component.stateNode;
  7228. }
  7229. function updateContainer(element, container, parentComponent, callback) {
  7230. var current = container.current,
  7231. currentTime = requestCurrentTimeForUpdate(),
  7232. suspenseConfig = ReactCurrentBatchConfig.suspense;
  7233. currentTime = computeExpirationForFiber(currentTime, current, suspenseConfig);
  7234. a: if (parentComponent) {
  7235. parentComponent = parentComponent._reactInternalFiber;
  7236. b: {
  7237. if (
  7238. getNearestMountedFiber(parentComponent) !== parentComponent ||
  7239. 1 !== parentComponent.tag
  7240. )
  7241. throw Error(
  7242. "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue."
  7243. );
  7244. var parentContext = parentComponent;
  7245. do {
  7246. switch (parentContext.tag) {
  7247. case 3:
  7248. parentContext = parentContext.stateNode.context;
  7249. break b;
  7250. case 1:
  7251. if (isContextProvider(parentContext.type)) {
  7252. parentContext =
  7253. parentContext.stateNode
  7254. .__reactInternalMemoizedMergedChildContext;
  7255. break b;
  7256. }
  7257. }
  7258. parentContext = parentContext.return;
  7259. } while (null !== parentContext);
  7260. throw Error(
  7261. "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue."
  7262. );
  7263. }
  7264. if (1 === parentComponent.tag) {
  7265. var Component = parentComponent.type;
  7266. if (isContextProvider(Component)) {
  7267. parentComponent = processChildContext(
  7268. parentComponent,
  7269. Component,
  7270. parentContext
  7271. );
  7272. break a;
  7273. }
  7274. }
  7275. parentComponent = parentContext;
  7276. } else parentComponent = emptyContextObject;
  7277. null === container.context
  7278. ? (container.context = parentComponent)
  7279. : (container.pendingContext = parentComponent);
  7280. container = createUpdate(currentTime, suspenseConfig);
  7281. container.payload = { element: element };
  7282. callback = void 0 === callback ? null : callback;
  7283. null !== callback && (container.callback = callback);
  7284. enqueueUpdate(current, container);
  7285. scheduleWork(current, currentTime);
  7286. return currentTime;
  7287. }
  7288. function createPortal(children, containerInfo, implementation) {
  7289. var key =
  7290. 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
  7291. return {
  7292. $$typeof: REACT_PORTAL_TYPE,
  7293. key: null == key ? null : "" + key,
  7294. children: children,
  7295. containerInfo: containerInfo,
  7296. implementation: implementation
  7297. };
  7298. }
  7299. function findNodeHandle(componentOrHandle) {
  7300. if (null == componentOrHandle) return null;
  7301. if ("number" === typeof componentOrHandle) return componentOrHandle;
  7302. if (componentOrHandle._nativeTag) return componentOrHandle._nativeTag;
  7303. if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag)
  7304. return componentOrHandle.canonical._nativeTag;
  7305. componentOrHandle = findHostInstance(componentOrHandle);
  7306. return null == componentOrHandle
  7307. ? componentOrHandle
  7308. : componentOrHandle.canonical
  7309. ? componentOrHandle.canonical._nativeTag
  7310. : componentOrHandle._nativeTag;
  7311. }
  7312. batchedUpdatesImpl = function(fn, a) {
  7313. var prevExecutionContext = executionContext;
  7314. executionContext |= 1;
  7315. try {
  7316. return fn(a);
  7317. } finally {
  7318. (executionContext = prevExecutionContext),
  7319. executionContext === NoContext && flushSyncCallbackQueue();
  7320. }
  7321. };
  7322. var roots = new Map();
  7323. (function(devToolsConfig) {
  7324. var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
  7325. return injectInternals({
  7326. bundleType: devToolsConfig.bundleType,
  7327. version: devToolsConfig.version,
  7328. rendererPackageName: devToolsConfig.rendererPackageName,
  7329. rendererConfig: devToolsConfig.rendererConfig,
  7330. overrideHookState: null,
  7331. overrideProps: null,
  7332. setSuspenseHandler: null,
  7333. scheduleUpdate: null,
  7334. currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
  7335. findHostInstanceByFiber: function(fiber) {
  7336. fiber = findCurrentHostFiber(fiber);
  7337. return null === fiber ? null : fiber.stateNode;
  7338. },
  7339. findFiberByHostInstance: function(instance) {
  7340. return findFiberByHostInstance ? findFiberByHostInstance(instance) : null;
  7341. },
  7342. findHostInstancesForRefresh: null,
  7343. scheduleRefresh: null,
  7344. scheduleRoot: null,
  7345. setRefreshHandler: null,
  7346. getCurrentFiber: null
  7347. });
  7348. })({
  7349. findFiberByHostInstance: getInstanceFromInstance,
  7350. bundleType: 0,
  7351. version: "16.13.0",
  7352. rendererPackageName: "react-native-renderer",
  7353. rendererConfig: {
  7354. getInspectorDataForViewTag: function() {
  7355. throw Error(
  7356. "getInspectorDataForViewTag() is not available in production"
  7357. );
  7358. },
  7359. getInspectorDataForViewAtPoint: function() {
  7360. throw Error(
  7361. "getInspectorDataForViewAtPoint() is not available in production."
  7362. );
  7363. }.bind(null, findNodeHandle)
  7364. }
  7365. });
  7366. exports.createPortal = function(children, containerTag) {
  7367. return createPortal(
  7368. children,
  7369. containerTag,
  7370. null,
  7371. 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null
  7372. );
  7373. };
  7374. exports.dispatchCommand = function(handle, command, args) {
  7375. null != handle._nativeTag &&
  7376. (handle._internalInstanceHandle
  7377. ? nativeFabricUIManager.dispatchCommand(
  7378. handle._internalInstanceHandle.stateNode.node,
  7379. command,
  7380. args
  7381. )
  7382. : ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand(
  7383. handle._nativeTag,
  7384. command,
  7385. args
  7386. ));
  7387. };
  7388. exports.findHostInstance_DEPRECATED = function(componentOrHandle) {
  7389. if (null == componentOrHandle) return null;
  7390. if (componentOrHandle._nativeTag) return componentOrHandle;
  7391. if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag)
  7392. return componentOrHandle.canonical;
  7393. componentOrHandle = findHostInstance(componentOrHandle);
  7394. return null == componentOrHandle
  7395. ? componentOrHandle
  7396. : componentOrHandle.canonical
  7397. ? componentOrHandle.canonical
  7398. : componentOrHandle;
  7399. };
  7400. exports.findNodeHandle = findNodeHandle;
  7401. exports.render = function(element, containerTag, callback) {
  7402. var root = roots.get(containerTag);
  7403. if (!root) {
  7404. root = new FiberRootNode(containerTag, 0, !1);
  7405. var uninitializedFiber = new FiberNode(3, null, null, 0);
  7406. root.current = uninitializedFiber;
  7407. uninitializedFiber.stateNode = root;
  7408. initializeUpdateQueue(uninitializedFiber);
  7409. roots.set(containerTag, root);
  7410. }
  7411. updateContainer(element, root, null, callback);
  7412. a: if (((element = root.current), element.child))
  7413. switch (element.child.tag) {
  7414. case 5:
  7415. element = element.child.stateNode.canonical;
  7416. break a;
  7417. default:
  7418. element = element.child.stateNode;
  7419. }
  7420. else element = null;
  7421. return element;
  7422. };
  7423. exports.stopSurface = function(containerTag) {
  7424. var root = roots.get(containerTag);
  7425. root &&
  7426. updateContainer(null, root, null, function() {
  7427. roots.delete(containerTag);
  7428. });
  7429. };
  7430. exports.unmountComponentAtNode = function(containerTag) {
  7431. this.stopSurface(containerTag);
  7432. };