react-dom-client.production.js 523 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049
  1. /**
  2. * @license React
  3. * react-dom-client.production.js
  4. *
  5. * Copyright (c) Meta Platforms, Inc. and affiliates.
  6. *
  7. * This source code is licensed under the MIT license found in the
  8. * LICENSE file in the root directory of this source tree.
  9. */
  10. /*
  11. Modernizr 3.0.0pre (Custom Build) | MIT
  12. */
  13. "use strict";
  14. var Scheduler = require("scheduler"),
  15. React = require("react"),
  16. ReactDOM = require("react-dom");
  17. function formatProdErrorMessage(code) {
  18. var url = "https://react.dev/errors/" + code;
  19. if (1 < arguments.length) {
  20. url += "?args[]=" + encodeURIComponent(arguments[1]);
  21. for (var i = 2; i < arguments.length; i++)
  22. url += "&args[]=" + encodeURIComponent(arguments[i]);
  23. }
  24. return (
  25. "Minified React error #" +
  26. code +
  27. "; visit " +
  28. url +
  29. " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
  30. );
  31. }
  32. function isValidContainer(node) {
  33. return !(
  34. !node ||
  35. (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)
  36. );
  37. }
  38. function getNearestMountedFiber(fiber) {
  39. var node = fiber,
  40. nearestMounted = fiber;
  41. if (fiber.alternate) for (; node.return; ) node = node.return;
  42. else {
  43. fiber = node;
  44. do
  45. (node = fiber),
  46. 0 !== (node.flags & 4098) && (nearestMounted = node.return),
  47. (fiber = node.return);
  48. while (fiber);
  49. }
  50. return 3 === node.tag ? nearestMounted : null;
  51. }
  52. function getSuspenseInstanceFromFiber(fiber) {
  53. if (13 === fiber.tag) {
  54. var suspenseState = fiber.memoizedState;
  55. null === suspenseState &&
  56. ((fiber = fiber.alternate),
  57. null !== fiber && (suspenseState = fiber.memoizedState));
  58. if (null !== suspenseState) return suspenseState.dehydrated;
  59. }
  60. return null;
  61. }
  62. function getActivityInstanceFromFiber(fiber) {
  63. if (31 === fiber.tag) {
  64. var activityState = fiber.memoizedState;
  65. null === activityState &&
  66. ((fiber = fiber.alternate),
  67. null !== fiber && (activityState = fiber.memoizedState));
  68. if (null !== activityState) return activityState.dehydrated;
  69. }
  70. return null;
  71. }
  72. function assertIsMounted(fiber) {
  73. if (getNearestMountedFiber(fiber) !== fiber)
  74. throw Error(formatProdErrorMessage(188));
  75. }
  76. function findCurrentFiberUsingSlowPath(fiber) {
  77. var alternate = fiber.alternate;
  78. if (!alternate) {
  79. alternate = getNearestMountedFiber(fiber);
  80. if (null === alternate) throw Error(formatProdErrorMessage(188));
  81. return alternate !== fiber ? null : fiber;
  82. }
  83. for (var a = fiber, b = alternate; ; ) {
  84. var parentA = a.return;
  85. if (null === parentA) break;
  86. var parentB = parentA.alternate;
  87. if (null === parentB) {
  88. b = parentA.return;
  89. if (null !== b) {
  90. a = b;
  91. continue;
  92. }
  93. break;
  94. }
  95. if (parentA.child === parentB.child) {
  96. for (parentB = parentA.child; parentB; ) {
  97. if (parentB === a) return assertIsMounted(parentA), fiber;
  98. if (parentB === b) return assertIsMounted(parentA), alternate;
  99. parentB = parentB.sibling;
  100. }
  101. throw Error(formatProdErrorMessage(188));
  102. }
  103. if (a.return !== b.return) (a = parentA), (b = parentB);
  104. else {
  105. for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {
  106. if (child$0 === a) {
  107. didFindChild = !0;
  108. a = parentA;
  109. b = parentB;
  110. break;
  111. }
  112. if (child$0 === b) {
  113. didFindChild = !0;
  114. b = parentA;
  115. a = parentB;
  116. break;
  117. }
  118. child$0 = child$0.sibling;
  119. }
  120. if (!didFindChild) {
  121. for (child$0 = parentB.child; child$0; ) {
  122. if (child$0 === a) {
  123. didFindChild = !0;
  124. a = parentB;
  125. b = parentA;
  126. break;
  127. }
  128. if (child$0 === b) {
  129. didFindChild = !0;
  130. b = parentB;
  131. a = parentA;
  132. break;
  133. }
  134. child$0 = child$0.sibling;
  135. }
  136. if (!didFindChild) throw Error(formatProdErrorMessage(189));
  137. }
  138. }
  139. if (a.alternate !== b) throw Error(formatProdErrorMessage(190));
  140. }
  141. if (3 !== a.tag) throw Error(formatProdErrorMessage(188));
  142. return a.stateNode.current === a ? fiber : alternate;
  143. }
  144. function findCurrentHostFiberImpl(node) {
  145. var tag = node.tag;
  146. if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
  147. for (node = node.child; null !== node; ) {
  148. tag = findCurrentHostFiberImpl(node);
  149. if (null !== tag) return tag;
  150. node = node.sibling;
  151. }
  152. return null;
  153. }
  154. var assign = Object.assign,
  155. REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
  156. REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
  157. REACT_PORTAL_TYPE = Symbol.for("react.portal"),
  158. REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
  159. REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
  160. REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
  161. REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
  162. REACT_CONTEXT_TYPE = Symbol.for("react.context"),
  163. REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
  164. REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
  165. REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
  166. REACT_MEMO_TYPE = Symbol.for("react.memo"),
  167. REACT_LAZY_TYPE = Symbol.for("react.lazy");
  168. Symbol.for("react.scope");
  169. var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
  170. Symbol.for("react.legacy_hidden");
  171. Symbol.for("react.tracing_marker");
  172. var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
  173. Symbol.for("react.view_transition");
  174. var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
  175. function getIteratorFn(maybeIterable) {
  176. if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
  177. maybeIterable =
  178. (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
  179. maybeIterable["@@iterator"];
  180. return "function" === typeof maybeIterable ? maybeIterable : null;
  181. }
  182. var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
  183. function getComponentNameFromType(type) {
  184. if (null == type) return null;
  185. if ("function" === typeof type)
  186. return type.$$typeof === REACT_CLIENT_REFERENCE
  187. ? null
  188. : type.displayName || type.name || null;
  189. if ("string" === typeof type) return type;
  190. switch (type) {
  191. case REACT_FRAGMENT_TYPE:
  192. return "Fragment";
  193. case REACT_PROFILER_TYPE:
  194. return "Profiler";
  195. case REACT_STRICT_MODE_TYPE:
  196. return "StrictMode";
  197. case REACT_SUSPENSE_TYPE:
  198. return "Suspense";
  199. case REACT_SUSPENSE_LIST_TYPE:
  200. return "SuspenseList";
  201. case REACT_ACTIVITY_TYPE:
  202. return "Activity";
  203. }
  204. if ("object" === typeof type)
  205. switch (type.$$typeof) {
  206. case REACT_PORTAL_TYPE:
  207. return "Portal";
  208. case REACT_CONTEXT_TYPE:
  209. return type.displayName || "Context";
  210. case REACT_CONSUMER_TYPE:
  211. return (type._context.displayName || "Context") + ".Consumer";
  212. case REACT_FORWARD_REF_TYPE:
  213. var innerType = type.render;
  214. type = type.displayName;
  215. type ||
  216. ((type = innerType.displayName || innerType.name || ""),
  217. (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
  218. return type;
  219. case REACT_MEMO_TYPE:
  220. return (
  221. (innerType = type.displayName || null),
  222. null !== innerType
  223. ? innerType
  224. : getComponentNameFromType(type.type) || "Memo"
  225. );
  226. case REACT_LAZY_TYPE:
  227. innerType = type._payload;
  228. type = type._init;
  229. try {
  230. return getComponentNameFromType(type(innerType));
  231. } catch (x) {}
  232. }
  233. return null;
  234. }
  235. var isArrayImpl = Array.isArray,
  236. ReactSharedInternals =
  237. React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  238. ReactDOMSharedInternals =
  239. ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  240. sharedNotPendingObject = {
  241. pending: !1,
  242. data: null,
  243. method: null,
  244. action: null
  245. },
  246. valueStack = [],
  247. index = -1;
  248. function createCursor(defaultValue) {
  249. return { current: defaultValue };
  250. }
  251. function pop(cursor) {
  252. 0 > index ||
  253. ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);
  254. }
  255. function push(cursor, value) {
  256. index++;
  257. valueStack[index] = cursor.current;
  258. cursor.current = value;
  259. }
  260. var contextStackCursor = createCursor(null),
  261. contextFiberStackCursor = createCursor(null),
  262. rootInstanceStackCursor = createCursor(null),
  263. hostTransitionProviderCursor = createCursor(null);
  264. function pushHostContainer(fiber, nextRootInstance) {
  265. push(rootInstanceStackCursor, nextRootInstance);
  266. push(contextFiberStackCursor, fiber);
  267. push(contextStackCursor, null);
  268. switch (nextRootInstance.nodeType) {
  269. case 9:
  270. case 11:
  271. fiber = (fiber = nextRootInstance.documentElement)
  272. ? (fiber = fiber.namespaceURI)
  273. ? getOwnHostContext(fiber)
  274. : 0
  275. : 0;
  276. break;
  277. default:
  278. if (
  279. ((fiber = nextRootInstance.tagName),
  280. (nextRootInstance = nextRootInstance.namespaceURI))
  281. )
  282. (nextRootInstance = getOwnHostContext(nextRootInstance)),
  283. (fiber = getChildHostContextProd(nextRootInstance, fiber));
  284. else
  285. switch (fiber) {
  286. case "svg":
  287. fiber = 1;
  288. break;
  289. case "math":
  290. fiber = 2;
  291. break;
  292. default:
  293. fiber = 0;
  294. }
  295. }
  296. pop(contextStackCursor);
  297. push(contextStackCursor, fiber);
  298. }
  299. function popHostContainer() {
  300. pop(contextStackCursor);
  301. pop(contextFiberStackCursor);
  302. pop(rootInstanceStackCursor);
  303. }
  304. function pushHostContext(fiber) {
  305. null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber);
  306. var context = contextStackCursor.current;
  307. var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type);
  308. context !== JSCompiler_inline_result &&
  309. (push(contextFiberStackCursor, fiber),
  310. push(contextStackCursor, JSCompiler_inline_result));
  311. }
  312. function popHostContext(fiber) {
  313. contextFiberStackCursor.current === fiber &&
  314. (pop(contextStackCursor), pop(contextFiberStackCursor));
  315. hostTransitionProviderCursor.current === fiber &&
  316. (pop(hostTransitionProviderCursor),
  317. (HostTransitionContext._currentValue = sharedNotPendingObject));
  318. }
  319. var prefix, suffix;
  320. function describeBuiltInComponentFrame(name) {
  321. if (void 0 === prefix)
  322. try {
  323. throw Error();
  324. } catch (x) {
  325. var match = x.stack.trim().match(/\n( *(at )?)/);
  326. prefix = (match && match[1]) || "";
  327. suffix =
  328. -1 < x.stack.indexOf("\n at")
  329. ? " (<anonymous>)"
  330. : -1 < x.stack.indexOf("@")
  331. ? "@unknown:0:0"
  332. : "";
  333. }
  334. return "\n" + prefix + name + suffix;
  335. }
  336. var reentry = !1;
  337. function describeNativeComponentFrame(fn, construct) {
  338. if (!fn || reentry) return "";
  339. reentry = !0;
  340. var previousPrepareStackTrace = Error.prepareStackTrace;
  341. Error.prepareStackTrace = void 0;
  342. try {
  343. var RunInRootFrame = {
  344. DetermineComponentFrameRoot: function () {
  345. try {
  346. if (construct) {
  347. var Fake = function () {
  348. throw Error();
  349. };
  350. Object.defineProperty(Fake.prototype, "props", {
  351. set: function () {
  352. throw Error();
  353. }
  354. });
  355. if ("object" === typeof Reflect && Reflect.construct) {
  356. try {
  357. Reflect.construct(Fake, []);
  358. } catch (x) {
  359. var control = x;
  360. }
  361. Reflect.construct(fn, [], Fake);
  362. } else {
  363. try {
  364. Fake.call();
  365. } catch (x$1) {
  366. control = x$1;
  367. }
  368. fn.call(Fake.prototype);
  369. }
  370. } else {
  371. try {
  372. throw Error();
  373. } catch (x$2) {
  374. control = x$2;
  375. }
  376. (Fake = fn()) &&
  377. "function" === typeof Fake.catch &&
  378. Fake.catch(function () {});
  379. }
  380. } catch (sample) {
  381. if (sample && control && "string" === typeof sample.stack)
  382. return [sample.stack, control.stack];
  383. }
  384. return [null, null];
  385. }
  386. };
  387. RunInRootFrame.DetermineComponentFrameRoot.displayName =
  388. "DetermineComponentFrameRoot";
  389. var namePropDescriptor = Object.getOwnPropertyDescriptor(
  390. RunInRootFrame.DetermineComponentFrameRoot,
  391. "name"
  392. );
  393. namePropDescriptor &&
  394. namePropDescriptor.configurable &&
  395. Object.defineProperty(
  396. RunInRootFrame.DetermineComponentFrameRoot,
  397. "name",
  398. { value: "DetermineComponentFrameRoot" }
  399. );
  400. var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
  401. sampleStack = _RunInRootFrame$Deter[0],
  402. controlStack = _RunInRootFrame$Deter[1];
  403. if (sampleStack && controlStack) {
  404. var sampleLines = sampleStack.split("\n"),
  405. controlLines = controlStack.split("\n");
  406. for (
  407. namePropDescriptor = RunInRootFrame = 0;
  408. RunInRootFrame < sampleLines.length &&
  409. !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot");
  410. )
  411. RunInRootFrame++;
  412. for (
  413. ;
  414. namePropDescriptor < controlLines.length &&
  415. !controlLines[namePropDescriptor].includes(
  416. "DetermineComponentFrameRoot"
  417. );
  418. )
  419. namePropDescriptor++;
  420. if (
  421. RunInRootFrame === sampleLines.length ||
  422. namePropDescriptor === controlLines.length
  423. )
  424. for (
  425. RunInRootFrame = sampleLines.length - 1,
  426. namePropDescriptor = controlLines.length - 1;
  427. 1 <= RunInRootFrame &&
  428. 0 <= namePropDescriptor &&
  429. sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];
  430. )
  431. namePropDescriptor--;
  432. for (
  433. ;
  434. 1 <= RunInRootFrame && 0 <= namePropDescriptor;
  435. RunInRootFrame--, namePropDescriptor--
  436. )
  437. if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
  438. if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {
  439. do
  440. if (
  441. (RunInRootFrame--,
  442. namePropDescriptor--,
  443. 0 > namePropDescriptor ||
  444. sampleLines[RunInRootFrame] !==
  445. controlLines[namePropDescriptor])
  446. ) {
  447. var frame =
  448. "\n" +
  449. sampleLines[RunInRootFrame].replace(" at new ", " at ");
  450. fn.displayName &&
  451. frame.includes("<anonymous>") &&
  452. (frame = frame.replace("<anonymous>", fn.displayName));
  453. return frame;
  454. }
  455. while (1 <= RunInRootFrame && 0 <= namePropDescriptor);
  456. }
  457. break;
  458. }
  459. }
  460. } finally {
  461. (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);
  462. }
  463. return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "")
  464. ? describeBuiltInComponentFrame(previousPrepareStackTrace)
  465. : "";
  466. }
  467. function describeFiber(fiber, childFiber) {
  468. switch (fiber.tag) {
  469. case 26:
  470. case 27:
  471. case 5:
  472. return describeBuiltInComponentFrame(fiber.type);
  473. case 16:
  474. return describeBuiltInComponentFrame("Lazy");
  475. case 13:
  476. return fiber.child !== childFiber && null !== childFiber
  477. ? describeBuiltInComponentFrame("Suspense Fallback")
  478. : describeBuiltInComponentFrame("Suspense");
  479. case 19:
  480. return describeBuiltInComponentFrame("SuspenseList");
  481. case 0:
  482. case 15:
  483. return describeNativeComponentFrame(fiber.type, !1);
  484. case 11:
  485. return describeNativeComponentFrame(fiber.type.render, !1);
  486. case 1:
  487. return describeNativeComponentFrame(fiber.type, !0);
  488. case 31:
  489. return describeBuiltInComponentFrame("Activity");
  490. default:
  491. return "";
  492. }
  493. }
  494. function getStackByFiberInDevAndProd(workInProgress) {
  495. try {
  496. var info = "",
  497. previous = null;
  498. do
  499. (info += describeFiber(workInProgress, previous)),
  500. (previous = workInProgress),
  501. (workInProgress = workInProgress.return);
  502. while (workInProgress);
  503. return info;
  504. } catch (x) {
  505. return "\nError generating stack: " + x.message + "\n" + x.stack;
  506. }
  507. }
  508. var hasOwnProperty = Object.prototype.hasOwnProperty,
  509. scheduleCallback$3 = Scheduler.unstable_scheduleCallback,
  510. cancelCallback$1 = Scheduler.unstable_cancelCallback,
  511. shouldYield = Scheduler.unstable_shouldYield,
  512. requestPaint = Scheduler.unstable_requestPaint,
  513. now = Scheduler.unstable_now,
  514. getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
  515. ImmediatePriority = Scheduler.unstable_ImmediatePriority,
  516. UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
  517. NormalPriority$1 = Scheduler.unstable_NormalPriority,
  518. LowPriority = Scheduler.unstable_LowPriority,
  519. IdlePriority = Scheduler.unstable_IdlePriority,
  520. log$1 = Scheduler.log,
  521. unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
  522. rendererID = null,
  523. injectedHook = null;
  524. function setIsStrictModeForDevtools(newIsStrictMode) {
  525. "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
  526. if (injectedHook && "function" === typeof injectedHook.setStrictMode)
  527. try {
  528. injectedHook.setStrictMode(rendererID, newIsStrictMode);
  529. } catch (err) {}
  530. }
  531. var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
  532. log = Math.log,
  533. LN2 = Math.LN2;
  534. function clz32Fallback(x) {
  535. x >>>= 0;
  536. return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
  537. }
  538. var nextTransitionUpdateLane = 256,
  539. nextTransitionDeferredLane = 262144,
  540. nextRetryLane = 4194304;
  541. function getHighestPriorityLanes(lanes) {
  542. var pendingSyncLanes = lanes & 42;
  543. if (0 !== pendingSyncLanes) return pendingSyncLanes;
  544. switch (lanes & -lanes) {
  545. case 1:
  546. return 1;
  547. case 2:
  548. return 2;
  549. case 4:
  550. return 4;
  551. case 8:
  552. return 8;
  553. case 16:
  554. return 16;
  555. case 32:
  556. return 32;
  557. case 64:
  558. return 64;
  559. case 128:
  560. return 128;
  561. case 256:
  562. case 512:
  563. case 1024:
  564. case 2048:
  565. case 4096:
  566. case 8192:
  567. case 16384:
  568. case 32768:
  569. case 65536:
  570. case 131072:
  571. return lanes & 261888;
  572. case 262144:
  573. case 524288:
  574. case 1048576:
  575. case 2097152:
  576. return lanes & 3932160;
  577. case 4194304:
  578. case 8388608:
  579. case 16777216:
  580. case 33554432:
  581. return lanes & 62914560;
  582. case 67108864:
  583. return 67108864;
  584. case 134217728:
  585. return 134217728;
  586. case 268435456:
  587. return 268435456;
  588. case 536870912:
  589. return 536870912;
  590. case 1073741824:
  591. return 0;
  592. default:
  593. return lanes;
  594. }
  595. }
  596. function getNextLanes(root, wipLanes, rootHasPendingCommit) {
  597. var pendingLanes = root.pendingLanes;
  598. if (0 === pendingLanes) return 0;
  599. var nextLanes = 0,
  600. suspendedLanes = root.suspendedLanes,
  601. pingedLanes = root.pingedLanes;
  602. root = root.warmLanes;
  603. var nonIdlePendingLanes = pendingLanes & 134217727;
  604. 0 !== nonIdlePendingLanes
  605. ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
  606. 0 !== pendingLanes
  607. ? (nextLanes = getHighestPriorityLanes(pendingLanes))
  608. : ((pingedLanes &= nonIdlePendingLanes),
  609. 0 !== pingedLanes
  610. ? (nextLanes = getHighestPriorityLanes(pingedLanes))
  611. : rootHasPendingCommit ||
  612. ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
  613. 0 !== rootHasPendingCommit &&
  614. (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))
  615. : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
  616. 0 !== nonIdlePendingLanes
  617. ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
  618. : 0 !== pingedLanes
  619. ? (nextLanes = getHighestPriorityLanes(pingedLanes))
  620. : rootHasPendingCommit ||
  621. ((rootHasPendingCommit = pendingLanes & ~root),
  622. 0 !== rootHasPendingCommit &&
  623. (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
  624. return 0 === nextLanes
  625. ? 0
  626. : 0 !== wipLanes &&
  627. wipLanes !== nextLanes &&
  628. 0 === (wipLanes & suspendedLanes) &&
  629. ((suspendedLanes = nextLanes & -nextLanes),
  630. (rootHasPendingCommit = wipLanes & -wipLanes),
  631. suspendedLanes >= rootHasPendingCommit ||
  632. (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))
  633. ? wipLanes
  634. : nextLanes;
  635. }
  636. function checkIfRootIsPrerendering(root, renderLanes) {
  637. return (
  638. 0 ===
  639. (root.pendingLanes &
  640. ~(root.suspendedLanes & ~root.pingedLanes) &
  641. renderLanes)
  642. );
  643. }
  644. function computeExpirationTime(lane, currentTime) {
  645. switch (lane) {
  646. case 1:
  647. case 2:
  648. case 4:
  649. case 8:
  650. case 64:
  651. return currentTime + 250;
  652. case 16:
  653. case 32:
  654. case 128:
  655. case 256:
  656. case 512:
  657. case 1024:
  658. case 2048:
  659. case 4096:
  660. case 8192:
  661. case 16384:
  662. case 32768:
  663. case 65536:
  664. case 131072:
  665. case 262144:
  666. case 524288:
  667. case 1048576:
  668. case 2097152:
  669. return currentTime + 5e3;
  670. case 4194304:
  671. case 8388608:
  672. case 16777216:
  673. case 33554432:
  674. return -1;
  675. case 67108864:
  676. case 134217728:
  677. case 268435456:
  678. case 536870912:
  679. case 1073741824:
  680. return -1;
  681. default:
  682. return -1;
  683. }
  684. }
  685. function claimNextRetryLane() {
  686. var lane = nextRetryLane;
  687. nextRetryLane <<= 1;
  688. 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
  689. return lane;
  690. }
  691. function createLaneMap(initial) {
  692. for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
  693. return laneMap;
  694. }
  695. function markRootUpdated$1(root, updateLane) {
  696. root.pendingLanes |= updateLane;
  697. 268435456 !== updateLane &&
  698. ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0));
  699. }
  700. function markRootFinished(
  701. root,
  702. finishedLanes,
  703. remainingLanes,
  704. spawnedLane,
  705. updatedLanes,
  706. suspendedRetryLanes
  707. ) {
  708. var previouslyPendingLanes = root.pendingLanes;
  709. root.pendingLanes = remainingLanes;
  710. root.suspendedLanes = 0;
  711. root.pingedLanes = 0;
  712. root.warmLanes = 0;
  713. root.expiredLanes &= remainingLanes;
  714. root.entangledLanes &= remainingLanes;
  715. root.errorRecoveryDisabledLanes &= remainingLanes;
  716. root.shellSuspendCounter = 0;
  717. var entanglements = root.entanglements,
  718. expirationTimes = root.expirationTimes,
  719. hiddenUpdates = root.hiddenUpdates;
  720. for (
  721. remainingLanes = previouslyPendingLanes & ~remainingLanes;
  722. 0 < remainingLanes;
  723. ) {
  724. var index$7 = 31 - clz32(remainingLanes),
  725. lane = 1 << index$7;
  726. entanglements[index$7] = 0;
  727. expirationTimes[index$7] = -1;
  728. var hiddenUpdatesForLane = hiddenUpdates[index$7];
  729. if (null !== hiddenUpdatesForLane)
  730. for (
  731. hiddenUpdates[index$7] = null, index$7 = 0;
  732. index$7 < hiddenUpdatesForLane.length;
  733. index$7++
  734. ) {
  735. var update = hiddenUpdatesForLane[index$7];
  736. null !== update && (update.lane &= -536870913);
  737. }
  738. remainingLanes &= ~lane;
  739. }
  740. 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
  741. 0 !== suspendedRetryLanes &&
  742. 0 === updatedLanes &&
  743. 0 !== root.tag &&
  744. (root.suspendedLanes |=
  745. suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
  746. }
  747. function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
  748. root.pendingLanes |= spawnedLane;
  749. root.suspendedLanes &= ~spawnedLane;
  750. var spawnedLaneIndex = 31 - clz32(spawnedLane);
  751. root.entangledLanes |= spawnedLane;
  752. root.entanglements[spawnedLaneIndex] =
  753. root.entanglements[spawnedLaneIndex] |
  754. 1073741824 |
  755. (entangledLanes & 261930);
  756. }
  757. function markRootEntangled(root, entangledLanes) {
  758. var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
  759. for (root = root.entanglements; rootEntangledLanes; ) {
  760. var index$8 = 31 - clz32(rootEntangledLanes),
  761. lane = 1 << index$8;
  762. (lane & entangledLanes) | (root[index$8] & entangledLanes) &&
  763. (root[index$8] |= entangledLanes);
  764. rootEntangledLanes &= ~lane;
  765. }
  766. }
  767. function getBumpedLaneForHydration(root, renderLanes) {
  768. var renderLane = renderLanes & -renderLanes;
  769. renderLane =
  770. 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);
  771. return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
  772. ? 0
  773. : renderLane;
  774. }
  775. function getBumpedLaneForHydrationByLane(lane) {
  776. switch (lane) {
  777. case 2:
  778. lane = 1;
  779. break;
  780. case 8:
  781. lane = 4;
  782. break;
  783. case 32:
  784. lane = 16;
  785. break;
  786. case 256:
  787. case 512:
  788. case 1024:
  789. case 2048:
  790. case 4096:
  791. case 8192:
  792. case 16384:
  793. case 32768:
  794. case 65536:
  795. case 131072:
  796. case 262144:
  797. case 524288:
  798. case 1048576:
  799. case 2097152:
  800. case 4194304:
  801. case 8388608:
  802. case 16777216:
  803. case 33554432:
  804. lane = 128;
  805. break;
  806. case 268435456:
  807. lane = 134217728;
  808. break;
  809. default:
  810. lane = 0;
  811. }
  812. return lane;
  813. }
  814. function lanesToEventPriority(lanes) {
  815. lanes &= -lanes;
  816. return 2 < lanes
  817. ? 8 < lanes
  818. ? 0 !== (lanes & 134217727)
  819. ? 32
  820. : 268435456
  821. : 8
  822. : 2;
  823. }
  824. function resolveUpdatePriority() {
  825. var updatePriority = ReactDOMSharedInternals.p;
  826. if (0 !== updatePriority) return updatePriority;
  827. updatePriority = window.event;
  828. return void 0 === updatePriority ? 32 : getEventPriority(updatePriority.type);
  829. }
  830. function runWithPriority(priority, fn) {
  831. var previousPriority = ReactDOMSharedInternals.p;
  832. try {
  833. return (ReactDOMSharedInternals.p = priority), fn();
  834. } finally {
  835. ReactDOMSharedInternals.p = previousPriority;
  836. }
  837. }
  838. var randomKey = Math.random().toString(36).slice(2),
  839. internalInstanceKey = "__reactFiber$" + randomKey,
  840. internalPropsKey = "__reactProps$" + randomKey,
  841. internalContainerInstanceKey = "__reactContainer$" + randomKey,
  842. internalEventHandlersKey = "__reactEvents$" + randomKey,
  843. internalEventHandlerListenersKey = "__reactListeners$" + randomKey,
  844. internalEventHandlesSetKey = "__reactHandles$" + randomKey,
  845. internalRootNodeResourcesKey = "__reactResources$" + randomKey,
  846. internalHoistableMarker = "__reactMarker$" + randomKey;
  847. function detachDeletedInstance(node) {
  848. delete node[internalInstanceKey];
  849. delete node[internalPropsKey];
  850. delete node[internalEventHandlersKey];
  851. delete node[internalEventHandlerListenersKey];
  852. delete node[internalEventHandlesSetKey];
  853. }
  854. function getClosestInstanceFromNode(targetNode) {
  855. var targetInst = targetNode[internalInstanceKey];
  856. if (targetInst) return targetInst;
  857. for (var parentNode = targetNode.parentNode; parentNode; ) {
  858. if (
  859. (targetInst =
  860. parentNode[internalContainerInstanceKey] ||
  861. parentNode[internalInstanceKey])
  862. ) {
  863. parentNode = targetInst.alternate;
  864. if (
  865. null !== targetInst.child ||
  866. (null !== parentNode && null !== parentNode.child)
  867. )
  868. for (
  869. targetNode = getParentHydrationBoundary(targetNode);
  870. null !== targetNode;
  871. ) {
  872. if ((parentNode = targetNode[internalInstanceKey])) return parentNode;
  873. targetNode = getParentHydrationBoundary(targetNode);
  874. }
  875. return targetInst;
  876. }
  877. targetNode = parentNode;
  878. parentNode = targetNode.parentNode;
  879. }
  880. return null;
  881. }
  882. function getInstanceFromNode(node) {
  883. if (
  884. (node = node[internalInstanceKey] || node[internalContainerInstanceKey])
  885. ) {
  886. var tag = node.tag;
  887. if (
  888. 5 === tag ||
  889. 6 === tag ||
  890. 13 === tag ||
  891. 31 === tag ||
  892. 26 === tag ||
  893. 27 === tag ||
  894. 3 === tag
  895. )
  896. return node;
  897. }
  898. return null;
  899. }
  900. function getNodeFromInstance(inst) {
  901. var tag = inst.tag;
  902. if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return inst.stateNode;
  903. throw Error(formatProdErrorMessage(33));
  904. }
  905. function getResourcesFromRoot(root) {
  906. var resources = root[internalRootNodeResourcesKey];
  907. resources ||
  908. (resources = root[internalRootNodeResourcesKey] =
  909. { hoistableStyles: new Map(), hoistableScripts: new Map() });
  910. return resources;
  911. }
  912. function markNodeAsHoistable(node) {
  913. node[internalHoistableMarker] = !0;
  914. }
  915. var allNativeEvents = new Set(),
  916. registrationNameDependencies = {};
  917. function registerTwoPhaseEvent(registrationName, dependencies) {
  918. registerDirectEvent(registrationName, dependencies);
  919. registerDirectEvent(registrationName + "Capture", dependencies);
  920. }
  921. function registerDirectEvent(registrationName, dependencies) {
  922. registrationNameDependencies[registrationName] = dependencies;
  923. for (
  924. registrationName = 0;
  925. registrationName < dependencies.length;
  926. registrationName++
  927. )
  928. allNativeEvents.add(dependencies[registrationName]);
  929. }
  930. var VALID_ATTRIBUTE_NAME_REGEX = RegExp(
  931. "^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"
  932. ),
  933. illegalAttributeNameCache = {},
  934. validatedAttributeNameCache = {};
  935. function isAttributeNameSafe(attributeName) {
  936. if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
  937. return !0;
  938. if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;
  939. if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
  940. return (validatedAttributeNameCache[attributeName] = !0);
  941. illegalAttributeNameCache[attributeName] = !0;
  942. return !1;
  943. }
  944. function setValueForAttribute(node, name, value) {
  945. if (isAttributeNameSafe(name))
  946. if (null === value) node.removeAttribute(name);
  947. else {
  948. switch (typeof value) {
  949. case "undefined":
  950. case "function":
  951. case "symbol":
  952. node.removeAttribute(name);
  953. return;
  954. case "boolean":
  955. var prefix$10 = name.toLowerCase().slice(0, 5);
  956. if ("data-" !== prefix$10 && "aria-" !== prefix$10) {
  957. node.removeAttribute(name);
  958. return;
  959. }
  960. }
  961. node.setAttribute(name, "" + value);
  962. }
  963. }
  964. function setValueForKnownAttribute(node, name, value) {
  965. if (null === value) node.removeAttribute(name);
  966. else {
  967. switch (typeof value) {
  968. case "undefined":
  969. case "function":
  970. case "symbol":
  971. case "boolean":
  972. node.removeAttribute(name);
  973. return;
  974. }
  975. node.setAttribute(name, "" + value);
  976. }
  977. }
  978. function setValueForNamespacedAttribute(node, namespace, name, value) {
  979. if (null === value) node.removeAttribute(name);
  980. else {
  981. switch (typeof value) {
  982. case "undefined":
  983. case "function":
  984. case "symbol":
  985. case "boolean":
  986. node.removeAttribute(name);
  987. return;
  988. }
  989. node.setAttributeNS(namespace, name, "" + value);
  990. }
  991. }
  992. function getToStringValue(value) {
  993. switch (typeof value) {
  994. case "bigint":
  995. case "boolean":
  996. case "number":
  997. case "string":
  998. case "undefined":
  999. return value;
  1000. case "object":
  1001. return value;
  1002. default:
  1003. return "";
  1004. }
  1005. }
  1006. function isCheckable(elem) {
  1007. var type = elem.type;
  1008. return (
  1009. (elem = elem.nodeName) &&
  1010. "input" === elem.toLowerCase() &&
  1011. ("checkbox" === type || "radio" === type)
  1012. );
  1013. }
  1014. function trackValueOnNode(node, valueField, currentValue) {
  1015. var descriptor = Object.getOwnPropertyDescriptor(
  1016. node.constructor.prototype,
  1017. valueField
  1018. );
  1019. if (
  1020. !node.hasOwnProperty(valueField) &&
  1021. "undefined" !== typeof descriptor &&
  1022. "function" === typeof descriptor.get &&
  1023. "function" === typeof descriptor.set
  1024. ) {
  1025. var get = descriptor.get,
  1026. set = descriptor.set;
  1027. Object.defineProperty(node, valueField, {
  1028. configurable: !0,
  1029. get: function () {
  1030. return get.call(this);
  1031. },
  1032. set: function (value) {
  1033. currentValue = "" + value;
  1034. set.call(this, value);
  1035. }
  1036. });
  1037. Object.defineProperty(node, valueField, {
  1038. enumerable: descriptor.enumerable
  1039. });
  1040. return {
  1041. getValue: function () {
  1042. return currentValue;
  1043. },
  1044. setValue: function (value) {
  1045. currentValue = "" + value;
  1046. },
  1047. stopTracking: function () {
  1048. node._valueTracker = null;
  1049. delete node[valueField];
  1050. }
  1051. };
  1052. }
  1053. }
  1054. function track(node) {
  1055. if (!node._valueTracker) {
  1056. var valueField = isCheckable(node) ? "checked" : "value";
  1057. node._valueTracker = trackValueOnNode(
  1058. node,
  1059. valueField,
  1060. "" + node[valueField]
  1061. );
  1062. }
  1063. }
  1064. function updateValueIfChanged(node) {
  1065. if (!node) return !1;
  1066. var tracker = node._valueTracker;
  1067. if (!tracker) return !0;
  1068. var lastValue = tracker.getValue();
  1069. var value = "";
  1070. node &&
  1071. (value = isCheckable(node)
  1072. ? node.checked
  1073. ? "true"
  1074. : "false"
  1075. : node.value);
  1076. node = value;
  1077. return node !== lastValue ? (tracker.setValue(node), !0) : !1;
  1078. }
  1079. function getActiveElement(doc) {
  1080. doc = doc || ("undefined" !== typeof document ? document : void 0);
  1081. if ("undefined" === typeof doc) return null;
  1082. try {
  1083. return doc.activeElement || doc.body;
  1084. } catch (e) {
  1085. return doc.body;
  1086. }
  1087. }
  1088. var escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g;
  1089. function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
  1090. return value.replace(
  1091. escapeSelectorAttributeValueInsideDoubleQuotesRegex,
  1092. function (ch) {
  1093. return "\\" + ch.charCodeAt(0).toString(16) + " ";
  1094. }
  1095. );
  1096. }
  1097. function updateInput(
  1098. element,
  1099. value,
  1100. defaultValue,
  1101. lastDefaultValue,
  1102. checked,
  1103. defaultChecked,
  1104. type,
  1105. name
  1106. ) {
  1107. element.name = "";
  1108. null != type &&
  1109. "function" !== typeof type &&
  1110. "symbol" !== typeof type &&
  1111. "boolean" !== typeof type
  1112. ? (element.type = type)
  1113. : element.removeAttribute("type");
  1114. if (null != value)
  1115. if ("number" === type) {
  1116. if ((0 === value && "" === element.value) || element.value != value)
  1117. element.value = "" + getToStringValue(value);
  1118. } else
  1119. element.value !== "" + getToStringValue(value) &&
  1120. (element.value = "" + getToStringValue(value));
  1121. else
  1122. ("submit" !== type && "reset" !== type) || element.removeAttribute("value");
  1123. null != value
  1124. ? setDefaultValue(element, type, getToStringValue(value))
  1125. : null != defaultValue
  1126. ? setDefaultValue(element, type, getToStringValue(defaultValue))
  1127. : null != lastDefaultValue && element.removeAttribute("value");
  1128. null == checked &&
  1129. null != defaultChecked &&
  1130. (element.defaultChecked = !!defaultChecked);
  1131. null != checked &&
  1132. (element.checked =
  1133. checked && "function" !== typeof checked && "symbol" !== typeof checked);
  1134. null != name &&
  1135. "function" !== typeof name &&
  1136. "symbol" !== typeof name &&
  1137. "boolean" !== typeof name
  1138. ? (element.name = "" + getToStringValue(name))
  1139. : element.removeAttribute("name");
  1140. }
  1141. function initInput(
  1142. element,
  1143. value,
  1144. defaultValue,
  1145. checked,
  1146. defaultChecked,
  1147. type,
  1148. name,
  1149. isHydrating
  1150. ) {
  1151. null != type &&
  1152. "function" !== typeof type &&
  1153. "symbol" !== typeof type &&
  1154. "boolean" !== typeof type &&
  1155. (element.type = type);
  1156. if (null != value || null != defaultValue) {
  1157. if (
  1158. !(
  1159. ("submit" !== type && "reset" !== type) ||
  1160. (void 0 !== value && null !== value)
  1161. )
  1162. ) {
  1163. track(element);
  1164. return;
  1165. }
  1166. defaultValue =
  1167. null != defaultValue ? "" + getToStringValue(defaultValue) : "";
  1168. value = null != value ? "" + getToStringValue(value) : defaultValue;
  1169. isHydrating || value === element.value || (element.value = value);
  1170. element.defaultValue = value;
  1171. }
  1172. checked = null != checked ? checked : defaultChecked;
  1173. checked =
  1174. "function" !== typeof checked && "symbol" !== typeof checked && !!checked;
  1175. element.checked = isHydrating ? element.checked : !!checked;
  1176. element.defaultChecked = !!checked;
  1177. null != name &&
  1178. "function" !== typeof name &&
  1179. "symbol" !== typeof name &&
  1180. "boolean" !== typeof name &&
  1181. (element.name = name);
  1182. track(element);
  1183. }
  1184. function setDefaultValue(node, type, value) {
  1185. ("number" === type && getActiveElement(node.ownerDocument) === node) ||
  1186. node.defaultValue === "" + value ||
  1187. (node.defaultValue = "" + value);
  1188. }
  1189. function updateOptions(node, multiple, propValue, setDefaultSelected) {
  1190. node = node.options;
  1191. if (multiple) {
  1192. multiple = {};
  1193. for (var i = 0; i < propValue.length; i++)
  1194. multiple["$" + propValue[i]] = !0;
  1195. for (propValue = 0; propValue < node.length; propValue++)
  1196. (i = multiple.hasOwnProperty("$" + node[propValue].value)),
  1197. node[propValue].selected !== i && (node[propValue].selected = i),
  1198. i && setDefaultSelected && (node[propValue].defaultSelected = !0);
  1199. } else {
  1200. propValue = "" + getToStringValue(propValue);
  1201. multiple = null;
  1202. for (i = 0; i < node.length; i++) {
  1203. if (node[i].value === propValue) {
  1204. node[i].selected = !0;
  1205. setDefaultSelected && (node[i].defaultSelected = !0);
  1206. return;
  1207. }
  1208. null !== multiple || node[i].disabled || (multiple = node[i]);
  1209. }
  1210. null !== multiple && (multiple.selected = !0);
  1211. }
  1212. }
  1213. function updateTextarea(element, value, defaultValue) {
  1214. if (
  1215. null != value &&
  1216. ((value = "" + getToStringValue(value)),
  1217. value !== element.value && (element.value = value),
  1218. null == defaultValue)
  1219. ) {
  1220. element.defaultValue !== value && (element.defaultValue = value);
  1221. return;
  1222. }
  1223. element.defaultValue =
  1224. null != defaultValue ? "" + getToStringValue(defaultValue) : "";
  1225. }
  1226. function initTextarea(element, value, defaultValue, children) {
  1227. if (null == value) {
  1228. if (null != children) {
  1229. if (null != defaultValue) throw Error(formatProdErrorMessage(92));
  1230. if (isArrayImpl(children)) {
  1231. if (1 < children.length) throw Error(formatProdErrorMessage(93));
  1232. children = children[0];
  1233. }
  1234. defaultValue = children;
  1235. }
  1236. null == defaultValue && (defaultValue = "");
  1237. value = defaultValue;
  1238. }
  1239. defaultValue = getToStringValue(value);
  1240. element.defaultValue = defaultValue;
  1241. children = element.textContent;
  1242. children === defaultValue &&
  1243. "" !== children &&
  1244. null !== children &&
  1245. (element.value = children);
  1246. track(element);
  1247. }
  1248. function setTextContent(node, text) {
  1249. if (text) {
  1250. var firstChild = node.firstChild;
  1251. if (
  1252. firstChild &&
  1253. firstChild === node.lastChild &&
  1254. 3 === firstChild.nodeType
  1255. ) {
  1256. firstChild.nodeValue = text;
  1257. return;
  1258. }
  1259. }
  1260. node.textContent = text;
  1261. }
  1262. var unitlessNumbers = new Set(
  1263. "animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(
  1264. " "
  1265. )
  1266. );
  1267. function setValueForStyle(style, styleName, value) {
  1268. var isCustomProperty = 0 === styleName.indexOf("--");
  1269. null == value || "boolean" === typeof value || "" === value
  1270. ? isCustomProperty
  1271. ? style.setProperty(styleName, "")
  1272. : "float" === styleName
  1273. ? (style.cssFloat = "")
  1274. : (style[styleName] = "")
  1275. : isCustomProperty
  1276. ? style.setProperty(styleName, value)
  1277. : "number" !== typeof value ||
  1278. 0 === value ||
  1279. unitlessNumbers.has(styleName)
  1280. ? "float" === styleName
  1281. ? (style.cssFloat = value)
  1282. : (style[styleName] = ("" + value).trim())
  1283. : (style[styleName] = value + "px");
  1284. }
  1285. function setValueForStyles(node, styles, prevStyles) {
  1286. if (null != styles && "object" !== typeof styles)
  1287. throw Error(formatProdErrorMessage(62));
  1288. node = node.style;
  1289. if (null != prevStyles) {
  1290. for (var styleName in prevStyles)
  1291. !prevStyles.hasOwnProperty(styleName) ||
  1292. (null != styles && styles.hasOwnProperty(styleName)) ||
  1293. (0 === styleName.indexOf("--")
  1294. ? node.setProperty(styleName, "")
  1295. : "float" === styleName
  1296. ? (node.cssFloat = "")
  1297. : (node[styleName] = ""));
  1298. for (var styleName$16 in styles)
  1299. (styleName = styles[styleName$16]),
  1300. styles.hasOwnProperty(styleName$16) &&
  1301. prevStyles[styleName$16] !== styleName &&
  1302. setValueForStyle(node, styleName$16, styleName);
  1303. } else
  1304. for (var styleName$17 in styles)
  1305. styles.hasOwnProperty(styleName$17) &&
  1306. setValueForStyle(node, styleName$17, styles[styleName$17]);
  1307. }
  1308. function isCustomElement(tagName) {
  1309. if (-1 === tagName.indexOf("-")) return !1;
  1310. switch (tagName) {
  1311. case "annotation-xml":
  1312. case "color-profile":
  1313. case "font-face":
  1314. case "font-face-src":
  1315. case "font-face-uri":
  1316. case "font-face-format":
  1317. case "font-face-name":
  1318. case "missing-glyph":
  1319. return !1;
  1320. default:
  1321. return !0;
  1322. }
  1323. }
  1324. var aliases = new Map([
  1325. ["acceptCharset", "accept-charset"],
  1326. ["htmlFor", "for"],
  1327. ["httpEquiv", "http-equiv"],
  1328. ["crossOrigin", "crossorigin"],
  1329. ["accentHeight", "accent-height"],
  1330. ["alignmentBaseline", "alignment-baseline"],
  1331. ["arabicForm", "arabic-form"],
  1332. ["baselineShift", "baseline-shift"],
  1333. ["capHeight", "cap-height"],
  1334. ["clipPath", "clip-path"],
  1335. ["clipRule", "clip-rule"],
  1336. ["colorInterpolation", "color-interpolation"],
  1337. ["colorInterpolationFilters", "color-interpolation-filters"],
  1338. ["colorProfile", "color-profile"],
  1339. ["colorRendering", "color-rendering"],
  1340. ["dominantBaseline", "dominant-baseline"],
  1341. ["enableBackground", "enable-background"],
  1342. ["fillOpacity", "fill-opacity"],
  1343. ["fillRule", "fill-rule"],
  1344. ["floodColor", "flood-color"],
  1345. ["floodOpacity", "flood-opacity"],
  1346. ["fontFamily", "font-family"],
  1347. ["fontSize", "font-size"],
  1348. ["fontSizeAdjust", "font-size-adjust"],
  1349. ["fontStretch", "font-stretch"],
  1350. ["fontStyle", "font-style"],
  1351. ["fontVariant", "font-variant"],
  1352. ["fontWeight", "font-weight"],
  1353. ["glyphName", "glyph-name"],
  1354. ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
  1355. ["glyphOrientationVertical", "glyph-orientation-vertical"],
  1356. ["horizAdvX", "horiz-adv-x"],
  1357. ["horizOriginX", "horiz-origin-x"],
  1358. ["imageRendering", "image-rendering"],
  1359. ["letterSpacing", "letter-spacing"],
  1360. ["lightingColor", "lighting-color"],
  1361. ["markerEnd", "marker-end"],
  1362. ["markerMid", "marker-mid"],
  1363. ["markerStart", "marker-start"],
  1364. ["overlinePosition", "overline-position"],
  1365. ["overlineThickness", "overline-thickness"],
  1366. ["paintOrder", "paint-order"],
  1367. ["panose-1", "panose-1"],
  1368. ["pointerEvents", "pointer-events"],
  1369. ["renderingIntent", "rendering-intent"],
  1370. ["shapeRendering", "shape-rendering"],
  1371. ["stopColor", "stop-color"],
  1372. ["stopOpacity", "stop-opacity"],
  1373. ["strikethroughPosition", "strikethrough-position"],
  1374. ["strikethroughThickness", "strikethrough-thickness"],
  1375. ["strokeDasharray", "stroke-dasharray"],
  1376. ["strokeDashoffset", "stroke-dashoffset"],
  1377. ["strokeLinecap", "stroke-linecap"],
  1378. ["strokeLinejoin", "stroke-linejoin"],
  1379. ["strokeMiterlimit", "stroke-miterlimit"],
  1380. ["strokeOpacity", "stroke-opacity"],
  1381. ["strokeWidth", "stroke-width"],
  1382. ["textAnchor", "text-anchor"],
  1383. ["textDecoration", "text-decoration"],
  1384. ["textRendering", "text-rendering"],
  1385. ["transformOrigin", "transform-origin"],
  1386. ["underlinePosition", "underline-position"],
  1387. ["underlineThickness", "underline-thickness"],
  1388. ["unicodeBidi", "unicode-bidi"],
  1389. ["unicodeRange", "unicode-range"],
  1390. ["unitsPerEm", "units-per-em"],
  1391. ["vAlphabetic", "v-alphabetic"],
  1392. ["vHanging", "v-hanging"],
  1393. ["vIdeographic", "v-ideographic"],
  1394. ["vMathematical", "v-mathematical"],
  1395. ["vectorEffect", "vector-effect"],
  1396. ["vertAdvY", "vert-adv-y"],
  1397. ["vertOriginX", "vert-origin-x"],
  1398. ["vertOriginY", "vert-origin-y"],
  1399. ["wordSpacing", "word-spacing"],
  1400. ["writingMode", "writing-mode"],
  1401. ["xmlnsXlink", "xmlns:xlink"],
  1402. ["xHeight", "x-height"]
  1403. ]),
  1404. isJavaScriptProtocol =
  1405. /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;
  1406. function sanitizeURL(url) {
  1407. return isJavaScriptProtocol.test("" + url)
  1408. ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"
  1409. : url;
  1410. }
  1411. function noop$1() {}
  1412. var currentReplayingEvent = null;
  1413. function getEventTarget(nativeEvent) {
  1414. nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;
  1415. nativeEvent.correspondingUseElement &&
  1416. (nativeEvent = nativeEvent.correspondingUseElement);
  1417. return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;
  1418. }
  1419. var restoreTarget = null,
  1420. restoreQueue = null;
  1421. function restoreStateOfTarget(target) {
  1422. var internalInstance = getInstanceFromNode(target);
  1423. if (internalInstance && (target = internalInstance.stateNode)) {
  1424. var props = target[internalPropsKey] || null;
  1425. a: switch (((target = internalInstance.stateNode), internalInstance.type)) {
  1426. case "input":
  1427. updateInput(
  1428. target,
  1429. props.value,
  1430. props.defaultValue,
  1431. props.defaultValue,
  1432. props.checked,
  1433. props.defaultChecked,
  1434. props.type,
  1435. props.name
  1436. );
  1437. internalInstance = props.name;
  1438. if ("radio" === props.type && null != internalInstance) {
  1439. for (props = target; props.parentNode; ) props = props.parentNode;
  1440. props = props.querySelectorAll(
  1441. 'input[name="' +
  1442. escapeSelectorAttributeValueInsideDoubleQuotes(
  1443. "" + internalInstance
  1444. ) +
  1445. '"][type="radio"]'
  1446. );
  1447. for (
  1448. internalInstance = 0;
  1449. internalInstance < props.length;
  1450. internalInstance++
  1451. ) {
  1452. var otherNode = props[internalInstance];
  1453. if (otherNode !== target && otherNode.form === target.form) {
  1454. var otherProps = otherNode[internalPropsKey] || null;
  1455. if (!otherProps) throw Error(formatProdErrorMessage(90));
  1456. updateInput(
  1457. otherNode,
  1458. otherProps.value,
  1459. otherProps.defaultValue,
  1460. otherProps.defaultValue,
  1461. otherProps.checked,
  1462. otherProps.defaultChecked,
  1463. otherProps.type,
  1464. otherProps.name
  1465. );
  1466. }
  1467. }
  1468. for (
  1469. internalInstance = 0;
  1470. internalInstance < props.length;
  1471. internalInstance++
  1472. )
  1473. (otherNode = props[internalInstance]),
  1474. otherNode.form === target.form && updateValueIfChanged(otherNode);
  1475. }
  1476. break a;
  1477. case "textarea":
  1478. updateTextarea(target, props.value, props.defaultValue);
  1479. break a;
  1480. case "select":
  1481. (internalInstance = props.value),
  1482. null != internalInstance &&
  1483. updateOptions(target, !!props.multiple, internalInstance, !1);
  1484. }
  1485. }
  1486. }
  1487. var isInsideEventHandler = !1;
  1488. function batchedUpdates$1(fn, a, b) {
  1489. if (isInsideEventHandler) return fn(a, b);
  1490. isInsideEventHandler = !0;
  1491. try {
  1492. var JSCompiler_inline_result = fn(a);
  1493. return JSCompiler_inline_result;
  1494. } finally {
  1495. if (
  1496. ((isInsideEventHandler = !1),
  1497. null !== restoreTarget || null !== restoreQueue)
  1498. )
  1499. if (
  1500. (flushSyncWork$1(),
  1501. restoreTarget &&
  1502. ((a = restoreTarget),
  1503. (fn = restoreQueue),
  1504. (restoreQueue = restoreTarget = null),
  1505. restoreStateOfTarget(a),
  1506. fn))
  1507. )
  1508. for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
  1509. }
  1510. }
  1511. function getListener(inst, registrationName) {
  1512. var stateNode = inst.stateNode;
  1513. if (null === stateNode) return null;
  1514. var props = stateNode[internalPropsKey] || null;
  1515. if (null === props) return null;
  1516. stateNode = props[registrationName];
  1517. a: switch (registrationName) {
  1518. case "onClick":
  1519. case "onClickCapture":
  1520. case "onDoubleClick":
  1521. case "onDoubleClickCapture":
  1522. case "onMouseDown":
  1523. case "onMouseDownCapture":
  1524. case "onMouseMove":
  1525. case "onMouseMoveCapture":
  1526. case "onMouseUp":
  1527. case "onMouseUpCapture":
  1528. case "onMouseEnter":
  1529. (props = !props.disabled) ||
  1530. ((inst = inst.type),
  1531. (props = !(
  1532. "button" === inst ||
  1533. "input" === inst ||
  1534. "select" === inst ||
  1535. "textarea" === inst
  1536. )));
  1537. inst = !props;
  1538. break a;
  1539. default:
  1540. inst = !1;
  1541. }
  1542. if (inst) return null;
  1543. if (stateNode && "function" !== typeof stateNode)
  1544. throw Error(
  1545. formatProdErrorMessage(231, registrationName, typeof stateNode)
  1546. );
  1547. return stateNode;
  1548. }
  1549. var canUseDOM = !(
  1550. "undefined" === typeof window ||
  1551. "undefined" === typeof window.document ||
  1552. "undefined" === typeof window.document.createElement
  1553. ),
  1554. passiveBrowserEventsSupported = !1;
  1555. if (canUseDOM)
  1556. try {
  1557. var options = {};
  1558. Object.defineProperty(options, "passive", {
  1559. get: function () {
  1560. passiveBrowserEventsSupported = !0;
  1561. }
  1562. });
  1563. window.addEventListener("test", options, options);
  1564. window.removeEventListener("test", options, options);
  1565. } catch (e) {
  1566. passiveBrowserEventsSupported = !1;
  1567. }
  1568. var root = null,
  1569. startText = null,
  1570. fallbackText = null;
  1571. function getData() {
  1572. if (fallbackText) return fallbackText;
  1573. var start,
  1574. startValue = startText,
  1575. startLength = startValue.length,
  1576. end,
  1577. endValue = "value" in root ? root.value : root.textContent,
  1578. endLength = endValue.length;
  1579. for (
  1580. start = 0;
  1581. start < startLength && startValue[start] === endValue[start];
  1582. start++
  1583. );
  1584. var minEnd = startLength - start;
  1585. for (
  1586. end = 1;
  1587. end <= minEnd &&
  1588. startValue[startLength - end] === endValue[endLength - end];
  1589. end++
  1590. );
  1591. return (fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0));
  1592. }
  1593. function getEventCharCode(nativeEvent) {
  1594. var keyCode = nativeEvent.keyCode;
  1595. "charCode" in nativeEvent
  1596. ? ((nativeEvent = nativeEvent.charCode),
  1597. 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13))
  1598. : (nativeEvent = keyCode);
  1599. 10 === nativeEvent && (nativeEvent = 13);
  1600. return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;
  1601. }
  1602. function functionThatReturnsTrue() {
  1603. return !0;
  1604. }
  1605. function functionThatReturnsFalse() {
  1606. return !1;
  1607. }
  1608. function createSyntheticEvent(Interface) {
  1609. function SyntheticBaseEvent(
  1610. reactName,
  1611. reactEventType,
  1612. targetInst,
  1613. nativeEvent,
  1614. nativeEventTarget
  1615. ) {
  1616. this._reactName = reactName;
  1617. this._targetInst = targetInst;
  1618. this.type = reactEventType;
  1619. this.nativeEvent = nativeEvent;
  1620. this.target = nativeEventTarget;
  1621. this.currentTarget = null;
  1622. for (var propName in Interface)
  1623. Interface.hasOwnProperty(propName) &&
  1624. ((reactName = Interface[propName]),
  1625. (this[propName] = reactName
  1626. ? reactName(nativeEvent)
  1627. : nativeEvent[propName]));
  1628. this.isDefaultPrevented = (
  1629. null != nativeEvent.defaultPrevented
  1630. ? nativeEvent.defaultPrevented
  1631. : !1 === nativeEvent.returnValue
  1632. )
  1633. ? functionThatReturnsTrue
  1634. : functionThatReturnsFalse;
  1635. this.isPropagationStopped = functionThatReturnsFalse;
  1636. return this;
  1637. }
  1638. assign(SyntheticBaseEvent.prototype, {
  1639. preventDefault: function () {
  1640. this.defaultPrevented = !0;
  1641. var event = this.nativeEvent;
  1642. event &&
  1643. (event.preventDefault
  1644. ? event.preventDefault()
  1645. : "unknown" !== typeof event.returnValue && (event.returnValue = !1),
  1646. (this.isDefaultPrevented = functionThatReturnsTrue));
  1647. },
  1648. stopPropagation: function () {
  1649. var event = this.nativeEvent;
  1650. event &&
  1651. (event.stopPropagation
  1652. ? event.stopPropagation()
  1653. : "unknown" !== typeof event.cancelBubble &&
  1654. (event.cancelBubble = !0),
  1655. (this.isPropagationStopped = functionThatReturnsTrue));
  1656. },
  1657. persist: function () {},
  1658. isPersistent: functionThatReturnsTrue
  1659. });
  1660. return SyntheticBaseEvent;
  1661. }
  1662. var EventInterface = {
  1663. eventPhase: 0,
  1664. bubbles: 0,
  1665. cancelable: 0,
  1666. timeStamp: function (event) {
  1667. return event.timeStamp || Date.now();
  1668. },
  1669. defaultPrevented: 0,
  1670. isTrusted: 0
  1671. },
  1672. SyntheticEvent = createSyntheticEvent(EventInterface),
  1673. UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }),
  1674. SyntheticUIEvent = createSyntheticEvent(UIEventInterface),
  1675. lastMovementX,
  1676. lastMovementY,
  1677. lastMouseEvent,
  1678. MouseEventInterface = assign({}, UIEventInterface, {
  1679. screenX: 0,
  1680. screenY: 0,
  1681. clientX: 0,
  1682. clientY: 0,
  1683. pageX: 0,
  1684. pageY: 0,
  1685. ctrlKey: 0,
  1686. shiftKey: 0,
  1687. altKey: 0,
  1688. metaKey: 0,
  1689. getModifierState: getEventModifierState,
  1690. button: 0,
  1691. buttons: 0,
  1692. relatedTarget: function (event) {
  1693. return void 0 === event.relatedTarget
  1694. ? event.fromElement === event.srcElement
  1695. ? event.toElement
  1696. : event.fromElement
  1697. : event.relatedTarget;
  1698. },
  1699. movementX: function (event) {
  1700. if ("movementX" in event) return event.movementX;
  1701. event !== lastMouseEvent &&
  1702. (lastMouseEvent && "mousemove" === event.type
  1703. ? ((lastMovementX = event.screenX - lastMouseEvent.screenX),
  1704. (lastMovementY = event.screenY - lastMouseEvent.screenY))
  1705. : (lastMovementY = lastMovementX = 0),
  1706. (lastMouseEvent = event));
  1707. return lastMovementX;
  1708. },
  1709. movementY: function (event) {
  1710. return "movementY" in event ? event.movementY : lastMovementY;
  1711. }
  1712. }),
  1713. SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface),
  1714. DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }),
  1715. SyntheticDragEvent = createSyntheticEvent(DragEventInterface),
  1716. FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }),
  1717. SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface),
  1718. AnimationEventInterface = assign({}, EventInterface, {
  1719. animationName: 0,
  1720. elapsedTime: 0,
  1721. pseudoElement: 0
  1722. }),
  1723. SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface),
  1724. ClipboardEventInterface = assign({}, EventInterface, {
  1725. clipboardData: function (event) {
  1726. return "clipboardData" in event
  1727. ? event.clipboardData
  1728. : window.clipboardData;
  1729. }
  1730. }),
  1731. SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface),
  1732. CompositionEventInterface = assign({}, EventInterface, { data: 0 }),
  1733. SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface),
  1734. normalizeKey = {
  1735. Esc: "Escape",
  1736. Spacebar: " ",
  1737. Left: "ArrowLeft",
  1738. Up: "ArrowUp",
  1739. Right: "ArrowRight",
  1740. Down: "ArrowDown",
  1741. Del: "Delete",
  1742. Win: "OS",
  1743. Menu: "ContextMenu",
  1744. Apps: "ContextMenu",
  1745. Scroll: "ScrollLock",
  1746. MozPrintableKey: "Unidentified"
  1747. },
  1748. translateToKey = {
  1749. 8: "Backspace",
  1750. 9: "Tab",
  1751. 12: "Clear",
  1752. 13: "Enter",
  1753. 16: "Shift",
  1754. 17: "Control",
  1755. 18: "Alt",
  1756. 19: "Pause",
  1757. 20: "CapsLock",
  1758. 27: "Escape",
  1759. 32: " ",
  1760. 33: "PageUp",
  1761. 34: "PageDown",
  1762. 35: "End",
  1763. 36: "Home",
  1764. 37: "ArrowLeft",
  1765. 38: "ArrowUp",
  1766. 39: "ArrowRight",
  1767. 40: "ArrowDown",
  1768. 45: "Insert",
  1769. 46: "Delete",
  1770. 112: "F1",
  1771. 113: "F2",
  1772. 114: "F3",
  1773. 115: "F4",
  1774. 116: "F5",
  1775. 117: "F6",
  1776. 118: "F7",
  1777. 119: "F8",
  1778. 120: "F9",
  1779. 121: "F10",
  1780. 122: "F11",
  1781. 123: "F12",
  1782. 144: "NumLock",
  1783. 145: "ScrollLock",
  1784. 224: "Meta"
  1785. },
  1786. modifierKeyToProp = {
  1787. Alt: "altKey",
  1788. Control: "ctrlKey",
  1789. Meta: "metaKey",
  1790. Shift: "shiftKey"
  1791. };
  1792. function modifierStateGetter(keyArg) {
  1793. var nativeEvent = this.nativeEvent;
  1794. return nativeEvent.getModifierState
  1795. ? nativeEvent.getModifierState(keyArg)
  1796. : (keyArg = modifierKeyToProp[keyArg])
  1797. ? !!nativeEvent[keyArg]
  1798. : !1;
  1799. }
  1800. function getEventModifierState() {
  1801. return modifierStateGetter;
  1802. }
  1803. var KeyboardEventInterface = assign({}, UIEventInterface, {
  1804. key: function (nativeEvent) {
  1805. if (nativeEvent.key) {
  1806. var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
  1807. if ("Unidentified" !== key) return key;
  1808. }
  1809. return "keypress" === nativeEvent.type
  1810. ? ((nativeEvent = getEventCharCode(nativeEvent)),
  1811. 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent))
  1812. : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type
  1813. ? translateToKey[nativeEvent.keyCode] || "Unidentified"
  1814. : "";
  1815. },
  1816. code: 0,
  1817. location: 0,
  1818. ctrlKey: 0,
  1819. shiftKey: 0,
  1820. altKey: 0,
  1821. metaKey: 0,
  1822. repeat: 0,
  1823. locale: 0,
  1824. getModifierState: getEventModifierState,
  1825. charCode: function (event) {
  1826. return "keypress" === event.type ? getEventCharCode(event) : 0;
  1827. },
  1828. keyCode: function (event) {
  1829. return "keydown" === event.type || "keyup" === event.type
  1830. ? event.keyCode
  1831. : 0;
  1832. },
  1833. which: function (event) {
  1834. return "keypress" === event.type
  1835. ? getEventCharCode(event)
  1836. : "keydown" === event.type || "keyup" === event.type
  1837. ? event.keyCode
  1838. : 0;
  1839. }
  1840. }),
  1841. SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface),
  1842. PointerEventInterface = assign({}, MouseEventInterface, {
  1843. pointerId: 0,
  1844. width: 0,
  1845. height: 0,
  1846. pressure: 0,
  1847. tangentialPressure: 0,
  1848. tiltX: 0,
  1849. tiltY: 0,
  1850. twist: 0,
  1851. pointerType: 0,
  1852. isPrimary: 0
  1853. }),
  1854. SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface),
  1855. TouchEventInterface = assign({}, UIEventInterface, {
  1856. touches: 0,
  1857. targetTouches: 0,
  1858. changedTouches: 0,
  1859. altKey: 0,
  1860. metaKey: 0,
  1861. ctrlKey: 0,
  1862. shiftKey: 0,
  1863. getModifierState: getEventModifierState
  1864. }),
  1865. SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface),
  1866. TransitionEventInterface = assign({}, EventInterface, {
  1867. propertyName: 0,
  1868. elapsedTime: 0,
  1869. pseudoElement: 0
  1870. }),
  1871. SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface),
  1872. WheelEventInterface = assign({}, MouseEventInterface, {
  1873. deltaX: function (event) {
  1874. return "deltaX" in event
  1875. ? event.deltaX
  1876. : "wheelDeltaX" in event
  1877. ? -event.wheelDeltaX
  1878. : 0;
  1879. },
  1880. deltaY: function (event) {
  1881. return "deltaY" in event
  1882. ? event.deltaY
  1883. : "wheelDeltaY" in event
  1884. ? -event.wheelDeltaY
  1885. : "wheelDelta" in event
  1886. ? -event.wheelDelta
  1887. : 0;
  1888. },
  1889. deltaZ: 0,
  1890. deltaMode: 0
  1891. }),
  1892. SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface),
  1893. ToggleEventInterface = assign({}, EventInterface, {
  1894. newState: 0,
  1895. oldState: 0
  1896. }),
  1897. SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface),
  1898. END_KEYCODES = [9, 13, 27, 32],
  1899. canUseCompositionEvent = canUseDOM && "CompositionEvent" in window,
  1900. documentMode = null;
  1901. canUseDOM &&
  1902. "documentMode" in document &&
  1903. (documentMode = document.documentMode);
  1904. var canUseTextInputEvent = canUseDOM && "TextEvent" in window && !documentMode,
  1905. useFallbackCompositionData =
  1906. canUseDOM &&
  1907. (!canUseCompositionEvent ||
  1908. (documentMode && 8 < documentMode && 11 >= documentMode)),
  1909. SPACEBAR_CHAR = String.fromCharCode(32),
  1910. hasSpaceKeypress = !1;
  1911. function isFallbackCompositionEnd(domEventName, nativeEvent) {
  1912. switch (domEventName) {
  1913. case "keyup":
  1914. return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
  1915. case "keydown":
  1916. return 229 !== nativeEvent.keyCode;
  1917. case "keypress":
  1918. case "mousedown":
  1919. case "focusout":
  1920. return !0;
  1921. default:
  1922. return !1;
  1923. }
  1924. }
  1925. function getDataFromCustomEvent(nativeEvent) {
  1926. nativeEvent = nativeEvent.detail;
  1927. return "object" === typeof nativeEvent && "data" in nativeEvent
  1928. ? nativeEvent.data
  1929. : null;
  1930. }
  1931. var isComposing = !1;
  1932. function getNativeBeforeInputChars(domEventName, nativeEvent) {
  1933. switch (domEventName) {
  1934. case "compositionend":
  1935. return getDataFromCustomEvent(nativeEvent);
  1936. case "keypress":
  1937. if (32 !== nativeEvent.which) return null;
  1938. hasSpaceKeypress = !0;
  1939. return SPACEBAR_CHAR;
  1940. case "textInput":
  1941. return (
  1942. (domEventName = nativeEvent.data),
  1943. domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName
  1944. );
  1945. default:
  1946. return null;
  1947. }
  1948. }
  1949. function getFallbackBeforeInputChars(domEventName, nativeEvent) {
  1950. if (isComposing)
  1951. return "compositionend" === domEventName ||
  1952. (!canUseCompositionEvent &&
  1953. isFallbackCompositionEnd(domEventName, nativeEvent))
  1954. ? ((domEventName = getData()),
  1955. (fallbackText = startText = root = null),
  1956. (isComposing = !1),
  1957. domEventName)
  1958. : null;
  1959. switch (domEventName) {
  1960. case "paste":
  1961. return null;
  1962. case "keypress":
  1963. if (
  1964. !(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) ||
  1965. (nativeEvent.ctrlKey && nativeEvent.altKey)
  1966. ) {
  1967. if (nativeEvent.char && 1 < nativeEvent.char.length)
  1968. return nativeEvent.char;
  1969. if (nativeEvent.which) return String.fromCharCode(nativeEvent.which);
  1970. }
  1971. return null;
  1972. case "compositionend":
  1973. return useFallbackCompositionData && "ko" !== nativeEvent.locale
  1974. ? null
  1975. : nativeEvent.data;
  1976. default:
  1977. return null;
  1978. }
  1979. }
  1980. var supportedInputTypes = {
  1981. color: !0,
  1982. date: !0,
  1983. datetime: !0,
  1984. "datetime-local": !0,
  1985. email: !0,
  1986. month: !0,
  1987. number: !0,
  1988. password: !0,
  1989. range: !0,
  1990. search: !0,
  1991. tel: !0,
  1992. text: !0,
  1993. time: !0,
  1994. url: !0,
  1995. week: !0
  1996. };
  1997. function isTextInputElement(elem) {
  1998. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  1999. return "input" === nodeName
  2000. ? !!supportedInputTypes[elem.type]
  2001. : "textarea" === nodeName
  2002. ? !0
  2003. : !1;
  2004. }
  2005. function createAndAccumulateChangeEvent(
  2006. dispatchQueue,
  2007. inst,
  2008. nativeEvent,
  2009. target
  2010. ) {
  2011. restoreTarget
  2012. ? restoreQueue
  2013. ? restoreQueue.push(target)
  2014. : (restoreQueue = [target])
  2015. : (restoreTarget = target);
  2016. inst = accumulateTwoPhaseListeners(inst, "onChange");
  2017. 0 < inst.length &&
  2018. ((nativeEvent = new SyntheticEvent(
  2019. "onChange",
  2020. "change",
  2021. null,
  2022. nativeEvent,
  2023. target
  2024. )),
  2025. dispatchQueue.push({ event: nativeEvent, listeners: inst }));
  2026. }
  2027. var activeElement$1 = null,
  2028. activeElementInst$1 = null;
  2029. function runEventInBatch(dispatchQueue) {
  2030. processDispatchQueue(dispatchQueue, 0);
  2031. }
  2032. function getInstIfValueChanged(targetInst) {
  2033. var targetNode = getNodeFromInstance(targetInst);
  2034. if (updateValueIfChanged(targetNode)) return targetInst;
  2035. }
  2036. function getTargetInstForChangeEvent(domEventName, targetInst) {
  2037. if ("change" === domEventName) return targetInst;
  2038. }
  2039. var isInputEventSupported = !1;
  2040. if (canUseDOM) {
  2041. var JSCompiler_inline_result$jscomp$286;
  2042. if (canUseDOM) {
  2043. var isSupported$jscomp$inline_427 = "oninput" in document;
  2044. if (!isSupported$jscomp$inline_427) {
  2045. var element$jscomp$inline_428 = document.createElement("div");
  2046. element$jscomp$inline_428.setAttribute("oninput", "return;");
  2047. isSupported$jscomp$inline_427 =
  2048. "function" === typeof element$jscomp$inline_428.oninput;
  2049. }
  2050. JSCompiler_inline_result$jscomp$286 = isSupported$jscomp$inline_427;
  2051. } else JSCompiler_inline_result$jscomp$286 = !1;
  2052. isInputEventSupported =
  2053. JSCompiler_inline_result$jscomp$286 &&
  2054. (!document.documentMode || 9 < document.documentMode);
  2055. }
  2056. function stopWatchingForValueChange() {
  2057. activeElement$1 &&
  2058. (activeElement$1.detachEvent("onpropertychange", handlePropertyChange),
  2059. (activeElementInst$1 = activeElement$1 = null));
  2060. }
  2061. function handlePropertyChange(nativeEvent) {
  2062. if (
  2063. "value" === nativeEvent.propertyName &&
  2064. getInstIfValueChanged(activeElementInst$1)
  2065. ) {
  2066. var dispatchQueue = [];
  2067. createAndAccumulateChangeEvent(
  2068. dispatchQueue,
  2069. activeElementInst$1,
  2070. nativeEvent,
  2071. getEventTarget(nativeEvent)
  2072. );
  2073. batchedUpdates$1(runEventInBatch, dispatchQueue);
  2074. }
  2075. }
  2076. function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
  2077. "focusin" === domEventName
  2078. ? (stopWatchingForValueChange(),
  2079. (activeElement$1 = target),
  2080. (activeElementInst$1 = targetInst),
  2081. activeElement$1.attachEvent("onpropertychange", handlePropertyChange))
  2082. : "focusout" === domEventName && stopWatchingForValueChange();
  2083. }
  2084. function getTargetInstForInputEventPolyfill(domEventName) {
  2085. if (
  2086. "selectionchange" === domEventName ||
  2087. "keyup" === domEventName ||
  2088. "keydown" === domEventName
  2089. )
  2090. return getInstIfValueChanged(activeElementInst$1);
  2091. }
  2092. function getTargetInstForClickEvent(domEventName, targetInst) {
  2093. if ("click" === domEventName) return getInstIfValueChanged(targetInst);
  2094. }
  2095. function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
  2096. if ("input" === domEventName || "change" === domEventName)
  2097. return getInstIfValueChanged(targetInst);
  2098. }
  2099. function is(x, y) {
  2100. return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
  2101. }
  2102. var objectIs = "function" === typeof Object.is ? Object.is : is;
  2103. function shallowEqual(objA, objB) {
  2104. if (objectIs(objA, objB)) return !0;
  2105. if (
  2106. "object" !== typeof objA ||
  2107. null === objA ||
  2108. "object" !== typeof objB ||
  2109. null === objB
  2110. )
  2111. return !1;
  2112. var keysA = Object.keys(objA),
  2113. keysB = Object.keys(objB);
  2114. if (keysA.length !== keysB.length) return !1;
  2115. for (keysB = 0; keysB < keysA.length; keysB++) {
  2116. var currentKey = keysA[keysB];
  2117. if (
  2118. !hasOwnProperty.call(objB, currentKey) ||
  2119. !objectIs(objA[currentKey], objB[currentKey])
  2120. )
  2121. return !1;
  2122. }
  2123. return !0;
  2124. }
  2125. function getLeafNode(node) {
  2126. for (; node && node.firstChild; ) node = node.firstChild;
  2127. return node;
  2128. }
  2129. function getNodeForCharacterOffset(root, offset) {
  2130. var node = getLeafNode(root);
  2131. root = 0;
  2132. for (var nodeEnd; node; ) {
  2133. if (3 === node.nodeType) {
  2134. nodeEnd = root + node.textContent.length;
  2135. if (root <= offset && nodeEnd >= offset)
  2136. return { node: node, offset: offset - root };
  2137. root = nodeEnd;
  2138. }
  2139. a: {
  2140. for (; node; ) {
  2141. if (node.nextSibling) {
  2142. node = node.nextSibling;
  2143. break a;
  2144. }
  2145. node = node.parentNode;
  2146. }
  2147. node = void 0;
  2148. }
  2149. node = getLeafNode(node);
  2150. }
  2151. }
  2152. function containsNode(outerNode, innerNode) {
  2153. return outerNode && innerNode
  2154. ? outerNode === innerNode
  2155. ? !0
  2156. : outerNode && 3 === outerNode.nodeType
  2157. ? !1
  2158. : innerNode && 3 === innerNode.nodeType
  2159. ? containsNode(outerNode, innerNode.parentNode)
  2160. : "contains" in outerNode
  2161. ? outerNode.contains(innerNode)
  2162. : outerNode.compareDocumentPosition
  2163. ? !!(outerNode.compareDocumentPosition(innerNode) & 16)
  2164. : !1
  2165. : !1;
  2166. }
  2167. function getActiveElementDeep(containerInfo) {
  2168. containerInfo =
  2169. null != containerInfo &&
  2170. null != containerInfo.ownerDocument &&
  2171. null != containerInfo.ownerDocument.defaultView
  2172. ? containerInfo.ownerDocument.defaultView
  2173. : window;
  2174. for (
  2175. var element = getActiveElement(containerInfo.document);
  2176. element instanceof containerInfo.HTMLIFrameElement;
  2177. ) {
  2178. try {
  2179. var JSCompiler_inline_result =
  2180. "string" === typeof element.contentWindow.location.href;
  2181. } catch (err) {
  2182. JSCompiler_inline_result = !1;
  2183. }
  2184. if (JSCompiler_inline_result) containerInfo = element.contentWindow;
  2185. else break;
  2186. element = getActiveElement(containerInfo.document);
  2187. }
  2188. return element;
  2189. }
  2190. function hasSelectionCapabilities(elem) {
  2191. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  2192. return (
  2193. nodeName &&
  2194. (("input" === nodeName &&
  2195. ("text" === elem.type ||
  2196. "search" === elem.type ||
  2197. "tel" === elem.type ||
  2198. "url" === elem.type ||
  2199. "password" === elem.type)) ||
  2200. "textarea" === nodeName ||
  2201. "true" === elem.contentEditable)
  2202. );
  2203. }
  2204. var skipSelectionChangeEvent =
  2205. canUseDOM && "documentMode" in document && 11 >= document.documentMode,
  2206. activeElement = null,
  2207. activeElementInst = null,
  2208. lastSelection = null,
  2209. mouseDown = !1;
  2210. function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
  2211. var doc =
  2212. nativeEventTarget.window === nativeEventTarget
  2213. ? nativeEventTarget.document
  2214. : 9 === nativeEventTarget.nodeType
  2215. ? nativeEventTarget
  2216. : nativeEventTarget.ownerDocument;
  2217. mouseDown ||
  2218. null == activeElement ||
  2219. activeElement !== getActiveElement(doc) ||
  2220. ((doc = activeElement),
  2221. "selectionStart" in doc && hasSelectionCapabilities(doc)
  2222. ? (doc = { start: doc.selectionStart, end: doc.selectionEnd })
  2223. : ((doc = (
  2224. (doc.ownerDocument && doc.ownerDocument.defaultView) ||
  2225. window
  2226. ).getSelection()),
  2227. (doc = {
  2228. anchorNode: doc.anchorNode,
  2229. anchorOffset: doc.anchorOffset,
  2230. focusNode: doc.focusNode,
  2231. focusOffset: doc.focusOffset
  2232. })),
  2233. (lastSelection && shallowEqual(lastSelection, doc)) ||
  2234. ((lastSelection = doc),
  2235. (doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect")),
  2236. 0 < doc.length &&
  2237. ((nativeEvent = new SyntheticEvent(
  2238. "onSelect",
  2239. "select",
  2240. null,
  2241. nativeEvent,
  2242. nativeEventTarget
  2243. )),
  2244. dispatchQueue.push({ event: nativeEvent, listeners: doc }),
  2245. (nativeEvent.target = activeElement))));
  2246. }
  2247. function makePrefixMap(styleProp, eventName) {
  2248. var prefixes = {};
  2249. prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
  2250. prefixes["Webkit" + styleProp] = "webkit" + eventName;
  2251. prefixes["Moz" + styleProp] = "moz" + eventName;
  2252. return prefixes;
  2253. }
  2254. var vendorPrefixes = {
  2255. animationend: makePrefixMap("Animation", "AnimationEnd"),
  2256. animationiteration: makePrefixMap("Animation", "AnimationIteration"),
  2257. animationstart: makePrefixMap("Animation", "AnimationStart"),
  2258. transitionrun: makePrefixMap("Transition", "TransitionRun"),
  2259. transitionstart: makePrefixMap("Transition", "TransitionStart"),
  2260. transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
  2261. transitionend: makePrefixMap("Transition", "TransitionEnd")
  2262. },
  2263. prefixedEventNames = {},
  2264. style = {};
  2265. canUseDOM &&
  2266. ((style = document.createElement("div").style),
  2267. "AnimationEvent" in window ||
  2268. (delete vendorPrefixes.animationend.animation,
  2269. delete vendorPrefixes.animationiteration.animation,
  2270. delete vendorPrefixes.animationstart.animation),
  2271. "TransitionEvent" in window ||
  2272. delete vendorPrefixes.transitionend.transition);
  2273. function getVendorPrefixedEventName(eventName) {
  2274. if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
  2275. if (!vendorPrefixes[eventName]) return eventName;
  2276. var prefixMap = vendorPrefixes[eventName],
  2277. styleProp;
  2278. for (styleProp in prefixMap)
  2279. if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
  2280. return (prefixedEventNames[eventName] = prefixMap[styleProp]);
  2281. return eventName;
  2282. }
  2283. var ANIMATION_END = getVendorPrefixedEventName("animationend"),
  2284. ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"),
  2285. ANIMATION_START = getVendorPrefixedEventName("animationstart"),
  2286. TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"),
  2287. TRANSITION_START = getVendorPrefixedEventName("transitionstart"),
  2288. TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"),
  2289. TRANSITION_END = getVendorPrefixedEventName("transitionend"),
  2290. topLevelEventsToReactNames = new Map(),
  2291. simpleEventPluginEvents =
  2292. "abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(
  2293. " "
  2294. );
  2295. simpleEventPluginEvents.push("scrollEnd");
  2296. function registerSimpleEvent(domEventName, reactName) {
  2297. topLevelEventsToReactNames.set(domEventName, reactName);
  2298. registerTwoPhaseEvent(reactName, [domEventName]);
  2299. }
  2300. var reportGlobalError =
  2301. "function" === typeof reportError
  2302. ? reportError
  2303. : function (error) {
  2304. if (
  2305. "object" === typeof window &&
  2306. "function" === typeof window.ErrorEvent
  2307. ) {
  2308. var event = new window.ErrorEvent("error", {
  2309. bubbles: !0,
  2310. cancelable: !0,
  2311. message:
  2312. "object" === typeof error &&
  2313. null !== error &&
  2314. "string" === typeof error.message
  2315. ? String(error.message)
  2316. : String(error),
  2317. error: error
  2318. });
  2319. if (!window.dispatchEvent(event)) return;
  2320. } else if (
  2321. "object" === typeof process &&
  2322. "function" === typeof process.emit
  2323. ) {
  2324. process.emit("uncaughtException", error);
  2325. return;
  2326. }
  2327. console.error(error);
  2328. },
  2329. concurrentQueues = [],
  2330. concurrentQueuesIndex = 0,
  2331. concurrentlyUpdatedLanes = 0;
  2332. function finishQueueingConcurrentUpdates() {
  2333. for (
  2334. var endIndex = concurrentQueuesIndex,
  2335. i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);
  2336. i < endIndex;
  2337. ) {
  2338. var fiber = concurrentQueues[i];
  2339. concurrentQueues[i++] = null;
  2340. var queue = concurrentQueues[i];
  2341. concurrentQueues[i++] = null;
  2342. var update = concurrentQueues[i];
  2343. concurrentQueues[i++] = null;
  2344. var lane = concurrentQueues[i];
  2345. concurrentQueues[i++] = null;
  2346. if (null !== queue && null !== update) {
  2347. var pending = queue.pending;
  2348. null === pending
  2349. ? (update.next = update)
  2350. : ((update.next = pending.next), (pending.next = update));
  2351. queue.pending = update;
  2352. }
  2353. 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
  2354. }
  2355. }
  2356. function enqueueUpdate$1(fiber, queue, update, lane) {
  2357. concurrentQueues[concurrentQueuesIndex++] = fiber;
  2358. concurrentQueues[concurrentQueuesIndex++] = queue;
  2359. concurrentQueues[concurrentQueuesIndex++] = update;
  2360. concurrentQueues[concurrentQueuesIndex++] = lane;
  2361. concurrentlyUpdatedLanes |= lane;
  2362. fiber.lanes |= lane;
  2363. fiber = fiber.alternate;
  2364. null !== fiber && (fiber.lanes |= lane);
  2365. }
  2366. function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
  2367. enqueueUpdate$1(fiber, queue, update, lane);
  2368. return getRootForUpdatedFiber(fiber);
  2369. }
  2370. function enqueueConcurrentRenderForLane(fiber, lane) {
  2371. enqueueUpdate$1(fiber, null, null, lane);
  2372. return getRootForUpdatedFiber(fiber);
  2373. }
  2374. function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
  2375. sourceFiber.lanes |= lane;
  2376. var alternate = sourceFiber.alternate;
  2377. null !== alternate && (alternate.lanes |= lane);
  2378. for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )
  2379. (parent.childLanes |= lane),
  2380. (alternate = parent.alternate),
  2381. null !== alternate && (alternate.childLanes |= lane),
  2382. 22 === parent.tag &&
  2383. ((sourceFiber = parent.stateNode),
  2384. null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)),
  2385. (sourceFiber = parent),
  2386. (parent = parent.return);
  2387. return 3 === sourceFiber.tag
  2388. ? ((parent = sourceFiber.stateNode),
  2389. isHidden &&
  2390. null !== update &&
  2391. ((isHidden = 31 - clz32(lane)),
  2392. (sourceFiber = parent.hiddenUpdates),
  2393. (alternate = sourceFiber[isHidden]),
  2394. null === alternate
  2395. ? (sourceFiber[isHidden] = [update])
  2396. : alternate.push(update),
  2397. (update.lane = lane | 536870912)),
  2398. parent)
  2399. : null;
  2400. }
  2401. function getRootForUpdatedFiber(sourceFiber) {
  2402. if (50 < nestedUpdateCount)
  2403. throw (
  2404. ((nestedUpdateCount = 0),
  2405. (rootWithNestedUpdates = null),
  2406. Error(formatProdErrorMessage(185)))
  2407. );
  2408. for (var parent = sourceFiber.return; null !== parent; )
  2409. (sourceFiber = parent), (parent = sourceFiber.return);
  2410. return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;
  2411. }
  2412. var emptyContextObject = {};
  2413. function FiberNode(tag, pendingProps, key, mode) {
  2414. this.tag = tag;
  2415. this.key = key;
  2416. this.sibling =
  2417. this.child =
  2418. this.return =
  2419. this.stateNode =
  2420. this.type =
  2421. this.elementType =
  2422. null;
  2423. this.index = 0;
  2424. this.refCleanup = this.ref = null;
  2425. this.pendingProps = pendingProps;
  2426. this.dependencies =
  2427. this.memoizedState =
  2428. this.updateQueue =
  2429. this.memoizedProps =
  2430. null;
  2431. this.mode = mode;
  2432. this.subtreeFlags = this.flags = 0;
  2433. this.deletions = null;
  2434. this.childLanes = this.lanes = 0;
  2435. this.alternate = null;
  2436. }
  2437. function createFiberImplClass(tag, pendingProps, key, mode) {
  2438. return new FiberNode(tag, pendingProps, key, mode);
  2439. }
  2440. function shouldConstruct(Component) {
  2441. Component = Component.prototype;
  2442. return !(!Component || !Component.isReactComponent);
  2443. }
  2444. function createWorkInProgress(current, pendingProps) {
  2445. var workInProgress = current.alternate;
  2446. null === workInProgress
  2447. ? ((workInProgress = createFiberImplClass(
  2448. current.tag,
  2449. pendingProps,
  2450. current.key,
  2451. current.mode
  2452. )),
  2453. (workInProgress.elementType = current.elementType),
  2454. (workInProgress.type = current.type),
  2455. (workInProgress.stateNode = current.stateNode),
  2456. (workInProgress.alternate = current),
  2457. (current.alternate = workInProgress))
  2458. : ((workInProgress.pendingProps = pendingProps),
  2459. (workInProgress.type = current.type),
  2460. (workInProgress.flags = 0),
  2461. (workInProgress.subtreeFlags = 0),
  2462. (workInProgress.deletions = null));
  2463. workInProgress.flags = current.flags & 65011712;
  2464. workInProgress.childLanes = current.childLanes;
  2465. workInProgress.lanes = current.lanes;
  2466. workInProgress.child = current.child;
  2467. workInProgress.memoizedProps = current.memoizedProps;
  2468. workInProgress.memoizedState = current.memoizedState;
  2469. workInProgress.updateQueue = current.updateQueue;
  2470. pendingProps = current.dependencies;
  2471. workInProgress.dependencies =
  2472. null === pendingProps
  2473. ? null
  2474. : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };
  2475. workInProgress.sibling = current.sibling;
  2476. workInProgress.index = current.index;
  2477. workInProgress.ref = current.ref;
  2478. workInProgress.refCleanup = current.refCleanup;
  2479. return workInProgress;
  2480. }
  2481. function resetWorkInProgress(workInProgress, renderLanes) {
  2482. workInProgress.flags &= 65011714;
  2483. var current = workInProgress.alternate;
  2484. null === current
  2485. ? ((workInProgress.childLanes = 0),
  2486. (workInProgress.lanes = renderLanes),
  2487. (workInProgress.child = null),
  2488. (workInProgress.subtreeFlags = 0),
  2489. (workInProgress.memoizedProps = null),
  2490. (workInProgress.memoizedState = null),
  2491. (workInProgress.updateQueue = null),
  2492. (workInProgress.dependencies = null),
  2493. (workInProgress.stateNode = null))
  2494. : ((workInProgress.childLanes = current.childLanes),
  2495. (workInProgress.lanes = current.lanes),
  2496. (workInProgress.child = current.child),
  2497. (workInProgress.subtreeFlags = 0),
  2498. (workInProgress.deletions = null),
  2499. (workInProgress.memoizedProps = current.memoizedProps),
  2500. (workInProgress.memoizedState = current.memoizedState),
  2501. (workInProgress.updateQueue = current.updateQueue),
  2502. (workInProgress.type = current.type),
  2503. (renderLanes = current.dependencies),
  2504. (workInProgress.dependencies =
  2505. null === renderLanes
  2506. ? null
  2507. : {
  2508. lanes: renderLanes.lanes,
  2509. firstContext: renderLanes.firstContext
  2510. }));
  2511. return workInProgress;
  2512. }
  2513. function createFiberFromTypeAndProps(
  2514. type,
  2515. key,
  2516. pendingProps,
  2517. owner,
  2518. mode,
  2519. lanes
  2520. ) {
  2521. var fiberTag = 0;
  2522. owner = type;
  2523. if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
  2524. else if ("string" === typeof type)
  2525. fiberTag = isHostHoistableType(
  2526. type,
  2527. pendingProps,
  2528. contextStackCursor.current
  2529. )
  2530. ? 26
  2531. : "html" === type || "head" === type || "body" === type
  2532. ? 27
  2533. : 5;
  2534. else
  2535. a: switch (type) {
  2536. case REACT_ACTIVITY_TYPE:
  2537. return (
  2538. (type = createFiberImplClass(31, pendingProps, key, mode)),
  2539. (type.elementType = REACT_ACTIVITY_TYPE),
  2540. (type.lanes = lanes),
  2541. type
  2542. );
  2543. case REACT_FRAGMENT_TYPE:
  2544. return createFiberFromFragment(pendingProps.children, mode, lanes, key);
  2545. case REACT_STRICT_MODE_TYPE:
  2546. fiberTag = 8;
  2547. mode |= 24;
  2548. break;
  2549. case REACT_PROFILER_TYPE:
  2550. return (
  2551. (type = createFiberImplClass(12, pendingProps, key, mode | 2)),
  2552. (type.elementType = REACT_PROFILER_TYPE),
  2553. (type.lanes = lanes),
  2554. type
  2555. );
  2556. case REACT_SUSPENSE_TYPE:
  2557. return (
  2558. (type = createFiberImplClass(13, pendingProps, key, mode)),
  2559. (type.elementType = REACT_SUSPENSE_TYPE),
  2560. (type.lanes = lanes),
  2561. type
  2562. );
  2563. case REACT_SUSPENSE_LIST_TYPE:
  2564. return (
  2565. (type = createFiberImplClass(19, pendingProps, key, mode)),
  2566. (type.elementType = REACT_SUSPENSE_LIST_TYPE),
  2567. (type.lanes = lanes),
  2568. type
  2569. );
  2570. default:
  2571. if ("object" === typeof type && null !== type)
  2572. switch (type.$$typeof) {
  2573. case REACT_CONTEXT_TYPE:
  2574. fiberTag = 10;
  2575. break a;
  2576. case REACT_CONSUMER_TYPE:
  2577. fiberTag = 9;
  2578. break a;
  2579. case REACT_FORWARD_REF_TYPE:
  2580. fiberTag = 11;
  2581. break a;
  2582. case REACT_MEMO_TYPE:
  2583. fiberTag = 14;
  2584. break a;
  2585. case REACT_LAZY_TYPE:
  2586. fiberTag = 16;
  2587. owner = null;
  2588. break a;
  2589. }
  2590. fiberTag = 29;
  2591. pendingProps = Error(
  2592. formatProdErrorMessage(130, null === type ? "null" : typeof type, "")
  2593. );
  2594. owner = null;
  2595. }
  2596. key = createFiberImplClass(fiberTag, pendingProps, key, mode);
  2597. key.elementType = type;
  2598. key.type = owner;
  2599. key.lanes = lanes;
  2600. return key;
  2601. }
  2602. function createFiberFromFragment(elements, mode, lanes, key) {
  2603. elements = createFiberImplClass(7, elements, key, mode);
  2604. elements.lanes = lanes;
  2605. return elements;
  2606. }
  2607. function createFiberFromText(content, mode, lanes) {
  2608. content = createFiberImplClass(6, content, null, mode);
  2609. content.lanes = lanes;
  2610. return content;
  2611. }
  2612. function createFiberFromDehydratedFragment(dehydratedNode) {
  2613. var fiber = createFiberImplClass(18, null, null, 0);
  2614. fiber.stateNode = dehydratedNode;
  2615. return fiber;
  2616. }
  2617. function createFiberFromPortal(portal, mode, lanes) {
  2618. mode = createFiberImplClass(
  2619. 4,
  2620. null !== portal.children ? portal.children : [],
  2621. portal.key,
  2622. mode
  2623. );
  2624. mode.lanes = lanes;
  2625. mode.stateNode = {
  2626. containerInfo: portal.containerInfo,
  2627. pendingChildren: null,
  2628. implementation: portal.implementation
  2629. };
  2630. return mode;
  2631. }
  2632. var CapturedStacks = new WeakMap();
  2633. function createCapturedValueAtFiber(value, source) {
  2634. if ("object" === typeof value && null !== value) {
  2635. var existing = CapturedStacks.get(value);
  2636. if (void 0 !== existing) return existing;
  2637. source = {
  2638. value: value,
  2639. source: source,
  2640. stack: getStackByFiberInDevAndProd(source)
  2641. };
  2642. CapturedStacks.set(value, source);
  2643. return source;
  2644. }
  2645. return {
  2646. value: value,
  2647. source: source,
  2648. stack: getStackByFiberInDevAndProd(source)
  2649. };
  2650. }
  2651. var forkStack = [],
  2652. forkStackIndex = 0,
  2653. treeForkProvider = null,
  2654. treeForkCount = 0,
  2655. idStack = [],
  2656. idStackIndex = 0,
  2657. treeContextProvider = null,
  2658. treeContextId = 1,
  2659. treeContextOverflow = "";
  2660. function pushTreeFork(workInProgress, totalChildren) {
  2661. forkStack[forkStackIndex++] = treeForkCount;
  2662. forkStack[forkStackIndex++] = treeForkProvider;
  2663. treeForkProvider = workInProgress;
  2664. treeForkCount = totalChildren;
  2665. }
  2666. function pushTreeId(workInProgress, totalChildren, index) {
  2667. idStack[idStackIndex++] = treeContextId;
  2668. idStack[idStackIndex++] = treeContextOverflow;
  2669. idStack[idStackIndex++] = treeContextProvider;
  2670. treeContextProvider = workInProgress;
  2671. var baseIdWithLeadingBit = treeContextId;
  2672. workInProgress = treeContextOverflow;
  2673. var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
  2674. baseIdWithLeadingBit &= ~(1 << baseLength);
  2675. index += 1;
  2676. var length = 32 - clz32(totalChildren) + baseLength;
  2677. if (30 < length) {
  2678. var numberOfOverflowBits = baseLength - (baseLength % 5);
  2679. length = (
  2680. baseIdWithLeadingBit &
  2681. ((1 << numberOfOverflowBits) - 1)
  2682. ).toString(32);
  2683. baseIdWithLeadingBit >>= numberOfOverflowBits;
  2684. baseLength -= numberOfOverflowBits;
  2685. treeContextId =
  2686. (1 << (32 - clz32(totalChildren) + baseLength)) |
  2687. (index << baseLength) |
  2688. baseIdWithLeadingBit;
  2689. treeContextOverflow = length + workInProgress;
  2690. } else
  2691. (treeContextId =
  2692. (1 << length) | (index << baseLength) | baseIdWithLeadingBit),
  2693. (treeContextOverflow = workInProgress);
  2694. }
  2695. function pushMaterializedTreeId(workInProgress) {
  2696. null !== workInProgress.return &&
  2697. (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));
  2698. }
  2699. function popTreeContext(workInProgress) {
  2700. for (; workInProgress === treeForkProvider; )
  2701. (treeForkProvider = forkStack[--forkStackIndex]),
  2702. (forkStack[forkStackIndex] = null),
  2703. (treeForkCount = forkStack[--forkStackIndex]),
  2704. (forkStack[forkStackIndex] = null);
  2705. for (; workInProgress === treeContextProvider; )
  2706. (treeContextProvider = idStack[--idStackIndex]),
  2707. (idStack[idStackIndex] = null),
  2708. (treeContextOverflow = idStack[--idStackIndex]),
  2709. (idStack[idStackIndex] = null),
  2710. (treeContextId = idStack[--idStackIndex]),
  2711. (idStack[idStackIndex] = null);
  2712. }
  2713. function restoreSuspendedTreeContext(workInProgress, suspendedContext) {
  2714. idStack[idStackIndex++] = treeContextId;
  2715. idStack[idStackIndex++] = treeContextOverflow;
  2716. idStack[idStackIndex++] = treeContextProvider;
  2717. treeContextId = suspendedContext.id;
  2718. treeContextOverflow = suspendedContext.overflow;
  2719. treeContextProvider = workInProgress;
  2720. }
  2721. var hydrationParentFiber = null,
  2722. nextHydratableInstance = null,
  2723. isHydrating = !1,
  2724. hydrationErrors = null,
  2725. rootOrSingletonContext = !1,
  2726. HydrationMismatchException = Error(formatProdErrorMessage(519));
  2727. function throwOnHydrationMismatch(fiber) {
  2728. var error = Error(
  2729. formatProdErrorMessage(
  2730. 418,
  2731. 1 < arguments.length && void 0 !== arguments[1] && arguments[1]
  2732. ? "text"
  2733. : "HTML",
  2734. ""
  2735. )
  2736. );
  2737. queueHydrationError(createCapturedValueAtFiber(error, fiber));
  2738. throw HydrationMismatchException;
  2739. }
  2740. function prepareToHydrateHostInstance(fiber) {
  2741. var instance = fiber.stateNode,
  2742. type = fiber.type,
  2743. props = fiber.memoizedProps;
  2744. instance[internalInstanceKey] = fiber;
  2745. instance[internalPropsKey] = props;
  2746. switch (type) {
  2747. case "dialog":
  2748. listenToNonDelegatedEvent("cancel", instance);
  2749. listenToNonDelegatedEvent("close", instance);
  2750. break;
  2751. case "iframe":
  2752. case "object":
  2753. case "embed":
  2754. listenToNonDelegatedEvent("load", instance);
  2755. break;
  2756. case "video":
  2757. case "audio":
  2758. for (type = 0; type < mediaEventTypes.length; type++)
  2759. listenToNonDelegatedEvent(mediaEventTypes[type], instance);
  2760. break;
  2761. case "source":
  2762. listenToNonDelegatedEvent("error", instance);
  2763. break;
  2764. case "img":
  2765. case "image":
  2766. case "link":
  2767. listenToNonDelegatedEvent("error", instance);
  2768. listenToNonDelegatedEvent("load", instance);
  2769. break;
  2770. case "details":
  2771. listenToNonDelegatedEvent("toggle", instance);
  2772. break;
  2773. case "input":
  2774. listenToNonDelegatedEvent("invalid", instance);
  2775. initInput(
  2776. instance,
  2777. props.value,
  2778. props.defaultValue,
  2779. props.checked,
  2780. props.defaultChecked,
  2781. props.type,
  2782. props.name,
  2783. !0
  2784. );
  2785. break;
  2786. case "select":
  2787. listenToNonDelegatedEvent("invalid", instance);
  2788. break;
  2789. case "textarea":
  2790. listenToNonDelegatedEvent("invalid", instance),
  2791. initTextarea(instance, props.value, props.defaultValue, props.children);
  2792. }
  2793. type = props.children;
  2794. ("string" !== typeof type &&
  2795. "number" !== typeof type &&
  2796. "bigint" !== typeof type) ||
  2797. instance.textContent === "" + type ||
  2798. !0 === props.suppressHydrationWarning ||
  2799. checkForUnmatchedText(instance.textContent, type)
  2800. ? (null != props.popover &&
  2801. (listenToNonDelegatedEvent("beforetoggle", instance),
  2802. listenToNonDelegatedEvent("toggle", instance)),
  2803. null != props.onScroll && listenToNonDelegatedEvent("scroll", instance),
  2804. null != props.onScrollEnd &&
  2805. listenToNonDelegatedEvent("scrollend", instance),
  2806. null != props.onClick && (instance.onclick = noop$1),
  2807. (instance = !0))
  2808. : (instance = !1);
  2809. instance || throwOnHydrationMismatch(fiber, !0);
  2810. }
  2811. function popToNextHostParent(fiber) {
  2812. for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
  2813. switch (hydrationParentFiber.tag) {
  2814. case 5:
  2815. case 31:
  2816. case 13:
  2817. rootOrSingletonContext = !1;
  2818. return;
  2819. case 27:
  2820. case 3:
  2821. rootOrSingletonContext = !0;
  2822. return;
  2823. default:
  2824. hydrationParentFiber = hydrationParentFiber.return;
  2825. }
  2826. }
  2827. function popHydrationState(fiber) {
  2828. if (fiber !== hydrationParentFiber) return !1;
  2829. if (!isHydrating) return popToNextHostParent(fiber), (isHydrating = !0), !1;
  2830. var tag = fiber.tag,
  2831. JSCompiler_temp;
  2832. if ((JSCompiler_temp = 3 !== tag && 27 !== tag)) {
  2833. if ((JSCompiler_temp = 5 === tag))
  2834. (JSCompiler_temp = fiber.type),
  2835. (JSCompiler_temp =
  2836. !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) ||
  2837. shouldSetTextContent(fiber.type, fiber.memoizedProps));
  2838. JSCompiler_temp = !JSCompiler_temp;
  2839. }
  2840. JSCompiler_temp && nextHydratableInstance && throwOnHydrationMismatch(fiber);
  2841. popToNextHostParent(fiber);
  2842. if (13 === tag) {
  2843. fiber = fiber.memoizedState;
  2844. fiber = null !== fiber ? fiber.dehydrated : null;
  2845. if (!fiber) throw Error(formatProdErrorMessage(317));
  2846. nextHydratableInstance =
  2847. getNextHydratableInstanceAfterHydrationBoundary(fiber);
  2848. } else if (31 === tag) {
  2849. fiber = fiber.memoizedState;
  2850. fiber = null !== fiber ? fiber.dehydrated : null;
  2851. if (!fiber) throw Error(formatProdErrorMessage(317));
  2852. nextHydratableInstance =
  2853. getNextHydratableInstanceAfterHydrationBoundary(fiber);
  2854. } else
  2855. 27 === tag
  2856. ? ((tag = nextHydratableInstance),
  2857. isSingletonScope(fiber.type)
  2858. ? ((fiber = previousHydratableOnEnteringScopedSingleton),
  2859. (previousHydratableOnEnteringScopedSingleton = null),
  2860. (nextHydratableInstance = fiber))
  2861. : (nextHydratableInstance = tag))
  2862. : (nextHydratableInstance = hydrationParentFiber
  2863. ? getNextHydratable(fiber.stateNode.nextSibling)
  2864. : null);
  2865. return !0;
  2866. }
  2867. function resetHydrationState() {
  2868. nextHydratableInstance = hydrationParentFiber = null;
  2869. isHydrating = !1;
  2870. }
  2871. function upgradeHydrationErrorsToRecoverable() {
  2872. var queuedErrors = hydrationErrors;
  2873. null !== queuedErrors &&
  2874. (null === workInProgressRootRecoverableErrors
  2875. ? (workInProgressRootRecoverableErrors = queuedErrors)
  2876. : workInProgressRootRecoverableErrors.push.apply(
  2877. workInProgressRootRecoverableErrors,
  2878. queuedErrors
  2879. ),
  2880. (hydrationErrors = null));
  2881. return queuedErrors;
  2882. }
  2883. function queueHydrationError(error) {
  2884. null === hydrationErrors
  2885. ? (hydrationErrors = [error])
  2886. : hydrationErrors.push(error);
  2887. }
  2888. var valueCursor = createCursor(null),
  2889. currentlyRenderingFiber$1 = null,
  2890. lastContextDependency = null;
  2891. function pushProvider(providerFiber, context, nextValue) {
  2892. push(valueCursor, context._currentValue);
  2893. context._currentValue = nextValue;
  2894. }
  2895. function popProvider(context) {
  2896. context._currentValue = valueCursor.current;
  2897. pop(valueCursor);
  2898. }
  2899. function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {
  2900. for (; null !== parent; ) {
  2901. var alternate = parent.alternate;
  2902. (parent.childLanes & renderLanes) !== renderLanes
  2903. ? ((parent.childLanes |= renderLanes),
  2904. null !== alternate && (alternate.childLanes |= renderLanes))
  2905. : null !== alternate &&
  2906. (alternate.childLanes & renderLanes) !== renderLanes &&
  2907. (alternate.childLanes |= renderLanes);
  2908. if (parent === propagationRoot) break;
  2909. parent = parent.return;
  2910. }
  2911. }
  2912. function propagateContextChanges(
  2913. workInProgress,
  2914. contexts,
  2915. renderLanes,
  2916. forcePropagateEntireTree
  2917. ) {
  2918. var fiber = workInProgress.child;
  2919. null !== fiber && (fiber.return = workInProgress);
  2920. for (; null !== fiber; ) {
  2921. var list = fiber.dependencies;
  2922. if (null !== list) {
  2923. var nextFiber = fiber.child;
  2924. list = list.firstContext;
  2925. a: for (; null !== list; ) {
  2926. var dependency = list;
  2927. list = fiber;
  2928. for (var i = 0; i < contexts.length; i++)
  2929. if (dependency.context === contexts[i]) {
  2930. list.lanes |= renderLanes;
  2931. dependency = list.alternate;
  2932. null !== dependency && (dependency.lanes |= renderLanes);
  2933. scheduleContextWorkOnParentPath(
  2934. list.return,
  2935. renderLanes,
  2936. workInProgress
  2937. );
  2938. forcePropagateEntireTree || (nextFiber = null);
  2939. break a;
  2940. }
  2941. list = dependency.next;
  2942. }
  2943. } else if (18 === fiber.tag) {
  2944. nextFiber = fiber.return;
  2945. if (null === nextFiber) throw Error(formatProdErrorMessage(341));
  2946. nextFiber.lanes |= renderLanes;
  2947. list = nextFiber.alternate;
  2948. null !== list && (list.lanes |= renderLanes);
  2949. scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress);
  2950. nextFiber = null;
  2951. } else nextFiber = fiber.child;
  2952. if (null !== nextFiber) nextFiber.return = fiber;
  2953. else
  2954. for (nextFiber = fiber; null !== nextFiber; ) {
  2955. if (nextFiber === workInProgress) {
  2956. nextFiber = null;
  2957. break;
  2958. }
  2959. fiber = nextFiber.sibling;
  2960. if (null !== fiber) {
  2961. fiber.return = nextFiber.return;
  2962. nextFiber = fiber;
  2963. break;
  2964. }
  2965. nextFiber = nextFiber.return;
  2966. }
  2967. fiber = nextFiber;
  2968. }
  2969. }
  2970. function propagateParentContextChanges(
  2971. current,
  2972. workInProgress,
  2973. renderLanes,
  2974. forcePropagateEntireTree
  2975. ) {
  2976. current = null;
  2977. for (
  2978. var parent = workInProgress, isInsidePropagationBailout = !1;
  2979. null !== parent;
  2980. ) {
  2981. if (!isInsidePropagationBailout)
  2982. if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0;
  2983. else if (0 !== (parent.flags & 262144)) break;
  2984. if (10 === parent.tag) {
  2985. var currentParent = parent.alternate;
  2986. if (null === currentParent) throw Error(formatProdErrorMessage(387));
  2987. currentParent = currentParent.memoizedProps;
  2988. if (null !== currentParent) {
  2989. var context = parent.type;
  2990. objectIs(parent.pendingProps.value, currentParent.value) ||
  2991. (null !== current ? current.push(context) : (current = [context]));
  2992. }
  2993. } else if (parent === hostTransitionProviderCursor.current) {
  2994. currentParent = parent.alternate;
  2995. if (null === currentParent) throw Error(formatProdErrorMessage(387));
  2996. currentParent.memoizedState.memoizedState !==
  2997. parent.memoizedState.memoizedState &&
  2998. (null !== current
  2999. ? current.push(HostTransitionContext)
  3000. : (current = [HostTransitionContext]));
  3001. }
  3002. parent = parent.return;
  3003. }
  3004. null !== current &&
  3005. propagateContextChanges(
  3006. workInProgress,
  3007. current,
  3008. renderLanes,
  3009. forcePropagateEntireTree
  3010. );
  3011. workInProgress.flags |= 262144;
  3012. }
  3013. function checkIfContextChanged(currentDependencies) {
  3014. for (
  3015. currentDependencies = currentDependencies.firstContext;
  3016. null !== currentDependencies;
  3017. ) {
  3018. if (
  3019. !objectIs(
  3020. currentDependencies.context._currentValue,
  3021. currentDependencies.memoizedValue
  3022. )
  3023. )
  3024. return !0;
  3025. currentDependencies = currentDependencies.next;
  3026. }
  3027. return !1;
  3028. }
  3029. function prepareToReadContext(workInProgress) {
  3030. currentlyRenderingFiber$1 = workInProgress;
  3031. lastContextDependency = null;
  3032. workInProgress = workInProgress.dependencies;
  3033. null !== workInProgress && (workInProgress.firstContext = null);
  3034. }
  3035. function readContext(context) {
  3036. return readContextForConsumer(currentlyRenderingFiber$1, context);
  3037. }
  3038. function readContextDuringReconciliation(consumer, context) {
  3039. null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);
  3040. return readContextForConsumer(consumer, context);
  3041. }
  3042. function readContextForConsumer(consumer, context) {
  3043. var value = context._currentValue;
  3044. context = { context: context, memoizedValue: value, next: null };
  3045. if (null === lastContextDependency) {
  3046. if (null === consumer) throw Error(formatProdErrorMessage(308));
  3047. lastContextDependency = context;
  3048. consumer.dependencies = { lanes: 0, firstContext: context };
  3049. consumer.flags |= 524288;
  3050. } else lastContextDependency = lastContextDependency.next = context;
  3051. return value;
  3052. }
  3053. var AbortControllerLocal =
  3054. "undefined" !== typeof AbortController
  3055. ? AbortController
  3056. : function () {
  3057. var listeners = [],
  3058. signal = (this.signal = {
  3059. aborted: !1,
  3060. addEventListener: function (type, listener) {
  3061. listeners.push(listener);
  3062. }
  3063. });
  3064. this.abort = function () {
  3065. signal.aborted = !0;
  3066. listeners.forEach(function (listener) {
  3067. return listener();
  3068. });
  3069. };
  3070. },
  3071. scheduleCallback$2 = Scheduler.unstable_scheduleCallback,
  3072. NormalPriority = Scheduler.unstable_NormalPriority,
  3073. CacheContext = {
  3074. $$typeof: REACT_CONTEXT_TYPE,
  3075. Consumer: null,
  3076. Provider: null,
  3077. _currentValue: null,
  3078. _currentValue2: null,
  3079. _threadCount: 0
  3080. };
  3081. function createCache() {
  3082. return {
  3083. controller: new AbortControllerLocal(),
  3084. data: new Map(),
  3085. refCount: 0
  3086. };
  3087. }
  3088. function releaseCache(cache) {
  3089. cache.refCount--;
  3090. 0 === cache.refCount &&
  3091. scheduleCallback$2(NormalPriority, function () {
  3092. cache.controller.abort();
  3093. });
  3094. }
  3095. var currentEntangledListeners = null,
  3096. currentEntangledPendingCount = 0,
  3097. currentEntangledLane = 0,
  3098. currentEntangledActionThenable = null;
  3099. function entangleAsyncAction(transition, thenable) {
  3100. if (null === currentEntangledListeners) {
  3101. var entangledListeners = (currentEntangledListeners = []);
  3102. currentEntangledPendingCount = 0;
  3103. currentEntangledLane = requestTransitionLane();
  3104. currentEntangledActionThenable = {
  3105. status: "pending",
  3106. value: void 0,
  3107. then: function (resolve) {
  3108. entangledListeners.push(resolve);
  3109. }
  3110. };
  3111. }
  3112. currentEntangledPendingCount++;
  3113. thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
  3114. return thenable;
  3115. }
  3116. function pingEngtangledActionScope() {
  3117. if (
  3118. 0 === --currentEntangledPendingCount &&
  3119. null !== currentEntangledListeners
  3120. ) {
  3121. null !== currentEntangledActionThenable &&
  3122. (currentEntangledActionThenable.status = "fulfilled");
  3123. var listeners = currentEntangledListeners;
  3124. currentEntangledListeners = null;
  3125. currentEntangledLane = 0;
  3126. currentEntangledActionThenable = null;
  3127. for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
  3128. }
  3129. }
  3130. function chainThenableValue(thenable, result) {
  3131. var listeners = [],
  3132. thenableWithOverride = {
  3133. status: "pending",
  3134. value: null,
  3135. reason: null,
  3136. then: function (resolve) {
  3137. listeners.push(resolve);
  3138. }
  3139. };
  3140. thenable.then(
  3141. function () {
  3142. thenableWithOverride.status = "fulfilled";
  3143. thenableWithOverride.value = result;
  3144. for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
  3145. },
  3146. function (error) {
  3147. thenableWithOverride.status = "rejected";
  3148. thenableWithOverride.reason = error;
  3149. for (error = 0; error < listeners.length; error++)
  3150. (0, listeners[error])(void 0);
  3151. }
  3152. );
  3153. return thenableWithOverride;
  3154. }
  3155. var prevOnStartTransitionFinish = ReactSharedInternals.S;
  3156. ReactSharedInternals.S = function (transition, returnValue) {
  3157. globalMostRecentTransitionTime = now();
  3158. "object" === typeof returnValue &&
  3159. null !== returnValue &&
  3160. "function" === typeof returnValue.then &&
  3161. entangleAsyncAction(transition, returnValue);
  3162. null !== prevOnStartTransitionFinish &&
  3163. prevOnStartTransitionFinish(transition, returnValue);
  3164. };
  3165. var resumedCache = createCursor(null);
  3166. function peekCacheFromPool() {
  3167. var cacheResumedFromPreviousRender = resumedCache.current;
  3168. return null !== cacheResumedFromPreviousRender
  3169. ? cacheResumedFromPreviousRender
  3170. : workInProgressRoot.pooledCache;
  3171. }
  3172. function pushTransition(offscreenWorkInProgress, prevCachePool) {
  3173. null === prevCachePool
  3174. ? push(resumedCache, resumedCache.current)
  3175. : push(resumedCache, prevCachePool.pool);
  3176. }
  3177. function getSuspendedCache() {
  3178. var cacheFromPool = peekCacheFromPool();
  3179. return null === cacheFromPool
  3180. ? null
  3181. : { parent: CacheContext._currentValue, pool: cacheFromPool };
  3182. }
  3183. var SuspenseException = Error(formatProdErrorMessage(460)),
  3184. SuspenseyCommitException = Error(formatProdErrorMessage(474)),
  3185. SuspenseActionException = Error(formatProdErrorMessage(542)),
  3186. noopSuspenseyCommitThenable = { then: function () {} };
  3187. function isThenableResolved(thenable) {
  3188. thenable = thenable.status;
  3189. return "fulfilled" === thenable || "rejected" === thenable;
  3190. }
  3191. function trackUsedThenable(thenableState, thenable, index) {
  3192. index = thenableState[index];
  3193. void 0 === index
  3194. ? thenableState.push(thenable)
  3195. : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));
  3196. switch (thenable.status) {
  3197. case "fulfilled":
  3198. return thenable.value;
  3199. case "rejected":
  3200. throw (
  3201. ((thenableState = thenable.reason),
  3202. checkIfUseWrappedInAsyncCatch(thenableState),
  3203. thenableState)
  3204. );
  3205. default:
  3206. if ("string" === typeof thenable.status) thenable.then(noop$1, noop$1);
  3207. else {
  3208. thenableState = workInProgressRoot;
  3209. if (null !== thenableState && 100 < thenableState.shellSuspendCounter)
  3210. throw Error(formatProdErrorMessage(482));
  3211. thenableState = thenable;
  3212. thenableState.status = "pending";
  3213. thenableState.then(
  3214. function (fulfilledValue) {
  3215. if ("pending" === thenable.status) {
  3216. var fulfilledThenable = thenable;
  3217. fulfilledThenable.status = "fulfilled";
  3218. fulfilledThenable.value = fulfilledValue;
  3219. }
  3220. },
  3221. function (error) {
  3222. if ("pending" === thenable.status) {
  3223. var rejectedThenable = thenable;
  3224. rejectedThenable.status = "rejected";
  3225. rejectedThenable.reason = error;
  3226. }
  3227. }
  3228. );
  3229. }
  3230. switch (thenable.status) {
  3231. case "fulfilled":
  3232. return thenable.value;
  3233. case "rejected":
  3234. throw (
  3235. ((thenableState = thenable.reason),
  3236. checkIfUseWrappedInAsyncCatch(thenableState),
  3237. thenableState)
  3238. );
  3239. }
  3240. suspendedThenable = thenable;
  3241. throw SuspenseException;
  3242. }
  3243. }
  3244. function resolveLazy(lazyType) {
  3245. try {
  3246. var init = lazyType._init;
  3247. return init(lazyType._payload);
  3248. } catch (x) {
  3249. if (null !== x && "object" === typeof x && "function" === typeof x.then)
  3250. throw ((suspendedThenable = x), SuspenseException);
  3251. throw x;
  3252. }
  3253. }
  3254. var suspendedThenable = null;
  3255. function getSuspendedThenable() {
  3256. if (null === suspendedThenable) throw Error(formatProdErrorMessage(459));
  3257. var thenable = suspendedThenable;
  3258. suspendedThenable = null;
  3259. return thenable;
  3260. }
  3261. function checkIfUseWrappedInAsyncCatch(rejectedReason) {
  3262. if (
  3263. rejectedReason === SuspenseException ||
  3264. rejectedReason === SuspenseActionException
  3265. )
  3266. throw Error(formatProdErrorMessage(483));
  3267. }
  3268. var thenableState$1 = null,
  3269. thenableIndexCounter$1 = 0;
  3270. function unwrapThenable(thenable) {
  3271. var index = thenableIndexCounter$1;
  3272. thenableIndexCounter$1 += 1;
  3273. null === thenableState$1 && (thenableState$1 = []);
  3274. return trackUsedThenable(thenableState$1, thenable, index);
  3275. }
  3276. function coerceRef(workInProgress, element) {
  3277. element = element.props.ref;
  3278. workInProgress.ref = void 0 !== element ? element : null;
  3279. }
  3280. function throwOnInvalidObjectTypeImpl(returnFiber, newChild) {
  3281. if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
  3282. throw Error(formatProdErrorMessage(525));
  3283. returnFiber = Object.prototype.toString.call(newChild);
  3284. throw Error(
  3285. formatProdErrorMessage(
  3286. 31,
  3287. "[object Object]" === returnFiber
  3288. ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
  3289. : returnFiber
  3290. )
  3291. );
  3292. }
  3293. function createChildReconciler(shouldTrackSideEffects) {
  3294. function deleteChild(returnFiber, childToDelete) {
  3295. if (shouldTrackSideEffects) {
  3296. var deletions = returnFiber.deletions;
  3297. null === deletions
  3298. ? ((returnFiber.deletions = [childToDelete]), (returnFiber.flags |= 16))
  3299. : deletions.push(childToDelete);
  3300. }
  3301. }
  3302. function deleteRemainingChildren(returnFiber, currentFirstChild) {
  3303. if (!shouldTrackSideEffects) return null;
  3304. for (; null !== currentFirstChild; )
  3305. deleteChild(returnFiber, currentFirstChild),
  3306. (currentFirstChild = currentFirstChild.sibling);
  3307. return null;
  3308. }
  3309. function mapRemainingChildren(currentFirstChild) {
  3310. for (var existingChildren = new Map(); null !== currentFirstChild; )
  3311. null !== currentFirstChild.key
  3312. ? existingChildren.set(currentFirstChild.key, currentFirstChild)
  3313. : existingChildren.set(currentFirstChild.index, currentFirstChild),
  3314. (currentFirstChild = currentFirstChild.sibling);
  3315. return existingChildren;
  3316. }
  3317. function useFiber(fiber, pendingProps) {
  3318. fiber = createWorkInProgress(fiber, pendingProps);
  3319. fiber.index = 0;
  3320. fiber.sibling = null;
  3321. return fiber;
  3322. }
  3323. function placeChild(newFiber, lastPlacedIndex, newIndex) {
  3324. newFiber.index = newIndex;
  3325. if (!shouldTrackSideEffects)
  3326. return (newFiber.flags |= 1048576), lastPlacedIndex;
  3327. newIndex = newFiber.alternate;
  3328. if (null !== newIndex)
  3329. return (
  3330. (newIndex = newIndex.index),
  3331. newIndex < lastPlacedIndex
  3332. ? ((newFiber.flags |= 67108866), lastPlacedIndex)
  3333. : newIndex
  3334. );
  3335. newFiber.flags |= 67108866;
  3336. return lastPlacedIndex;
  3337. }
  3338. function placeSingleChild(newFiber) {
  3339. shouldTrackSideEffects &&
  3340. null === newFiber.alternate &&
  3341. (newFiber.flags |= 67108866);
  3342. return newFiber;
  3343. }
  3344. function updateTextNode(returnFiber, current, textContent, lanes) {
  3345. if (null === current || 6 !== current.tag)
  3346. return (
  3347. (current = createFiberFromText(textContent, returnFiber.mode, lanes)),
  3348. (current.return = returnFiber),
  3349. current
  3350. );
  3351. current = useFiber(current, textContent);
  3352. current.return = returnFiber;
  3353. return current;
  3354. }
  3355. function updateElement(returnFiber, current, element, lanes) {
  3356. var elementType = element.type;
  3357. if (elementType === REACT_FRAGMENT_TYPE)
  3358. return updateFragment(
  3359. returnFiber,
  3360. current,
  3361. element.props.children,
  3362. lanes,
  3363. element.key
  3364. );
  3365. if (
  3366. null !== current &&
  3367. (current.elementType === elementType ||
  3368. ("object" === typeof elementType &&
  3369. null !== elementType &&
  3370. elementType.$$typeof === REACT_LAZY_TYPE &&
  3371. resolveLazy(elementType) === current.type))
  3372. )
  3373. return (
  3374. (current = useFiber(current, element.props)),
  3375. coerceRef(current, element),
  3376. (current.return = returnFiber),
  3377. current
  3378. );
  3379. current = createFiberFromTypeAndProps(
  3380. element.type,
  3381. element.key,
  3382. element.props,
  3383. null,
  3384. returnFiber.mode,
  3385. lanes
  3386. );
  3387. coerceRef(current, element);
  3388. current.return = returnFiber;
  3389. return current;
  3390. }
  3391. function updatePortal(returnFiber, current, portal, lanes) {
  3392. if (
  3393. null === current ||
  3394. 4 !== current.tag ||
  3395. current.stateNode.containerInfo !== portal.containerInfo ||
  3396. current.stateNode.implementation !== portal.implementation
  3397. )
  3398. return (
  3399. (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),
  3400. (current.return = returnFiber),
  3401. current
  3402. );
  3403. current = useFiber(current, portal.children || []);
  3404. current.return = returnFiber;
  3405. return current;
  3406. }
  3407. function updateFragment(returnFiber, current, fragment, lanes, key) {
  3408. if (null === current || 7 !== current.tag)
  3409. return (
  3410. (current = createFiberFromFragment(
  3411. fragment,
  3412. returnFiber.mode,
  3413. lanes,
  3414. key
  3415. )),
  3416. (current.return = returnFiber),
  3417. current
  3418. );
  3419. current = useFiber(current, fragment);
  3420. current.return = returnFiber;
  3421. return current;
  3422. }
  3423. function createChild(returnFiber, newChild, lanes) {
  3424. if (
  3425. ("string" === typeof newChild && "" !== newChild) ||
  3426. "number" === typeof newChild ||
  3427. "bigint" === typeof newChild
  3428. )
  3429. return (
  3430. (newChild = createFiberFromText(
  3431. "" + newChild,
  3432. returnFiber.mode,
  3433. lanes
  3434. )),
  3435. (newChild.return = returnFiber),
  3436. newChild
  3437. );
  3438. if ("object" === typeof newChild && null !== newChild) {
  3439. switch (newChild.$$typeof) {
  3440. case REACT_ELEMENT_TYPE:
  3441. return (
  3442. (lanes = createFiberFromTypeAndProps(
  3443. newChild.type,
  3444. newChild.key,
  3445. newChild.props,
  3446. null,
  3447. returnFiber.mode,
  3448. lanes
  3449. )),
  3450. coerceRef(lanes, newChild),
  3451. (lanes.return = returnFiber),
  3452. lanes
  3453. );
  3454. case REACT_PORTAL_TYPE:
  3455. return (
  3456. (newChild = createFiberFromPortal(
  3457. newChild,
  3458. returnFiber.mode,
  3459. lanes
  3460. )),
  3461. (newChild.return = returnFiber),
  3462. newChild
  3463. );
  3464. case REACT_LAZY_TYPE:
  3465. return (
  3466. (newChild = resolveLazy(newChild)),
  3467. createChild(returnFiber, newChild, lanes)
  3468. );
  3469. }
  3470. if (isArrayImpl(newChild) || getIteratorFn(newChild))
  3471. return (
  3472. (newChild = createFiberFromFragment(
  3473. newChild,
  3474. returnFiber.mode,
  3475. lanes,
  3476. null
  3477. )),
  3478. (newChild.return = returnFiber),
  3479. newChild
  3480. );
  3481. if ("function" === typeof newChild.then)
  3482. return createChild(returnFiber, unwrapThenable(newChild), lanes);
  3483. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  3484. return createChild(
  3485. returnFiber,
  3486. readContextDuringReconciliation(returnFiber, newChild),
  3487. lanes
  3488. );
  3489. throwOnInvalidObjectTypeImpl(returnFiber, newChild);
  3490. }
  3491. return null;
  3492. }
  3493. function updateSlot(returnFiber, oldFiber, newChild, lanes) {
  3494. var key = null !== oldFiber ? oldFiber.key : null;
  3495. if (
  3496. ("string" === typeof newChild && "" !== newChild) ||
  3497. "number" === typeof newChild ||
  3498. "bigint" === typeof newChild
  3499. )
  3500. return null !== key
  3501. ? null
  3502. : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
  3503. if ("object" === typeof newChild && null !== newChild) {
  3504. switch (newChild.$$typeof) {
  3505. case REACT_ELEMENT_TYPE:
  3506. return newChild.key === key
  3507. ? updateElement(returnFiber, oldFiber, newChild, lanes)
  3508. : null;
  3509. case REACT_PORTAL_TYPE:
  3510. return newChild.key === key
  3511. ? updatePortal(returnFiber, oldFiber, newChild, lanes)
  3512. : null;
  3513. case REACT_LAZY_TYPE:
  3514. return (
  3515. (newChild = resolveLazy(newChild)),
  3516. updateSlot(returnFiber, oldFiber, newChild, lanes)
  3517. );
  3518. }
  3519. if (isArrayImpl(newChild) || getIteratorFn(newChild))
  3520. return null !== key
  3521. ? null
  3522. : updateFragment(returnFiber, oldFiber, newChild, lanes, null);
  3523. if ("function" === typeof newChild.then)
  3524. return updateSlot(
  3525. returnFiber,
  3526. oldFiber,
  3527. unwrapThenable(newChild),
  3528. lanes
  3529. );
  3530. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  3531. return updateSlot(
  3532. returnFiber,
  3533. oldFiber,
  3534. readContextDuringReconciliation(returnFiber, newChild),
  3535. lanes
  3536. );
  3537. throwOnInvalidObjectTypeImpl(returnFiber, newChild);
  3538. }
  3539. return null;
  3540. }
  3541. function updateFromMap(
  3542. existingChildren,
  3543. returnFiber,
  3544. newIdx,
  3545. newChild,
  3546. lanes
  3547. ) {
  3548. if (
  3549. ("string" === typeof newChild && "" !== newChild) ||
  3550. "number" === typeof newChild ||
  3551. "bigint" === typeof newChild
  3552. )
  3553. return (
  3554. (existingChildren = existingChildren.get(newIdx) || null),
  3555. updateTextNode(returnFiber, existingChildren, "" + newChild, lanes)
  3556. );
  3557. if ("object" === typeof newChild && null !== newChild) {
  3558. switch (newChild.$$typeof) {
  3559. case REACT_ELEMENT_TYPE:
  3560. return (
  3561. (existingChildren =
  3562. existingChildren.get(
  3563. null === newChild.key ? newIdx : newChild.key
  3564. ) || null),
  3565. updateElement(returnFiber, existingChildren, newChild, lanes)
  3566. );
  3567. case REACT_PORTAL_TYPE:
  3568. return (
  3569. (existingChildren =
  3570. existingChildren.get(
  3571. null === newChild.key ? newIdx : newChild.key
  3572. ) || null),
  3573. updatePortal(returnFiber, existingChildren, newChild, lanes)
  3574. );
  3575. case REACT_LAZY_TYPE:
  3576. return (
  3577. (newChild = resolveLazy(newChild)),
  3578. updateFromMap(
  3579. existingChildren,
  3580. returnFiber,
  3581. newIdx,
  3582. newChild,
  3583. lanes
  3584. )
  3585. );
  3586. }
  3587. if (isArrayImpl(newChild) || getIteratorFn(newChild))
  3588. return (
  3589. (existingChildren = existingChildren.get(newIdx) || null),
  3590. updateFragment(returnFiber, existingChildren, newChild, lanes, null)
  3591. );
  3592. if ("function" === typeof newChild.then)
  3593. return updateFromMap(
  3594. existingChildren,
  3595. returnFiber,
  3596. newIdx,
  3597. unwrapThenable(newChild),
  3598. lanes
  3599. );
  3600. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  3601. return updateFromMap(
  3602. existingChildren,
  3603. returnFiber,
  3604. newIdx,
  3605. readContextDuringReconciliation(returnFiber, newChild),
  3606. lanes
  3607. );
  3608. throwOnInvalidObjectTypeImpl(returnFiber, newChild);
  3609. }
  3610. return null;
  3611. }
  3612. function reconcileChildrenArray(
  3613. returnFiber,
  3614. currentFirstChild,
  3615. newChildren,
  3616. lanes
  3617. ) {
  3618. for (
  3619. var resultingFirstChild = null,
  3620. previousNewFiber = null,
  3621. oldFiber = currentFirstChild,
  3622. newIdx = (currentFirstChild = 0),
  3623. nextOldFiber = null;
  3624. null !== oldFiber && newIdx < newChildren.length;
  3625. newIdx++
  3626. ) {
  3627. oldFiber.index > newIdx
  3628. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  3629. : (nextOldFiber = oldFiber.sibling);
  3630. var newFiber = updateSlot(
  3631. returnFiber,
  3632. oldFiber,
  3633. newChildren[newIdx],
  3634. lanes
  3635. );
  3636. if (null === newFiber) {
  3637. null === oldFiber && (oldFiber = nextOldFiber);
  3638. break;
  3639. }
  3640. shouldTrackSideEffects &&
  3641. oldFiber &&
  3642. null === newFiber.alternate &&
  3643. deleteChild(returnFiber, oldFiber);
  3644. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  3645. null === previousNewFiber
  3646. ? (resultingFirstChild = newFiber)
  3647. : (previousNewFiber.sibling = newFiber);
  3648. previousNewFiber = newFiber;
  3649. oldFiber = nextOldFiber;
  3650. }
  3651. if (newIdx === newChildren.length)
  3652. return (
  3653. deleteRemainingChildren(returnFiber, oldFiber),
  3654. isHydrating && pushTreeFork(returnFiber, newIdx),
  3655. resultingFirstChild
  3656. );
  3657. if (null === oldFiber) {
  3658. for (; newIdx < newChildren.length; newIdx++)
  3659. (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),
  3660. null !== oldFiber &&
  3661. ((currentFirstChild = placeChild(
  3662. oldFiber,
  3663. currentFirstChild,
  3664. newIdx
  3665. )),
  3666. null === previousNewFiber
  3667. ? (resultingFirstChild = oldFiber)
  3668. : (previousNewFiber.sibling = oldFiber),
  3669. (previousNewFiber = oldFiber));
  3670. isHydrating && pushTreeFork(returnFiber, newIdx);
  3671. return resultingFirstChild;
  3672. }
  3673. for (
  3674. oldFiber = mapRemainingChildren(oldFiber);
  3675. newIdx < newChildren.length;
  3676. newIdx++
  3677. )
  3678. (nextOldFiber = updateFromMap(
  3679. oldFiber,
  3680. returnFiber,
  3681. newIdx,
  3682. newChildren[newIdx],
  3683. lanes
  3684. )),
  3685. null !== nextOldFiber &&
  3686. (shouldTrackSideEffects &&
  3687. null !== nextOldFiber.alternate &&
  3688. oldFiber.delete(
  3689. null === nextOldFiber.key ? newIdx : nextOldFiber.key
  3690. ),
  3691. (currentFirstChild = placeChild(
  3692. nextOldFiber,
  3693. currentFirstChild,
  3694. newIdx
  3695. )),
  3696. null === previousNewFiber
  3697. ? (resultingFirstChild = nextOldFiber)
  3698. : (previousNewFiber.sibling = nextOldFiber),
  3699. (previousNewFiber = nextOldFiber));
  3700. shouldTrackSideEffects &&
  3701. oldFiber.forEach(function (child) {
  3702. return deleteChild(returnFiber, child);
  3703. });
  3704. isHydrating && pushTreeFork(returnFiber, newIdx);
  3705. return resultingFirstChild;
  3706. }
  3707. function reconcileChildrenIterator(
  3708. returnFiber,
  3709. currentFirstChild,
  3710. newChildren,
  3711. lanes
  3712. ) {
  3713. if (null == newChildren) throw Error(formatProdErrorMessage(151));
  3714. for (
  3715. var resultingFirstChild = null,
  3716. previousNewFiber = null,
  3717. oldFiber = currentFirstChild,
  3718. newIdx = (currentFirstChild = 0),
  3719. nextOldFiber = null,
  3720. step = newChildren.next();
  3721. null !== oldFiber && !step.done;
  3722. newIdx++, step = newChildren.next()
  3723. ) {
  3724. oldFiber.index > newIdx
  3725. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  3726. : (nextOldFiber = oldFiber.sibling);
  3727. var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
  3728. if (null === newFiber) {
  3729. null === oldFiber && (oldFiber = nextOldFiber);
  3730. break;
  3731. }
  3732. shouldTrackSideEffects &&
  3733. oldFiber &&
  3734. null === newFiber.alternate &&
  3735. deleteChild(returnFiber, oldFiber);
  3736. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  3737. null === previousNewFiber
  3738. ? (resultingFirstChild = newFiber)
  3739. : (previousNewFiber.sibling = newFiber);
  3740. previousNewFiber = newFiber;
  3741. oldFiber = nextOldFiber;
  3742. }
  3743. if (step.done)
  3744. return (
  3745. deleteRemainingChildren(returnFiber, oldFiber),
  3746. isHydrating && pushTreeFork(returnFiber, newIdx),
  3747. resultingFirstChild
  3748. );
  3749. if (null === oldFiber) {
  3750. for (; !step.done; newIdx++, step = newChildren.next())
  3751. (step = createChild(returnFiber, step.value, lanes)),
  3752. null !== step &&
  3753. ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
  3754. null === previousNewFiber
  3755. ? (resultingFirstChild = step)
  3756. : (previousNewFiber.sibling = step),
  3757. (previousNewFiber = step));
  3758. isHydrating && pushTreeFork(returnFiber, newIdx);
  3759. return resultingFirstChild;
  3760. }
  3761. for (
  3762. oldFiber = mapRemainingChildren(oldFiber);
  3763. !step.done;
  3764. newIdx++, step = newChildren.next()
  3765. )
  3766. (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)),
  3767. null !== step &&
  3768. (shouldTrackSideEffects &&
  3769. null !== step.alternate &&
  3770. oldFiber.delete(null === step.key ? newIdx : step.key),
  3771. (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
  3772. null === previousNewFiber
  3773. ? (resultingFirstChild = step)
  3774. : (previousNewFiber.sibling = step),
  3775. (previousNewFiber = step));
  3776. shouldTrackSideEffects &&
  3777. oldFiber.forEach(function (child) {
  3778. return deleteChild(returnFiber, child);
  3779. });
  3780. isHydrating && pushTreeFork(returnFiber, newIdx);
  3781. return resultingFirstChild;
  3782. }
  3783. function reconcileChildFibersImpl(
  3784. returnFiber,
  3785. currentFirstChild,
  3786. newChild,
  3787. lanes
  3788. ) {
  3789. "object" === typeof newChild &&
  3790. null !== newChild &&
  3791. newChild.type === REACT_FRAGMENT_TYPE &&
  3792. null === newChild.key &&
  3793. (newChild = newChild.props.children);
  3794. if ("object" === typeof newChild && null !== newChild) {
  3795. switch (newChild.$$typeof) {
  3796. case REACT_ELEMENT_TYPE:
  3797. a: {
  3798. for (var key = newChild.key; null !== currentFirstChild; ) {
  3799. if (currentFirstChild.key === key) {
  3800. key = newChild.type;
  3801. if (key === REACT_FRAGMENT_TYPE) {
  3802. if (7 === currentFirstChild.tag) {
  3803. deleteRemainingChildren(
  3804. returnFiber,
  3805. currentFirstChild.sibling
  3806. );
  3807. lanes = useFiber(
  3808. currentFirstChild,
  3809. newChild.props.children
  3810. );
  3811. lanes.return = returnFiber;
  3812. returnFiber = lanes;
  3813. break a;
  3814. }
  3815. } else if (
  3816. currentFirstChild.elementType === key ||
  3817. ("object" === typeof key &&
  3818. null !== key &&
  3819. key.$$typeof === REACT_LAZY_TYPE &&
  3820. resolveLazy(key) === currentFirstChild.type)
  3821. ) {
  3822. deleteRemainingChildren(
  3823. returnFiber,
  3824. currentFirstChild.sibling
  3825. );
  3826. lanes = useFiber(currentFirstChild, newChild.props);
  3827. coerceRef(lanes, newChild);
  3828. lanes.return = returnFiber;
  3829. returnFiber = lanes;
  3830. break a;
  3831. }
  3832. deleteRemainingChildren(returnFiber, currentFirstChild);
  3833. break;
  3834. } else deleteChild(returnFiber, currentFirstChild);
  3835. currentFirstChild = currentFirstChild.sibling;
  3836. }
  3837. newChild.type === REACT_FRAGMENT_TYPE
  3838. ? ((lanes = createFiberFromFragment(
  3839. newChild.props.children,
  3840. returnFiber.mode,
  3841. lanes,
  3842. newChild.key
  3843. )),
  3844. (lanes.return = returnFiber),
  3845. (returnFiber = lanes))
  3846. : ((lanes = createFiberFromTypeAndProps(
  3847. newChild.type,
  3848. newChild.key,
  3849. newChild.props,
  3850. null,
  3851. returnFiber.mode,
  3852. lanes
  3853. )),
  3854. coerceRef(lanes, newChild),
  3855. (lanes.return = returnFiber),
  3856. (returnFiber = lanes));
  3857. }
  3858. return placeSingleChild(returnFiber);
  3859. case REACT_PORTAL_TYPE:
  3860. a: {
  3861. for (key = newChild.key; null !== currentFirstChild; ) {
  3862. if (currentFirstChild.key === key)
  3863. if (
  3864. 4 === currentFirstChild.tag &&
  3865. currentFirstChild.stateNode.containerInfo ===
  3866. newChild.containerInfo &&
  3867. currentFirstChild.stateNode.implementation ===
  3868. newChild.implementation
  3869. ) {
  3870. deleteRemainingChildren(
  3871. returnFiber,
  3872. currentFirstChild.sibling
  3873. );
  3874. lanes = useFiber(currentFirstChild, newChild.children || []);
  3875. lanes.return = returnFiber;
  3876. returnFiber = lanes;
  3877. break a;
  3878. } else {
  3879. deleteRemainingChildren(returnFiber, currentFirstChild);
  3880. break;
  3881. }
  3882. else deleteChild(returnFiber, currentFirstChild);
  3883. currentFirstChild = currentFirstChild.sibling;
  3884. }
  3885. lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);
  3886. lanes.return = returnFiber;
  3887. returnFiber = lanes;
  3888. }
  3889. return placeSingleChild(returnFiber);
  3890. case REACT_LAZY_TYPE:
  3891. return (
  3892. (newChild = resolveLazy(newChild)),
  3893. reconcileChildFibersImpl(
  3894. returnFiber,
  3895. currentFirstChild,
  3896. newChild,
  3897. lanes
  3898. )
  3899. );
  3900. }
  3901. if (isArrayImpl(newChild))
  3902. return reconcileChildrenArray(
  3903. returnFiber,
  3904. currentFirstChild,
  3905. newChild,
  3906. lanes
  3907. );
  3908. if (getIteratorFn(newChild)) {
  3909. key = getIteratorFn(newChild);
  3910. if ("function" !== typeof key) throw Error(formatProdErrorMessage(150));
  3911. newChild = key.call(newChild);
  3912. return reconcileChildrenIterator(
  3913. returnFiber,
  3914. currentFirstChild,
  3915. newChild,
  3916. lanes
  3917. );
  3918. }
  3919. if ("function" === typeof newChild.then)
  3920. return reconcileChildFibersImpl(
  3921. returnFiber,
  3922. currentFirstChild,
  3923. unwrapThenable(newChild),
  3924. lanes
  3925. );
  3926. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  3927. return reconcileChildFibersImpl(
  3928. returnFiber,
  3929. currentFirstChild,
  3930. readContextDuringReconciliation(returnFiber, newChild),
  3931. lanes
  3932. );
  3933. throwOnInvalidObjectTypeImpl(returnFiber, newChild);
  3934. }
  3935. return ("string" === typeof newChild && "" !== newChild) ||
  3936. "number" === typeof newChild ||
  3937. "bigint" === typeof newChild
  3938. ? ((newChild = "" + newChild),
  3939. null !== currentFirstChild && 6 === currentFirstChild.tag
  3940. ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
  3941. (lanes = useFiber(currentFirstChild, newChild)),
  3942. (lanes.return = returnFiber),
  3943. (returnFiber = lanes))
  3944. : (deleteRemainingChildren(returnFiber, currentFirstChild),
  3945. (lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),
  3946. (lanes.return = returnFiber),
  3947. (returnFiber = lanes)),
  3948. placeSingleChild(returnFiber))
  3949. : deleteRemainingChildren(returnFiber, currentFirstChild);
  3950. }
  3951. return function (returnFiber, currentFirstChild, newChild, lanes) {
  3952. try {
  3953. thenableIndexCounter$1 = 0;
  3954. var firstChildFiber = reconcileChildFibersImpl(
  3955. returnFiber,
  3956. currentFirstChild,
  3957. newChild,
  3958. lanes
  3959. );
  3960. thenableState$1 = null;
  3961. return firstChildFiber;
  3962. } catch (x) {
  3963. if (x === SuspenseException || x === SuspenseActionException) throw x;
  3964. var fiber = createFiberImplClass(29, x, null, returnFiber.mode);
  3965. fiber.lanes = lanes;
  3966. fiber.return = returnFiber;
  3967. return fiber;
  3968. } finally {
  3969. }
  3970. };
  3971. }
  3972. var reconcileChildFibers = createChildReconciler(!0),
  3973. mountChildFibers = createChildReconciler(!1),
  3974. hasForceUpdate = !1;
  3975. function initializeUpdateQueue(fiber) {
  3976. fiber.updateQueue = {
  3977. baseState: fiber.memoizedState,
  3978. firstBaseUpdate: null,
  3979. lastBaseUpdate: null,
  3980. shared: { pending: null, lanes: 0, hiddenCallbacks: null },
  3981. callbacks: null
  3982. };
  3983. }
  3984. function cloneUpdateQueue(current, workInProgress) {
  3985. current = current.updateQueue;
  3986. workInProgress.updateQueue === current &&
  3987. (workInProgress.updateQueue = {
  3988. baseState: current.baseState,
  3989. firstBaseUpdate: current.firstBaseUpdate,
  3990. lastBaseUpdate: current.lastBaseUpdate,
  3991. shared: current.shared,
  3992. callbacks: null
  3993. });
  3994. }
  3995. function createUpdate(lane) {
  3996. return { lane: lane, tag: 0, payload: null, callback: null, next: null };
  3997. }
  3998. function enqueueUpdate(fiber, update, lane) {
  3999. var updateQueue = fiber.updateQueue;
  4000. if (null === updateQueue) return null;
  4001. updateQueue = updateQueue.shared;
  4002. if (0 !== (executionContext & 2)) {
  4003. var pending = updateQueue.pending;
  4004. null === pending
  4005. ? (update.next = update)
  4006. : ((update.next = pending.next), (pending.next = update));
  4007. updateQueue.pending = update;
  4008. update = getRootForUpdatedFiber(fiber);
  4009. markUpdateLaneFromFiberToRoot(fiber, null, lane);
  4010. return update;
  4011. }
  4012. enqueueUpdate$1(fiber, updateQueue, update, lane);
  4013. return getRootForUpdatedFiber(fiber);
  4014. }
  4015. function entangleTransitions(root, fiber, lane) {
  4016. fiber = fiber.updateQueue;
  4017. if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194048))) {
  4018. var queueLanes = fiber.lanes;
  4019. queueLanes &= root.pendingLanes;
  4020. lane |= queueLanes;
  4021. fiber.lanes = lane;
  4022. markRootEntangled(root, lane);
  4023. }
  4024. }
  4025. function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
  4026. var queue = workInProgress.updateQueue,
  4027. current = workInProgress.alternate;
  4028. if (
  4029. null !== current &&
  4030. ((current = current.updateQueue), queue === current)
  4031. ) {
  4032. var newFirst = null,
  4033. newLast = null;
  4034. queue = queue.firstBaseUpdate;
  4035. if (null !== queue) {
  4036. do {
  4037. var clone = {
  4038. lane: queue.lane,
  4039. tag: queue.tag,
  4040. payload: queue.payload,
  4041. callback: null,
  4042. next: null
  4043. };
  4044. null === newLast
  4045. ? (newFirst = newLast = clone)
  4046. : (newLast = newLast.next = clone);
  4047. queue = queue.next;
  4048. } while (null !== queue);
  4049. null === newLast
  4050. ? (newFirst = newLast = capturedUpdate)
  4051. : (newLast = newLast.next = capturedUpdate);
  4052. } else newFirst = newLast = capturedUpdate;
  4053. queue = {
  4054. baseState: current.baseState,
  4055. firstBaseUpdate: newFirst,
  4056. lastBaseUpdate: newLast,
  4057. shared: current.shared,
  4058. callbacks: current.callbacks
  4059. };
  4060. workInProgress.updateQueue = queue;
  4061. return;
  4062. }
  4063. workInProgress = queue.lastBaseUpdate;
  4064. null === workInProgress
  4065. ? (queue.firstBaseUpdate = capturedUpdate)
  4066. : (workInProgress.next = capturedUpdate);
  4067. queue.lastBaseUpdate = capturedUpdate;
  4068. }
  4069. var didReadFromEntangledAsyncAction = !1;
  4070. function suspendIfUpdateReadFromEntangledAsyncAction() {
  4071. if (didReadFromEntangledAsyncAction) {
  4072. var entangledActionThenable = currentEntangledActionThenable;
  4073. if (null !== entangledActionThenable) throw entangledActionThenable;
  4074. }
  4075. }
  4076. function processUpdateQueue(
  4077. workInProgress$jscomp$0,
  4078. props,
  4079. instance$jscomp$0,
  4080. renderLanes
  4081. ) {
  4082. didReadFromEntangledAsyncAction = !1;
  4083. var queue = workInProgress$jscomp$0.updateQueue;
  4084. hasForceUpdate = !1;
  4085. var firstBaseUpdate = queue.firstBaseUpdate,
  4086. lastBaseUpdate = queue.lastBaseUpdate,
  4087. pendingQueue = queue.shared.pending;
  4088. if (null !== pendingQueue) {
  4089. queue.shared.pending = null;
  4090. var lastPendingUpdate = pendingQueue,
  4091. firstPendingUpdate = lastPendingUpdate.next;
  4092. lastPendingUpdate.next = null;
  4093. null === lastBaseUpdate
  4094. ? (firstBaseUpdate = firstPendingUpdate)
  4095. : (lastBaseUpdate.next = firstPendingUpdate);
  4096. lastBaseUpdate = lastPendingUpdate;
  4097. var current = workInProgress$jscomp$0.alternate;
  4098. null !== current &&
  4099. ((current = current.updateQueue),
  4100. (pendingQueue = current.lastBaseUpdate),
  4101. pendingQueue !== lastBaseUpdate &&
  4102. (null === pendingQueue
  4103. ? (current.firstBaseUpdate = firstPendingUpdate)
  4104. : (pendingQueue.next = firstPendingUpdate),
  4105. (current.lastBaseUpdate = lastPendingUpdate)));
  4106. }
  4107. if (null !== firstBaseUpdate) {
  4108. var newState = queue.baseState;
  4109. lastBaseUpdate = 0;
  4110. current = firstPendingUpdate = lastPendingUpdate = null;
  4111. pendingQueue = firstBaseUpdate;
  4112. do {
  4113. var updateLane = pendingQueue.lane & -536870913,
  4114. isHiddenUpdate = updateLane !== pendingQueue.lane;
  4115. if (
  4116. isHiddenUpdate
  4117. ? (workInProgressRootRenderLanes & updateLane) === updateLane
  4118. : (renderLanes & updateLane) === updateLane
  4119. ) {
  4120. 0 !== updateLane &&
  4121. updateLane === currentEntangledLane &&
  4122. (didReadFromEntangledAsyncAction = !0);
  4123. null !== current &&
  4124. (current = current.next =
  4125. {
  4126. lane: 0,
  4127. tag: pendingQueue.tag,
  4128. payload: pendingQueue.payload,
  4129. callback: null,
  4130. next: null
  4131. });
  4132. a: {
  4133. var workInProgress = workInProgress$jscomp$0,
  4134. update = pendingQueue;
  4135. updateLane = props;
  4136. var instance = instance$jscomp$0;
  4137. switch (update.tag) {
  4138. case 1:
  4139. workInProgress = update.payload;
  4140. if ("function" === typeof workInProgress) {
  4141. newState = workInProgress.call(instance, newState, updateLane);
  4142. break a;
  4143. }
  4144. newState = workInProgress;
  4145. break a;
  4146. case 3:
  4147. workInProgress.flags = (workInProgress.flags & -65537) | 128;
  4148. case 0:
  4149. workInProgress = update.payload;
  4150. updateLane =
  4151. "function" === typeof workInProgress
  4152. ? workInProgress.call(instance, newState, updateLane)
  4153. : workInProgress;
  4154. if (null === updateLane || void 0 === updateLane) break a;
  4155. newState = assign({}, newState, updateLane);
  4156. break a;
  4157. case 2:
  4158. hasForceUpdate = !0;
  4159. }
  4160. }
  4161. updateLane = pendingQueue.callback;
  4162. null !== updateLane &&
  4163. ((workInProgress$jscomp$0.flags |= 64),
  4164. isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192),
  4165. (isHiddenUpdate = queue.callbacks),
  4166. null === isHiddenUpdate
  4167. ? (queue.callbacks = [updateLane])
  4168. : isHiddenUpdate.push(updateLane));
  4169. } else
  4170. (isHiddenUpdate = {
  4171. lane: updateLane,
  4172. tag: pendingQueue.tag,
  4173. payload: pendingQueue.payload,
  4174. callback: pendingQueue.callback,
  4175. next: null
  4176. }),
  4177. null === current
  4178. ? ((firstPendingUpdate = current = isHiddenUpdate),
  4179. (lastPendingUpdate = newState))
  4180. : (current = current.next = isHiddenUpdate),
  4181. (lastBaseUpdate |= updateLane);
  4182. pendingQueue = pendingQueue.next;
  4183. if (null === pendingQueue)
  4184. if (((pendingQueue = queue.shared.pending), null === pendingQueue))
  4185. break;
  4186. else
  4187. (isHiddenUpdate = pendingQueue),
  4188. (pendingQueue = isHiddenUpdate.next),
  4189. (isHiddenUpdate.next = null),
  4190. (queue.lastBaseUpdate = isHiddenUpdate),
  4191. (queue.shared.pending = null);
  4192. } while (1);
  4193. null === current && (lastPendingUpdate = newState);
  4194. queue.baseState = lastPendingUpdate;
  4195. queue.firstBaseUpdate = firstPendingUpdate;
  4196. queue.lastBaseUpdate = current;
  4197. null === firstBaseUpdate && (queue.shared.lanes = 0);
  4198. workInProgressRootSkippedLanes |= lastBaseUpdate;
  4199. workInProgress$jscomp$0.lanes = lastBaseUpdate;
  4200. workInProgress$jscomp$0.memoizedState = newState;
  4201. }
  4202. }
  4203. function callCallback(callback, context) {
  4204. if ("function" !== typeof callback)
  4205. throw Error(formatProdErrorMessage(191, callback));
  4206. callback.call(context);
  4207. }
  4208. function commitCallbacks(updateQueue, context) {
  4209. var callbacks = updateQueue.callbacks;
  4210. if (null !== callbacks)
  4211. for (
  4212. updateQueue.callbacks = null, updateQueue = 0;
  4213. updateQueue < callbacks.length;
  4214. updateQueue++
  4215. )
  4216. callCallback(callbacks[updateQueue], context);
  4217. }
  4218. var currentTreeHiddenStackCursor = createCursor(null),
  4219. prevEntangledRenderLanesCursor = createCursor(0);
  4220. function pushHiddenContext(fiber, context) {
  4221. fiber = entangledRenderLanes;
  4222. push(prevEntangledRenderLanesCursor, fiber);
  4223. push(currentTreeHiddenStackCursor, context);
  4224. entangledRenderLanes = fiber | context.baseLanes;
  4225. }
  4226. function reuseHiddenContextOnStack() {
  4227. push(prevEntangledRenderLanesCursor, entangledRenderLanes);
  4228. push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);
  4229. }
  4230. function popHiddenContext() {
  4231. entangledRenderLanes = prevEntangledRenderLanesCursor.current;
  4232. pop(currentTreeHiddenStackCursor);
  4233. pop(prevEntangledRenderLanesCursor);
  4234. }
  4235. var suspenseHandlerStackCursor = createCursor(null),
  4236. shellBoundary = null;
  4237. function pushPrimaryTreeSuspenseHandler(handler) {
  4238. var current = handler.alternate;
  4239. push(suspenseStackCursor, suspenseStackCursor.current & 1);
  4240. push(suspenseHandlerStackCursor, handler);
  4241. null === shellBoundary &&
  4242. (null === current || null !== currentTreeHiddenStackCursor.current
  4243. ? (shellBoundary = handler)
  4244. : null !== current.memoizedState && (shellBoundary = handler));
  4245. }
  4246. function pushDehydratedActivitySuspenseHandler(fiber) {
  4247. push(suspenseStackCursor, suspenseStackCursor.current);
  4248. push(suspenseHandlerStackCursor, fiber);
  4249. null === shellBoundary && (shellBoundary = fiber);
  4250. }
  4251. function pushOffscreenSuspenseHandler(fiber) {
  4252. 22 === fiber.tag
  4253. ? (push(suspenseStackCursor, suspenseStackCursor.current),
  4254. push(suspenseHandlerStackCursor, fiber),
  4255. null === shellBoundary && (shellBoundary = fiber))
  4256. : reuseSuspenseHandlerOnStack(fiber);
  4257. }
  4258. function reuseSuspenseHandlerOnStack() {
  4259. push(suspenseStackCursor, suspenseStackCursor.current);
  4260. push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
  4261. }
  4262. function popSuspenseHandler(fiber) {
  4263. pop(suspenseHandlerStackCursor);
  4264. shellBoundary === fiber && (shellBoundary = null);
  4265. pop(suspenseStackCursor);
  4266. }
  4267. var suspenseStackCursor = createCursor(0);
  4268. function findFirstSuspended(row) {
  4269. for (var node = row; null !== node; ) {
  4270. if (13 === node.tag) {
  4271. var state = node.memoizedState;
  4272. if (
  4273. null !== state &&
  4274. ((state = state.dehydrated),
  4275. null === state ||
  4276. isSuspenseInstancePending(state) ||
  4277. isSuspenseInstanceFallback(state))
  4278. )
  4279. return node;
  4280. } else if (
  4281. 19 === node.tag &&
  4282. ("forwards" === node.memoizedProps.revealOrder ||
  4283. "backwards" === node.memoizedProps.revealOrder ||
  4284. "unstable_legacy-backwards" === node.memoizedProps.revealOrder ||
  4285. "together" === node.memoizedProps.revealOrder)
  4286. ) {
  4287. if (0 !== (node.flags & 128)) return node;
  4288. } else if (null !== node.child) {
  4289. node.child.return = node;
  4290. node = node.child;
  4291. continue;
  4292. }
  4293. if (node === row) break;
  4294. for (; null === node.sibling; ) {
  4295. if (null === node.return || node.return === row) return null;
  4296. node = node.return;
  4297. }
  4298. node.sibling.return = node.return;
  4299. node = node.sibling;
  4300. }
  4301. return null;
  4302. }
  4303. var renderLanes = 0,
  4304. currentlyRenderingFiber = null,
  4305. currentHook = null,
  4306. workInProgressHook = null,
  4307. didScheduleRenderPhaseUpdate = !1,
  4308. didScheduleRenderPhaseUpdateDuringThisPass = !1,
  4309. shouldDoubleInvokeUserFnsInHooksDEV = !1,
  4310. localIdCounter = 0,
  4311. thenableIndexCounter = 0,
  4312. thenableState = null,
  4313. globalClientIdCounter = 0;
  4314. function throwInvalidHookError() {
  4315. throw Error(formatProdErrorMessage(321));
  4316. }
  4317. function areHookInputsEqual(nextDeps, prevDeps) {
  4318. if (null === prevDeps) return !1;
  4319. for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
  4320. if (!objectIs(nextDeps[i], prevDeps[i])) return !1;
  4321. return !0;
  4322. }
  4323. function renderWithHooks(
  4324. current,
  4325. workInProgress,
  4326. Component,
  4327. props,
  4328. secondArg,
  4329. nextRenderLanes
  4330. ) {
  4331. renderLanes = nextRenderLanes;
  4332. currentlyRenderingFiber = workInProgress;
  4333. workInProgress.memoizedState = null;
  4334. workInProgress.updateQueue = null;
  4335. workInProgress.lanes = 0;
  4336. ReactSharedInternals.H =
  4337. null === current || null === current.memoizedState
  4338. ? HooksDispatcherOnMount
  4339. : HooksDispatcherOnUpdate;
  4340. shouldDoubleInvokeUserFnsInHooksDEV = !1;
  4341. nextRenderLanes = Component(props, secondArg);
  4342. shouldDoubleInvokeUserFnsInHooksDEV = !1;
  4343. didScheduleRenderPhaseUpdateDuringThisPass &&
  4344. (nextRenderLanes = renderWithHooksAgain(
  4345. workInProgress,
  4346. Component,
  4347. props,
  4348. secondArg
  4349. ));
  4350. finishRenderingHooks(current);
  4351. return nextRenderLanes;
  4352. }
  4353. function finishRenderingHooks(current) {
  4354. ReactSharedInternals.H = ContextOnlyDispatcher;
  4355. var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
  4356. renderLanes = 0;
  4357. workInProgressHook = currentHook = currentlyRenderingFiber = null;
  4358. didScheduleRenderPhaseUpdate = !1;
  4359. thenableIndexCounter = 0;
  4360. thenableState = null;
  4361. if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));
  4362. null === current ||
  4363. didReceiveUpdate ||
  4364. ((current = current.dependencies),
  4365. null !== current &&
  4366. checkIfContextChanged(current) &&
  4367. (didReceiveUpdate = !0));
  4368. }
  4369. function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
  4370. currentlyRenderingFiber = workInProgress;
  4371. var numberOfReRenders = 0;
  4372. do {
  4373. didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);
  4374. thenableIndexCounter = 0;
  4375. didScheduleRenderPhaseUpdateDuringThisPass = !1;
  4376. if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));
  4377. numberOfReRenders += 1;
  4378. workInProgressHook = currentHook = null;
  4379. if (null != workInProgress.updateQueue) {
  4380. var children = workInProgress.updateQueue;
  4381. children.lastEffect = null;
  4382. children.events = null;
  4383. children.stores = null;
  4384. null != children.memoCache && (children.memoCache.index = 0);
  4385. }
  4386. ReactSharedInternals.H = HooksDispatcherOnRerender;
  4387. children = Component(props, secondArg);
  4388. } while (didScheduleRenderPhaseUpdateDuringThisPass);
  4389. return children;
  4390. }
  4391. function TransitionAwareHostComponent() {
  4392. var dispatcher = ReactSharedInternals.H,
  4393. maybeThenable = dispatcher.useState()[0];
  4394. maybeThenable =
  4395. "function" === typeof maybeThenable.then
  4396. ? useThenable(maybeThenable)
  4397. : maybeThenable;
  4398. dispatcher = dispatcher.useState()[0];
  4399. (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&
  4400. (currentlyRenderingFiber.flags |= 1024);
  4401. return maybeThenable;
  4402. }
  4403. function checkDidRenderIdHook() {
  4404. var didRenderIdHook = 0 !== localIdCounter;
  4405. localIdCounter = 0;
  4406. return didRenderIdHook;
  4407. }
  4408. function bailoutHooks(current, workInProgress, lanes) {
  4409. workInProgress.updateQueue = current.updateQueue;
  4410. workInProgress.flags &= -2053;
  4411. current.lanes &= ~lanes;
  4412. }
  4413. function resetHooksOnUnwind(workInProgress) {
  4414. if (didScheduleRenderPhaseUpdate) {
  4415. for (
  4416. workInProgress = workInProgress.memoizedState;
  4417. null !== workInProgress;
  4418. ) {
  4419. var queue = workInProgress.queue;
  4420. null !== queue && (queue.pending = null);
  4421. workInProgress = workInProgress.next;
  4422. }
  4423. didScheduleRenderPhaseUpdate = !1;
  4424. }
  4425. renderLanes = 0;
  4426. workInProgressHook = currentHook = currentlyRenderingFiber = null;
  4427. didScheduleRenderPhaseUpdateDuringThisPass = !1;
  4428. thenableIndexCounter = localIdCounter = 0;
  4429. thenableState = null;
  4430. }
  4431. function mountWorkInProgressHook() {
  4432. var hook = {
  4433. memoizedState: null,
  4434. baseState: null,
  4435. baseQueue: null,
  4436. queue: null,
  4437. next: null
  4438. };
  4439. null === workInProgressHook
  4440. ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook)
  4441. : (workInProgressHook = workInProgressHook.next = hook);
  4442. return workInProgressHook;
  4443. }
  4444. function updateWorkInProgressHook() {
  4445. if (null === currentHook) {
  4446. var nextCurrentHook = currentlyRenderingFiber.alternate;
  4447. nextCurrentHook =
  4448. null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
  4449. } else nextCurrentHook = currentHook.next;
  4450. var nextWorkInProgressHook =
  4451. null === workInProgressHook
  4452. ? currentlyRenderingFiber.memoizedState
  4453. : workInProgressHook.next;
  4454. if (null !== nextWorkInProgressHook)
  4455. (workInProgressHook = nextWorkInProgressHook),
  4456. (currentHook = nextCurrentHook);
  4457. else {
  4458. if (null === nextCurrentHook) {
  4459. if (null === currentlyRenderingFiber.alternate)
  4460. throw Error(formatProdErrorMessage(467));
  4461. throw Error(formatProdErrorMessage(310));
  4462. }
  4463. currentHook = nextCurrentHook;
  4464. nextCurrentHook = {
  4465. memoizedState: currentHook.memoizedState,
  4466. baseState: currentHook.baseState,
  4467. baseQueue: currentHook.baseQueue,
  4468. queue: currentHook.queue,
  4469. next: null
  4470. };
  4471. null === workInProgressHook
  4472. ? (currentlyRenderingFiber.memoizedState = workInProgressHook =
  4473. nextCurrentHook)
  4474. : (workInProgressHook = workInProgressHook.next = nextCurrentHook);
  4475. }
  4476. return workInProgressHook;
  4477. }
  4478. function createFunctionComponentUpdateQueue() {
  4479. return { lastEffect: null, events: null, stores: null, memoCache: null };
  4480. }
  4481. function useThenable(thenable) {
  4482. var index = thenableIndexCounter;
  4483. thenableIndexCounter += 1;
  4484. null === thenableState && (thenableState = []);
  4485. thenable = trackUsedThenable(thenableState, thenable, index);
  4486. index = currentlyRenderingFiber;
  4487. null ===
  4488. (null === workInProgressHook
  4489. ? index.memoizedState
  4490. : workInProgressHook.next) &&
  4491. ((index = index.alternate),
  4492. (ReactSharedInternals.H =
  4493. null === index || null === index.memoizedState
  4494. ? HooksDispatcherOnMount
  4495. : HooksDispatcherOnUpdate));
  4496. return thenable;
  4497. }
  4498. function use(usable) {
  4499. if (null !== usable && "object" === typeof usable) {
  4500. if ("function" === typeof usable.then) return useThenable(usable);
  4501. if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
  4502. }
  4503. throw Error(formatProdErrorMessage(438, String(usable)));
  4504. }
  4505. function useMemoCache(size) {
  4506. var memoCache = null,
  4507. updateQueue = currentlyRenderingFiber.updateQueue;
  4508. null !== updateQueue && (memoCache = updateQueue.memoCache);
  4509. if (null == memoCache) {
  4510. var current = currentlyRenderingFiber.alternate;
  4511. null !== current &&
  4512. ((current = current.updateQueue),
  4513. null !== current &&
  4514. ((current = current.memoCache),
  4515. null != current &&
  4516. (memoCache = {
  4517. data: current.data.map(function (array) {
  4518. return array.slice();
  4519. }),
  4520. index: 0
  4521. })));
  4522. }
  4523. null == memoCache && (memoCache = { data: [], index: 0 });
  4524. null === updateQueue &&
  4525. ((updateQueue = createFunctionComponentUpdateQueue()),
  4526. (currentlyRenderingFiber.updateQueue = updateQueue));
  4527. updateQueue.memoCache = memoCache;
  4528. updateQueue = memoCache.data[memoCache.index];
  4529. if (void 0 === updateQueue)
  4530. for (
  4531. updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0;
  4532. current < size;
  4533. current++
  4534. )
  4535. updateQueue[current] = REACT_MEMO_CACHE_SENTINEL;
  4536. memoCache.index++;
  4537. return updateQueue;
  4538. }
  4539. function basicStateReducer(state, action) {
  4540. return "function" === typeof action ? action(state) : action;
  4541. }
  4542. function updateReducer(reducer) {
  4543. var hook = updateWorkInProgressHook();
  4544. return updateReducerImpl(hook, currentHook, reducer);
  4545. }
  4546. function updateReducerImpl(hook, current, reducer) {
  4547. var queue = hook.queue;
  4548. if (null === queue) throw Error(formatProdErrorMessage(311));
  4549. queue.lastRenderedReducer = reducer;
  4550. var baseQueue = hook.baseQueue,
  4551. pendingQueue = queue.pending;
  4552. if (null !== pendingQueue) {
  4553. if (null !== baseQueue) {
  4554. var baseFirst = baseQueue.next;
  4555. baseQueue.next = pendingQueue.next;
  4556. pendingQueue.next = baseFirst;
  4557. }
  4558. current.baseQueue = baseQueue = pendingQueue;
  4559. queue.pending = null;
  4560. }
  4561. pendingQueue = hook.baseState;
  4562. if (null === baseQueue) hook.memoizedState = pendingQueue;
  4563. else {
  4564. current = baseQueue.next;
  4565. var newBaseQueueFirst = (baseFirst = null),
  4566. newBaseQueueLast = null,
  4567. update = current,
  4568. didReadFromEntangledAsyncAction$60 = !1;
  4569. do {
  4570. var updateLane = update.lane & -536870913;
  4571. if (
  4572. updateLane !== update.lane
  4573. ? (workInProgressRootRenderLanes & updateLane) === updateLane
  4574. : (renderLanes & updateLane) === updateLane
  4575. ) {
  4576. var revertLane = update.revertLane;
  4577. if (0 === revertLane)
  4578. null !== newBaseQueueLast &&
  4579. (newBaseQueueLast = newBaseQueueLast.next =
  4580. {
  4581. lane: 0,
  4582. revertLane: 0,
  4583. gesture: null,
  4584. action: update.action,
  4585. hasEagerState: update.hasEagerState,
  4586. eagerState: update.eagerState,
  4587. next: null
  4588. }),
  4589. updateLane === currentEntangledLane &&
  4590. (didReadFromEntangledAsyncAction$60 = !0);
  4591. else if ((renderLanes & revertLane) === revertLane) {
  4592. update = update.next;
  4593. revertLane === currentEntangledLane &&
  4594. (didReadFromEntangledAsyncAction$60 = !0);
  4595. continue;
  4596. } else
  4597. (updateLane = {
  4598. lane: 0,
  4599. revertLane: update.revertLane,
  4600. gesture: null,
  4601. action: update.action,
  4602. hasEagerState: update.hasEagerState,
  4603. eagerState: update.eagerState,
  4604. next: null
  4605. }),
  4606. null === newBaseQueueLast
  4607. ? ((newBaseQueueFirst = newBaseQueueLast = updateLane),
  4608. (baseFirst = pendingQueue))
  4609. : (newBaseQueueLast = newBaseQueueLast.next = updateLane),
  4610. (currentlyRenderingFiber.lanes |= revertLane),
  4611. (workInProgressRootSkippedLanes |= revertLane);
  4612. updateLane = update.action;
  4613. shouldDoubleInvokeUserFnsInHooksDEV &&
  4614. reducer(pendingQueue, updateLane);
  4615. pendingQueue = update.hasEagerState
  4616. ? update.eagerState
  4617. : reducer(pendingQueue, updateLane);
  4618. } else
  4619. (revertLane = {
  4620. lane: updateLane,
  4621. revertLane: update.revertLane,
  4622. gesture: update.gesture,
  4623. action: update.action,
  4624. hasEagerState: update.hasEagerState,
  4625. eagerState: update.eagerState,
  4626. next: null
  4627. }),
  4628. null === newBaseQueueLast
  4629. ? ((newBaseQueueFirst = newBaseQueueLast = revertLane),
  4630. (baseFirst = pendingQueue))
  4631. : (newBaseQueueLast = newBaseQueueLast.next = revertLane),
  4632. (currentlyRenderingFiber.lanes |= updateLane),
  4633. (workInProgressRootSkippedLanes |= updateLane);
  4634. update = update.next;
  4635. } while (null !== update && update !== current);
  4636. null === newBaseQueueLast
  4637. ? (baseFirst = pendingQueue)
  4638. : (newBaseQueueLast.next = newBaseQueueFirst);
  4639. if (
  4640. !objectIs(pendingQueue, hook.memoizedState) &&
  4641. ((didReceiveUpdate = !0),
  4642. didReadFromEntangledAsyncAction$60 &&
  4643. ((reducer = currentEntangledActionThenable), null !== reducer))
  4644. )
  4645. throw reducer;
  4646. hook.memoizedState = pendingQueue;
  4647. hook.baseState = baseFirst;
  4648. hook.baseQueue = newBaseQueueLast;
  4649. queue.lastRenderedState = pendingQueue;
  4650. }
  4651. null === baseQueue && (queue.lanes = 0);
  4652. return [hook.memoizedState, queue.dispatch];
  4653. }
  4654. function rerenderReducer(reducer) {
  4655. var hook = updateWorkInProgressHook(),
  4656. queue = hook.queue;
  4657. if (null === queue) throw Error(formatProdErrorMessage(311));
  4658. queue.lastRenderedReducer = reducer;
  4659. var dispatch = queue.dispatch,
  4660. lastRenderPhaseUpdate = queue.pending,
  4661. newState = hook.memoizedState;
  4662. if (null !== lastRenderPhaseUpdate) {
  4663. queue.pending = null;
  4664. var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);
  4665. do (newState = reducer(newState, update.action)), (update = update.next);
  4666. while (update !== lastRenderPhaseUpdate);
  4667. objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);
  4668. hook.memoizedState = newState;
  4669. null === hook.baseQueue && (hook.baseState = newState);
  4670. queue.lastRenderedState = newState;
  4671. }
  4672. return [newState, dispatch];
  4673. }
  4674. function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
  4675. var fiber = currentlyRenderingFiber,
  4676. hook = updateWorkInProgressHook(),
  4677. isHydrating$jscomp$0 = isHydrating;
  4678. if (isHydrating$jscomp$0) {
  4679. if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407));
  4680. getServerSnapshot = getServerSnapshot();
  4681. } else getServerSnapshot = getSnapshot();
  4682. var snapshotChanged = !objectIs(
  4683. (currentHook || hook).memoizedState,
  4684. getServerSnapshot
  4685. );
  4686. snapshotChanged &&
  4687. ((hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0));
  4688. hook = hook.queue;
  4689. updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [
  4690. subscribe
  4691. ]);
  4692. if (
  4693. hook.getSnapshot !== getSnapshot ||
  4694. snapshotChanged ||
  4695. (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)
  4696. ) {
  4697. fiber.flags |= 2048;
  4698. pushSimpleEffect(
  4699. 9,
  4700. { destroy: void 0 },
  4701. updateStoreInstance.bind(
  4702. null,
  4703. fiber,
  4704. hook,
  4705. getServerSnapshot,
  4706. getSnapshot
  4707. ),
  4708. null
  4709. );
  4710. if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));
  4711. isHydrating$jscomp$0 ||
  4712. 0 !== (renderLanes & 127) ||
  4713. pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
  4714. }
  4715. return getServerSnapshot;
  4716. }
  4717. function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
  4718. fiber.flags |= 16384;
  4719. fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };
  4720. getSnapshot = currentlyRenderingFiber.updateQueue;
  4721. null === getSnapshot
  4722. ? ((getSnapshot = createFunctionComponentUpdateQueue()),
  4723. (currentlyRenderingFiber.updateQueue = getSnapshot),
  4724. (getSnapshot.stores = [fiber]))
  4725. : ((renderedSnapshot = getSnapshot.stores),
  4726. null === renderedSnapshot
  4727. ? (getSnapshot.stores = [fiber])
  4728. : renderedSnapshot.push(fiber));
  4729. }
  4730. function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
  4731. inst.value = nextSnapshot;
  4732. inst.getSnapshot = getSnapshot;
  4733. checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
  4734. }
  4735. function subscribeToStore(fiber, inst, subscribe) {
  4736. return subscribe(function () {
  4737. checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
  4738. });
  4739. }
  4740. function checkIfSnapshotChanged(inst) {
  4741. var latestGetSnapshot = inst.getSnapshot;
  4742. inst = inst.value;
  4743. try {
  4744. var nextValue = latestGetSnapshot();
  4745. return !objectIs(inst, nextValue);
  4746. } catch (error) {
  4747. return !0;
  4748. }
  4749. }
  4750. function forceStoreRerender(fiber) {
  4751. var root = enqueueConcurrentRenderForLane(fiber, 2);
  4752. null !== root && scheduleUpdateOnFiber(root, fiber, 2);
  4753. }
  4754. function mountStateImpl(initialState) {
  4755. var hook = mountWorkInProgressHook();
  4756. if ("function" === typeof initialState) {
  4757. var initialStateInitializer = initialState;
  4758. initialState = initialStateInitializer();
  4759. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  4760. setIsStrictModeForDevtools(!0);
  4761. try {
  4762. initialStateInitializer();
  4763. } finally {
  4764. setIsStrictModeForDevtools(!1);
  4765. }
  4766. }
  4767. }
  4768. hook.memoizedState = hook.baseState = initialState;
  4769. hook.queue = {
  4770. pending: null,
  4771. lanes: 0,
  4772. dispatch: null,
  4773. lastRenderedReducer: basicStateReducer,
  4774. lastRenderedState: initialState
  4775. };
  4776. return hook;
  4777. }
  4778. function updateOptimisticImpl(hook, current, passthrough, reducer) {
  4779. hook.baseState = passthrough;
  4780. return updateReducerImpl(
  4781. hook,
  4782. currentHook,
  4783. "function" === typeof reducer ? reducer : basicStateReducer
  4784. );
  4785. }
  4786. function dispatchActionState(
  4787. fiber,
  4788. actionQueue,
  4789. setPendingState,
  4790. setState,
  4791. payload
  4792. ) {
  4793. if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485));
  4794. fiber = actionQueue.action;
  4795. if (null !== fiber) {
  4796. var actionNode = {
  4797. payload: payload,
  4798. action: fiber,
  4799. next: null,
  4800. isTransition: !0,
  4801. status: "pending",
  4802. value: null,
  4803. reason: null,
  4804. listeners: [],
  4805. then: function (listener) {
  4806. actionNode.listeners.push(listener);
  4807. }
  4808. };
  4809. null !== ReactSharedInternals.T
  4810. ? setPendingState(!0)
  4811. : (actionNode.isTransition = !1);
  4812. setState(actionNode);
  4813. setPendingState = actionQueue.pending;
  4814. null === setPendingState
  4815. ? ((actionNode.next = actionQueue.pending = actionNode),
  4816. runActionStateAction(actionQueue, actionNode))
  4817. : ((actionNode.next = setPendingState.next),
  4818. (actionQueue.pending = setPendingState.next = actionNode));
  4819. }
  4820. }
  4821. function runActionStateAction(actionQueue, node) {
  4822. var action = node.action,
  4823. payload = node.payload,
  4824. prevState = actionQueue.state;
  4825. if (node.isTransition) {
  4826. var prevTransition = ReactSharedInternals.T,
  4827. currentTransition = {};
  4828. ReactSharedInternals.T = currentTransition;
  4829. try {
  4830. var returnValue = action(prevState, payload),
  4831. onStartTransitionFinish = ReactSharedInternals.S;
  4832. null !== onStartTransitionFinish &&
  4833. onStartTransitionFinish(currentTransition, returnValue);
  4834. handleActionReturnValue(actionQueue, node, returnValue);
  4835. } catch (error) {
  4836. onActionError(actionQueue, node, error);
  4837. } finally {
  4838. null !== prevTransition &&
  4839. null !== currentTransition.types &&
  4840. (prevTransition.types = currentTransition.types),
  4841. (ReactSharedInternals.T = prevTransition);
  4842. }
  4843. } else
  4844. try {
  4845. (prevTransition = action(prevState, payload)),
  4846. handleActionReturnValue(actionQueue, node, prevTransition);
  4847. } catch (error$66) {
  4848. onActionError(actionQueue, node, error$66);
  4849. }
  4850. }
  4851. function handleActionReturnValue(actionQueue, node, returnValue) {
  4852. null !== returnValue &&
  4853. "object" === typeof returnValue &&
  4854. "function" === typeof returnValue.then
  4855. ? returnValue.then(
  4856. function (nextState) {
  4857. onActionSuccess(actionQueue, node, nextState);
  4858. },
  4859. function (error) {
  4860. return onActionError(actionQueue, node, error);
  4861. }
  4862. )
  4863. : onActionSuccess(actionQueue, node, returnValue);
  4864. }
  4865. function onActionSuccess(actionQueue, actionNode, nextState) {
  4866. actionNode.status = "fulfilled";
  4867. actionNode.value = nextState;
  4868. notifyActionListeners(actionNode);
  4869. actionQueue.state = nextState;
  4870. actionNode = actionQueue.pending;
  4871. null !== actionNode &&
  4872. ((nextState = actionNode.next),
  4873. nextState === actionNode
  4874. ? (actionQueue.pending = null)
  4875. : ((nextState = nextState.next),
  4876. (actionNode.next = nextState),
  4877. runActionStateAction(actionQueue, nextState)));
  4878. }
  4879. function onActionError(actionQueue, actionNode, error) {
  4880. var last = actionQueue.pending;
  4881. actionQueue.pending = null;
  4882. if (null !== last) {
  4883. last = last.next;
  4884. do
  4885. (actionNode.status = "rejected"),
  4886. (actionNode.reason = error),
  4887. notifyActionListeners(actionNode),
  4888. (actionNode = actionNode.next);
  4889. while (actionNode !== last);
  4890. }
  4891. actionQueue.action = null;
  4892. }
  4893. function notifyActionListeners(actionNode) {
  4894. actionNode = actionNode.listeners;
  4895. for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();
  4896. }
  4897. function actionStateReducer(oldState, newState) {
  4898. return newState;
  4899. }
  4900. function mountActionState(action, initialStateProp) {
  4901. if (isHydrating) {
  4902. var ssrFormState = workInProgressRoot.formState;
  4903. if (null !== ssrFormState) {
  4904. a: {
  4905. var JSCompiler_inline_result = currentlyRenderingFiber;
  4906. if (isHydrating) {
  4907. if (nextHydratableInstance) {
  4908. b: {
  4909. var JSCompiler_inline_result$jscomp$0 = nextHydratableInstance;
  4910. for (
  4911. var inRootOrSingleton = rootOrSingletonContext;
  4912. 8 !== JSCompiler_inline_result$jscomp$0.nodeType;
  4913. ) {
  4914. if (!inRootOrSingleton) {
  4915. JSCompiler_inline_result$jscomp$0 = null;
  4916. break b;
  4917. }
  4918. JSCompiler_inline_result$jscomp$0 = getNextHydratable(
  4919. JSCompiler_inline_result$jscomp$0.nextSibling
  4920. );
  4921. if (null === JSCompiler_inline_result$jscomp$0) {
  4922. JSCompiler_inline_result$jscomp$0 = null;
  4923. break b;
  4924. }
  4925. }
  4926. inRootOrSingleton = JSCompiler_inline_result$jscomp$0.data;
  4927. JSCompiler_inline_result$jscomp$0 =
  4928. "F!" === inRootOrSingleton || "F" === inRootOrSingleton
  4929. ? JSCompiler_inline_result$jscomp$0
  4930. : null;
  4931. }
  4932. if (JSCompiler_inline_result$jscomp$0) {
  4933. nextHydratableInstance = getNextHydratable(
  4934. JSCompiler_inline_result$jscomp$0.nextSibling
  4935. );
  4936. JSCompiler_inline_result =
  4937. "F!" === JSCompiler_inline_result$jscomp$0.data;
  4938. break a;
  4939. }
  4940. }
  4941. throwOnHydrationMismatch(JSCompiler_inline_result);
  4942. }
  4943. JSCompiler_inline_result = !1;
  4944. }
  4945. JSCompiler_inline_result && (initialStateProp = ssrFormState[0]);
  4946. }
  4947. }
  4948. ssrFormState = mountWorkInProgressHook();
  4949. ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
  4950. JSCompiler_inline_result = {
  4951. pending: null,
  4952. lanes: 0,
  4953. dispatch: null,
  4954. lastRenderedReducer: actionStateReducer,
  4955. lastRenderedState: initialStateProp
  4956. };
  4957. ssrFormState.queue = JSCompiler_inline_result;
  4958. ssrFormState = dispatchSetState.bind(
  4959. null,
  4960. currentlyRenderingFiber,
  4961. JSCompiler_inline_result
  4962. );
  4963. JSCompiler_inline_result.dispatch = ssrFormState;
  4964. JSCompiler_inline_result = mountStateImpl(!1);
  4965. inRootOrSingleton = dispatchOptimisticSetState.bind(
  4966. null,
  4967. currentlyRenderingFiber,
  4968. !1,
  4969. JSCompiler_inline_result.queue
  4970. );
  4971. JSCompiler_inline_result = mountWorkInProgressHook();
  4972. JSCompiler_inline_result$jscomp$0 = {
  4973. state: initialStateProp,
  4974. dispatch: null,
  4975. action: action,
  4976. pending: null
  4977. };
  4978. JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0;
  4979. ssrFormState = dispatchActionState.bind(
  4980. null,
  4981. currentlyRenderingFiber,
  4982. JSCompiler_inline_result$jscomp$0,
  4983. inRootOrSingleton,
  4984. ssrFormState
  4985. );
  4986. JSCompiler_inline_result$jscomp$0.dispatch = ssrFormState;
  4987. JSCompiler_inline_result.memoizedState = action;
  4988. return [initialStateProp, ssrFormState, !1];
  4989. }
  4990. function updateActionState(action) {
  4991. var stateHook = updateWorkInProgressHook();
  4992. return updateActionStateImpl(stateHook, currentHook, action);
  4993. }
  4994. function updateActionStateImpl(stateHook, currentStateHook, action) {
  4995. currentStateHook = updateReducerImpl(
  4996. stateHook,
  4997. currentStateHook,
  4998. actionStateReducer
  4999. )[0];
  5000. stateHook = updateReducer(basicStateReducer)[0];
  5001. if (
  5002. "object" === typeof currentStateHook &&
  5003. null !== currentStateHook &&
  5004. "function" === typeof currentStateHook.then
  5005. )
  5006. try {
  5007. var state = useThenable(currentStateHook);
  5008. } catch (x) {
  5009. if (x === SuspenseException) throw SuspenseActionException;
  5010. throw x;
  5011. }
  5012. else state = currentStateHook;
  5013. currentStateHook = updateWorkInProgressHook();
  5014. var actionQueue = currentStateHook.queue,
  5015. dispatch = actionQueue.dispatch;
  5016. action !== currentStateHook.memoizedState &&
  5017. ((currentlyRenderingFiber.flags |= 2048),
  5018. pushSimpleEffect(
  5019. 9,
  5020. { destroy: void 0 },
  5021. actionStateActionEffect.bind(null, actionQueue, action),
  5022. null
  5023. ));
  5024. return [state, dispatch, stateHook];
  5025. }
  5026. function actionStateActionEffect(actionQueue, action) {
  5027. actionQueue.action = action;
  5028. }
  5029. function rerenderActionState(action) {
  5030. var stateHook = updateWorkInProgressHook(),
  5031. currentStateHook = currentHook;
  5032. if (null !== currentStateHook)
  5033. return updateActionStateImpl(stateHook, currentStateHook, action);
  5034. updateWorkInProgressHook();
  5035. stateHook = stateHook.memoizedState;
  5036. currentStateHook = updateWorkInProgressHook();
  5037. var dispatch = currentStateHook.queue.dispatch;
  5038. currentStateHook.memoizedState = action;
  5039. return [stateHook, dispatch, !1];
  5040. }
  5041. function pushSimpleEffect(tag, inst, create, deps) {
  5042. tag = { tag: tag, create: create, deps: deps, inst: inst, next: null };
  5043. inst = currentlyRenderingFiber.updateQueue;
  5044. null === inst &&
  5045. ((inst = createFunctionComponentUpdateQueue()),
  5046. (currentlyRenderingFiber.updateQueue = inst));
  5047. create = inst.lastEffect;
  5048. null === create
  5049. ? (inst.lastEffect = tag.next = tag)
  5050. : ((deps = create.next),
  5051. (create.next = tag),
  5052. (tag.next = deps),
  5053. (inst.lastEffect = tag));
  5054. return tag;
  5055. }
  5056. function updateRef() {
  5057. return updateWorkInProgressHook().memoizedState;
  5058. }
  5059. function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
  5060. var hook = mountWorkInProgressHook();
  5061. currentlyRenderingFiber.flags |= fiberFlags;
  5062. hook.memoizedState = pushSimpleEffect(
  5063. 1 | hookFlags,
  5064. { destroy: void 0 },
  5065. create,
  5066. void 0 === deps ? null : deps
  5067. );
  5068. }
  5069. function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
  5070. var hook = updateWorkInProgressHook();
  5071. deps = void 0 === deps ? null : deps;
  5072. var inst = hook.memoizedState.inst;
  5073. null !== currentHook &&
  5074. null !== deps &&
  5075. areHookInputsEqual(deps, currentHook.memoizedState.deps)
  5076. ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps))
  5077. : ((currentlyRenderingFiber.flags |= fiberFlags),
  5078. (hook.memoizedState = pushSimpleEffect(
  5079. 1 | hookFlags,
  5080. inst,
  5081. create,
  5082. deps
  5083. )));
  5084. }
  5085. function mountEffect(create, deps) {
  5086. mountEffectImpl(8390656, 8, create, deps);
  5087. }
  5088. function updateEffect(create, deps) {
  5089. updateEffectImpl(2048, 8, create, deps);
  5090. }
  5091. function useEffectEventImpl(payload) {
  5092. currentlyRenderingFiber.flags |= 4;
  5093. var componentUpdateQueue = currentlyRenderingFiber.updateQueue;
  5094. if (null === componentUpdateQueue)
  5095. (componentUpdateQueue = createFunctionComponentUpdateQueue()),
  5096. (currentlyRenderingFiber.updateQueue = componentUpdateQueue),
  5097. (componentUpdateQueue.events = [payload]);
  5098. else {
  5099. var events = componentUpdateQueue.events;
  5100. null === events
  5101. ? (componentUpdateQueue.events = [payload])
  5102. : events.push(payload);
  5103. }
  5104. }
  5105. function updateEvent(callback) {
  5106. var ref = updateWorkInProgressHook().memoizedState;
  5107. useEffectEventImpl({ ref: ref, nextImpl: callback });
  5108. return function () {
  5109. if (0 !== (executionContext & 2)) throw Error(formatProdErrorMessage(440));
  5110. return ref.impl.apply(void 0, arguments);
  5111. };
  5112. }
  5113. function updateInsertionEffect(create, deps) {
  5114. return updateEffectImpl(4, 2, create, deps);
  5115. }
  5116. function updateLayoutEffect(create, deps) {
  5117. return updateEffectImpl(4, 4, create, deps);
  5118. }
  5119. function imperativeHandleEffect(create, ref) {
  5120. if ("function" === typeof ref) {
  5121. create = create();
  5122. var refCleanup = ref(create);
  5123. return function () {
  5124. "function" === typeof refCleanup ? refCleanup() : ref(null);
  5125. };
  5126. }
  5127. if (null !== ref && void 0 !== ref)
  5128. return (
  5129. (create = create()),
  5130. (ref.current = create),
  5131. function () {
  5132. ref.current = null;
  5133. }
  5134. );
  5135. }
  5136. function updateImperativeHandle(ref, create, deps) {
  5137. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  5138. updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);
  5139. }
  5140. function mountDebugValue() {}
  5141. function updateCallback(callback, deps) {
  5142. var hook = updateWorkInProgressHook();
  5143. deps = void 0 === deps ? null : deps;
  5144. var prevState = hook.memoizedState;
  5145. if (null !== deps && areHookInputsEqual(deps, prevState[1]))
  5146. return prevState[0];
  5147. hook.memoizedState = [callback, deps];
  5148. return callback;
  5149. }
  5150. function updateMemo(nextCreate, deps) {
  5151. var hook = updateWorkInProgressHook();
  5152. deps = void 0 === deps ? null : deps;
  5153. var prevState = hook.memoizedState;
  5154. if (null !== deps && areHookInputsEqual(deps, prevState[1]))
  5155. return prevState[0];
  5156. prevState = nextCreate();
  5157. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  5158. setIsStrictModeForDevtools(!0);
  5159. try {
  5160. nextCreate();
  5161. } finally {
  5162. setIsStrictModeForDevtools(!1);
  5163. }
  5164. }
  5165. hook.memoizedState = [prevState, deps];
  5166. return prevState;
  5167. }
  5168. function mountDeferredValueImpl(hook, value, initialValue) {
  5169. if (
  5170. void 0 === initialValue ||
  5171. (0 !== (renderLanes & 1073741824) &&
  5172. 0 === (workInProgressRootRenderLanes & 261930))
  5173. )
  5174. return (hook.memoizedState = value);
  5175. hook.memoizedState = initialValue;
  5176. hook = requestDeferredLane();
  5177. currentlyRenderingFiber.lanes |= hook;
  5178. workInProgressRootSkippedLanes |= hook;
  5179. return initialValue;
  5180. }
  5181. function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
  5182. if (objectIs(value, prevValue)) return value;
  5183. if (null !== currentTreeHiddenStackCursor.current)
  5184. return (
  5185. (hook = mountDeferredValueImpl(hook, value, initialValue)),
  5186. objectIs(hook, prevValue) || (didReceiveUpdate = !0),
  5187. hook
  5188. );
  5189. if (
  5190. 0 === (renderLanes & 42) ||
  5191. (0 !== (renderLanes & 1073741824) &&
  5192. 0 === (workInProgressRootRenderLanes & 261930))
  5193. )
  5194. return (didReceiveUpdate = !0), (hook.memoizedState = value);
  5195. hook = requestDeferredLane();
  5196. currentlyRenderingFiber.lanes |= hook;
  5197. workInProgressRootSkippedLanes |= hook;
  5198. return prevValue;
  5199. }
  5200. function startTransition(fiber, queue, pendingState, finishedState, callback) {
  5201. var previousPriority = ReactDOMSharedInternals.p;
  5202. ReactDOMSharedInternals.p =
  5203. 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;
  5204. var prevTransition = ReactSharedInternals.T,
  5205. currentTransition = {};
  5206. ReactSharedInternals.T = currentTransition;
  5207. dispatchOptimisticSetState(fiber, !1, queue, pendingState);
  5208. try {
  5209. var returnValue = callback(),
  5210. onStartTransitionFinish = ReactSharedInternals.S;
  5211. null !== onStartTransitionFinish &&
  5212. onStartTransitionFinish(currentTransition, returnValue);
  5213. if (
  5214. null !== returnValue &&
  5215. "object" === typeof returnValue &&
  5216. "function" === typeof returnValue.then
  5217. ) {
  5218. var thenableForFinishedState = chainThenableValue(
  5219. returnValue,
  5220. finishedState
  5221. );
  5222. dispatchSetStateInternal(
  5223. fiber,
  5224. queue,
  5225. thenableForFinishedState,
  5226. requestUpdateLane(fiber)
  5227. );
  5228. } else
  5229. dispatchSetStateInternal(
  5230. fiber,
  5231. queue,
  5232. finishedState,
  5233. requestUpdateLane(fiber)
  5234. );
  5235. } catch (error) {
  5236. dispatchSetStateInternal(
  5237. fiber,
  5238. queue,
  5239. { then: function () {}, status: "rejected", reason: error },
  5240. requestUpdateLane()
  5241. );
  5242. } finally {
  5243. (ReactDOMSharedInternals.p = previousPriority),
  5244. null !== prevTransition &&
  5245. null !== currentTransition.types &&
  5246. (prevTransition.types = currentTransition.types),
  5247. (ReactSharedInternals.T = prevTransition);
  5248. }
  5249. }
  5250. function noop() {}
  5251. function startHostTransition(formFiber, pendingState, action, formData) {
  5252. if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476));
  5253. var queue = ensureFormComponentIsStateful(formFiber).queue;
  5254. startTransition(
  5255. formFiber,
  5256. queue,
  5257. pendingState,
  5258. sharedNotPendingObject,
  5259. null === action
  5260. ? noop
  5261. : function () {
  5262. requestFormReset$1(formFiber);
  5263. return action(formData);
  5264. }
  5265. );
  5266. }
  5267. function ensureFormComponentIsStateful(formFiber) {
  5268. var existingStateHook = formFiber.memoizedState;
  5269. if (null !== existingStateHook) return existingStateHook;
  5270. existingStateHook = {
  5271. memoizedState: sharedNotPendingObject,
  5272. baseState: sharedNotPendingObject,
  5273. baseQueue: null,
  5274. queue: {
  5275. pending: null,
  5276. lanes: 0,
  5277. dispatch: null,
  5278. lastRenderedReducer: basicStateReducer,
  5279. lastRenderedState: sharedNotPendingObject
  5280. },
  5281. next: null
  5282. };
  5283. var initialResetState = {};
  5284. existingStateHook.next = {
  5285. memoizedState: initialResetState,
  5286. baseState: initialResetState,
  5287. baseQueue: null,
  5288. queue: {
  5289. pending: null,
  5290. lanes: 0,
  5291. dispatch: null,
  5292. lastRenderedReducer: basicStateReducer,
  5293. lastRenderedState: initialResetState
  5294. },
  5295. next: null
  5296. };
  5297. formFiber.memoizedState = existingStateHook;
  5298. formFiber = formFiber.alternate;
  5299. null !== formFiber && (formFiber.memoizedState = existingStateHook);
  5300. return existingStateHook;
  5301. }
  5302. function requestFormReset$1(formFiber) {
  5303. var stateHook = ensureFormComponentIsStateful(formFiber);
  5304. null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);
  5305. dispatchSetStateInternal(
  5306. formFiber,
  5307. stateHook.next.queue,
  5308. {},
  5309. requestUpdateLane()
  5310. );
  5311. }
  5312. function useHostTransitionStatus() {
  5313. return readContext(HostTransitionContext);
  5314. }
  5315. function updateId() {
  5316. return updateWorkInProgressHook().memoizedState;
  5317. }
  5318. function updateRefresh() {
  5319. return updateWorkInProgressHook().memoizedState;
  5320. }
  5321. function refreshCache(fiber) {
  5322. for (var provider = fiber.return; null !== provider; ) {
  5323. switch (provider.tag) {
  5324. case 24:
  5325. case 3:
  5326. var lane = requestUpdateLane();
  5327. fiber = createUpdate(lane);
  5328. var root$69 = enqueueUpdate(provider, fiber, lane);
  5329. null !== root$69 &&
  5330. (scheduleUpdateOnFiber(root$69, provider, lane),
  5331. entangleTransitions(root$69, provider, lane));
  5332. provider = { cache: createCache() };
  5333. fiber.payload = provider;
  5334. return;
  5335. }
  5336. provider = provider.return;
  5337. }
  5338. }
  5339. function dispatchReducerAction(fiber, queue, action) {
  5340. var lane = requestUpdateLane();
  5341. action = {
  5342. lane: lane,
  5343. revertLane: 0,
  5344. gesture: null,
  5345. action: action,
  5346. hasEagerState: !1,
  5347. eagerState: null,
  5348. next: null
  5349. };
  5350. isRenderPhaseUpdate(fiber)
  5351. ? enqueueRenderPhaseUpdate(queue, action)
  5352. : ((action = enqueueConcurrentHookUpdate(fiber, queue, action, lane)),
  5353. null !== action &&
  5354. (scheduleUpdateOnFiber(action, fiber, lane),
  5355. entangleTransitionUpdate(action, queue, lane)));
  5356. }
  5357. function dispatchSetState(fiber, queue, action) {
  5358. var lane = requestUpdateLane();
  5359. dispatchSetStateInternal(fiber, queue, action, lane);
  5360. }
  5361. function dispatchSetStateInternal(fiber, queue, action, lane) {
  5362. var update = {
  5363. lane: lane,
  5364. revertLane: 0,
  5365. gesture: null,
  5366. action: action,
  5367. hasEagerState: !1,
  5368. eagerState: null,
  5369. next: null
  5370. };
  5371. if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
  5372. else {
  5373. var alternate = fiber.alternate;
  5374. if (
  5375. 0 === fiber.lanes &&
  5376. (null === alternate || 0 === alternate.lanes) &&
  5377. ((alternate = queue.lastRenderedReducer), null !== alternate)
  5378. )
  5379. try {
  5380. var currentState = queue.lastRenderedState,
  5381. eagerState = alternate(currentState, action);
  5382. update.hasEagerState = !0;
  5383. update.eagerState = eagerState;
  5384. if (objectIs(eagerState, currentState))
  5385. return (
  5386. enqueueUpdate$1(fiber, queue, update, 0),
  5387. null === workInProgressRoot && finishQueueingConcurrentUpdates(),
  5388. !1
  5389. );
  5390. } catch (error) {
  5391. } finally {
  5392. }
  5393. action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
  5394. if (null !== action)
  5395. return (
  5396. scheduleUpdateOnFiber(action, fiber, lane),
  5397. entangleTransitionUpdate(action, queue, lane),
  5398. !0
  5399. );
  5400. }
  5401. return !1;
  5402. }
  5403. function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
  5404. action = {
  5405. lane: 2,
  5406. revertLane: requestTransitionLane(),
  5407. gesture: null,
  5408. action: action,
  5409. hasEagerState: !1,
  5410. eagerState: null,
  5411. next: null
  5412. };
  5413. if (isRenderPhaseUpdate(fiber)) {
  5414. if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));
  5415. } else
  5416. (throwIfDuringRender = enqueueConcurrentHookUpdate(
  5417. fiber,
  5418. queue,
  5419. action,
  5420. 2
  5421. )),
  5422. null !== throwIfDuringRender &&
  5423. scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);
  5424. }
  5425. function isRenderPhaseUpdate(fiber) {
  5426. var alternate = fiber.alternate;
  5427. return (
  5428. fiber === currentlyRenderingFiber ||
  5429. (null !== alternate && alternate === currentlyRenderingFiber)
  5430. );
  5431. }
  5432. function enqueueRenderPhaseUpdate(queue, update) {
  5433. didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate =
  5434. !0;
  5435. var pending = queue.pending;
  5436. null === pending
  5437. ? (update.next = update)
  5438. : ((update.next = pending.next), (pending.next = update));
  5439. queue.pending = update;
  5440. }
  5441. function entangleTransitionUpdate(root, queue, lane) {
  5442. if (0 !== (lane & 4194048)) {
  5443. var queueLanes = queue.lanes;
  5444. queueLanes &= root.pendingLanes;
  5445. lane |= queueLanes;
  5446. queue.lanes = lane;
  5447. markRootEntangled(root, lane);
  5448. }
  5449. }
  5450. var ContextOnlyDispatcher = {
  5451. readContext: readContext,
  5452. use: use,
  5453. useCallback: throwInvalidHookError,
  5454. useContext: throwInvalidHookError,
  5455. useEffect: throwInvalidHookError,
  5456. useImperativeHandle: throwInvalidHookError,
  5457. useLayoutEffect: throwInvalidHookError,
  5458. useInsertionEffect: throwInvalidHookError,
  5459. useMemo: throwInvalidHookError,
  5460. useReducer: throwInvalidHookError,
  5461. useRef: throwInvalidHookError,
  5462. useState: throwInvalidHookError,
  5463. useDebugValue: throwInvalidHookError,
  5464. useDeferredValue: throwInvalidHookError,
  5465. useTransition: throwInvalidHookError,
  5466. useSyncExternalStore: throwInvalidHookError,
  5467. useId: throwInvalidHookError,
  5468. useHostTransitionStatus: throwInvalidHookError,
  5469. useFormState: throwInvalidHookError,
  5470. useActionState: throwInvalidHookError,
  5471. useOptimistic: throwInvalidHookError,
  5472. useMemoCache: throwInvalidHookError,
  5473. useCacheRefresh: throwInvalidHookError
  5474. };
  5475. ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
  5476. var HooksDispatcherOnMount = {
  5477. readContext: readContext,
  5478. use: use,
  5479. useCallback: function (callback, deps) {
  5480. mountWorkInProgressHook().memoizedState = [
  5481. callback,
  5482. void 0 === deps ? null : deps
  5483. ];
  5484. return callback;
  5485. },
  5486. useContext: readContext,
  5487. useEffect: mountEffect,
  5488. useImperativeHandle: function (ref, create, deps) {
  5489. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  5490. mountEffectImpl(
  5491. 4194308,
  5492. 4,
  5493. imperativeHandleEffect.bind(null, create, ref),
  5494. deps
  5495. );
  5496. },
  5497. useLayoutEffect: function (create, deps) {
  5498. return mountEffectImpl(4194308, 4, create, deps);
  5499. },
  5500. useInsertionEffect: function (create, deps) {
  5501. mountEffectImpl(4, 2, create, deps);
  5502. },
  5503. useMemo: function (nextCreate, deps) {
  5504. var hook = mountWorkInProgressHook();
  5505. deps = void 0 === deps ? null : deps;
  5506. var nextValue = nextCreate();
  5507. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  5508. setIsStrictModeForDevtools(!0);
  5509. try {
  5510. nextCreate();
  5511. } finally {
  5512. setIsStrictModeForDevtools(!1);
  5513. }
  5514. }
  5515. hook.memoizedState = [nextValue, deps];
  5516. return nextValue;
  5517. },
  5518. useReducer: function (reducer, initialArg, init) {
  5519. var hook = mountWorkInProgressHook();
  5520. if (void 0 !== init) {
  5521. var initialState = init(initialArg);
  5522. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  5523. setIsStrictModeForDevtools(!0);
  5524. try {
  5525. init(initialArg);
  5526. } finally {
  5527. setIsStrictModeForDevtools(!1);
  5528. }
  5529. }
  5530. } else initialState = initialArg;
  5531. hook.memoizedState = hook.baseState = initialState;
  5532. reducer = {
  5533. pending: null,
  5534. lanes: 0,
  5535. dispatch: null,
  5536. lastRenderedReducer: reducer,
  5537. lastRenderedState: initialState
  5538. };
  5539. hook.queue = reducer;
  5540. reducer = reducer.dispatch = dispatchReducerAction.bind(
  5541. null,
  5542. currentlyRenderingFiber,
  5543. reducer
  5544. );
  5545. return [hook.memoizedState, reducer];
  5546. },
  5547. useRef: function (initialValue) {
  5548. var hook = mountWorkInProgressHook();
  5549. initialValue = { current: initialValue };
  5550. return (hook.memoizedState = initialValue);
  5551. },
  5552. useState: function (initialState) {
  5553. initialState = mountStateImpl(initialState);
  5554. var queue = initialState.queue,
  5555. dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
  5556. queue.dispatch = dispatch;
  5557. return [initialState.memoizedState, dispatch];
  5558. },
  5559. useDebugValue: mountDebugValue,
  5560. useDeferredValue: function (value, initialValue) {
  5561. var hook = mountWorkInProgressHook();
  5562. return mountDeferredValueImpl(hook, value, initialValue);
  5563. },
  5564. useTransition: function () {
  5565. var stateHook = mountStateImpl(!1);
  5566. stateHook = startTransition.bind(
  5567. null,
  5568. currentlyRenderingFiber,
  5569. stateHook.queue,
  5570. !0,
  5571. !1
  5572. );
  5573. mountWorkInProgressHook().memoizedState = stateHook;
  5574. return [!1, stateHook];
  5575. },
  5576. useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
  5577. var fiber = currentlyRenderingFiber,
  5578. hook = mountWorkInProgressHook();
  5579. if (isHydrating) {
  5580. if (void 0 === getServerSnapshot)
  5581. throw Error(formatProdErrorMessage(407));
  5582. getServerSnapshot = getServerSnapshot();
  5583. } else {
  5584. getServerSnapshot = getSnapshot();
  5585. if (null === workInProgressRoot)
  5586. throw Error(formatProdErrorMessage(349));
  5587. 0 !== (workInProgressRootRenderLanes & 127) ||
  5588. pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
  5589. }
  5590. hook.memoizedState = getServerSnapshot;
  5591. var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };
  5592. hook.queue = inst;
  5593. mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [
  5594. subscribe
  5595. ]);
  5596. fiber.flags |= 2048;
  5597. pushSimpleEffect(
  5598. 9,
  5599. { destroy: void 0 },
  5600. updateStoreInstance.bind(
  5601. null,
  5602. fiber,
  5603. inst,
  5604. getServerSnapshot,
  5605. getSnapshot
  5606. ),
  5607. null
  5608. );
  5609. return getServerSnapshot;
  5610. },
  5611. useId: function () {
  5612. var hook = mountWorkInProgressHook(),
  5613. identifierPrefix = workInProgressRoot.identifierPrefix;
  5614. if (isHydrating) {
  5615. var JSCompiler_inline_result = treeContextOverflow;
  5616. var idWithLeadingBit = treeContextId;
  5617. JSCompiler_inline_result =
  5618. (
  5619. idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1))
  5620. ).toString(32) + JSCompiler_inline_result;
  5621. identifierPrefix =
  5622. "_" + identifierPrefix + "R_" + JSCompiler_inline_result;
  5623. JSCompiler_inline_result = localIdCounter++;
  5624. 0 < JSCompiler_inline_result &&
  5625. (identifierPrefix += "H" + JSCompiler_inline_result.toString(32));
  5626. identifierPrefix += "_";
  5627. } else
  5628. (JSCompiler_inline_result = globalClientIdCounter++),
  5629. (identifierPrefix =
  5630. "_" +
  5631. identifierPrefix +
  5632. "r_" +
  5633. JSCompiler_inline_result.toString(32) +
  5634. "_");
  5635. return (hook.memoizedState = identifierPrefix);
  5636. },
  5637. useHostTransitionStatus: useHostTransitionStatus,
  5638. useFormState: mountActionState,
  5639. useActionState: mountActionState,
  5640. useOptimistic: function (passthrough) {
  5641. var hook = mountWorkInProgressHook();
  5642. hook.memoizedState = hook.baseState = passthrough;
  5643. var queue = {
  5644. pending: null,
  5645. lanes: 0,
  5646. dispatch: null,
  5647. lastRenderedReducer: null,
  5648. lastRenderedState: null
  5649. };
  5650. hook.queue = queue;
  5651. hook = dispatchOptimisticSetState.bind(
  5652. null,
  5653. currentlyRenderingFiber,
  5654. !0,
  5655. queue
  5656. );
  5657. queue.dispatch = hook;
  5658. return [passthrough, hook];
  5659. },
  5660. useMemoCache: useMemoCache,
  5661. useCacheRefresh: function () {
  5662. return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
  5663. null,
  5664. currentlyRenderingFiber
  5665. ));
  5666. },
  5667. useEffectEvent: function (callback) {
  5668. var hook = mountWorkInProgressHook(),
  5669. ref = { impl: callback };
  5670. hook.memoizedState = ref;
  5671. return function () {
  5672. if (0 !== (executionContext & 2))
  5673. throw Error(formatProdErrorMessage(440));
  5674. return ref.impl.apply(void 0, arguments);
  5675. };
  5676. }
  5677. },
  5678. HooksDispatcherOnUpdate = {
  5679. readContext: readContext,
  5680. use: use,
  5681. useCallback: updateCallback,
  5682. useContext: readContext,
  5683. useEffect: updateEffect,
  5684. useImperativeHandle: updateImperativeHandle,
  5685. useInsertionEffect: updateInsertionEffect,
  5686. useLayoutEffect: updateLayoutEffect,
  5687. useMemo: updateMemo,
  5688. useReducer: updateReducer,
  5689. useRef: updateRef,
  5690. useState: function () {
  5691. return updateReducer(basicStateReducer);
  5692. },
  5693. useDebugValue: mountDebugValue,
  5694. useDeferredValue: function (value, initialValue) {
  5695. var hook = updateWorkInProgressHook();
  5696. return updateDeferredValueImpl(
  5697. hook,
  5698. currentHook.memoizedState,
  5699. value,
  5700. initialValue
  5701. );
  5702. },
  5703. useTransition: function () {
  5704. var booleanOrThenable = updateReducer(basicStateReducer)[0],
  5705. start = updateWorkInProgressHook().memoizedState;
  5706. return [
  5707. "boolean" === typeof booleanOrThenable
  5708. ? booleanOrThenable
  5709. : useThenable(booleanOrThenable),
  5710. start
  5711. ];
  5712. },
  5713. useSyncExternalStore: updateSyncExternalStore,
  5714. useId: updateId,
  5715. useHostTransitionStatus: useHostTransitionStatus,
  5716. useFormState: updateActionState,
  5717. useActionState: updateActionState,
  5718. useOptimistic: function (passthrough, reducer) {
  5719. var hook = updateWorkInProgressHook();
  5720. return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
  5721. },
  5722. useMemoCache: useMemoCache,
  5723. useCacheRefresh: updateRefresh
  5724. };
  5725. HooksDispatcherOnUpdate.useEffectEvent = updateEvent;
  5726. var HooksDispatcherOnRerender = {
  5727. readContext: readContext,
  5728. use: use,
  5729. useCallback: updateCallback,
  5730. useContext: readContext,
  5731. useEffect: updateEffect,
  5732. useImperativeHandle: updateImperativeHandle,
  5733. useInsertionEffect: updateInsertionEffect,
  5734. useLayoutEffect: updateLayoutEffect,
  5735. useMemo: updateMemo,
  5736. useReducer: rerenderReducer,
  5737. useRef: updateRef,
  5738. useState: function () {
  5739. return rerenderReducer(basicStateReducer);
  5740. },
  5741. useDebugValue: mountDebugValue,
  5742. useDeferredValue: function (value, initialValue) {
  5743. var hook = updateWorkInProgressHook();
  5744. return null === currentHook
  5745. ? mountDeferredValueImpl(hook, value, initialValue)
  5746. : updateDeferredValueImpl(
  5747. hook,
  5748. currentHook.memoizedState,
  5749. value,
  5750. initialValue
  5751. );
  5752. },
  5753. useTransition: function () {
  5754. var booleanOrThenable = rerenderReducer(basicStateReducer)[0],
  5755. start = updateWorkInProgressHook().memoizedState;
  5756. return [
  5757. "boolean" === typeof booleanOrThenable
  5758. ? booleanOrThenable
  5759. : useThenable(booleanOrThenable),
  5760. start
  5761. ];
  5762. },
  5763. useSyncExternalStore: updateSyncExternalStore,
  5764. useId: updateId,
  5765. useHostTransitionStatus: useHostTransitionStatus,
  5766. useFormState: rerenderActionState,
  5767. useActionState: rerenderActionState,
  5768. useOptimistic: function (passthrough, reducer) {
  5769. var hook = updateWorkInProgressHook();
  5770. if (null !== currentHook)
  5771. return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
  5772. hook.baseState = passthrough;
  5773. return [passthrough, hook.queue.dispatch];
  5774. },
  5775. useMemoCache: useMemoCache,
  5776. useCacheRefresh: updateRefresh
  5777. };
  5778. HooksDispatcherOnRerender.useEffectEvent = updateEvent;
  5779. function applyDerivedStateFromProps(
  5780. workInProgress,
  5781. ctor,
  5782. getDerivedStateFromProps,
  5783. nextProps
  5784. ) {
  5785. ctor = workInProgress.memoizedState;
  5786. getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
  5787. getDerivedStateFromProps =
  5788. null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
  5789. ? ctor
  5790. : assign({}, ctor, getDerivedStateFromProps);
  5791. workInProgress.memoizedState = getDerivedStateFromProps;
  5792. 0 === workInProgress.lanes &&
  5793. (workInProgress.updateQueue.baseState = getDerivedStateFromProps);
  5794. }
  5795. var classComponentUpdater = {
  5796. enqueueSetState: function (inst, payload, callback) {
  5797. inst = inst._reactInternals;
  5798. var lane = requestUpdateLane(),
  5799. update = createUpdate(lane);
  5800. update.payload = payload;
  5801. void 0 !== callback && null !== callback && (update.callback = callback);
  5802. payload = enqueueUpdate(inst, update, lane);
  5803. null !== payload &&
  5804. (scheduleUpdateOnFiber(payload, inst, lane),
  5805. entangleTransitions(payload, inst, lane));
  5806. },
  5807. enqueueReplaceState: function (inst, payload, callback) {
  5808. inst = inst._reactInternals;
  5809. var lane = requestUpdateLane(),
  5810. update = createUpdate(lane);
  5811. update.tag = 1;
  5812. update.payload = payload;
  5813. void 0 !== callback && null !== callback && (update.callback = callback);
  5814. payload = enqueueUpdate(inst, update, lane);
  5815. null !== payload &&
  5816. (scheduleUpdateOnFiber(payload, inst, lane),
  5817. entangleTransitions(payload, inst, lane));
  5818. },
  5819. enqueueForceUpdate: function (inst, callback) {
  5820. inst = inst._reactInternals;
  5821. var lane = requestUpdateLane(),
  5822. update = createUpdate(lane);
  5823. update.tag = 2;
  5824. void 0 !== callback && null !== callback && (update.callback = callback);
  5825. callback = enqueueUpdate(inst, update, lane);
  5826. null !== callback &&
  5827. (scheduleUpdateOnFiber(callback, inst, lane),
  5828. entangleTransitions(callback, inst, lane));
  5829. }
  5830. };
  5831. function checkShouldComponentUpdate(
  5832. workInProgress,
  5833. ctor,
  5834. oldProps,
  5835. newProps,
  5836. oldState,
  5837. newState,
  5838. nextContext
  5839. ) {
  5840. workInProgress = workInProgress.stateNode;
  5841. return "function" === typeof workInProgress.shouldComponentUpdate
  5842. ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)
  5843. : ctor.prototype && ctor.prototype.isPureReactComponent
  5844. ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)
  5845. : !0;
  5846. }
  5847. function callComponentWillReceiveProps(
  5848. workInProgress,
  5849. instance,
  5850. newProps,
  5851. nextContext
  5852. ) {
  5853. workInProgress = instance.state;
  5854. "function" === typeof instance.componentWillReceiveProps &&
  5855. instance.componentWillReceiveProps(newProps, nextContext);
  5856. "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
  5857. instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  5858. instance.state !== workInProgress &&
  5859. classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  5860. }
  5861. function resolveClassComponentProps(Component, baseProps) {
  5862. var newProps = baseProps;
  5863. if ("ref" in baseProps) {
  5864. newProps = {};
  5865. for (var propName in baseProps)
  5866. "ref" !== propName && (newProps[propName] = baseProps[propName]);
  5867. }
  5868. if ((Component = Component.defaultProps)) {
  5869. newProps === baseProps && (newProps = assign({}, newProps));
  5870. for (var propName$73 in Component)
  5871. void 0 === newProps[propName$73] &&
  5872. (newProps[propName$73] = Component[propName$73]);
  5873. }
  5874. return newProps;
  5875. }
  5876. function defaultOnUncaughtError(error) {
  5877. reportGlobalError(error);
  5878. }
  5879. function defaultOnCaughtError(error) {
  5880. console.error(error);
  5881. }
  5882. function defaultOnRecoverableError(error) {
  5883. reportGlobalError(error);
  5884. }
  5885. function logUncaughtError(root, errorInfo) {
  5886. try {
  5887. var onUncaughtError = root.onUncaughtError;
  5888. onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack });
  5889. } catch (e$74) {
  5890. setTimeout(function () {
  5891. throw e$74;
  5892. });
  5893. }
  5894. }
  5895. function logCaughtError(root, boundary, errorInfo) {
  5896. try {
  5897. var onCaughtError = root.onCaughtError;
  5898. onCaughtError(errorInfo.value, {
  5899. componentStack: errorInfo.stack,
  5900. errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
  5901. });
  5902. } catch (e$75) {
  5903. setTimeout(function () {
  5904. throw e$75;
  5905. });
  5906. }
  5907. }
  5908. function createRootErrorUpdate(root, errorInfo, lane) {
  5909. lane = createUpdate(lane);
  5910. lane.tag = 3;
  5911. lane.payload = { element: null };
  5912. lane.callback = function () {
  5913. logUncaughtError(root, errorInfo);
  5914. };
  5915. return lane;
  5916. }
  5917. function createClassErrorUpdate(lane) {
  5918. lane = createUpdate(lane);
  5919. lane.tag = 3;
  5920. return lane;
  5921. }
  5922. function initializeClassErrorUpdate(update, root, fiber, errorInfo) {
  5923. var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
  5924. if ("function" === typeof getDerivedStateFromError) {
  5925. var error = errorInfo.value;
  5926. update.payload = function () {
  5927. return getDerivedStateFromError(error);
  5928. };
  5929. update.callback = function () {
  5930. logCaughtError(root, fiber, errorInfo);
  5931. };
  5932. }
  5933. var inst = fiber.stateNode;
  5934. null !== inst &&
  5935. "function" === typeof inst.componentDidCatch &&
  5936. (update.callback = function () {
  5937. logCaughtError(root, fiber, errorInfo);
  5938. "function" !== typeof getDerivedStateFromError &&
  5939. (null === legacyErrorBoundariesThatAlreadyFailed
  5940. ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
  5941. : legacyErrorBoundariesThatAlreadyFailed.add(this));
  5942. var stack = errorInfo.stack;
  5943. this.componentDidCatch(errorInfo.value, {
  5944. componentStack: null !== stack ? stack : ""
  5945. });
  5946. });
  5947. }
  5948. function throwException(
  5949. root,
  5950. returnFiber,
  5951. sourceFiber,
  5952. value,
  5953. rootRenderLanes
  5954. ) {
  5955. sourceFiber.flags |= 32768;
  5956. if (
  5957. null !== value &&
  5958. "object" === typeof value &&
  5959. "function" === typeof value.then
  5960. ) {
  5961. returnFiber = sourceFiber.alternate;
  5962. null !== returnFiber &&
  5963. propagateParentContextChanges(
  5964. returnFiber,
  5965. sourceFiber,
  5966. rootRenderLanes,
  5967. !0
  5968. );
  5969. sourceFiber = suspenseHandlerStackCursor.current;
  5970. if (null !== sourceFiber) {
  5971. switch (sourceFiber.tag) {
  5972. case 31:
  5973. case 13:
  5974. return (
  5975. null === shellBoundary
  5976. ? renderDidSuspendDelayIfPossible()
  5977. : null === sourceFiber.alternate &&
  5978. 0 === workInProgressRootExitStatus &&
  5979. (workInProgressRootExitStatus = 3),
  5980. (sourceFiber.flags &= -257),
  5981. (sourceFiber.flags |= 65536),
  5982. (sourceFiber.lanes = rootRenderLanes),
  5983. value === noopSuspenseyCommitThenable
  5984. ? (sourceFiber.flags |= 16384)
  5985. : ((returnFiber = sourceFiber.updateQueue),
  5986. null === returnFiber
  5987. ? (sourceFiber.updateQueue = new Set([value]))
  5988. : returnFiber.add(value),
  5989. attachPingListener(root, value, rootRenderLanes)),
  5990. !1
  5991. );
  5992. case 22:
  5993. return (
  5994. (sourceFiber.flags |= 65536),
  5995. value === noopSuspenseyCommitThenable
  5996. ? (sourceFiber.flags |= 16384)
  5997. : ((returnFiber = sourceFiber.updateQueue),
  5998. null === returnFiber
  5999. ? ((returnFiber = {
  6000. transitions: null,
  6001. markerInstances: null,
  6002. retryQueue: new Set([value])
  6003. }),
  6004. (sourceFiber.updateQueue = returnFiber))
  6005. : ((sourceFiber = returnFiber.retryQueue),
  6006. null === sourceFiber
  6007. ? (returnFiber.retryQueue = new Set([value]))
  6008. : sourceFiber.add(value)),
  6009. attachPingListener(root, value, rootRenderLanes)),
  6010. !1
  6011. );
  6012. }
  6013. throw Error(formatProdErrorMessage(435, sourceFiber.tag));
  6014. }
  6015. attachPingListener(root, value, rootRenderLanes);
  6016. renderDidSuspendDelayIfPossible();
  6017. return !1;
  6018. }
  6019. if (isHydrating)
  6020. return (
  6021. (returnFiber = suspenseHandlerStackCursor.current),
  6022. null !== returnFiber
  6023. ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256),
  6024. (returnFiber.flags |= 65536),
  6025. (returnFiber.lanes = rootRenderLanes),
  6026. value !== HydrationMismatchException &&
  6027. ((root = Error(formatProdErrorMessage(422), { cause: value })),
  6028. queueHydrationError(createCapturedValueAtFiber(root, sourceFiber))))
  6029. : (value !== HydrationMismatchException &&
  6030. ((returnFiber = Error(formatProdErrorMessage(423), {
  6031. cause: value
  6032. })),
  6033. queueHydrationError(
  6034. createCapturedValueAtFiber(returnFiber, sourceFiber)
  6035. )),
  6036. (root = root.current.alternate),
  6037. (root.flags |= 65536),
  6038. (rootRenderLanes &= -rootRenderLanes),
  6039. (root.lanes |= rootRenderLanes),
  6040. (value = createCapturedValueAtFiber(value, sourceFiber)),
  6041. (rootRenderLanes = createRootErrorUpdate(
  6042. root.stateNode,
  6043. value,
  6044. rootRenderLanes
  6045. )),
  6046. enqueueCapturedUpdate(root, rootRenderLanes),
  6047. 4 !== workInProgressRootExitStatus &&
  6048. (workInProgressRootExitStatus = 2)),
  6049. !1
  6050. );
  6051. var wrapperError = Error(formatProdErrorMessage(520), { cause: value });
  6052. wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber);
  6053. null === workInProgressRootConcurrentErrors
  6054. ? (workInProgressRootConcurrentErrors = [wrapperError])
  6055. : workInProgressRootConcurrentErrors.push(wrapperError);
  6056. 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);
  6057. if (null === returnFiber) return !0;
  6058. value = createCapturedValueAtFiber(value, sourceFiber);
  6059. sourceFiber = returnFiber;
  6060. do {
  6061. switch (sourceFiber.tag) {
  6062. case 3:
  6063. return (
  6064. (sourceFiber.flags |= 65536),
  6065. (root = rootRenderLanes & -rootRenderLanes),
  6066. (sourceFiber.lanes |= root),
  6067. (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)),
  6068. enqueueCapturedUpdate(sourceFiber, root),
  6069. !1
  6070. );
  6071. case 1:
  6072. if (
  6073. ((returnFiber = sourceFiber.type),
  6074. (wrapperError = sourceFiber.stateNode),
  6075. 0 === (sourceFiber.flags & 128) &&
  6076. ("function" === typeof returnFiber.getDerivedStateFromError ||
  6077. (null !== wrapperError &&
  6078. "function" === typeof wrapperError.componentDidCatch &&
  6079. (null === legacyErrorBoundariesThatAlreadyFailed ||
  6080. !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError)))))
  6081. )
  6082. return (
  6083. (sourceFiber.flags |= 65536),
  6084. (rootRenderLanes &= -rootRenderLanes),
  6085. (sourceFiber.lanes |= rootRenderLanes),
  6086. (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)),
  6087. initializeClassErrorUpdate(
  6088. rootRenderLanes,
  6089. root,
  6090. sourceFiber,
  6091. value
  6092. ),
  6093. enqueueCapturedUpdate(sourceFiber, rootRenderLanes),
  6094. !1
  6095. );
  6096. }
  6097. sourceFiber = sourceFiber.return;
  6098. } while (null !== sourceFiber);
  6099. return !1;
  6100. }
  6101. var SelectiveHydrationException = Error(formatProdErrorMessage(461)),
  6102. didReceiveUpdate = !1;
  6103. function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
  6104. workInProgress.child =
  6105. null === current
  6106. ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
  6107. : reconcileChildFibers(
  6108. workInProgress,
  6109. current.child,
  6110. nextChildren,
  6111. renderLanes
  6112. );
  6113. }
  6114. function updateForwardRef(
  6115. current,
  6116. workInProgress,
  6117. Component,
  6118. nextProps,
  6119. renderLanes
  6120. ) {
  6121. Component = Component.render;
  6122. var ref = workInProgress.ref;
  6123. if ("ref" in nextProps) {
  6124. var propsWithoutRef = {};
  6125. for (var key in nextProps)
  6126. "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
  6127. } else propsWithoutRef = nextProps;
  6128. prepareToReadContext(workInProgress);
  6129. nextProps = renderWithHooks(
  6130. current,
  6131. workInProgress,
  6132. Component,
  6133. propsWithoutRef,
  6134. ref,
  6135. renderLanes
  6136. );
  6137. key = checkDidRenderIdHook();
  6138. if (null !== current && !didReceiveUpdate)
  6139. return (
  6140. bailoutHooks(current, workInProgress, renderLanes),
  6141. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  6142. );
  6143. isHydrating && key && pushMaterializedTreeId(workInProgress);
  6144. workInProgress.flags |= 1;
  6145. reconcileChildren(current, workInProgress, nextProps, renderLanes);
  6146. return workInProgress.child;
  6147. }
  6148. function updateMemoComponent(
  6149. current,
  6150. workInProgress,
  6151. Component,
  6152. nextProps,
  6153. renderLanes
  6154. ) {
  6155. if (null === current) {
  6156. var type = Component.type;
  6157. if (
  6158. "function" === typeof type &&
  6159. !shouldConstruct(type) &&
  6160. void 0 === type.defaultProps &&
  6161. null === Component.compare
  6162. )
  6163. return (
  6164. (workInProgress.tag = 15),
  6165. (workInProgress.type = type),
  6166. updateSimpleMemoComponent(
  6167. current,
  6168. workInProgress,
  6169. type,
  6170. nextProps,
  6171. renderLanes
  6172. )
  6173. );
  6174. current = createFiberFromTypeAndProps(
  6175. Component.type,
  6176. null,
  6177. nextProps,
  6178. workInProgress,
  6179. workInProgress.mode,
  6180. renderLanes
  6181. );
  6182. current.ref = workInProgress.ref;
  6183. current.return = workInProgress;
  6184. return (workInProgress.child = current);
  6185. }
  6186. type = current.child;
  6187. if (!checkScheduledUpdateOrContext(current, renderLanes)) {
  6188. var prevProps = type.memoizedProps;
  6189. Component = Component.compare;
  6190. Component = null !== Component ? Component : shallowEqual;
  6191. if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)
  6192. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
  6193. }
  6194. workInProgress.flags |= 1;
  6195. current = createWorkInProgress(type, nextProps);
  6196. current.ref = workInProgress.ref;
  6197. current.return = workInProgress;
  6198. return (workInProgress.child = current);
  6199. }
  6200. function updateSimpleMemoComponent(
  6201. current,
  6202. workInProgress,
  6203. Component,
  6204. nextProps,
  6205. renderLanes
  6206. ) {
  6207. if (null !== current) {
  6208. var prevProps = current.memoizedProps;
  6209. if (
  6210. shallowEqual(prevProps, nextProps) &&
  6211. current.ref === workInProgress.ref
  6212. )
  6213. if (
  6214. ((didReceiveUpdate = !1),
  6215. (workInProgress.pendingProps = nextProps = prevProps),
  6216. checkScheduledUpdateOrContext(current, renderLanes))
  6217. )
  6218. 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);
  6219. else
  6220. return (
  6221. (workInProgress.lanes = current.lanes),
  6222. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  6223. );
  6224. }
  6225. return updateFunctionComponent(
  6226. current,
  6227. workInProgress,
  6228. Component,
  6229. nextProps,
  6230. renderLanes
  6231. );
  6232. }
  6233. function updateOffscreenComponent(
  6234. current,
  6235. workInProgress,
  6236. renderLanes,
  6237. nextProps
  6238. ) {
  6239. var nextChildren = nextProps.children,
  6240. prevState = null !== current ? current.memoizedState : null;
  6241. null === current &&
  6242. null === workInProgress.stateNode &&
  6243. (workInProgress.stateNode = {
  6244. _visibility: 1,
  6245. _pendingMarkers: null,
  6246. _retryCache: null,
  6247. _transitions: null
  6248. });
  6249. if ("hidden" === nextProps.mode) {
  6250. if (0 !== (workInProgress.flags & 128)) {
  6251. prevState =
  6252. null !== prevState ? prevState.baseLanes | renderLanes : renderLanes;
  6253. if (null !== current) {
  6254. nextProps = workInProgress.child = current.child;
  6255. for (nextChildren = 0; null !== nextProps; )
  6256. (nextChildren =
  6257. nextChildren | nextProps.lanes | nextProps.childLanes),
  6258. (nextProps = nextProps.sibling);
  6259. nextProps = nextChildren & ~prevState;
  6260. } else (nextProps = 0), (workInProgress.child = null);
  6261. return deferHiddenOffscreenComponent(
  6262. current,
  6263. workInProgress,
  6264. prevState,
  6265. renderLanes,
  6266. nextProps
  6267. );
  6268. }
  6269. if (0 !== (renderLanes & 536870912))
  6270. (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),
  6271. null !== current &&
  6272. pushTransition(
  6273. workInProgress,
  6274. null !== prevState ? prevState.cachePool : null
  6275. ),
  6276. null !== prevState
  6277. ? pushHiddenContext(workInProgress, prevState)
  6278. : reuseHiddenContextOnStack(),
  6279. pushOffscreenSuspenseHandler(workInProgress);
  6280. else
  6281. return (
  6282. (nextProps = workInProgress.lanes = 536870912),
  6283. deferHiddenOffscreenComponent(
  6284. current,
  6285. workInProgress,
  6286. null !== prevState ? prevState.baseLanes | renderLanes : renderLanes,
  6287. renderLanes,
  6288. nextProps
  6289. )
  6290. );
  6291. } else
  6292. null !== prevState
  6293. ? (pushTransition(workInProgress, prevState.cachePool),
  6294. pushHiddenContext(workInProgress, prevState),
  6295. reuseSuspenseHandlerOnStack(workInProgress),
  6296. (workInProgress.memoizedState = null))
  6297. : (null !== current && pushTransition(workInProgress, null),
  6298. reuseHiddenContextOnStack(),
  6299. reuseSuspenseHandlerOnStack(workInProgress));
  6300. reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  6301. return workInProgress.child;
  6302. }
  6303. function bailoutOffscreenComponent(current, workInProgress) {
  6304. (null !== current && 22 === current.tag) ||
  6305. null !== workInProgress.stateNode ||
  6306. (workInProgress.stateNode = {
  6307. _visibility: 1,
  6308. _pendingMarkers: null,
  6309. _retryCache: null,
  6310. _transitions: null
  6311. });
  6312. return workInProgress.sibling;
  6313. }
  6314. function deferHiddenOffscreenComponent(
  6315. current,
  6316. workInProgress,
  6317. nextBaseLanes,
  6318. renderLanes,
  6319. remainingChildLanes
  6320. ) {
  6321. var JSCompiler_inline_result = peekCacheFromPool();
  6322. JSCompiler_inline_result =
  6323. null === JSCompiler_inline_result
  6324. ? null
  6325. : { parent: CacheContext._currentValue, pool: JSCompiler_inline_result };
  6326. workInProgress.memoizedState = {
  6327. baseLanes: nextBaseLanes,
  6328. cachePool: JSCompiler_inline_result
  6329. };
  6330. null !== current && pushTransition(workInProgress, null);
  6331. reuseHiddenContextOnStack();
  6332. pushOffscreenSuspenseHandler(workInProgress);
  6333. null !== current &&
  6334. propagateParentContextChanges(current, workInProgress, renderLanes, !0);
  6335. workInProgress.childLanes = remainingChildLanes;
  6336. return null;
  6337. }
  6338. function mountActivityChildren(workInProgress, nextProps) {
  6339. nextProps = mountWorkInProgressOffscreenFiber(
  6340. { mode: nextProps.mode, children: nextProps.children },
  6341. workInProgress.mode
  6342. );
  6343. nextProps.ref = workInProgress.ref;
  6344. workInProgress.child = nextProps;
  6345. nextProps.return = workInProgress;
  6346. return nextProps;
  6347. }
  6348. function retryActivityComponentWithoutHydrating(
  6349. current,
  6350. workInProgress,
  6351. renderLanes
  6352. ) {
  6353. reconcileChildFibers(workInProgress, current.child, null, renderLanes);
  6354. current = mountActivityChildren(workInProgress, workInProgress.pendingProps);
  6355. current.flags |= 2;
  6356. popSuspenseHandler(workInProgress);
  6357. workInProgress.memoizedState = null;
  6358. return current;
  6359. }
  6360. function updateActivityComponent(current, workInProgress, renderLanes) {
  6361. var nextProps = workInProgress.pendingProps,
  6362. didSuspend = 0 !== (workInProgress.flags & 128);
  6363. workInProgress.flags &= -129;
  6364. if (null === current) {
  6365. if (isHydrating) {
  6366. if ("hidden" === nextProps.mode)
  6367. return (
  6368. (current = mountActivityChildren(workInProgress, nextProps)),
  6369. (workInProgress.lanes = 536870912),
  6370. bailoutOffscreenComponent(null, current)
  6371. );
  6372. pushDehydratedActivitySuspenseHandler(workInProgress);
  6373. (current = nextHydratableInstance)
  6374. ? ((current = canHydrateHydrationBoundary(
  6375. current,
  6376. rootOrSingletonContext
  6377. )),
  6378. (current = null !== current && "&" === current.data ? current : null),
  6379. null !== current &&
  6380. ((workInProgress.memoizedState = {
  6381. dehydrated: current,
  6382. treeContext:
  6383. null !== treeContextProvider
  6384. ? { id: treeContextId, overflow: treeContextOverflow }
  6385. : null,
  6386. retryLane: 536870912,
  6387. hydrationErrors: null
  6388. }),
  6389. (renderLanes = createFiberFromDehydratedFragment(current)),
  6390. (renderLanes.return = workInProgress),
  6391. (workInProgress.child = renderLanes),
  6392. (hydrationParentFiber = workInProgress),
  6393. (nextHydratableInstance = null)))
  6394. : (current = null);
  6395. if (null === current) throw throwOnHydrationMismatch(workInProgress);
  6396. workInProgress.lanes = 536870912;
  6397. return null;
  6398. }
  6399. return mountActivityChildren(workInProgress, nextProps);
  6400. }
  6401. var prevState = current.memoizedState;
  6402. if (null !== prevState) {
  6403. var dehydrated = prevState.dehydrated;
  6404. pushDehydratedActivitySuspenseHandler(workInProgress);
  6405. if (didSuspend)
  6406. if (workInProgress.flags & 256)
  6407. (workInProgress.flags &= -257),
  6408. (workInProgress = retryActivityComponentWithoutHydrating(
  6409. current,
  6410. workInProgress,
  6411. renderLanes
  6412. ));
  6413. else if (null !== workInProgress.memoizedState)
  6414. (workInProgress.child = current.child),
  6415. (workInProgress.flags |= 128),
  6416. (workInProgress = null);
  6417. else throw Error(formatProdErrorMessage(558));
  6418. else if (
  6419. (didReceiveUpdate ||
  6420. propagateParentContextChanges(current, workInProgress, renderLanes, !1),
  6421. (didSuspend = 0 !== (renderLanes & current.childLanes)),
  6422. didReceiveUpdate || didSuspend)
  6423. ) {
  6424. nextProps = workInProgressRoot;
  6425. if (
  6426. null !== nextProps &&
  6427. ((dehydrated = getBumpedLaneForHydration(nextProps, renderLanes)),
  6428. 0 !== dehydrated && dehydrated !== prevState.retryLane)
  6429. )
  6430. throw (
  6431. ((prevState.retryLane = dehydrated),
  6432. enqueueConcurrentRenderForLane(current, dehydrated),
  6433. scheduleUpdateOnFiber(nextProps, current, dehydrated),
  6434. SelectiveHydrationException)
  6435. );
  6436. renderDidSuspendDelayIfPossible();
  6437. workInProgress = retryActivityComponentWithoutHydrating(
  6438. current,
  6439. workInProgress,
  6440. renderLanes
  6441. );
  6442. } else
  6443. (current = prevState.treeContext),
  6444. (nextHydratableInstance = getNextHydratable(dehydrated.nextSibling)),
  6445. (hydrationParentFiber = workInProgress),
  6446. (isHydrating = !0),
  6447. (hydrationErrors = null),
  6448. (rootOrSingletonContext = !1),
  6449. null !== current &&
  6450. restoreSuspendedTreeContext(workInProgress, current),
  6451. (workInProgress = mountActivityChildren(workInProgress, nextProps)),
  6452. (workInProgress.flags |= 4096);
  6453. return workInProgress;
  6454. }
  6455. current = createWorkInProgress(current.child, {
  6456. mode: nextProps.mode,
  6457. children: nextProps.children
  6458. });
  6459. current.ref = workInProgress.ref;
  6460. workInProgress.child = current;
  6461. current.return = workInProgress;
  6462. return current;
  6463. }
  6464. function markRef(current, workInProgress) {
  6465. var ref = workInProgress.ref;
  6466. if (null === ref)
  6467. null !== current &&
  6468. null !== current.ref &&
  6469. (workInProgress.flags |= 4194816);
  6470. else {
  6471. if ("function" !== typeof ref && "object" !== typeof ref)
  6472. throw Error(formatProdErrorMessage(284));
  6473. if (null === current || current.ref !== ref)
  6474. workInProgress.flags |= 4194816;
  6475. }
  6476. }
  6477. function updateFunctionComponent(
  6478. current,
  6479. workInProgress,
  6480. Component,
  6481. nextProps,
  6482. renderLanes
  6483. ) {
  6484. prepareToReadContext(workInProgress);
  6485. Component = renderWithHooks(
  6486. current,
  6487. workInProgress,
  6488. Component,
  6489. nextProps,
  6490. void 0,
  6491. renderLanes
  6492. );
  6493. nextProps = checkDidRenderIdHook();
  6494. if (null !== current && !didReceiveUpdate)
  6495. return (
  6496. bailoutHooks(current, workInProgress, renderLanes),
  6497. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  6498. );
  6499. isHydrating && nextProps && pushMaterializedTreeId(workInProgress);
  6500. workInProgress.flags |= 1;
  6501. reconcileChildren(current, workInProgress, Component, renderLanes);
  6502. return workInProgress.child;
  6503. }
  6504. function replayFunctionComponent(
  6505. current,
  6506. workInProgress,
  6507. nextProps,
  6508. Component,
  6509. secondArg,
  6510. renderLanes
  6511. ) {
  6512. prepareToReadContext(workInProgress);
  6513. workInProgress.updateQueue = null;
  6514. nextProps = renderWithHooksAgain(
  6515. workInProgress,
  6516. Component,
  6517. nextProps,
  6518. secondArg
  6519. );
  6520. finishRenderingHooks(current);
  6521. Component = checkDidRenderIdHook();
  6522. if (null !== current && !didReceiveUpdate)
  6523. return (
  6524. bailoutHooks(current, workInProgress, renderLanes),
  6525. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  6526. );
  6527. isHydrating && Component && pushMaterializedTreeId(workInProgress);
  6528. workInProgress.flags |= 1;
  6529. reconcileChildren(current, workInProgress, nextProps, renderLanes);
  6530. return workInProgress.child;
  6531. }
  6532. function updateClassComponent(
  6533. current,
  6534. workInProgress,
  6535. Component,
  6536. nextProps,
  6537. renderLanes
  6538. ) {
  6539. prepareToReadContext(workInProgress);
  6540. if (null === workInProgress.stateNode) {
  6541. var context = emptyContextObject,
  6542. contextType = Component.contextType;
  6543. "object" === typeof contextType &&
  6544. null !== contextType &&
  6545. (context = readContext(contextType));
  6546. context = new Component(nextProps, context);
  6547. workInProgress.memoizedState =
  6548. null !== context.state && void 0 !== context.state ? context.state : null;
  6549. context.updater = classComponentUpdater;
  6550. workInProgress.stateNode = context;
  6551. context._reactInternals = workInProgress;
  6552. context = workInProgress.stateNode;
  6553. context.props = nextProps;
  6554. context.state = workInProgress.memoizedState;
  6555. context.refs = {};
  6556. initializeUpdateQueue(workInProgress);
  6557. contextType = Component.contextType;
  6558. context.context =
  6559. "object" === typeof contextType && null !== contextType
  6560. ? readContext(contextType)
  6561. : emptyContextObject;
  6562. context.state = workInProgress.memoizedState;
  6563. contextType = Component.getDerivedStateFromProps;
  6564. "function" === typeof contextType &&
  6565. (applyDerivedStateFromProps(
  6566. workInProgress,
  6567. Component,
  6568. contextType,
  6569. nextProps
  6570. ),
  6571. (context.state = workInProgress.memoizedState));
  6572. "function" === typeof Component.getDerivedStateFromProps ||
  6573. "function" === typeof context.getSnapshotBeforeUpdate ||
  6574. ("function" !== typeof context.UNSAFE_componentWillMount &&
  6575. "function" !== typeof context.componentWillMount) ||
  6576. ((contextType = context.state),
  6577. "function" === typeof context.componentWillMount &&
  6578. context.componentWillMount(),
  6579. "function" === typeof context.UNSAFE_componentWillMount &&
  6580. context.UNSAFE_componentWillMount(),
  6581. contextType !== context.state &&
  6582. classComponentUpdater.enqueueReplaceState(context, context.state, null),
  6583. processUpdateQueue(workInProgress, nextProps, context, renderLanes),
  6584. suspendIfUpdateReadFromEntangledAsyncAction(),
  6585. (context.state = workInProgress.memoizedState));
  6586. "function" === typeof context.componentDidMount &&
  6587. (workInProgress.flags |= 4194308);
  6588. nextProps = !0;
  6589. } else if (null === current) {
  6590. context = workInProgress.stateNode;
  6591. var unresolvedOldProps = workInProgress.memoizedProps,
  6592. oldProps = resolveClassComponentProps(Component, unresolvedOldProps);
  6593. context.props = oldProps;
  6594. var oldContext = context.context,
  6595. contextType$jscomp$0 = Component.contextType;
  6596. contextType = emptyContextObject;
  6597. "object" === typeof contextType$jscomp$0 &&
  6598. null !== contextType$jscomp$0 &&
  6599. (contextType = readContext(contextType$jscomp$0));
  6600. var getDerivedStateFromProps = Component.getDerivedStateFromProps;
  6601. contextType$jscomp$0 =
  6602. "function" === typeof getDerivedStateFromProps ||
  6603. "function" === typeof context.getSnapshotBeforeUpdate;
  6604. unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps;
  6605. contextType$jscomp$0 ||
  6606. ("function" !== typeof context.UNSAFE_componentWillReceiveProps &&
  6607. "function" !== typeof context.componentWillReceiveProps) ||
  6608. ((unresolvedOldProps || oldContext !== contextType) &&
  6609. callComponentWillReceiveProps(
  6610. workInProgress,
  6611. context,
  6612. nextProps,
  6613. contextType
  6614. ));
  6615. hasForceUpdate = !1;
  6616. var oldState = workInProgress.memoizedState;
  6617. context.state = oldState;
  6618. processUpdateQueue(workInProgress, nextProps, context, renderLanes);
  6619. suspendIfUpdateReadFromEntangledAsyncAction();
  6620. oldContext = workInProgress.memoizedState;
  6621. unresolvedOldProps || oldState !== oldContext || hasForceUpdate
  6622. ? ("function" === typeof getDerivedStateFromProps &&
  6623. (applyDerivedStateFromProps(
  6624. workInProgress,
  6625. Component,
  6626. getDerivedStateFromProps,
  6627. nextProps
  6628. ),
  6629. (oldContext = workInProgress.memoizedState)),
  6630. (oldProps =
  6631. hasForceUpdate ||
  6632. checkShouldComponentUpdate(
  6633. workInProgress,
  6634. Component,
  6635. oldProps,
  6636. nextProps,
  6637. oldState,
  6638. oldContext,
  6639. contextType
  6640. ))
  6641. ? (contextType$jscomp$0 ||
  6642. ("function" !== typeof context.UNSAFE_componentWillMount &&
  6643. "function" !== typeof context.componentWillMount) ||
  6644. ("function" === typeof context.componentWillMount &&
  6645. context.componentWillMount(),
  6646. "function" === typeof context.UNSAFE_componentWillMount &&
  6647. context.UNSAFE_componentWillMount()),
  6648. "function" === typeof context.componentDidMount &&
  6649. (workInProgress.flags |= 4194308))
  6650. : ("function" === typeof context.componentDidMount &&
  6651. (workInProgress.flags |= 4194308),
  6652. (workInProgress.memoizedProps = nextProps),
  6653. (workInProgress.memoizedState = oldContext)),
  6654. (context.props = nextProps),
  6655. (context.state = oldContext),
  6656. (context.context = contextType),
  6657. (nextProps = oldProps))
  6658. : ("function" === typeof context.componentDidMount &&
  6659. (workInProgress.flags |= 4194308),
  6660. (nextProps = !1));
  6661. } else {
  6662. context = workInProgress.stateNode;
  6663. cloneUpdateQueue(current, workInProgress);
  6664. contextType = workInProgress.memoizedProps;
  6665. contextType$jscomp$0 = resolveClassComponentProps(Component, contextType);
  6666. context.props = contextType$jscomp$0;
  6667. getDerivedStateFromProps = workInProgress.pendingProps;
  6668. oldState = context.context;
  6669. oldContext = Component.contextType;
  6670. oldProps = emptyContextObject;
  6671. "object" === typeof oldContext &&
  6672. null !== oldContext &&
  6673. (oldProps = readContext(oldContext));
  6674. unresolvedOldProps = Component.getDerivedStateFromProps;
  6675. (oldContext =
  6676. "function" === typeof unresolvedOldProps ||
  6677. "function" === typeof context.getSnapshotBeforeUpdate) ||
  6678. ("function" !== typeof context.UNSAFE_componentWillReceiveProps &&
  6679. "function" !== typeof context.componentWillReceiveProps) ||
  6680. ((contextType !== getDerivedStateFromProps || oldState !== oldProps) &&
  6681. callComponentWillReceiveProps(
  6682. workInProgress,
  6683. context,
  6684. nextProps,
  6685. oldProps
  6686. ));
  6687. hasForceUpdate = !1;
  6688. oldState = workInProgress.memoizedState;
  6689. context.state = oldState;
  6690. processUpdateQueue(workInProgress, nextProps, context, renderLanes);
  6691. suspendIfUpdateReadFromEntangledAsyncAction();
  6692. var newState = workInProgress.memoizedState;
  6693. contextType !== getDerivedStateFromProps ||
  6694. oldState !== newState ||
  6695. hasForceUpdate ||
  6696. (null !== current &&
  6697. null !== current.dependencies &&
  6698. checkIfContextChanged(current.dependencies))
  6699. ? ("function" === typeof unresolvedOldProps &&
  6700. (applyDerivedStateFromProps(
  6701. workInProgress,
  6702. Component,
  6703. unresolvedOldProps,
  6704. nextProps
  6705. ),
  6706. (newState = workInProgress.memoizedState)),
  6707. (contextType$jscomp$0 =
  6708. hasForceUpdate ||
  6709. checkShouldComponentUpdate(
  6710. workInProgress,
  6711. Component,
  6712. contextType$jscomp$0,
  6713. nextProps,
  6714. oldState,
  6715. newState,
  6716. oldProps
  6717. ) ||
  6718. (null !== current &&
  6719. null !== current.dependencies &&
  6720. checkIfContextChanged(current.dependencies)))
  6721. ? (oldContext ||
  6722. ("function" !== typeof context.UNSAFE_componentWillUpdate &&
  6723. "function" !== typeof context.componentWillUpdate) ||
  6724. ("function" === typeof context.componentWillUpdate &&
  6725. context.componentWillUpdate(nextProps, newState, oldProps),
  6726. "function" === typeof context.UNSAFE_componentWillUpdate &&
  6727. context.UNSAFE_componentWillUpdate(
  6728. nextProps,
  6729. newState,
  6730. oldProps
  6731. )),
  6732. "function" === typeof context.componentDidUpdate &&
  6733. (workInProgress.flags |= 4),
  6734. "function" === typeof context.getSnapshotBeforeUpdate &&
  6735. (workInProgress.flags |= 1024))
  6736. : ("function" !== typeof context.componentDidUpdate ||
  6737. (contextType === current.memoizedProps &&
  6738. oldState === current.memoizedState) ||
  6739. (workInProgress.flags |= 4),
  6740. "function" !== typeof context.getSnapshotBeforeUpdate ||
  6741. (contextType === current.memoizedProps &&
  6742. oldState === current.memoizedState) ||
  6743. (workInProgress.flags |= 1024),
  6744. (workInProgress.memoizedProps = nextProps),
  6745. (workInProgress.memoizedState = newState)),
  6746. (context.props = nextProps),
  6747. (context.state = newState),
  6748. (context.context = oldProps),
  6749. (nextProps = contextType$jscomp$0))
  6750. : ("function" !== typeof context.componentDidUpdate ||
  6751. (contextType === current.memoizedProps &&
  6752. oldState === current.memoizedState) ||
  6753. (workInProgress.flags |= 4),
  6754. "function" !== typeof context.getSnapshotBeforeUpdate ||
  6755. (contextType === current.memoizedProps &&
  6756. oldState === current.memoizedState) ||
  6757. (workInProgress.flags |= 1024),
  6758. (nextProps = !1));
  6759. }
  6760. context = nextProps;
  6761. markRef(current, workInProgress);
  6762. nextProps = 0 !== (workInProgress.flags & 128);
  6763. context || nextProps
  6764. ? ((context = workInProgress.stateNode),
  6765. (Component =
  6766. nextProps && "function" !== typeof Component.getDerivedStateFromError
  6767. ? null
  6768. : context.render()),
  6769. (workInProgress.flags |= 1),
  6770. null !== current && nextProps
  6771. ? ((workInProgress.child = reconcileChildFibers(
  6772. workInProgress,
  6773. current.child,
  6774. null,
  6775. renderLanes
  6776. )),
  6777. (workInProgress.child = reconcileChildFibers(
  6778. workInProgress,
  6779. null,
  6780. Component,
  6781. renderLanes
  6782. )))
  6783. : reconcileChildren(current, workInProgress, Component, renderLanes),
  6784. (workInProgress.memoizedState = context.state),
  6785. (current = workInProgress.child))
  6786. : (current = bailoutOnAlreadyFinishedWork(
  6787. current,
  6788. workInProgress,
  6789. renderLanes
  6790. ));
  6791. return current;
  6792. }
  6793. function mountHostRootWithoutHydrating(
  6794. current,
  6795. workInProgress,
  6796. nextChildren,
  6797. renderLanes
  6798. ) {
  6799. resetHydrationState();
  6800. workInProgress.flags |= 256;
  6801. reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  6802. return workInProgress.child;
  6803. }
  6804. var SUSPENDED_MARKER = {
  6805. dehydrated: null,
  6806. treeContext: null,
  6807. retryLane: 0,
  6808. hydrationErrors: null
  6809. };
  6810. function mountSuspenseOffscreenState(renderLanes) {
  6811. return { baseLanes: renderLanes, cachePool: getSuspendedCache() };
  6812. }
  6813. function getRemainingWorkInPrimaryTree(
  6814. current,
  6815. primaryTreeDidDefer,
  6816. renderLanes
  6817. ) {
  6818. current = null !== current ? current.childLanes & ~renderLanes : 0;
  6819. primaryTreeDidDefer && (current |= workInProgressDeferredLane);
  6820. return current;
  6821. }
  6822. function updateSuspenseComponent(current, workInProgress, renderLanes) {
  6823. var nextProps = workInProgress.pendingProps,
  6824. showFallback = !1,
  6825. didSuspend = 0 !== (workInProgress.flags & 128),
  6826. JSCompiler_temp;
  6827. (JSCompiler_temp = didSuspend) ||
  6828. (JSCompiler_temp =
  6829. null !== current && null === current.memoizedState
  6830. ? !1
  6831. : 0 !== (suspenseStackCursor.current & 2));
  6832. JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));
  6833. JSCompiler_temp = 0 !== (workInProgress.flags & 32);
  6834. workInProgress.flags &= -33;
  6835. if (null === current) {
  6836. if (isHydrating) {
  6837. showFallback
  6838. ? pushPrimaryTreeSuspenseHandler(workInProgress)
  6839. : reuseSuspenseHandlerOnStack(workInProgress);
  6840. (current = nextHydratableInstance)
  6841. ? ((current = canHydrateHydrationBoundary(
  6842. current,
  6843. rootOrSingletonContext
  6844. )),
  6845. (current = null !== current && "&" !== current.data ? current : null),
  6846. null !== current &&
  6847. ((workInProgress.memoizedState = {
  6848. dehydrated: current,
  6849. treeContext:
  6850. null !== treeContextProvider
  6851. ? { id: treeContextId, overflow: treeContextOverflow }
  6852. : null,
  6853. retryLane: 536870912,
  6854. hydrationErrors: null
  6855. }),
  6856. (renderLanes = createFiberFromDehydratedFragment(current)),
  6857. (renderLanes.return = workInProgress),
  6858. (workInProgress.child = renderLanes),
  6859. (hydrationParentFiber = workInProgress),
  6860. (nextHydratableInstance = null)))
  6861. : (current = null);
  6862. if (null === current) throw throwOnHydrationMismatch(workInProgress);
  6863. isSuspenseInstanceFallback(current)
  6864. ? (workInProgress.lanes = 32)
  6865. : (workInProgress.lanes = 536870912);
  6866. return null;
  6867. }
  6868. var nextPrimaryChildren = nextProps.children;
  6869. nextProps = nextProps.fallback;
  6870. if (showFallback)
  6871. return (
  6872. reuseSuspenseHandlerOnStack(workInProgress),
  6873. (showFallback = workInProgress.mode),
  6874. (nextPrimaryChildren = mountWorkInProgressOffscreenFiber(
  6875. { mode: "hidden", children: nextPrimaryChildren },
  6876. showFallback
  6877. )),
  6878. (nextProps = createFiberFromFragment(
  6879. nextProps,
  6880. showFallback,
  6881. renderLanes,
  6882. null
  6883. )),
  6884. (nextPrimaryChildren.return = workInProgress),
  6885. (nextProps.return = workInProgress),
  6886. (nextPrimaryChildren.sibling = nextProps),
  6887. (workInProgress.child = nextPrimaryChildren),
  6888. (nextProps = workInProgress.child),
  6889. (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)),
  6890. (nextProps.childLanes = getRemainingWorkInPrimaryTree(
  6891. current,
  6892. JSCompiler_temp,
  6893. renderLanes
  6894. )),
  6895. (workInProgress.memoizedState = SUSPENDED_MARKER),
  6896. bailoutOffscreenComponent(null, nextProps)
  6897. );
  6898. pushPrimaryTreeSuspenseHandler(workInProgress);
  6899. return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);
  6900. }
  6901. var prevState = current.memoizedState;
  6902. if (
  6903. null !== prevState &&
  6904. ((nextPrimaryChildren = prevState.dehydrated), null !== nextPrimaryChildren)
  6905. ) {
  6906. if (didSuspend)
  6907. workInProgress.flags & 256
  6908. ? (pushPrimaryTreeSuspenseHandler(workInProgress),
  6909. (workInProgress.flags &= -257),
  6910. (workInProgress = retrySuspenseComponentWithoutHydrating(
  6911. current,
  6912. workInProgress,
  6913. renderLanes
  6914. )))
  6915. : null !== workInProgress.memoizedState
  6916. ? (reuseSuspenseHandlerOnStack(workInProgress),
  6917. (workInProgress.child = current.child),
  6918. (workInProgress.flags |= 128),
  6919. (workInProgress = null))
  6920. : (reuseSuspenseHandlerOnStack(workInProgress),
  6921. (nextPrimaryChildren = nextProps.fallback),
  6922. (showFallback = workInProgress.mode),
  6923. (nextProps = mountWorkInProgressOffscreenFiber(
  6924. { mode: "visible", children: nextProps.children },
  6925. showFallback
  6926. )),
  6927. (nextPrimaryChildren = createFiberFromFragment(
  6928. nextPrimaryChildren,
  6929. showFallback,
  6930. renderLanes,
  6931. null
  6932. )),
  6933. (nextPrimaryChildren.flags |= 2),
  6934. (nextProps.return = workInProgress),
  6935. (nextPrimaryChildren.return = workInProgress),
  6936. (nextProps.sibling = nextPrimaryChildren),
  6937. (workInProgress.child = nextProps),
  6938. reconcileChildFibers(
  6939. workInProgress,
  6940. current.child,
  6941. null,
  6942. renderLanes
  6943. ),
  6944. (nextProps = workInProgress.child),
  6945. (nextProps.memoizedState =
  6946. mountSuspenseOffscreenState(renderLanes)),
  6947. (nextProps.childLanes = getRemainingWorkInPrimaryTree(
  6948. current,
  6949. JSCompiler_temp,
  6950. renderLanes
  6951. )),
  6952. (workInProgress.memoizedState = SUSPENDED_MARKER),
  6953. (workInProgress = bailoutOffscreenComponent(null, nextProps)));
  6954. else if (
  6955. (pushPrimaryTreeSuspenseHandler(workInProgress),
  6956. isSuspenseInstanceFallback(nextPrimaryChildren))
  6957. ) {
  6958. JSCompiler_temp =
  6959. nextPrimaryChildren.nextSibling &&
  6960. nextPrimaryChildren.nextSibling.dataset;
  6961. if (JSCompiler_temp) var digest = JSCompiler_temp.dgst;
  6962. JSCompiler_temp = digest;
  6963. nextProps = Error(formatProdErrorMessage(419));
  6964. nextProps.stack = "";
  6965. nextProps.digest = JSCompiler_temp;
  6966. queueHydrationError({ value: nextProps, source: null, stack: null });
  6967. workInProgress = retrySuspenseComponentWithoutHydrating(
  6968. current,
  6969. workInProgress,
  6970. renderLanes
  6971. );
  6972. } else if (
  6973. (didReceiveUpdate ||
  6974. propagateParentContextChanges(current, workInProgress, renderLanes, !1),
  6975. (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)),
  6976. didReceiveUpdate || JSCompiler_temp)
  6977. ) {
  6978. JSCompiler_temp = workInProgressRoot;
  6979. if (
  6980. null !== JSCompiler_temp &&
  6981. ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)),
  6982. 0 !== nextProps && nextProps !== prevState.retryLane)
  6983. )
  6984. throw (
  6985. ((prevState.retryLane = nextProps),
  6986. enqueueConcurrentRenderForLane(current, nextProps),
  6987. scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
  6988. SelectiveHydrationException)
  6989. );
  6990. isSuspenseInstancePending(nextPrimaryChildren) ||
  6991. renderDidSuspendDelayIfPossible();
  6992. workInProgress = retrySuspenseComponentWithoutHydrating(
  6993. current,
  6994. workInProgress,
  6995. renderLanes
  6996. );
  6997. } else
  6998. isSuspenseInstancePending(nextPrimaryChildren)
  6999. ? ((workInProgress.flags |= 192),
  7000. (workInProgress.child = current.child),
  7001. (workInProgress = null))
  7002. : ((current = prevState.treeContext),
  7003. (nextHydratableInstance = getNextHydratable(
  7004. nextPrimaryChildren.nextSibling
  7005. )),
  7006. (hydrationParentFiber = workInProgress),
  7007. (isHydrating = !0),
  7008. (hydrationErrors = null),
  7009. (rootOrSingletonContext = !1),
  7010. null !== current &&
  7011. restoreSuspendedTreeContext(workInProgress, current),
  7012. (workInProgress = mountSuspensePrimaryChildren(
  7013. workInProgress,
  7014. nextProps.children
  7015. )),
  7016. (workInProgress.flags |= 4096));
  7017. return workInProgress;
  7018. }
  7019. if (showFallback)
  7020. return (
  7021. reuseSuspenseHandlerOnStack(workInProgress),
  7022. (nextPrimaryChildren = nextProps.fallback),
  7023. (showFallback = workInProgress.mode),
  7024. (prevState = current.child),
  7025. (digest = prevState.sibling),
  7026. (nextProps = createWorkInProgress(prevState, {
  7027. mode: "hidden",
  7028. children: nextProps.children
  7029. })),
  7030. (nextProps.subtreeFlags = prevState.subtreeFlags & 65011712),
  7031. null !== digest
  7032. ? (nextPrimaryChildren = createWorkInProgress(
  7033. digest,
  7034. nextPrimaryChildren
  7035. ))
  7036. : ((nextPrimaryChildren = createFiberFromFragment(
  7037. nextPrimaryChildren,
  7038. showFallback,
  7039. renderLanes,
  7040. null
  7041. )),
  7042. (nextPrimaryChildren.flags |= 2)),
  7043. (nextPrimaryChildren.return = workInProgress),
  7044. (nextProps.return = workInProgress),
  7045. (nextProps.sibling = nextPrimaryChildren),
  7046. (workInProgress.child = nextProps),
  7047. bailoutOffscreenComponent(null, nextProps),
  7048. (nextProps = workInProgress.child),
  7049. (nextPrimaryChildren = current.child.memoizedState),
  7050. null === nextPrimaryChildren
  7051. ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))
  7052. : ((showFallback = nextPrimaryChildren.cachePool),
  7053. null !== showFallback
  7054. ? ((prevState = CacheContext._currentValue),
  7055. (showFallback =
  7056. showFallback.parent !== prevState
  7057. ? { parent: prevState, pool: prevState }
  7058. : showFallback))
  7059. : (showFallback = getSuspendedCache()),
  7060. (nextPrimaryChildren = {
  7061. baseLanes: nextPrimaryChildren.baseLanes | renderLanes,
  7062. cachePool: showFallback
  7063. })),
  7064. (nextProps.memoizedState = nextPrimaryChildren),
  7065. (nextProps.childLanes = getRemainingWorkInPrimaryTree(
  7066. current,
  7067. JSCompiler_temp,
  7068. renderLanes
  7069. )),
  7070. (workInProgress.memoizedState = SUSPENDED_MARKER),
  7071. bailoutOffscreenComponent(current.child, nextProps)
  7072. );
  7073. pushPrimaryTreeSuspenseHandler(workInProgress);
  7074. renderLanes = current.child;
  7075. current = renderLanes.sibling;
  7076. renderLanes = createWorkInProgress(renderLanes, {
  7077. mode: "visible",
  7078. children: nextProps.children
  7079. });
  7080. renderLanes.return = workInProgress;
  7081. renderLanes.sibling = null;
  7082. null !== current &&
  7083. ((JSCompiler_temp = workInProgress.deletions),
  7084. null === JSCompiler_temp
  7085. ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))
  7086. : JSCompiler_temp.push(current));
  7087. workInProgress.child = renderLanes;
  7088. workInProgress.memoizedState = null;
  7089. return renderLanes;
  7090. }
  7091. function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {
  7092. primaryChildren = mountWorkInProgressOffscreenFiber(
  7093. { mode: "visible", children: primaryChildren },
  7094. workInProgress.mode
  7095. );
  7096. primaryChildren.return = workInProgress;
  7097. return (workInProgress.child = primaryChildren);
  7098. }
  7099. function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
  7100. offscreenProps = createFiberImplClass(22, offscreenProps, null, mode);
  7101. offscreenProps.lanes = 0;
  7102. return offscreenProps;
  7103. }
  7104. function retrySuspenseComponentWithoutHydrating(
  7105. current,
  7106. workInProgress,
  7107. renderLanes
  7108. ) {
  7109. reconcileChildFibers(workInProgress, current.child, null, renderLanes);
  7110. current = mountSuspensePrimaryChildren(
  7111. workInProgress,
  7112. workInProgress.pendingProps.children
  7113. );
  7114. current.flags |= 2;
  7115. workInProgress.memoizedState = null;
  7116. return current;
  7117. }
  7118. function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
  7119. fiber.lanes |= renderLanes;
  7120. var alternate = fiber.alternate;
  7121. null !== alternate && (alternate.lanes |= renderLanes);
  7122. scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);
  7123. }
  7124. function initSuspenseListRenderState(
  7125. workInProgress,
  7126. isBackwards,
  7127. tail,
  7128. lastContentRow,
  7129. tailMode,
  7130. treeForkCount
  7131. ) {
  7132. var renderState = workInProgress.memoizedState;
  7133. null === renderState
  7134. ? (workInProgress.memoizedState = {
  7135. isBackwards: isBackwards,
  7136. rendering: null,
  7137. renderingStartTime: 0,
  7138. last: lastContentRow,
  7139. tail: tail,
  7140. tailMode: tailMode,
  7141. treeForkCount: treeForkCount
  7142. })
  7143. : ((renderState.isBackwards = isBackwards),
  7144. (renderState.rendering = null),
  7145. (renderState.renderingStartTime = 0),
  7146. (renderState.last = lastContentRow),
  7147. (renderState.tail = tail),
  7148. (renderState.tailMode = tailMode),
  7149. (renderState.treeForkCount = treeForkCount));
  7150. }
  7151. function updateSuspenseListComponent(current, workInProgress, renderLanes) {
  7152. var nextProps = workInProgress.pendingProps,
  7153. revealOrder = nextProps.revealOrder,
  7154. tailMode = nextProps.tail;
  7155. nextProps = nextProps.children;
  7156. var suspenseContext = suspenseStackCursor.current,
  7157. shouldForceFallback = 0 !== (suspenseContext & 2);
  7158. shouldForceFallback
  7159. ? ((suspenseContext = (suspenseContext & 1) | 2),
  7160. (workInProgress.flags |= 128))
  7161. : (suspenseContext &= 1);
  7162. push(suspenseStackCursor, suspenseContext);
  7163. reconcileChildren(current, workInProgress, nextProps, renderLanes);
  7164. nextProps = isHydrating ? treeForkCount : 0;
  7165. if (!shouldForceFallback && null !== current && 0 !== (current.flags & 128))
  7166. a: for (current = workInProgress.child; null !== current; ) {
  7167. if (13 === current.tag)
  7168. null !== current.memoizedState &&
  7169. scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
  7170. else if (19 === current.tag)
  7171. scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
  7172. else if (null !== current.child) {
  7173. current.child.return = current;
  7174. current = current.child;
  7175. continue;
  7176. }
  7177. if (current === workInProgress) break a;
  7178. for (; null === current.sibling; ) {
  7179. if (null === current.return || current.return === workInProgress)
  7180. break a;
  7181. current = current.return;
  7182. }
  7183. current.sibling.return = current.return;
  7184. current = current.sibling;
  7185. }
  7186. switch (revealOrder) {
  7187. case "forwards":
  7188. renderLanes = workInProgress.child;
  7189. for (revealOrder = null; null !== renderLanes; )
  7190. (current = renderLanes.alternate),
  7191. null !== current &&
  7192. null === findFirstSuspended(current) &&
  7193. (revealOrder = renderLanes),
  7194. (renderLanes = renderLanes.sibling);
  7195. renderLanes = revealOrder;
  7196. null === renderLanes
  7197. ? ((revealOrder = workInProgress.child), (workInProgress.child = null))
  7198. : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null));
  7199. initSuspenseListRenderState(
  7200. workInProgress,
  7201. !1,
  7202. revealOrder,
  7203. renderLanes,
  7204. tailMode,
  7205. nextProps
  7206. );
  7207. break;
  7208. case "backwards":
  7209. case "unstable_legacy-backwards":
  7210. renderLanes = null;
  7211. revealOrder = workInProgress.child;
  7212. for (workInProgress.child = null; null !== revealOrder; ) {
  7213. current = revealOrder.alternate;
  7214. if (null !== current && null === findFirstSuspended(current)) {
  7215. workInProgress.child = revealOrder;
  7216. break;
  7217. }
  7218. current = revealOrder.sibling;
  7219. revealOrder.sibling = renderLanes;
  7220. renderLanes = revealOrder;
  7221. revealOrder = current;
  7222. }
  7223. initSuspenseListRenderState(
  7224. workInProgress,
  7225. !0,
  7226. renderLanes,
  7227. null,
  7228. tailMode,
  7229. nextProps
  7230. );
  7231. break;
  7232. case "together":
  7233. initSuspenseListRenderState(
  7234. workInProgress,
  7235. !1,
  7236. null,
  7237. null,
  7238. void 0,
  7239. nextProps
  7240. );
  7241. break;
  7242. default:
  7243. workInProgress.memoizedState = null;
  7244. }
  7245. return workInProgress.child;
  7246. }
  7247. function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
  7248. null !== current && (workInProgress.dependencies = current.dependencies);
  7249. workInProgressRootSkippedLanes |= workInProgress.lanes;
  7250. if (0 === (renderLanes & workInProgress.childLanes))
  7251. if (null !== current) {
  7252. if (
  7253. (propagateParentContextChanges(
  7254. current,
  7255. workInProgress,
  7256. renderLanes,
  7257. !1
  7258. ),
  7259. 0 === (renderLanes & workInProgress.childLanes))
  7260. )
  7261. return null;
  7262. } else return null;
  7263. if (null !== current && workInProgress.child !== current.child)
  7264. throw Error(formatProdErrorMessage(153));
  7265. if (null !== workInProgress.child) {
  7266. current = workInProgress.child;
  7267. renderLanes = createWorkInProgress(current, current.pendingProps);
  7268. workInProgress.child = renderLanes;
  7269. for (renderLanes.return = workInProgress; null !== current.sibling; )
  7270. (current = current.sibling),
  7271. (renderLanes = renderLanes.sibling =
  7272. createWorkInProgress(current, current.pendingProps)),
  7273. (renderLanes.return = workInProgress);
  7274. renderLanes.sibling = null;
  7275. }
  7276. return workInProgress.child;
  7277. }
  7278. function checkScheduledUpdateOrContext(current, renderLanes) {
  7279. if (0 !== (current.lanes & renderLanes)) return !0;
  7280. current = current.dependencies;
  7281. return null !== current && checkIfContextChanged(current) ? !0 : !1;
  7282. }
  7283. function attemptEarlyBailoutIfNoScheduledUpdate(
  7284. current,
  7285. workInProgress,
  7286. renderLanes
  7287. ) {
  7288. switch (workInProgress.tag) {
  7289. case 3:
  7290. pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
  7291. pushProvider(workInProgress, CacheContext, current.memoizedState.cache);
  7292. resetHydrationState();
  7293. break;
  7294. case 27:
  7295. case 5:
  7296. pushHostContext(workInProgress);
  7297. break;
  7298. case 4:
  7299. pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
  7300. break;
  7301. case 10:
  7302. pushProvider(
  7303. workInProgress,
  7304. workInProgress.type,
  7305. workInProgress.memoizedProps.value
  7306. );
  7307. break;
  7308. case 31:
  7309. if (null !== workInProgress.memoizedState)
  7310. return (
  7311. (workInProgress.flags |= 128),
  7312. pushDehydratedActivitySuspenseHandler(workInProgress),
  7313. null
  7314. );
  7315. break;
  7316. case 13:
  7317. var state$102 = workInProgress.memoizedState;
  7318. if (null !== state$102) {
  7319. if (null !== state$102.dehydrated)
  7320. return (
  7321. pushPrimaryTreeSuspenseHandler(workInProgress),
  7322. (workInProgress.flags |= 128),
  7323. null
  7324. );
  7325. if (0 !== (renderLanes & workInProgress.child.childLanes))
  7326. return updateSuspenseComponent(current, workInProgress, renderLanes);
  7327. pushPrimaryTreeSuspenseHandler(workInProgress);
  7328. current = bailoutOnAlreadyFinishedWork(
  7329. current,
  7330. workInProgress,
  7331. renderLanes
  7332. );
  7333. return null !== current ? current.sibling : null;
  7334. }
  7335. pushPrimaryTreeSuspenseHandler(workInProgress);
  7336. break;
  7337. case 19:
  7338. var didSuspendBefore = 0 !== (current.flags & 128);
  7339. state$102 = 0 !== (renderLanes & workInProgress.childLanes);
  7340. state$102 ||
  7341. (propagateParentContextChanges(
  7342. current,
  7343. workInProgress,
  7344. renderLanes,
  7345. !1
  7346. ),
  7347. (state$102 = 0 !== (renderLanes & workInProgress.childLanes)));
  7348. if (didSuspendBefore) {
  7349. if (state$102)
  7350. return updateSuspenseListComponent(
  7351. current,
  7352. workInProgress,
  7353. renderLanes
  7354. );
  7355. workInProgress.flags |= 128;
  7356. }
  7357. didSuspendBefore = workInProgress.memoizedState;
  7358. null !== didSuspendBefore &&
  7359. ((didSuspendBefore.rendering = null),
  7360. (didSuspendBefore.tail = null),
  7361. (didSuspendBefore.lastEffect = null));
  7362. push(suspenseStackCursor, suspenseStackCursor.current);
  7363. if (state$102) break;
  7364. else return null;
  7365. case 22:
  7366. return (
  7367. (workInProgress.lanes = 0),
  7368. updateOffscreenComponent(
  7369. current,
  7370. workInProgress,
  7371. renderLanes,
  7372. workInProgress.pendingProps
  7373. )
  7374. );
  7375. case 24:
  7376. pushProvider(workInProgress, CacheContext, current.memoizedState.cache);
  7377. }
  7378. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
  7379. }
  7380. function beginWork(current, workInProgress, renderLanes) {
  7381. if (null !== current)
  7382. if (current.memoizedProps !== workInProgress.pendingProps)
  7383. didReceiveUpdate = !0;
  7384. else {
  7385. if (
  7386. !checkScheduledUpdateOrContext(current, renderLanes) &&
  7387. 0 === (workInProgress.flags & 128)
  7388. )
  7389. return (
  7390. (didReceiveUpdate = !1),
  7391. attemptEarlyBailoutIfNoScheduledUpdate(
  7392. current,
  7393. workInProgress,
  7394. renderLanes
  7395. )
  7396. );
  7397. didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;
  7398. }
  7399. else
  7400. (didReceiveUpdate = !1),
  7401. isHydrating &&
  7402. 0 !== (workInProgress.flags & 1048576) &&
  7403. pushTreeId(workInProgress, treeForkCount, workInProgress.index);
  7404. workInProgress.lanes = 0;
  7405. switch (workInProgress.tag) {
  7406. case 16:
  7407. a: {
  7408. var props = workInProgress.pendingProps;
  7409. current = resolveLazy(workInProgress.elementType);
  7410. workInProgress.type = current;
  7411. if ("function" === typeof current)
  7412. shouldConstruct(current)
  7413. ? ((props = resolveClassComponentProps(current, props)),
  7414. (workInProgress.tag = 1),
  7415. (workInProgress = updateClassComponent(
  7416. null,
  7417. workInProgress,
  7418. current,
  7419. props,
  7420. renderLanes
  7421. )))
  7422. : ((workInProgress.tag = 0),
  7423. (workInProgress = updateFunctionComponent(
  7424. null,
  7425. workInProgress,
  7426. current,
  7427. props,
  7428. renderLanes
  7429. )));
  7430. else {
  7431. if (void 0 !== current && null !== current) {
  7432. var $$typeof = current.$$typeof;
  7433. if ($$typeof === REACT_FORWARD_REF_TYPE) {
  7434. workInProgress.tag = 11;
  7435. workInProgress = updateForwardRef(
  7436. null,
  7437. workInProgress,
  7438. current,
  7439. props,
  7440. renderLanes
  7441. );
  7442. break a;
  7443. } else if ($$typeof === REACT_MEMO_TYPE) {
  7444. workInProgress.tag = 14;
  7445. workInProgress = updateMemoComponent(
  7446. null,
  7447. workInProgress,
  7448. current,
  7449. props,
  7450. renderLanes
  7451. );
  7452. break a;
  7453. }
  7454. }
  7455. workInProgress = getComponentNameFromType(current) || current;
  7456. throw Error(formatProdErrorMessage(306, workInProgress, ""));
  7457. }
  7458. }
  7459. return workInProgress;
  7460. case 0:
  7461. return updateFunctionComponent(
  7462. current,
  7463. workInProgress,
  7464. workInProgress.type,
  7465. workInProgress.pendingProps,
  7466. renderLanes
  7467. );
  7468. case 1:
  7469. return (
  7470. (props = workInProgress.type),
  7471. ($$typeof = resolveClassComponentProps(
  7472. props,
  7473. workInProgress.pendingProps
  7474. )),
  7475. updateClassComponent(
  7476. current,
  7477. workInProgress,
  7478. props,
  7479. $$typeof,
  7480. renderLanes
  7481. )
  7482. );
  7483. case 3:
  7484. a: {
  7485. pushHostContainer(
  7486. workInProgress,
  7487. workInProgress.stateNode.containerInfo
  7488. );
  7489. if (null === current) throw Error(formatProdErrorMessage(387));
  7490. props = workInProgress.pendingProps;
  7491. var prevState = workInProgress.memoizedState;
  7492. $$typeof = prevState.element;
  7493. cloneUpdateQueue(current, workInProgress);
  7494. processUpdateQueue(workInProgress, props, null, renderLanes);
  7495. var nextState = workInProgress.memoizedState;
  7496. props = nextState.cache;
  7497. pushProvider(workInProgress, CacheContext, props);
  7498. props !== prevState.cache &&
  7499. propagateContextChanges(
  7500. workInProgress,
  7501. [CacheContext],
  7502. renderLanes,
  7503. !0
  7504. );
  7505. suspendIfUpdateReadFromEntangledAsyncAction();
  7506. props = nextState.element;
  7507. if (prevState.isDehydrated)
  7508. if (
  7509. ((prevState = {
  7510. element: props,
  7511. isDehydrated: !1,
  7512. cache: nextState.cache
  7513. }),
  7514. (workInProgress.updateQueue.baseState = prevState),
  7515. (workInProgress.memoizedState = prevState),
  7516. workInProgress.flags & 256)
  7517. ) {
  7518. workInProgress = mountHostRootWithoutHydrating(
  7519. current,
  7520. workInProgress,
  7521. props,
  7522. renderLanes
  7523. );
  7524. break a;
  7525. } else if (props !== $$typeof) {
  7526. $$typeof = createCapturedValueAtFiber(
  7527. Error(formatProdErrorMessage(424)),
  7528. workInProgress
  7529. );
  7530. queueHydrationError($$typeof);
  7531. workInProgress = mountHostRootWithoutHydrating(
  7532. current,
  7533. workInProgress,
  7534. props,
  7535. renderLanes
  7536. );
  7537. break a;
  7538. } else {
  7539. current = workInProgress.stateNode.containerInfo;
  7540. switch (current.nodeType) {
  7541. case 9:
  7542. current = current.body;
  7543. break;
  7544. default:
  7545. current =
  7546. "HTML" === current.nodeName
  7547. ? current.ownerDocument.body
  7548. : current;
  7549. }
  7550. nextHydratableInstance = getNextHydratable(current.firstChild);
  7551. hydrationParentFiber = workInProgress;
  7552. isHydrating = !0;
  7553. hydrationErrors = null;
  7554. rootOrSingletonContext = !0;
  7555. renderLanes = mountChildFibers(
  7556. workInProgress,
  7557. null,
  7558. props,
  7559. renderLanes
  7560. );
  7561. for (workInProgress.child = renderLanes; renderLanes; )
  7562. (renderLanes.flags = (renderLanes.flags & -3) | 4096),
  7563. (renderLanes = renderLanes.sibling);
  7564. }
  7565. else {
  7566. resetHydrationState();
  7567. if (props === $$typeof) {
  7568. workInProgress = bailoutOnAlreadyFinishedWork(
  7569. current,
  7570. workInProgress,
  7571. renderLanes
  7572. );
  7573. break a;
  7574. }
  7575. reconcileChildren(current, workInProgress, props, renderLanes);
  7576. }
  7577. workInProgress = workInProgress.child;
  7578. }
  7579. return workInProgress;
  7580. case 26:
  7581. return (
  7582. markRef(current, workInProgress),
  7583. null === current
  7584. ? (renderLanes = getResource(
  7585. workInProgress.type,
  7586. null,
  7587. workInProgress.pendingProps,
  7588. null
  7589. ))
  7590. ? (workInProgress.memoizedState = renderLanes)
  7591. : isHydrating ||
  7592. ((renderLanes = workInProgress.type),
  7593. (current = workInProgress.pendingProps),
  7594. (props = getOwnerDocumentFromRootContainer(
  7595. rootInstanceStackCursor.current
  7596. ).createElement(renderLanes)),
  7597. (props[internalInstanceKey] = workInProgress),
  7598. (props[internalPropsKey] = current),
  7599. setInitialProperties(props, renderLanes, current),
  7600. markNodeAsHoistable(props),
  7601. (workInProgress.stateNode = props))
  7602. : (workInProgress.memoizedState = getResource(
  7603. workInProgress.type,
  7604. current.memoizedProps,
  7605. workInProgress.pendingProps,
  7606. current.memoizedState
  7607. )),
  7608. null
  7609. );
  7610. case 27:
  7611. return (
  7612. pushHostContext(workInProgress),
  7613. null === current &&
  7614. isHydrating &&
  7615. ((props = workInProgress.stateNode =
  7616. resolveSingletonInstance(
  7617. workInProgress.type,
  7618. workInProgress.pendingProps,
  7619. rootInstanceStackCursor.current
  7620. )),
  7621. (hydrationParentFiber = workInProgress),
  7622. (rootOrSingletonContext = !0),
  7623. ($$typeof = nextHydratableInstance),
  7624. isSingletonScope(workInProgress.type)
  7625. ? ((previousHydratableOnEnteringScopedSingleton = $$typeof),
  7626. (nextHydratableInstance = getNextHydratable(props.firstChild)))
  7627. : (nextHydratableInstance = $$typeof)),
  7628. reconcileChildren(
  7629. current,
  7630. workInProgress,
  7631. workInProgress.pendingProps.children,
  7632. renderLanes
  7633. ),
  7634. markRef(current, workInProgress),
  7635. null === current && (workInProgress.flags |= 4194304),
  7636. workInProgress.child
  7637. );
  7638. case 5:
  7639. if (null === current && isHydrating) {
  7640. if (($$typeof = props = nextHydratableInstance))
  7641. (props = canHydrateInstance(
  7642. props,
  7643. workInProgress.type,
  7644. workInProgress.pendingProps,
  7645. rootOrSingletonContext
  7646. )),
  7647. null !== props
  7648. ? ((workInProgress.stateNode = props),
  7649. (hydrationParentFiber = workInProgress),
  7650. (nextHydratableInstance = getNextHydratable(props.firstChild)),
  7651. (rootOrSingletonContext = !1),
  7652. ($$typeof = !0))
  7653. : ($$typeof = !1);
  7654. $$typeof || throwOnHydrationMismatch(workInProgress);
  7655. }
  7656. pushHostContext(workInProgress);
  7657. $$typeof = workInProgress.type;
  7658. prevState = workInProgress.pendingProps;
  7659. nextState = null !== current ? current.memoizedProps : null;
  7660. props = prevState.children;
  7661. shouldSetTextContent($$typeof, prevState)
  7662. ? (props = null)
  7663. : null !== nextState &&
  7664. shouldSetTextContent($$typeof, nextState) &&
  7665. (workInProgress.flags |= 32);
  7666. null !== workInProgress.memoizedState &&
  7667. (($$typeof = renderWithHooks(
  7668. current,
  7669. workInProgress,
  7670. TransitionAwareHostComponent,
  7671. null,
  7672. null,
  7673. renderLanes
  7674. )),
  7675. (HostTransitionContext._currentValue = $$typeof));
  7676. markRef(current, workInProgress);
  7677. reconcileChildren(current, workInProgress, props, renderLanes);
  7678. return workInProgress.child;
  7679. case 6:
  7680. if (null === current && isHydrating) {
  7681. if ((current = renderLanes = nextHydratableInstance))
  7682. (renderLanes = canHydrateTextInstance(
  7683. renderLanes,
  7684. workInProgress.pendingProps,
  7685. rootOrSingletonContext
  7686. )),
  7687. null !== renderLanes
  7688. ? ((workInProgress.stateNode = renderLanes),
  7689. (hydrationParentFiber = workInProgress),
  7690. (nextHydratableInstance = null),
  7691. (current = !0))
  7692. : (current = !1);
  7693. current || throwOnHydrationMismatch(workInProgress);
  7694. }
  7695. return null;
  7696. case 13:
  7697. return updateSuspenseComponent(current, workInProgress, renderLanes);
  7698. case 4:
  7699. return (
  7700. pushHostContainer(
  7701. workInProgress,
  7702. workInProgress.stateNode.containerInfo
  7703. ),
  7704. (props = workInProgress.pendingProps),
  7705. null === current
  7706. ? (workInProgress.child = reconcileChildFibers(
  7707. workInProgress,
  7708. null,
  7709. props,
  7710. renderLanes
  7711. ))
  7712. : reconcileChildren(current, workInProgress, props, renderLanes),
  7713. workInProgress.child
  7714. );
  7715. case 11:
  7716. return updateForwardRef(
  7717. current,
  7718. workInProgress,
  7719. workInProgress.type,
  7720. workInProgress.pendingProps,
  7721. renderLanes
  7722. );
  7723. case 7:
  7724. return (
  7725. reconcileChildren(
  7726. current,
  7727. workInProgress,
  7728. workInProgress.pendingProps,
  7729. renderLanes
  7730. ),
  7731. workInProgress.child
  7732. );
  7733. case 8:
  7734. return (
  7735. reconcileChildren(
  7736. current,
  7737. workInProgress,
  7738. workInProgress.pendingProps.children,
  7739. renderLanes
  7740. ),
  7741. workInProgress.child
  7742. );
  7743. case 12:
  7744. return (
  7745. reconcileChildren(
  7746. current,
  7747. workInProgress,
  7748. workInProgress.pendingProps.children,
  7749. renderLanes
  7750. ),
  7751. workInProgress.child
  7752. );
  7753. case 10:
  7754. return (
  7755. (props = workInProgress.pendingProps),
  7756. pushProvider(workInProgress, workInProgress.type, props.value),
  7757. reconcileChildren(current, workInProgress, props.children, renderLanes),
  7758. workInProgress.child
  7759. );
  7760. case 9:
  7761. return (
  7762. ($$typeof = workInProgress.type._context),
  7763. (props = workInProgress.pendingProps.children),
  7764. prepareToReadContext(workInProgress),
  7765. ($$typeof = readContext($$typeof)),
  7766. (props = props($$typeof)),
  7767. (workInProgress.flags |= 1),
  7768. reconcileChildren(current, workInProgress, props, renderLanes),
  7769. workInProgress.child
  7770. );
  7771. case 14:
  7772. return updateMemoComponent(
  7773. current,
  7774. workInProgress,
  7775. workInProgress.type,
  7776. workInProgress.pendingProps,
  7777. renderLanes
  7778. );
  7779. case 15:
  7780. return updateSimpleMemoComponent(
  7781. current,
  7782. workInProgress,
  7783. workInProgress.type,
  7784. workInProgress.pendingProps,
  7785. renderLanes
  7786. );
  7787. case 19:
  7788. return updateSuspenseListComponent(current, workInProgress, renderLanes);
  7789. case 31:
  7790. return updateActivityComponent(current, workInProgress, renderLanes);
  7791. case 22:
  7792. return updateOffscreenComponent(
  7793. current,
  7794. workInProgress,
  7795. renderLanes,
  7796. workInProgress.pendingProps
  7797. );
  7798. case 24:
  7799. return (
  7800. prepareToReadContext(workInProgress),
  7801. (props = readContext(CacheContext)),
  7802. null === current
  7803. ? (($$typeof = peekCacheFromPool()),
  7804. null === $$typeof &&
  7805. (($$typeof = workInProgressRoot),
  7806. (prevState = createCache()),
  7807. ($$typeof.pooledCache = prevState),
  7808. prevState.refCount++,
  7809. null !== prevState && ($$typeof.pooledCacheLanes |= renderLanes),
  7810. ($$typeof = prevState)),
  7811. (workInProgress.memoizedState = { parent: props, cache: $$typeof }),
  7812. initializeUpdateQueue(workInProgress),
  7813. pushProvider(workInProgress, CacheContext, $$typeof))
  7814. : (0 !== (current.lanes & renderLanes) &&
  7815. (cloneUpdateQueue(current, workInProgress),
  7816. processUpdateQueue(workInProgress, null, null, renderLanes),
  7817. suspendIfUpdateReadFromEntangledAsyncAction()),
  7818. ($$typeof = current.memoizedState),
  7819. (prevState = workInProgress.memoizedState),
  7820. $$typeof.parent !== props
  7821. ? (($$typeof = { parent: props, cache: props }),
  7822. (workInProgress.memoizedState = $$typeof),
  7823. 0 === workInProgress.lanes &&
  7824. (workInProgress.memoizedState =
  7825. workInProgress.updateQueue.baseState =
  7826. $$typeof),
  7827. pushProvider(workInProgress, CacheContext, props))
  7828. : ((props = prevState.cache),
  7829. pushProvider(workInProgress, CacheContext, props),
  7830. props !== $$typeof.cache &&
  7831. propagateContextChanges(
  7832. workInProgress,
  7833. [CacheContext],
  7834. renderLanes,
  7835. !0
  7836. ))),
  7837. reconcileChildren(
  7838. current,
  7839. workInProgress,
  7840. workInProgress.pendingProps.children,
  7841. renderLanes
  7842. ),
  7843. workInProgress.child
  7844. );
  7845. case 29:
  7846. throw workInProgress.pendingProps;
  7847. }
  7848. throw Error(formatProdErrorMessage(156, workInProgress.tag));
  7849. }
  7850. function markUpdate(workInProgress) {
  7851. workInProgress.flags |= 4;
  7852. }
  7853. function preloadInstanceAndSuspendIfNeeded(
  7854. workInProgress,
  7855. type,
  7856. oldProps,
  7857. newProps,
  7858. renderLanes
  7859. ) {
  7860. if ((type = 0 !== (workInProgress.mode & 32))) type = !1;
  7861. if (type) {
  7862. if (
  7863. ((workInProgress.flags |= 16777216),
  7864. (renderLanes & 335544128) === renderLanes)
  7865. )
  7866. if (workInProgress.stateNode.complete) workInProgress.flags |= 8192;
  7867. else if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;
  7868. else
  7869. throw (
  7870. ((suspendedThenable = noopSuspenseyCommitThenable),
  7871. SuspenseyCommitException)
  7872. );
  7873. } else workInProgress.flags &= -16777217;
  7874. }
  7875. function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
  7876. if ("stylesheet" !== resource.type || 0 !== (resource.state.loading & 4))
  7877. workInProgress.flags &= -16777217;
  7878. else if (((workInProgress.flags |= 16777216), !preloadResource(resource)))
  7879. if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;
  7880. else
  7881. throw (
  7882. ((suspendedThenable = noopSuspenseyCommitThenable),
  7883. SuspenseyCommitException)
  7884. );
  7885. }
  7886. function scheduleRetryEffect(workInProgress, retryQueue) {
  7887. null !== retryQueue && (workInProgress.flags |= 4);
  7888. workInProgress.flags & 16384 &&
  7889. ((retryQueue =
  7890. 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),
  7891. (workInProgress.lanes |= retryQueue),
  7892. (workInProgressSuspendedRetryLanes |= retryQueue));
  7893. }
  7894. function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  7895. if (!isHydrating)
  7896. switch (renderState.tailMode) {
  7897. case "hidden":
  7898. hasRenderedATailFallback = renderState.tail;
  7899. for (var lastTailNode = null; null !== hasRenderedATailFallback; )
  7900. null !== hasRenderedATailFallback.alternate &&
  7901. (lastTailNode = hasRenderedATailFallback),
  7902. (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
  7903. null === lastTailNode
  7904. ? (renderState.tail = null)
  7905. : (lastTailNode.sibling = null);
  7906. break;
  7907. case "collapsed":
  7908. lastTailNode = renderState.tail;
  7909. for (var lastTailNode$106 = null; null !== lastTailNode; )
  7910. null !== lastTailNode.alternate && (lastTailNode$106 = lastTailNode),
  7911. (lastTailNode = lastTailNode.sibling);
  7912. null === lastTailNode$106
  7913. ? hasRenderedATailFallback || null === renderState.tail
  7914. ? (renderState.tail = null)
  7915. : (renderState.tail.sibling = null)
  7916. : (lastTailNode$106.sibling = null);
  7917. }
  7918. }
  7919. function bubbleProperties(completedWork) {
  7920. var didBailout =
  7921. null !== completedWork.alternate &&
  7922. completedWork.alternate.child === completedWork.child,
  7923. newChildLanes = 0,
  7924. subtreeFlags = 0;
  7925. if (didBailout)
  7926. for (var child$107 = completedWork.child; null !== child$107; )
  7927. (newChildLanes |= child$107.lanes | child$107.childLanes),
  7928. (subtreeFlags |= child$107.subtreeFlags & 65011712),
  7929. (subtreeFlags |= child$107.flags & 65011712),
  7930. (child$107.return = completedWork),
  7931. (child$107 = child$107.sibling);
  7932. else
  7933. for (child$107 = completedWork.child; null !== child$107; )
  7934. (newChildLanes |= child$107.lanes | child$107.childLanes),
  7935. (subtreeFlags |= child$107.subtreeFlags),
  7936. (subtreeFlags |= child$107.flags),
  7937. (child$107.return = completedWork),
  7938. (child$107 = child$107.sibling);
  7939. completedWork.subtreeFlags |= subtreeFlags;
  7940. completedWork.childLanes = newChildLanes;
  7941. return didBailout;
  7942. }
  7943. function completeWork(current, workInProgress, renderLanes) {
  7944. var newProps = workInProgress.pendingProps;
  7945. popTreeContext(workInProgress);
  7946. switch (workInProgress.tag) {
  7947. case 16:
  7948. case 15:
  7949. case 0:
  7950. case 11:
  7951. case 7:
  7952. case 8:
  7953. case 12:
  7954. case 9:
  7955. case 14:
  7956. return bubbleProperties(workInProgress), null;
  7957. case 1:
  7958. return bubbleProperties(workInProgress), null;
  7959. case 3:
  7960. renderLanes = workInProgress.stateNode;
  7961. newProps = null;
  7962. null !== current && (newProps = current.memoizedState.cache);
  7963. workInProgress.memoizedState.cache !== newProps &&
  7964. (workInProgress.flags |= 2048);
  7965. popProvider(CacheContext);
  7966. popHostContainer();
  7967. renderLanes.pendingContext &&
  7968. ((renderLanes.context = renderLanes.pendingContext),
  7969. (renderLanes.pendingContext = null));
  7970. if (null === current || null === current.child)
  7971. popHydrationState(workInProgress)
  7972. ? markUpdate(workInProgress)
  7973. : null === current ||
  7974. (current.memoizedState.isDehydrated &&
  7975. 0 === (workInProgress.flags & 256)) ||
  7976. ((workInProgress.flags |= 1024),
  7977. upgradeHydrationErrorsToRecoverable());
  7978. bubbleProperties(workInProgress);
  7979. return null;
  7980. case 26:
  7981. var type = workInProgress.type,
  7982. nextResource = workInProgress.memoizedState;
  7983. null === current
  7984. ? (markUpdate(workInProgress),
  7985. null !== nextResource
  7986. ? (bubbleProperties(workInProgress),
  7987. preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))
  7988. : (bubbleProperties(workInProgress),
  7989. preloadInstanceAndSuspendIfNeeded(
  7990. workInProgress,
  7991. type,
  7992. null,
  7993. newProps,
  7994. renderLanes
  7995. )))
  7996. : nextResource
  7997. ? nextResource !== current.memoizedState
  7998. ? (markUpdate(workInProgress),
  7999. bubbleProperties(workInProgress),
  8000. preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))
  8001. : (bubbleProperties(workInProgress),
  8002. (workInProgress.flags &= -16777217))
  8003. : ((current = current.memoizedProps),
  8004. current !== newProps && markUpdate(workInProgress),
  8005. bubbleProperties(workInProgress),
  8006. preloadInstanceAndSuspendIfNeeded(
  8007. workInProgress,
  8008. type,
  8009. current,
  8010. newProps,
  8011. renderLanes
  8012. ));
  8013. return null;
  8014. case 27:
  8015. popHostContext(workInProgress);
  8016. renderLanes = rootInstanceStackCursor.current;
  8017. type = workInProgress.type;
  8018. if (null !== current && null != workInProgress.stateNode)
  8019. current.memoizedProps !== newProps && markUpdate(workInProgress);
  8020. else {
  8021. if (!newProps) {
  8022. if (null === workInProgress.stateNode)
  8023. throw Error(formatProdErrorMessage(166));
  8024. bubbleProperties(workInProgress);
  8025. return null;
  8026. }
  8027. current = contextStackCursor.current;
  8028. popHydrationState(workInProgress)
  8029. ? prepareToHydrateHostInstance(workInProgress, current)
  8030. : ((current = resolveSingletonInstance(type, newProps, renderLanes)),
  8031. (workInProgress.stateNode = current),
  8032. markUpdate(workInProgress));
  8033. }
  8034. bubbleProperties(workInProgress);
  8035. return null;
  8036. case 5:
  8037. popHostContext(workInProgress);
  8038. type = workInProgress.type;
  8039. if (null !== current && null != workInProgress.stateNode)
  8040. current.memoizedProps !== newProps && markUpdate(workInProgress);
  8041. else {
  8042. if (!newProps) {
  8043. if (null === workInProgress.stateNode)
  8044. throw Error(formatProdErrorMessage(166));
  8045. bubbleProperties(workInProgress);
  8046. return null;
  8047. }
  8048. nextResource = contextStackCursor.current;
  8049. if (popHydrationState(workInProgress))
  8050. prepareToHydrateHostInstance(workInProgress, nextResource);
  8051. else {
  8052. var ownerDocument = getOwnerDocumentFromRootContainer(
  8053. rootInstanceStackCursor.current
  8054. );
  8055. switch (nextResource) {
  8056. case 1:
  8057. nextResource = ownerDocument.createElementNS(
  8058. "http://www.w3.org/2000/svg",
  8059. type
  8060. );
  8061. break;
  8062. case 2:
  8063. nextResource = ownerDocument.createElementNS(
  8064. "http://www.w3.org/1998/Math/MathML",
  8065. type
  8066. );
  8067. break;
  8068. default:
  8069. switch (type) {
  8070. case "svg":
  8071. nextResource = ownerDocument.createElementNS(
  8072. "http://www.w3.org/2000/svg",
  8073. type
  8074. );
  8075. break;
  8076. case "math":
  8077. nextResource = ownerDocument.createElementNS(
  8078. "http://www.w3.org/1998/Math/MathML",
  8079. type
  8080. );
  8081. break;
  8082. case "script":
  8083. nextResource = ownerDocument.createElement("div");
  8084. nextResource.innerHTML = "<script>\x3c/script>";
  8085. nextResource = nextResource.removeChild(
  8086. nextResource.firstChild
  8087. );
  8088. break;
  8089. case "select":
  8090. nextResource =
  8091. "string" === typeof newProps.is
  8092. ? ownerDocument.createElement("select", {
  8093. is: newProps.is
  8094. })
  8095. : ownerDocument.createElement("select");
  8096. newProps.multiple
  8097. ? (nextResource.multiple = !0)
  8098. : newProps.size && (nextResource.size = newProps.size);
  8099. break;
  8100. default:
  8101. nextResource =
  8102. "string" === typeof newProps.is
  8103. ? ownerDocument.createElement(type, { is: newProps.is })
  8104. : ownerDocument.createElement(type);
  8105. }
  8106. }
  8107. nextResource[internalInstanceKey] = workInProgress;
  8108. nextResource[internalPropsKey] = newProps;
  8109. a: for (
  8110. ownerDocument = workInProgress.child;
  8111. null !== ownerDocument;
  8112. ) {
  8113. if (5 === ownerDocument.tag || 6 === ownerDocument.tag)
  8114. nextResource.appendChild(ownerDocument.stateNode);
  8115. else if (
  8116. 4 !== ownerDocument.tag &&
  8117. 27 !== ownerDocument.tag &&
  8118. null !== ownerDocument.child
  8119. ) {
  8120. ownerDocument.child.return = ownerDocument;
  8121. ownerDocument = ownerDocument.child;
  8122. continue;
  8123. }
  8124. if (ownerDocument === workInProgress) break a;
  8125. for (; null === ownerDocument.sibling; ) {
  8126. if (
  8127. null === ownerDocument.return ||
  8128. ownerDocument.return === workInProgress
  8129. )
  8130. break a;
  8131. ownerDocument = ownerDocument.return;
  8132. }
  8133. ownerDocument.sibling.return = ownerDocument.return;
  8134. ownerDocument = ownerDocument.sibling;
  8135. }
  8136. workInProgress.stateNode = nextResource;
  8137. a: switch (
  8138. (setInitialProperties(nextResource, type, newProps), type)
  8139. ) {
  8140. case "button":
  8141. case "input":
  8142. case "select":
  8143. case "textarea":
  8144. newProps = !!newProps.autoFocus;
  8145. break a;
  8146. case "img":
  8147. newProps = !0;
  8148. break a;
  8149. default:
  8150. newProps = !1;
  8151. }
  8152. newProps && markUpdate(workInProgress);
  8153. }
  8154. }
  8155. bubbleProperties(workInProgress);
  8156. preloadInstanceAndSuspendIfNeeded(
  8157. workInProgress,
  8158. workInProgress.type,
  8159. null === current ? null : current.memoizedProps,
  8160. workInProgress.pendingProps,
  8161. renderLanes
  8162. );
  8163. return null;
  8164. case 6:
  8165. if (current && null != workInProgress.stateNode)
  8166. current.memoizedProps !== newProps && markUpdate(workInProgress);
  8167. else {
  8168. if ("string" !== typeof newProps && null === workInProgress.stateNode)
  8169. throw Error(formatProdErrorMessage(166));
  8170. current = rootInstanceStackCursor.current;
  8171. if (popHydrationState(workInProgress)) {
  8172. current = workInProgress.stateNode;
  8173. renderLanes = workInProgress.memoizedProps;
  8174. newProps = null;
  8175. type = hydrationParentFiber;
  8176. if (null !== type)
  8177. switch (type.tag) {
  8178. case 27:
  8179. case 5:
  8180. newProps = type.memoizedProps;
  8181. }
  8182. current[internalInstanceKey] = workInProgress;
  8183. current =
  8184. current.nodeValue === renderLanes ||
  8185. (null !== newProps && !0 === newProps.suppressHydrationWarning) ||
  8186. checkForUnmatchedText(current.nodeValue, renderLanes)
  8187. ? !0
  8188. : !1;
  8189. current || throwOnHydrationMismatch(workInProgress, !0);
  8190. } else
  8191. (current =
  8192. getOwnerDocumentFromRootContainer(current).createTextNode(
  8193. newProps
  8194. )),
  8195. (current[internalInstanceKey] = workInProgress),
  8196. (workInProgress.stateNode = current);
  8197. }
  8198. bubbleProperties(workInProgress);
  8199. return null;
  8200. case 31:
  8201. renderLanes = workInProgress.memoizedState;
  8202. if (null === current || null !== current.memoizedState) {
  8203. newProps = popHydrationState(workInProgress);
  8204. if (null !== renderLanes) {
  8205. if (null === current) {
  8206. if (!newProps) throw Error(formatProdErrorMessage(318));
  8207. current = workInProgress.memoizedState;
  8208. current = null !== current ? current.dehydrated : null;
  8209. if (!current) throw Error(formatProdErrorMessage(557));
  8210. current[internalInstanceKey] = workInProgress;
  8211. } else
  8212. resetHydrationState(),
  8213. 0 === (workInProgress.flags & 128) &&
  8214. (workInProgress.memoizedState = null),
  8215. (workInProgress.flags |= 4);
  8216. bubbleProperties(workInProgress);
  8217. current = !1;
  8218. } else
  8219. (renderLanes = upgradeHydrationErrorsToRecoverable()),
  8220. null !== current &&
  8221. null !== current.memoizedState &&
  8222. (current.memoizedState.hydrationErrors = renderLanes),
  8223. (current = !0);
  8224. if (!current) {
  8225. if (workInProgress.flags & 256)
  8226. return popSuspenseHandler(workInProgress), workInProgress;
  8227. popSuspenseHandler(workInProgress);
  8228. return null;
  8229. }
  8230. if (0 !== (workInProgress.flags & 128))
  8231. throw Error(formatProdErrorMessage(558));
  8232. }
  8233. bubbleProperties(workInProgress);
  8234. return null;
  8235. case 13:
  8236. newProps = workInProgress.memoizedState;
  8237. if (
  8238. null === current ||
  8239. (null !== current.memoizedState &&
  8240. null !== current.memoizedState.dehydrated)
  8241. ) {
  8242. type = popHydrationState(workInProgress);
  8243. if (null !== newProps && null !== newProps.dehydrated) {
  8244. if (null === current) {
  8245. if (!type) throw Error(formatProdErrorMessage(318));
  8246. type = workInProgress.memoizedState;
  8247. type = null !== type ? type.dehydrated : null;
  8248. if (!type) throw Error(formatProdErrorMessage(317));
  8249. type[internalInstanceKey] = workInProgress;
  8250. } else
  8251. resetHydrationState(),
  8252. 0 === (workInProgress.flags & 128) &&
  8253. (workInProgress.memoizedState = null),
  8254. (workInProgress.flags |= 4);
  8255. bubbleProperties(workInProgress);
  8256. type = !1;
  8257. } else
  8258. (type = upgradeHydrationErrorsToRecoverable()),
  8259. null !== current &&
  8260. null !== current.memoizedState &&
  8261. (current.memoizedState.hydrationErrors = type),
  8262. (type = !0);
  8263. if (!type) {
  8264. if (workInProgress.flags & 256)
  8265. return popSuspenseHandler(workInProgress), workInProgress;
  8266. popSuspenseHandler(workInProgress);
  8267. return null;
  8268. }
  8269. }
  8270. popSuspenseHandler(workInProgress);
  8271. if (0 !== (workInProgress.flags & 128))
  8272. return (workInProgress.lanes = renderLanes), workInProgress;
  8273. renderLanes = null !== newProps;
  8274. current = null !== current && null !== current.memoizedState;
  8275. renderLanes &&
  8276. ((newProps = workInProgress.child),
  8277. (type = null),
  8278. null !== newProps.alternate &&
  8279. null !== newProps.alternate.memoizedState &&
  8280. null !== newProps.alternate.memoizedState.cachePool &&
  8281. (type = newProps.alternate.memoizedState.cachePool.pool),
  8282. (nextResource = null),
  8283. null !== newProps.memoizedState &&
  8284. null !== newProps.memoizedState.cachePool &&
  8285. (nextResource = newProps.memoizedState.cachePool.pool),
  8286. nextResource !== type && (newProps.flags |= 2048));
  8287. renderLanes !== current &&
  8288. renderLanes &&
  8289. (workInProgress.child.flags |= 8192);
  8290. scheduleRetryEffect(workInProgress, workInProgress.updateQueue);
  8291. bubbleProperties(workInProgress);
  8292. return null;
  8293. case 4:
  8294. return (
  8295. popHostContainer(),
  8296. null === current &&
  8297. listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),
  8298. bubbleProperties(workInProgress),
  8299. null
  8300. );
  8301. case 10:
  8302. return (
  8303. popProvider(workInProgress.type), bubbleProperties(workInProgress), null
  8304. );
  8305. case 19:
  8306. pop(suspenseStackCursor);
  8307. newProps = workInProgress.memoizedState;
  8308. if (null === newProps) return bubbleProperties(workInProgress), null;
  8309. type = 0 !== (workInProgress.flags & 128);
  8310. nextResource = newProps.rendering;
  8311. if (null === nextResource)
  8312. if (type) cutOffTailIfNeeded(newProps, !1);
  8313. else {
  8314. if (
  8315. 0 !== workInProgressRootExitStatus ||
  8316. (null !== current && 0 !== (current.flags & 128))
  8317. )
  8318. for (current = workInProgress.child; null !== current; ) {
  8319. nextResource = findFirstSuspended(current);
  8320. if (null !== nextResource) {
  8321. workInProgress.flags |= 128;
  8322. cutOffTailIfNeeded(newProps, !1);
  8323. current = nextResource.updateQueue;
  8324. workInProgress.updateQueue = current;
  8325. scheduleRetryEffect(workInProgress, current);
  8326. workInProgress.subtreeFlags = 0;
  8327. current = renderLanes;
  8328. for (renderLanes = workInProgress.child; null !== renderLanes; )
  8329. resetWorkInProgress(renderLanes, current),
  8330. (renderLanes = renderLanes.sibling);
  8331. push(
  8332. suspenseStackCursor,
  8333. (suspenseStackCursor.current & 1) | 2
  8334. );
  8335. isHydrating &&
  8336. pushTreeFork(workInProgress, newProps.treeForkCount);
  8337. return workInProgress.child;
  8338. }
  8339. current = current.sibling;
  8340. }
  8341. null !== newProps.tail &&
  8342. now() > workInProgressRootRenderTargetTime &&
  8343. ((workInProgress.flags |= 128),
  8344. (type = !0),
  8345. cutOffTailIfNeeded(newProps, !1),
  8346. (workInProgress.lanes = 4194304));
  8347. }
  8348. else {
  8349. if (!type)
  8350. if (
  8351. ((current = findFirstSuspended(nextResource)), null !== current)
  8352. ) {
  8353. if (
  8354. ((workInProgress.flags |= 128),
  8355. (type = !0),
  8356. (current = current.updateQueue),
  8357. (workInProgress.updateQueue = current),
  8358. scheduleRetryEffect(workInProgress, current),
  8359. cutOffTailIfNeeded(newProps, !0),
  8360. null === newProps.tail &&
  8361. "hidden" === newProps.tailMode &&
  8362. !nextResource.alternate &&
  8363. !isHydrating)
  8364. )
  8365. return bubbleProperties(workInProgress), null;
  8366. } else
  8367. 2 * now() - newProps.renderingStartTime >
  8368. workInProgressRootRenderTargetTime &&
  8369. 536870912 !== renderLanes &&
  8370. ((workInProgress.flags |= 128),
  8371. (type = !0),
  8372. cutOffTailIfNeeded(newProps, !1),
  8373. (workInProgress.lanes = 4194304));
  8374. newProps.isBackwards
  8375. ? ((nextResource.sibling = workInProgress.child),
  8376. (workInProgress.child = nextResource))
  8377. : ((current = newProps.last),
  8378. null !== current
  8379. ? (current.sibling = nextResource)
  8380. : (workInProgress.child = nextResource),
  8381. (newProps.last = nextResource));
  8382. }
  8383. if (null !== newProps.tail)
  8384. return (
  8385. (current = newProps.tail),
  8386. (newProps.rendering = current),
  8387. (newProps.tail = current.sibling),
  8388. (newProps.renderingStartTime = now()),
  8389. (current.sibling = null),
  8390. (renderLanes = suspenseStackCursor.current),
  8391. push(
  8392. suspenseStackCursor,
  8393. type ? (renderLanes & 1) | 2 : renderLanes & 1
  8394. ),
  8395. isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount),
  8396. current
  8397. );
  8398. bubbleProperties(workInProgress);
  8399. return null;
  8400. case 22:
  8401. case 23:
  8402. return (
  8403. popSuspenseHandler(workInProgress),
  8404. popHiddenContext(),
  8405. (newProps = null !== workInProgress.memoizedState),
  8406. null !== current
  8407. ? (null !== current.memoizedState) !== newProps &&
  8408. (workInProgress.flags |= 8192)
  8409. : newProps && (workInProgress.flags |= 8192),
  8410. newProps
  8411. ? 0 !== (renderLanes & 536870912) &&
  8412. 0 === (workInProgress.flags & 128) &&
  8413. (bubbleProperties(workInProgress),
  8414. workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))
  8415. : bubbleProperties(workInProgress),
  8416. (renderLanes = workInProgress.updateQueue),
  8417. null !== renderLanes &&
  8418. scheduleRetryEffect(workInProgress, renderLanes.retryQueue),
  8419. (renderLanes = null),
  8420. null !== current &&
  8421. null !== current.memoizedState &&
  8422. null !== current.memoizedState.cachePool &&
  8423. (renderLanes = current.memoizedState.cachePool.pool),
  8424. (newProps = null),
  8425. null !== workInProgress.memoizedState &&
  8426. null !== workInProgress.memoizedState.cachePool &&
  8427. (newProps = workInProgress.memoizedState.cachePool.pool),
  8428. newProps !== renderLanes && (workInProgress.flags |= 2048),
  8429. null !== current && pop(resumedCache),
  8430. null
  8431. );
  8432. case 24:
  8433. return (
  8434. (renderLanes = null),
  8435. null !== current && (renderLanes = current.memoizedState.cache),
  8436. workInProgress.memoizedState.cache !== renderLanes &&
  8437. (workInProgress.flags |= 2048),
  8438. popProvider(CacheContext),
  8439. bubbleProperties(workInProgress),
  8440. null
  8441. );
  8442. case 25:
  8443. return null;
  8444. case 30:
  8445. return null;
  8446. }
  8447. throw Error(formatProdErrorMessage(156, workInProgress.tag));
  8448. }
  8449. function unwindWork(current, workInProgress) {
  8450. popTreeContext(workInProgress);
  8451. switch (workInProgress.tag) {
  8452. case 1:
  8453. return (
  8454. (current = workInProgress.flags),
  8455. current & 65536
  8456. ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
  8457. : null
  8458. );
  8459. case 3:
  8460. return (
  8461. popProvider(CacheContext),
  8462. popHostContainer(),
  8463. (current = workInProgress.flags),
  8464. 0 !== (current & 65536) && 0 === (current & 128)
  8465. ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
  8466. : null
  8467. );
  8468. case 26:
  8469. case 27:
  8470. case 5:
  8471. return popHostContext(workInProgress), null;
  8472. case 31:
  8473. if (null !== workInProgress.memoizedState) {
  8474. popSuspenseHandler(workInProgress);
  8475. if (null === workInProgress.alternate)
  8476. throw Error(formatProdErrorMessage(340));
  8477. resetHydrationState();
  8478. }
  8479. current = workInProgress.flags;
  8480. return current & 65536
  8481. ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
  8482. : null;
  8483. case 13:
  8484. popSuspenseHandler(workInProgress);
  8485. current = workInProgress.memoizedState;
  8486. if (null !== current && null !== current.dehydrated) {
  8487. if (null === workInProgress.alternate)
  8488. throw Error(formatProdErrorMessage(340));
  8489. resetHydrationState();
  8490. }
  8491. current = workInProgress.flags;
  8492. return current & 65536
  8493. ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
  8494. : null;
  8495. case 19:
  8496. return pop(suspenseStackCursor), null;
  8497. case 4:
  8498. return popHostContainer(), null;
  8499. case 10:
  8500. return popProvider(workInProgress.type), null;
  8501. case 22:
  8502. case 23:
  8503. return (
  8504. popSuspenseHandler(workInProgress),
  8505. popHiddenContext(),
  8506. null !== current && pop(resumedCache),
  8507. (current = workInProgress.flags),
  8508. current & 65536
  8509. ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
  8510. : null
  8511. );
  8512. case 24:
  8513. return popProvider(CacheContext), null;
  8514. case 25:
  8515. return null;
  8516. default:
  8517. return null;
  8518. }
  8519. }
  8520. function unwindInterruptedWork(current, interruptedWork) {
  8521. popTreeContext(interruptedWork);
  8522. switch (interruptedWork.tag) {
  8523. case 3:
  8524. popProvider(CacheContext);
  8525. popHostContainer();
  8526. break;
  8527. case 26:
  8528. case 27:
  8529. case 5:
  8530. popHostContext(interruptedWork);
  8531. break;
  8532. case 4:
  8533. popHostContainer();
  8534. break;
  8535. case 31:
  8536. null !== interruptedWork.memoizedState &&
  8537. popSuspenseHandler(interruptedWork);
  8538. break;
  8539. case 13:
  8540. popSuspenseHandler(interruptedWork);
  8541. break;
  8542. case 19:
  8543. pop(suspenseStackCursor);
  8544. break;
  8545. case 10:
  8546. popProvider(interruptedWork.type);
  8547. break;
  8548. case 22:
  8549. case 23:
  8550. popSuspenseHandler(interruptedWork);
  8551. popHiddenContext();
  8552. null !== current && pop(resumedCache);
  8553. break;
  8554. case 24:
  8555. popProvider(CacheContext);
  8556. }
  8557. }
  8558. function commitHookEffectListMount(flags, finishedWork) {
  8559. try {
  8560. var updateQueue = finishedWork.updateQueue,
  8561. lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
  8562. if (null !== lastEffect) {
  8563. var firstEffect = lastEffect.next;
  8564. updateQueue = firstEffect;
  8565. do {
  8566. if ((updateQueue.tag & flags) === flags) {
  8567. lastEffect = void 0;
  8568. var create = updateQueue.create,
  8569. inst = updateQueue.inst;
  8570. lastEffect = create();
  8571. inst.destroy = lastEffect;
  8572. }
  8573. updateQueue = updateQueue.next;
  8574. } while (updateQueue !== firstEffect);
  8575. }
  8576. } catch (error) {
  8577. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  8578. }
  8579. }
  8580. function commitHookEffectListUnmount(
  8581. flags,
  8582. finishedWork,
  8583. nearestMountedAncestor$jscomp$0
  8584. ) {
  8585. try {
  8586. var updateQueue = finishedWork.updateQueue,
  8587. lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
  8588. if (null !== lastEffect) {
  8589. var firstEffect = lastEffect.next;
  8590. updateQueue = firstEffect;
  8591. do {
  8592. if ((updateQueue.tag & flags) === flags) {
  8593. var inst = updateQueue.inst,
  8594. destroy = inst.destroy;
  8595. if (void 0 !== destroy) {
  8596. inst.destroy = void 0;
  8597. lastEffect = finishedWork;
  8598. var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
  8599. destroy_ = destroy;
  8600. try {
  8601. destroy_();
  8602. } catch (error) {
  8603. captureCommitPhaseError(
  8604. lastEffect,
  8605. nearestMountedAncestor,
  8606. error
  8607. );
  8608. }
  8609. }
  8610. }
  8611. updateQueue = updateQueue.next;
  8612. } while (updateQueue !== firstEffect);
  8613. }
  8614. } catch (error) {
  8615. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  8616. }
  8617. }
  8618. function commitClassCallbacks(finishedWork) {
  8619. var updateQueue = finishedWork.updateQueue;
  8620. if (null !== updateQueue) {
  8621. var instance = finishedWork.stateNode;
  8622. try {
  8623. commitCallbacks(updateQueue, instance);
  8624. } catch (error) {
  8625. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  8626. }
  8627. }
  8628. }
  8629. function safelyCallComponentWillUnmount(
  8630. current,
  8631. nearestMountedAncestor,
  8632. instance
  8633. ) {
  8634. instance.props = resolveClassComponentProps(
  8635. current.type,
  8636. current.memoizedProps
  8637. );
  8638. instance.state = current.memoizedState;
  8639. try {
  8640. instance.componentWillUnmount();
  8641. } catch (error) {
  8642. captureCommitPhaseError(current, nearestMountedAncestor, error);
  8643. }
  8644. }
  8645. function safelyAttachRef(current, nearestMountedAncestor) {
  8646. try {
  8647. var ref = current.ref;
  8648. if (null !== ref) {
  8649. switch (current.tag) {
  8650. case 26:
  8651. case 27:
  8652. case 5:
  8653. var instanceToUse = current.stateNode;
  8654. break;
  8655. case 30:
  8656. instanceToUse = current.stateNode;
  8657. break;
  8658. default:
  8659. instanceToUse = current.stateNode;
  8660. }
  8661. "function" === typeof ref
  8662. ? (current.refCleanup = ref(instanceToUse))
  8663. : (ref.current = instanceToUse);
  8664. }
  8665. } catch (error) {
  8666. captureCommitPhaseError(current, nearestMountedAncestor, error);
  8667. }
  8668. }
  8669. function safelyDetachRef(current, nearestMountedAncestor) {
  8670. var ref = current.ref,
  8671. refCleanup = current.refCleanup;
  8672. if (null !== ref)
  8673. if ("function" === typeof refCleanup)
  8674. try {
  8675. refCleanup();
  8676. } catch (error) {
  8677. captureCommitPhaseError(current, nearestMountedAncestor, error);
  8678. } finally {
  8679. (current.refCleanup = null),
  8680. (current = current.alternate),
  8681. null != current && (current.refCleanup = null);
  8682. }
  8683. else if ("function" === typeof ref)
  8684. try {
  8685. ref(null);
  8686. } catch (error$140) {
  8687. captureCommitPhaseError(current, nearestMountedAncestor, error$140);
  8688. }
  8689. else ref.current = null;
  8690. }
  8691. function commitHostMount(finishedWork) {
  8692. var type = finishedWork.type,
  8693. props = finishedWork.memoizedProps,
  8694. instance = finishedWork.stateNode;
  8695. try {
  8696. a: switch (type) {
  8697. case "button":
  8698. case "input":
  8699. case "select":
  8700. case "textarea":
  8701. props.autoFocus && instance.focus();
  8702. break a;
  8703. case "img":
  8704. props.src
  8705. ? (instance.src = props.src)
  8706. : props.srcSet && (instance.srcset = props.srcSet);
  8707. }
  8708. } catch (error) {
  8709. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  8710. }
  8711. }
  8712. function commitHostUpdate(finishedWork, newProps, oldProps) {
  8713. try {
  8714. var domElement = finishedWork.stateNode;
  8715. updateProperties(domElement, finishedWork.type, oldProps, newProps);
  8716. domElement[internalPropsKey] = newProps;
  8717. } catch (error) {
  8718. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  8719. }
  8720. }
  8721. function isHostParent(fiber) {
  8722. return (
  8723. 5 === fiber.tag ||
  8724. 3 === fiber.tag ||
  8725. 26 === fiber.tag ||
  8726. (27 === fiber.tag && isSingletonScope(fiber.type)) ||
  8727. 4 === fiber.tag
  8728. );
  8729. }
  8730. function getHostSibling(fiber) {
  8731. a: for (;;) {
  8732. for (; null === fiber.sibling; ) {
  8733. if (null === fiber.return || isHostParent(fiber.return)) return null;
  8734. fiber = fiber.return;
  8735. }
  8736. fiber.sibling.return = fiber.return;
  8737. for (
  8738. fiber = fiber.sibling;
  8739. 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag;
  8740. ) {
  8741. if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;
  8742. if (fiber.flags & 2) continue a;
  8743. if (null === fiber.child || 4 === fiber.tag) continue a;
  8744. else (fiber.child.return = fiber), (fiber = fiber.child);
  8745. }
  8746. if (!(fiber.flags & 2)) return fiber.stateNode;
  8747. }
  8748. }
  8749. function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
  8750. var tag = node.tag;
  8751. if (5 === tag || 6 === tag)
  8752. (node = node.stateNode),
  8753. before
  8754. ? (9 === parent.nodeType
  8755. ? parent.body
  8756. : "HTML" === parent.nodeName
  8757. ? parent.ownerDocument.body
  8758. : parent
  8759. ).insertBefore(node, before)
  8760. : ((before =
  8761. 9 === parent.nodeType
  8762. ? parent.body
  8763. : "HTML" === parent.nodeName
  8764. ? parent.ownerDocument.body
  8765. : parent),
  8766. before.appendChild(node),
  8767. (parent = parent._reactRootContainer),
  8768. (null !== parent && void 0 !== parent) ||
  8769. null !== before.onclick ||
  8770. (before.onclick = noop$1));
  8771. else if (
  8772. 4 !== tag &&
  8773. (27 === tag &&
  8774. isSingletonScope(node.type) &&
  8775. ((parent = node.stateNode), (before = null)),
  8776. (node = node.child),
  8777. null !== node)
  8778. )
  8779. for (
  8780. insertOrAppendPlacementNodeIntoContainer(node, before, parent),
  8781. node = node.sibling;
  8782. null !== node;
  8783. )
  8784. insertOrAppendPlacementNodeIntoContainer(node, before, parent),
  8785. (node = node.sibling);
  8786. }
  8787. function insertOrAppendPlacementNode(node, before, parent) {
  8788. var tag = node.tag;
  8789. if (5 === tag || 6 === tag)
  8790. (node = node.stateNode),
  8791. before ? parent.insertBefore(node, before) : parent.appendChild(node);
  8792. else if (
  8793. 4 !== tag &&
  8794. (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode),
  8795. (node = node.child),
  8796. null !== node)
  8797. )
  8798. for (
  8799. insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
  8800. null !== node;
  8801. )
  8802. insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);
  8803. }
  8804. function commitHostSingletonAcquisition(finishedWork) {
  8805. var singleton = finishedWork.stateNode,
  8806. props = finishedWork.memoizedProps;
  8807. try {
  8808. for (
  8809. var type = finishedWork.type, attributes = singleton.attributes;
  8810. attributes.length;
  8811. )
  8812. singleton.removeAttributeNode(attributes[0]);
  8813. setInitialProperties(singleton, type, props);
  8814. singleton[internalInstanceKey] = finishedWork;
  8815. singleton[internalPropsKey] = props;
  8816. } catch (error) {
  8817. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  8818. }
  8819. }
  8820. var offscreenSubtreeIsHidden = !1,
  8821. offscreenSubtreeWasHidden = !1,
  8822. needsFormReset = !1,
  8823. PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
  8824. nextEffect = null;
  8825. function commitBeforeMutationEffects(root, firstChild) {
  8826. root = root.containerInfo;
  8827. eventsEnabled = _enabled;
  8828. root = getActiveElementDeep(root);
  8829. if (hasSelectionCapabilities(root)) {
  8830. if ("selectionStart" in root)
  8831. var JSCompiler_temp = {
  8832. start: root.selectionStart,
  8833. end: root.selectionEnd
  8834. };
  8835. else
  8836. a: {
  8837. JSCompiler_temp =
  8838. ((JSCompiler_temp = root.ownerDocument) &&
  8839. JSCompiler_temp.defaultView) ||
  8840. window;
  8841. var selection =
  8842. JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
  8843. if (selection && 0 !== selection.rangeCount) {
  8844. JSCompiler_temp = selection.anchorNode;
  8845. var anchorOffset = selection.anchorOffset,
  8846. focusNode = selection.focusNode;
  8847. selection = selection.focusOffset;
  8848. try {
  8849. JSCompiler_temp.nodeType, focusNode.nodeType;
  8850. } catch (e$20) {
  8851. JSCompiler_temp = null;
  8852. break a;
  8853. }
  8854. var length = 0,
  8855. start = -1,
  8856. end = -1,
  8857. indexWithinAnchor = 0,
  8858. indexWithinFocus = 0,
  8859. node = root,
  8860. parentNode = null;
  8861. b: for (;;) {
  8862. for (var next; ; ) {
  8863. node !== JSCompiler_temp ||
  8864. (0 !== anchorOffset && 3 !== node.nodeType) ||
  8865. (start = length + anchorOffset);
  8866. node !== focusNode ||
  8867. (0 !== selection && 3 !== node.nodeType) ||
  8868. (end = length + selection);
  8869. 3 === node.nodeType && (length += node.nodeValue.length);
  8870. if (null === (next = node.firstChild)) break;
  8871. parentNode = node;
  8872. node = next;
  8873. }
  8874. for (;;) {
  8875. if (node === root) break b;
  8876. parentNode === JSCompiler_temp &&
  8877. ++indexWithinAnchor === anchorOffset &&
  8878. (start = length);
  8879. parentNode === focusNode &&
  8880. ++indexWithinFocus === selection &&
  8881. (end = length);
  8882. if (null !== (next = node.nextSibling)) break;
  8883. node = parentNode;
  8884. parentNode = node.parentNode;
  8885. }
  8886. node = next;
  8887. }
  8888. JSCompiler_temp =
  8889. -1 === start || -1 === end ? null : { start: start, end: end };
  8890. } else JSCompiler_temp = null;
  8891. }
  8892. JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
  8893. } else JSCompiler_temp = null;
  8894. selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp };
  8895. _enabled = !1;
  8896. for (nextEffect = firstChild; null !== nextEffect; )
  8897. if (
  8898. ((firstChild = nextEffect),
  8899. (root = firstChild.child),
  8900. 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
  8901. )
  8902. (root.return = firstChild), (nextEffect = root);
  8903. else
  8904. for (; null !== nextEffect; ) {
  8905. firstChild = nextEffect;
  8906. focusNode = firstChild.alternate;
  8907. root = firstChild.flags;
  8908. switch (firstChild.tag) {
  8909. case 0:
  8910. if (
  8911. 0 !== (root & 4) &&
  8912. ((root = firstChild.updateQueue),
  8913. (root = null !== root ? root.events : null),
  8914. null !== root)
  8915. )
  8916. for (
  8917. JSCompiler_temp = 0;
  8918. JSCompiler_temp < root.length;
  8919. JSCompiler_temp++
  8920. )
  8921. (anchorOffset = root[JSCompiler_temp]),
  8922. (anchorOffset.ref.impl = anchorOffset.nextImpl);
  8923. break;
  8924. case 11:
  8925. case 15:
  8926. break;
  8927. case 1:
  8928. if (0 !== (root & 1024) && null !== focusNode) {
  8929. root = void 0;
  8930. JSCompiler_temp = firstChild;
  8931. anchorOffset = focusNode.memoizedProps;
  8932. focusNode = focusNode.memoizedState;
  8933. selection = JSCompiler_temp.stateNode;
  8934. try {
  8935. var resolvedPrevProps = resolveClassComponentProps(
  8936. JSCompiler_temp.type,
  8937. anchorOffset
  8938. );
  8939. root = selection.getSnapshotBeforeUpdate(
  8940. resolvedPrevProps,
  8941. focusNode
  8942. );
  8943. selection.__reactInternalSnapshotBeforeUpdate = root;
  8944. } catch (error) {
  8945. captureCommitPhaseError(
  8946. JSCompiler_temp,
  8947. JSCompiler_temp.return,
  8948. error
  8949. );
  8950. }
  8951. }
  8952. break;
  8953. case 3:
  8954. if (0 !== (root & 1024))
  8955. if (
  8956. ((root = firstChild.stateNode.containerInfo),
  8957. (JSCompiler_temp = root.nodeType),
  8958. 9 === JSCompiler_temp)
  8959. )
  8960. clearContainerSparingly(root);
  8961. else if (1 === JSCompiler_temp)
  8962. switch (root.nodeName) {
  8963. case "HEAD":
  8964. case "HTML":
  8965. case "BODY":
  8966. clearContainerSparingly(root);
  8967. break;
  8968. default:
  8969. root.textContent = "";
  8970. }
  8971. break;
  8972. case 5:
  8973. case 26:
  8974. case 27:
  8975. case 6:
  8976. case 4:
  8977. case 17:
  8978. break;
  8979. default:
  8980. if (0 !== (root & 1024)) throw Error(formatProdErrorMessage(163));
  8981. }
  8982. root = firstChild.sibling;
  8983. if (null !== root) {
  8984. root.return = firstChild.return;
  8985. nextEffect = root;
  8986. break;
  8987. }
  8988. nextEffect = firstChild.return;
  8989. }
  8990. }
  8991. function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
  8992. var flags = finishedWork.flags;
  8993. switch (finishedWork.tag) {
  8994. case 0:
  8995. case 11:
  8996. case 15:
  8997. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  8998. flags & 4 && commitHookEffectListMount(5, finishedWork);
  8999. break;
  9000. case 1:
  9001. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9002. if (flags & 4)
  9003. if (((finishedRoot = finishedWork.stateNode), null === current))
  9004. try {
  9005. finishedRoot.componentDidMount();
  9006. } catch (error) {
  9007. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9008. }
  9009. else {
  9010. var prevProps = resolveClassComponentProps(
  9011. finishedWork.type,
  9012. current.memoizedProps
  9013. );
  9014. current = current.memoizedState;
  9015. try {
  9016. finishedRoot.componentDidUpdate(
  9017. prevProps,
  9018. current,
  9019. finishedRoot.__reactInternalSnapshotBeforeUpdate
  9020. );
  9021. } catch (error$139) {
  9022. captureCommitPhaseError(
  9023. finishedWork,
  9024. finishedWork.return,
  9025. error$139
  9026. );
  9027. }
  9028. }
  9029. flags & 64 && commitClassCallbacks(finishedWork);
  9030. flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
  9031. break;
  9032. case 3:
  9033. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9034. if (
  9035. flags & 64 &&
  9036. ((finishedRoot = finishedWork.updateQueue), null !== finishedRoot)
  9037. ) {
  9038. current = null;
  9039. if (null !== finishedWork.child)
  9040. switch (finishedWork.child.tag) {
  9041. case 27:
  9042. case 5:
  9043. current = finishedWork.child.stateNode;
  9044. break;
  9045. case 1:
  9046. current = finishedWork.child.stateNode;
  9047. }
  9048. try {
  9049. commitCallbacks(finishedRoot, current);
  9050. } catch (error) {
  9051. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9052. }
  9053. }
  9054. break;
  9055. case 27:
  9056. null === current &&
  9057. flags & 4 &&
  9058. commitHostSingletonAcquisition(finishedWork);
  9059. case 26:
  9060. case 5:
  9061. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9062. null === current && flags & 4 && commitHostMount(finishedWork);
  9063. flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
  9064. break;
  9065. case 12:
  9066. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9067. break;
  9068. case 31:
  9069. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9070. flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
  9071. break;
  9072. case 13:
  9073. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9074. flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
  9075. flags & 64 &&
  9076. ((finishedRoot = finishedWork.memoizedState),
  9077. null !== finishedRoot &&
  9078. ((finishedRoot = finishedRoot.dehydrated),
  9079. null !== finishedRoot &&
  9080. ((finishedWork = retryDehydratedSuspenseBoundary.bind(
  9081. null,
  9082. finishedWork
  9083. )),
  9084. registerSuspenseInstanceRetry(finishedRoot, finishedWork))));
  9085. break;
  9086. case 22:
  9087. flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
  9088. if (!flags) {
  9089. current =
  9090. (null !== current && null !== current.memoizedState) ||
  9091. offscreenSubtreeWasHidden;
  9092. prevProps = offscreenSubtreeIsHidden;
  9093. var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
  9094. offscreenSubtreeIsHidden = flags;
  9095. (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden
  9096. ? recursivelyTraverseReappearLayoutEffects(
  9097. finishedRoot,
  9098. finishedWork,
  9099. 0 !== (finishedWork.subtreeFlags & 8772)
  9100. )
  9101. : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9102. offscreenSubtreeIsHidden = prevProps;
  9103. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
  9104. }
  9105. break;
  9106. case 30:
  9107. break;
  9108. default:
  9109. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  9110. }
  9111. }
  9112. function detachFiberAfterEffects(fiber) {
  9113. var alternate = fiber.alternate;
  9114. null !== alternate &&
  9115. ((fiber.alternate = null), detachFiberAfterEffects(alternate));
  9116. fiber.child = null;
  9117. fiber.deletions = null;
  9118. fiber.sibling = null;
  9119. 5 === fiber.tag &&
  9120. ((alternate = fiber.stateNode),
  9121. null !== alternate && detachDeletedInstance(alternate));
  9122. fiber.stateNode = null;
  9123. fiber.return = null;
  9124. fiber.dependencies = null;
  9125. fiber.memoizedProps = null;
  9126. fiber.memoizedState = null;
  9127. fiber.pendingProps = null;
  9128. fiber.stateNode = null;
  9129. fiber.updateQueue = null;
  9130. }
  9131. var hostParent = null,
  9132. hostParentIsContainer = !1;
  9133. function recursivelyTraverseDeletionEffects(
  9134. finishedRoot,
  9135. nearestMountedAncestor,
  9136. parent
  9137. ) {
  9138. for (parent = parent.child; null !== parent; )
  9139. commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),
  9140. (parent = parent.sibling);
  9141. }
  9142. function commitDeletionEffectsOnFiber(
  9143. finishedRoot,
  9144. nearestMountedAncestor,
  9145. deletedFiber
  9146. ) {
  9147. if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
  9148. try {
  9149. injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
  9150. } catch (err) {}
  9151. switch (deletedFiber.tag) {
  9152. case 26:
  9153. offscreenSubtreeWasHidden ||
  9154. safelyDetachRef(deletedFiber, nearestMountedAncestor);
  9155. recursivelyTraverseDeletionEffects(
  9156. finishedRoot,
  9157. nearestMountedAncestor,
  9158. deletedFiber
  9159. );
  9160. deletedFiber.memoizedState
  9161. ? deletedFiber.memoizedState.count--
  9162. : deletedFiber.stateNode &&
  9163. ((deletedFiber = deletedFiber.stateNode),
  9164. deletedFiber.parentNode.removeChild(deletedFiber));
  9165. break;
  9166. case 27:
  9167. offscreenSubtreeWasHidden ||
  9168. safelyDetachRef(deletedFiber, nearestMountedAncestor);
  9169. var prevHostParent = hostParent,
  9170. prevHostParentIsContainer = hostParentIsContainer;
  9171. isSingletonScope(deletedFiber.type) &&
  9172. ((hostParent = deletedFiber.stateNode), (hostParentIsContainer = !1));
  9173. recursivelyTraverseDeletionEffects(
  9174. finishedRoot,
  9175. nearestMountedAncestor,
  9176. deletedFiber
  9177. );
  9178. releaseSingletonInstance(deletedFiber.stateNode);
  9179. hostParent = prevHostParent;
  9180. hostParentIsContainer = prevHostParentIsContainer;
  9181. break;
  9182. case 5:
  9183. offscreenSubtreeWasHidden ||
  9184. safelyDetachRef(deletedFiber, nearestMountedAncestor);
  9185. case 6:
  9186. prevHostParent = hostParent;
  9187. prevHostParentIsContainer = hostParentIsContainer;
  9188. hostParent = null;
  9189. recursivelyTraverseDeletionEffects(
  9190. finishedRoot,
  9191. nearestMountedAncestor,
  9192. deletedFiber
  9193. );
  9194. hostParent = prevHostParent;
  9195. hostParentIsContainer = prevHostParentIsContainer;
  9196. if (null !== hostParent)
  9197. if (hostParentIsContainer)
  9198. try {
  9199. (9 === hostParent.nodeType
  9200. ? hostParent.body
  9201. : "HTML" === hostParent.nodeName
  9202. ? hostParent.ownerDocument.body
  9203. : hostParent
  9204. ).removeChild(deletedFiber.stateNode);
  9205. } catch (error) {
  9206. captureCommitPhaseError(
  9207. deletedFiber,
  9208. nearestMountedAncestor,
  9209. error
  9210. );
  9211. }
  9212. else
  9213. try {
  9214. hostParent.removeChild(deletedFiber.stateNode);
  9215. } catch (error) {
  9216. captureCommitPhaseError(
  9217. deletedFiber,
  9218. nearestMountedAncestor,
  9219. error
  9220. );
  9221. }
  9222. break;
  9223. case 18:
  9224. null !== hostParent &&
  9225. (hostParentIsContainer
  9226. ? ((finishedRoot = hostParent),
  9227. clearHydrationBoundary(
  9228. 9 === finishedRoot.nodeType
  9229. ? finishedRoot.body
  9230. : "HTML" === finishedRoot.nodeName
  9231. ? finishedRoot.ownerDocument.body
  9232. : finishedRoot,
  9233. deletedFiber.stateNode
  9234. ),
  9235. retryIfBlockedOn(finishedRoot))
  9236. : clearHydrationBoundary(hostParent, deletedFiber.stateNode));
  9237. break;
  9238. case 4:
  9239. prevHostParent = hostParent;
  9240. prevHostParentIsContainer = hostParentIsContainer;
  9241. hostParent = deletedFiber.stateNode.containerInfo;
  9242. hostParentIsContainer = !0;
  9243. recursivelyTraverseDeletionEffects(
  9244. finishedRoot,
  9245. nearestMountedAncestor,
  9246. deletedFiber
  9247. );
  9248. hostParent = prevHostParent;
  9249. hostParentIsContainer = prevHostParentIsContainer;
  9250. break;
  9251. case 0:
  9252. case 11:
  9253. case 14:
  9254. case 15:
  9255. commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor);
  9256. offscreenSubtreeWasHidden ||
  9257. commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor);
  9258. recursivelyTraverseDeletionEffects(
  9259. finishedRoot,
  9260. nearestMountedAncestor,
  9261. deletedFiber
  9262. );
  9263. break;
  9264. case 1:
  9265. offscreenSubtreeWasHidden ||
  9266. (safelyDetachRef(deletedFiber, nearestMountedAncestor),
  9267. (prevHostParent = deletedFiber.stateNode),
  9268. "function" === typeof prevHostParent.componentWillUnmount &&
  9269. safelyCallComponentWillUnmount(
  9270. deletedFiber,
  9271. nearestMountedAncestor,
  9272. prevHostParent
  9273. ));
  9274. recursivelyTraverseDeletionEffects(
  9275. finishedRoot,
  9276. nearestMountedAncestor,
  9277. deletedFiber
  9278. );
  9279. break;
  9280. case 21:
  9281. recursivelyTraverseDeletionEffects(
  9282. finishedRoot,
  9283. nearestMountedAncestor,
  9284. deletedFiber
  9285. );
  9286. break;
  9287. case 22:
  9288. offscreenSubtreeWasHidden =
  9289. (prevHostParent = offscreenSubtreeWasHidden) ||
  9290. null !== deletedFiber.memoizedState;
  9291. recursivelyTraverseDeletionEffects(
  9292. finishedRoot,
  9293. nearestMountedAncestor,
  9294. deletedFiber
  9295. );
  9296. offscreenSubtreeWasHidden = prevHostParent;
  9297. break;
  9298. default:
  9299. recursivelyTraverseDeletionEffects(
  9300. finishedRoot,
  9301. nearestMountedAncestor,
  9302. deletedFiber
  9303. );
  9304. }
  9305. }
  9306. function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {
  9307. if (
  9308. null === finishedWork.memoizedState &&
  9309. ((finishedRoot = finishedWork.alternate),
  9310. null !== finishedRoot &&
  9311. ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot))
  9312. ) {
  9313. finishedRoot = finishedRoot.dehydrated;
  9314. try {
  9315. retryIfBlockedOn(finishedRoot);
  9316. } catch (error) {
  9317. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9318. }
  9319. }
  9320. }
  9321. function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
  9322. if (
  9323. null === finishedWork.memoizedState &&
  9324. ((finishedRoot = finishedWork.alternate),
  9325. null !== finishedRoot &&
  9326. ((finishedRoot = finishedRoot.memoizedState),
  9327. null !== finishedRoot &&
  9328. ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot)))
  9329. )
  9330. try {
  9331. retryIfBlockedOn(finishedRoot);
  9332. } catch (error) {
  9333. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9334. }
  9335. }
  9336. function getRetryCache(finishedWork) {
  9337. switch (finishedWork.tag) {
  9338. case 31:
  9339. case 13:
  9340. case 19:
  9341. var retryCache = finishedWork.stateNode;
  9342. null === retryCache &&
  9343. (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
  9344. return retryCache;
  9345. case 22:
  9346. return (
  9347. (finishedWork = finishedWork.stateNode),
  9348. (retryCache = finishedWork._retryCache),
  9349. null === retryCache &&
  9350. (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),
  9351. retryCache
  9352. );
  9353. default:
  9354. throw Error(formatProdErrorMessage(435, finishedWork.tag));
  9355. }
  9356. }
  9357. function attachSuspenseRetryListeners(finishedWork, wakeables) {
  9358. var retryCache = getRetryCache(finishedWork);
  9359. wakeables.forEach(function (wakeable) {
  9360. if (!retryCache.has(wakeable)) {
  9361. retryCache.add(wakeable);
  9362. var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
  9363. wakeable.then(retry, retry);
  9364. }
  9365. });
  9366. }
  9367. function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
  9368. var deletions = parentFiber.deletions;
  9369. if (null !== deletions)
  9370. for (var i = 0; i < deletions.length; i++) {
  9371. var childToDelete = deletions[i],
  9372. root = root$jscomp$0,
  9373. returnFiber = parentFiber,
  9374. parent = returnFiber;
  9375. a: for (; null !== parent; ) {
  9376. switch (parent.tag) {
  9377. case 27:
  9378. if (isSingletonScope(parent.type)) {
  9379. hostParent = parent.stateNode;
  9380. hostParentIsContainer = !1;
  9381. break a;
  9382. }
  9383. break;
  9384. case 5:
  9385. hostParent = parent.stateNode;
  9386. hostParentIsContainer = !1;
  9387. break a;
  9388. case 3:
  9389. case 4:
  9390. hostParent = parent.stateNode.containerInfo;
  9391. hostParentIsContainer = !0;
  9392. break a;
  9393. }
  9394. parent = parent.return;
  9395. }
  9396. if (null === hostParent) throw Error(formatProdErrorMessage(160));
  9397. commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);
  9398. hostParent = null;
  9399. hostParentIsContainer = !1;
  9400. root = childToDelete.alternate;
  9401. null !== root && (root.return = null);
  9402. childToDelete.return = null;
  9403. }
  9404. if (parentFiber.subtreeFlags & 13886)
  9405. for (parentFiber = parentFiber.child; null !== parentFiber; )
  9406. commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),
  9407. (parentFiber = parentFiber.sibling);
  9408. }
  9409. var currentHoistableRoot = null;
  9410. function commitMutationEffectsOnFiber(finishedWork, root) {
  9411. var current = finishedWork.alternate,
  9412. flags = finishedWork.flags;
  9413. switch (finishedWork.tag) {
  9414. case 0:
  9415. case 11:
  9416. case 14:
  9417. case 15:
  9418. recursivelyTraverseMutationEffects(root, finishedWork);
  9419. commitReconciliationEffects(finishedWork);
  9420. flags & 4 &&
  9421. (commitHookEffectListUnmount(3, finishedWork, finishedWork.return),
  9422. commitHookEffectListMount(3, finishedWork),
  9423. commitHookEffectListUnmount(5, finishedWork, finishedWork.return));
  9424. break;
  9425. case 1:
  9426. recursivelyTraverseMutationEffects(root, finishedWork);
  9427. commitReconciliationEffects(finishedWork);
  9428. flags & 512 &&
  9429. (offscreenSubtreeWasHidden ||
  9430. null === current ||
  9431. safelyDetachRef(current, current.return));
  9432. flags & 64 &&
  9433. offscreenSubtreeIsHidden &&
  9434. ((finishedWork = finishedWork.updateQueue),
  9435. null !== finishedWork &&
  9436. ((flags = finishedWork.callbacks),
  9437. null !== flags &&
  9438. ((current = finishedWork.shared.hiddenCallbacks),
  9439. (finishedWork.shared.hiddenCallbacks =
  9440. null === current ? flags : current.concat(flags)))));
  9441. break;
  9442. case 26:
  9443. var hoistableRoot = currentHoistableRoot;
  9444. recursivelyTraverseMutationEffects(root, finishedWork);
  9445. commitReconciliationEffects(finishedWork);
  9446. flags & 512 &&
  9447. (offscreenSubtreeWasHidden ||
  9448. null === current ||
  9449. safelyDetachRef(current, current.return));
  9450. if (flags & 4) {
  9451. var currentResource = null !== current ? current.memoizedState : null;
  9452. flags = finishedWork.memoizedState;
  9453. if (null === current)
  9454. if (null === flags)
  9455. if (null === finishedWork.stateNode) {
  9456. a: {
  9457. flags = finishedWork.type;
  9458. current = finishedWork.memoizedProps;
  9459. hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
  9460. b: switch (flags) {
  9461. case "title":
  9462. currentResource =
  9463. hoistableRoot.getElementsByTagName("title")[0];
  9464. if (
  9465. !currentResource ||
  9466. currentResource[internalHoistableMarker] ||
  9467. currentResource[internalInstanceKey] ||
  9468. "http://www.w3.org/2000/svg" ===
  9469. currentResource.namespaceURI ||
  9470. currentResource.hasAttribute("itemprop")
  9471. )
  9472. (currentResource = hoistableRoot.createElement(flags)),
  9473. hoistableRoot.head.insertBefore(
  9474. currentResource,
  9475. hoistableRoot.querySelector("head > title")
  9476. );
  9477. setInitialProperties(currentResource, flags, current);
  9478. currentResource[internalInstanceKey] = finishedWork;
  9479. markNodeAsHoistable(currentResource);
  9480. flags = currentResource;
  9481. break a;
  9482. case "link":
  9483. var maybeNodes = getHydratableHoistableCache(
  9484. "link",
  9485. "href",
  9486. hoistableRoot
  9487. ).get(flags + (current.href || ""));
  9488. if (maybeNodes)
  9489. for (var i = 0; i < maybeNodes.length; i++)
  9490. if (
  9491. ((currentResource = maybeNodes[i]),
  9492. currentResource.getAttribute("href") ===
  9493. (null == current.href || "" === current.href
  9494. ? null
  9495. : current.href) &&
  9496. currentResource.getAttribute("rel") ===
  9497. (null == current.rel ? null : current.rel) &&
  9498. currentResource.getAttribute("title") ===
  9499. (null == current.title ? null : current.title) &&
  9500. currentResource.getAttribute("crossorigin") ===
  9501. (null == current.crossOrigin
  9502. ? null
  9503. : current.crossOrigin))
  9504. ) {
  9505. maybeNodes.splice(i, 1);
  9506. break b;
  9507. }
  9508. currentResource = hoistableRoot.createElement(flags);
  9509. setInitialProperties(currentResource, flags, current);
  9510. hoistableRoot.head.appendChild(currentResource);
  9511. break;
  9512. case "meta":
  9513. if (
  9514. (maybeNodes = getHydratableHoistableCache(
  9515. "meta",
  9516. "content",
  9517. hoistableRoot
  9518. ).get(flags + (current.content || "")))
  9519. )
  9520. for (i = 0; i < maybeNodes.length; i++)
  9521. if (
  9522. ((currentResource = maybeNodes[i]),
  9523. currentResource.getAttribute("content") ===
  9524. (null == current.content
  9525. ? null
  9526. : "" + current.content) &&
  9527. currentResource.getAttribute("name") ===
  9528. (null == current.name ? null : current.name) &&
  9529. currentResource.getAttribute("property") ===
  9530. (null == current.property
  9531. ? null
  9532. : current.property) &&
  9533. currentResource.getAttribute("http-equiv") ===
  9534. (null == current.httpEquiv
  9535. ? null
  9536. : current.httpEquiv) &&
  9537. currentResource.getAttribute("charset") ===
  9538. (null == current.charSet
  9539. ? null
  9540. : current.charSet))
  9541. ) {
  9542. maybeNodes.splice(i, 1);
  9543. break b;
  9544. }
  9545. currentResource = hoistableRoot.createElement(flags);
  9546. setInitialProperties(currentResource, flags, current);
  9547. hoistableRoot.head.appendChild(currentResource);
  9548. break;
  9549. default:
  9550. throw Error(formatProdErrorMessage(468, flags));
  9551. }
  9552. currentResource[internalInstanceKey] = finishedWork;
  9553. markNodeAsHoistable(currentResource);
  9554. flags = currentResource;
  9555. }
  9556. finishedWork.stateNode = flags;
  9557. } else
  9558. mountHoistable(
  9559. hoistableRoot,
  9560. finishedWork.type,
  9561. finishedWork.stateNode
  9562. );
  9563. else
  9564. finishedWork.stateNode = acquireResource(
  9565. hoistableRoot,
  9566. flags,
  9567. finishedWork.memoizedProps
  9568. );
  9569. else
  9570. currentResource !== flags
  9571. ? (null === currentResource
  9572. ? null !== current.stateNode &&
  9573. ((current = current.stateNode),
  9574. current.parentNode.removeChild(current))
  9575. : currentResource.count--,
  9576. null === flags
  9577. ? mountHoistable(
  9578. hoistableRoot,
  9579. finishedWork.type,
  9580. finishedWork.stateNode
  9581. )
  9582. : acquireResource(
  9583. hoistableRoot,
  9584. flags,
  9585. finishedWork.memoizedProps
  9586. ))
  9587. : null === flags &&
  9588. null !== finishedWork.stateNode &&
  9589. commitHostUpdate(
  9590. finishedWork,
  9591. finishedWork.memoizedProps,
  9592. current.memoizedProps
  9593. );
  9594. }
  9595. break;
  9596. case 27:
  9597. recursivelyTraverseMutationEffects(root, finishedWork);
  9598. commitReconciliationEffects(finishedWork);
  9599. flags & 512 &&
  9600. (offscreenSubtreeWasHidden ||
  9601. null === current ||
  9602. safelyDetachRef(current, current.return));
  9603. null !== current &&
  9604. flags & 4 &&
  9605. commitHostUpdate(
  9606. finishedWork,
  9607. finishedWork.memoizedProps,
  9608. current.memoizedProps
  9609. );
  9610. break;
  9611. case 5:
  9612. recursivelyTraverseMutationEffects(root, finishedWork);
  9613. commitReconciliationEffects(finishedWork);
  9614. flags & 512 &&
  9615. (offscreenSubtreeWasHidden ||
  9616. null === current ||
  9617. safelyDetachRef(current, current.return));
  9618. if (finishedWork.flags & 32) {
  9619. hoistableRoot = finishedWork.stateNode;
  9620. try {
  9621. setTextContent(hoistableRoot, "");
  9622. } catch (error) {
  9623. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9624. }
  9625. }
  9626. flags & 4 &&
  9627. null != finishedWork.stateNode &&
  9628. ((hoistableRoot = finishedWork.memoizedProps),
  9629. commitHostUpdate(
  9630. finishedWork,
  9631. hoistableRoot,
  9632. null !== current ? current.memoizedProps : hoistableRoot
  9633. ));
  9634. flags & 1024 && (needsFormReset = !0);
  9635. break;
  9636. case 6:
  9637. recursivelyTraverseMutationEffects(root, finishedWork);
  9638. commitReconciliationEffects(finishedWork);
  9639. if (flags & 4) {
  9640. if (null === finishedWork.stateNode)
  9641. throw Error(formatProdErrorMessage(162));
  9642. flags = finishedWork.memoizedProps;
  9643. current = finishedWork.stateNode;
  9644. try {
  9645. current.nodeValue = flags;
  9646. } catch (error) {
  9647. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9648. }
  9649. }
  9650. break;
  9651. case 3:
  9652. tagCaches = null;
  9653. hoistableRoot = currentHoistableRoot;
  9654. currentHoistableRoot = getHoistableRoot(root.containerInfo);
  9655. recursivelyTraverseMutationEffects(root, finishedWork);
  9656. currentHoistableRoot = hoistableRoot;
  9657. commitReconciliationEffects(finishedWork);
  9658. if (flags & 4 && null !== current && current.memoizedState.isDehydrated)
  9659. try {
  9660. retryIfBlockedOn(root.containerInfo);
  9661. } catch (error) {
  9662. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9663. }
  9664. needsFormReset &&
  9665. ((needsFormReset = !1), recursivelyResetForms(finishedWork));
  9666. break;
  9667. case 4:
  9668. flags = currentHoistableRoot;
  9669. currentHoistableRoot = getHoistableRoot(
  9670. finishedWork.stateNode.containerInfo
  9671. );
  9672. recursivelyTraverseMutationEffects(root, finishedWork);
  9673. commitReconciliationEffects(finishedWork);
  9674. currentHoistableRoot = flags;
  9675. break;
  9676. case 12:
  9677. recursivelyTraverseMutationEffects(root, finishedWork);
  9678. commitReconciliationEffects(finishedWork);
  9679. break;
  9680. case 31:
  9681. recursivelyTraverseMutationEffects(root, finishedWork);
  9682. commitReconciliationEffects(finishedWork);
  9683. flags & 4 &&
  9684. ((flags = finishedWork.updateQueue),
  9685. null !== flags &&
  9686. ((finishedWork.updateQueue = null),
  9687. attachSuspenseRetryListeners(finishedWork, flags)));
  9688. break;
  9689. case 13:
  9690. recursivelyTraverseMutationEffects(root, finishedWork);
  9691. commitReconciliationEffects(finishedWork);
  9692. finishedWork.child.flags & 8192 &&
  9693. (null !== finishedWork.memoizedState) !==
  9694. (null !== current && null !== current.memoizedState) &&
  9695. (globalMostRecentFallbackTime = now());
  9696. flags & 4 &&
  9697. ((flags = finishedWork.updateQueue),
  9698. null !== flags &&
  9699. ((finishedWork.updateQueue = null),
  9700. attachSuspenseRetryListeners(finishedWork, flags)));
  9701. break;
  9702. case 22:
  9703. hoistableRoot = null !== finishedWork.memoizedState;
  9704. var wasHidden = null !== current && null !== current.memoizedState,
  9705. prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,
  9706. prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
  9707. offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot;
  9708. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;
  9709. recursivelyTraverseMutationEffects(root, finishedWork);
  9710. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
  9711. offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
  9712. commitReconciliationEffects(finishedWork);
  9713. if (flags & 8192)
  9714. a: for (
  9715. root = finishedWork.stateNode,
  9716. root._visibility = hoistableRoot
  9717. ? root._visibility & -2
  9718. : root._visibility | 1,
  9719. hoistableRoot &&
  9720. (null === current ||
  9721. wasHidden ||
  9722. offscreenSubtreeIsHidden ||
  9723. offscreenSubtreeWasHidden ||
  9724. recursivelyTraverseDisappearLayoutEffects(finishedWork)),
  9725. current = null,
  9726. root = finishedWork;
  9727. ;
  9728. ) {
  9729. if (5 === root.tag || 26 === root.tag) {
  9730. if (null === current) {
  9731. wasHidden = current = root;
  9732. try {
  9733. if (((currentResource = wasHidden.stateNode), hoistableRoot))
  9734. (maybeNodes = currentResource.style),
  9735. "function" === typeof maybeNodes.setProperty
  9736. ? maybeNodes.setProperty("display", "none", "important")
  9737. : (maybeNodes.display = "none");
  9738. else {
  9739. i = wasHidden.stateNode;
  9740. var styleProp = wasHidden.memoizedProps.style,
  9741. display =
  9742. void 0 !== styleProp &&
  9743. null !== styleProp &&
  9744. styleProp.hasOwnProperty("display")
  9745. ? styleProp.display
  9746. : null;
  9747. i.style.display =
  9748. null == display || "boolean" === typeof display
  9749. ? ""
  9750. : ("" + display).trim();
  9751. }
  9752. } catch (error) {
  9753. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  9754. }
  9755. }
  9756. } else if (6 === root.tag) {
  9757. if (null === current) {
  9758. wasHidden = root;
  9759. try {
  9760. wasHidden.stateNode.nodeValue = hoistableRoot
  9761. ? ""
  9762. : wasHidden.memoizedProps;
  9763. } catch (error) {
  9764. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  9765. }
  9766. }
  9767. } else if (18 === root.tag) {
  9768. if (null === current) {
  9769. wasHidden = root;
  9770. try {
  9771. var instance = wasHidden.stateNode;
  9772. hoistableRoot
  9773. ? hideOrUnhideDehydratedBoundary(instance, !0)
  9774. : hideOrUnhideDehydratedBoundary(wasHidden.stateNode, !1);
  9775. } catch (error) {
  9776. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  9777. }
  9778. }
  9779. } else if (
  9780. ((22 !== root.tag && 23 !== root.tag) ||
  9781. null === root.memoizedState ||
  9782. root === finishedWork) &&
  9783. null !== root.child
  9784. ) {
  9785. root.child.return = root;
  9786. root = root.child;
  9787. continue;
  9788. }
  9789. if (root === finishedWork) break a;
  9790. for (; null === root.sibling; ) {
  9791. if (null === root.return || root.return === finishedWork) break a;
  9792. current === root && (current = null);
  9793. root = root.return;
  9794. }
  9795. current === root && (current = null);
  9796. root.sibling.return = root.return;
  9797. root = root.sibling;
  9798. }
  9799. flags & 4 &&
  9800. ((flags = finishedWork.updateQueue),
  9801. null !== flags &&
  9802. ((current = flags.retryQueue),
  9803. null !== current &&
  9804. ((flags.retryQueue = null),
  9805. attachSuspenseRetryListeners(finishedWork, current))));
  9806. break;
  9807. case 19:
  9808. recursivelyTraverseMutationEffects(root, finishedWork);
  9809. commitReconciliationEffects(finishedWork);
  9810. flags & 4 &&
  9811. ((flags = finishedWork.updateQueue),
  9812. null !== flags &&
  9813. ((finishedWork.updateQueue = null),
  9814. attachSuspenseRetryListeners(finishedWork, flags)));
  9815. break;
  9816. case 30:
  9817. break;
  9818. case 21:
  9819. break;
  9820. default:
  9821. recursivelyTraverseMutationEffects(root, finishedWork),
  9822. commitReconciliationEffects(finishedWork);
  9823. }
  9824. }
  9825. function commitReconciliationEffects(finishedWork) {
  9826. var flags = finishedWork.flags;
  9827. if (flags & 2) {
  9828. try {
  9829. for (
  9830. var hostParentFiber, parentFiber = finishedWork.return;
  9831. null !== parentFiber;
  9832. ) {
  9833. if (isHostParent(parentFiber)) {
  9834. hostParentFiber = parentFiber;
  9835. break;
  9836. }
  9837. parentFiber = parentFiber.return;
  9838. }
  9839. if (null == hostParentFiber) throw Error(formatProdErrorMessage(160));
  9840. switch (hostParentFiber.tag) {
  9841. case 27:
  9842. var parent = hostParentFiber.stateNode,
  9843. before = getHostSibling(finishedWork);
  9844. insertOrAppendPlacementNode(finishedWork, before, parent);
  9845. break;
  9846. case 5:
  9847. var parent$141 = hostParentFiber.stateNode;
  9848. hostParentFiber.flags & 32 &&
  9849. (setTextContent(parent$141, ""), (hostParentFiber.flags &= -33));
  9850. var before$142 = getHostSibling(finishedWork);
  9851. insertOrAppendPlacementNode(finishedWork, before$142, parent$141);
  9852. break;
  9853. case 3:
  9854. case 4:
  9855. var parent$143 = hostParentFiber.stateNode.containerInfo,
  9856. before$144 = getHostSibling(finishedWork);
  9857. insertOrAppendPlacementNodeIntoContainer(
  9858. finishedWork,
  9859. before$144,
  9860. parent$143
  9861. );
  9862. break;
  9863. default:
  9864. throw Error(formatProdErrorMessage(161));
  9865. }
  9866. } catch (error) {
  9867. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  9868. }
  9869. finishedWork.flags &= -3;
  9870. }
  9871. flags & 4096 && (finishedWork.flags &= -4097);
  9872. }
  9873. function recursivelyResetForms(parentFiber) {
  9874. if (parentFiber.subtreeFlags & 1024)
  9875. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  9876. var fiber = parentFiber;
  9877. recursivelyResetForms(fiber);
  9878. 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();
  9879. parentFiber = parentFiber.sibling;
  9880. }
  9881. }
  9882. function recursivelyTraverseLayoutEffects(root, parentFiber) {
  9883. if (parentFiber.subtreeFlags & 8772)
  9884. for (parentFiber = parentFiber.child; null !== parentFiber; )
  9885. commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),
  9886. (parentFiber = parentFiber.sibling);
  9887. }
  9888. function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
  9889. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  9890. var finishedWork = parentFiber;
  9891. switch (finishedWork.tag) {
  9892. case 0:
  9893. case 11:
  9894. case 14:
  9895. case 15:
  9896. commitHookEffectListUnmount(4, finishedWork, finishedWork.return);
  9897. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  9898. break;
  9899. case 1:
  9900. safelyDetachRef(finishedWork, finishedWork.return);
  9901. var instance = finishedWork.stateNode;
  9902. "function" === typeof instance.componentWillUnmount &&
  9903. safelyCallComponentWillUnmount(
  9904. finishedWork,
  9905. finishedWork.return,
  9906. instance
  9907. );
  9908. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  9909. break;
  9910. case 27:
  9911. releaseSingletonInstance(finishedWork.stateNode);
  9912. case 26:
  9913. case 5:
  9914. safelyDetachRef(finishedWork, finishedWork.return);
  9915. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  9916. break;
  9917. case 22:
  9918. null === finishedWork.memoizedState &&
  9919. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  9920. break;
  9921. case 30:
  9922. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  9923. break;
  9924. default:
  9925. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  9926. }
  9927. parentFiber = parentFiber.sibling;
  9928. }
  9929. }
  9930. function recursivelyTraverseReappearLayoutEffects(
  9931. finishedRoot$jscomp$0,
  9932. parentFiber,
  9933. includeWorkInProgressEffects
  9934. ) {
  9935. includeWorkInProgressEffects =
  9936. includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
  9937. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  9938. var current = parentFiber.alternate,
  9939. finishedRoot = finishedRoot$jscomp$0,
  9940. finishedWork = parentFiber,
  9941. flags = finishedWork.flags;
  9942. switch (finishedWork.tag) {
  9943. case 0:
  9944. case 11:
  9945. case 15:
  9946. recursivelyTraverseReappearLayoutEffects(
  9947. finishedRoot,
  9948. finishedWork,
  9949. includeWorkInProgressEffects
  9950. );
  9951. commitHookEffectListMount(4, finishedWork);
  9952. break;
  9953. case 1:
  9954. recursivelyTraverseReappearLayoutEffects(
  9955. finishedRoot,
  9956. finishedWork,
  9957. includeWorkInProgressEffects
  9958. );
  9959. current = finishedWork;
  9960. finishedRoot = current.stateNode;
  9961. if ("function" === typeof finishedRoot.componentDidMount)
  9962. try {
  9963. finishedRoot.componentDidMount();
  9964. } catch (error) {
  9965. captureCommitPhaseError(current, current.return, error);
  9966. }
  9967. current = finishedWork;
  9968. finishedRoot = current.updateQueue;
  9969. if (null !== finishedRoot) {
  9970. var instance = current.stateNode;
  9971. try {
  9972. var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks;
  9973. if (null !== hiddenCallbacks)
  9974. for (
  9975. finishedRoot.shared.hiddenCallbacks = null, finishedRoot = 0;
  9976. finishedRoot < hiddenCallbacks.length;
  9977. finishedRoot++
  9978. )
  9979. callCallback(hiddenCallbacks[finishedRoot], instance);
  9980. } catch (error) {
  9981. captureCommitPhaseError(current, current.return, error);
  9982. }
  9983. }
  9984. includeWorkInProgressEffects &&
  9985. flags & 64 &&
  9986. commitClassCallbacks(finishedWork);
  9987. safelyAttachRef(finishedWork, finishedWork.return);
  9988. break;
  9989. case 27:
  9990. commitHostSingletonAcquisition(finishedWork);
  9991. case 26:
  9992. case 5:
  9993. recursivelyTraverseReappearLayoutEffects(
  9994. finishedRoot,
  9995. finishedWork,
  9996. includeWorkInProgressEffects
  9997. );
  9998. includeWorkInProgressEffects &&
  9999. null === current &&
  10000. flags & 4 &&
  10001. commitHostMount(finishedWork);
  10002. safelyAttachRef(finishedWork, finishedWork.return);
  10003. break;
  10004. case 12:
  10005. recursivelyTraverseReappearLayoutEffects(
  10006. finishedRoot,
  10007. finishedWork,
  10008. includeWorkInProgressEffects
  10009. );
  10010. break;
  10011. case 31:
  10012. recursivelyTraverseReappearLayoutEffects(
  10013. finishedRoot,
  10014. finishedWork,
  10015. includeWorkInProgressEffects
  10016. );
  10017. includeWorkInProgressEffects &&
  10018. flags & 4 &&
  10019. commitActivityHydrationCallbacks(finishedRoot, finishedWork);
  10020. break;
  10021. case 13:
  10022. recursivelyTraverseReappearLayoutEffects(
  10023. finishedRoot,
  10024. finishedWork,
  10025. includeWorkInProgressEffects
  10026. );
  10027. includeWorkInProgressEffects &&
  10028. flags & 4 &&
  10029. commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
  10030. break;
  10031. case 22:
  10032. null === finishedWork.memoizedState &&
  10033. recursivelyTraverseReappearLayoutEffects(
  10034. finishedRoot,
  10035. finishedWork,
  10036. includeWorkInProgressEffects
  10037. );
  10038. safelyAttachRef(finishedWork, finishedWork.return);
  10039. break;
  10040. case 30:
  10041. break;
  10042. default:
  10043. recursivelyTraverseReappearLayoutEffects(
  10044. finishedRoot,
  10045. finishedWork,
  10046. includeWorkInProgressEffects
  10047. );
  10048. }
  10049. parentFiber = parentFiber.sibling;
  10050. }
  10051. }
  10052. function commitOffscreenPassiveMountEffects(current, finishedWork) {
  10053. var previousCache = null;
  10054. null !== current &&
  10055. null !== current.memoizedState &&
  10056. null !== current.memoizedState.cachePool &&
  10057. (previousCache = current.memoizedState.cachePool.pool);
  10058. current = null;
  10059. null !== finishedWork.memoizedState &&
  10060. null !== finishedWork.memoizedState.cachePool &&
  10061. (current = finishedWork.memoizedState.cachePool.pool);
  10062. current !== previousCache &&
  10063. (null != current && current.refCount++,
  10064. null != previousCache && releaseCache(previousCache));
  10065. }
  10066. function commitCachePassiveMountEffect(current, finishedWork) {
  10067. current = null;
  10068. null !== finishedWork.alternate &&
  10069. (current = finishedWork.alternate.memoizedState.cache);
  10070. finishedWork = finishedWork.memoizedState.cache;
  10071. finishedWork !== current &&
  10072. (finishedWork.refCount++, null != current && releaseCache(current));
  10073. }
  10074. function recursivelyTraversePassiveMountEffects(
  10075. root,
  10076. parentFiber,
  10077. committedLanes,
  10078. committedTransitions
  10079. ) {
  10080. if (parentFiber.subtreeFlags & 10256)
  10081. for (parentFiber = parentFiber.child; null !== parentFiber; )
  10082. commitPassiveMountOnFiber(
  10083. root,
  10084. parentFiber,
  10085. committedLanes,
  10086. committedTransitions
  10087. ),
  10088. (parentFiber = parentFiber.sibling);
  10089. }
  10090. function commitPassiveMountOnFiber(
  10091. finishedRoot,
  10092. finishedWork,
  10093. committedLanes,
  10094. committedTransitions
  10095. ) {
  10096. var flags = finishedWork.flags;
  10097. switch (finishedWork.tag) {
  10098. case 0:
  10099. case 11:
  10100. case 15:
  10101. recursivelyTraversePassiveMountEffects(
  10102. finishedRoot,
  10103. finishedWork,
  10104. committedLanes,
  10105. committedTransitions
  10106. );
  10107. flags & 2048 && commitHookEffectListMount(9, finishedWork);
  10108. break;
  10109. case 1:
  10110. recursivelyTraversePassiveMountEffects(
  10111. finishedRoot,
  10112. finishedWork,
  10113. committedLanes,
  10114. committedTransitions
  10115. );
  10116. break;
  10117. case 3:
  10118. recursivelyTraversePassiveMountEffects(
  10119. finishedRoot,
  10120. finishedWork,
  10121. committedLanes,
  10122. committedTransitions
  10123. );
  10124. flags & 2048 &&
  10125. ((finishedRoot = null),
  10126. null !== finishedWork.alternate &&
  10127. (finishedRoot = finishedWork.alternate.memoizedState.cache),
  10128. (finishedWork = finishedWork.memoizedState.cache),
  10129. finishedWork !== finishedRoot &&
  10130. (finishedWork.refCount++,
  10131. null != finishedRoot && releaseCache(finishedRoot)));
  10132. break;
  10133. case 12:
  10134. if (flags & 2048) {
  10135. recursivelyTraversePassiveMountEffects(
  10136. finishedRoot,
  10137. finishedWork,
  10138. committedLanes,
  10139. committedTransitions
  10140. );
  10141. finishedRoot = finishedWork.stateNode;
  10142. try {
  10143. var _finishedWork$memoize2 = finishedWork.memoizedProps,
  10144. id = _finishedWork$memoize2.id,
  10145. onPostCommit = _finishedWork$memoize2.onPostCommit;
  10146. "function" === typeof onPostCommit &&
  10147. onPostCommit(
  10148. id,
  10149. null === finishedWork.alternate ? "mount" : "update",
  10150. finishedRoot.passiveEffectDuration,
  10151. -0
  10152. );
  10153. } catch (error) {
  10154. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  10155. }
  10156. } else
  10157. recursivelyTraversePassiveMountEffects(
  10158. finishedRoot,
  10159. finishedWork,
  10160. committedLanes,
  10161. committedTransitions
  10162. );
  10163. break;
  10164. case 31:
  10165. recursivelyTraversePassiveMountEffects(
  10166. finishedRoot,
  10167. finishedWork,
  10168. committedLanes,
  10169. committedTransitions
  10170. );
  10171. break;
  10172. case 13:
  10173. recursivelyTraversePassiveMountEffects(
  10174. finishedRoot,
  10175. finishedWork,
  10176. committedLanes,
  10177. committedTransitions
  10178. );
  10179. break;
  10180. case 23:
  10181. break;
  10182. case 22:
  10183. _finishedWork$memoize2 = finishedWork.stateNode;
  10184. id = finishedWork.alternate;
  10185. null !== finishedWork.memoizedState
  10186. ? _finishedWork$memoize2._visibility & 2
  10187. ? recursivelyTraversePassiveMountEffects(
  10188. finishedRoot,
  10189. finishedWork,
  10190. committedLanes,
  10191. committedTransitions
  10192. )
  10193. : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork)
  10194. : _finishedWork$memoize2._visibility & 2
  10195. ? recursivelyTraversePassiveMountEffects(
  10196. finishedRoot,
  10197. finishedWork,
  10198. committedLanes,
  10199. committedTransitions
  10200. )
  10201. : ((_finishedWork$memoize2._visibility |= 2),
  10202. recursivelyTraverseReconnectPassiveEffects(
  10203. finishedRoot,
  10204. finishedWork,
  10205. committedLanes,
  10206. committedTransitions,
  10207. 0 !== (finishedWork.subtreeFlags & 10256) || !1
  10208. ));
  10209. flags & 2048 && commitOffscreenPassiveMountEffects(id, finishedWork);
  10210. break;
  10211. case 24:
  10212. recursivelyTraversePassiveMountEffects(
  10213. finishedRoot,
  10214. finishedWork,
  10215. committedLanes,
  10216. committedTransitions
  10217. );
  10218. flags & 2048 &&
  10219. commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
  10220. break;
  10221. default:
  10222. recursivelyTraversePassiveMountEffects(
  10223. finishedRoot,
  10224. finishedWork,
  10225. committedLanes,
  10226. committedTransitions
  10227. );
  10228. }
  10229. }
  10230. function recursivelyTraverseReconnectPassiveEffects(
  10231. finishedRoot$jscomp$0,
  10232. parentFiber,
  10233. committedLanes$jscomp$0,
  10234. committedTransitions$jscomp$0,
  10235. includeWorkInProgressEffects
  10236. ) {
  10237. includeWorkInProgressEffects =
  10238. includeWorkInProgressEffects &&
  10239. (0 !== (parentFiber.subtreeFlags & 10256) || !1);
  10240. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  10241. var finishedRoot = finishedRoot$jscomp$0,
  10242. finishedWork = parentFiber,
  10243. committedLanes = committedLanes$jscomp$0,
  10244. committedTransitions = committedTransitions$jscomp$0,
  10245. flags = finishedWork.flags;
  10246. switch (finishedWork.tag) {
  10247. case 0:
  10248. case 11:
  10249. case 15:
  10250. recursivelyTraverseReconnectPassiveEffects(
  10251. finishedRoot,
  10252. finishedWork,
  10253. committedLanes,
  10254. committedTransitions,
  10255. includeWorkInProgressEffects
  10256. );
  10257. commitHookEffectListMount(8, finishedWork);
  10258. break;
  10259. case 23:
  10260. break;
  10261. case 22:
  10262. var instance = finishedWork.stateNode;
  10263. null !== finishedWork.memoizedState
  10264. ? instance._visibility & 2
  10265. ? recursivelyTraverseReconnectPassiveEffects(
  10266. finishedRoot,
  10267. finishedWork,
  10268. committedLanes,
  10269. committedTransitions,
  10270. includeWorkInProgressEffects
  10271. )
  10272. : recursivelyTraverseAtomicPassiveEffects(
  10273. finishedRoot,
  10274. finishedWork
  10275. )
  10276. : ((instance._visibility |= 2),
  10277. recursivelyTraverseReconnectPassiveEffects(
  10278. finishedRoot,
  10279. finishedWork,
  10280. committedLanes,
  10281. committedTransitions,
  10282. includeWorkInProgressEffects
  10283. ));
  10284. includeWorkInProgressEffects &&
  10285. flags & 2048 &&
  10286. commitOffscreenPassiveMountEffects(
  10287. finishedWork.alternate,
  10288. finishedWork
  10289. );
  10290. break;
  10291. case 24:
  10292. recursivelyTraverseReconnectPassiveEffects(
  10293. finishedRoot,
  10294. finishedWork,
  10295. committedLanes,
  10296. committedTransitions,
  10297. includeWorkInProgressEffects
  10298. );
  10299. includeWorkInProgressEffects &&
  10300. flags & 2048 &&
  10301. commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
  10302. break;
  10303. default:
  10304. recursivelyTraverseReconnectPassiveEffects(
  10305. finishedRoot,
  10306. finishedWork,
  10307. committedLanes,
  10308. committedTransitions,
  10309. includeWorkInProgressEffects
  10310. );
  10311. }
  10312. parentFiber = parentFiber.sibling;
  10313. }
  10314. }
  10315. function recursivelyTraverseAtomicPassiveEffects(
  10316. finishedRoot$jscomp$0,
  10317. parentFiber
  10318. ) {
  10319. if (parentFiber.subtreeFlags & 10256)
  10320. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  10321. var finishedRoot = finishedRoot$jscomp$0,
  10322. finishedWork = parentFiber,
  10323. flags = finishedWork.flags;
  10324. switch (finishedWork.tag) {
  10325. case 22:
  10326. recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
  10327. flags & 2048 &&
  10328. commitOffscreenPassiveMountEffects(
  10329. finishedWork.alternate,
  10330. finishedWork
  10331. );
  10332. break;
  10333. case 24:
  10334. recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
  10335. flags & 2048 &&
  10336. commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
  10337. break;
  10338. default:
  10339. recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);
  10340. }
  10341. parentFiber = parentFiber.sibling;
  10342. }
  10343. }
  10344. var suspenseyCommitFlag = 8192;
  10345. function recursivelyAccumulateSuspenseyCommit(
  10346. parentFiber,
  10347. committedLanes,
  10348. suspendedState
  10349. ) {
  10350. if (parentFiber.subtreeFlags & suspenseyCommitFlag)
  10351. for (parentFiber = parentFiber.child; null !== parentFiber; )
  10352. accumulateSuspenseyCommitOnFiber(
  10353. parentFiber,
  10354. committedLanes,
  10355. suspendedState
  10356. ),
  10357. (parentFiber = parentFiber.sibling);
  10358. }
  10359. function accumulateSuspenseyCommitOnFiber(
  10360. fiber,
  10361. committedLanes,
  10362. suspendedState
  10363. ) {
  10364. switch (fiber.tag) {
  10365. case 26:
  10366. recursivelyAccumulateSuspenseyCommit(
  10367. fiber,
  10368. committedLanes,
  10369. suspendedState
  10370. );
  10371. fiber.flags & suspenseyCommitFlag &&
  10372. null !== fiber.memoizedState &&
  10373. suspendResource(
  10374. suspendedState,
  10375. currentHoistableRoot,
  10376. fiber.memoizedState,
  10377. fiber.memoizedProps
  10378. );
  10379. break;
  10380. case 5:
  10381. recursivelyAccumulateSuspenseyCommit(
  10382. fiber,
  10383. committedLanes,
  10384. suspendedState
  10385. );
  10386. break;
  10387. case 3:
  10388. case 4:
  10389. var previousHoistableRoot = currentHoistableRoot;
  10390. currentHoistableRoot = getHoistableRoot(fiber.stateNode.containerInfo);
  10391. recursivelyAccumulateSuspenseyCommit(
  10392. fiber,
  10393. committedLanes,
  10394. suspendedState
  10395. );
  10396. currentHoistableRoot = previousHoistableRoot;
  10397. break;
  10398. case 22:
  10399. null === fiber.memoizedState &&
  10400. ((previousHoistableRoot = fiber.alternate),
  10401. null !== previousHoistableRoot &&
  10402. null !== previousHoistableRoot.memoizedState
  10403. ? ((previousHoistableRoot = suspenseyCommitFlag),
  10404. (suspenseyCommitFlag = 16777216),
  10405. recursivelyAccumulateSuspenseyCommit(
  10406. fiber,
  10407. committedLanes,
  10408. suspendedState
  10409. ),
  10410. (suspenseyCommitFlag = previousHoistableRoot))
  10411. : recursivelyAccumulateSuspenseyCommit(
  10412. fiber,
  10413. committedLanes,
  10414. suspendedState
  10415. ));
  10416. break;
  10417. default:
  10418. recursivelyAccumulateSuspenseyCommit(
  10419. fiber,
  10420. committedLanes,
  10421. suspendedState
  10422. );
  10423. }
  10424. }
  10425. function detachAlternateSiblings(parentFiber) {
  10426. var previousFiber = parentFiber.alternate;
  10427. if (
  10428. null !== previousFiber &&
  10429. ((parentFiber = previousFiber.child), null !== parentFiber)
  10430. ) {
  10431. previousFiber.child = null;
  10432. do
  10433. (previousFiber = parentFiber.sibling),
  10434. (parentFiber.sibling = null),
  10435. (parentFiber = previousFiber);
  10436. while (null !== parentFiber);
  10437. }
  10438. }
  10439. function recursivelyTraversePassiveUnmountEffects(parentFiber) {
  10440. var deletions = parentFiber.deletions;
  10441. if (0 !== (parentFiber.flags & 16)) {
  10442. if (null !== deletions)
  10443. for (var i = 0; i < deletions.length; i++) {
  10444. var childToDelete = deletions[i];
  10445. nextEffect = childToDelete;
  10446. commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  10447. childToDelete,
  10448. parentFiber
  10449. );
  10450. }
  10451. detachAlternateSiblings(parentFiber);
  10452. }
  10453. if (parentFiber.subtreeFlags & 10256)
  10454. for (parentFiber = parentFiber.child; null !== parentFiber; )
  10455. commitPassiveUnmountOnFiber(parentFiber),
  10456. (parentFiber = parentFiber.sibling);
  10457. }
  10458. function commitPassiveUnmountOnFiber(finishedWork) {
  10459. switch (finishedWork.tag) {
  10460. case 0:
  10461. case 11:
  10462. case 15:
  10463. recursivelyTraversePassiveUnmountEffects(finishedWork);
  10464. finishedWork.flags & 2048 &&
  10465. commitHookEffectListUnmount(9, finishedWork, finishedWork.return);
  10466. break;
  10467. case 3:
  10468. recursivelyTraversePassiveUnmountEffects(finishedWork);
  10469. break;
  10470. case 12:
  10471. recursivelyTraversePassiveUnmountEffects(finishedWork);
  10472. break;
  10473. case 22:
  10474. var instance = finishedWork.stateNode;
  10475. null !== finishedWork.memoizedState &&
  10476. instance._visibility & 2 &&
  10477. (null === finishedWork.return || 13 !== finishedWork.return.tag)
  10478. ? ((instance._visibility &= -3),
  10479. recursivelyTraverseDisconnectPassiveEffects(finishedWork))
  10480. : recursivelyTraversePassiveUnmountEffects(finishedWork);
  10481. break;
  10482. default:
  10483. recursivelyTraversePassiveUnmountEffects(finishedWork);
  10484. }
  10485. }
  10486. function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
  10487. var deletions = parentFiber.deletions;
  10488. if (0 !== (parentFiber.flags & 16)) {
  10489. if (null !== deletions)
  10490. for (var i = 0; i < deletions.length; i++) {
  10491. var childToDelete = deletions[i];
  10492. nextEffect = childToDelete;
  10493. commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  10494. childToDelete,
  10495. parentFiber
  10496. );
  10497. }
  10498. detachAlternateSiblings(parentFiber);
  10499. }
  10500. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  10501. deletions = parentFiber;
  10502. switch (deletions.tag) {
  10503. case 0:
  10504. case 11:
  10505. case 15:
  10506. commitHookEffectListUnmount(8, deletions, deletions.return);
  10507. recursivelyTraverseDisconnectPassiveEffects(deletions);
  10508. break;
  10509. case 22:
  10510. i = deletions.stateNode;
  10511. i._visibility & 2 &&
  10512. ((i._visibility &= -3),
  10513. recursivelyTraverseDisconnectPassiveEffects(deletions));
  10514. break;
  10515. default:
  10516. recursivelyTraverseDisconnectPassiveEffects(deletions);
  10517. }
  10518. parentFiber = parentFiber.sibling;
  10519. }
  10520. }
  10521. function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  10522. deletedSubtreeRoot,
  10523. nearestMountedAncestor
  10524. ) {
  10525. for (; null !== nextEffect; ) {
  10526. var fiber = nextEffect;
  10527. switch (fiber.tag) {
  10528. case 0:
  10529. case 11:
  10530. case 15:
  10531. commitHookEffectListUnmount(8, fiber, nearestMountedAncestor);
  10532. break;
  10533. case 23:
  10534. case 22:
  10535. if (
  10536. null !== fiber.memoizedState &&
  10537. null !== fiber.memoizedState.cachePool
  10538. ) {
  10539. var cache = fiber.memoizedState.cachePool.pool;
  10540. null != cache && cache.refCount++;
  10541. }
  10542. break;
  10543. case 24:
  10544. releaseCache(fiber.memoizedState.cache);
  10545. }
  10546. cache = fiber.child;
  10547. if (null !== cache) (cache.return = fiber), (nextEffect = cache);
  10548. else
  10549. a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
  10550. cache = nextEffect;
  10551. var sibling = cache.sibling,
  10552. returnFiber = cache.return;
  10553. detachFiberAfterEffects(cache);
  10554. if (cache === fiber) {
  10555. nextEffect = null;
  10556. break a;
  10557. }
  10558. if (null !== sibling) {
  10559. sibling.return = returnFiber;
  10560. nextEffect = sibling;
  10561. break a;
  10562. }
  10563. nextEffect = returnFiber;
  10564. }
  10565. }
  10566. }
  10567. var DefaultAsyncDispatcher = {
  10568. getCacheForType: function (resourceType) {
  10569. var cache = readContext(CacheContext),
  10570. cacheForType = cache.data.get(resourceType);
  10571. void 0 === cacheForType &&
  10572. ((cacheForType = resourceType()),
  10573. cache.data.set(resourceType, cacheForType));
  10574. return cacheForType;
  10575. },
  10576. cacheSignal: function () {
  10577. return readContext(CacheContext).controller.signal;
  10578. }
  10579. },
  10580. PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
  10581. executionContext = 0,
  10582. workInProgressRoot = null,
  10583. workInProgress = null,
  10584. workInProgressRootRenderLanes = 0,
  10585. workInProgressSuspendedReason = 0,
  10586. workInProgressThrownValue = null,
  10587. workInProgressRootDidSkipSuspendedSiblings = !1,
  10588. workInProgressRootIsPrerendering = !1,
  10589. workInProgressRootDidAttachPingListener = !1,
  10590. entangledRenderLanes = 0,
  10591. workInProgressRootExitStatus = 0,
  10592. workInProgressRootSkippedLanes = 0,
  10593. workInProgressRootInterleavedUpdatedLanes = 0,
  10594. workInProgressRootPingedLanes = 0,
  10595. workInProgressDeferredLane = 0,
  10596. workInProgressSuspendedRetryLanes = 0,
  10597. workInProgressRootConcurrentErrors = null,
  10598. workInProgressRootRecoverableErrors = null,
  10599. workInProgressRootDidIncludeRecursiveRenderUpdate = !1,
  10600. globalMostRecentFallbackTime = 0,
  10601. globalMostRecentTransitionTime = 0,
  10602. workInProgressRootRenderTargetTime = Infinity,
  10603. workInProgressTransitions = null,
  10604. legacyErrorBoundariesThatAlreadyFailed = null,
  10605. pendingEffectsStatus = 0,
  10606. pendingEffectsRoot = null,
  10607. pendingFinishedWork = null,
  10608. pendingEffectsLanes = 0,
  10609. pendingEffectsRemainingLanes = 0,
  10610. pendingPassiveTransitions = null,
  10611. pendingRecoverableErrors = null,
  10612. nestedUpdateCount = 0,
  10613. rootWithNestedUpdates = null;
  10614. function requestUpdateLane() {
  10615. return 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes
  10616. ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes
  10617. : null !== ReactSharedInternals.T
  10618. ? requestTransitionLane()
  10619. : resolveUpdatePriority();
  10620. }
  10621. function requestDeferredLane() {
  10622. if (0 === workInProgressDeferredLane)
  10623. if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {
  10624. var lane = nextTransitionDeferredLane;
  10625. nextTransitionDeferredLane <<= 1;
  10626. 0 === (nextTransitionDeferredLane & 3932160) &&
  10627. (nextTransitionDeferredLane = 262144);
  10628. workInProgressDeferredLane = lane;
  10629. } else workInProgressDeferredLane = 536870912;
  10630. lane = suspenseHandlerStackCursor.current;
  10631. null !== lane && (lane.flags |= 32);
  10632. return workInProgressDeferredLane;
  10633. }
  10634. function scheduleUpdateOnFiber(root, fiber, lane) {
  10635. if (
  10636. (root === workInProgressRoot &&
  10637. (2 === workInProgressSuspendedReason ||
  10638. 9 === workInProgressSuspendedReason)) ||
  10639. null !== root.cancelPendingCommit
  10640. )
  10641. prepareFreshStack(root, 0),
  10642. markRootSuspended(
  10643. root,
  10644. workInProgressRootRenderLanes,
  10645. workInProgressDeferredLane,
  10646. !1
  10647. );
  10648. markRootUpdated$1(root, lane);
  10649. if (0 === (executionContext & 2) || root !== workInProgressRoot)
  10650. root === workInProgressRoot &&
  10651. (0 === (executionContext & 2) &&
  10652. (workInProgressRootInterleavedUpdatedLanes |= lane),
  10653. 4 === workInProgressRootExitStatus &&
  10654. markRootSuspended(
  10655. root,
  10656. workInProgressRootRenderLanes,
  10657. workInProgressDeferredLane,
  10658. !1
  10659. )),
  10660. ensureRootIsScheduled(root);
  10661. }
  10662. function performWorkOnRoot(root$jscomp$0, lanes, forceSync) {
  10663. if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
  10664. var shouldTimeSlice =
  10665. (!forceSync &&
  10666. 0 === (lanes & 127) &&
  10667. 0 === (lanes & root$jscomp$0.expiredLanes)) ||
  10668. checkIfRootIsPrerendering(root$jscomp$0, lanes),
  10669. exitStatus = shouldTimeSlice
  10670. ? renderRootConcurrent(root$jscomp$0, lanes)
  10671. : renderRootSync(root$jscomp$0, lanes, !0),
  10672. renderWasConcurrent = shouldTimeSlice;
  10673. do {
  10674. if (0 === exitStatus) {
  10675. workInProgressRootIsPrerendering &&
  10676. !shouldTimeSlice &&
  10677. markRootSuspended(root$jscomp$0, lanes, 0, !1);
  10678. break;
  10679. } else {
  10680. forceSync = root$jscomp$0.current.alternate;
  10681. if (
  10682. renderWasConcurrent &&
  10683. !isRenderConsistentWithExternalStores(forceSync)
  10684. ) {
  10685. exitStatus = renderRootSync(root$jscomp$0, lanes, !1);
  10686. renderWasConcurrent = !1;
  10687. continue;
  10688. }
  10689. if (2 === exitStatus) {
  10690. renderWasConcurrent = lanes;
  10691. if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent)
  10692. var JSCompiler_inline_result = 0;
  10693. else
  10694. (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913),
  10695. (JSCompiler_inline_result =
  10696. 0 !== JSCompiler_inline_result
  10697. ? JSCompiler_inline_result
  10698. : JSCompiler_inline_result & 536870912
  10699. ? 536870912
  10700. : 0);
  10701. if (0 !== JSCompiler_inline_result) {
  10702. lanes = JSCompiler_inline_result;
  10703. a: {
  10704. var root = root$jscomp$0;
  10705. exitStatus = workInProgressRootConcurrentErrors;
  10706. var wasRootDehydrated = root.current.memoizedState.isDehydrated;
  10707. wasRootDehydrated &&
  10708. (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256);
  10709. JSCompiler_inline_result = renderRootSync(
  10710. root,
  10711. JSCompiler_inline_result,
  10712. !1
  10713. );
  10714. if (2 !== JSCompiler_inline_result) {
  10715. if (
  10716. workInProgressRootDidAttachPingListener &&
  10717. !wasRootDehydrated
  10718. ) {
  10719. root.errorRecoveryDisabledLanes |= renderWasConcurrent;
  10720. workInProgressRootInterleavedUpdatedLanes |=
  10721. renderWasConcurrent;
  10722. exitStatus = 4;
  10723. break a;
  10724. }
  10725. renderWasConcurrent = workInProgressRootRecoverableErrors;
  10726. workInProgressRootRecoverableErrors = exitStatus;
  10727. null !== renderWasConcurrent &&
  10728. (null === workInProgressRootRecoverableErrors
  10729. ? (workInProgressRootRecoverableErrors = renderWasConcurrent)
  10730. : workInProgressRootRecoverableErrors.push.apply(
  10731. workInProgressRootRecoverableErrors,
  10732. renderWasConcurrent
  10733. ));
  10734. }
  10735. exitStatus = JSCompiler_inline_result;
  10736. }
  10737. renderWasConcurrent = !1;
  10738. if (2 !== exitStatus) continue;
  10739. }
  10740. }
  10741. if (1 === exitStatus) {
  10742. prepareFreshStack(root$jscomp$0, 0);
  10743. markRootSuspended(root$jscomp$0, lanes, 0, !0);
  10744. break;
  10745. }
  10746. a: {
  10747. shouldTimeSlice = root$jscomp$0;
  10748. renderWasConcurrent = exitStatus;
  10749. switch (renderWasConcurrent) {
  10750. case 0:
  10751. case 1:
  10752. throw Error(formatProdErrorMessage(345));
  10753. case 4:
  10754. if ((lanes & 4194048) !== lanes) break;
  10755. case 6:
  10756. markRootSuspended(
  10757. shouldTimeSlice,
  10758. lanes,
  10759. workInProgressDeferredLane,
  10760. !workInProgressRootDidSkipSuspendedSiblings
  10761. );
  10762. break a;
  10763. case 2:
  10764. workInProgressRootRecoverableErrors = null;
  10765. break;
  10766. case 3:
  10767. case 5:
  10768. break;
  10769. default:
  10770. throw Error(formatProdErrorMessage(329));
  10771. }
  10772. if (
  10773. (lanes & 62914560) === lanes &&
  10774. ((exitStatus = globalMostRecentFallbackTime + 300 - now()),
  10775. 10 < exitStatus)
  10776. ) {
  10777. markRootSuspended(
  10778. shouldTimeSlice,
  10779. lanes,
  10780. workInProgressDeferredLane,
  10781. !workInProgressRootDidSkipSuspendedSiblings
  10782. );
  10783. if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;
  10784. pendingEffectsLanes = lanes;
  10785. shouldTimeSlice.timeoutHandle = scheduleTimeout(
  10786. commitRootWhenReady.bind(
  10787. null,
  10788. shouldTimeSlice,
  10789. forceSync,
  10790. workInProgressRootRecoverableErrors,
  10791. workInProgressTransitions,
  10792. workInProgressRootDidIncludeRecursiveRenderUpdate,
  10793. lanes,
  10794. workInProgressDeferredLane,
  10795. workInProgressRootInterleavedUpdatedLanes,
  10796. workInProgressSuspendedRetryLanes,
  10797. workInProgressRootDidSkipSuspendedSiblings,
  10798. renderWasConcurrent,
  10799. "Throttled",
  10800. -0,
  10801. 0
  10802. ),
  10803. exitStatus
  10804. );
  10805. break a;
  10806. }
  10807. commitRootWhenReady(
  10808. shouldTimeSlice,
  10809. forceSync,
  10810. workInProgressRootRecoverableErrors,
  10811. workInProgressTransitions,
  10812. workInProgressRootDidIncludeRecursiveRenderUpdate,
  10813. lanes,
  10814. workInProgressDeferredLane,
  10815. workInProgressRootInterleavedUpdatedLanes,
  10816. workInProgressSuspendedRetryLanes,
  10817. workInProgressRootDidSkipSuspendedSiblings,
  10818. renderWasConcurrent,
  10819. null,
  10820. -0,
  10821. 0
  10822. );
  10823. }
  10824. }
  10825. break;
  10826. } while (1);
  10827. ensureRootIsScheduled(root$jscomp$0);
  10828. }
  10829. function commitRootWhenReady(
  10830. root,
  10831. finishedWork,
  10832. recoverableErrors,
  10833. transitions,
  10834. didIncludeRenderPhaseUpdate,
  10835. lanes,
  10836. spawnedLane,
  10837. updatedLanes,
  10838. suspendedRetryLanes,
  10839. didSkipSuspendedSiblings,
  10840. exitStatus,
  10841. suspendedCommitReason,
  10842. completedRenderStartTime,
  10843. completedRenderEndTime
  10844. ) {
  10845. root.timeoutHandle = -1;
  10846. suspendedCommitReason = finishedWork.subtreeFlags;
  10847. if (
  10848. suspendedCommitReason & 8192 ||
  10849. 16785408 === (suspendedCommitReason & 16785408)
  10850. ) {
  10851. suspendedCommitReason = {
  10852. stylesheets: null,
  10853. count: 0,
  10854. imgCount: 0,
  10855. imgBytes: 0,
  10856. suspenseyImages: [],
  10857. waitingForImages: !0,
  10858. waitingForViewTransition: !1,
  10859. unsuspend: noop$1
  10860. };
  10861. accumulateSuspenseyCommitOnFiber(
  10862. finishedWork,
  10863. lanes,
  10864. suspendedCommitReason
  10865. );
  10866. var timeoutOffset =
  10867. (lanes & 62914560) === lanes
  10868. ? globalMostRecentFallbackTime - now()
  10869. : (lanes & 4194048) === lanes
  10870. ? globalMostRecentTransitionTime - now()
  10871. : 0;
  10872. timeoutOffset = waitForCommitToBeReady(
  10873. suspendedCommitReason,
  10874. timeoutOffset
  10875. );
  10876. if (null !== timeoutOffset) {
  10877. pendingEffectsLanes = lanes;
  10878. root.cancelPendingCommit = timeoutOffset(
  10879. commitRoot.bind(
  10880. null,
  10881. root,
  10882. finishedWork,
  10883. lanes,
  10884. recoverableErrors,
  10885. transitions,
  10886. didIncludeRenderPhaseUpdate,
  10887. spawnedLane,
  10888. updatedLanes,
  10889. suspendedRetryLanes,
  10890. exitStatus,
  10891. suspendedCommitReason,
  10892. null,
  10893. completedRenderStartTime,
  10894. completedRenderEndTime
  10895. )
  10896. );
  10897. markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings);
  10898. return;
  10899. }
  10900. }
  10901. commitRoot(
  10902. root,
  10903. finishedWork,
  10904. lanes,
  10905. recoverableErrors,
  10906. transitions,
  10907. didIncludeRenderPhaseUpdate,
  10908. spawnedLane,
  10909. updatedLanes,
  10910. suspendedRetryLanes
  10911. );
  10912. }
  10913. function isRenderConsistentWithExternalStores(finishedWork) {
  10914. for (var node = finishedWork; ; ) {
  10915. var tag = node.tag;
  10916. if (
  10917. (0 === tag || 11 === tag || 15 === tag) &&
  10918. node.flags & 16384 &&
  10919. ((tag = node.updateQueue),
  10920. null !== tag && ((tag = tag.stores), null !== tag))
  10921. )
  10922. for (var i = 0; i < tag.length; i++) {
  10923. var check = tag[i],
  10924. getSnapshot = check.getSnapshot;
  10925. check = check.value;
  10926. try {
  10927. if (!objectIs(getSnapshot(), check)) return !1;
  10928. } catch (error) {
  10929. return !1;
  10930. }
  10931. }
  10932. tag = node.child;
  10933. if (node.subtreeFlags & 16384 && null !== tag)
  10934. (tag.return = node), (node = tag);
  10935. else {
  10936. if (node === finishedWork) break;
  10937. for (; null === node.sibling; ) {
  10938. if (null === node.return || node.return === finishedWork) return !0;
  10939. node = node.return;
  10940. }
  10941. node.sibling.return = node.return;
  10942. node = node.sibling;
  10943. }
  10944. }
  10945. return !0;
  10946. }
  10947. function markRootSuspended(
  10948. root,
  10949. suspendedLanes,
  10950. spawnedLane,
  10951. didAttemptEntireTree
  10952. ) {
  10953. suspendedLanes &= ~workInProgressRootPingedLanes;
  10954. suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
  10955. root.suspendedLanes |= suspendedLanes;
  10956. root.pingedLanes &= ~suspendedLanes;
  10957. didAttemptEntireTree && (root.warmLanes |= suspendedLanes);
  10958. didAttemptEntireTree = root.expirationTimes;
  10959. for (var lanes = suspendedLanes; 0 < lanes; ) {
  10960. var index$6 = 31 - clz32(lanes),
  10961. lane = 1 << index$6;
  10962. didAttemptEntireTree[index$6] = -1;
  10963. lanes &= ~lane;
  10964. }
  10965. 0 !== spawnedLane &&
  10966. markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
  10967. }
  10968. function flushSyncWork$1() {
  10969. return 0 === (executionContext & 6)
  10970. ? (flushSyncWorkAcrossRoots_impl(0, !1), !1)
  10971. : !0;
  10972. }
  10973. function resetWorkInProgressStack() {
  10974. if (null !== workInProgress) {
  10975. if (0 === workInProgressSuspendedReason)
  10976. var interruptedWork = workInProgress.return;
  10977. else
  10978. (interruptedWork = workInProgress),
  10979. (lastContextDependency = currentlyRenderingFiber$1 = null),
  10980. resetHooksOnUnwind(interruptedWork),
  10981. (thenableState$1 = null),
  10982. (thenableIndexCounter$1 = 0),
  10983. (interruptedWork = workInProgress);
  10984. for (; null !== interruptedWork; )
  10985. unwindInterruptedWork(interruptedWork.alternate, interruptedWork),
  10986. (interruptedWork = interruptedWork.return);
  10987. workInProgress = null;
  10988. }
  10989. }
  10990. function prepareFreshStack(root, lanes) {
  10991. var timeoutHandle = root.timeoutHandle;
  10992. -1 !== timeoutHandle &&
  10993. ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
  10994. timeoutHandle = root.cancelPendingCommit;
  10995. null !== timeoutHandle &&
  10996. ((root.cancelPendingCommit = null), timeoutHandle());
  10997. pendingEffectsLanes = 0;
  10998. resetWorkInProgressStack();
  10999. workInProgressRoot = root;
  11000. workInProgress = timeoutHandle = createWorkInProgress(root.current, null);
  11001. workInProgressRootRenderLanes = lanes;
  11002. workInProgressSuspendedReason = 0;
  11003. workInProgressThrownValue = null;
  11004. workInProgressRootDidSkipSuspendedSiblings = !1;
  11005. workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);
  11006. workInProgressRootDidAttachPingListener = !1;
  11007. workInProgressSuspendedRetryLanes =
  11008. workInProgressDeferredLane =
  11009. workInProgressRootPingedLanes =
  11010. workInProgressRootInterleavedUpdatedLanes =
  11011. workInProgressRootSkippedLanes =
  11012. workInProgressRootExitStatus =
  11013. 0;
  11014. workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =
  11015. null;
  11016. workInProgressRootDidIncludeRecursiveRenderUpdate = !1;
  11017. 0 !== (lanes & 8) && (lanes |= lanes & 32);
  11018. var allEntangledLanes = root.entangledLanes;
  11019. if (0 !== allEntangledLanes)
  11020. for (
  11021. root = root.entanglements, allEntangledLanes &= lanes;
  11022. 0 < allEntangledLanes;
  11023. ) {
  11024. var index$4 = 31 - clz32(allEntangledLanes),
  11025. lane = 1 << index$4;
  11026. lanes |= root[index$4];
  11027. allEntangledLanes &= ~lane;
  11028. }
  11029. entangledRenderLanes = lanes;
  11030. finishQueueingConcurrentUpdates();
  11031. return timeoutHandle;
  11032. }
  11033. function handleThrow(root, thrownValue) {
  11034. currentlyRenderingFiber = null;
  11035. ReactSharedInternals.H = ContextOnlyDispatcher;
  11036. thrownValue === SuspenseException || thrownValue === SuspenseActionException
  11037. ? ((thrownValue = getSuspendedThenable()),
  11038. (workInProgressSuspendedReason = 3))
  11039. : thrownValue === SuspenseyCommitException
  11040. ? ((thrownValue = getSuspendedThenable()),
  11041. (workInProgressSuspendedReason = 4))
  11042. : (workInProgressSuspendedReason =
  11043. thrownValue === SelectiveHydrationException
  11044. ? 8
  11045. : null !== thrownValue &&
  11046. "object" === typeof thrownValue &&
  11047. "function" === typeof thrownValue.then
  11048. ? 6
  11049. : 1);
  11050. workInProgressThrownValue = thrownValue;
  11051. null === workInProgress &&
  11052. ((workInProgressRootExitStatus = 1),
  11053. logUncaughtError(
  11054. root,
  11055. createCapturedValueAtFiber(thrownValue, root.current)
  11056. ));
  11057. }
  11058. function shouldRemainOnPreviousScreen() {
  11059. var handler = suspenseHandlerStackCursor.current;
  11060. return null === handler
  11061. ? !0
  11062. : (workInProgressRootRenderLanes & 4194048) ===
  11063. workInProgressRootRenderLanes
  11064. ? null === shellBoundary
  11065. ? !0
  11066. : !1
  11067. : (workInProgressRootRenderLanes & 62914560) ===
  11068. workInProgressRootRenderLanes ||
  11069. 0 !== (workInProgressRootRenderLanes & 536870912)
  11070. ? handler === shellBoundary
  11071. : !1;
  11072. }
  11073. function pushDispatcher() {
  11074. var prevDispatcher = ReactSharedInternals.H;
  11075. ReactSharedInternals.H = ContextOnlyDispatcher;
  11076. return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
  11077. }
  11078. function pushAsyncDispatcher() {
  11079. var prevAsyncDispatcher = ReactSharedInternals.A;
  11080. ReactSharedInternals.A = DefaultAsyncDispatcher;
  11081. return prevAsyncDispatcher;
  11082. }
  11083. function renderDidSuspendDelayIfPossible() {
  11084. workInProgressRootExitStatus = 4;
  11085. workInProgressRootDidSkipSuspendedSiblings ||
  11086. ((workInProgressRootRenderLanes & 4194048) !==
  11087. workInProgressRootRenderLanes &&
  11088. null !== suspenseHandlerStackCursor.current) ||
  11089. (workInProgressRootIsPrerendering = !0);
  11090. (0 === (workInProgressRootSkippedLanes & 134217727) &&
  11091. 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||
  11092. null === workInProgressRoot ||
  11093. markRootSuspended(
  11094. workInProgressRoot,
  11095. workInProgressRootRenderLanes,
  11096. workInProgressDeferredLane,
  11097. !1
  11098. );
  11099. }
  11100. function renderRootSync(root, lanes, shouldYieldForPrerendering) {
  11101. var prevExecutionContext = executionContext;
  11102. executionContext |= 2;
  11103. var prevDispatcher = pushDispatcher(),
  11104. prevAsyncDispatcher = pushAsyncDispatcher();
  11105. if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)
  11106. (workInProgressTransitions = null), prepareFreshStack(root, lanes);
  11107. lanes = !1;
  11108. var exitStatus = workInProgressRootExitStatus;
  11109. a: do
  11110. try {
  11111. if (0 !== workInProgressSuspendedReason && null !== workInProgress) {
  11112. var unitOfWork = workInProgress,
  11113. thrownValue = workInProgressThrownValue;
  11114. switch (workInProgressSuspendedReason) {
  11115. case 8:
  11116. resetWorkInProgressStack();
  11117. exitStatus = 6;
  11118. break a;
  11119. case 3:
  11120. case 2:
  11121. case 9:
  11122. case 6:
  11123. null === suspenseHandlerStackCursor.current && (lanes = !0);
  11124. var reason = workInProgressSuspendedReason;
  11125. workInProgressSuspendedReason = 0;
  11126. workInProgressThrownValue = null;
  11127. throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);
  11128. if (
  11129. shouldYieldForPrerendering &&
  11130. workInProgressRootIsPrerendering
  11131. ) {
  11132. exitStatus = 0;
  11133. break a;
  11134. }
  11135. break;
  11136. default:
  11137. (reason = workInProgressSuspendedReason),
  11138. (workInProgressSuspendedReason = 0),
  11139. (workInProgressThrownValue = null),
  11140. throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);
  11141. }
  11142. }
  11143. workLoopSync();
  11144. exitStatus = workInProgressRootExitStatus;
  11145. break;
  11146. } catch (thrownValue$165) {
  11147. handleThrow(root, thrownValue$165);
  11148. }
  11149. while (1);
  11150. lanes && root.shellSuspendCounter++;
  11151. lastContextDependency = currentlyRenderingFiber$1 = null;
  11152. executionContext = prevExecutionContext;
  11153. ReactSharedInternals.H = prevDispatcher;
  11154. ReactSharedInternals.A = prevAsyncDispatcher;
  11155. null === workInProgress &&
  11156. ((workInProgressRoot = null),
  11157. (workInProgressRootRenderLanes = 0),
  11158. finishQueueingConcurrentUpdates());
  11159. return exitStatus;
  11160. }
  11161. function workLoopSync() {
  11162. for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
  11163. }
  11164. function renderRootConcurrent(root, lanes) {
  11165. var prevExecutionContext = executionContext;
  11166. executionContext |= 2;
  11167. var prevDispatcher = pushDispatcher(),
  11168. prevAsyncDispatcher = pushAsyncDispatcher();
  11169. workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes
  11170. ? ((workInProgressTransitions = null),
  11171. (workInProgressRootRenderTargetTime = now() + 500),
  11172. prepareFreshStack(root, lanes))
  11173. : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering(
  11174. root,
  11175. lanes
  11176. ));
  11177. a: do
  11178. try {
  11179. if (0 !== workInProgressSuspendedReason && null !== workInProgress) {
  11180. lanes = workInProgress;
  11181. var thrownValue = workInProgressThrownValue;
  11182. b: switch (workInProgressSuspendedReason) {
  11183. case 1:
  11184. workInProgressSuspendedReason = 0;
  11185. workInProgressThrownValue = null;
  11186. throwAndUnwindWorkLoop(root, lanes, thrownValue, 1);
  11187. break;
  11188. case 2:
  11189. case 9:
  11190. if (isThenableResolved(thrownValue)) {
  11191. workInProgressSuspendedReason = 0;
  11192. workInProgressThrownValue = null;
  11193. replaySuspendedUnitOfWork(lanes);
  11194. break;
  11195. }
  11196. lanes = function () {
  11197. (2 !== workInProgressSuspendedReason &&
  11198. 9 !== workInProgressSuspendedReason) ||
  11199. workInProgressRoot !== root ||
  11200. (workInProgressSuspendedReason = 7);
  11201. ensureRootIsScheduled(root);
  11202. };
  11203. thrownValue.then(lanes, lanes);
  11204. break a;
  11205. case 3:
  11206. workInProgressSuspendedReason = 7;
  11207. break a;
  11208. case 4:
  11209. workInProgressSuspendedReason = 5;
  11210. break a;
  11211. case 7:
  11212. isThenableResolved(thrownValue)
  11213. ? ((workInProgressSuspendedReason = 0),
  11214. (workInProgressThrownValue = null),
  11215. replaySuspendedUnitOfWork(lanes))
  11216. : ((workInProgressSuspendedReason = 0),
  11217. (workInProgressThrownValue = null),
  11218. throwAndUnwindWorkLoop(root, lanes, thrownValue, 7));
  11219. break;
  11220. case 5:
  11221. var resource = null;
  11222. switch (workInProgress.tag) {
  11223. case 26:
  11224. resource = workInProgress.memoizedState;
  11225. case 5:
  11226. case 27:
  11227. var hostFiber = workInProgress;
  11228. if (
  11229. resource
  11230. ? preloadResource(resource)
  11231. : hostFiber.stateNode.complete
  11232. ) {
  11233. workInProgressSuspendedReason = 0;
  11234. workInProgressThrownValue = null;
  11235. var sibling = hostFiber.sibling;
  11236. if (null !== sibling) workInProgress = sibling;
  11237. else {
  11238. var returnFiber = hostFiber.return;
  11239. null !== returnFiber
  11240. ? ((workInProgress = returnFiber),
  11241. completeUnitOfWork(returnFiber))
  11242. : (workInProgress = null);
  11243. }
  11244. break b;
  11245. }
  11246. }
  11247. workInProgressSuspendedReason = 0;
  11248. workInProgressThrownValue = null;
  11249. throwAndUnwindWorkLoop(root, lanes, thrownValue, 5);
  11250. break;
  11251. case 6:
  11252. workInProgressSuspendedReason = 0;
  11253. workInProgressThrownValue = null;
  11254. throwAndUnwindWorkLoop(root, lanes, thrownValue, 6);
  11255. break;
  11256. case 8:
  11257. resetWorkInProgressStack();
  11258. workInProgressRootExitStatus = 6;
  11259. break a;
  11260. default:
  11261. throw Error(formatProdErrorMessage(462));
  11262. }
  11263. }
  11264. workLoopConcurrentByScheduler();
  11265. break;
  11266. } catch (thrownValue$167) {
  11267. handleThrow(root, thrownValue$167);
  11268. }
  11269. while (1);
  11270. lastContextDependency = currentlyRenderingFiber$1 = null;
  11271. ReactSharedInternals.H = prevDispatcher;
  11272. ReactSharedInternals.A = prevAsyncDispatcher;
  11273. executionContext = prevExecutionContext;
  11274. if (null !== workInProgress) return 0;
  11275. workInProgressRoot = null;
  11276. workInProgressRootRenderLanes = 0;
  11277. finishQueueingConcurrentUpdates();
  11278. return workInProgressRootExitStatus;
  11279. }
  11280. function workLoopConcurrentByScheduler() {
  11281. for (; null !== workInProgress && !shouldYield(); )
  11282. performUnitOfWork(workInProgress);
  11283. }
  11284. function performUnitOfWork(unitOfWork) {
  11285. var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);
  11286. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  11287. null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
  11288. }
  11289. function replaySuspendedUnitOfWork(unitOfWork) {
  11290. var next = unitOfWork;
  11291. var current = next.alternate;
  11292. switch (next.tag) {
  11293. case 15:
  11294. case 0:
  11295. next = replayFunctionComponent(
  11296. current,
  11297. next,
  11298. next.pendingProps,
  11299. next.type,
  11300. void 0,
  11301. workInProgressRootRenderLanes
  11302. );
  11303. break;
  11304. case 11:
  11305. next = replayFunctionComponent(
  11306. current,
  11307. next,
  11308. next.pendingProps,
  11309. next.type.render,
  11310. next.ref,
  11311. workInProgressRootRenderLanes
  11312. );
  11313. break;
  11314. case 5:
  11315. resetHooksOnUnwind(next);
  11316. default:
  11317. unwindInterruptedWork(current, next),
  11318. (next = workInProgress =
  11319. resetWorkInProgress(next, entangledRenderLanes)),
  11320. (next = beginWork(current, next, entangledRenderLanes));
  11321. }
  11322. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  11323. null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
  11324. }
  11325. function throwAndUnwindWorkLoop(
  11326. root,
  11327. unitOfWork,
  11328. thrownValue,
  11329. suspendedReason
  11330. ) {
  11331. lastContextDependency = currentlyRenderingFiber$1 = null;
  11332. resetHooksOnUnwind(unitOfWork);
  11333. thenableState$1 = null;
  11334. thenableIndexCounter$1 = 0;
  11335. var returnFiber = unitOfWork.return;
  11336. try {
  11337. if (
  11338. throwException(
  11339. root,
  11340. returnFiber,
  11341. unitOfWork,
  11342. thrownValue,
  11343. workInProgressRootRenderLanes
  11344. )
  11345. ) {
  11346. workInProgressRootExitStatus = 1;
  11347. logUncaughtError(
  11348. root,
  11349. createCapturedValueAtFiber(thrownValue, root.current)
  11350. );
  11351. workInProgress = null;
  11352. return;
  11353. }
  11354. } catch (error) {
  11355. if (null !== returnFiber) throw ((workInProgress = returnFiber), error);
  11356. workInProgressRootExitStatus = 1;
  11357. logUncaughtError(
  11358. root,
  11359. createCapturedValueAtFiber(thrownValue, root.current)
  11360. );
  11361. workInProgress = null;
  11362. return;
  11363. }
  11364. if (unitOfWork.flags & 32768) {
  11365. if (isHydrating || 1 === suspendedReason) root = !0;
  11366. else if (
  11367. workInProgressRootIsPrerendering ||
  11368. 0 !== (workInProgressRootRenderLanes & 536870912)
  11369. )
  11370. root = !1;
  11371. else if (
  11372. ((workInProgressRootDidSkipSuspendedSiblings = root = !0),
  11373. 2 === suspendedReason ||
  11374. 9 === suspendedReason ||
  11375. 3 === suspendedReason ||
  11376. 6 === suspendedReason)
  11377. )
  11378. (suspendedReason = suspenseHandlerStackCursor.current),
  11379. null !== suspendedReason &&
  11380. 13 === suspendedReason.tag &&
  11381. (suspendedReason.flags |= 16384);
  11382. unwindUnitOfWork(unitOfWork, root);
  11383. } else completeUnitOfWork(unitOfWork);
  11384. }
  11385. function completeUnitOfWork(unitOfWork) {
  11386. var completedWork = unitOfWork;
  11387. do {
  11388. if (0 !== (completedWork.flags & 32768)) {
  11389. unwindUnitOfWork(
  11390. completedWork,
  11391. workInProgressRootDidSkipSuspendedSiblings
  11392. );
  11393. return;
  11394. }
  11395. unitOfWork = completedWork.return;
  11396. var next = completeWork(
  11397. completedWork.alternate,
  11398. completedWork,
  11399. entangledRenderLanes
  11400. );
  11401. if (null !== next) {
  11402. workInProgress = next;
  11403. return;
  11404. }
  11405. completedWork = completedWork.sibling;
  11406. if (null !== completedWork) {
  11407. workInProgress = completedWork;
  11408. return;
  11409. }
  11410. workInProgress = completedWork = unitOfWork;
  11411. } while (null !== completedWork);
  11412. 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
  11413. }
  11414. function unwindUnitOfWork(unitOfWork, skipSiblings) {
  11415. do {
  11416. var next = unwindWork(unitOfWork.alternate, unitOfWork);
  11417. if (null !== next) {
  11418. next.flags &= 32767;
  11419. workInProgress = next;
  11420. return;
  11421. }
  11422. next = unitOfWork.return;
  11423. null !== next &&
  11424. ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null));
  11425. if (
  11426. !skipSiblings &&
  11427. ((unitOfWork = unitOfWork.sibling), null !== unitOfWork)
  11428. ) {
  11429. workInProgress = unitOfWork;
  11430. return;
  11431. }
  11432. workInProgress = unitOfWork = next;
  11433. } while (null !== unitOfWork);
  11434. workInProgressRootExitStatus = 6;
  11435. workInProgress = null;
  11436. }
  11437. function commitRoot(
  11438. root,
  11439. finishedWork,
  11440. lanes,
  11441. recoverableErrors,
  11442. transitions,
  11443. didIncludeRenderPhaseUpdate,
  11444. spawnedLane,
  11445. updatedLanes,
  11446. suspendedRetryLanes
  11447. ) {
  11448. root.cancelPendingCommit = null;
  11449. do flushPendingEffects();
  11450. while (0 !== pendingEffectsStatus);
  11451. if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));
  11452. if (null !== finishedWork) {
  11453. if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));
  11454. didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
  11455. didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
  11456. markRootFinished(
  11457. root,
  11458. lanes,
  11459. didIncludeRenderPhaseUpdate,
  11460. spawnedLane,
  11461. updatedLanes,
  11462. suspendedRetryLanes
  11463. );
  11464. root === workInProgressRoot &&
  11465. ((workInProgress = workInProgressRoot = null),
  11466. (workInProgressRootRenderLanes = 0));
  11467. pendingFinishedWork = finishedWork;
  11468. pendingEffectsRoot = root;
  11469. pendingEffectsLanes = lanes;
  11470. pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
  11471. pendingPassiveTransitions = transitions;
  11472. pendingRecoverableErrors = recoverableErrors;
  11473. 0 !== (finishedWork.subtreeFlags & 10256) ||
  11474. 0 !== (finishedWork.flags & 10256)
  11475. ? ((root.callbackNode = null),
  11476. (root.callbackPriority = 0),
  11477. scheduleCallback$1(NormalPriority$1, function () {
  11478. flushPassiveEffects();
  11479. return null;
  11480. }))
  11481. : ((root.callbackNode = null), (root.callbackPriority = 0));
  11482. recoverableErrors = 0 !== (finishedWork.flags & 13878);
  11483. if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {
  11484. recoverableErrors = ReactSharedInternals.T;
  11485. ReactSharedInternals.T = null;
  11486. transitions = ReactDOMSharedInternals.p;
  11487. ReactDOMSharedInternals.p = 2;
  11488. spawnedLane = executionContext;
  11489. executionContext |= 4;
  11490. try {
  11491. commitBeforeMutationEffects(root, finishedWork, lanes);
  11492. } finally {
  11493. (executionContext = spawnedLane),
  11494. (ReactDOMSharedInternals.p = transitions),
  11495. (ReactSharedInternals.T = recoverableErrors);
  11496. }
  11497. }
  11498. pendingEffectsStatus = 1;
  11499. flushMutationEffects();
  11500. flushLayoutEffects();
  11501. flushSpawnedWork();
  11502. }
  11503. }
  11504. function flushMutationEffects() {
  11505. if (1 === pendingEffectsStatus) {
  11506. pendingEffectsStatus = 0;
  11507. var root = pendingEffectsRoot,
  11508. finishedWork = pendingFinishedWork,
  11509. rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
  11510. if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
  11511. rootMutationHasEffect = ReactSharedInternals.T;
  11512. ReactSharedInternals.T = null;
  11513. var previousPriority = ReactDOMSharedInternals.p;
  11514. ReactDOMSharedInternals.p = 2;
  11515. var prevExecutionContext = executionContext;
  11516. executionContext |= 4;
  11517. try {
  11518. commitMutationEffectsOnFiber(finishedWork, root);
  11519. var priorSelectionInformation = selectionInformation,
  11520. curFocusedElem = getActiveElementDeep(root.containerInfo),
  11521. priorFocusedElem = priorSelectionInformation.focusedElem,
  11522. priorSelectionRange = priorSelectionInformation.selectionRange;
  11523. if (
  11524. curFocusedElem !== priorFocusedElem &&
  11525. priorFocusedElem &&
  11526. priorFocusedElem.ownerDocument &&
  11527. containsNode(
  11528. priorFocusedElem.ownerDocument.documentElement,
  11529. priorFocusedElem
  11530. )
  11531. ) {
  11532. if (
  11533. null !== priorSelectionRange &&
  11534. hasSelectionCapabilities(priorFocusedElem)
  11535. ) {
  11536. var start = priorSelectionRange.start,
  11537. end = priorSelectionRange.end;
  11538. void 0 === end && (end = start);
  11539. if ("selectionStart" in priorFocusedElem)
  11540. (priorFocusedElem.selectionStart = start),
  11541. (priorFocusedElem.selectionEnd = Math.min(
  11542. end,
  11543. priorFocusedElem.value.length
  11544. ));
  11545. else {
  11546. var doc = priorFocusedElem.ownerDocument || document,
  11547. win = (doc && doc.defaultView) || window;
  11548. if (win.getSelection) {
  11549. var selection = win.getSelection(),
  11550. length = priorFocusedElem.textContent.length,
  11551. start$jscomp$0 = Math.min(priorSelectionRange.start, length),
  11552. end$jscomp$0 =
  11553. void 0 === priorSelectionRange.end
  11554. ? start$jscomp$0
  11555. : Math.min(priorSelectionRange.end, length);
  11556. !selection.extend &&
  11557. start$jscomp$0 > end$jscomp$0 &&
  11558. ((curFocusedElem = end$jscomp$0),
  11559. (end$jscomp$0 = start$jscomp$0),
  11560. (start$jscomp$0 = curFocusedElem));
  11561. var startMarker = getNodeForCharacterOffset(
  11562. priorFocusedElem,
  11563. start$jscomp$0
  11564. ),
  11565. endMarker = getNodeForCharacterOffset(
  11566. priorFocusedElem,
  11567. end$jscomp$0
  11568. );
  11569. if (
  11570. startMarker &&
  11571. endMarker &&
  11572. (1 !== selection.rangeCount ||
  11573. selection.anchorNode !== startMarker.node ||
  11574. selection.anchorOffset !== startMarker.offset ||
  11575. selection.focusNode !== endMarker.node ||
  11576. selection.focusOffset !== endMarker.offset)
  11577. ) {
  11578. var range = doc.createRange();
  11579. range.setStart(startMarker.node, startMarker.offset);
  11580. selection.removeAllRanges();
  11581. start$jscomp$0 > end$jscomp$0
  11582. ? (selection.addRange(range),
  11583. selection.extend(endMarker.node, endMarker.offset))
  11584. : (range.setEnd(endMarker.node, endMarker.offset),
  11585. selection.addRange(range));
  11586. }
  11587. }
  11588. }
  11589. }
  11590. doc = [];
  11591. for (
  11592. selection = priorFocusedElem;
  11593. (selection = selection.parentNode);
  11594. )
  11595. 1 === selection.nodeType &&
  11596. doc.push({
  11597. element: selection,
  11598. left: selection.scrollLeft,
  11599. top: selection.scrollTop
  11600. });
  11601. "function" === typeof priorFocusedElem.focus &&
  11602. priorFocusedElem.focus();
  11603. for (
  11604. priorFocusedElem = 0;
  11605. priorFocusedElem < doc.length;
  11606. priorFocusedElem++
  11607. ) {
  11608. var info = doc[priorFocusedElem];
  11609. info.element.scrollLeft = info.left;
  11610. info.element.scrollTop = info.top;
  11611. }
  11612. }
  11613. _enabled = !!eventsEnabled;
  11614. selectionInformation = eventsEnabled = null;
  11615. } finally {
  11616. (executionContext = prevExecutionContext),
  11617. (ReactDOMSharedInternals.p = previousPriority),
  11618. (ReactSharedInternals.T = rootMutationHasEffect);
  11619. }
  11620. }
  11621. root.current = finishedWork;
  11622. pendingEffectsStatus = 2;
  11623. }
  11624. }
  11625. function flushLayoutEffects() {
  11626. if (2 === pendingEffectsStatus) {
  11627. pendingEffectsStatus = 0;
  11628. var root = pendingEffectsRoot,
  11629. finishedWork = pendingFinishedWork,
  11630. rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);
  11631. if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {
  11632. rootHasLayoutEffect = ReactSharedInternals.T;
  11633. ReactSharedInternals.T = null;
  11634. var previousPriority = ReactDOMSharedInternals.p;
  11635. ReactDOMSharedInternals.p = 2;
  11636. var prevExecutionContext = executionContext;
  11637. executionContext |= 4;
  11638. try {
  11639. commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);
  11640. } finally {
  11641. (executionContext = prevExecutionContext),
  11642. (ReactDOMSharedInternals.p = previousPriority),
  11643. (ReactSharedInternals.T = rootHasLayoutEffect);
  11644. }
  11645. }
  11646. pendingEffectsStatus = 3;
  11647. }
  11648. }
  11649. function flushSpawnedWork() {
  11650. if (4 === pendingEffectsStatus || 3 === pendingEffectsStatus) {
  11651. pendingEffectsStatus = 0;
  11652. requestPaint();
  11653. var root = pendingEffectsRoot,
  11654. finishedWork = pendingFinishedWork,
  11655. lanes = pendingEffectsLanes,
  11656. recoverableErrors = pendingRecoverableErrors;
  11657. 0 !== (finishedWork.subtreeFlags & 10256) ||
  11658. 0 !== (finishedWork.flags & 10256)
  11659. ? (pendingEffectsStatus = 5)
  11660. : ((pendingEffectsStatus = 0),
  11661. (pendingFinishedWork = pendingEffectsRoot = null),
  11662. releaseRootPooledCache(root, root.pendingLanes));
  11663. var remainingLanes = root.pendingLanes;
  11664. 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
  11665. lanesToEventPriority(lanes);
  11666. finishedWork = finishedWork.stateNode;
  11667. if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
  11668. try {
  11669. injectedHook.onCommitFiberRoot(
  11670. rendererID,
  11671. finishedWork,
  11672. void 0,
  11673. 128 === (finishedWork.current.flags & 128)
  11674. );
  11675. } catch (err) {}
  11676. if (null !== recoverableErrors) {
  11677. finishedWork = ReactSharedInternals.T;
  11678. remainingLanes = ReactDOMSharedInternals.p;
  11679. ReactDOMSharedInternals.p = 2;
  11680. ReactSharedInternals.T = null;
  11681. try {
  11682. for (
  11683. var onRecoverableError = root.onRecoverableError, i = 0;
  11684. i < recoverableErrors.length;
  11685. i++
  11686. ) {
  11687. var recoverableError = recoverableErrors[i];
  11688. onRecoverableError(recoverableError.value, {
  11689. componentStack: recoverableError.stack
  11690. });
  11691. }
  11692. } finally {
  11693. (ReactSharedInternals.T = finishedWork),
  11694. (ReactDOMSharedInternals.p = remainingLanes);
  11695. }
  11696. }
  11697. 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();
  11698. ensureRootIsScheduled(root);
  11699. remainingLanes = root.pendingLanes;
  11700. 0 !== (lanes & 261930) && 0 !== (remainingLanes & 42)
  11701. ? root === rootWithNestedUpdates
  11702. ? nestedUpdateCount++
  11703. : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))
  11704. : (nestedUpdateCount = 0);
  11705. flushSyncWorkAcrossRoots_impl(0, !1);
  11706. }
  11707. }
  11708. function releaseRootPooledCache(root, remainingLanes) {
  11709. 0 === (root.pooledCacheLanes &= remainingLanes) &&
  11710. ((remainingLanes = root.pooledCache),
  11711. null != remainingLanes &&
  11712. ((root.pooledCache = null), releaseCache(remainingLanes)));
  11713. }
  11714. function flushPendingEffects() {
  11715. flushMutationEffects();
  11716. flushLayoutEffects();
  11717. flushSpawnedWork();
  11718. return flushPassiveEffects();
  11719. }
  11720. function flushPassiveEffects() {
  11721. if (5 !== pendingEffectsStatus) return !1;
  11722. var root = pendingEffectsRoot,
  11723. remainingLanes = pendingEffectsRemainingLanes;
  11724. pendingEffectsRemainingLanes = 0;
  11725. var renderPriority = lanesToEventPriority(pendingEffectsLanes),
  11726. prevTransition = ReactSharedInternals.T,
  11727. previousPriority = ReactDOMSharedInternals.p;
  11728. try {
  11729. ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;
  11730. ReactSharedInternals.T = null;
  11731. renderPriority = pendingPassiveTransitions;
  11732. pendingPassiveTransitions = null;
  11733. var root$jscomp$0 = pendingEffectsRoot,
  11734. lanes = pendingEffectsLanes;
  11735. pendingEffectsStatus = 0;
  11736. pendingFinishedWork = pendingEffectsRoot = null;
  11737. pendingEffectsLanes = 0;
  11738. if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331));
  11739. var prevExecutionContext = executionContext;
  11740. executionContext |= 4;
  11741. commitPassiveUnmountOnFiber(root$jscomp$0.current);
  11742. commitPassiveMountOnFiber(
  11743. root$jscomp$0,
  11744. root$jscomp$0.current,
  11745. lanes,
  11746. renderPriority
  11747. );
  11748. executionContext = prevExecutionContext;
  11749. flushSyncWorkAcrossRoots_impl(0, !1);
  11750. if (
  11751. injectedHook &&
  11752. "function" === typeof injectedHook.onPostCommitFiberRoot
  11753. )
  11754. try {
  11755. injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);
  11756. } catch (err) {}
  11757. return !0;
  11758. } finally {
  11759. (ReactDOMSharedInternals.p = previousPriority),
  11760. (ReactSharedInternals.T = prevTransition),
  11761. releaseRootPooledCache(root, remainingLanes);
  11762. }
  11763. }
  11764. function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
  11765. sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
  11766. sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
  11767. rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
  11768. null !== rootFiber &&
  11769. (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
  11770. }
  11771. function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
  11772. if (3 === sourceFiber.tag)
  11773. captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
  11774. else
  11775. for (; null !== nearestMountedAncestor; ) {
  11776. if (3 === nearestMountedAncestor.tag) {
  11777. captureCommitPhaseErrorOnRoot(
  11778. nearestMountedAncestor,
  11779. sourceFiber,
  11780. error
  11781. );
  11782. break;
  11783. } else if (1 === nearestMountedAncestor.tag) {
  11784. var instance = nearestMountedAncestor.stateNode;
  11785. if (
  11786. "function" ===
  11787. typeof nearestMountedAncestor.type.getDerivedStateFromError ||
  11788. ("function" === typeof instance.componentDidCatch &&
  11789. (null === legacyErrorBoundariesThatAlreadyFailed ||
  11790. !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
  11791. ) {
  11792. sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
  11793. error = createClassErrorUpdate(2);
  11794. instance = enqueueUpdate(nearestMountedAncestor, error, 2);
  11795. null !== instance &&
  11796. (initializeClassErrorUpdate(
  11797. error,
  11798. instance,
  11799. nearestMountedAncestor,
  11800. sourceFiber
  11801. ),
  11802. markRootUpdated$1(instance, 2),
  11803. ensureRootIsScheduled(instance));
  11804. break;
  11805. }
  11806. }
  11807. nearestMountedAncestor = nearestMountedAncestor.return;
  11808. }
  11809. }
  11810. function attachPingListener(root, wakeable, lanes) {
  11811. var pingCache = root.pingCache;
  11812. if (null === pingCache) {
  11813. pingCache = root.pingCache = new PossiblyWeakMap();
  11814. var threadIDs = new Set();
  11815. pingCache.set(wakeable, threadIDs);
  11816. } else
  11817. (threadIDs = pingCache.get(wakeable)),
  11818. void 0 === threadIDs &&
  11819. ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));
  11820. threadIDs.has(lanes) ||
  11821. ((workInProgressRootDidAttachPingListener = !0),
  11822. threadIDs.add(lanes),
  11823. (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)),
  11824. wakeable.then(root, root));
  11825. }
  11826. function pingSuspendedRoot(root, wakeable, pingedLanes) {
  11827. var pingCache = root.pingCache;
  11828. null !== pingCache && pingCache.delete(wakeable);
  11829. root.pingedLanes |= root.suspendedLanes & pingedLanes;
  11830. root.warmLanes &= ~pingedLanes;
  11831. workInProgressRoot === root &&
  11832. (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&
  11833. (4 === workInProgressRootExitStatus ||
  11834. (3 === workInProgressRootExitStatus &&
  11835. (workInProgressRootRenderLanes & 62914560) ===
  11836. workInProgressRootRenderLanes &&
  11837. 300 > now() - globalMostRecentFallbackTime)
  11838. ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)
  11839. : (workInProgressRootPingedLanes |= pingedLanes),
  11840. workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
  11841. (workInProgressSuspendedRetryLanes = 0));
  11842. ensureRootIsScheduled(root);
  11843. }
  11844. function retryTimedOutBoundary(boundaryFiber, retryLane) {
  11845. 0 === retryLane && (retryLane = claimNextRetryLane());
  11846. boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
  11847. null !== boundaryFiber &&
  11848. (markRootUpdated$1(boundaryFiber, retryLane),
  11849. ensureRootIsScheduled(boundaryFiber));
  11850. }
  11851. function retryDehydratedSuspenseBoundary(boundaryFiber) {
  11852. var suspenseState = boundaryFiber.memoizedState,
  11853. retryLane = 0;
  11854. null !== suspenseState && (retryLane = suspenseState.retryLane);
  11855. retryTimedOutBoundary(boundaryFiber, retryLane);
  11856. }
  11857. function resolveRetryWakeable(boundaryFiber, wakeable) {
  11858. var retryLane = 0;
  11859. switch (boundaryFiber.tag) {
  11860. case 31:
  11861. case 13:
  11862. var retryCache = boundaryFiber.stateNode;
  11863. var suspenseState = boundaryFiber.memoizedState;
  11864. null !== suspenseState && (retryLane = suspenseState.retryLane);
  11865. break;
  11866. case 19:
  11867. retryCache = boundaryFiber.stateNode;
  11868. break;
  11869. case 22:
  11870. retryCache = boundaryFiber.stateNode._retryCache;
  11871. break;
  11872. default:
  11873. throw Error(formatProdErrorMessage(314));
  11874. }
  11875. null !== retryCache && retryCache.delete(wakeable);
  11876. retryTimedOutBoundary(boundaryFiber, retryLane);
  11877. }
  11878. function scheduleCallback$1(priorityLevel, callback) {
  11879. return scheduleCallback$3(priorityLevel, callback);
  11880. }
  11881. var firstScheduledRoot = null,
  11882. lastScheduledRoot = null,
  11883. didScheduleMicrotask = !1,
  11884. mightHavePendingSyncWork = !1,
  11885. isFlushingWork = !1,
  11886. currentEventTransitionLane = 0;
  11887. function ensureRootIsScheduled(root) {
  11888. root !== lastScheduledRoot &&
  11889. null === root.next &&
  11890. (null === lastScheduledRoot
  11891. ? (firstScheduledRoot = lastScheduledRoot = root)
  11892. : (lastScheduledRoot = lastScheduledRoot.next = root));
  11893. mightHavePendingSyncWork = !0;
  11894. didScheduleMicrotask ||
  11895. ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());
  11896. }
  11897. function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
  11898. if (!isFlushingWork && mightHavePendingSyncWork) {
  11899. isFlushingWork = !0;
  11900. do {
  11901. var didPerformSomeWork = !1;
  11902. for (var root$170 = firstScheduledRoot; null !== root$170; ) {
  11903. if (!onlyLegacy)
  11904. if (0 !== syncTransitionLanes) {
  11905. var pendingLanes = root$170.pendingLanes;
  11906. if (0 === pendingLanes) var JSCompiler_inline_result = 0;
  11907. else {
  11908. var suspendedLanes = root$170.suspendedLanes,
  11909. pingedLanes = root$170.pingedLanes;
  11910. JSCompiler_inline_result =
  11911. (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1;
  11912. JSCompiler_inline_result &=
  11913. pendingLanes & ~(suspendedLanes & ~pingedLanes);
  11914. JSCompiler_inline_result =
  11915. JSCompiler_inline_result & 201326741
  11916. ? (JSCompiler_inline_result & 201326741) | 1
  11917. : JSCompiler_inline_result
  11918. ? JSCompiler_inline_result | 2
  11919. : 0;
  11920. }
  11921. 0 !== JSCompiler_inline_result &&
  11922. ((didPerformSomeWork = !0),
  11923. performSyncWorkOnRoot(root$170, JSCompiler_inline_result));
  11924. } else
  11925. (JSCompiler_inline_result = workInProgressRootRenderLanes),
  11926. (JSCompiler_inline_result = getNextLanes(
  11927. root$170,
  11928. root$170 === workInProgressRoot ? JSCompiler_inline_result : 0,
  11929. null !== root$170.cancelPendingCommit ||
  11930. -1 !== root$170.timeoutHandle
  11931. )),
  11932. 0 === (JSCompiler_inline_result & 3) ||
  11933. checkIfRootIsPrerendering(root$170, JSCompiler_inline_result) ||
  11934. ((didPerformSomeWork = !0),
  11935. performSyncWorkOnRoot(root$170, JSCompiler_inline_result));
  11936. root$170 = root$170.next;
  11937. }
  11938. } while (didPerformSomeWork);
  11939. isFlushingWork = !1;
  11940. }
  11941. }
  11942. function processRootScheduleInImmediateTask() {
  11943. processRootScheduleInMicrotask();
  11944. }
  11945. function processRootScheduleInMicrotask() {
  11946. mightHavePendingSyncWork = didScheduleMicrotask = !1;
  11947. var syncTransitionLanes = 0;
  11948. 0 !== currentEventTransitionLane &&
  11949. shouldAttemptEagerTransition() &&
  11950. (syncTransitionLanes = currentEventTransitionLane);
  11951. for (
  11952. var currentTime = now(), prev = null, root = firstScheduledRoot;
  11953. null !== root;
  11954. ) {
  11955. var next = root.next,
  11956. nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);
  11957. if (0 === nextLanes)
  11958. (root.next = null),
  11959. null === prev ? (firstScheduledRoot = next) : (prev.next = next),
  11960. null === next && (lastScheduledRoot = prev);
  11961. else if (
  11962. ((prev = root), 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))
  11963. )
  11964. mightHavePendingSyncWork = !0;
  11965. root = next;
  11966. }
  11967. (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus) ||
  11968. flushSyncWorkAcrossRoots_impl(syncTransitionLanes, !1);
  11969. 0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
  11970. }
  11971. function scheduleTaskForRootDuringMicrotask(root, currentTime) {
  11972. for (
  11973. var suspendedLanes = root.suspendedLanes,
  11974. pingedLanes = root.pingedLanes,
  11975. expirationTimes = root.expirationTimes,
  11976. lanes = root.pendingLanes & -62914561;
  11977. 0 < lanes;
  11978. ) {
  11979. var index$5 = 31 - clz32(lanes),
  11980. lane = 1 << index$5,
  11981. expirationTime = expirationTimes[index$5];
  11982. if (-1 === expirationTime) {
  11983. if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
  11984. expirationTimes[index$5] = computeExpirationTime(lane, currentTime);
  11985. } else expirationTime <= currentTime && (root.expiredLanes |= lane);
  11986. lanes &= ~lane;
  11987. }
  11988. currentTime = workInProgressRoot;
  11989. suspendedLanes = workInProgressRootRenderLanes;
  11990. suspendedLanes = getNextLanes(
  11991. root,
  11992. root === currentTime ? suspendedLanes : 0,
  11993. null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
  11994. );
  11995. pingedLanes = root.callbackNode;
  11996. if (
  11997. 0 === suspendedLanes ||
  11998. (root === currentTime &&
  11999. (2 === workInProgressSuspendedReason ||
  12000. 9 === workInProgressSuspendedReason)) ||
  12001. null !== root.cancelPendingCommit
  12002. )
  12003. return (
  12004. null !== pingedLanes &&
  12005. null !== pingedLanes &&
  12006. cancelCallback$1(pingedLanes),
  12007. (root.callbackNode = null),
  12008. (root.callbackPriority = 0)
  12009. );
  12010. if (
  12011. 0 === (suspendedLanes & 3) ||
  12012. checkIfRootIsPrerendering(root, suspendedLanes)
  12013. ) {
  12014. currentTime = suspendedLanes & -suspendedLanes;
  12015. if (currentTime === root.callbackPriority) return currentTime;
  12016. null !== pingedLanes && cancelCallback$1(pingedLanes);
  12017. switch (lanesToEventPriority(suspendedLanes)) {
  12018. case 2:
  12019. case 8:
  12020. suspendedLanes = UserBlockingPriority;
  12021. break;
  12022. case 32:
  12023. suspendedLanes = NormalPriority$1;
  12024. break;
  12025. case 268435456:
  12026. suspendedLanes = IdlePriority;
  12027. break;
  12028. default:
  12029. suspendedLanes = NormalPriority$1;
  12030. }
  12031. pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
  12032. suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
  12033. root.callbackPriority = currentTime;
  12034. root.callbackNode = suspendedLanes;
  12035. return currentTime;
  12036. }
  12037. null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes);
  12038. root.callbackPriority = 2;
  12039. root.callbackNode = null;
  12040. return 2;
  12041. }
  12042. function performWorkOnRootViaSchedulerTask(root, didTimeout) {
  12043. if (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus)
  12044. return (root.callbackNode = null), (root.callbackPriority = 0), null;
  12045. var originalCallbackNode = root.callbackNode;
  12046. if (flushPendingEffects() && root.callbackNode !== originalCallbackNode)
  12047. return null;
  12048. var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
  12049. workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
  12050. root,
  12051. root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
  12052. null !== root.cancelPendingCommit || -1 !== root.timeoutHandle
  12053. );
  12054. if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
  12055. performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);
  12056. scheduleTaskForRootDuringMicrotask(root, now());
  12057. return null != root.callbackNode && root.callbackNode === originalCallbackNode
  12058. ? performWorkOnRootViaSchedulerTask.bind(null, root)
  12059. : null;
  12060. }
  12061. function performSyncWorkOnRoot(root, lanes) {
  12062. if (flushPendingEffects()) return null;
  12063. performWorkOnRoot(root, lanes, !0);
  12064. }
  12065. function scheduleImmediateRootScheduleTask() {
  12066. scheduleMicrotask(function () {
  12067. 0 !== (executionContext & 6)
  12068. ? scheduleCallback$3(
  12069. ImmediatePriority,
  12070. processRootScheduleInImmediateTask
  12071. )
  12072. : processRootScheduleInMicrotask();
  12073. });
  12074. }
  12075. function requestTransitionLane() {
  12076. if (0 === currentEventTransitionLane) {
  12077. var actionScopeLane = currentEntangledLane;
  12078. 0 === actionScopeLane &&
  12079. ((actionScopeLane = nextTransitionUpdateLane),
  12080. (nextTransitionUpdateLane <<= 1),
  12081. 0 === (nextTransitionUpdateLane & 261888) &&
  12082. (nextTransitionUpdateLane = 256));
  12083. currentEventTransitionLane = actionScopeLane;
  12084. }
  12085. return currentEventTransitionLane;
  12086. }
  12087. function coerceFormActionProp(actionProp) {
  12088. return null == actionProp ||
  12089. "symbol" === typeof actionProp ||
  12090. "boolean" === typeof actionProp
  12091. ? null
  12092. : "function" === typeof actionProp
  12093. ? actionProp
  12094. : sanitizeURL("" + actionProp);
  12095. }
  12096. function createFormDataWithSubmitter(form, submitter) {
  12097. var temp = submitter.ownerDocument.createElement("input");
  12098. temp.name = submitter.name;
  12099. temp.value = submitter.value;
  12100. form.id && temp.setAttribute("form", form.id);
  12101. submitter.parentNode.insertBefore(temp, submitter);
  12102. form = new FormData(form);
  12103. temp.parentNode.removeChild(temp);
  12104. return form;
  12105. }
  12106. function extractEvents$1(
  12107. dispatchQueue,
  12108. domEventName,
  12109. maybeTargetInst,
  12110. nativeEvent,
  12111. nativeEventTarget
  12112. ) {
  12113. if (
  12114. "submit" === domEventName &&
  12115. maybeTargetInst &&
  12116. maybeTargetInst.stateNode === nativeEventTarget
  12117. ) {
  12118. var action = coerceFormActionProp(
  12119. (nativeEventTarget[internalPropsKey] || null).action
  12120. ),
  12121. submitter = nativeEvent.submitter;
  12122. submitter &&
  12123. ((domEventName = (domEventName = submitter[internalPropsKey] || null)
  12124. ? coerceFormActionProp(domEventName.formAction)
  12125. : submitter.getAttribute("formAction")),
  12126. null !== domEventName && ((action = domEventName), (submitter = null)));
  12127. var event = new SyntheticEvent(
  12128. "action",
  12129. "action",
  12130. null,
  12131. nativeEvent,
  12132. nativeEventTarget
  12133. );
  12134. dispatchQueue.push({
  12135. event: event,
  12136. listeners: [
  12137. {
  12138. instance: null,
  12139. listener: function () {
  12140. if (nativeEvent.defaultPrevented) {
  12141. if (0 !== currentEventTransitionLane) {
  12142. var formData = submitter
  12143. ? createFormDataWithSubmitter(nativeEventTarget, submitter)
  12144. : new FormData(nativeEventTarget);
  12145. startHostTransition(
  12146. maybeTargetInst,
  12147. {
  12148. pending: !0,
  12149. data: formData,
  12150. method: nativeEventTarget.method,
  12151. action: action
  12152. },
  12153. null,
  12154. formData
  12155. );
  12156. }
  12157. } else
  12158. "function" === typeof action &&
  12159. (event.preventDefault(),
  12160. (formData = submitter
  12161. ? createFormDataWithSubmitter(nativeEventTarget, submitter)
  12162. : new FormData(nativeEventTarget)),
  12163. startHostTransition(
  12164. maybeTargetInst,
  12165. {
  12166. pending: !0,
  12167. data: formData,
  12168. method: nativeEventTarget.method,
  12169. action: action
  12170. },
  12171. action,
  12172. formData
  12173. ));
  12174. },
  12175. currentTarget: nativeEventTarget
  12176. }
  12177. ]
  12178. });
  12179. }
  12180. }
  12181. for (
  12182. var i$jscomp$inline_1577 = 0;
  12183. i$jscomp$inline_1577 < simpleEventPluginEvents.length;
  12184. i$jscomp$inline_1577++
  12185. ) {
  12186. var eventName$jscomp$inline_1578 =
  12187. simpleEventPluginEvents[i$jscomp$inline_1577],
  12188. domEventName$jscomp$inline_1579 =
  12189. eventName$jscomp$inline_1578.toLowerCase(),
  12190. capitalizedEvent$jscomp$inline_1580 =
  12191. eventName$jscomp$inline_1578[0].toUpperCase() +
  12192. eventName$jscomp$inline_1578.slice(1);
  12193. registerSimpleEvent(
  12194. domEventName$jscomp$inline_1579,
  12195. "on" + capitalizedEvent$jscomp$inline_1580
  12196. );
  12197. }
  12198. registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
  12199. registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
  12200. registerSimpleEvent(ANIMATION_START, "onAnimationStart");
  12201. registerSimpleEvent("dblclick", "onDoubleClick");
  12202. registerSimpleEvent("focusin", "onFocus");
  12203. registerSimpleEvent("focusout", "onBlur");
  12204. registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
  12205. registerSimpleEvent(TRANSITION_START, "onTransitionStart");
  12206. registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
  12207. registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
  12208. registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
  12209. registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
  12210. registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
  12211. registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
  12212. registerTwoPhaseEvent(
  12213. "onChange",
  12214. "change click focusin focusout input keydown keyup selectionchange".split(" ")
  12215. );
  12216. registerTwoPhaseEvent(
  12217. "onSelect",
  12218. "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
  12219. " "
  12220. )
  12221. );
  12222. registerTwoPhaseEvent("onBeforeInput", [
  12223. "compositionend",
  12224. "keypress",
  12225. "textInput",
  12226. "paste"
  12227. ]);
  12228. registerTwoPhaseEvent(
  12229. "onCompositionEnd",
  12230. "compositionend focusout keydown keypress keyup mousedown".split(" ")
  12231. );
  12232. registerTwoPhaseEvent(
  12233. "onCompositionStart",
  12234. "compositionstart focusout keydown keypress keyup mousedown".split(" ")
  12235. );
  12236. registerTwoPhaseEvent(
  12237. "onCompositionUpdate",
  12238. "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
  12239. );
  12240. var mediaEventTypes =
  12241. "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(
  12242. " "
  12243. ),
  12244. nonDelegatedEvents = new Set(
  12245. "beforetoggle cancel close invalid load scroll scrollend toggle"
  12246. .split(" ")
  12247. .concat(mediaEventTypes)
  12248. );
  12249. function processDispatchQueue(dispatchQueue, eventSystemFlags) {
  12250. eventSystemFlags = 0 !== (eventSystemFlags & 4);
  12251. for (var i = 0; i < dispatchQueue.length; i++) {
  12252. var _dispatchQueue$i = dispatchQueue[i],
  12253. event = _dispatchQueue$i.event;
  12254. _dispatchQueue$i = _dispatchQueue$i.listeners;
  12255. a: {
  12256. var previousInstance = void 0;
  12257. if (eventSystemFlags)
  12258. for (
  12259. var i$jscomp$0 = _dispatchQueue$i.length - 1;
  12260. 0 <= i$jscomp$0;
  12261. i$jscomp$0--
  12262. ) {
  12263. var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0],
  12264. instance = _dispatchListeners$i.instance,
  12265. currentTarget = _dispatchListeners$i.currentTarget;
  12266. _dispatchListeners$i = _dispatchListeners$i.listener;
  12267. if (instance !== previousInstance && event.isPropagationStopped())
  12268. break a;
  12269. previousInstance = _dispatchListeners$i;
  12270. event.currentTarget = currentTarget;
  12271. try {
  12272. previousInstance(event);
  12273. } catch (error) {
  12274. reportGlobalError(error);
  12275. }
  12276. event.currentTarget = null;
  12277. previousInstance = instance;
  12278. }
  12279. else
  12280. for (
  12281. i$jscomp$0 = 0;
  12282. i$jscomp$0 < _dispatchQueue$i.length;
  12283. i$jscomp$0++
  12284. ) {
  12285. _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];
  12286. instance = _dispatchListeners$i.instance;
  12287. currentTarget = _dispatchListeners$i.currentTarget;
  12288. _dispatchListeners$i = _dispatchListeners$i.listener;
  12289. if (instance !== previousInstance && event.isPropagationStopped())
  12290. break a;
  12291. previousInstance = _dispatchListeners$i;
  12292. event.currentTarget = currentTarget;
  12293. try {
  12294. previousInstance(event);
  12295. } catch (error) {
  12296. reportGlobalError(error);
  12297. }
  12298. event.currentTarget = null;
  12299. previousInstance = instance;
  12300. }
  12301. }
  12302. }
  12303. }
  12304. function listenToNonDelegatedEvent(domEventName, targetElement) {
  12305. var JSCompiler_inline_result = targetElement[internalEventHandlersKey];
  12306. void 0 === JSCompiler_inline_result &&
  12307. (JSCompiler_inline_result = targetElement[internalEventHandlersKey] =
  12308. new Set());
  12309. var listenerSetKey = domEventName + "__bubble";
  12310. JSCompiler_inline_result.has(listenerSetKey) ||
  12311. (addTrappedEventListener(targetElement, domEventName, 2, !1),
  12312. JSCompiler_inline_result.add(listenerSetKey));
  12313. }
  12314. function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
  12315. var eventSystemFlags = 0;
  12316. isCapturePhaseListener && (eventSystemFlags |= 4);
  12317. addTrappedEventListener(
  12318. target,
  12319. domEventName,
  12320. eventSystemFlags,
  12321. isCapturePhaseListener
  12322. );
  12323. }
  12324. var listeningMarker = "_reactListening" + Math.random().toString(36).slice(2);
  12325. function listenToAllSupportedEvents(rootContainerElement) {
  12326. if (!rootContainerElement[listeningMarker]) {
  12327. rootContainerElement[listeningMarker] = !0;
  12328. allNativeEvents.forEach(function (domEventName) {
  12329. "selectionchange" !== domEventName &&
  12330. (nonDelegatedEvents.has(domEventName) ||
  12331. listenToNativeEvent(domEventName, !1, rootContainerElement),
  12332. listenToNativeEvent(domEventName, !0, rootContainerElement));
  12333. });
  12334. var ownerDocument =
  12335. 9 === rootContainerElement.nodeType
  12336. ? rootContainerElement
  12337. : rootContainerElement.ownerDocument;
  12338. null === ownerDocument ||
  12339. ownerDocument[listeningMarker] ||
  12340. ((ownerDocument[listeningMarker] = !0),
  12341. listenToNativeEvent("selectionchange", !1, ownerDocument));
  12342. }
  12343. }
  12344. function addTrappedEventListener(
  12345. targetContainer,
  12346. domEventName,
  12347. eventSystemFlags,
  12348. isCapturePhaseListener
  12349. ) {
  12350. switch (getEventPriority(domEventName)) {
  12351. case 2:
  12352. var listenerWrapper = dispatchDiscreteEvent;
  12353. break;
  12354. case 8:
  12355. listenerWrapper = dispatchContinuousEvent;
  12356. break;
  12357. default:
  12358. listenerWrapper = dispatchEvent;
  12359. }
  12360. eventSystemFlags = listenerWrapper.bind(
  12361. null,
  12362. domEventName,
  12363. eventSystemFlags,
  12364. targetContainer
  12365. );
  12366. listenerWrapper = void 0;
  12367. !passiveBrowserEventsSupported ||
  12368. ("touchstart" !== domEventName &&
  12369. "touchmove" !== domEventName &&
  12370. "wheel" !== domEventName) ||
  12371. (listenerWrapper = !0);
  12372. isCapturePhaseListener
  12373. ? void 0 !== listenerWrapper
  12374. ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
  12375. capture: !0,
  12376. passive: listenerWrapper
  12377. })
  12378. : targetContainer.addEventListener(domEventName, eventSystemFlags, !0)
  12379. : void 0 !== listenerWrapper
  12380. ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
  12381. passive: listenerWrapper
  12382. })
  12383. : targetContainer.addEventListener(domEventName, eventSystemFlags, !1);
  12384. }
  12385. function dispatchEventForPluginEventSystem(
  12386. domEventName,
  12387. eventSystemFlags,
  12388. nativeEvent,
  12389. targetInst$jscomp$0,
  12390. targetContainer
  12391. ) {
  12392. var ancestorInst = targetInst$jscomp$0;
  12393. if (
  12394. 0 === (eventSystemFlags & 1) &&
  12395. 0 === (eventSystemFlags & 2) &&
  12396. null !== targetInst$jscomp$0
  12397. )
  12398. a: for (;;) {
  12399. if (null === targetInst$jscomp$0) return;
  12400. var nodeTag = targetInst$jscomp$0.tag;
  12401. if (3 === nodeTag || 4 === nodeTag) {
  12402. var container = targetInst$jscomp$0.stateNode.containerInfo;
  12403. if (container === targetContainer) break;
  12404. if (4 === nodeTag)
  12405. for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
  12406. var grandTag = nodeTag.tag;
  12407. if (
  12408. (3 === grandTag || 4 === grandTag) &&
  12409. nodeTag.stateNode.containerInfo === targetContainer
  12410. )
  12411. return;
  12412. nodeTag = nodeTag.return;
  12413. }
  12414. for (; null !== container; ) {
  12415. nodeTag = getClosestInstanceFromNode(container);
  12416. if (null === nodeTag) return;
  12417. grandTag = nodeTag.tag;
  12418. if (
  12419. 5 === grandTag ||
  12420. 6 === grandTag ||
  12421. 26 === grandTag ||
  12422. 27 === grandTag
  12423. ) {
  12424. targetInst$jscomp$0 = ancestorInst = nodeTag;
  12425. continue a;
  12426. }
  12427. container = container.parentNode;
  12428. }
  12429. }
  12430. targetInst$jscomp$0 = targetInst$jscomp$0.return;
  12431. }
  12432. batchedUpdates$1(function () {
  12433. var targetInst = ancestorInst,
  12434. nativeEventTarget = getEventTarget(nativeEvent),
  12435. dispatchQueue = [];
  12436. a: {
  12437. var reactName = topLevelEventsToReactNames.get(domEventName);
  12438. if (void 0 !== reactName) {
  12439. var SyntheticEventCtor = SyntheticEvent,
  12440. reactEventType = domEventName;
  12441. switch (domEventName) {
  12442. case "keypress":
  12443. if (0 === getEventCharCode(nativeEvent)) break a;
  12444. case "keydown":
  12445. case "keyup":
  12446. SyntheticEventCtor = SyntheticKeyboardEvent;
  12447. break;
  12448. case "focusin":
  12449. reactEventType = "focus";
  12450. SyntheticEventCtor = SyntheticFocusEvent;
  12451. break;
  12452. case "focusout":
  12453. reactEventType = "blur";
  12454. SyntheticEventCtor = SyntheticFocusEvent;
  12455. break;
  12456. case "beforeblur":
  12457. case "afterblur":
  12458. SyntheticEventCtor = SyntheticFocusEvent;
  12459. break;
  12460. case "click":
  12461. if (2 === nativeEvent.button) break a;
  12462. case "auxclick":
  12463. case "dblclick":
  12464. case "mousedown":
  12465. case "mousemove":
  12466. case "mouseup":
  12467. case "mouseout":
  12468. case "mouseover":
  12469. case "contextmenu":
  12470. SyntheticEventCtor = SyntheticMouseEvent;
  12471. break;
  12472. case "drag":
  12473. case "dragend":
  12474. case "dragenter":
  12475. case "dragexit":
  12476. case "dragleave":
  12477. case "dragover":
  12478. case "dragstart":
  12479. case "drop":
  12480. SyntheticEventCtor = SyntheticDragEvent;
  12481. break;
  12482. case "touchcancel":
  12483. case "touchend":
  12484. case "touchmove":
  12485. case "touchstart":
  12486. SyntheticEventCtor = SyntheticTouchEvent;
  12487. break;
  12488. case ANIMATION_END:
  12489. case ANIMATION_ITERATION:
  12490. case ANIMATION_START:
  12491. SyntheticEventCtor = SyntheticAnimationEvent;
  12492. break;
  12493. case TRANSITION_END:
  12494. SyntheticEventCtor = SyntheticTransitionEvent;
  12495. break;
  12496. case "scroll":
  12497. case "scrollend":
  12498. SyntheticEventCtor = SyntheticUIEvent;
  12499. break;
  12500. case "wheel":
  12501. SyntheticEventCtor = SyntheticWheelEvent;
  12502. break;
  12503. case "copy":
  12504. case "cut":
  12505. case "paste":
  12506. SyntheticEventCtor = SyntheticClipboardEvent;
  12507. break;
  12508. case "gotpointercapture":
  12509. case "lostpointercapture":
  12510. case "pointercancel":
  12511. case "pointerdown":
  12512. case "pointermove":
  12513. case "pointerout":
  12514. case "pointerover":
  12515. case "pointerup":
  12516. SyntheticEventCtor = SyntheticPointerEvent;
  12517. break;
  12518. case "toggle":
  12519. case "beforetoggle":
  12520. SyntheticEventCtor = SyntheticToggleEvent;
  12521. }
  12522. var inCapturePhase = 0 !== (eventSystemFlags & 4),
  12523. accumulateTargetOnly =
  12524. !inCapturePhase &&
  12525. ("scroll" === domEventName || "scrollend" === domEventName),
  12526. reactEventName = inCapturePhase
  12527. ? null !== reactName
  12528. ? reactName + "Capture"
  12529. : null
  12530. : reactName;
  12531. inCapturePhase = [];
  12532. for (
  12533. var instance = targetInst, lastHostComponent;
  12534. null !== instance;
  12535. ) {
  12536. var _instance = instance;
  12537. lastHostComponent = _instance.stateNode;
  12538. _instance = _instance.tag;
  12539. (5 !== _instance && 26 !== _instance && 27 !== _instance) ||
  12540. null === lastHostComponent ||
  12541. null === reactEventName ||
  12542. ((_instance = getListener(instance, reactEventName)),
  12543. null != _instance &&
  12544. inCapturePhase.push(
  12545. createDispatchListener(instance, _instance, lastHostComponent)
  12546. ));
  12547. if (accumulateTargetOnly) break;
  12548. instance = instance.return;
  12549. }
  12550. 0 < inCapturePhase.length &&
  12551. ((reactName = new SyntheticEventCtor(
  12552. reactName,
  12553. reactEventType,
  12554. null,
  12555. nativeEvent,
  12556. nativeEventTarget
  12557. )),
  12558. dispatchQueue.push({ event: reactName, listeners: inCapturePhase }));
  12559. }
  12560. }
  12561. if (0 === (eventSystemFlags & 7)) {
  12562. a: {
  12563. reactName =
  12564. "mouseover" === domEventName || "pointerover" === domEventName;
  12565. SyntheticEventCtor =
  12566. "mouseout" === domEventName || "pointerout" === domEventName;
  12567. if (
  12568. reactName &&
  12569. nativeEvent !== currentReplayingEvent &&
  12570. (reactEventType =
  12571. nativeEvent.relatedTarget || nativeEvent.fromElement) &&
  12572. (getClosestInstanceFromNode(reactEventType) ||
  12573. reactEventType[internalContainerInstanceKey])
  12574. )
  12575. break a;
  12576. if (SyntheticEventCtor || reactName) {
  12577. reactName =
  12578. nativeEventTarget.window === nativeEventTarget
  12579. ? nativeEventTarget
  12580. : (reactName = nativeEventTarget.ownerDocument)
  12581. ? reactName.defaultView || reactName.parentWindow
  12582. : window;
  12583. if (SyntheticEventCtor) {
  12584. if (
  12585. ((reactEventType =
  12586. nativeEvent.relatedTarget || nativeEvent.toElement),
  12587. (SyntheticEventCtor = targetInst),
  12588. (reactEventType = reactEventType
  12589. ? getClosestInstanceFromNode(reactEventType)
  12590. : null),
  12591. null !== reactEventType &&
  12592. ((accumulateTargetOnly =
  12593. getNearestMountedFiber(reactEventType)),
  12594. (inCapturePhase = reactEventType.tag),
  12595. reactEventType !== accumulateTargetOnly ||
  12596. (5 !== inCapturePhase &&
  12597. 27 !== inCapturePhase &&
  12598. 6 !== inCapturePhase)))
  12599. )
  12600. reactEventType = null;
  12601. } else (SyntheticEventCtor = null), (reactEventType = targetInst);
  12602. if (SyntheticEventCtor !== reactEventType) {
  12603. inCapturePhase = SyntheticMouseEvent;
  12604. _instance = "onMouseLeave";
  12605. reactEventName = "onMouseEnter";
  12606. instance = "mouse";
  12607. if ("pointerout" === domEventName || "pointerover" === domEventName)
  12608. (inCapturePhase = SyntheticPointerEvent),
  12609. (_instance = "onPointerLeave"),
  12610. (reactEventName = "onPointerEnter"),
  12611. (instance = "pointer");
  12612. accumulateTargetOnly =
  12613. null == SyntheticEventCtor
  12614. ? reactName
  12615. : getNodeFromInstance(SyntheticEventCtor);
  12616. lastHostComponent =
  12617. null == reactEventType
  12618. ? reactName
  12619. : getNodeFromInstance(reactEventType);
  12620. reactName = new inCapturePhase(
  12621. _instance,
  12622. instance + "leave",
  12623. SyntheticEventCtor,
  12624. nativeEvent,
  12625. nativeEventTarget
  12626. );
  12627. reactName.target = accumulateTargetOnly;
  12628. reactName.relatedTarget = lastHostComponent;
  12629. _instance = null;
  12630. getClosestInstanceFromNode(nativeEventTarget) === targetInst &&
  12631. ((inCapturePhase = new inCapturePhase(
  12632. reactEventName,
  12633. instance + "enter",
  12634. reactEventType,
  12635. nativeEvent,
  12636. nativeEventTarget
  12637. )),
  12638. (inCapturePhase.target = lastHostComponent),
  12639. (inCapturePhase.relatedTarget = accumulateTargetOnly),
  12640. (_instance = inCapturePhase));
  12641. accumulateTargetOnly = _instance;
  12642. if (SyntheticEventCtor && reactEventType)
  12643. b: {
  12644. inCapturePhase = getParent;
  12645. reactEventName = SyntheticEventCtor;
  12646. instance = reactEventType;
  12647. lastHostComponent = 0;
  12648. for (
  12649. _instance = reactEventName;
  12650. _instance;
  12651. _instance = inCapturePhase(_instance)
  12652. )
  12653. lastHostComponent++;
  12654. _instance = 0;
  12655. for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))
  12656. _instance++;
  12657. for (; 0 < lastHostComponent - _instance; )
  12658. (reactEventName = inCapturePhase(reactEventName)),
  12659. lastHostComponent--;
  12660. for (; 0 < _instance - lastHostComponent; )
  12661. (instance = inCapturePhase(instance)), _instance--;
  12662. for (; lastHostComponent--; ) {
  12663. if (
  12664. reactEventName === instance ||
  12665. (null !== instance && reactEventName === instance.alternate)
  12666. ) {
  12667. inCapturePhase = reactEventName;
  12668. break b;
  12669. }
  12670. reactEventName = inCapturePhase(reactEventName);
  12671. instance = inCapturePhase(instance);
  12672. }
  12673. inCapturePhase = null;
  12674. }
  12675. else inCapturePhase = null;
  12676. null !== SyntheticEventCtor &&
  12677. accumulateEnterLeaveListenersForEvent(
  12678. dispatchQueue,
  12679. reactName,
  12680. SyntheticEventCtor,
  12681. inCapturePhase,
  12682. !1
  12683. );
  12684. null !== reactEventType &&
  12685. null !== accumulateTargetOnly &&
  12686. accumulateEnterLeaveListenersForEvent(
  12687. dispatchQueue,
  12688. accumulateTargetOnly,
  12689. reactEventType,
  12690. inCapturePhase,
  12691. !0
  12692. );
  12693. }
  12694. }
  12695. }
  12696. a: {
  12697. reactName = targetInst ? getNodeFromInstance(targetInst) : window;
  12698. SyntheticEventCtor =
  12699. reactName.nodeName && reactName.nodeName.toLowerCase();
  12700. if (
  12701. "select" === SyntheticEventCtor ||
  12702. ("input" === SyntheticEventCtor && "file" === reactName.type)
  12703. )
  12704. var getTargetInstFunc = getTargetInstForChangeEvent;
  12705. else if (isTextInputElement(reactName))
  12706. if (isInputEventSupported)
  12707. getTargetInstFunc = getTargetInstForInputOrChangeEvent;
  12708. else {
  12709. getTargetInstFunc = getTargetInstForInputEventPolyfill;
  12710. var handleEventFunc = handleEventsForInputEventPolyfill;
  12711. }
  12712. else
  12713. (SyntheticEventCtor = reactName.nodeName),
  12714. !SyntheticEventCtor ||
  12715. "input" !== SyntheticEventCtor.toLowerCase() ||
  12716. ("checkbox" !== reactName.type && "radio" !== reactName.type)
  12717. ? targetInst &&
  12718. isCustomElement(targetInst.elementType) &&
  12719. (getTargetInstFunc = getTargetInstForChangeEvent)
  12720. : (getTargetInstFunc = getTargetInstForClickEvent);
  12721. if (
  12722. getTargetInstFunc &&
  12723. (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))
  12724. ) {
  12725. createAndAccumulateChangeEvent(
  12726. dispatchQueue,
  12727. getTargetInstFunc,
  12728. nativeEvent,
  12729. nativeEventTarget
  12730. );
  12731. break a;
  12732. }
  12733. handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);
  12734. "focusout" === domEventName &&
  12735. targetInst &&
  12736. "number" === reactName.type &&
  12737. null != targetInst.memoizedProps.value &&
  12738. setDefaultValue(reactName, "number", reactName.value);
  12739. }
  12740. handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;
  12741. switch (domEventName) {
  12742. case "focusin":
  12743. if (
  12744. isTextInputElement(handleEventFunc) ||
  12745. "true" === handleEventFunc.contentEditable
  12746. )
  12747. (activeElement = handleEventFunc),
  12748. (activeElementInst = targetInst),
  12749. (lastSelection = null);
  12750. break;
  12751. case "focusout":
  12752. lastSelection = activeElementInst = activeElement = null;
  12753. break;
  12754. case "mousedown":
  12755. mouseDown = !0;
  12756. break;
  12757. case "contextmenu":
  12758. case "mouseup":
  12759. case "dragend":
  12760. mouseDown = !1;
  12761. constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
  12762. break;
  12763. case "selectionchange":
  12764. if (skipSelectionChangeEvent) break;
  12765. case "keydown":
  12766. case "keyup":
  12767. constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
  12768. }
  12769. var fallbackData;
  12770. if (canUseCompositionEvent)
  12771. b: {
  12772. switch (domEventName) {
  12773. case "compositionstart":
  12774. var eventType = "onCompositionStart";
  12775. break b;
  12776. case "compositionend":
  12777. eventType = "onCompositionEnd";
  12778. break b;
  12779. case "compositionupdate":
  12780. eventType = "onCompositionUpdate";
  12781. break b;
  12782. }
  12783. eventType = void 0;
  12784. }
  12785. else
  12786. isComposing
  12787. ? isFallbackCompositionEnd(domEventName, nativeEvent) &&
  12788. (eventType = "onCompositionEnd")
  12789. : "keydown" === domEventName &&
  12790. 229 === nativeEvent.keyCode &&
  12791. (eventType = "onCompositionStart");
  12792. eventType &&
  12793. (useFallbackCompositionData &&
  12794. "ko" !== nativeEvent.locale &&
  12795. (isComposing || "onCompositionStart" !== eventType
  12796. ? "onCompositionEnd" === eventType &&
  12797. isComposing &&
  12798. (fallbackData = getData())
  12799. : ((root = nativeEventTarget),
  12800. (startText = "value" in root ? root.value : root.textContent),
  12801. (isComposing = !0))),
  12802. (handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType)),
  12803. 0 < handleEventFunc.length &&
  12804. ((eventType = new SyntheticCompositionEvent(
  12805. eventType,
  12806. domEventName,
  12807. null,
  12808. nativeEvent,
  12809. nativeEventTarget
  12810. )),
  12811. dispatchQueue.push({ event: eventType, listeners: handleEventFunc }),
  12812. fallbackData
  12813. ? (eventType.data = fallbackData)
  12814. : ((fallbackData = getDataFromCustomEvent(nativeEvent)),
  12815. null !== fallbackData && (eventType.data = fallbackData))));
  12816. if (
  12817. (fallbackData = canUseTextInputEvent
  12818. ? getNativeBeforeInputChars(domEventName, nativeEvent)
  12819. : getFallbackBeforeInputChars(domEventName, nativeEvent))
  12820. )
  12821. (eventType = accumulateTwoPhaseListeners(targetInst, "onBeforeInput")),
  12822. 0 < eventType.length &&
  12823. ((handleEventFunc = new SyntheticCompositionEvent(
  12824. "onBeforeInput",
  12825. "beforeinput",
  12826. null,
  12827. nativeEvent,
  12828. nativeEventTarget
  12829. )),
  12830. dispatchQueue.push({
  12831. event: handleEventFunc,
  12832. listeners: eventType
  12833. }),
  12834. (handleEventFunc.data = fallbackData));
  12835. extractEvents$1(
  12836. dispatchQueue,
  12837. domEventName,
  12838. targetInst,
  12839. nativeEvent,
  12840. nativeEventTarget
  12841. );
  12842. }
  12843. processDispatchQueue(dispatchQueue, eventSystemFlags);
  12844. });
  12845. }
  12846. function createDispatchListener(instance, listener, currentTarget) {
  12847. return {
  12848. instance: instance,
  12849. listener: listener,
  12850. currentTarget: currentTarget
  12851. };
  12852. }
  12853. function accumulateTwoPhaseListeners(targetFiber, reactName) {
  12854. for (
  12855. var captureName = reactName + "Capture", listeners = [];
  12856. null !== targetFiber;
  12857. ) {
  12858. var _instance2 = targetFiber,
  12859. stateNode = _instance2.stateNode;
  12860. _instance2 = _instance2.tag;
  12861. (5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2) ||
  12862. null === stateNode ||
  12863. ((_instance2 = getListener(targetFiber, captureName)),
  12864. null != _instance2 &&
  12865. listeners.unshift(
  12866. createDispatchListener(targetFiber, _instance2, stateNode)
  12867. ),
  12868. (_instance2 = getListener(targetFiber, reactName)),
  12869. null != _instance2 &&
  12870. listeners.push(
  12871. createDispatchListener(targetFiber, _instance2, stateNode)
  12872. ));
  12873. if (3 === targetFiber.tag) return listeners;
  12874. targetFiber = targetFiber.return;
  12875. }
  12876. return [];
  12877. }
  12878. function getParent(inst) {
  12879. if (null === inst) return null;
  12880. do inst = inst.return;
  12881. while (inst && 5 !== inst.tag && 27 !== inst.tag);
  12882. return inst ? inst : null;
  12883. }
  12884. function accumulateEnterLeaveListenersForEvent(
  12885. dispatchQueue,
  12886. event,
  12887. target,
  12888. common,
  12889. inCapturePhase
  12890. ) {
  12891. for (
  12892. var registrationName = event._reactName, listeners = [];
  12893. null !== target && target !== common;
  12894. ) {
  12895. var _instance3 = target,
  12896. alternate = _instance3.alternate,
  12897. stateNode = _instance3.stateNode;
  12898. _instance3 = _instance3.tag;
  12899. if (null !== alternate && alternate === common) break;
  12900. (5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3) ||
  12901. null === stateNode ||
  12902. ((alternate = stateNode),
  12903. inCapturePhase
  12904. ? ((stateNode = getListener(target, registrationName)),
  12905. null != stateNode &&
  12906. listeners.unshift(
  12907. createDispatchListener(target, stateNode, alternate)
  12908. ))
  12909. : inCapturePhase ||
  12910. ((stateNode = getListener(target, registrationName)),
  12911. null != stateNode &&
  12912. listeners.push(
  12913. createDispatchListener(target, stateNode, alternate)
  12914. )));
  12915. target = target.return;
  12916. }
  12917. 0 !== listeners.length &&
  12918. dispatchQueue.push({ event: event, listeners: listeners });
  12919. }
  12920. var NORMALIZE_NEWLINES_REGEX = /\r\n?/g,
  12921. NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
  12922. function normalizeMarkupForTextOrAttribute(markup) {
  12923. return ("string" === typeof markup ? markup : "" + markup)
  12924. .replace(NORMALIZE_NEWLINES_REGEX, "\n")
  12925. .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
  12926. }
  12927. function checkForUnmatchedText(serverText, clientText) {
  12928. clientText = normalizeMarkupForTextOrAttribute(clientText);
  12929. return normalizeMarkupForTextOrAttribute(serverText) === clientText ? !0 : !1;
  12930. }
  12931. function setProp(domElement, tag, key, value, props, prevValue) {
  12932. switch (key) {
  12933. case "children":
  12934. "string" === typeof value
  12935. ? "body" === tag ||
  12936. ("textarea" === tag && "" === value) ||
  12937. setTextContent(domElement, value)
  12938. : ("number" === typeof value || "bigint" === typeof value) &&
  12939. "body" !== tag &&
  12940. setTextContent(domElement, "" + value);
  12941. break;
  12942. case "className":
  12943. setValueForKnownAttribute(domElement, "class", value);
  12944. break;
  12945. case "tabIndex":
  12946. setValueForKnownAttribute(domElement, "tabindex", value);
  12947. break;
  12948. case "dir":
  12949. case "role":
  12950. case "viewBox":
  12951. case "width":
  12952. case "height":
  12953. setValueForKnownAttribute(domElement, key, value);
  12954. break;
  12955. case "style":
  12956. setValueForStyles(domElement, value, prevValue);
  12957. break;
  12958. case "data":
  12959. if ("object" !== tag) {
  12960. setValueForKnownAttribute(domElement, "data", value);
  12961. break;
  12962. }
  12963. case "src":
  12964. case "href":
  12965. if ("" === value && ("a" !== tag || "href" !== key)) {
  12966. domElement.removeAttribute(key);
  12967. break;
  12968. }
  12969. if (
  12970. null == value ||
  12971. "function" === typeof value ||
  12972. "symbol" === typeof value ||
  12973. "boolean" === typeof value
  12974. ) {
  12975. domElement.removeAttribute(key);
  12976. break;
  12977. }
  12978. value = sanitizeURL("" + value);
  12979. domElement.setAttribute(key, value);
  12980. break;
  12981. case "action":
  12982. case "formAction":
  12983. if ("function" === typeof value) {
  12984. domElement.setAttribute(
  12985. key,
  12986. "javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
  12987. );
  12988. break;
  12989. } else
  12990. "function" === typeof prevValue &&
  12991. ("formAction" === key
  12992. ? ("input" !== tag &&
  12993. setProp(domElement, tag, "name", props.name, props, null),
  12994. setProp(
  12995. domElement,
  12996. tag,
  12997. "formEncType",
  12998. props.formEncType,
  12999. props,
  13000. null
  13001. ),
  13002. setProp(
  13003. domElement,
  13004. tag,
  13005. "formMethod",
  13006. props.formMethod,
  13007. props,
  13008. null
  13009. ),
  13010. setProp(
  13011. domElement,
  13012. tag,
  13013. "formTarget",
  13014. props.formTarget,
  13015. props,
  13016. null
  13017. ))
  13018. : (setProp(domElement, tag, "encType", props.encType, props, null),
  13019. setProp(domElement, tag, "method", props.method, props, null),
  13020. setProp(domElement, tag, "target", props.target, props, null)));
  13021. if (
  13022. null == value ||
  13023. "symbol" === typeof value ||
  13024. "boolean" === typeof value
  13025. ) {
  13026. domElement.removeAttribute(key);
  13027. break;
  13028. }
  13029. value = sanitizeURL("" + value);
  13030. domElement.setAttribute(key, value);
  13031. break;
  13032. case "onClick":
  13033. null != value && (domElement.onclick = noop$1);
  13034. break;
  13035. case "onScroll":
  13036. null != value && listenToNonDelegatedEvent("scroll", domElement);
  13037. break;
  13038. case "onScrollEnd":
  13039. null != value && listenToNonDelegatedEvent("scrollend", domElement);
  13040. break;
  13041. case "dangerouslySetInnerHTML":
  13042. if (null != value) {
  13043. if ("object" !== typeof value || !("__html" in value))
  13044. throw Error(formatProdErrorMessage(61));
  13045. key = value.__html;
  13046. if (null != key) {
  13047. if (null != props.children) throw Error(formatProdErrorMessage(60));
  13048. domElement.innerHTML = key;
  13049. }
  13050. }
  13051. break;
  13052. case "multiple":
  13053. domElement.multiple =
  13054. value && "function" !== typeof value && "symbol" !== typeof value;
  13055. break;
  13056. case "muted":
  13057. domElement.muted =
  13058. value && "function" !== typeof value && "symbol" !== typeof value;
  13059. break;
  13060. case "suppressContentEditableWarning":
  13061. case "suppressHydrationWarning":
  13062. case "defaultValue":
  13063. case "defaultChecked":
  13064. case "innerHTML":
  13065. case "ref":
  13066. break;
  13067. case "autoFocus":
  13068. break;
  13069. case "xlinkHref":
  13070. if (
  13071. null == value ||
  13072. "function" === typeof value ||
  13073. "boolean" === typeof value ||
  13074. "symbol" === typeof value
  13075. ) {
  13076. domElement.removeAttribute("xlink:href");
  13077. break;
  13078. }
  13079. key = sanitizeURL("" + value);
  13080. domElement.setAttributeNS(
  13081. "http://www.w3.org/1999/xlink",
  13082. "xlink:href",
  13083. key
  13084. );
  13085. break;
  13086. case "contentEditable":
  13087. case "spellCheck":
  13088. case "draggable":
  13089. case "value":
  13090. case "autoReverse":
  13091. case "externalResourcesRequired":
  13092. case "focusable":
  13093. case "preserveAlpha":
  13094. null != value && "function" !== typeof value && "symbol" !== typeof value
  13095. ? domElement.setAttribute(key, "" + value)
  13096. : domElement.removeAttribute(key);
  13097. break;
  13098. case "inert":
  13099. case "allowFullScreen":
  13100. case "async":
  13101. case "autoPlay":
  13102. case "controls":
  13103. case "default":
  13104. case "defer":
  13105. case "disabled":
  13106. case "disablePictureInPicture":
  13107. case "disableRemotePlayback":
  13108. case "formNoValidate":
  13109. case "hidden":
  13110. case "loop":
  13111. case "noModule":
  13112. case "noValidate":
  13113. case "open":
  13114. case "playsInline":
  13115. case "readOnly":
  13116. case "required":
  13117. case "reversed":
  13118. case "scoped":
  13119. case "seamless":
  13120. case "itemScope":
  13121. value && "function" !== typeof value && "symbol" !== typeof value
  13122. ? domElement.setAttribute(key, "")
  13123. : domElement.removeAttribute(key);
  13124. break;
  13125. case "capture":
  13126. case "download":
  13127. !0 === value
  13128. ? domElement.setAttribute(key, "")
  13129. : !1 !== value &&
  13130. null != value &&
  13131. "function" !== typeof value &&
  13132. "symbol" !== typeof value
  13133. ? domElement.setAttribute(key, value)
  13134. : domElement.removeAttribute(key);
  13135. break;
  13136. case "cols":
  13137. case "rows":
  13138. case "size":
  13139. case "span":
  13140. null != value &&
  13141. "function" !== typeof value &&
  13142. "symbol" !== typeof value &&
  13143. !isNaN(value) &&
  13144. 1 <= value
  13145. ? domElement.setAttribute(key, value)
  13146. : domElement.removeAttribute(key);
  13147. break;
  13148. case "rowSpan":
  13149. case "start":
  13150. null == value ||
  13151. "function" === typeof value ||
  13152. "symbol" === typeof value ||
  13153. isNaN(value)
  13154. ? domElement.removeAttribute(key)
  13155. : domElement.setAttribute(key, value);
  13156. break;
  13157. case "popover":
  13158. listenToNonDelegatedEvent("beforetoggle", domElement);
  13159. listenToNonDelegatedEvent("toggle", domElement);
  13160. setValueForAttribute(domElement, "popover", value);
  13161. break;
  13162. case "xlinkActuate":
  13163. setValueForNamespacedAttribute(
  13164. domElement,
  13165. "http://www.w3.org/1999/xlink",
  13166. "xlink:actuate",
  13167. value
  13168. );
  13169. break;
  13170. case "xlinkArcrole":
  13171. setValueForNamespacedAttribute(
  13172. domElement,
  13173. "http://www.w3.org/1999/xlink",
  13174. "xlink:arcrole",
  13175. value
  13176. );
  13177. break;
  13178. case "xlinkRole":
  13179. setValueForNamespacedAttribute(
  13180. domElement,
  13181. "http://www.w3.org/1999/xlink",
  13182. "xlink:role",
  13183. value
  13184. );
  13185. break;
  13186. case "xlinkShow":
  13187. setValueForNamespacedAttribute(
  13188. domElement,
  13189. "http://www.w3.org/1999/xlink",
  13190. "xlink:show",
  13191. value
  13192. );
  13193. break;
  13194. case "xlinkTitle":
  13195. setValueForNamespacedAttribute(
  13196. domElement,
  13197. "http://www.w3.org/1999/xlink",
  13198. "xlink:title",
  13199. value
  13200. );
  13201. break;
  13202. case "xlinkType":
  13203. setValueForNamespacedAttribute(
  13204. domElement,
  13205. "http://www.w3.org/1999/xlink",
  13206. "xlink:type",
  13207. value
  13208. );
  13209. break;
  13210. case "xmlBase":
  13211. setValueForNamespacedAttribute(
  13212. domElement,
  13213. "http://www.w3.org/XML/1998/namespace",
  13214. "xml:base",
  13215. value
  13216. );
  13217. break;
  13218. case "xmlLang":
  13219. setValueForNamespacedAttribute(
  13220. domElement,
  13221. "http://www.w3.org/XML/1998/namespace",
  13222. "xml:lang",
  13223. value
  13224. );
  13225. break;
  13226. case "xmlSpace":
  13227. setValueForNamespacedAttribute(
  13228. domElement,
  13229. "http://www.w3.org/XML/1998/namespace",
  13230. "xml:space",
  13231. value
  13232. );
  13233. break;
  13234. case "is":
  13235. setValueForAttribute(domElement, "is", value);
  13236. break;
  13237. case "innerText":
  13238. case "textContent":
  13239. break;
  13240. default:
  13241. if (
  13242. !(2 < key.length) ||
  13243. ("o" !== key[0] && "O" !== key[0]) ||
  13244. ("n" !== key[1] && "N" !== key[1])
  13245. )
  13246. (key = aliases.get(key) || key),
  13247. setValueForAttribute(domElement, key, value);
  13248. }
  13249. }
  13250. function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
  13251. switch (key) {
  13252. case "style":
  13253. setValueForStyles(domElement, value, prevValue);
  13254. break;
  13255. case "dangerouslySetInnerHTML":
  13256. if (null != value) {
  13257. if ("object" !== typeof value || !("__html" in value))
  13258. throw Error(formatProdErrorMessage(61));
  13259. key = value.__html;
  13260. if (null != key) {
  13261. if (null != props.children) throw Error(formatProdErrorMessage(60));
  13262. domElement.innerHTML = key;
  13263. }
  13264. }
  13265. break;
  13266. case "children":
  13267. "string" === typeof value
  13268. ? setTextContent(domElement, value)
  13269. : ("number" === typeof value || "bigint" === typeof value) &&
  13270. setTextContent(domElement, "" + value);
  13271. break;
  13272. case "onScroll":
  13273. null != value && listenToNonDelegatedEvent("scroll", domElement);
  13274. break;
  13275. case "onScrollEnd":
  13276. null != value && listenToNonDelegatedEvent("scrollend", domElement);
  13277. break;
  13278. case "onClick":
  13279. null != value && (domElement.onclick = noop$1);
  13280. break;
  13281. case "suppressContentEditableWarning":
  13282. case "suppressHydrationWarning":
  13283. case "innerHTML":
  13284. case "ref":
  13285. break;
  13286. case "innerText":
  13287. case "textContent":
  13288. break;
  13289. default:
  13290. if (!registrationNameDependencies.hasOwnProperty(key))
  13291. a: {
  13292. if (
  13293. "o" === key[0] &&
  13294. "n" === key[1] &&
  13295. ((props = key.endsWith("Capture")),
  13296. (tag = key.slice(2, props ? key.length - 7 : void 0)),
  13297. (prevValue = domElement[internalPropsKey] || null),
  13298. (prevValue = null != prevValue ? prevValue[key] : null),
  13299. "function" === typeof prevValue &&
  13300. domElement.removeEventListener(tag, prevValue, props),
  13301. "function" === typeof value)
  13302. ) {
  13303. "function" !== typeof prevValue &&
  13304. null !== prevValue &&
  13305. (key in domElement
  13306. ? (domElement[key] = null)
  13307. : domElement.hasAttribute(key) &&
  13308. domElement.removeAttribute(key));
  13309. domElement.addEventListener(tag, value, props);
  13310. break a;
  13311. }
  13312. key in domElement
  13313. ? (domElement[key] = value)
  13314. : !0 === value
  13315. ? domElement.setAttribute(key, "")
  13316. : setValueForAttribute(domElement, key, value);
  13317. }
  13318. }
  13319. }
  13320. function setInitialProperties(domElement, tag, props) {
  13321. switch (tag) {
  13322. case "div":
  13323. case "span":
  13324. case "svg":
  13325. case "path":
  13326. case "a":
  13327. case "g":
  13328. case "p":
  13329. case "li":
  13330. break;
  13331. case "img":
  13332. listenToNonDelegatedEvent("error", domElement);
  13333. listenToNonDelegatedEvent("load", domElement);
  13334. var hasSrc = !1,
  13335. hasSrcSet = !1,
  13336. propKey;
  13337. for (propKey in props)
  13338. if (props.hasOwnProperty(propKey)) {
  13339. var propValue = props[propKey];
  13340. if (null != propValue)
  13341. switch (propKey) {
  13342. case "src":
  13343. hasSrc = !0;
  13344. break;
  13345. case "srcSet":
  13346. hasSrcSet = !0;
  13347. break;
  13348. case "children":
  13349. case "dangerouslySetInnerHTML":
  13350. throw Error(formatProdErrorMessage(137, tag));
  13351. default:
  13352. setProp(domElement, tag, propKey, propValue, props, null);
  13353. }
  13354. }
  13355. hasSrcSet &&
  13356. setProp(domElement, tag, "srcSet", props.srcSet, props, null);
  13357. hasSrc && setProp(domElement, tag, "src", props.src, props, null);
  13358. return;
  13359. case "input":
  13360. listenToNonDelegatedEvent("invalid", domElement);
  13361. var defaultValue = (propKey = propValue = hasSrcSet = null),
  13362. checked = null,
  13363. defaultChecked = null;
  13364. for (hasSrc in props)
  13365. if (props.hasOwnProperty(hasSrc)) {
  13366. var propValue$184 = props[hasSrc];
  13367. if (null != propValue$184)
  13368. switch (hasSrc) {
  13369. case "name":
  13370. hasSrcSet = propValue$184;
  13371. break;
  13372. case "type":
  13373. propValue = propValue$184;
  13374. break;
  13375. case "checked":
  13376. checked = propValue$184;
  13377. break;
  13378. case "defaultChecked":
  13379. defaultChecked = propValue$184;
  13380. break;
  13381. case "value":
  13382. propKey = propValue$184;
  13383. break;
  13384. case "defaultValue":
  13385. defaultValue = propValue$184;
  13386. break;
  13387. case "children":
  13388. case "dangerouslySetInnerHTML":
  13389. if (null != propValue$184)
  13390. throw Error(formatProdErrorMessage(137, tag));
  13391. break;
  13392. default:
  13393. setProp(domElement, tag, hasSrc, propValue$184, props, null);
  13394. }
  13395. }
  13396. initInput(
  13397. domElement,
  13398. propKey,
  13399. defaultValue,
  13400. checked,
  13401. defaultChecked,
  13402. propValue,
  13403. hasSrcSet,
  13404. !1
  13405. );
  13406. return;
  13407. case "select":
  13408. listenToNonDelegatedEvent("invalid", domElement);
  13409. hasSrc = propValue = propKey = null;
  13410. for (hasSrcSet in props)
  13411. if (
  13412. props.hasOwnProperty(hasSrcSet) &&
  13413. ((defaultValue = props[hasSrcSet]), null != defaultValue)
  13414. )
  13415. switch (hasSrcSet) {
  13416. case "value":
  13417. propKey = defaultValue;
  13418. break;
  13419. case "defaultValue":
  13420. propValue = defaultValue;
  13421. break;
  13422. case "multiple":
  13423. hasSrc = defaultValue;
  13424. default:
  13425. setProp(domElement, tag, hasSrcSet, defaultValue, props, null);
  13426. }
  13427. tag = propKey;
  13428. props = propValue;
  13429. domElement.multiple = !!hasSrc;
  13430. null != tag
  13431. ? updateOptions(domElement, !!hasSrc, tag, !1)
  13432. : null != props && updateOptions(domElement, !!hasSrc, props, !0);
  13433. return;
  13434. case "textarea":
  13435. listenToNonDelegatedEvent("invalid", domElement);
  13436. propKey = hasSrcSet = hasSrc = null;
  13437. for (propValue in props)
  13438. if (
  13439. props.hasOwnProperty(propValue) &&
  13440. ((defaultValue = props[propValue]), null != defaultValue)
  13441. )
  13442. switch (propValue) {
  13443. case "value":
  13444. hasSrc = defaultValue;
  13445. break;
  13446. case "defaultValue":
  13447. hasSrcSet = defaultValue;
  13448. break;
  13449. case "children":
  13450. propKey = defaultValue;
  13451. break;
  13452. case "dangerouslySetInnerHTML":
  13453. if (null != defaultValue) throw Error(formatProdErrorMessage(91));
  13454. break;
  13455. default:
  13456. setProp(domElement, tag, propValue, defaultValue, props, null);
  13457. }
  13458. initTextarea(domElement, hasSrc, hasSrcSet, propKey);
  13459. return;
  13460. case "option":
  13461. for (checked in props)
  13462. if (
  13463. props.hasOwnProperty(checked) &&
  13464. ((hasSrc = props[checked]), null != hasSrc)
  13465. )
  13466. switch (checked) {
  13467. case "selected":
  13468. domElement.selected =
  13469. hasSrc &&
  13470. "function" !== typeof hasSrc &&
  13471. "symbol" !== typeof hasSrc;
  13472. break;
  13473. default:
  13474. setProp(domElement, tag, checked, hasSrc, props, null);
  13475. }
  13476. return;
  13477. case "dialog":
  13478. listenToNonDelegatedEvent("beforetoggle", domElement);
  13479. listenToNonDelegatedEvent("toggle", domElement);
  13480. listenToNonDelegatedEvent("cancel", domElement);
  13481. listenToNonDelegatedEvent("close", domElement);
  13482. break;
  13483. case "iframe":
  13484. case "object":
  13485. listenToNonDelegatedEvent("load", domElement);
  13486. break;
  13487. case "video":
  13488. case "audio":
  13489. for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)
  13490. listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);
  13491. break;
  13492. case "image":
  13493. listenToNonDelegatedEvent("error", domElement);
  13494. listenToNonDelegatedEvent("load", domElement);
  13495. break;
  13496. case "details":
  13497. listenToNonDelegatedEvent("toggle", domElement);
  13498. break;
  13499. case "embed":
  13500. case "source":
  13501. case "link":
  13502. listenToNonDelegatedEvent("error", domElement),
  13503. listenToNonDelegatedEvent("load", domElement);
  13504. case "area":
  13505. case "base":
  13506. case "br":
  13507. case "col":
  13508. case "hr":
  13509. case "keygen":
  13510. case "meta":
  13511. case "param":
  13512. case "track":
  13513. case "wbr":
  13514. case "menuitem":
  13515. for (defaultChecked in props)
  13516. if (
  13517. props.hasOwnProperty(defaultChecked) &&
  13518. ((hasSrc = props[defaultChecked]), null != hasSrc)
  13519. )
  13520. switch (defaultChecked) {
  13521. case "children":
  13522. case "dangerouslySetInnerHTML":
  13523. throw Error(formatProdErrorMessage(137, tag));
  13524. default:
  13525. setProp(domElement, tag, defaultChecked, hasSrc, props, null);
  13526. }
  13527. return;
  13528. default:
  13529. if (isCustomElement(tag)) {
  13530. for (propValue$184 in props)
  13531. props.hasOwnProperty(propValue$184) &&
  13532. ((hasSrc = props[propValue$184]),
  13533. void 0 !== hasSrc &&
  13534. setPropOnCustomElement(
  13535. domElement,
  13536. tag,
  13537. propValue$184,
  13538. hasSrc,
  13539. props,
  13540. void 0
  13541. ));
  13542. return;
  13543. }
  13544. }
  13545. for (defaultValue in props)
  13546. props.hasOwnProperty(defaultValue) &&
  13547. ((hasSrc = props[defaultValue]),
  13548. null != hasSrc &&
  13549. setProp(domElement, tag, defaultValue, hasSrc, props, null));
  13550. }
  13551. function updateProperties(domElement, tag, lastProps, nextProps) {
  13552. switch (tag) {
  13553. case "div":
  13554. case "span":
  13555. case "svg":
  13556. case "path":
  13557. case "a":
  13558. case "g":
  13559. case "p":
  13560. case "li":
  13561. break;
  13562. case "input":
  13563. var name = null,
  13564. type = null,
  13565. value = null,
  13566. defaultValue = null,
  13567. lastDefaultValue = null,
  13568. checked = null,
  13569. defaultChecked = null;
  13570. for (propKey in lastProps) {
  13571. var lastProp = lastProps[propKey];
  13572. if (lastProps.hasOwnProperty(propKey) && null != lastProp)
  13573. switch (propKey) {
  13574. case "checked":
  13575. break;
  13576. case "value":
  13577. break;
  13578. case "defaultValue":
  13579. lastDefaultValue = lastProp;
  13580. default:
  13581. nextProps.hasOwnProperty(propKey) ||
  13582. setProp(domElement, tag, propKey, null, nextProps, lastProp);
  13583. }
  13584. }
  13585. for (var propKey$201 in nextProps) {
  13586. var propKey = nextProps[propKey$201];
  13587. lastProp = lastProps[propKey$201];
  13588. if (
  13589. nextProps.hasOwnProperty(propKey$201) &&
  13590. (null != propKey || null != lastProp)
  13591. )
  13592. switch (propKey$201) {
  13593. case "type":
  13594. type = propKey;
  13595. break;
  13596. case "name":
  13597. name = propKey;
  13598. break;
  13599. case "checked":
  13600. checked = propKey;
  13601. break;
  13602. case "defaultChecked":
  13603. defaultChecked = propKey;
  13604. break;
  13605. case "value":
  13606. value = propKey;
  13607. break;
  13608. case "defaultValue":
  13609. defaultValue = propKey;
  13610. break;
  13611. case "children":
  13612. case "dangerouslySetInnerHTML":
  13613. if (null != propKey)
  13614. throw Error(formatProdErrorMessage(137, tag));
  13615. break;
  13616. default:
  13617. propKey !== lastProp &&
  13618. setProp(
  13619. domElement,
  13620. tag,
  13621. propKey$201,
  13622. propKey,
  13623. nextProps,
  13624. lastProp
  13625. );
  13626. }
  13627. }
  13628. updateInput(
  13629. domElement,
  13630. value,
  13631. defaultValue,
  13632. lastDefaultValue,
  13633. checked,
  13634. defaultChecked,
  13635. type,
  13636. name
  13637. );
  13638. return;
  13639. case "select":
  13640. propKey = value = defaultValue = propKey$201 = null;
  13641. for (type in lastProps)
  13642. if (
  13643. ((lastDefaultValue = lastProps[type]),
  13644. lastProps.hasOwnProperty(type) && null != lastDefaultValue)
  13645. )
  13646. switch (type) {
  13647. case "value":
  13648. break;
  13649. case "multiple":
  13650. propKey = lastDefaultValue;
  13651. default:
  13652. nextProps.hasOwnProperty(type) ||
  13653. setProp(
  13654. domElement,
  13655. tag,
  13656. type,
  13657. null,
  13658. nextProps,
  13659. lastDefaultValue
  13660. );
  13661. }
  13662. for (name in nextProps)
  13663. if (
  13664. ((type = nextProps[name]),
  13665. (lastDefaultValue = lastProps[name]),
  13666. nextProps.hasOwnProperty(name) &&
  13667. (null != type || null != lastDefaultValue))
  13668. )
  13669. switch (name) {
  13670. case "value":
  13671. propKey$201 = type;
  13672. break;
  13673. case "defaultValue":
  13674. defaultValue = type;
  13675. break;
  13676. case "multiple":
  13677. value = type;
  13678. default:
  13679. type !== lastDefaultValue &&
  13680. setProp(
  13681. domElement,
  13682. tag,
  13683. name,
  13684. type,
  13685. nextProps,
  13686. lastDefaultValue
  13687. );
  13688. }
  13689. tag = defaultValue;
  13690. lastProps = value;
  13691. nextProps = propKey;
  13692. null != propKey$201
  13693. ? updateOptions(domElement, !!lastProps, propKey$201, !1)
  13694. : !!nextProps !== !!lastProps &&
  13695. (null != tag
  13696. ? updateOptions(domElement, !!lastProps, tag, !0)
  13697. : updateOptions(domElement, !!lastProps, lastProps ? [] : "", !1));
  13698. return;
  13699. case "textarea":
  13700. propKey = propKey$201 = null;
  13701. for (defaultValue in lastProps)
  13702. if (
  13703. ((name = lastProps[defaultValue]),
  13704. lastProps.hasOwnProperty(defaultValue) &&
  13705. null != name &&
  13706. !nextProps.hasOwnProperty(defaultValue))
  13707. )
  13708. switch (defaultValue) {
  13709. case "value":
  13710. break;
  13711. case "children":
  13712. break;
  13713. default:
  13714. setProp(domElement, tag, defaultValue, null, nextProps, name);
  13715. }
  13716. for (value in nextProps)
  13717. if (
  13718. ((name = nextProps[value]),
  13719. (type = lastProps[value]),
  13720. nextProps.hasOwnProperty(value) && (null != name || null != type))
  13721. )
  13722. switch (value) {
  13723. case "value":
  13724. propKey$201 = name;
  13725. break;
  13726. case "defaultValue":
  13727. propKey = name;
  13728. break;
  13729. case "children":
  13730. break;
  13731. case "dangerouslySetInnerHTML":
  13732. if (null != name) throw Error(formatProdErrorMessage(91));
  13733. break;
  13734. default:
  13735. name !== type &&
  13736. setProp(domElement, tag, value, name, nextProps, type);
  13737. }
  13738. updateTextarea(domElement, propKey$201, propKey);
  13739. return;
  13740. case "option":
  13741. for (var propKey$217 in lastProps)
  13742. if (
  13743. ((propKey$201 = lastProps[propKey$217]),
  13744. lastProps.hasOwnProperty(propKey$217) &&
  13745. null != propKey$201 &&
  13746. !nextProps.hasOwnProperty(propKey$217))
  13747. )
  13748. switch (propKey$217) {
  13749. case "selected":
  13750. domElement.selected = !1;
  13751. break;
  13752. default:
  13753. setProp(
  13754. domElement,
  13755. tag,
  13756. propKey$217,
  13757. null,
  13758. nextProps,
  13759. propKey$201
  13760. );
  13761. }
  13762. for (lastDefaultValue in nextProps)
  13763. if (
  13764. ((propKey$201 = nextProps[lastDefaultValue]),
  13765. (propKey = lastProps[lastDefaultValue]),
  13766. nextProps.hasOwnProperty(lastDefaultValue) &&
  13767. propKey$201 !== propKey &&
  13768. (null != propKey$201 || null != propKey))
  13769. )
  13770. switch (lastDefaultValue) {
  13771. case "selected":
  13772. domElement.selected =
  13773. propKey$201 &&
  13774. "function" !== typeof propKey$201 &&
  13775. "symbol" !== typeof propKey$201;
  13776. break;
  13777. default:
  13778. setProp(
  13779. domElement,
  13780. tag,
  13781. lastDefaultValue,
  13782. propKey$201,
  13783. nextProps,
  13784. propKey
  13785. );
  13786. }
  13787. return;
  13788. case "img":
  13789. case "link":
  13790. case "area":
  13791. case "base":
  13792. case "br":
  13793. case "col":
  13794. case "embed":
  13795. case "hr":
  13796. case "keygen":
  13797. case "meta":
  13798. case "param":
  13799. case "source":
  13800. case "track":
  13801. case "wbr":
  13802. case "menuitem":
  13803. for (var propKey$222 in lastProps)
  13804. (propKey$201 = lastProps[propKey$222]),
  13805. lastProps.hasOwnProperty(propKey$222) &&
  13806. null != propKey$201 &&
  13807. !nextProps.hasOwnProperty(propKey$222) &&
  13808. setProp(domElement, tag, propKey$222, null, nextProps, propKey$201);
  13809. for (checked in nextProps)
  13810. if (
  13811. ((propKey$201 = nextProps[checked]),
  13812. (propKey = lastProps[checked]),
  13813. nextProps.hasOwnProperty(checked) &&
  13814. propKey$201 !== propKey &&
  13815. (null != propKey$201 || null != propKey))
  13816. )
  13817. switch (checked) {
  13818. case "children":
  13819. case "dangerouslySetInnerHTML":
  13820. if (null != propKey$201)
  13821. throw Error(formatProdErrorMessage(137, tag));
  13822. break;
  13823. default:
  13824. setProp(
  13825. domElement,
  13826. tag,
  13827. checked,
  13828. propKey$201,
  13829. nextProps,
  13830. propKey
  13831. );
  13832. }
  13833. return;
  13834. default:
  13835. if (isCustomElement(tag)) {
  13836. for (var propKey$227 in lastProps)
  13837. (propKey$201 = lastProps[propKey$227]),
  13838. lastProps.hasOwnProperty(propKey$227) &&
  13839. void 0 !== propKey$201 &&
  13840. !nextProps.hasOwnProperty(propKey$227) &&
  13841. setPropOnCustomElement(
  13842. domElement,
  13843. tag,
  13844. propKey$227,
  13845. void 0,
  13846. nextProps,
  13847. propKey$201
  13848. );
  13849. for (defaultChecked in nextProps)
  13850. (propKey$201 = nextProps[defaultChecked]),
  13851. (propKey = lastProps[defaultChecked]),
  13852. !nextProps.hasOwnProperty(defaultChecked) ||
  13853. propKey$201 === propKey ||
  13854. (void 0 === propKey$201 && void 0 === propKey) ||
  13855. setPropOnCustomElement(
  13856. domElement,
  13857. tag,
  13858. defaultChecked,
  13859. propKey$201,
  13860. nextProps,
  13861. propKey
  13862. );
  13863. return;
  13864. }
  13865. }
  13866. for (var propKey$232 in lastProps)
  13867. (propKey$201 = lastProps[propKey$232]),
  13868. lastProps.hasOwnProperty(propKey$232) &&
  13869. null != propKey$201 &&
  13870. !nextProps.hasOwnProperty(propKey$232) &&
  13871. setProp(domElement, tag, propKey$232, null, nextProps, propKey$201);
  13872. for (lastProp in nextProps)
  13873. (propKey$201 = nextProps[lastProp]),
  13874. (propKey = lastProps[lastProp]),
  13875. !nextProps.hasOwnProperty(lastProp) ||
  13876. propKey$201 === propKey ||
  13877. (null == propKey$201 && null == propKey) ||
  13878. setProp(domElement, tag, lastProp, propKey$201, nextProps, propKey);
  13879. }
  13880. function isLikelyStaticResource(initiatorType) {
  13881. switch (initiatorType) {
  13882. case "css":
  13883. case "script":
  13884. case "font":
  13885. case "img":
  13886. case "image":
  13887. case "input":
  13888. case "link":
  13889. return !0;
  13890. default:
  13891. return !1;
  13892. }
  13893. }
  13894. function estimateBandwidth() {
  13895. if ("function" === typeof performance.getEntriesByType) {
  13896. for (
  13897. var count = 0,
  13898. bits = 0,
  13899. resourceEntries = performance.getEntriesByType("resource"),
  13900. i = 0;
  13901. i < resourceEntries.length;
  13902. i++
  13903. ) {
  13904. var entry = resourceEntries[i],
  13905. transferSize = entry.transferSize,
  13906. initiatorType = entry.initiatorType,
  13907. duration = entry.duration;
  13908. if (transferSize && duration && isLikelyStaticResource(initiatorType)) {
  13909. initiatorType = 0;
  13910. duration = entry.responseEnd;
  13911. for (i += 1; i < resourceEntries.length; i++) {
  13912. var overlapEntry = resourceEntries[i],
  13913. overlapStartTime = overlapEntry.startTime;
  13914. if (overlapStartTime > duration) break;
  13915. var overlapTransferSize = overlapEntry.transferSize,
  13916. overlapInitiatorType = overlapEntry.initiatorType;
  13917. overlapTransferSize &&
  13918. isLikelyStaticResource(overlapInitiatorType) &&
  13919. ((overlapEntry = overlapEntry.responseEnd),
  13920. (initiatorType +=
  13921. overlapTransferSize *
  13922. (overlapEntry < duration
  13923. ? 1
  13924. : (duration - overlapStartTime) /
  13925. (overlapEntry - overlapStartTime))));
  13926. }
  13927. --i;
  13928. bits += (8 * (transferSize + initiatorType)) / (entry.duration / 1e3);
  13929. count++;
  13930. if (10 < count) break;
  13931. }
  13932. }
  13933. if (0 < count) return bits / count / 1e6;
  13934. }
  13935. return navigator.connection &&
  13936. ((count = navigator.connection.downlink), "number" === typeof count)
  13937. ? count
  13938. : 5;
  13939. }
  13940. var eventsEnabled = null,
  13941. selectionInformation = null;
  13942. function getOwnerDocumentFromRootContainer(rootContainerElement) {
  13943. return 9 === rootContainerElement.nodeType
  13944. ? rootContainerElement
  13945. : rootContainerElement.ownerDocument;
  13946. }
  13947. function getOwnHostContext(namespaceURI) {
  13948. switch (namespaceURI) {
  13949. case "http://www.w3.org/2000/svg":
  13950. return 1;
  13951. case "http://www.w3.org/1998/Math/MathML":
  13952. return 2;
  13953. default:
  13954. return 0;
  13955. }
  13956. }
  13957. function getChildHostContextProd(parentNamespace, type) {
  13958. if (0 === parentNamespace)
  13959. switch (type) {
  13960. case "svg":
  13961. return 1;
  13962. case "math":
  13963. return 2;
  13964. default:
  13965. return 0;
  13966. }
  13967. return 1 === parentNamespace && "foreignObject" === type
  13968. ? 0
  13969. : parentNamespace;
  13970. }
  13971. function shouldSetTextContent(type, props) {
  13972. return (
  13973. "textarea" === type ||
  13974. "noscript" === type ||
  13975. "string" === typeof props.children ||
  13976. "number" === typeof props.children ||
  13977. "bigint" === typeof props.children ||
  13978. ("object" === typeof props.dangerouslySetInnerHTML &&
  13979. null !== props.dangerouslySetInnerHTML &&
  13980. null != props.dangerouslySetInnerHTML.__html)
  13981. );
  13982. }
  13983. var currentPopstateTransitionEvent = null;
  13984. function shouldAttemptEagerTransition() {
  13985. var event = window.event;
  13986. if (event && "popstate" === event.type) {
  13987. if (event === currentPopstateTransitionEvent) return !1;
  13988. currentPopstateTransitionEvent = event;
  13989. return !0;
  13990. }
  13991. currentPopstateTransitionEvent = null;
  13992. return !1;
  13993. }
  13994. var scheduleTimeout = "function" === typeof setTimeout ? setTimeout : void 0,
  13995. cancelTimeout = "function" === typeof clearTimeout ? clearTimeout : void 0,
  13996. localPromise = "function" === typeof Promise ? Promise : void 0,
  13997. scheduleMicrotask =
  13998. "function" === typeof queueMicrotask
  13999. ? queueMicrotask
  14000. : "undefined" !== typeof localPromise
  14001. ? function (callback) {
  14002. return localPromise
  14003. .resolve(null)
  14004. .then(callback)
  14005. .catch(handleErrorInNextTick);
  14006. }
  14007. : scheduleTimeout;
  14008. function handleErrorInNextTick(error) {
  14009. setTimeout(function () {
  14010. throw error;
  14011. });
  14012. }
  14013. function isSingletonScope(type) {
  14014. return "head" === type;
  14015. }
  14016. function clearHydrationBoundary(parentInstance, hydrationInstance) {
  14017. var node = hydrationInstance,
  14018. depth = 0;
  14019. do {
  14020. var nextNode = node.nextSibling;
  14021. parentInstance.removeChild(node);
  14022. if (nextNode && 8 === nextNode.nodeType)
  14023. if (((node = nextNode.data), "/$" === node || "/&" === node)) {
  14024. if (0 === depth) {
  14025. parentInstance.removeChild(nextNode);
  14026. retryIfBlockedOn(hydrationInstance);
  14027. return;
  14028. }
  14029. depth--;
  14030. } else if (
  14031. "$" === node ||
  14032. "$?" === node ||
  14033. "$~" === node ||
  14034. "$!" === node ||
  14035. "&" === node
  14036. )
  14037. depth++;
  14038. else if ("html" === node)
  14039. releaseSingletonInstance(parentInstance.ownerDocument.documentElement);
  14040. else if ("head" === node) {
  14041. node = parentInstance.ownerDocument.head;
  14042. releaseSingletonInstance(node);
  14043. for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {
  14044. var nextNode$jscomp$0 = node$jscomp$0.nextSibling,
  14045. nodeName = node$jscomp$0.nodeName;
  14046. node$jscomp$0[internalHoistableMarker] ||
  14047. "SCRIPT" === nodeName ||
  14048. "STYLE" === nodeName ||
  14049. ("LINK" === nodeName &&
  14050. "stylesheet" === node$jscomp$0.rel.toLowerCase()) ||
  14051. node.removeChild(node$jscomp$0);
  14052. node$jscomp$0 = nextNode$jscomp$0;
  14053. }
  14054. } else
  14055. "body" === node &&
  14056. releaseSingletonInstance(parentInstance.ownerDocument.body);
  14057. node = nextNode;
  14058. } while (node);
  14059. retryIfBlockedOn(hydrationInstance);
  14060. }
  14061. function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {
  14062. var node = suspenseInstance;
  14063. suspenseInstance = 0;
  14064. do {
  14065. var nextNode = node.nextSibling;
  14066. 1 === node.nodeType
  14067. ? isHidden
  14068. ? ((node._stashedDisplay = node.style.display),
  14069. (node.style.display = "none"))
  14070. : ((node.style.display = node._stashedDisplay || ""),
  14071. "" === node.getAttribute("style") && node.removeAttribute("style"))
  14072. : 3 === node.nodeType &&
  14073. (isHidden
  14074. ? ((node._stashedText = node.nodeValue), (node.nodeValue = ""))
  14075. : (node.nodeValue = node._stashedText || ""));
  14076. if (nextNode && 8 === nextNode.nodeType)
  14077. if (((node = nextNode.data), "/$" === node))
  14078. if (0 === suspenseInstance) break;
  14079. else suspenseInstance--;
  14080. else
  14081. ("$" !== node && "$?" !== node && "$~" !== node && "$!" !== node) ||
  14082. suspenseInstance++;
  14083. node = nextNode;
  14084. } while (node);
  14085. }
  14086. function clearContainerSparingly(container) {
  14087. var nextNode = container.firstChild;
  14088. nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
  14089. for (; nextNode; ) {
  14090. var node = nextNode;
  14091. nextNode = nextNode.nextSibling;
  14092. switch (node.nodeName) {
  14093. case "HTML":
  14094. case "HEAD":
  14095. case "BODY":
  14096. clearContainerSparingly(node);
  14097. detachDeletedInstance(node);
  14098. continue;
  14099. case "SCRIPT":
  14100. case "STYLE":
  14101. continue;
  14102. case "LINK":
  14103. if ("stylesheet" === node.rel.toLowerCase()) continue;
  14104. }
  14105. container.removeChild(node);
  14106. }
  14107. }
  14108. function canHydrateInstance(instance, type, props, inRootOrSingleton) {
  14109. for (; 1 === instance.nodeType; ) {
  14110. var anyProps = props;
  14111. if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
  14112. if (
  14113. !inRootOrSingleton &&
  14114. ("INPUT" !== instance.nodeName || "hidden" !== instance.type)
  14115. )
  14116. break;
  14117. } else if (!inRootOrSingleton)
  14118. if ("input" === type && "hidden" === instance.type) {
  14119. var name = null == anyProps.name ? null : "" + anyProps.name;
  14120. if (
  14121. "hidden" === anyProps.type &&
  14122. instance.getAttribute("name") === name
  14123. )
  14124. return instance;
  14125. } else return instance;
  14126. else if (!instance[internalHoistableMarker])
  14127. switch (type) {
  14128. case "meta":
  14129. if (!instance.hasAttribute("itemprop")) break;
  14130. return instance;
  14131. case "link":
  14132. name = instance.getAttribute("rel");
  14133. if ("stylesheet" === name && instance.hasAttribute("data-precedence"))
  14134. break;
  14135. else if (
  14136. name !== anyProps.rel ||
  14137. instance.getAttribute("href") !==
  14138. (null == anyProps.href || "" === anyProps.href
  14139. ? null
  14140. : anyProps.href) ||
  14141. instance.getAttribute("crossorigin") !==
  14142. (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||
  14143. instance.getAttribute("title") !==
  14144. (null == anyProps.title ? null : anyProps.title)
  14145. )
  14146. break;
  14147. return instance;
  14148. case "style":
  14149. if (instance.hasAttribute("data-precedence")) break;
  14150. return instance;
  14151. case "script":
  14152. name = instance.getAttribute("src");
  14153. if (
  14154. (name !== (null == anyProps.src ? null : anyProps.src) ||
  14155. instance.getAttribute("type") !==
  14156. (null == anyProps.type ? null : anyProps.type) ||
  14157. instance.getAttribute("crossorigin") !==
  14158. (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) &&
  14159. name &&
  14160. instance.hasAttribute("async") &&
  14161. !instance.hasAttribute("itemprop")
  14162. )
  14163. break;
  14164. return instance;
  14165. default:
  14166. return instance;
  14167. }
  14168. instance = getNextHydratable(instance.nextSibling);
  14169. if (null === instance) break;
  14170. }
  14171. return null;
  14172. }
  14173. function canHydrateTextInstance(instance, text, inRootOrSingleton) {
  14174. if ("" === text) return null;
  14175. for (; 3 !== instance.nodeType; ) {
  14176. if (
  14177. (1 !== instance.nodeType ||
  14178. "INPUT" !== instance.nodeName ||
  14179. "hidden" !== instance.type) &&
  14180. !inRootOrSingleton
  14181. )
  14182. return null;
  14183. instance = getNextHydratable(instance.nextSibling);
  14184. if (null === instance) return null;
  14185. }
  14186. return instance;
  14187. }
  14188. function canHydrateHydrationBoundary(instance, inRootOrSingleton) {
  14189. for (; 8 !== instance.nodeType; ) {
  14190. if (
  14191. (1 !== instance.nodeType ||
  14192. "INPUT" !== instance.nodeName ||
  14193. "hidden" !== instance.type) &&
  14194. !inRootOrSingleton
  14195. )
  14196. return null;
  14197. instance = getNextHydratable(instance.nextSibling);
  14198. if (null === instance) return null;
  14199. }
  14200. return instance;
  14201. }
  14202. function isSuspenseInstancePending(instance) {
  14203. return "$?" === instance.data || "$~" === instance.data;
  14204. }
  14205. function isSuspenseInstanceFallback(instance) {
  14206. return (
  14207. "$!" === instance.data ||
  14208. ("$?" === instance.data && "loading" !== instance.ownerDocument.readyState)
  14209. );
  14210. }
  14211. function registerSuspenseInstanceRetry(instance, callback) {
  14212. var ownerDocument = instance.ownerDocument;
  14213. if ("$~" === instance.data) instance._reactRetry = callback;
  14214. else if ("$?" !== instance.data || "loading" !== ownerDocument.readyState)
  14215. callback();
  14216. else {
  14217. var listener = function () {
  14218. callback();
  14219. ownerDocument.removeEventListener("DOMContentLoaded", listener);
  14220. };
  14221. ownerDocument.addEventListener("DOMContentLoaded", listener);
  14222. instance._reactRetry = listener;
  14223. }
  14224. }
  14225. function getNextHydratable(node) {
  14226. for (; null != node; node = node.nextSibling) {
  14227. var nodeType = node.nodeType;
  14228. if (1 === nodeType || 3 === nodeType) break;
  14229. if (8 === nodeType) {
  14230. nodeType = node.data;
  14231. if (
  14232. "$" === nodeType ||
  14233. "$!" === nodeType ||
  14234. "$?" === nodeType ||
  14235. "$~" === nodeType ||
  14236. "&" === nodeType ||
  14237. "F!" === nodeType ||
  14238. "F" === nodeType
  14239. )
  14240. break;
  14241. if ("/$" === nodeType || "/&" === nodeType) return null;
  14242. }
  14243. }
  14244. return node;
  14245. }
  14246. var previousHydratableOnEnteringScopedSingleton = null;
  14247. function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {
  14248. hydrationInstance = hydrationInstance.nextSibling;
  14249. for (var depth = 0; hydrationInstance; ) {
  14250. if (8 === hydrationInstance.nodeType) {
  14251. var data = hydrationInstance.data;
  14252. if ("/$" === data || "/&" === data) {
  14253. if (0 === depth)
  14254. return getNextHydratable(hydrationInstance.nextSibling);
  14255. depth--;
  14256. } else
  14257. ("$" !== data &&
  14258. "$!" !== data &&
  14259. "$?" !== data &&
  14260. "$~" !== data &&
  14261. "&" !== data) ||
  14262. depth++;
  14263. }
  14264. hydrationInstance = hydrationInstance.nextSibling;
  14265. }
  14266. return null;
  14267. }
  14268. function getParentHydrationBoundary(targetInstance) {
  14269. targetInstance = targetInstance.previousSibling;
  14270. for (var depth = 0; targetInstance; ) {
  14271. if (8 === targetInstance.nodeType) {
  14272. var data = targetInstance.data;
  14273. if (
  14274. "$" === data ||
  14275. "$!" === data ||
  14276. "$?" === data ||
  14277. "$~" === data ||
  14278. "&" === data
  14279. ) {
  14280. if (0 === depth) return targetInstance;
  14281. depth--;
  14282. } else ("/$" !== data && "/&" !== data) || depth++;
  14283. }
  14284. targetInstance = targetInstance.previousSibling;
  14285. }
  14286. return null;
  14287. }
  14288. function resolveSingletonInstance(type, props, rootContainerInstance) {
  14289. props = getOwnerDocumentFromRootContainer(rootContainerInstance);
  14290. switch (type) {
  14291. case "html":
  14292. type = props.documentElement;
  14293. if (!type) throw Error(formatProdErrorMessage(452));
  14294. return type;
  14295. case "head":
  14296. type = props.head;
  14297. if (!type) throw Error(formatProdErrorMessage(453));
  14298. return type;
  14299. case "body":
  14300. type = props.body;
  14301. if (!type) throw Error(formatProdErrorMessage(454));
  14302. return type;
  14303. default:
  14304. throw Error(formatProdErrorMessage(451));
  14305. }
  14306. }
  14307. function releaseSingletonInstance(instance) {
  14308. for (var attributes = instance.attributes; attributes.length; )
  14309. instance.removeAttributeNode(attributes[0]);
  14310. detachDeletedInstance(instance);
  14311. }
  14312. var preloadPropsMap = new Map(),
  14313. preconnectsSet = new Set();
  14314. function getHoistableRoot(container) {
  14315. return "function" === typeof container.getRootNode
  14316. ? container.getRootNode()
  14317. : 9 === container.nodeType
  14318. ? container
  14319. : container.ownerDocument;
  14320. }
  14321. var previousDispatcher = ReactDOMSharedInternals.d;
  14322. ReactDOMSharedInternals.d = {
  14323. f: flushSyncWork,
  14324. r: requestFormReset,
  14325. D: prefetchDNS,
  14326. C: preconnect,
  14327. L: preload,
  14328. m: preloadModule,
  14329. X: preinitScript,
  14330. S: preinitStyle,
  14331. M: preinitModuleScript
  14332. };
  14333. function flushSyncWork() {
  14334. var previousWasRendering = previousDispatcher.f(),
  14335. wasRendering = flushSyncWork$1();
  14336. return previousWasRendering || wasRendering;
  14337. }
  14338. function requestFormReset(form) {
  14339. var formInst = getInstanceFromNode(form);
  14340. null !== formInst && 5 === formInst.tag && "form" === formInst.type
  14341. ? requestFormReset$1(formInst)
  14342. : previousDispatcher.r(form);
  14343. }
  14344. var globalDocument = "undefined" === typeof document ? null : document;
  14345. function preconnectAs(rel, href, crossOrigin) {
  14346. var ownerDocument = globalDocument;
  14347. if (ownerDocument && "string" === typeof href && href) {
  14348. var limitedEscapedHref =
  14349. escapeSelectorAttributeValueInsideDoubleQuotes(href);
  14350. limitedEscapedHref =
  14351. 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]';
  14352. "string" === typeof crossOrigin &&
  14353. (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]');
  14354. preconnectsSet.has(limitedEscapedHref) ||
  14355. (preconnectsSet.add(limitedEscapedHref),
  14356. (rel = { rel: rel, crossOrigin: crossOrigin, href: href }),
  14357. null === ownerDocument.querySelector(limitedEscapedHref) &&
  14358. ((href = ownerDocument.createElement("link")),
  14359. setInitialProperties(href, "link", rel),
  14360. markNodeAsHoistable(href),
  14361. ownerDocument.head.appendChild(href)));
  14362. }
  14363. }
  14364. function prefetchDNS(href) {
  14365. previousDispatcher.D(href);
  14366. preconnectAs("dns-prefetch", href, null);
  14367. }
  14368. function preconnect(href, crossOrigin) {
  14369. previousDispatcher.C(href, crossOrigin);
  14370. preconnectAs("preconnect", href, crossOrigin);
  14371. }
  14372. function preload(href, as, options) {
  14373. previousDispatcher.L(href, as, options);
  14374. var ownerDocument = globalDocument;
  14375. if (ownerDocument && href && as) {
  14376. var preloadSelector =
  14377. 'link[rel="preload"][as="' +
  14378. escapeSelectorAttributeValueInsideDoubleQuotes(as) +
  14379. '"]';
  14380. "image" === as
  14381. ? options && options.imageSrcSet
  14382. ? ((preloadSelector +=
  14383. '[imagesrcset="' +
  14384. escapeSelectorAttributeValueInsideDoubleQuotes(
  14385. options.imageSrcSet
  14386. ) +
  14387. '"]'),
  14388. "string" === typeof options.imageSizes &&
  14389. (preloadSelector +=
  14390. '[imagesizes="' +
  14391. escapeSelectorAttributeValueInsideDoubleQuotes(
  14392. options.imageSizes
  14393. ) +
  14394. '"]'))
  14395. : (preloadSelector +=
  14396. '[href="' +
  14397. escapeSelectorAttributeValueInsideDoubleQuotes(href) +
  14398. '"]')
  14399. : (preloadSelector +=
  14400. '[href="' +
  14401. escapeSelectorAttributeValueInsideDoubleQuotes(href) +
  14402. '"]');
  14403. var key = preloadSelector;
  14404. switch (as) {
  14405. case "style":
  14406. key = getStyleKey(href);
  14407. break;
  14408. case "script":
  14409. key = getScriptKey(href);
  14410. }
  14411. preloadPropsMap.has(key) ||
  14412. ((href = assign(
  14413. {
  14414. rel: "preload",
  14415. href:
  14416. "image" === as && options && options.imageSrcSet ? void 0 : href,
  14417. as: as
  14418. },
  14419. options
  14420. )),
  14421. preloadPropsMap.set(key, href),
  14422. null !== ownerDocument.querySelector(preloadSelector) ||
  14423. ("style" === as &&
  14424. ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) ||
  14425. ("script" === as &&
  14426. ownerDocument.querySelector(getScriptSelectorFromKey(key))) ||
  14427. ((as = ownerDocument.createElement("link")),
  14428. setInitialProperties(as, "link", href),
  14429. markNodeAsHoistable(as),
  14430. ownerDocument.head.appendChild(as)));
  14431. }
  14432. }
  14433. function preloadModule(href, options) {
  14434. previousDispatcher.m(href, options);
  14435. var ownerDocument = globalDocument;
  14436. if (ownerDocument && href) {
  14437. var as = options && "string" === typeof options.as ? options.as : "script",
  14438. preloadSelector =
  14439. 'link[rel="modulepreload"][as="' +
  14440. escapeSelectorAttributeValueInsideDoubleQuotes(as) +
  14441. '"][href="' +
  14442. escapeSelectorAttributeValueInsideDoubleQuotes(href) +
  14443. '"]',
  14444. key = preloadSelector;
  14445. switch (as) {
  14446. case "audioworklet":
  14447. case "paintworklet":
  14448. case "serviceworker":
  14449. case "sharedworker":
  14450. case "worker":
  14451. case "script":
  14452. key = getScriptKey(href);
  14453. }
  14454. if (
  14455. !preloadPropsMap.has(key) &&
  14456. ((href = assign({ rel: "modulepreload", href: href }, options)),
  14457. preloadPropsMap.set(key, href),
  14458. null === ownerDocument.querySelector(preloadSelector))
  14459. ) {
  14460. switch (as) {
  14461. case "audioworklet":
  14462. case "paintworklet":
  14463. case "serviceworker":
  14464. case "sharedworker":
  14465. case "worker":
  14466. case "script":
  14467. if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
  14468. return;
  14469. }
  14470. as = ownerDocument.createElement("link");
  14471. setInitialProperties(as, "link", href);
  14472. markNodeAsHoistable(as);
  14473. ownerDocument.head.appendChild(as);
  14474. }
  14475. }
  14476. }
  14477. function preinitStyle(href, precedence, options) {
  14478. previousDispatcher.S(href, precedence, options);
  14479. var ownerDocument = globalDocument;
  14480. if (ownerDocument && href) {
  14481. var styles = getResourcesFromRoot(ownerDocument).hoistableStyles,
  14482. key = getStyleKey(href);
  14483. precedence = precedence || "default";
  14484. var resource = styles.get(key);
  14485. if (!resource) {
  14486. var state = { loading: 0, preload: null };
  14487. if (
  14488. (resource = ownerDocument.querySelector(
  14489. getStylesheetSelectorFromKey(key)
  14490. ))
  14491. )
  14492. state.loading = 5;
  14493. else {
  14494. href = assign(
  14495. { rel: "stylesheet", href: href, "data-precedence": precedence },
  14496. options
  14497. );
  14498. (options = preloadPropsMap.get(key)) &&
  14499. adoptPreloadPropsForStylesheet(href, options);
  14500. var link = (resource = ownerDocument.createElement("link"));
  14501. markNodeAsHoistable(link);
  14502. setInitialProperties(link, "link", href);
  14503. link._p = new Promise(function (resolve, reject) {
  14504. link.onload = resolve;
  14505. link.onerror = reject;
  14506. });
  14507. link.addEventListener("load", function () {
  14508. state.loading |= 1;
  14509. });
  14510. link.addEventListener("error", function () {
  14511. state.loading |= 2;
  14512. });
  14513. state.loading |= 4;
  14514. insertStylesheet(resource, precedence, ownerDocument);
  14515. }
  14516. resource = {
  14517. type: "stylesheet",
  14518. instance: resource,
  14519. count: 1,
  14520. state: state
  14521. };
  14522. styles.set(key, resource);
  14523. }
  14524. }
  14525. }
  14526. function preinitScript(src, options) {
  14527. previousDispatcher.X(src, options);
  14528. var ownerDocument = globalDocument;
  14529. if (ownerDocument && src) {
  14530. var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
  14531. key = getScriptKey(src),
  14532. resource = scripts.get(key);
  14533. resource ||
  14534. ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),
  14535. resource ||
  14536. ((src = assign({ src: src, async: !0 }, options)),
  14537. (options = preloadPropsMap.get(key)) &&
  14538. adoptPreloadPropsForScript(src, options),
  14539. (resource = ownerDocument.createElement("script")),
  14540. markNodeAsHoistable(resource),
  14541. setInitialProperties(resource, "link", src),
  14542. ownerDocument.head.appendChild(resource)),
  14543. (resource = {
  14544. type: "script",
  14545. instance: resource,
  14546. count: 1,
  14547. state: null
  14548. }),
  14549. scripts.set(key, resource));
  14550. }
  14551. }
  14552. function preinitModuleScript(src, options) {
  14553. previousDispatcher.M(src, options);
  14554. var ownerDocument = globalDocument;
  14555. if (ownerDocument && src) {
  14556. var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
  14557. key = getScriptKey(src),
  14558. resource = scripts.get(key);
  14559. resource ||
  14560. ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),
  14561. resource ||
  14562. ((src = assign({ src: src, async: !0, type: "module" }, options)),
  14563. (options = preloadPropsMap.get(key)) &&
  14564. adoptPreloadPropsForScript(src, options),
  14565. (resource = ownerDocument.createElement("script")),
  14566. markNodeAsHoistable(resource),
  14567. setInitialProperties(resource, "link", src),
  14568. ownerDocument.head.appendChild(resource)),
  14569. (resource = {
  14570. type: "script",
  14571. instance: resource,
  14572. count: 1,
  14573. state: null
  14574. }),
  14575. scripts.set(key, resource));
  14576. }
  14577. }
  14578. function getResource(type, currentProps, pendingProps, currentResource) {
  14579. var JSCompiler_inline_result = (JSCompiler_inline_result =
  14580. rootInstanceStackCursor.current)
  14581. ? getHoistableRoot(JSCompiler_inline_result)
  14582. : null;
  14583. if (!JSCompiler_inline_result) throw Error(formatProdErrorMessage(446));
  14584. switch (type) {
  14585. case "meta":
  14586. case "title":
  14587. return null;
  14588. case "style":
  14589. return "string" === typeof pendingProps.precedence &&
  14590. "string" === typeof pendingProps.href
  14591. ? ((currentProps = getStyleKey(pendingProps.href)),
  14592. (pendingProps = getResourcesFromRoot(
  14593. JSCompiler_inline_result
  14594. ).hoistableStyles),
  14595. (currentResource = pendingProps.get(currentProps)),
  14596. currentResource ||
  14597. ((currentResource = {
  14598. type: "style",
  14599. instance: null,
  14600. count: 0,
  14601. state: null
  14602. }),
  14603. pendingProps.set(currentProps, currentResource)),
  14604. currentResource)
  14605. : { type: "void", instance: null, count: 0, state: null };
  14606. case "link":
  14607. if (
  14608. "stylesheet" === pendingProps.rel &&
  14609. "string" === typeof pendingProps.href &&
  14610. "string" === typeof pendingProps.precedence
  14611. ) {
  14612. type = getStyleKey(pendingProps.href);
  14613. var styles$243 = getResourcesFromRoot(
  14614. JSCompiler_inline_result
  14615. ).hoistableStyles,
  14616. resource$244 = styles$243.get(type);
  14617. resource$244 ||
  14618. ((JSCompiler_inline_result =
  14619. JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result),
  14620. (resource$244 = {
  14621. type: "stylesheet",
  14622. instance: null,
  14623. count: 0,
  14624. state: { loading: 0, preload: null }
  14625. }),
  14626. styles$243.set(type, resource$244),
  14627. (styles$243 = JSCompiler_inline_result.querySelector(
  14628. getStylesheetSelectorFromKey(type)
  14629. )) &&
  14630. !styles$243._p &&
  14631. ((resource$244.instance = styles$243),
  14632. (resource$244.state.loading = 5)),
  14633. preloadPropsMap.has(type) ||
  14634. ((pendingProps = {
  14635. rel: "preload",
  14636. as: "style",
  14637. href: pendingProps.href,
  14638. crossOrigin: pendingProps.crossOrigin,
  14639. integrity: pendingProps.integrity,
  14640. media: pendingProps.media,
  14641. hrefLang: pendingProps.hrefLang,
  14642. referrerPolicy: pendingProps.referrerPolicy
  14643. }),
  14644. preloadPropsMap.set(type, pendingProps),
  14645. styles$243 ||
  14646. preloadStylesheet(
  14647. JSCompiler_inline_result,
  14648. type,
  14649. pendingProps,
  14650. resource$244.state
  14651. )));
  14652. if (currentProps && null === currentResource)
  14653. throw Error(formatProdErrorMessage(528, ""));
  14654. return resource$244;
  14655. }
  14656. if (currentProps && null !== currentResource)
  14657. throw Error(formatProdErrorMessage(529, ""));
  14658. return null;
  14659. case "script":
  14660. return (
  14661. (currentProps = pendingProps.async),
  14662. (pendingProps = pendingProps.src),
  14663. "string" === typeof pendingProps &&
  14664. currentProps &&
  14665. "function" !== typeof currentProps &&
  14666. "symbol" !== typeof currentProps
  14667. ? ((currentProps = getScriptKey(pendingProps)),
  14668. (pendingProps = getResourcesFromRoot(
  14669. JSCompiler_inline_result
  14670. ).hoistableScripts),
  14671. (currentResource = pendingProps.get(currentProps)),
  14672. currentResource ||
  14673. ((currentResource = {
  14674. type: "script",
  14675. instance: null,
  14676. count: 0,
  14677. state: null
  14678. }),
  14679. pendingProps.set(currentProps, currentResource)),
  14680. currentResource)
  14681. : { type: "void", instance: null, count: 0, state: null }
  14682. );
  14683. default:
  14684. throw Error(formatProdErrorMessage(444, type));
  14685. }
  14686. }
  14687. function getStyleKey(href) {
  14688. return 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"';
  14689. }
  14690. function getStylesheetSelectorFromKey(key) {
  14691. return 'link[rel="stylesheet"][' + key + "]";
  14692. }
  14693. function stylesheetPropsFromRawProps(rawProps) {
  14694. return assign({}, rawProps, {
  14695. "data-precedence": rawProps.precedence,
  14696. precedence: null
  14697. });
  14698. }
  14699. function preloadStylesheet(ownerDocument, key, preloadProps, state) {
  14700. ownerDocument.querySelector('link[rel="preload"][as="style"][' + key + "]")
  14701. ? (state.loading = 1)
  14702. : ((key = ownerDocument.createElement("link")),
  14703. (state.preload = key),
  14704. key.addEventListener("load", function () {
  14705. return (state.loading |= 1);
  14706. }),
  14707. key.addEventListener("error", function () {
  14708. return (state.loading |= 2);
  14709. }),
  14710. setInitialProperties(key, "link", preloadProps),
  14711. markNodeAsHoistable(key),
  14712. ownerDocument.head.appendChild(key));
  14713. }
  14714. function getScriptKey(src) {
  14715. return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
  14716. }
  14717. function getScriptSelectorFromKey(key) {
  14718. return "script[async]" + key;
  14719. }
  14720. function acquireResource(hoistableRoot, resource, props) {
  14721. resource.count++;
  14722. if (null === resource.instance)
  14723. switch (resource.type) {
  14724. case "style":
  14725. var instance = hoistableRoot.querySelector(
  14726. 'style[data-href~="' +
  14727. escapeSelectorAttributeValueInsideDoubleQuotes(props.href) +
  14728. '"]'
  14729. );
  14730. if (instance)
  14731. return (
  14732. (resource.instance = instance),
  14733. markNodeAsHoistable(instance),
  14734. instance
  14735. );
  14736. var styleProps = assign({}, props, {
  14737. "data-href": props.href,
  14738. "data-precedence": props.precedence,
  14739. href: null,
  14740. precedence: null
  14741. });
  14742. instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement(
  14743. "style"
  14744. );
  14745. markNodeAsHoistable(instance);
  14746. setInitialProperties(instance, "style", styleProps);
  14747. insertStylesheet(instance, props.precedence, hoistableRoot);
  14748. return (resource.instance = instance);
  14749. case "stylesheet":
  14750. styleProps = getStyleKey(props.href);
  14751. var instance$249 = hoistableRoot.querySelector(
  14752. getStylesheetSelectorFromKey(styleProps)
  14753. );
  14754. if (instance$249)
  14755. return (
  14756. (resource.state.loading |= 4),
  14757. (resource.instance = instance$249),
  14758. markNodeAsHoistable(instance$249),
  14759. instance$249
  14760. );
  14761. instance = stylesheetPropsFromRawProps(props);
  14762. (styleProps = preloadPropsMap.get(styleProps)) &&
  14763. adoptPreloadPropsForStylesheet(instance, styleProps);
  14764. instance$249 = (
  14765. hoistableRoot.ownerDocument || hoistableRoot
  14766. ).createElement("link");
  14767. markNodeAsHoistable(instance$249);
  14768. var linkInstance = instance$249;
  14769. linkInstance._p = new Promise(function (resolve, reject) {
  14770. linkInstance.onload = resolve;
  14771. linkInstance.onerror = reject;
  14772. });
  14773. setInitialProperties(instance$249, "link", instance);
  14774. resource.state.loading |= 4;
  14775. insertStylesheet(instance$249, props.precedence, hoistableRoot);
  14776. return (resource.instance = instance$249);
  14777. case "script":
  14778. instance$249 = getScriptKey(props.src);
  14779. if (
  14780. (styleProps = hoistableRoot.querySelector(
  14781. getScriptSelectorFromKey(instance$249)
  14782. ))
  14783. )
  14784. return (
  14785. (resource.instance = styleProps),
  14786. markNodeAsHoistable(styleProps),
  14787. styleProps
  14788. );
  14789. instance = props;
  14790. if ((styleProps = preloadPropsMap.get(instance$249)))
  14791. (instance = assign({}, props)),
  14792. adoptPreloadPropsForScript(instance, styleProps);
  14793. hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
  14794. styleProps = hoistableRoot.createElement("script");
  14795. markNodeAsHoistable(styleProps);
  14796. setInitialProperties(styleProps, "link", instance);
  14797. hoistableRoot.head.appendChild(styleProps);
  14798. return (resource.instance = styleProps);
  14799. case "void":
  14800. return null;
  14801. default:
  14802. throw Error(formatProdErrorMessage(443, resource.type));
  14803. }
  14804. else
  14805. "stylesheet" === resource.type &&
  14806. 0 === (resource.state.loading & 4) &&
  14807. ((instance = resource.instance),
  14808. (resource.state.loading |= 4),
  14809. insertStylesheet(instance, props.precedence, hoistableRoot));
  14810. return resource.instance;
  14811. }
  14812. function insertStylesheet(instance, precedence, root) {
  14813. for (
  14814. var nodes = root.querySelectorAll(
  14815. 'link[rel="stylesheet"][data-precedence],style[data-precedence]'
  14816. ),
  14817. last = nodes.length ? nodes[nodes.length - 1] : null,
  14818. prior = last,
  14819. i = 0;
  14820. i < nodes.length;
  14821. i++
  14822. ) {
  14823. var node = nodes[i];
  14824. if (node.dataset.precedence === precedence) prior = node;
  14825. else if (prior !== last) break;
  14826. }
  14827. prior
  14828. ? prior.parentNode.insertBefore(instance, prior.nextSibling)
  14829. : ((precedence = 9 === root.nodeType ? root.head : root),
  14830. precedence.insertBefore(instance, precedence.firstChild));
  14831. }
  14832. function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
  14833. null == stylesheetProps.crossOrigin &&
  14834. (stylesheetProps.crossOrigin = preloadProps.crossOrigin);
  14835. null == stylesheetProps.referrerPolicy &&
  14836. (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);
  14837. null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);
  14838. }
  14839. function adoptPreloadPropsForScript(scriptProps, preloadProps) {
  14840. null == scriptProps.crossOrigin &&
  14841. (scriptProps.crossOrigin = preloadProps.crossOrigin);
  14842. null == scriptProps.referrerPolicy &&
  14843. (scriptProps.referrerPolicy = preloadProps.referrerPolicy);
  14844. null == scriptProps.integrity &&
  14845. (scriptProps.integrity = preloadProps.integrity);
  14846. }
  14847. var tagCaches = null;
  14848. function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
  14849. if (null === tagCaches) {
  14850. var cache = new Map();
  14851. var caches = (tagCaches = new Map());
  14852. caches.set(ownerDocument, cache);
  14853. } else
  14854. (caches = tagCaches),
  14855. (cache = caches.get(ownerDocument)),
  14856. cache || ((cache = new Map()), caches.set(ownerDocument, cache));
  14857. if (cache.has(type)) return cache;
  14858. cache.set(type, null);
  14859. ownerDocument = ownerDocument.getElementsByTagName(type);
  14860. for (caches = 0; caches < ownerDocument.length; caches++) {
  14861. var node = ownerDocument[caches];
  14862. if (
  14863. !(
  14864. node[internalHoistableMarker] ||
  14865. node[internalInstanceKey] ||
  14866. ("link" === type && "stylesheet" === node.getAttribute("rel"))
  14867. ) &&
  14868. "http://www.w3.org/2000/svg" !== node.namespaceURI
  14869. ) {
  14870. var nodeKey = node.getAttribute(keyAttribute) || "";
  14871. nodeKey = type + nodeKey;
  14872. var existing = cache.get(nodeKey);
  14873. existing ? existing.push(node) : cache.set(nodeKey, [node]);
  14874. }
  14875. }
  14876. return cache;
  14877. }
  14878. function mountHoistable(hoistableRoot, type, instance) {
  14879. hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
  14880. hoistableRoot.head.insertBefore(
  14881. instance,
  14882. "title" === type ? hoistableRoot.querySelector("head > title") : null
  14883. );
  14884. }
  14885. function isHostHoistableType(type, props, hostContext) {
  14886. if (1 === hostContext || null != props.itemProp) return !1;
  14887. switch (type) {
  14888. case "meta":
  14889. case "title":
  14890. return !0;
  14891. case "style":
  14892. if (
  14893. "string" !== typeof props.precedence ||
  14894. "string" !== typeof props.href ||
  14895. "" === props.href
  14896. )
  14897. break;
  14898. return !0;
  14899. case "link":
  14900. if (
  14901. "string" !== typeof props.rel ||
  14902. "string" !== typeof props.href ||
  14903. "" === props.href ||
  14904. props.onLoad ||
  14905. props.onError
  14906. )
  14907. break;
  14908. switch (props.rel) {
  14909. case "stylesheet":
  14910. return (
  14911. (type = props.disabled),
  14912. "string" === typeof props.precedence && null == type
  14913. );
  14914. default:
  14915. return !0;
  14916. }
  14917. case "script":
  14918. if (
  14919. props.async &&
  14920. "function" !== typeof props.async &&
  14921. "symbol" !== typeof props.async &&
  14922. !props.onLoad &&
  14923. !props.onError &&
  14924. props.src &&
  14925. "string" === typeof props.src
  14926. )
  14927. return !0;
  14928. }
  14929. return !1;
  14930. }
  14931. function preloadResource(resource) {
  14932. return "stylesheet" === resource.type && 0 === (resource.state.loading & 3)
  14933. ? !1
  14934. : !0;
  14935. }
  14936. function suspendResource(state, hoistableRoot, resource, props) {
  14937. if (
  14938. "stylesheet" === resource.type &&
  14939. ("string" !== typeof props.media ||
  14940. !1 !== matchMedia(props.media).matches) &&
  14941. 0 === (resource.state.loading & 4)
  14942. ) {
  14943. if (null === resource.instance) {
  14944. var key = getStyleKey(props.href),
  14945. instance = hoistableRoot.querySelector(
  14946. getStylesheetSelectorFromKey(key)
  14947. );
  14948. if (instance) {
  14949. hoistableRoot = instance._p;
  14950. null !== hoistableRoot &&
  14951. "object" === typeof hoistableRoot &&
  14952. "function" === typeof hoistableRoot.then &&
  14953. (state.count++,
  14954. (state = onUnsuspend.bind(state)),
  14955. hoistableRoot.then(state, state));
  14956. resource.state.loading |= 4;
  14957. resource.instance = instance;
  14958. markNodeAsHoistable(instance);
  14959. return;
  14960. }
  14961. instance = hoistableRoot.ownerDocument || hoistableRoot;
  14962. props = stylesheetPropsFromRawProps(props);
  14963. (key = preloadPropsMap.get(key)) &&
  14964. adoptPreloadPropsForStylesheet(props, key);
  14965. instance = instance.createElement("link");
  14966. markNodeAsHoistable(instance);
  14967. var linkInstance = instance;
  14968. linkInstance._p = new Promise(function (resolve, reject) {
  14969. linkInstance.onload = resolve;
  14970. linkInstance.onerror = reject;
  14971. });
  14972. setInitialProperties(instance, "link", props);
  14973. resource.instance = instance;
  14974. }
  14975. null === state.stylesheets && (state.stylesheets = new Map());
  14976. state.stylesheets.set(resource, hoistableRoot);
  14977. (hoistableRoot = resource.state.preload) &&
  14978. 0 === (resource.state.loading & 3) &&
  14979. (state.count++,
  14980. (resource = onUnsuspend.bind(state)),
  14981. hoistableRoot.addEventListener("load", resource),
  14982. hoistableRoot.addEventListener("error", resource));
  14983. }
  14984. }
  14985. var estimatedBytesWithinLimit = 0;
  14986. function waitForCommitToBeReady(state, timeoutOffset) {
  14987. state.stylesheets &&
  14988. 0 === state.count &&
  14989. insertSuspendedStylesheets(state, state.stylesheets);
  14990. return 0 < state.count || 0 < state.imgCount
  14991. ? function (commit) {
  14992. var stylesheetTimer = setTimeout(function () {
  14993. state.stylesheets &&
  14994. insertSuspendedStylesheets(state, state.stylesheets);
  14995. if (state.unsuspend) {
  14996. var unsuspend = state.unsuspend;
  14997. state.unsuspend = null;
  14998. unsuspend();
  14999. }
  15000. }, 6e4 + timeoutOffset);
  15001. 0 < state.imgBytes &&
  15002. 0 === estimatedBytesWithinLimit &&
  15003. (estimatedBytesWithinLimit = 62500 * estimateBandwidth());
  15004. var imgTimer = setTimeout(
  15005. function () {
  15006. state.waitingForImages = !1;
  15007. if (
  15008. 0 === state.count &&
  15009. (state.stylesheets &&
  15010. insertSuspendedStylesheets(state, state.stylesheets),
  15011. state.unsuspend)
  15012. ) {
  15013. var unsuspend = state.unsuspend;
  15014. state.unsuspend = null;
  15015. unsuspend();
  15016. }
  15017. },
  15018. (state.imgBytes > estimatedBytesWithinLimit ? 50 : 800) +
  15019. timeoutOffset
  15020. );
  15021. state.unsuspend = commit;
  15022. return function () {
  15023. state.unsuspend = null;
  15024. clearTimeout(stylesheetTimer);
  15025. clearTimeout(imgTimer);
  15026. };
  15027. }
  15028. : null;
  15029. }
  15030. function onUnsuspend() {
  15031. this.count--;
  15032. if (0 === this.count && (0 === this.imgCount || !this.waitingForImages))
  15033. if (this.stylesheets) insertSuspendedStylesheets(this, this.stylesheets);
  15034. else if (this.unsuspend) {
  15035. var unsuspend = this.unsuspend;
  15036. this.unsuspend = null;
  15037. unsuspend();
  15038. }
  15039. }
  15040. var precedencesByRoot = null;
  15041. function insertSuspendedStylesheets(state, resources) {
  15042. state.stylesheets = null;
  15043. null !== state.unsuspend &&
  15044. (state.count++,
  15045. (precedencesByRoot = new Map()),
  15046. resources.forEach(insertStylesheetIntoRoot, state),
  15047. (precedencesByRoot = null),
  15048. onUnsuspend.call(state));
  15049. }
  15050. function insertStylesheetIntoRoot(root, resource) {
  15051. if (!(resource.state.loading & 4)) {
  15052. var precedences = precedencesByRoot.get(root);
  15053. if (precedences) var last = precedences.get(null);
  15054. else {
  15055. precedences = new Map();
  15056. precedencesByRoot.set(root, precedences);
  15057. for (
  15058. var nodes = root.querySelectorAll(
  15059. "link[data-precedence],style[data-precedence]"
  15060. ),
  15061. i = 0;
  15062. i < nodes.length;
  15063. i++
  15064. ) {
  15065. var node = nodes[i];
  15066. if (
  15067. "LINK" === node.nodeName ||
  15068. "not all" !== node.getAttribute("media")
  15069. )
  15070. precedences.set(node.dataset.precedence, node), (last = node);
  15071. }
  15072. last && precedences.set(null, last);
  15073. }
  15074. nodes = resource.instance;
  15075. node = nodes.getAttribute("data-precedence");
  15076. i = precedences.get(node) || last;
  15077. i === last && precedences.set(null, nodes);
  15078. precedences.set(node, nodes);
  15079. this.count++;
  15080. last = onUnsuspend.bind(this);
  15081. nodes.addEventListener("load", last);
  15082. nodes.addEventListener("error", last);
  15083. i
  15084. ? i.parentNode.insertBefore(nodes, i.nextSibling)
  15085. : ((root = 9 === root.nodeType ? root.head : root),
  15086. root.insertBefore(nodes, root.firstChild));
  15087. resource.state.loading |= 4;
  15088. }
  15089. }
  15090. var HostTransitionContext = {
  15091. $$typeof: REACT_CONTEXT_TYPE,
  15092. Provider: null,
  15093. Consumer: null,
  15094. _currentValue: sharedNotPendingObject,
  15095. _currentValue2: sharedNotPendingObject,
  15096. _threadCount: 0
  15097. };
  15098. function FiberRootNode(
  15099. containerInfo,
  15100. tag,
  15101. hydrate,
  15102. identifierPrefix,
  15103. onUncaughtError,
  15104. onCaughtError,
  15105. onRecoverableError,
  15106. onDefaultTransitionIndicator,
  15107. formState
  15108. ) {
  15109. this.tag = 1;
  15110. this.containerInfo = containerInfo;
  15111. this.pingCache = this.current = this.pendingChildren = null;
  15112. this.timeoutHandle = -1;
  15113. this.callbackNode =
  15114. this.next =
  15115. this.pendingContext =
  15116. this.context =
  15117. this.cancelPendingCommit =
  15118. null;
  15119. this.callbackPriority = 0;
  15120. this.expirationTimes = createLaneMap(-1);
  15121. this.entangledLanes =
  15122. this.shellSuspendCounter =
  15123. this.errorRecoveryDisabledLanes =
  15124. this.expiredLanes =
  15125. this.warmLanes =
  15126. this.pingedLanes =
  15127. this.suspendedLanes =
  15128. this.pendingLanes =
  15129. 0;
  15130. this.entanglements = createLaneMap(0);
  15131. this.hiddenUpdates = createLaneMap(null);
  15132. this.identifierPrefix = identifierPrefix;
  15133. this.onUncaughtError = onUncaughtError;
  15134. this.onCaughtError = onCaughtError;
  15135. this.onRecoverableError = onRecoverableError;
  15136. this.pooledCache = null;
  15137. this.pooledCacheLanes = 0;
  15138. this.formState = formState;
  15139. this.incompleteTransitions = new Map();
  15140. }
  15141. function createFiberRoot(
  15142. containerInfo,
  15143. tag,
  15144. hydrate,
  15145. initialChildren,
  15146. hydrationCallbacks,
  15147. isStrictMode,
  15148. identifierPrefix,
  15149. formState,
  15150. onUncaughtError,
  15151. onCaughtError,
  15152. onRecoverableError,
  15153. onDefaultTransitionIndicator
  15154. ) {
  15155. containerInfo = new FiberRootNode(
  15156. containerInfo,
  15157. tag,
  15158. hydrate,
  15159. identifierPrefix,
  15160. onUncaughtError,
  15161. onCaughtError,
  15162. onRecoverableError,
  15163. onDefaultTransitionIndicator,
  15164. formState
  15165. );
  15166. tag = 1;
  15167. !0 === isStrictMode && (tag |= 24);
  15168. isStrictMode = createFiberImplClass(3, null, null, tag);
  15169. containerInfo.current = isStrictMode;
  15170. isStrictMode.stateNode = containerInfo;
  15171. tag = createCache();
  15172. tag.refCount++;
  15173. containerInfo.pooledCache = tag;
  15174. tag.refCount++;
  15175. isStrictMode.memoizedState = {
  15176. element: initialChildren,
  15177. isDehydrated: hydrate,
  15178. cache: tag
  15179. };
  15180. initializeUpdateQueue(isStrictMode);
  15181. return containerInfo;
  15182. }
  15183. function getContextForSubtree(parentComponent) {
  15184. if (!parentComponent) return emptyContextObject;
  15185. parentComponent = emptyContextObject;
  15186. return parentComponent;
  15187. }
  15188. function updateContainerImpl(
  15189. rootFiber,
  15190. lane,
  15191. element,
  15192. container,
  15193. parentComponent,
  15194. callback
  15195. ) {
  15196. parentComponent = getContextForSubtree(parentComponent);
  15197. null === container.context
  15198. ? (container.context = parentComponent)
  15199. : (container.pendingContext = parentComponent);
  15200. container = createUpdate(lane);
  15201. container.payload = { element: element };
  15202. callback = void 0 === callback ? null : callback;
  15203. null !== callback && (container.callback = callback);
  15204. element = enqueueUpdate(rootFiber, container, lane);
  15205. null !== element &&
  15206. (scheduleUpdateOnFiber(element, rootFiber, lane),
  15207. entangleTransitions(element, rootFiber, lane));
  15208. }
  15209. function markRetryLaneImpl(fiber, retryLane) {
  15210. fiber = fiber.memoizedState;
  15211. if (null !== fiber && null !== fiber.dehydrated) {
  15212. var a = fiber.retryLane;
  15213. fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
  15214. }
  15215. }
  15216. function markRetryLaneIfNotHydrated(fiber, retryLane) {
  15217. markRetryLaneImpl(fiber, retryLane);
  15218. (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
  15219. }
  15220. function attemptContinuousHydration(fiber) {
  15221. if (13 === fiber.tag || 31 === fiber.tag) {
  15222. var root = enqueueConcurrentRenderForLane(fiber, 67108864);
  15223. null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);
  15224. markRetryLaneIfNotHydrated(fiber, 67108864);
  15225. }
  15226. }
  15227. function attemptHydrationAtCurrentPriority(fiber) {
  15228. if (13 === fiber.tag || 31 === fiber.tag) {
  15229. var lane = requestUpdateLane();
  15230. lane = getBumpedLaneForHydrationByLane(lane);
  15231. var root = enqueueConcurrentRenderForLane(fiber, lane);
  15232. null !== root && scheduleUpdateOnFiber(root, fiber, lane);
  15233. markRetryLaneIfNotHydrated(fiber, lane);
  15234. }
  15235. }
  15236. var _enabled = !0;
  15237. function dispatchDiscreteEvent(
  15238. domEventName,
  15239. eventSystemFlags,
  15240. container,
  15241. nativeEvent
  15242. ) {
  15243. var prevTransition = ReactSharedInternals.T;
  15244. ReactSharedInternals.T = null;
  15245. var previousPriority = ReactDOMSharedInternals.p;
  15246. try {
  15247. (ReactDOMSharedInternals.p = 2),
  15248. dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
  15249. } finally {
  15250. (ReactDOMSharedInternals.p = previousPriority),
  15251. (ReactSharedInternals.T = prevTransition);
  15252. }
  15253. }
  15254. function dispatchContinuousEvent(
  15255. domEventName,
  15256. eventSystemFlags,
  15257. container,
  15258. nativeEvent
  15259. ) {
  15260. var prevTransition = ReactSharedInternals.T;
  15261. ReactSharedInternals.T = null;
  15262. var previousPriority = ReactDOMSharedInternals.p;
  15263. try {
  15264. (ReactDOMSharedInternals.p = 8),
  15265. dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
  15266. } finally {
  15267. (ReactDOMSharedInternals.p = previousPriority),
  15268. (ReactSharedInternals.T = prevTransition);
  15269. }
  15270. }
  15271. function dispatchEvent(
  15272. domEventName,
  15273. eventSystemFlags,
  15274. targetContainer,
  15275. nativeEvent
  15276. ) {
  15277. if (_enabled) {
  15278. var blockedOn = findInstanceBlockingEvent(nativeEvent);
  15279. if (null === blockedOn)
  15280. dispatchEventForPluginEventSystem(
  15281. domEventName,
  15282. eventSystemFlags,
  15283. nativeEvent,
  15284. return_targetInst,
  15285. targetContainer
  15286. ),
  15287. clearIfContinuousEvent(domEventName, nativeEvent);
  15288. else if (
  15289. queueIfContinuousEvent(
  15290. blockedOn,
  15291. domEventName,
  15292. eventSystemFlags,
  15293. targetContainer,
  15294. nativeEvent
  15295. )
  15296. )
  15297. nativeEvent.stopPropagation();
  15298. else if (
  15299. (clearIfContinuousEvent(domEventName, nativeEvent),
  15300. eventSystemFlags & 4 &&
  15301. -1 < discreteReplayableEvents.indexOf(domEventName))
  15302. ) {
  15303. for (; null !== blockedOn; ) {
  15304. var fiber = getInstanceFromNode(blockedOn);
  15305. if (null !== fiber)
  15306. switch (fiber.tag) {
  15307. case 3:
  15308. fiber = fiber.stateNode;
  15309. if (fiber.current.memoizedState.isDehydrated) {
  15310. var lanes = getHighestPriorityLanes(fiber.pendingLanes);
  15311. if (0 !== lanes) {
  15312. var root = fiber;
  15313. root.pendingLanes |= 2;
  15314. for (root.entangledLanes |= 2; lanes; ) {
  15315. var lane = 1 << (31 - clz32(lanes));
  15316. root.entanglements[1] |= lane;
  15317. lanes &= ~lane;
  15318. }
  15319. ensureRootIsScheduled(fiber);
  15320. 0 === (executionContext & 6) &&
  15321. ((workInProgressRootRenderTargetTime = now() + 500),
  15322. flushSyncWorkAcrossRoots_impl(0, !1));
  15323. }
  15324. }
  15325. break;
  15326. case 31:
  15327. case 13:
  15328. (root = enqueueConcurrentRenderForLane(fiber, 2)),
  15329. null !== root && scheduleUpdateOnFiber(root, fiber, 2),
  15330. flushSyncWork$1(),
  15331. markRetryLaneIfNotHydrated(fiber, 2);
  15332. }
  15333. fiber = findInstanceBlockingEvent(nativeEvent);
  15334. null === fiber &&
  15335. dispatchEventForPluginEventSystem(
  15336. domEventName,
  15337. eventSystemFlags,
  15338. nativeEvent,
  15339. return_targetInst,
  15340. targetContainer
  15341. );
  15342. if (fiber === blockedOn) break;
  15343. blockedOn = fiber;
  15344. }
  15345. null !== blockedOn && nativeEvent.stopPropagation();
  15346. } else
  15347. dispatchEventForPluginEventSystem(
  15348. domEventName,
  15349. eventSystemFlags,
  15350. nativeEvent,
  15351. null,
  15352. targetContainer
  15353. );
  15354. }
  15355. }
  15356. function findInstanceBlockingEvent(nativeEvent) {
  15357. nativeEvent = getEventTarget(nativeEvent);
  15358. return findInstanceBlockingTarget(nativeEvent);
  15359. }
  15360. var return_targetInst = null;
  15361. function findInstanceBlockingTarget(targetNode) {
  15362. return_targetInst = null;
  15363. targetNode = getClosestInstanceFromNode(targetNode);
  15364. if (null !== targetNode) {
  15365. var nearestMounted = getNearestMountedFiber(targetNode);
  15366. if (null === nearestMounted) targetNode = null;
  15367. else {
  15368. var tag = nearestMounted.tag;
  15369. if (13 === tag) {
  15370. targetNode = getSuspenseInstanceFromFiber(nearestMounted);
  15371. if (null !== targetNode) return targetNode;
  15372. targetNode = null;
  15373. } else if (31 === tag) {
  15374. targetNode = getActivityInstanceFromFiber(nearestMounted);
  15375. if (null !== targetNode) return targetNode;
  15376. targetNode = null;
  15377. } else if (3 === tag) {
  15378. if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
  15379. return 3 === nearestMounted.tag
  15380. ? nearestMounted.stateNode.containerInfo
  15381. : null;
  15382. targetNode = null;
  15383. } else nearestMounted !== targetNode && (targetNode = null);
  15384. }
  15385. }
  15386. return_targetInst = targetNode;
  15387. return null;
  15388. }
  15389. function getEventPriority(domEventName) {
  15390. switch (domEventName) {
  15391. case "beforetoggle":
  15392. case "cancel":
  15393. case "click":
  15394. case "close":
  15395. case "contextmenu":
  15396. case "copy":
  15397. case "cut":
  15398. case "auxclick":
  15399. case "dblclick":
  15400. case "dragend":
  15401. case "dragstart":
  15402. case "drop":
  15403. case "focusin":
  15404. case "focusout":
  15405. case "input":
  15406. case "invalid":
  15407. case "keydown":
  15408. case "keypress":
  15409. case "keyup":
  15410. case "mousedown":
  15411. case "mouseup":
  15412. case "paste":
  15413. case "pause":
  15414. case "play":
  15415. case "pointercancel":
  15416. case "pointerdown":
  15417. case "pointerup":
  15418. case "ratechange":
  15419. case "reset":
  15420. case "resize":
  15421. case "seeked":
  15422. case "submit":
  15423. case "toggle":
  15424. case "touchcancel":
  15425. case "touchend":
  15426. case "touchstart":
  15427. case "volumechange":
  15428. case "change":
  15429. case "selectionchange":
  15430. case "textInput":
  15431. case "compositionstart":
  15432. case "compositionend":
  15433. case "compositionupdate":
  15434. case "beforeblur":
  15435. case "afterblur":
  15436. case "beforeinput":
  15437. case "blur":
  15438. case "fullscreenchange":
  15439. case "focus":
  15440. case "hashchange":
  15441. case "popstate":
  15442. case "select":
  15443. case "selectstart":
  15444. return 2;
  15445. case "drag":
  15446. case "dragenter":
  15447. case "dragexit":
  15448. case "dragleave":
  15449. case "dragover":
  15450. case "mousemove":
  15451. case "mouseout":
  15452. case "mouseover":
  15453. case "pointermove":
  15454. case "pointerout":
  15455. case "pointerover":
  15456. case "scroll":
  15457. case "touchmove":
  15458. case "wheel":
  15459. case "mouseenter":
  15460. case "mouseleave":
  15461. case "pointerenter":
  15462. case "pointerleave":
  15463. return 8;
  15464. case "message":
  15465. switch (getCurrentPriorityLevel()) {
  15466. case ImmediatePriority:
  15467. return 2;
  15468. case UserBlockingPriority:
  15469. return 8;
  15470. case NormalPriority$1:
  15471. case LowPriority:
  15472. return 32;
  15473. case IdlePriority:
  15474. return 268435456;
  15475. default:
  15476. return 32;
  15477. }
  15478. default:
  15479. return 32;
  15480. }
  15481. }
  15482. var hasScheduledReplayAttempt = !1,
  15483. queuedFocus = null,
  15484. queuedDrag = null,
  15485. queuedMouse = null,
  15486. queuedPointers = new Map(),
  15487. queuedPointerCaptures = new Map(),
  15488. queuedExplicitHydrationTargets = [],
  15489. discreteReplayableEvents =
  15490. "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(
  15491. " "
  15492. );
  15493. function clearIfContinuousEvent(domEventName, nativeEvent) {
  15494. switch (domEventName) {
  15495. case "focusin":
  15496. case "focusout":
  15497. queuedFocus = null;
  15498. break;
  15499. case "dragenter":
  15500. case "dragleave":
  15501. queuedDrag = null;
  15502. break;
  15503. case "mouseover":
  15504. case "mouseout":
  15505. queuedMouse = null;
  15506. break;
  15507. case "pointerover":
  15508. case "pointerout":
  15509. queuedPointers.delete(nativeEvent.pointerId);
  15510. break;
  15511. case "gotpointercapture":
  15512. case "lostpointercapture":
  15513. queuedPointerCaptures.delete(nativeEvent.pointerId);
  15514. }
  15515. }
  15516. function accumulateOrCreateContinuousQueuedReplayableEvent(
  15517. existingQueuedEvent,
  15518. blockedOn,
  15519. domEventName,
  15520. eventSystemFlags,
  15521. targetContainer,
  15522. nativeEvent
  15523. ) {
  15524. if (
  15525. null === existingQueuedEvent ||
  15526. existingQueuedEvent.nativeEvent !== nativeEvent
  15527. )
  15528. return (
  15529. (existingQueuedEvent = {
  15530. blockedOn: blockedOn,
  15531. domEventName: domEventName,
  15532. eventSystemFlags: eventSystemFlags,
  15533. nativeEvent: nativeEvent,
  15534. targetContainers: [targetContainer]
  15535. }),
  15536. null !== blockedOn &&
  15537. ((blockedOn = getInstanceFromNode(blockedOn)),
  15538. null !== blockedOn && attemptContinuousHydration(blockedOn)),
  15539. existingQueuedEvent
  15540. );
  15541. existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
  15542. blockedOn = existingQueuedEvent.targetContainers;
  15543. null !== targetContainer &&
  15544. -1 === blockedOn.indexOf(targetContainer) &&
  15545. blockedOn.push(targetContainer);
  15546. return existingQueuedEvent;
  15547. }
  15548. function queueIfContinuousEvent(
  15549. blockedOn,
  15550. domEventName,
  15551. eventSystemFlags,
  15552. targetContainer,
  15553. nativeEvent
  15554. ) {
  15555. switch (domEventName) {
  15556. case "focusin":
  15557. return (
  15558. (queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
  15559. queuedFocus,
  15560. blockedOn,
  15561. domEventName,
  15562. eventSystemFlags,
  15563. targetContainer,
  15564. nativeEvent
  15565. )),
  15566. !0
  15567. );
  15568. case "dragenter":
  15569. return (
  15570. (queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
  15571. queuedDrag,
  15572. blockedOn,
  15573. domEventName,
  15574. eventSystemFlags,
  15575. targetContainer,
  15576. nativeEvent
  15577. )),
  15578. !0
  15579. );
  15580. case "mouseover":
  15581. return (
  15582. (queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
  15583. queuedMouse,
  15584. blockedOn,
  15585. domEventName,
  15586. eventSystemFlags,
  15587. targetContainer,
  15588. nativeEvent
  15589. )),
  15590. !0
  15591. );
  15592. case "pointerover":
  15593. var pointerId = nativeEvent.pointerId;
  15594. queuedPointers.set(
  15595. pointerId,
  15596. accumulateOrCreateContinuousQueuedReplayableEvent(
  15597. queuedPointers.get(pointerId) || null,
  15598. blockedOn,
  15599. domEventName,
  15600. eventSystemFlags,
  15601. targetContainer,
  15602. nativeEvent
  15603. )
  15604. );
  15605. return !0;
  15606. case "gotpointercapture":
  15607. return (
  15608. (pointerId = nativeEvent.pointerId),
  15609. queuedPointerCaptures.set(
  15610. pointerId,
  15611. accumulateOrCreateContinuousQueuedReplayableEvent(
  15612. queuedPointerCaptures.get(pointerId) || null,
  15613. blockedOn,
  15614. domEventName,
  15615. eventSystemFlags,
  15616. targetContainer,
  15617. nativeEvent
  15618. )
  15619. ),
  15620. !0
  15621. );
  15622. }
  15623. return !1;
  15624. }
  15625. function attemptExplicitHydrationTarget(queuedTarget) {
  15626. var targetInst = getClosestInstanceFromNode(queuedTarget.target);
  15627. if (null !== targetInst) {
  15628. var nearestMounted = getNearestMountedFiber(targetInst);
  15629. if (null !== nearestMounted)
  15630. if (((targetInst = nearestMounted.tag), 13 === targetInst)) {
  15631. if (
  15632. ((targetInst = getSuspenseInstanceFromFiber(nearestMounted)),
  15633. null !== targetInst)
  15634. ) {
  15635. queuedTarget.blockedOn = targetInst;
  15636. runWithPriority(queuedTarget.priority, function () {
  15637. attemptHydrationAtCurrentPriority(nearestMounted);
  15638. });
  15639. return;
  15640. }
  15641. } else if (31 === targetInst) {
  15642. if (
  15643. ((targetInst = getActivityInstanceFromFiber(nearestMounted)),
  15644. null !== targetInst)
  15645. ) {
  15646. queuedTarget.blockedOn = targetInst;
  15647. runWithPriority(queuedTarget.priority, function () {
  15648. attemptHydrationAtCurrentPriority(nearestMounted);
  15649. });
  15650. return;
  15651. }
  15652. } else if (
  15653. 3 === targetInst &&
  15654. nearestMounted.stateNode.current.memoizedState.isDehydrated
  15655. ) {
  15656. queuedTarget.blockedOn =
  15657. 3 === nearestMounted.tag
  15658. ? nearestMounted.stateNode.containerInfo
  15659. : null;
  15660. return;
  15661. }
  15662. }
  15663. queuedTarget.blockedOn = null;
  15664. }
  15665. function attemptReplayContinuousQueuedEvent(queuedEvent) {
  15666. if (null !== queuedEvent.blockedOn) return !1;
  15667. for (
  15668. var targetContainers = queuedEvent.targetContainers;
  15669. 0 < targetContainers.length;
  15670. ) {
  15671. var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
  15672. if (null === nextBlockedOn) {
  15673. nextBlockedOn = queuedEvent.nativeEvent;
  15674. var nativeEventClone = new nextBlockedOn.constructor(
  15675. nextBlockedOn.type,
  15676. nextBlockedOn
  15677. );
  15678. currentReplayingEvent = nativeEventClone;
  15679. nextBlockedOn.target.dispatchEvent(nativeEventClone);
  15680. currentReplayingEvent = null;
  15681. } else
  15682. return (
  15683. (targetContainers = getInstanceFromNode(nextBlockedOn)),
  15684. null !== targetContainers &&
  15685. attemptContinuousHydration(targetContainers),
  15686. (queuedEvent.blockedOn = nextBlockedOn),
  15687. !1
  15688. );
  15689. targetContainers.shift();
  15690. }
  15691. return !0;
  15692. }
  15693. function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
  15694. attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
  15695. }
  15696. function replayUnblockedEvents() {
  15697. hasScheduledReplayAttempt = !1;
  15698. null !== queuedFocus &&
  15699. attemptReplayContinuousQueuedEvent(queuedFocus) &&
  15700. (queuedFocus = null);
  15701. null !== queuedDrag &&
  15702. attemptReplayContinuousQueuedEvent(queuedDrag) &&
  15703. (queuedDrag = null);
  15704. null !== queuedMouse &&
  15705. attemptReplayContinuousQueuedEvent(queuedMouse) &&
  15706. (queuedMouse = null);
  15707. queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
  15708. queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
  15709. }
  15710. function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
  15711. queuedEvent.blockedOn === unblocked &&
  15712. ((queuedEvent.blockedOn = null),
  15713. hasScheduledReplayAttempt ||
  15714. ((hasScheduledReplayAttempt = !0),
  15715. Scheduler.unstable_scheduleCallback(
  15716. Scheduler.unstable_NormalPriority,
  15717. replayUnblockedEvents
  15718. )));
  15719. }
  15720. var lastScheduledReplayQueue = null;
  15721. function scheduleReplayQueueIfNeeded(formReplayingQueue) {
  15722. lastScheduledReplayQueue !== formReplayingQueue &&
  15723. ((lastScheduledReplayQueue = formReplayingQueue),
  15724. Scheduler.unstable_scheduleCallback(
  15725. Scheduler.unstable_NormalPriority,
  15726. function () {
  15727. lastScheduledReplayQueue === formReplayingQueue &&
  15728. (lastScheduledReplayQueue = null);
  15729. for (var i = 0; i < formReplayingQueue.length; i += 3) {
  15730. var form = formReplayingQueue[i],
  15731. submitterOrAction = formReplayingQueue[i + 1],
  15732. formData = formReplayingQueue[i + 2];
  15733. if ("function" !== typeof submitterOrAction)
  15734. if (null === findInstanceBlockingTarget(submitterOrAction || form))
  15735. continue;
  15736. else break;
  15737. var formInst = getInstanceFromNode(form);
  15738. null !== formInst &&
  15739. (formReplayingQueue.splice(i, 3),
  15740. (i -= 3),
  15741. startHostTransition(
  15742. formInst,
  15743. {
  15744. pending: !0,
  15745. data: formData,
  15746. method: form.method,
  15747. action: submitterOrAction
  15748. },
  15749. submitterOrAction,
  15750. formData
  15751. ));
  15752. }
  15753. }
  15754. ));
  15755. }
  15756. function retryIfBlockedOn(unblocked) {
  15757. function unblock(queuedEvent) {
  15758. return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
  15759. }
  15760. null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);
  15761. null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);
  15762. null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);
  15763. queuedPointers.forEach(unblock);
  15764. queuedPointerCaptures.forEach(unblock);
  15765. for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
  15766. var queuedTarget = queuedExplicitHydrationTargets[i];
  15767. queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
  15768. }
  15769. for (
  15770. ;
  15771. 0 < queuedExplicitHydrationTargets.length &&
  15772. ((i = queuedExplicitHydrationTargets[0]), null === i.blockedOn);
  15773. )
  15774. attemptExplicitHydrationTarget(i),
  15775. null === i.blockedOn && queuedExplicitHydrationTargets.shift();
  15776. i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;
  15777. if (null != i)
  15778. for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
  15779. var form = i[queuedTarget],
  15780. submitterOrAction = i[queuedTarget + 1],
  15781. formProps = form[internalPropsKey] || null;
  15782. if ("function" === typeof submitterOrAction)
  15783. formProps || scheduleReplayQueueIfNeeded(i);
  15784. else if (formProps) {
  15785. var action = null;
  15786. if (submitterOrAction && submitterOrAction.hasAttribute("formAction"))
  15787. if (
  15788. ((form = submitterOrAction),
  15789. (formProps = submitterOrAction[internalPropsKey] || null))
  15790. )
  15791. action = formProps.formAction;
  15792. else {
  15793. if (null !== findInstanceBlockingTarget(form)) continue;
  15794. }
  15795. else action = formProps.action;
  15796. "function" === typeof action
  15797. ? (i[queuedTarget + 1] = action)
  15798. : (i.splice(queuedTarget, 3), (queuedTarget -= 3));
  15799. scheduleReplayQueueIfNeeded(i);
  15800. }
  15801. }
  15802. }
  15803. function defaultOnDefaultTransitionIndicator() {
  15804. function handleNavigate(event) {
  15805. event.canIntercept &&
  15806. "react-transition" === event.info &&
  15807. event.intercept({
  15808. handler: function () {
  15809. return new Promise(function (resolve) {
  15810. return (pendingResolve = resolve);
  15811. });
  15812. },
  15813. focusReset: "manual",
  15814. scroll: "manual"
  15815. });
  15816. }
  15817. function handleNavigateComplete() {
  15818. null !== pendingResolve && (pendingResolve(), (pendingResolve = null));
  15819. isCancelled || setTimeout(startFakeNavigation, 20);
  15820. }
  15821. function startFakeNavigation() {
  15822. if (!isCancelled && !navigation.transition) {
  15823. var currentEntry = navigation.currentEntry;
  15824. currentEntry &&
  15825. null != currentEntry.url &&
  15826. navigation.navigate(currentEntry.url, {
  15827. state: currentEntry.getState(),
  15828. info: "react-transition",
  15829. history: "replace"
  15830. });
  15831. }
  15832. }
  15833. if ("object" === typeof navigation) {
  15834. var isCancelled = !1,
  15835. pendingResolve = null;
  15836. navigation.addEventListener("navigate", handleNavigate);
  15837. navigation.addEventListener("navigatesuccess", handleNavigateComplete);
  15838. navigation.addEventListener("navigateerror", handleNavigateComplete);
  15839. setTimeout(startFakeNavigation, 100);
  15840. return function () {
  15841. isCancelled = !0;
  15842. navigation.removeEventListener("navigate", handleNavigate);
  15843. navigation.removeEventListener("navigatesuccess", handleNavigateComplete);
  15844. navigation.removeEventListener("navigateerror", handleNavigateComplete);
  15845. null !== pendingResolve && (pendingResolve(), (pendingResolve = null));
  15846. };
  15847. }
  15848. }
  15849. function ReactDOMRoot(internalRoot) {
  15850. this._internalRoot = internalRoot;
  15851. }
  15852. ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =
  15853. function (children) {
  15854. var root = this._internalRoot;
  15855. if (null === root) throw Error(formatProdErrorMessage(409));
  15856. var current = root.current,
  15857. lane = requestUpdateLane();
  15858. updateContainerImpl(current, lane, children, root, null, null);
  15859. };
  15860. ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
  15861. function () {
  15862. var root = this._internalRoot;
  15863. if (null !== root) {
  15864. this._internalRoot = null;
  15865. var container = root.containerInfo;
  15866. updateContainerImpl(root.current, 2, null, root, null, null);
  15867. flushSyncWork$1();
  15868. container[internalContainerInstanceKey] = null;
  15869. }
  15870. };
  15871. function ReactDOMHydrationRoot(internalRoot) {
  15872. this._internalRoot = internalRoot;
  15873. }
  15874. ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
  15875. if (target) {
  15876. var updatePriority = resolveUpdatePriority();
  15877. target = { blockedOn: null, target: target, priority: updatePriority };
  15878. for (
  15879. var i = 0;
  15880. i < queuedExplicitHydrationTargets.length &&
  15881. 0 !== updatePriority &&
  15882. updatePriority < queuedExplicitHydrationTargets[i].priority;
  15883. i++
  15884. );
  15885. queuedExplicitHydrationTargets.splice(i, 0, target);
  15886. 0 === i && attemptExplicitHydrationTarget(target);
  15887. }
  15888. };
  15889. var isomorphicReactPackageVersion$jscomp$inline_1840 = React.version;
  15890. if (
  15891. "19.2.4" !==
  15892. isomorphicReactPackageVersion$jscomp$inline_1840
  15893. )
  15894. throw Error(
  15895. formatProdErrorMessage(
  15896. 527,
  15897. isomorphicReactPackageVersion$jscomp$inline_1840,
  15898. "19.2.4"
  15899. )
  15900. );
  15901. ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
  15902. var fiber = componentOrElement._reactInternals;
  15903. if (void 0 === fiber) {
  15904. if ("function" === typeof componentOrElement.render)
  15905. throw Error(formatProdErrorMessage(188));
  15906. componentOrElement = Object.keys(componentOrElement).join(",");
  15907. throw Error(formatProdErrorMessage(268, componentOrElement));
  15908. }
  15909. componentOrElement = findCurrentFiberUsingSlowPath(fiber);
  15910. componentOrElement =
  15911. null !== componentOrElement
  15912. ? findCurrentHostFiberImpl(componentOrElement)
  15913. : null;
  15914. componentOrElement =
  15915. null === componentOrElement ? null : componentOrElement.stateNode;
  15916. return componentOrElement;
  15917. };
  15918. var internals$jscomp$inline_2347 = {
  15919. bundleType: 0,
  15920. version: "19.2.4",
  15921. rendererPackageName: "react-dom",
  15922. currentDispatcherRef: ReactSharedInternals,
  15923. reconcilerVersion: "19.2.4"
  15924. };
  15925. if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
  15926. var hook$jscomp$inline_2348 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  15927. if (
  15928. !hook$jscomp$inline_2348.isDisabled &&
  15929. hook$jscomp$inline_2348.supportsFiber
  15930. )
  15931. try {
  15932. (rendererID = hook$jscomp$inline_2348.inject(
  15933. internals$jscomp$inline_2347
  15934. )),
  15935. (injectedHook = hook$jscomp$inline_2348);
  15936. } catch (err) {}
  15937. }
  15938. exports.createRoot = function (container, options) {
  15939. if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
  15940. var isStrictMode = !1,
  15941. identifierPrefix = "",
  15942. onUncaughtError = defaultOnUncaughtError,
  15943. onCaughtError = defaultOnCaughtError,
  15944. onRecoverableError = defaultOnRecoverableError;
  15945. null !== options &&
  15946. void 0 !== options &&
  15947. (!0 === options.unstable_strictMode && (isStrictMode = !0),
  15948. void 0 !== options.identifierPrefix &&
  15949. (identifierPrefix = options.identifierPrefix),
  15950. void 0 !== options.onUncaughtError &&
  15951. (onUncaughtError = options.onUncaughtError),
  15952. void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),
  15953. void 0 !== options.onRecoverableError &&
  15954. (onRecoverableError = options.onRecoverableError));
  15955. options = createFiberRoot(
  15956. container,
  15957. 1,
  15958. !1,
  15959. null,
  15960. null,
  15961. isStrictMode,
  15962. identifierPrefix,
  15963. null,
  15964. onUncaughtError,
  15965. onCaughtError,
  15966. onRecoverableError,
  15967. defaultOnDefaultTransitionIndicator
  15968. );
  15969. container[internalContainerInstanceKey] = options.current;
  15970. listenToAllSupportedEvents(container);
  15971. return new ReactDOMRoot(options);
  15972. };
  15973. exports.hydrateRoot = function (container, initialChildren, options) {
  15974. if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));
  15975. var isStrictMode = !1,
  15976. identifierPrefix = "",
  15977. onUncaughtError = defaultOnUncaughtError,
  15978. onCaughtError = defaultOnCaughtError,
  15979. onRecoverableError = defaultOnRecoverableError,
  15980. formState = null;
  15981. null !== options &&
  15982. void 0 !== options &&
  15983. (!0 === options.unstable_strictMode && (isStrictMode = !0),
  15984. void 0 !== options.identifierPrefix &&
  15985. (identifierPrefix = options.identifierPrefix),
  15986. void 0 !== options.onUncaughtError &&
  15987. (onUncaughtError = options.onUncaughtError),
  15988. void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),
  15989. void 0 !== options.onRecoverableError &&
  15990. (onRecoverableError = options.onRecoverableError),
  15991. void 0 !== options.formState && (formState = options.formState));
  15992. initialChildren = createFiberRoot(
  15993. container,
  15994. 1,
  15995. !0,
  15996. initialChildren,
  15997. null != options ? options : null,
  15998. isStrictMode,
  15999. identifierPrefix,
  16000. formState,
  16001. onUncaughtError,
  16002. onCaughtError,
  16003. onRecoverableError,
  16004. defaultOnDefaultTransitionIndicator
  16005. );
  16006. initialChildren.context = getContextForSubtree(null);
  16007. options = initialChildren.current;
  16008. isStrictMode = requestUpdateLane();
  16009. isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);
  16010. identifierPrefix = createUpdate(isStrictMode);
  16011. identifierPrefix.callback = null;
  16012. enqueueUpdate(options, identifierPrefix, isStrictMode);
  16013. options = isStrictMode;
  16014. initialChildren.current.lanes = options;
  16015. markRootUpdated$1(initialChildren, options);
  16016. ensureRootIsScheduled(initialChildren);
  16017. container[internalContainerInstanceKey] = initialChildren.current;
  16018. listenToAllSupportedEvents(container);
  16019. return new ReactDOMHydrationRoot(initialChildren);
  16020. };
  16021. exports.version = "19.2.4";