react-dom.development.js 1.1 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948
  1. /*! react-dom.development.js v19.2.4 */
  2. (function (global, factory) {
  3. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react')) :
  4. typeof define === 'function' && define.amd ? define(['react'], factory) :
  5. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ReactDOM = factory(global.React));
  6. })(this, (function (require$$0) { 'use strict';
  7. function getDefaultExportFromCjs (x) {
  8. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
  9. }
  10. var reactDom = {exports: {}};
  11. var reactDom_development = {};
  12. /**
  13. * @license React
  14. * react-dom.development.js
  15. *
  16. * Copyright (c) Meta Platforms, Inc. and affiliates.
  17. *
  18. * This source code is licensed under the MIT license found in the
  19. * LICENSE file in the root directory of this source tree.
  20. */
  21. var hasRequiredReactDom_development;
  22. function requireReactDom_development () {
  23. if (hasRequiredReactDom_development) return reactDom_development;
  24. hasRequiredReactDom_development = 1;
  25. ((function () {
  26. function noop() {}
  27. function testStringCoercion(value) {
  28. return "" + value;
  29. }
  30. function createPortal$1(children, containerInfo, implementation) {
  31. var key =
  32. 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
  33. try {
  34. testStringCoercion(key);
  35. var JSCompiler_inline_result = !1;
  36. } catch (e) {
  37. JSCompiler_inline_result = true;
  38. }
  39. JSCompiler_inline_result &&
  40. (console.error(
  41. "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
  42. ("function" === typeof Symbol &&
  43. Symbol.toStringTag &&
  44. key[Symbol.toStringTag]) ||
  45. key.constructor.name ||
  46. "Object"
  47. ),
  48. testStringCoercion(key));
  49. return {
  50. $$typeof: REACT_PORTAL_TYPE,
  51. key: null == key ? null : "" + key,
  52. children: children,
  53. containerInfo: containerInfo,
  54. implementation: implementation
  55. };
  56. }
  57. function getCrossOriginStringAs(as, input) {
  58. if ("font" === as) return "";
  59. if ("string" === typeof input)
  60. return "use-credentials" === input ? input : "";
  61. }
  62. function getValueDescriptorExpectingObjectForWarning(thing) {
  63. return null === thing
  64. ? "`null`"
  65. : void 0 === thing
  66. ? "`undefined`"
  67. : "" === thing
  68. ? "an empty string"
  69. : 'something with type "' + typeof thing + '"';
  70. }
  71. function getValueDescriptorExpectingEnumForWarning(thing) {
  72. return null === thing
  73. ? "`null`"
  74. : void 0 === thing
  75. ? "`undefined`"
  76. : "" === thing
  77. ? "an empty string"
  78. : "string" === typeof thing
  79. ? JSON.stringify(thing)
  80. : "number" === typeof thing
  81. ? "`" + thing + "`"
  82. : 'something with type "' + typeof thing + '"';
  83. }
  84. function resolveDispatcher() {
  85. var dispatcher = ReactSharedInternals.H;
  86. null === dispatcher &&
  87. console.error(
  88. "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
  89. );
  90. return dispatcher;
  91. }
  92. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  93. "function" ===
  94. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
  95. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
  96. var React = require$$0,
  97. Internals = {
  98. d: {
  99. f: noop,
  100. r: function () {
  101. throw Error(
  102. "Invalid form element. requestFormReset must be passed a form that was rendered by React."
  103. );
  104. },
  105. D: noop,
  106. C: noop,
  107. L: noop,
  108. m: noop,
  109. X: noop,
  110. S: noop,
  111. M: noop
  112. },
  113. p: 0,
  114. findDOMNode: null
  115. },
  116. REACT_PORTAL_TYPE = Symbol.for("react.portal"),
  117. ReactSharedInternals =
  118. React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
  119. ("function" === typeof Map &&
  120. null != Map.prototype &&
  121. "function" === typeof Map.prototype.forEach &&
  122. "function" === typeof Set &&
  123. null != Set.prototype &&
  124. "function" === typeof Set.prototype.clear &&
  125. "function" === typeof Set.prototype.forEach) ||
  126. console.error(
  127. "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
  128. );
  129. reactDom_development.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
  130. Internals;
  131. reactDom_development.createPortal = function (children, container) {
  132. var key =
  133. 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
  134. if (
  135. !container ||
  136. (1 !== container.nodeType &&
  137. 9 !== container.nodeType &&
  138. 11 !== container.nodeType)
  139. )
  140. throw Error("Target container is not a DOM element.");
  141. return createPortal$1(children, container, null, key);
  142. };
  143. reactDom_development.flushSync = function (fn) {
  144. var previousTransition = ReactSharedInternals.T,
  145. previousUpdatePriority = Internals.p;
  146. try {
  147. if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))
  148. return fn();
  149. } finally {
  150. (ReactSharedInternals.T = previousTransition),
  151. (Internals.p = previousUpdatePriority),
  152. Internals.d.f() &&
  153. console.error(
  154. "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
  155. );
  156. }
  157. };
  158. reactDom_development.preconnect = function (href, options) {
  159. "string" === typeof href && href
  160. ? null != options && "object" !== typeof options
  161. ? console.error(
  162. "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
  163. getValueDescriptorExpectingEnumForWarning(options)
  164. )
  165. : null != options &&
  166. "string" !== typeof options.crossOrigin &&
  167. console.error(
  168. "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
  169. getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
  170. )
  171. : console.error(
  172. "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
  173. getValueDescriptorExpectingObjectForWarning(href)
  174. );
  175. "string" === typeof href &&
  176. (options
  177. ? ((options = options.crossOrigin),
  178. (options =
  179. "string" === typeof options
  180. ? "use-credentials" === options
  181. ? options
  182. : ""
  183. : void 0))
  184. : (options = null),
  185. Internals.d.C(href, options));
  186. };
  187. reactDom_development.prefetchDNS = function (href) {
  188. if ("string" !== typeof href || !href)
  189. console.error(
  190. "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
  191. getValueDescriptorExpectingObjectForWarning(href)
  192. );
  193. else if (1 < arguments.length) {
  194. var options = arguments[1];
  195. "object" === typeof options && options.hasOwnProperty("crossOrigin")
  196. ? console.error(
  197. "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
  198. getValueDescriptorExpectingEnumForWarning(options)
  199. )
  200. : console.error(
  201. "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
  202. getValueDescriptorExpectingEnumForWarning(options)
  203. );
  204. }
  205. "string" === typeof href && Internals.d.D(href);
  206. };
  207. reactDom_development.preinit = function (href, options) {
  208. "string" === typeof href && href
  209. ? null == options || "object" !== typeof options
  210. ? console.error(
  211. "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
  212. getValueDescriptorExpectingEnumForWarning(options)
  213. )
  214. : "style" !== options.as &&
  215. "script" !== options.as &&
  216. console.error(
  217. 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
  218. getValueDescriptorExpectingEnumForWarning(options.as)
  219. )
  220. : console.error(
  221. "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
  222. getValueDescriptorExpectingObjectForWarning(href)
  223. );
  224. if (
  225. "string" === typeof href &&
  226. options &&
  227. "string" === typeof options.as
  228. ) {
  229. var as = options.as,
  230. crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
  231. integrity =
  232. "string" === typeof options.integrity ? options.integrity : void 0,
  233. fetchPriority =
  234. "string" === typeof options.fetchPriority
  235. ? options.fetchPriority
  236. : void 0;
  237. "style" === as
  238. ? Internals.d.S(
  239. href,
  240. "string" === typeof options.precedence
  241. ? options.precedence
  242. : void 0,
  243. {
  244. crossOrigin: crossOrigin,
  245. integrity: integrity,
  246. fetchPriority: fetchPriority
  247. }
  248. )
  249. : "script" === as &&
  250. Internals.d.X(href, {
  251. crossOrigin: crossOrigin,
  252. integrity: integrity,
  253. fetchPriority: fetchPriority,
  254. nonce: "string" === typeof options.nonce ? options.nonce : void 0
  255. });
  256. }
  257. };
  258. reactDom_development.preinitModule = function (href, options) {
  259. var encountered = "";
  260. ("string" === typeof href && href) ||
  261. (encountered +=
  262. " The `href` argument encountered was " +
  263. getValueDescriptorExpectingObjectForWarning(href) +
  264. ".");
  265. void 0 !== options && "object" !== typeof options
  266. ? (encountered +=
  267. " The `options` argument encountered was " +
  268. getValueDescriptorExpectingObjectForWarning(options) +
  269. ".")
  270. : options &&
  271. "as" in options &&
  272. "script" !== options.as &&
  273. (encountered +=
  274. " The `as` option encountered was " +
  275. getValueDescriptorExpectingEnumForWarning(options.as) +
  276. ".");
  277. if (encountered)
  278. console.error(
  279. "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
  280. encountered
  281. );
  282. else
  283. switch (
  284. ((encountered =
  285. options && "string" === typeof options.as ? options.as : "script"),
  286. encountered)
  287. ) {
  288. case "script":
  289. break;
  290. default:
  291. (encountered =
  292. getValueDescriptorExpectingEnumForWarning(encountered)),
  293. console.error(
  294. 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
  295. encountered,
  296. href
  297. );
  298. }
  299. if ("string" === typeof href)
  300. if ("object" === typeof options && null !== options) {
  301. if (null == options.as || "script" === options.as)
  302. (encountered = getCrossOriginStringAs(
  303. options.as,
  304. options.crossOrigin
  305. )),
  306. Internals.d.M(href, {
  307. crossOrigin: encountered,
  308. integrity:
  309. "string" === typeof options.integrity
  310. ? options.integrity
  311. : void 0,
  312. nonce:
  313. "string" === typeof options.nonce ? options.nonce : void 0
  314. });
  315. } else null == options && Internals.d.M(href);
  316. };
  317. reactDom_development.preload = function (href, options) {
  318. var encountered = "";
  319. ("string" === typeof href && href) ||
  320. (encountered +=
  321. " The `href` argument encountered was " +
  322. getValueDescriptorExpectingObjectForWarning(href) +
  323. ".");
  324. null == options || "object" !== typeof options
  325. ? (encountered +=
  326. " The `options` argument encountered was " +
  327. getValueDescriptorExpectingObjectForWarning(options) +
  328. ".")
  329. : ("string" === typeof options.as && options.as) ||
  330. (encountered +=
  331. " The `as` option encountered was " +
  332. getValueDescriptorExpectingObjectForWarning(options.as) +
  333. ".");
  334. encountered &&
  335. console.error(
  336. 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
  337. encountered
  338. );
  339. if (
  340. "string" === typeof href &&
  341. "object" === typeof options &&
  342. null !== options &&
  343. "string" === typeof options.as
  344. ) {
  345. encountered = options.as;
  346. var crossOrigin = getCrossOriginStringAs(
  347. encountered,
  348. options.crossOrigin
  349. );
  350. Internals.d.L(href, encountered, {
  351. crossOrigin: crossOrigin,
  352. integrity:
  353. "string" === typeof options.integrity ? options.integrity : void 0,
  354. nonce: "string" === typeof options.nonce ? options.nonce : void 0,
  355. type: "string" === typeof options.type ? options.type : void 0,
  356. fetchPriority:
  357. "string" === typeof options.fetchPriority
  358. ? options.fetchPriority
  359. : void 0,
  360. referrerPolicy:
  361. "string" === typeof options.referrerPolicy
  362. ? options.referrerPolicy
  363. : void 0,
  364. imageSrcSet:
  365. "string" === typeof options.imageSrcSet
  366. ? options.imageSrcSet
  367. : void 0,
  368. imageSizes:
  369. "string" === typeof options.imageSizes
  370. ? options.imageSizes
  371. : void 0,
  372. media: "string" === typeof options.media ? options.media : void 0
  373. });
  374. }
  375. };
  376. reactDom_development.preloadModule = function (href, options) {
  377. var encountered = "";
  378. ("string" === typeof href && href) ||
  379. (encountered +=
  380. " The `href` argument encountered was " +
  381. getValueDescriptorExpectingObjectForWarning(href) +
  382. ".");
  383. void 0 !== options && "object" !== typeof options
  384. ? (encountered +=
  385. " The `options` argument encountered was " +
  386. getValueDescriptorExpectingObjectForWarning(options) +
  387. ".")
  388. : options &&
  389. "as" in options &&
  390. "string" !== typeof options.as &&
  391. (encountered +=
  392. " The `as` option encountered was " +
  393. getValueDescriptorExpectingObjectForWarning(options.as) +
  394. ".");
  395. encountered &&
  396. console.error(
  397. 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
  398. encountered
  399. );
  400. "string" === typeof href &&
  401. (options
  402. ? ((encountered = getCrossOriginStringAs(
  403. options.as,
  404. options.crossOrigin
  405. )),
  406. Internals.d.m(href, {
  407. as:
  408. "string" === typeof options.as && "script" !== options.as
  409. ? options.as
  410. : void 0,
  411. crossOrigin: encountered,
  412. integrity:
  413. "string" === typeof options.integrity
  414. ? options.integrity
  415. : void 0
  416. }))
  417. : Internals.d.m(href));
  418. };
  419. reactDom_development.requestFormReset = function (form) {
  420. Internals.d.r(form);
  421. };
  422. reactDom_development.unstable_batchedUpdates = function (fn, a) {
  423. return fn(a);
  424. };
  425. reactDom_development.useFormState = function (action, initialState, permalink) {
  426. return resolveDispatcher().useFormState(action, initialState, permalink);
  427. };
  428. reactDom_development.useFormStatus = function () {
  429. return resolveDispatcher().useHostTransitionStatus();
  430. };
  431. reactDom_development.version = "19.2.4";
  432. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  433. "function" ===
  434. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
  435. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  436. }))();
  437. return reactDom_development;
  438. }
  439. var hasRequiredReactDom;
  440. function requireReactDom () {
  441. if (hasRequiredReactDom) return reactDom.exports;
  442. hasRequiredReactDom = 1;
  443. {
  444. reactDom.exports = requireReactDom_development();
  445. }
  446. return reactDom.exports;
  447. }
  448. var reactDomExports = requireReactDom();
  449. var ReactDOM = /*@__PURE__*/getDefaultExportFromCjs(reactDomExports);
  450. var client = {exports: {}};
  451. var reactDomClient_development = {};
  452. var scheduler = {exports: {}};
  453. var scheduler_development = {};
  454. /**
  455. * @license React
  456. * scheduler.development.js
  457. *
  458. * Copyright (c) Meta Platforms, Inc. and affiliates.
  459. *
  460. * This source code is licensed under the MIT license found in the
  461. * LICENSE file in the root directory of this source tree.
  462. */
  463. var hasRequiredScheduler_development;
  464. function requireScheduler_development () {
  465. if (hasRequiredScheduler_development) return scheduler_development;
  466. hasRequiredScheduler_development = 1;
  467. (function (exports$1) {
  468. ((function () {
  469. function performWorkUntilDeadline() {
  470. needsPaint = false;
  471. if (isMessageLoopRunning) {
  472. var currentTime = exports$1.unstable_now();
  473. startTime = currentTime;
  474. var hasMoreWork = true;
  475. try {
  476. a: {
  477. isHostCallbackScheduled = !1;
  478. isHostTimeoutScheduled &&
  479. ((isHostTimeoutScheduled = !1),
  480. localClearTimeout(taskTimeoutID),
  481. (taskTimeoutID = -1));
  482. isPerformingWork = !0;
  483. var previousPriorityLevel = currentPriorityLevel;
  484. try {
  485. b: {
  486. advanceTimers(currentTime);
  487. for (
  488. currentTask = peek(taskQueue);
  489. null !== currentTask &&
  490. !(
  491. currentTask.expirationTime > currentTime &&
  492. shouldYieldToHost()
  493. );
  494. ) {
  495. var callback = currentTask.callback;
  496. if ("function" === typeof callback) {
  497. currentTask.callback = null;
  498. currentPriorityLevel = currentTask.priorityLevel;
  499. var continuationCallback = callback(
  500. currentTask.expirationTime <= currentTime
  501. );
  502. currentTime = exports$1.unstable_now();
  503. if ("function" === typeof continuationCallback) {
  504. currentTask.callback = continuationCallback;
  505. advanceTimers(currentTime);
  506. hasMoreWork = !0;
  507. break b;
  508. }
  509. currentTask === peek(taskQueue) && pop(taskQueue);
  510. advanceTimers(currentTime);
  511. } else pop(taskQueue);
  512. currentTask = peek(taskQueue);
  513. }
  514. if (null !== currentTask) hasMoreWork = !0;
  515. else {
  516. var firstTimer = peek(timerQueue);
  517. null !== firstTimer &&
  518. requestHostTimeout(
  519. handleTimeout,
  520. firstTimer.startTime - currentTime
  521. );
  522. hasMoreWork = !1;
  523. }
  524. }
  525. break a;
  526. } finally {
  527. (currentTask = null),
  528. (currentPriorityLevel = previousPriorityLevel),
  529. (isPerformingWork = !1);
  530. }
  531. hasMoreWork = void 0;
  532. }
  533. } finally {
  534. hasMoreWork
  535. ? schedulePerformWorkUntilDeadline()
  536. : (isMessageLoopRunning = false);
  537. }
  538. }
  539. }
  540. function push(heap, node) {
  541. var index = heap.length;
  542. heap.push(node);
  543. a: for (; 0 < index; ) {
  544. var parentIndex = (index - 1) >>> 1,
  545. parent = heap[parentIndex];
  546. if (0 < compare(parent, node))
  547. (heap[parentIndex] = node),
  548. (heap[index] = parent),
  549. (index = parentIndex);
  550. else break a;
  551. }
  552. }
  553. function peek(heap) {
  554. return 0 === heap.length ? null : heap[0];
  555. }
  556. function pop(heap) {
  557. if (0 === heap.length) return null;
  558. var first = heap[0],
  559. last = heap.pop();
  560. if (last !== first) {
  561. heap[0] = last;
  562. a: for (
  563. var index = 0, length = heap.length, halfLength = length >>> 1;
  564. index < halfLength;
  565. ) {
  566. var leftIndex = 2 * (index + 1) - 1,
  567. left = heap[leftIndex],
  568. rightIndex = leftIndex + 1,
  569. right = heap[rightIndex];
  570. if (0 > compare(left, last))
  571. rightIndex < length && 0 > compare(right, left)
  572. ? ((heap[index] = right),
  573. (heap[rightIndex] = last),
  574. (index = rightIndex))
  575. : ((heap[index] = left),
  576. (heap[leftIndex] = last),
  577. (index = leftIndex));
  578. else if (rightIndex < length && 0 > compare(right, last))
  579. (heap[index] = right),
  580. (heap[rightIndex] = last),
  581. (index = rightIndex);
  582. else break a;
  583. }
  584. }
  585. return first;
  586. }
  587. function compare(a, b) {
  588. var diff = a.sortIndex - b.sortIndex;
  589. return 0 !== diff ? diff : a.id - b.id;
  590. }
  591. function advanceTimers(currentTime) {
  592. for (var timer = peek(timerQueue); null !== timer; ) {
  593. if (null === timer.callback) pop(timerQueue);
  594. else if (timer.startTime <= currentTime)
  595. pop(timerQueue),
  596. (timer.sortIndex = timer.expirationTime),
  597. push(taskQueue, timer);
  598. else break;
  599. timer = peek(timerQueue);
  600. }
  601. }
  602. function handleTimeout(currentTime) {
  603. isHostTimeoutScheduled = false;
  604. advanceTimers(currentTime);
  605. if (!isHostCallbackScheduled)
  606. if (null !== peek(taskQueue))
  607. (isHostCallbackScheduled = true),
  608. isMessageLoopRunning ||
  609. ((isMessageLoopRunning = true), schedulePerformWorkUntilDeadline());
  610. else {
  611. var firstTimer = peek(timerQueue);
  612. null !== firstTimer &&
  613. requestHostTimeout(
  614. handleTimeout,
  615. firstTimer.startTime - currentTime
  616. );
  617. }
  618. }
  619. function shouldYieldToHost() {
  620. return needsPaint
  621. ? true
  622. : exports$1.unstable_now() - startTime < frameInterval
  623. ? false
  624. : true;
  625. }
  626. function requestHostTimeout(callback, ms) {
  627. taskTimeoutID = localSetTimeout(function () {
  628. callback(exports$1.unstable_now());
  629. }, ms);
  630. }
  631. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  632. "function" ===
  633. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
  634. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
  635. exports$1.unstable_now = void 0;
  636. if (
  637. "object" === typeof performance &&
  638. "function" === typeof performance.now
  639. ) {
  640. var localPerformance = performance;
  641. exports$1.unstable_now = function () {
  642. return localPerformance.now();
  643. };
  644. } else {
  645. var localDate = Date,
  646. initialTime = localDate.now();
  647. exports$1.unstable_now = function () {
  648. return localDate.now() - initialTime;
  649. };
  650. }
  651. var taskQueue = [],
  652. timerQueue = [],
  653. taskIdCounter = 1,
  654. currentTask = null,
  655. currentPriorityLevel = 3,
  656. isPerformingWork = false,
  657. isHostCallbackScheduled = false,
  658. isHostTimeoutScheduled = false,
  659. needsPaint = false,
  660. localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
  661. localClearTimeout =
  662. "function" === typeof clearTimeout ? clearTimeout : null,
  663. localSetImmediate =
  664. "undefined" !== typeof setImmediate ? setImmediate : null,
  665. isMessageLoopRunning = false,
  666. taskTimeoutID = -1,
  667. frameInterval = 5,
  668. startTime = -1;
  669. if ("function" === typeof localSetImmediate)
  670. var schedulePerformWorkUntilDeadline = function () {
  671. localSetImmediate(performWorkUntilDeadline);
  672. };
  673. else if ("undefined" !== typeof MessageChannel) {
  674. var channel = new MessageChannel(),
  675. port = channel.port2;
  676. channel.port1.onmessage = performWorkUntilDeadline;
  677. schedulePerformWorkUntilDeadline = function () {
  678. port.postMessage(null);
  679. };
  680. } else
  681. schedulePerformWorkUntilDeadline = function () {
  682. localSetTimeout(performWorkUntilDeadline, 0);
  683. };
  684. exports$1.unstable_IdlePriority = 5;
  685. exports$1.unstable_ImmediatePriority = 1;
  686. exports$1.unstable_LowPriority = 4;
  687. exports$1.unstable_NormalPriority = 3;
  688. exports$1.unstable_Profiling = null;
  689. exports$1.unstable_UserBlockingPriority = 2;
  690. exports$1.unstable_cancelCallback = function (task) {
  691. task.callback = null;
  692. };
  693. exports$1.unstable_forceFrameRate = function (fps) {
  694. 0 > fps || 125 < fps
  695. ? console.error(
  696. "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
  697. )
  698. : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);
  699. };
  700. exports$1.unstable_getCurrentPriorityLevel = function () {
  701. return currentPriorityLevel;
  702. };
  703. exports$1.unstable_next = function (eventHandler) {
  704. switch (currentPriorityLevel) {
  705. case 1:
  706. case 2:
  707. case 3:
  708. var priorityLevel = 3;
  709. break;
  710. default:
  711. priorityLevel = currentPriorityLevel;
  712. }
  713. var previousPriorityLevel = currentPriorityLevel;
  714. currentPriorityLevel = priorityLevel;
  715. try {
  716. return eventHandler();
  717. } finally {
  718. currentPriorityLevel = previousPriorityLevel;
  719. }
  720. };
  721. exports$1.unstable_requestPaint = function () {
  722. needsPaint = true;
  723. };
  724. exports$1.unstable_runWithPriority = function (priorityLevel, eventHandler) {
  725. switch (priorityLevel) {
  726. case 1:
  727. case 2:
  728. case 3:
  729. case 4:
  730. case 5:
  731. break;
  732. default:
  733. priorityLevel = 3;
  734. }
  735. var previousPriorityLevel = currentPriorityLevel;
  736. currentPriorityLevel = priorityLevel;
  737. try {
  738. return eventHandler();
  739. } finally {
  740. currentPriorityLevel = previousPriorityLevel;
  741. }
  742. };
  743. exports$1.unstable_scheduleCallback = function (
  744. priorityLevel,
  745. callback,
  746. options
  747. ) {
  748. var currentTime = exports$1.unstable_now();
  749. "object" === typeof options && null !== options
  750. ? ((options = options.delay),
  751. (options =
  752. "number" === typeof options && 0 < options
  753. ? currentTime + options
  754. : currentTime))
  755. : (options = currentTime);
  756. switch (priorityLevel) {
  757. case 1:
  758. var timeout = -1;
  759. break;
  760. case 2:
  761. timeout = 250;
  762. break;
  763. case 5:
  764. timeout = 1073741823;
  765. break;
  766. case 4:
  767. timeout = 1e4;
  768. break;
  769. default:
  770. timeout = 5e3;
  771. }
  772. timeout = options + timeout;
  773. priorityLevel = {
  774. id: taskIdCounter++,
  775. callback: callback,
  776. priorityLevel: priorityLevel,
  777. startTime: options,
  778. expirationTime: timeout,
  779. sortIndex: -1
  780. };
  781. options > currentTime
  782. ? ((priorityLevel.sortIndex = options),
  783. push(timerQueue, priorityLevel),
  784. null === peek(taskQueue) &&
  785. priorityLevel === peek(timerQueue) &&
  786. (isHostTimeoutScheduled
  787. ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
  788. : (isHostTimeoutScheduled = true),
  789. requestHostTimeout(handleTimeout, options - currentTime)))
  790. : ((priorityLevel.sortIndex = timeout),
  791. push(taskQueue, priorityLevel),
  792. isHostCallbackScheduled ||
  793. isPerformingWork ||
  794. ((isHostCallbackScheduled = true),
  795. isMessageLoopRunning ||
  796. ((isMessageLoopRunning = true),
  797. schedulePerformWorkUntilDeadline())));
  798. return priorityLevel;
  799. };
  800. exports$1.unstable_shouldYield = shouldYieldToHost;
  801. exports$1.unstable_wrapCallback = function (callback) {
  802. var parentPriorityLevel = currentPriorityLevel;
  803. return function () {
  804. var previousPriorityLevel = currentPriorityLevel;
  805. currentPriorityLevel = parentPriorityLevel;
  806. try {
  807. return callback.apply(this, arguments);
  808. } finally {
  809. currentPriorityLevel = previousPriorityLevel;
  810. }
  811. };
  812. };
  813. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  814. "function" ===
  815. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
  816. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  817. }))();
  818. } (scheduler_development));
  819. return scheduler_development;
  820. }
  821. var hasRequiredScheduler;
  822. function requireScheduler () {
  823. if (hasRequiredScheduler) return scheduler.exports;
  824. hasRequiredScheduler = 1;
  825. {
  826. scheduler.exports = requireScheduler_development();
  827. }
  828. return scheduler.exports;
  829. }
  830. /**
  831. * @license React
  832. * react-dom-client.development.js
  833. *
  834. * Copyright (c) Meta Platforms, Inc. and affiliates.
  835. *
  836. * This source code is licensed under the MIT license found in the
  837. * LICENSE file in the root directory of this source tree.
  838. */
  839. var hasRequiredReactDomClient_development;
  840. function requireReactDomClient_development () {
  841. if (hasRequiredReactDomClient_development) return reactDomClient_development;
  842. hasRequiredReactDomClient_development = 1;
  843. ((function () {
  844. function findHook(fiber, id) {
  845. for (fiber = fiber.memoizedState; null !== fiber && 0 < id; )
  846. (fiber = fiber.next), id--;
  847. return fiber;
  848. }
  849. function copyWithSetImpl(obj, path, index, value) {
  850. if (index >= path.length) return value;
  851. var key = path[index],
  852. updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
  853. updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
  854. return updated;
  855. }
  856. function copyWithRename(obj, oldPath, newPath) {
  857. if (oldPath.length !== newPath.length)
  858. console.warn("copyWithRename() expects paths of the same length");
  859. else {
  860. for (var i = 0; i < newPath.length - 1; i++)
  861. if (oldPath[i] !== newPath[i]) {
  862. console.warn(
  863. "copyWithRename() expects paths to be the same except for the deepest key"
  864. );
  865. return;
  866. }
  867. return copyWithRenameImpl(obj, oldPath, newPath, 0);
  868. }
  869. }
  870. function copyWithRenameImpl(obj, oldPath, newPath, index) {
  871. var oldKey = oldPath[index],
  872. updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
  873. index + 1 === oldPath.length
  874. ? ((updated[newPath[index]] = updated[oldKey]),
  875. isArrayImpl(updated)
  876. ? updated.splice(oldKey, 1)
  877. : delete updated[oldKey])
  878. : (updated[oldKey] = copyWithRenameImpl(
  879. obj[oldKey],
  880. oldPath,
  881. newPath,
  882. index + 1
  883. ));
  884. return updated;
  885. }
  886. function copyWithDeleteImpl(obj, path, index) {
  887. var key = path[index],
  888. updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
  889. if (index + 1 === path.length)
  890. return (
  891. isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key],
  892. updated
  893. );
  894. updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
  895. return updated;
  896. }
  897. function shouldSuspendImpl() {
  898. return false;
  899. }
  900. function shouldErrorImpl() {
  901. return null;
  902. }
  903. function warnInvalidHookAccess() {
  904. console.error(
  905. "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"
  906. );
  907. }
  908. function warnInvalidContextAccess() {
  909. console.error(
  910. "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
  911. );
  912. }
  913. function noop() {}
  914. function warnForMissingKey() {}
  915. function setToSortedString(set) {
  916. var array = [];
  917. set.forEach(function (value) {
  918. array.push(value);
  919. });
  920. return array.sort().join(", ");
  921. }
  922. function createFiber(tag, pendingProps, key, mode) {
  923. return new FiberNode(tag, pendingProps, key, mode);
  924. }
  925. function scheduleRoot(root, element) {
  926. root.context === emptyContextObject &&
  927. (updateContainerImpl(root.current, 2, element, root, null, null),
  928. flushSyncWork$1());
  929. }
  930. function scheduleRefresh(root, update) {
  931. if (null !== resolveFamily) {
  932. var staleFamilies = update.staleFamilies;
  933. update = update.updatedFamilies;
  934. flushPendingEffects();
  935. scheduleFibersWithFamiliesRecursively(
  936. root.current,
  937. update,
  938. staleFamilies
  939. );
  940. flushSyncWork$1();
  941. }
  942. }
  943. function setRefreshHandler(handler) {
  944. resolveFamily = handler;
  945. }
  946. function isValidContainer(node) {
  947. return !(
  948. !node ||
  949. (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)
  950. );
  951. }
  952. function getNearestMountedFiber(fiber) {
  953. var node = fiber,
  954. nearestMounted = fiber;
  955. if (fiber.alternate) for (; node.return; ) node = node.return;
  956. else {
  957. fiber = node;
  958. do
  959. (node = fiber),
  960. 0 !== (node.flags & 4098) && (nearestMounted = node.return),
  961. (fiber = node.return);
  962. while (fiber);
  963. }
  964. return 3 === node.tag ? nearestMounted : null;
  965. }
  966. function getSuspenseInstanceFromFiber(fiber) {
  967. if (13 === fiber.tag) {
  968. var suspenseState = fiber.memoizedState;
  969. null === suspenseState &&
  970. ((fiber = fiber.alternate),
  971. null !== fiber && (suspenseState = fiber.memoizedState));
  972. if (null !== suspenseState) return suspenseState.dehydrated;
  973. }
  974. return null;
  975. }
  976. function getActivityInstanceFromFiber(fiber) {
  977. if (31 === fiber.tag) {
  978. var activityState = fiber.memoizedState;
  979. null === activityState &&
  980. ((fiber = fiber.alternate),
  981. null !== fiber && (activityState = fiber.memoizedState));
  982. if (null !== activityState) return activityState.dehydrated;
  983. }
  984. return null;
  985. }
  986. function assertIsMounted(fiber) {
  987. if (getNearestMountedFiber(fiber) !== fiber)
  988. throw Error("Unable to find node on an unmounted component.");
  989. }
  990. function findCurrentFiberUsingSlowPath(fiber) {
  991. var alternate = fiber.alternate;
  992. if (!alternate) {
  993. alternate = getNearestMountedFiber(fiber);
  994. if (null === alternate)
  995. throw Error("Unable to find node on an unmounted component.");
  996. return alternate !== fiber ? null : fiber;
  997. }
  998. for (var a = fiber, b = alternate; ; ) {
  999. var parentA = a.return;
  1000. if (null === parentA) break;
  1001. var parentB = parentA.alternate;
  1002. if (null === parentB) {
  1003. b = parentA.return;
  1004. if (null !== b) {
  1005. a = b;
  1006. continue;
  1007. }
  1008. break;
  1009. }
  1010. if (parentA.child === parentB.child) {
  1011. for (parentB = parentA.child; parentB; ) {
  1012. if (parentB === a) return assertIsMounted(parentA), fiber;
  1013. if (parentB === b) return assertIsMounted(parentA), alternate;
  1014. parentB = parentB.sibling;
  1015. }
  1016. throw Error("Unable to find node on an unmounted component.");
  1017. }
  1018. if (a.return !== b.return) (a = parentA), (b = parentB);
  1019. else {
  1020. for (var didFindChild = false, _child = parentA.child; _child; ) {
  1021. if (_child === a) {
  1022. didFindChild = true;
  1023. a = parentA;
  1024. b = parentB;
  1025. break;
  1026. }
  1027. if (_child === b) {
  1028. didFindChild = true;
  1029. b = parentA;
  1030. a = parentB;
  1031. break;
  1032. }
  1033. _child = _child.sibling;
  1034. }
  1035. if (!didFindChild) {
  1036. for (_child = parentB.child; _child; ) {
  1037. if (_child === a) {
  1038. didFindChild = true;
  1039. a = parentB;
  1040. b = parentA;
  1041. break;
  1042. }
  1043. if (_child === b) {
  1044. didFindChild = true;
  1045. b = parentB;
  1046. a = parentA;
  1047. break;
  1048. }
  1049. _child = _child.sibling;
  1050. }
  1051. if (!didFindChild)
  1052. throw Error(
  1053. "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
  1054. );
  1055. }
  1056. }
  1057. if (a.alternate !== b)
  1058. throw Error(
  1059. "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
  1060. );
  1061. }
  1062. if (3 !== a.tag)
  1063. throw Error("Unable to find node on an unmounted component.");
  1064. return a.stateNode.current === a ? fiber : alternate;
  1065. }
  1066. function findCurrentHostFiberImpl(node) {
  1067. var tag = node.tag;
  1068. if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
  1069. for (node = node.child; null !== node; ) {
  1070. tag = findCurrentHostFiberImpl(node);
  1071. if (null !== tag) return tag;
  1072. node = node.sibling;
  1073. }
  1074. return null;
  1075. }
  1076. function getIteratorFn(maybeIterable) {
  1077. if (null === maybeIterable || "object" !== typeof maybeIterable)
  1078. return null;
  1079. maybeIterable =
  1080. (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
  1081. maybeIterable["@@iterator"];
  1082. return "function" === typeof maybeIterable ? maybeIterable : null;
  1083. }
  1084. function getComponentNameFromType(type) {
  1085. if (null == type) return null;
  1086. if ("function" === typeof type)
  1087. return type.$$typeof === REACT_CLIENT_REFERENCE
  1088. ? null
  1089. : type.displayName || type.name || null;
  1090. if ("string" === typeof type) return type;
  1091. switch (type) {
  1092. case REACT_FRAGMENT_TYPE:
  1093. return "Fragment";
  1094. case REACT_PROFILER_TYPE:
  1095. return "Profiler";
  1096. case REACT_STRICT_MODE_TYPE:
  1097. return "StrictMode";
  1098. case REACT_SUSPENSE_TYPE:
  1099. return "Suspense";
  1100. case REACT_SUSPENSE_LIST_TYPE:
  1101. return "SuspenseList";
  1102. case REACT_ACTIVITY_TYPE:
  1103. return "Activity";
  1104. }
  1105. if ("object" === typeof type)
  1106. switch (
  1107. ("number" === typeof type.tag &&
  1108. console.error(
  1109. "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
  1110. ),
  1111. type.$$typeof)
  1112. ) {
  1113. case REACT_PORTAL_TYPE:
  1114. return "Portal";
  1115. case REACT_CONTEXT_TYPE:
  1116. return type.displayName || "Context";
  1117. case REACT_CONSUMER_TYPE:
  1118. return (type._context.displayName || "Context") + ".Consumer";
  1119. case REACT_FORWARD_REF_TYPE:
  1120. var innerType = type.render;
  1121. type = type.displayName;
  1122. type ||
  1123. ((type = innerType.displayName || innerType.name || ""),
  1124. (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
  1125. return type;
  1126. case REACT_MEMO_TYPE:
  1127. return (
  1128. (innerType = type.displayName || null),
  1129. null !== innerType
  1130. ? innerType
  1131. : getComponentNameFromType(type.type) || "Memo"
  1132. );
  1133. case REACT_LAZY_TYPE:
  1134. innerType = type._payload;
  1135. type = type._init;
  1136. try {
  1137. return getComponentNameFromType(type(innerType));
  1138. } catch (x) {}
  1139. }
  1140. return null;
  1141. }
  1142. function getComponentNameFromOwner(owner) {
  1143. return "number" === typeof owner.tag
  1144. ? getComponentNameFromFiber(owner)
  1145. : "string" === typeof owner.name
  1146. ? owner.name
  1147. : null;
  1148. }
  1149. function getComponentNameFromFiber(fiber) {
  1150. var type = fiber.type;
  1151. switch (fiber.tag) {
  1152. case 31:
  1153. return "Activity";
  1154. case 24:
  1155. return "Cache";
  1156. case 9:
  1157. return (type._context.displayName || "Context") + ".Consumer";
  1158. case 10:
  1159. return type.displayName || "Context";
  1160. case 18:
  1161. return "DehydratedFragment";
  1162. case 11:
  1163. return (
  1164. (fiber = type.render),
  1165. (fiber = fiber.displayName || fiber.name || ""),
  1166. type.displayName ||
  1167. ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef")
  1168. );
  1169. case 7:
  1170. return "Fragment";
  1171. case 26:
  1172. case 27:
  1173. case 5:
  1174. return type;
  1175. case 4:
  1176. return "Portal";
  1177. case 3:
  1178. return "Root";
  1179. case 6:
  1180. return "Text";
  1181. case 16:
  1182. return getComponentNameFromType(type);
  1183. case 8:
  1184. return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
  1185. case 22:
  1186. return "Offscreen";
  1187. case 12:
  1188. return "Profiler";
  1189. case 21:
  1190. return "Scope";
  1191. case 13:
  1192. return "Suspense";
  1193. case 19:
  1194. return "SuspenseList";
  1195. case 25:
  1196. return "TracingMarker";
  1197. case 1:
  1198. case 0:
  1199. case 14:
  1200. case 15:
  1201. if ("function" === typeof type)
  1202. return type.displayName || type.name || null;
  1203. if ("string" === typeof type) return type;
  1204. break;
  1205. case 29:
  1206. type = fiber._debugInfo;
  1207. if (null != type)
  1208. for (var i = type.length - 1; 0 <= i; i--)
  1209. if ("string" === typeof type[i].name) return type[i].name;
  1210. if (null !== fiber.return)
  1211. return getComponentNameFromFiber(fiber.return);
  1212. }
  1213. return null;
  1214. }
  1215. function createCursor(defaultValue) {
  1216. return { current: defaultValue };
  1217. }
  1218. function pop(cursor, fiber) {
  1219. 0 > index$jscomp$0
  1220. ? console.error("Unexpected pop.")
  1221. : (fiber !== fiberStack[index$jscomp$0] &&
  1222. console.error("Unexpected Fiber popped."),
  1223. (cursor.current = valueStack[index$jscomp$0]),
  1224. (valueStack[index$jscomp$0] = null),
  1225. (fiberStack[index$jscomp$0] = null),
  1226. index$jscomp$0--);
  1227. }
  1228. function push(cursor, value, fiber) {
  1229. index$jscomp$0++;
  1230. valueStack[index$jscomp$0] = cursor.current;
  1231. fiberStack[index$jscomp$0] = fiber;
  1232. cursor.current = value;
  1233. }
  1234. function requiredContext(c) {
  1235. null === c &&
  1236. console.error(
  1237. "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
  1238. );
  1239. return c;
  1240. }
  1241. function pushHostContainer(fiber, nextRootInstance) {
  1242. push(rootInstanceStackCursor, nextRootInstance, fiber);
  1243. push(contextFiberStackCursor, fiber, fiber);
  1244. push(contextStackCursor, null, fiber);
  1245. var nextRootContext = nextRootInstance.nodeType;
  1246. switch (nextRootContext) {
  1247. case 9:
  1248. case 11:
  1249. nextRootContext = 9 === nextRootContext ? "#document" : "#fragment";
  1250. nextRootInstance = (nextRootInstance =
  1251. nextRootInstance.documentElement)
  1252. ? (nextRootInstance = nextRootInstance.namespaceURI)
  1253. ? getOwnHostContext(nextRootInstance)
  1254. : HostContextNamespaceNone
  1255. : HostContextNamespaceNone;
  1256. break;
  1257. default:
  1258. if (
  1259. ((nextRootContext = nextRootInstance.tagName),
  1260. (nextRootInstance = nextRootInstance.namespaceURI))
  1261. )
  1262. (nextRootInstance = getOwnHostContext(nextRootInstance)),
  1263. (nextRootInstance = getChildHostContextProd(
  1264. nextRootInstance,
  1265. nextRootContext
  1266. ));
  1267. else
  1268. switch (nextRootContext) {
  1269. case "svg":
  1270. nextRootInstance = HostContextNamespaceSvg;
  1271. break;
  1272. case "math":
  1273. nextRootInstance = HostContextNamespaceMath;
  1274. break;
  1275. default:
  1276. nextRootInstance = HostContextNamespaceNone;
  1277. }
  1278. }
  1279. nextRootContext = nextRootContext.toLowerCase();
  1280. nextRootContext = updatedAncestorInfoDev(null, nextRootContext);
  1281. nextRootContext = {
  1282. context: nextRootInstance,
  1283. ancestorInfo: nextRootContext
  1284. };
  1285. pop(contextStackCursor, fiber);
  1286. push(contextStackCursor, nextRootContext, fiber);
  1287. }
  1288. function popHostContainer(fiber) {
  1289. pop(contextStackCursor, fiber);
  1290. pop(contextFiberStackCursor, fiber);
  1291. pop(rootInstanceStackCursor, fiber);
  1292. }
  1293. function getHostContext() {
  1294. return requiredContext(contextStackCursor.current);
  1295. }
  1296. function pushHostContext(fiber) {
  1297. null !== fiber.memoizedState &&
  1298. push(hostTransitionProviderCursor, fiber, fiber);
  1299. var context = requiredContext(contextStackCursor.current);
  1300. var type = fiber.type;
  1301. var nextContext = getChildHostContextProd(context.context, type);
  1302. type = updatedAncestorInfoDev(context.ancestorInfo, type);
  1303. nextContext = { context: nextContext, ancestorInfo: type };
  1304. context !== nextContext &&
  1305. (push(contextFiberStackCursor, fiber, fiber),
  1306. push(contextStackCursor, nextContext, fiber));
  1307. }
  1308. function popHostContext(fiber) {
  1309. contextFiberStackCursor.current === fiber &&
  1310. (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber));
  1311. hostTransitionProviderCursor.current === fiber &&
  1312. (pop(hostTransitionProviderCursor, fiber),
  1313. (HostTransitionContext._currentValue = NotPendingTransition));
  1314. }
  1315. function disabledLog() {}
  1316. function disableLogs() {
  1317. if (0 === disabledDepth) {
  1318. prevLog = console.log;
  1319. prevInfo = console.info;
  1320. prevWarn = console.warn;
  1321. prevError = console.error;
  1322. prevGroup = console.group;
  1323. prevGroupCollapsed = console.groupCollapsed;
  1324. prevGroupEnd = console.groupEnd;
  1325. var props = {
  1326. configurable: true,
  1327. enumerable: true,
  1328. value: disabledLog,
  1329. writable: true
  1330. };
  1331. Object.defineProperties(console, {
  1332. info: props,
  1333. log: props,
  1334. warn: props,
  1335. error: props,
  1336. group: props,
  1337. groupCollapsed: props,
  1338. groupEnd: props
  1339. });
  1340. }
  1341. disabledDepth++;
  1342. }
  1343. function reenableLogs() {
  1344. disabledDepth--;
  1345. if (0 === disabledDepth) {
  1346. var props = { configurable: true, enumerable: true, writable: true };
  1347. Object.defineProperties(console, {
  1348. log: assign({}, props, { value: prevLog }),
  1349. info: assign({}, props, { value: prevInfo }),
  1350. warn: assign({}, props, { value: prevWarn }),
  1351. error: assign({}, props, { value: prevError }),
  1352. group: assign({}, props, { value: prevGroup }),
  1353. groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
  1354. groupEnd: assign({}, props, { value: prevGroupEnd })
  1355. });
  1356. }
  1357. 0 > disabledDepth &&
  1358. console.error(
  1359. "disabledDepth fell below zero. This is a bug in React. Please file an issue."
  1360. );
  1361. }
  1362. function formatOwnerStack(error) {
  1363. var prevPrepareStackTrace = Error.prepareStackTrace;
  1364. Error.prepareStackTrace = void 0;
  1365. error = error.stack;
  1366. Error.prepareStackTrace = prevPrepareStackTrace;
  1367. error.startsWith("Error: react-stack-top-frame\n") &&
  1368. (error = error.slice(29));
  1369. prevPrepareStackTrace = error.indexOf("\n");
  1370. -1 !== prevPrepareStackTrace &&
  1371. (error = error.slice(prevPrepareStackTrace + 1));
  1372. prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
  1373. -1 !== prevPrepareStackTrace &&
  1374. (prevPrepareStackTrace = error.lastIndexOf(
  1375. "\n",
  1376. prevPrepareStackTrace
  1377. ));
  1378. if (-1 !== prevPrepareStackTrace)
  1379. error = error.slice(0, prevPrepareStackTrace);
  1380. else return "";
  1381. return error;
  1382. }
  1383. function describeBuiltInComponentFrame(name) {
  1384. if (void 0 === prefix)
  1385. try {
  1386. throw Error();
  1387. } catch (x) {
  1388. var match = x.stack.trim().match(/\n( *(at )?)/);
  1389. prefix = (match && match[1]) || "";
  1390. suffix =
  1391. -1 < x.stack.indexOf("\n at")
  1392. ? " (<anonymous>)"
  1393. : -1 < x.stack.indexOf("@")
  1394. ? "@unknown:0:0"
  1395. : "";
  1396. }
  1397. return "\n" + prefix + name + suffix;
  1398. }
  1399. function describeNativeComponentFrame(fn, construct) {
  1400. if (!fn || reentry) return "";
  1401. var frame = componentFrameCache.get(fn);
  1402. if (void 0 !== frame) return frame;
  1403. reentry = true;
  1404. frame = Error.prepareStackTrace;
  1405. Error.prepareStackTrace = void 0;
  1406. var previousDispatcher = null;
  1407. previousDispatcher = ReactSharedInternals.H;
  1408. ReactSharedInternals.H = null;
  1409. disableLogs();
  1410. try {
  1411. var RunInRootFrame = {
  1412. DetermineComponentFrameRoot: function () {
  1413. try {
  1414. if (construct) {
  1415. var Fake = function () {
  1416. throw Error();
  1417. };
  1418. Object.defineProperty(Fake.prototype, "props", {
  1419. set: function () {
  1420. throw Error();
  1421. }
  1422. });
  1423. if ("object" === typeof Reflect && Reflect.construct) {
  1424. try {
  1425. Reflect.construct(Fake, []);
  1426. } catch (x) {
  1427. var control = x;
  1428. }
  1429. Reflect.construct(fn, [], Fake);
  1430. } else {
  1431. try {
  1432. Fake.call();
  1433. } catch (x$0) {
  1434. control = x$0;
  1435. }
  1436. fn.call(Fake.prototype);
  1437. }
  1438. } else {
  1439. try {
  1440. throw Error();
  1441. } catch (x$1) {
  1442. control = x$1;
  1443. }
  1444. (Fake = fn()) &&
  1445. "function" === typeof Fake.catch &&
  1446. Fake.catch(function () {});
  1447. }
  1448. } catch (sample) {
  1449. if (sample && control && "string" === typeof sample.stack)
  1450. return [sample.stack, control.stack];
  1451. }
  1452. return [null, null];
  1453. }
  1454. };
  1455. RunInRootFrame.DetermineComponentFrameRoot.displayName =
  1456. "DetermineComponentFrameRoot";
  1457. var namePropDescriptor = Object.getOwnPropertyDescriptor(
  1458. RunInRootFrame.DetermineComponentFrameRoot,
  1459. "name"
  1460. );
  1461. namePropDescriptor &&
  1462. namePropDescriptor.configurable &&
  1463. Object.defineProperty(
  1464. RunInRootFrame.DetermineComponentFrameRoot,
  1465. "name",
  1466. { value: "DetermineComponentFrameRoot" }
  1467. );
  1468. var _RunInRootFrame$Deter =
  1469. RunInRootFrame.DetermineComponentFrameRoot(),
  1470. sampleStack = _RunInRootFrame$Deter[0],
  1471. controlStack = _RunInRootFrame$Deter[1];
  1472. if (sampleStack && controlStack) {
  1473. var sampleLines = sampleStack.split("\n"),
  1474. controlLines = controlStack.split("\n");
  1475. for (
  1476. _RunInRootFrame$Deter = namePropDescriptor = 0;
  1477. namePropDescriptor < sampleLines.length &&
  1478. !sampleLines[namePropDescriptor].includes(
  1479. "DetermineComponentFrameRoot"
  1480. );
  1481. )
  1482. namePropDescriptor++;
  1483. for (
  1484. ;
  1485. _RunInRootFrame$Deter < controlLines.length &&
  1486. !controlLines[_RunInRootFrame$Deter].includes(
  1487. "DetermineComponentFrameRoot"
  1488. );
  1489. )
  1490. _RunInRootFrame$Deter++;
  1491. if (
  1492. namePropDescriptor === sampleLines.length ||
  1493. _RunInRootFrame$Deter === controlLines.length
  1494. )
  1495. for (
  1496. namePropDescriptor = sampleLines.length - 1,
  1497. _RunInRootFrame$Deter = controlLines.length - 1;
  1498. 1 <= namePropDescriptor &&
  1499. 0 <= _RunInRootFrame$Deter &&
  1500. sampleLines[namePropDescriptor] !==
  1501. controlLines[_RunInRootFrame$Deter];
  1502. )
  1503. _RunInRootFrame$Deter--;
  1504. for (
  1505. ;
  1506. 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;
  1507. namePropDescriptor--, _RunInRootFrame$Deter--
  1508. )
  1509. if (
  1510. sampleLines[namePropDescriptor] !==
  1511. controlLines[_RunInRootFrame$Deter]
  1512. ) {
  1513. if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
  1514. do
  1515. if (
  1516. (namePropDescriptor--,
  1517. _RunInRootFrame$Deter--,
  1518. 0 > _RunInRootFrame$Deter ||
  1519. sampleLines[namePropDescriptor] !==
  1520. controlLines[_RunInRootFrame$Deter])
  1521. ) {
  1522. var _frame =
  1523. "\n" +
  1524. sampleLines[namePropDescriptor].replace(
  1525. " at new ",
  1526. " at "
  1527. );
  1528. fn.displayName &&
  1529. _frame.includes("<anonymous>") &&
  1530. (_frame = _frame.replace("<anonymous>", fn.displayName));
  1531. "function" === typeof fn &&
  1532. componentFrameCache.set(fn, _frame);
  1533. return _frame;
  1534. }
  1535. while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
  1536. }
  1537. break;
  1538. }
  1539. }
  1540. } finally {
  1541. (reentry = false),
  1542. (ReactSharedInternals.H = previousDispatcher),
  1543. reenableLogs(),
  1544. (Error.prepareStackTrace = frame);
  1545. }
  1546. sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "")
  1547. ? describeBuiltInComponentFrame(sampleLines)
  1548. : "";
  1549. "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
  1550. return sampleLines;
  1551. }
  1552. function describeFiber(fiber, childFiber) {
  1553. switch (fiber.tag) {
  1554. case 26:
  1555. case 27:
  1556. case 5:
  1557. return describeBuiltInComponentFrame(fiber.type);
  1558. case 16:
  1559. return describeBuiltInComponentFrame("Lazy");
  1560. case 13:
  1561. return fiber.child !== childFiber && null !== childFiber
  1562. ? describeBuiltInComponentFrame("Suspense Fallback")
  1563. : describeBuiltInComponentFrame("Suspense");
  1564. case 19:
  1565. return describeBuiltInComponentFrame("SuspenseList");
  1566. case 0:
  1567. case 15:
  1568. return describeNativeComponentFrame(fiber.type, false);
  1569. case 11:
  1570. return describeNativeComponentFrame(fiber.type.render, false);
  1571. case 1:
  1572. return describeNativeComponentFrame(fiber.type, true);
  1573. case 31:
  1574. return describeBuiltInComponentFrame("Activity");
  1575. default:
  1576. return "";
  1577. }
  1578. }
  1579. function getStackByFiberInDevAndProd(workInProgress) {
  1580. try {
  1581. var info = "",
  1582. previous = null;
  1583. do {
  1584. info += describeFiber(workInProgress, previous);
  1585. var debugInfo = workInProgress._debugInfo;
  1586. if (debugInfo)
  1587. for (var i = debugInfo.length - 1; 0 <= i; i--) {
  1588. var entry = debugInfo[i];
  1589. if ("string" === typeof entry.name) {
  1590. var JSCompiler_temp_const = info;
  1591. a: {
  1592. var name = entry.name,
  1593. env = entry.env,
  1594. location = entry.debugLocation;
  1595. if (null != location) {
  1596. var childStack = formatOwnerStack(location),
  1597. idx = childStack.lastIndexOf("\n"),
  1598. lastLine =
  1599. -1 === idx ? childStack : childStack.slice(idx + 1);
  1600. if (-1 !== lastLine.indexOf(name)) {
  1601. var JSCompiler_inline_result = "\n" + lastLine;
  1602. break a;
  1603. }
  1604. }
  1605. JSCompiler_inline_result = describeBuiltInComponentFrame(
  1606. name + (env ? " [" + env + "]" : "")
  1607. );
  1608. }
  1609. info = JSCompiler_temp_const + JSCompiler_inline_result;
  1610. }
  1611. }
  1612. previous = workInProgress;
  1613. workInProgress = workInProgress.return;
  1614. } while (workInProgress);
  1615. return info;
  1616. } catch (x) {
  1617. return "\nError generating stack: " + x.message + "\n" + x.stack;
  1618. }
  1619. }
  1620. function describeFunctionComponentFrameWithoutLineNumber(fn) {
  1621. return (fn = fn ? fn.displayName || fn.name : "")
  1622. ? describeBuiltInComponentFrame(fn)
  1623. : "";
  1624. }
  1625. function getCurrentFiberOwnerNameInDevOrNull() {
  1626. if (null === current) return null;
  1627. var owner = current._debugOwner;
  1628. return null != owner ? getComponentNameFromOwner(owner) : null;
  1629. }
  1630. function getCurrentFiberStackInDev() {
  1631. if (null === current) return "";
  1632. var workInProgress = current;
  1633. try {
  1634. var info = "";
  1635. 6 === workInProgress.tag && (workInProgress = workInProgress.return);
  1636. switch (workInProgress.tag) {
  1637. case 26:
  1638. case 27:
  1639. case 5:
  1640. info += describeBuiltInComponentFrame(workInProgress.type);
  1641. break;
  1642. case 13:
  1643. info += describeBuiltInComponentFrame("Suspense");
  1644. break;
  1645. case 19:
  1646. info += describeBuiltInComponentFrame("SuspenseList");
  1647. break;
  1648. case 31:
  1649. info += describeBuiltInComponentFrame("Activity");
  1650. break;
  1651. case 30:
  1652. case 0:
  1653. case 15:
  1654. case 1:
  1655. workInProgress._debugOwner ||
  1656. "" !== info ||
  1657. (info += describeFunctionComponentFrameWithoutLineNumber(
  1658. workInProgress.type
  1659. ));
  1660. break;
  1661. case 11:
  1662. workInProgress._debugOwner ||
  1663. "" !== info ||
  1664. (info += describeFunctionComponentFrameWithoutLineNumber(
  1665. workInProgress.type.render
  1666. ));
  1667. }
  1668. for (; workInProgress; )
  1669. if ("number" === typeof workInProgress.tag) {
  1670. var fiber = workInProgress;
  1671. workInProgress = fiber._debugOwner;
  1672. var debugStack = fiber._debugStack;
  1673. if (workInProgress && debugStack) {
  1674. var formattedStack = formatOwnerStack(debugStack);
  1675. "" !== formattedStack && (info += "\n" + formattedStack);
  1676. }
  1677. } else if (null != workInProgress.debugStack) {
  1678. var ownerStack = workInProgress.debugStack;
  1679. (workInProgress = workInProgress.owner) &&
  1680. ownerStack &&
  1681. (info += "\n" + formatOwnerStack(ownerStack));
  1682. } else break;
  1683. var JSCompiler_inline_result = info;
  1684. } catch (x) {
  1685. JSCompiler_inline_result =
  1686. "\nError generating stack: " + x.message + "\n" + x.stack;
  1687. }
  1688. return JSCompiler_inline_result;
  1689. }
  1690. function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
  1691. var previousFiber = current;
  1692. setCurrentFiber(fiber);
  1693. try {
  1694. return null !== fiber && fiber._debugTask
  1695. ? fiber._debugTask.run(
  1696. callback.bind(null, arg0, arg1, arg2, arg3, arg4)
  1697. )
  1698. : callback(arg0, arg1, arg2, arg3, arg4);
  1699. } finally {
  1700. setCurrentFiber(previousFiber);
  1701. }
  1702. throw Error(
  1703. "runWithFiberInDEV should never be called in production. This is a bug in React."
  1704. );
  1705. }
  1706. function setCurrentFiber(fiber) {
  1707. ReactSharedInternals.getCurrentStack =
  1708. null === fiber ? null : getCurrentFiberStackInDev;
  1709. isRendering = false;
  1710. current = fiber;
  1711. }
  1712. function typeName(value) {
  1713. return (
  1714. ("function" === typeof Symbol &&
  1715. Symbol.toStringTag &&
  1716. value[Symbol.toStringTag]) ||
  1717. value.constructor.name ||
  1718. "Object"
  1719. );
  1720. }
  1721. function willCoercionThrow(value) {
  1722. try {
  1723. return testStringCoercion(value), !1;
  1724. } catch (e) {
  1725. return true;
  1726. }
  1727. }
  1728. function testStringCoercion(value) {
  1729. return "" + value;
  1730. }
  1731. function checkAttributeStringCoercion(value, attributeName) {
  1732. if (willCoercionThrow(value))
  1733. return (
  1734. console.error(
  1735. "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
  1736. attributeName,
  1737. typeName(value)
  1738. ),
  1739. testStringCoercion(value)
  1740. );
  1741. }
  1742. function checkCSSPropertyStringCoercion(value, propName) {
  1743. if (willCoercionThrow(value))
  1744. return (
  1745. console.error(
  1746. "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
  1747. propName,
  1748. typeName(value)
  1749. ),
  1750. testStringCoercion(value)
  1751. );
  1752. }
  1753. function checkFormFieldValueStringCoercion(value) {
  1754. if (willCoercionThrow(value))
  1755. return (
  1756. console.error(
  1757. "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",
  1758. typeName(value)
  1759. ),
  1760. testStringCoercion(value)
  1761. );
  1762. }
  1763. function injectInternals(internals) {
  1764. if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return false;
  1765. var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  1766. if (hook.isDisabled) return true;
  1767. if (!hook.supportsFiber)
  1768. return (
  1769. console.error(
  1770. "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"
  1771. ),
  1772. true
  1773. );
  1774. try {
  1775. (rendererID = hook.inject(internals)), (injectedHook = hook);
  1776. } catch (err) {
  1777. console.error("React instrumentation encountered an error: %o.", err);
  1778. }
  1779. return hook.checkDCE ? true : false;
  1780. }
  1781. function setIsStrictModeForDevtools(newIsStrictMode) {
  1782. "function" === typeof log$1 &&
  1783. unstable_setDisableYieldValue(newIsStrictMode);
  1784. if (injectedHook && "function" === typeof injectedHook.setStrictMode)
  1785. try {
  1786. injectedHook.setStrictMode(rendererID, newIsStrictMode);
  1787. } catch (err) {
  1788. hasLoggedError ||
  1789. ((hasLoggedError = true),
  1790. console.error(
  1791. "React instrumentation encountered an error: %o",
  1792. err
  1793. ));
  1794. }
  1795. }
  1796. function clz32Fallback(x) {
  1797. x >>>= 0;
  1798. return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
  1799. }
  1800. function getHighestPriorityLanes(lanes) {
  1801. var pendingSyncLanes = lanes & 42;
  1802. if (0 !== pendingSyncLanes) return pendingSyncLanes;
  1803. switch (lanes & -lanes) {
  1804. case 1:
  1805. return 1;
  1806. case 2:
  1807. return 2;
  1808. case 4:
  1809. return 4;
  1810. case 8:
  1811. return 8;
  1812. case 16:
  1813. return 16;
  1814. case 32:
  1815. return 32;
  1816. case 64:
  1817. return 64;
  1818. case 128:
  1819. return 128;
  1820. case 256:
  1821. case 512:
  1822. case 1024:
  1823. case 2048:
  1824. case 4096:
  1825. case 8192:
  1826. case 16384:
  1827. case 32768:
  1828. case 65536:
  1829. case 131072:
  1830. return lanes & 261888;
  1831. case 262144:
  1832. case 524288:
  1833. case 1048576:
  1834. case 2097152:
  1835. return lanes & 3932160;
  1836. case 4194304:
  1837. case 8388608:
  1838. case 16777216:
  1839. case 33554432:
  1840. return lanes & 62914560;
  1841. case 67108864:
  1842. return 67108864;
  1843. case 134217728:
  1844. return 134217728;
  1845. case 268435456:
  1846. return 268435456;
  1847. case 536870912:
  1848. return 536870912;
  1849. case 1073741824:
  1850. return 0;
  1851. default:
  1852. return (
  1853. console.error(
  1854. "Should have found matching lanes. This is a bug in React."
  1855. ),
  1856. lanes
  1857. );
  1858. }
  1859. }
  1860. function getNextLanes(root, wipLanes, rootHasPendingCommit) {
  1861. var pendingLanes = root.pendingLanes;
  1862. if (0 === pendingLanes) return 0;
  1863. var nextLanes = 0,
  1864. suspendedLanes = root.suspendedLanes,
  1865. pingedLanes = root.pingedLanes;
  1866. root = root.warmLanes;
  1867. var nonIdlePendingLanes = pendingLanes & 134217727;
  1868. 0 !== nonIdlePendingLanes
  1869. ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),
  1870. 0 !== pendingLanes
  1871. ? (nextLanes = getHighestPriorityLanes(pendingLanes))
  1872. : ((pingedLanes &= nonIdlePendingLanes),
  1873. 0 !== pingedLanes
  1874. ? (nextLanes = getHighestPriorityLanes(pingedLanes))
  1875. : rootHasPendingCommit ||
  1876. ((rootHasPendingCommit = nonIdlePendingLanes & ~root),
  1877. 0 !== rootHasPendingCommit &&
  1878. (nextLanes =
  1879. getHighestPriorityLanes(rootHasPendingCommit)))))
  1880. : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),
  1881. 0 !== nonIdlePendingLanes
  1882. ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))
  1883. : 0 !== pingedLanes
  1884. ? (nextLanes = getHighestPriorityLanes(pingedLanes))
  1885. : rootHasPendingCommit ||
  1886. ((rootHasPendingCommit = pendingLanes & ~root),
  1887. 0 !== rootHasPendingCommit &&
  1888. (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));
  1889. return 0 === nextLanes
  1890. ? 0
  1891. : 0 !== wipLanes &&
  1892. wipLanes !== nextLanes &&
  1893. 0 === (wipLanes & suspendedLanes) &&
  1894. ((suspendedLanes = nextLanes & -nextLanes),
  1895. (rootHasPendingCommit = wipLanes & -wipLanes),
  1896. suspendedLanes >= rootHasPendingCommit ||
  1897. (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))
  1898. ? wipLanes
  1899. : nextLanes;
  1900. }
  1901. function checkIfRootIsPrerendering(root, renderLanes) {
  1902. return (
  1903. 0 ===
  1904. (root.pendingLanes &
  1905. ~(root.suspendedLanes & ~root.pingedLanes) &
  1906. renderLanes)
  1907. );
  1908. }
  1909. function computeExpirationTime(lane, currentTime) {
  1910. switch (lane) {
  1911. case 1:
  1912. case 2:
  1913. case 4:
  1914. case 8:
  1915. case 64:
  1916. return currentTime + 250;
  1917. case 16:
  1918. case 32:
  1919. case 128:
  1920. case 256:
  1921. case 512:
  1922. case 1024:
  1923. case 2048:
  1924. case 4096:
  1925. case 8192:
  1926. case 16384:
  1927. case 32768:
  1928. case 65536:
  1929. case 131072:
  1930. case 262144:
  1931. case 524288:
  1932. case 1048576:
  1933. case 2097152:
  1934. return currentTime + 5e3;
  1935. case 4194304:
  1936. case 8388608:
  1937. case 16777216:
  1938. case 33554432:
  1939. return -1;
  1940. case 67108864:
  1941. case 134217728:
  1942. case 268435456:
  1943. case 536870912:
  1944. case 1073741824:
  1945. return -1;
  1946. default:
  1947. return (
  1948. console.error(
  1949. "Should have found matching lanes. This is a bug in React."
  1950. ),
  1951. -1
  1952. );
  1953. }
  1954. }
  1955. function claimNextRetryLane() {
  1956. var lane = nextRetryLane;
  1957. nextRetryLane <<= 1;
  1958. 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
  1959. return lane;
  1960. }
  1961. function createLaneMap(initial) {
  1962. for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
  1963. return laneMap;
  1964. }
  1965. function markRootUpdated$1(root, updateLane) {
  1966. root.pendingLanes |= updateLane;
  1967. 268435456 !== updateLane &&
  1968. ((root.suspendedLanes = 0),
  1969. (root.pingedLanes = 0),
  1970. (root.warmLanes = 0));
  1971. }
  1972. function markRootFinished(
  1973. root,
  1974. finishedLanes,
  1975. remainingLanes,
  1976. spawnedLane,
  1977. updatedLanes,
  1978. suspendedRetryLanes
  1979. ) {
  1980. var previouslyPendingLanes = root.pendingLanes;
  1981. root.pendingLanes = remainingLanes;
  1982. root.suspendedLanes = 0;
  1983. root.pingedLanes = 0;
  1984. root.warmLanes = 0;
  1985. root.expiredLanes &= remainingLanes;
  1986. root.entangledLanes &= remainingLanes;
  1987. root.errorRecoveryDisabledLanes &= remainingLanes;
  1988. root.shellSuspendCounter = 0;
  1989. var entanglements = root.entanglements,
  1990. expirationTimes = root.expirationTimes,
  1991. hiddenUpdates = root.hiddenUpdates;
  1992. for (
  1993. remainingLanes = previouslyPendingLanes & ~remainingLanes;
  1994. 0 < remainingLanes;
  1995. ) {
  1996. var index = 31 - clz32(remainingLanes),
  1997. lane = 1 << index;
  1998. entanglements[index] = 0;
  1999. expirationTimes[index] = -1;
  2000. var hiddenUpdatesForLane = hiddenUpdates[index];
  2001. if (null !== hiddenUpdatesForLane)
  2002. for (
  2003. hiddenUpdates[index] = null, index = 0;
  2004. index < hiddenUpdatesForLane.length;
  2005. index++
  2006. ) {
  2007. var update = hiddenUpdatesForLane[index];
  2008. null !== update && (update.lane &= -536870913);
  2009. }
  2010. remainingLanes &= ~lane;
  2011. }
  2012. 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);
  2013. 0 !== suspendedRetryLanes &&
  2014. 0 === updatedLanes &&
  2015. 0 !== root.tag &&
  2016. (root.suspendedLanes |=
  2017. suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
  2018. }
  2019. function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {
  2020. root.pendingLanes |= spawnedLane;
  2021. root.suspendedLanes &= ~spawnedLane;
  2022. var spawnedLaneIndex = 31 - clz32(spawnedLane);
  2023. root.entangledLanes |= spawnedLane;
  2024. root.entanglements[spawnedLaneIndex] =
  2025. root.entanglements[spawnedLaneIndex] |
  2026. 1073741824 |
  2027. (entangledLanes & 261930);
  2028. }
  2029. function markRootEntangled(root, entangledLanes) {
  2030. var rootEntangledLanes = (root.entangledLanes |= entangledLanes);
  2031. for (root = root.entanglements; rootEntangledLanes; ) {
  2032. var index = 31 - clz32(rootEntangledLanes),
  2033. lane = 1 << index;
  2034. (lane & entangledLanes) | (root[index] & entangledLanes) &&
  2035. (root[index] |= entangledLanes);
  2036. rootEntangledLanes &= ~lane;
  2037. }
  2038. }
  2039. function getBumpedLaneForHydration(root, renderLanes) {
  2040. var renderLane = renderLanes & -renderLanes;
  2041. renderLane =
  2042. 0 !== (renderLane & 42)
  2043. ? 1
  2044. : getBumpedLaneForHydrationByLane(renderLane);
  2045. return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
  2046. ? 0
  2047. : renderLane;
  2048. }
  2049. function getBumpedLaneForHydrationByLane(lane) {
  2050. switch (lane) {
  2051. case 2:
  2052. lane = 1;
  2053. break;
  2054. case 8:
  2055. lane = 4;
  2056. break;
  2057. case 32:
  2058. lane = 16;
  2059. break;
  2060. case 256:
  2061. case 512:
  2062. case 1024:
  2063. case 2048:
  2064. case 4096:
  2065. case 8192:
  2066. case 16384:
  2067. case 32768:
  2068. case 65536:
  2069. case 131072:
  2070. case 262144:
  2071. case 524288:
  2072. case 1048576:
  2073. case 2097152:
  2074. case 4194304:
  2075. case 8388608:
  2076. case 16777216:
  2077. case 33554432:
  2078. lane = 128;
  2079. break;
  2080. case 268435456:
  2081. lane = 134217728;
  2082. break;
  2083. default:
  2084. lane = 0;
  2085. }
  2086. return lane;
  2087. }
  2088. function addFiberToLanesMap(root, fiber, lanes) {
  2089. if (isDevToolsPresent)
  2090. for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
  2091. var index = 31 - clz32(lanes),
  2092. lane = 1 << index;
  2093. root[index].add(fiber);
  2094. lanes &= ~lane;
  2095. }
  2096. }
  2097. function movePendingFibersToMemoized(root, lanes) {
  2098. if (isDevToolsPresent)
  2099. for (
  2100. var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap,
  2101. memoizedUpdaters = root.memoizedUpdaters;
  2102. 0 < lanes;
  2103. ) {
  2104. var index = 31 - clz32(lanes);
  2105. root = 1 << index;
  2106. index = pendingUpdatersLaneMap[index];
  2107. 0 < index.size &&
  2108. (index.forEach(function (fiber) {
  2109. var alternate = fiber.alternate;
  2110. (null !== alternate && memoizedUpdaters.has(alternate)) ||
  2111. memoizedUpdaters.add(fiber);
  2112. }),
  2113. index.clear());
  2114. lanes &= ~root;
  2115. }
  2116. }
  2117. function lanesToEventPriority(lanes) {
  2118. lanes &= -lanes;
  2119. return DiscreteEventPriority < lanes
  2120. ? ContinuousEventPriority < lanes
  2121. ? 0 !== (lanes & 134217727)
  2122. ? DefaultEventPriority
  2123. : IdleEventPriority
  2124. : ContinuousEventPriority
  2125. : DiscreteEventPriority;
  2126. }
  2127. function resolveUpdatePriority() {
  2128. var updatePriority = ReactDOMSharedInternals.p;
  2129. if (0 !== updatePriority) return updatePriority;
  2130. updatePriority = window.event;
  2131. return void 0 === updatePriority
  2132. ? DefaultEventPriority
  2133. : getEventPriority(updatePriority.type);
  2134. }
  2135. function runWithPriority(priority, fn) {
  2136. var previousPriority = ReactDOMSharedInternals.p;
  2137. try {
  2138. return (ReactDOMSharedInternals.p = priority), fn();
  2139. } finally {
  2140. ReactDOMSharedInternals.p = previousPriority;
  2141. }
  2142. }
  2143. function detachDeletedInstance(node) {
  2144. delete node[internalInstanceKey];
  2145. delete node[internalPropsKey];
  2146. delete node[internalEventHandlersKey];
  2147. delete node[internalEventHandlerListenersKey];
  2148. delete node[internalEventHandlesSetKey];
  2149. }
  2150. function getClosestInstanceFromNode(targetNode) {
  2151. var targetInst = targetNode[internalInstanceKey];
  2152. if (targetInst) return targetInst;
  2153. for (var parentNode = targetNode.parentNode; parentNode; ) {
  2154. if (
  2155. (targetInst =
  2156. parentNode[internalContainerInstanceKey] ||
  2157. parentNode[internalInstanceKey])
  2158. ) {
  2159. parentNode = targetInst.alternate;
  2160. if (
  2161. null !== targetInst.child ||
  2162. (null !== parentNode && null !== parentNode.child)
  2163. )
  2164. for (
  2165. targetNode = getParentHydrationBoundary(targetNode);
  2166. null !== targetNode;
  2167. ) {
  2168. if ((parentNode = targetNode[internalInstanceKey]))
  2169. return parentNode;
  2170. targetNode = getParentHydrationBoundary(targetNode);
  2171. }
  2172. return targetInst;
  2173. }
  2174. targetNode = parentNode;
  2175. parentNode = targetNode.parentNode;
  2176. }
  2177. return null;
  2178. }
  2179. function getInstanceFromNode(node) {
  2180. if (
  2181. (node = node[internalInstanceKey] || node[internalContainerInstanceKey])
  2182. ) {
  2183. var tag = node.tag;
  2184. if (
  2185. 5 === tag ||
  2186. 6 === tag ||
  2187. 13 === tag ||
  2188. 31 === tag ||
  2189. 26 === tag ||
  2190. 27 === tag ||
  2191. 3 === tag
  2192. )
  2193. return node;
  2194. }
  2195. return null;
  2196. }
  2197. function getNodeFromInstance(inst) {
  2198. var tag = inst.tag;
  2199. if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
  2200. return inst.stateNode;
  2201. throw Error("getNodeFromInstance: Invalid argument.");
  2202. }
  2203. function getResourcesFromRoot(root) {
  2204. var resources = root[internalRootNodeResourcesKey];
  2205. resources ||
  2206. (resources = root[internalRootNodeResourcesKey] =
  2207. { hoistableStyles: new Map(), hoistableScripts: new Map() });
  2208. return resources;
  2209. }
  2210. function markNodeAsHoistable(node) {
  2211. node[internalHoistableMarker] = true;
  2212. }
  2213. function registerTwoPhaseEvent(registrationName, dependencies) {
  2214. registerDirectEvent(registrationName, dependencies);
  2215. registerDirectEvent(registrationName + "Capture", dependencies);
  2216. }
  2217. function registerDirectEvent(registrationName, dependencies) {
  2218. registrationNameDependencies[registrationName] &&
  2219. console.error(
  2220. "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
  2221. registrationName
  2222. );
  2223. registrationNameDependencies[registrationName] = dependencies;
  2224. var lowerCasedName = registrationName.toLowerCase();
  2225. possibleRegistrationNames[lowerCasedName] = registrationName;
  2226. "onDoubleClick" === registrationName &&
  2227. (possibleRegistrationNames.ondblclick = registrationName);
  2228. for (
  2229. registrationName = 0;
  2230. registrationName < dependencies.length;
  2231. registrationName++
  2232. )
  2233. allNativeEvents.add(dependencies[registrationName]);
  2234. }
  2235. function checkControlledValueProps(tagName, props) {
  2236. hasReadOnlyValue[props.type] ||
  2237. props.onChange ||
  2238. props.onInput ||
  2239. props.readOnly ||
  2240. props.disabled ||
  2241. null == props.value ||
  2242. ("select" === tagName
  2243. ? console.error(
  2244. "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."
  2245. )
  2246. : console.error(
  2247. "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."
  2248. ));
  2249. props.onChange ||
  2250. props.readOnly ||
  2251. props.disabled ||
  2252. null == props.checked ||
  2253. console.error(
  2254. "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."
  2255. );
  2256. }
  2257. function isAttributeNameSafe(attributeName) {
  2258. if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
  2259. return true;
  2260. if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
  2261. return false;
  2262. if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
  2263. return (validatedAttributeNameCache[attributeName] = true);
  2264. illegalAttributeNameCache[attributeName] = true;
  2265. console.error("Invalid attribute name: `%s`", attributeName);
  2266. return false;
  2267. }
  2268. function getValueForAttributeOnCustomComponent(node, name, expected) {
  2269. if (isAttributeNameSafe(name)) {
  2270. if (!node.hasAttribute(name)) {
  2271. switch (typeof expected) {
  2272. case "symbol":
  2273. case "object":
  2274. return expected;
  2275. case "function":
  2276. return expected;
  2277. case "boolean":
  2278. if (false === expected) return expected;
  2279. }
  2280. return void 0 === expected ? void 0 : null;
  2281. }
  2282. node = node.getAttribute(name);
  2283. if ("" === node && true === expected) return true;
  2284. checkAttributeStringCoercion(expected, name);
  2285. return node === "" + expected ? expected : node;
  2286. }
  2287. }
  2288. function setValueForAttribute(node, name, value) {
  2289. if (isAttributeNameSafe(name))
  2290. if (null === value) node.removeAttribute(name);
  2291. else {
  2292. switch (typeof value) {
  2293. case "undefined":
  2294. case "function":
  2295. case "symbol":
  2296. node.removeAttribute(name);
  2297. return;
  2298. case "boolean":
  2299. var prefix = name.toLowerCase().slice(0, 5);
  2300. if ("data-" !== prefix && "aria-" !== prefix) {
  2301. node.removeAttribute(name);
  2302. return;
  2303. }
  2304. }
  2305. checkAttributeStringCoercion(value, name);
  2306. node.setAttribute(name, "" + value);
  2307. }
  2308. }
  2309. function setValueForKnownAttribute(node, name, value) {
  2310. if (null === value) node.removeAttribute(name);
  2311. else {
  2312. switch (typeof value) {
  2313. case "undefined":
  2314. case "function":
  2315. case "symbol":
  2316. case "boolean":
  2317. node.removeAttribute(name);
  2318. return;
  2319. }
  2320. checkAttributeStringCoercion(value, name);
  2321. node.setAttribute(name, "" + value);
  2322. }
  2323. }
  2324. function setValueForNamespacedAttribute(node, namespace, name, value) {
  2325. if (null === value) node.removeAttribute(name);
  2326. else {
  2327. switch (typeof value) {
  2328. case "undefined":
  2329. case "function":
  2330. case "symbol":
  2331. case "boolean":
  2332. node.removeAttribute(name);
  2333. return;
  2334. }
  2335. checkAttributeStringCoercion(value, name);
  2336. node.setAttributeNS(namespace, name, "" + value);
  2337. }
  2338. }
  2339. function getToStringValue(value) {
  2340. switch (typeof value) {
  2341. case "bigint":
  2342. case "boolean":
  2343. case "number":
  2344. case "string":
  2345. case "undefined":
  2346. return value;
  2347. case "object":
  2348. return checkFormFieldValueStringCoercion(value), value;
  2349. default:
  2350. return "";
  2351. }
  2352. }
  2353. function isCheckable(elem) {
  2354. var type = elem.type;
  2355. return (
  2356. (elem = elem.nodeName) &&
  2357. "input" === elem.toLowerCase() &&
  2358. ("checkbox" === type || "radio" === type)
  2359. );
  2360. }
  2361. function trackValueOnNode(node, valueField, currentValue) {
  2362. var descriptor = Object.getOwnPropertyDescriptor(
  2363. node.constructor.prototype,
  2364. valueField
  2365. );
  2366. if (
  2367. !node.hasOwnProperty(valueField) &&
  2368. "undefined" !== typeof descriptor &&
  2369. "function" === typeof descriptor.get &&
  2370. "function" === typeof descriptor.set
  2371. ) {
  2372. var get = descriptor.get,
  2373. set = descriptor.set;
  2374. Object.defineProperty(node, valueField, {
  2375. configurable: true,
  2376. get: function () {
  2377. return get.call(this);
  2378. },
  2379. set: function (value) {
  2380. checkFormFieldValueStringCoercion(value);
  2381. currentValue = "" + value;
  2382. set.call(this, value);
  2383. }
  2384. });
  2385. Object.defineProperty(node, valueField, {
  2386. enumerable: descriptor.enumerable
  2387. });
  2388. return {
  2389. getValue: function () {
  2390. return currentValue;
  2391. },
  2392. setValue: function (value) {
  2393. checkFormFieldValueStringCoercion(value);
  2394. currentValue = "" + value;
  2395. },
  2396. stopTracking: function () {
  2397. node._valueTracker = null;
  2398. delete node[valueField];
  2399. }
  2400. };
  2401. }
  2402. }
  2403. function track(node) {
  2404. if (!node._valueTracker) {
  2405. var valueField = isCheckable(node) ? "checked" : "value";
  2406. node._valueTracker = trackValueOnNode(
  2407. node,
  2408. valueField,
  2409. "" + node[valueField]
  2410. );
  2411. }
  2412. }
  2413. function updateValueIfChanged(node) {
  2414. if (!node) return false;
  2415. var tracker = node._valueTracker;
  2416. if (!tracker) return true;
  2417. var lastValue = tracker.getValue();
  2418. var value = "";
  2419. node &&
  2420. (value = isCheckable(node)
  2421. ? node.checked
  2422. ? "true"
  2423. : "false"
  2424. : node.value);
  2425. node = value;
  2426. return node !== lastValue ? (tracker.setValue(node), true) : false;
  2427. }
  2428. function getActiveElement(doc) {
  2429. doc = doc || ("undefined" !== typeof document ? document : void 0);
  2430. if ("undefined" === typeof doc) return null;
  2431. try {
  2432. return doc.activeElement || doc.body;
  2433. } catch (e) {
  2434. return doc.body;
  2435. }
  2436. }
  2437. function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
  2438. return value.replace(
  2439. escapeSelectorAttributeValueInsideDoubleQuotesRegex,
  2440. function (ch) {
  2441. return "\\" + ch.charCodeAt(0).toString(16) + " ";
  2442. }
  2443. );
  2444. }
  2445. function validateInputProps(element, props) {
  2446. void 0 === props.checked ||
  2447. void 0 === props.defaultChecked ||
  2448. didWarnCheckedDefaultChecked ||
  2449. (console.error(
  2450. "%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
  2451. getCurrentFiberOwnerNameInDevOrNull() || "A component",
  2452. props.type
  2453. ),
  2454. (didWarnCheckedDefaultChecked = true));
  2455. void 0 === props.value ||
  2456. void 0 === props.defaultValue ||
  2457. didWarnValueDefaultValue$1 ||
  2458. (console.error(
  2459. "%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",
  2460. getCurrentFiberOwnerNameInDevOrNull() || "A component",
  2461. props.type
  2462. ),
  2463. (didWarnValueDefaultValue$1 = true));
  2464. }
  2465. function updateInput(
  2466. element,
  2467. value,
  2468. defaultValue,
  2469. lastDefaultValue,
  2470. checked,
  2471. defaultChecked,
  2472. type,
  2473. name
  2474. ) {
  2475. element.name = "";
  2476. null != type &&
  2477. "function" !== typeof type &&
  2478. "symbol" !== typeof type &&
  2479. "boolean" !== typeof type
  2480. ? (checkAttributeStringCoercion(type, "type"), (element.type = type))
  2481. : element.removeAttribute("type");
  2482. if (null != value)
  2483. if ("number" === type) {
  2484. if ((0 === value && "" === element.value) || element.value != value)
  2485. element.value = "" + getToStringValue(value);
  2486. } else
  2487. element.value !== "" + getToStringValue(value) &&
  2488. (element.value = "" + getToStringValue(value));
  2489. else
  2490. ("submit" !== type && "reset" !== type) ||
  2491. element.removeAttribute("value");
  2492. null != value
  2493. ? setDefaultValue(element, type, getToStringValue(value))
  2494. : null != defaultValue
  2495. ? setDefaultValue(element, type, getToStringValue(defaultValue))
  2496. : null != lastDefaultValue && element.removeAttribute("value");
  2497. null == checked &&
  2498. null != defaultChecked &&
  2499. (element.defaultChecked = !!defaultChecked);
  2500. null != checked &&
  2501. (element.checked =
  2502. checked &&
  2503. "function" !== typeof checked &&
  2504. "symbol" !== typeof checked);
  2505. null != name &&
  2506. "function" !== typeof name &&
  2507. "symbol" !== typeof name &&
  2508. "boolean" !== typeof name
  2509. ? (checkAttributeStringCoercion(name, "name"),
  2510. (element.name = "" + getToStringValue(name)))
  2511. : element.removeAttribute("name");
  2512. }
  2513. function initInput(
  2514. element,
  2515. value,
  2516. defaultValue,
  2517. checked,
  2518. defaultChecked,
  2519. type,
  2520. name,
  2521. isHydrating
  2522. ) {
  2523. null != type &&
  2524. "function" !== typeof type &&
  2525. "symbol" !== typeof type &&
  2526. "boolean" !== typeof type &&
  2527. (checkAttributeStringCoercion(type, "type"), (element.type = type));
  2528. if (null != value || null != defaultValue) {
  2529. if (
  2530. !(
  2531. ("submit" !== type && "reset" !== type) ||
  2532. (void 0 !== value && null !== value)
  2533. )
  2534. ) {
  2535. track(element);
  2536. return;
  2537. }
  2538. defaultValue =
  2539. null != defaultValue ? "" + getToStringValue(defaultValue) : "";
  2540. value = null != value ? "" + getToStringValue(value) : defaultValue;
  2541. isHydrating || value === element.value || (element.value = value);
  2542. element.defaultValue = value;
  2543. }
  2544. checked = null != checked ? checked : defaultChecked;
  2545. checked =
  2546. "function" !== typeof checked &&
  2547. "symbol" !== typeof checked &&
  2548. !!checked;
  2549. element.checked = isHydrating ? element.checked : !!checked;
  2550. element.defaultChecked = !!checked;
  2551. null != name &&
  2552. "function" !== typeof name &&
  2553. "symbol" !== typeof name &&
  2554. "boolean" !== typeof name &&
  2555. (checkAttributeStringCoercion(name, "name"), (element.name = name));
  2556. track(element);
  2557. }
  2558. function setDefaultValue(node, type, value) {
  2559. ("number" === type && getActiveElement(node.ownerDocument) === node) ||
  2560. node.defaultValue === "" + value ||
  2561. (node.defaultValue = "" + value);
  2562. }
  2563. function validateOptionProps(element, props) {
  2564. null == props.value &&
  2565. ("object" === typeof props.children && null !== props.children
  2566. ? React.Children.forEach(props.children, function (child) {
  2567. null == child ||
  2568. "string" === typeof child ||
  2569. "number" === typeof child ||
  2570. "bigint" === typeof child ||
  2571. didWarnInvalidChild ||
  2572. ((didWarnInvalidChild = true),
  2573. console.error(
  2574. "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."
  2575. ));
  2576. })
  2577. : null == props.dangerouslySetInnerHTML ||
  2578. didWarnInvalidInnerHTML ||
  2579. ((didWarnInvalidInnerHTML = true),
  2580. console.error(
  2581. "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."
  2582. )));
  2583. null == props.selected ||
  2584. didWarnSelectedSetOnOption ||
  2585. (console.error(
  2586. "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."
  2587. ),
  2588. (didWarnSelectedSetOnOption = true));
  2589. }
  2590. function getDeclarationErrorAddendum() {
  2591. var ownerName = getCurrentFiberOwnerNameInDevOrNull();
  2592. return ownerName
  2593. ? "\n\nCheck the render method of `" + ownerName + "`."
  2594. : "";
  2595. }
  2596. function updateOptions(node, multiple, propValue, setDefaultSelected) {
  2597. node = node.options;
  2598. if (multiple) {
  2599. multiple = {};
  2600. for (var i = 0; i < propValue.length; i++)
  2601. multiple["$" + propValue[i]] = true;
  2602. for (propValue = 0; propValue < node.length; propValue++)
  2603. (i = multiple.hasOwnProperty("$" + node[propValue].value)),
  2604. node[propValue].selected !== i && (node[propValue].selected = i),
  2605. i && setDefaultSelected && (node[propValue].defaultSelected = true);
  2606. } else {
  2607. propValue = "" + getToStringValue(propValue);
  2608. multiple = null;
  2609. for (i = 0; i < node.length; i++) {
  2610. if (node[i].value === propValue) {
  2611. node[i].selected = true;
  2612. setDefaultSelected && (node[i].defaultSelected = true);
  2613. return;
  2614. }
  2615. null !== multiple || node[i].disabled || (multiple = node[i]);
  2616. }
  2617. null !== multiple && (multiple.selected = true);
  2618. }
  2619. }
  2620. function validateSelectProps(element, props) {
  2621. for (element = 0; element < valuePropNames.length; element++) {
  2622. var propName = valuePropNames[element];
  2623. if (null != props[propName]) {
  2624. var propNameIsArray = isArrayImpl(props[propName]);
  2625. props.multiple && !propNameIsArray
  2626. ? console.error(
  2627. "The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",
  2628. propName,
  2629. getDeclarationErrorAddendum()
  2630. )
  2631. : !props.multiple &&
  2632. propNameIsArray &&
  2633. console.error(
  2634. "The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",
  2635. propName,
  2636. getDeclarationErrorAddendum()
  2637. );
  2638. }
  2639. }
  2640. void 0 === props.value ||
  2641. void 0 === props.defaultValue ||
  2642. didWarnValueDefaultValue ||
  2643. (console.error(
  2644. "Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"
  2645. ),
  2646. (didWarnValueDefaultValue = true));
  2647. }
  2648. function validateTextareaProps(element, props) {
  2649. void 0 === props.value ||
  2650. void 0 === props.defaultValue ||
  2651. didWarnValDefaultVal ||
  2652. (console.error(
  2653. "%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",
  2654. getCurrentFiberOwnerNameInDevOrNull() || "A component"
  2655. ),
  2656. (didWarnValDefaultVal = true));
  2657. null != props.children &&
  2658. null == props.value &&
  2659. console.error(
  2660. "Use the `defaultValue` or `value` props instead of setting children on <textarea>."
  2661. );
  2662. }
  2663. function updateTextarea(element, value, defaultValue) {
  2664. if (
  2665. null != value &&
  2666. ((value = "" + getToStringValue(value)),
  2667. value !== element.value && (element.value = value),
  2668. null == defaultValue)
  2669. ) {
  2670. element.defaultValue !== value && (element.defaultValue = value);
  2671. return;
  2672. }
  2673. element.defaultValue =
  2674. null != defaultValue ? "" + getToStringValue(defaultValue) : "";
  2675. }
  2676. function initTextarea(element, value, defaultValue, children) {
  2677. if (null == value) {
  2678. if (null != children) {
  2679. if (null != defaultValue)
  2680. throw Error(
  2681. "If you supply `defaultValue` on a <textarea>, do not pass children."
  2682. );
  2683. if (isArrayImpl(children)) {
  2684. if (1 < children.length)
  2685. throw Error("<textarea> can only have at most one child.");
  2686. children = children[0];
  2687. }
  2688. defaultValue = children;
  2689. }
  2690. null == defaultValue && (defaultValue = "");
  2691. value = defaultValue;
  2692. }
  2693. defaultValue = getToStringValue(value);
  2694. element.defaultValue = defaultValue;
  2695. children = element.textContent;
  2696. children === defaultValue &&
  2697. "" !== children &&
  2698. null !== children &&
  2699. (element.value = children);
  2700. track(element);
  2701. }
  2702. function findNotableNode(node, indent) {
  2703. return void 0 === node.serverProps &&
  2704. 0 === node.serverTail.length &&
  2705. 1 === node.children.length &&
  2706. 3 < node.distanceFromLeaf &&
  2707. node.distanceFromLeaf > 15 - indent
  2708. ? findNotableNode(node.children[0], indent)
  2709. : node;
  2710. }
  2711. function indentation(indent) {
  2712. return " " + " ".repeat(indent);
  2713. }
  2714. function added(indent) {
  2715. return "+ " + " ".repeat(indent);
  2716. }
  2717. function removed(indent) {
  2718. return "- " + " ".repeat(indent);
  2719. }
  2720. function describeFiberType(fiber) {
  2721. switch (fiber.tag) {
  2722. case 26:
  2723. case 27:
  2724. case 5:
  2725. return fiber.type;
  2726. case 16:
  2727. return "Lazy";
  2728. case 31:
  2729. return "Activity";
  2730. case 13:
  2731. return "Suspense";
  2732. case 19:
  2733. return "SuspenseList";
  2734. case 0:
  2735. case 15:
  2736. return (fiber = fiber.type), fiber.displayName || fiber.name || null;
  2737. case 11:
  2738. return (
  2739. (fiber = fiber.type.render), fiber.displayName || fiber.name || null
  2740. );
  2741. case 1:
  2742. return (fiber = fiber.type), fiber.displayName || fiber.name || null;
  2743. default:
  2744. return null;
  2745. }
  2746. }
  2747. function describeTextNode(content, maxLength) {
  2748. return needsEscaping.test(content)
  2749. ? ((content = JSON.stringify(content)),
  2750. content.length > maxLength - 2
  2751. ? 8 > maxLength
  2752. ? '{"..."}'
  2753. : "{" + content.slice(0, maxLength - 7) + '..."}'
  2754. : "{" + content + "}")
  2755. : content.length > maxLength
  2756. ? 5 > maxLength
  2757. ? '{"..."}'
  2758. : content.slice(0, maxLength - 3) + "..."
  2759. : content;
  2760. }
  2761. function describeTextDiff(clientText, serverProps, indent) {
  2762. var maxLength = 120 - 2 * indent;
  2763. if (null === serverProps)
  2764. return added(indent) + describeTextNode(clientText, maxLength) + "\n";
  2765. if ("string" === typeof serverProps) {
  2766. for (
  2767. var firstDiff = 0;
  2768. firstDiff < serverProps.length &&
  2769. firstDiff < clientText.length &&
  2770. serverProps.charCodeAt(firstDiff) ===
  2771. clientText.charCodeAt(firstDiff);
  2772. firstDiff++
  2773. );
  2774. firstDiff > maxLength - 8 &&
  2775. 10 < firstDiff &&
  2776. ((clientText = "..." + clientText.slice(firstDiff - 8)),
  2777. (serverProps = "..." + serverProps.slice(firstDiff - 8)));
  2778. return (
  2779. added(indent) +
  2780. describeTextNode(clientText, maxLength) +
  2781. "\n" +
  2782. removed(indent) +
  2783. describeTextNode(serverProps, maxLength) +
  2784. "\n"
  2785. );
  2786. }
  2787. return (
  2788. indentation(indent) + describeTextNode(clientText, maxLength) + "\n"
  2789. );
  2790. }
  2791. function objectName(object) {
  2792. return Object.prototype.toString
  2793. .call(object)
  2794. .replace(/^\[object (.*)\]$/, function (m, p0) {
  2795. return p0;
  2796. });
  2797. }
  2798. function describeValue(value, maxLength) {
  2799. switch (typeof value) {
  2800. case "string":
  2801. return (
  2802. (value = JSON.stringify(value)),
  2803. value.length > maxLength
  2804. ? 5 > maxLength
  2805. ? '"..."'
  2806. : value.slice(0, maxLength - 4) + '..."'
  2807. : value
  2808. );
  2809. case "object":
  2810. if (null === value) return "null";
  2811. if (isArrayImpl(value)) return "[...]";
  2812. if (value.$$typeof === REACT_ELEMENT_TYPE)
  2813. return (maxLength = getComponentNameFromType(value.type))
  2814. ? "<" + maxLength + ">"
  2815. : "<...>";
  2816. var name = objectName(value);
  2817. if ("Object" === name) {
  2818. name = "";
  2819. maxLength -= 2;
  2820. for (var propName in value)
  2821. if (value.hasOwnProperty(propName)) {
  2822. var jsonPropName = JSON.stringify(propName);
  2823. jsonPropName !== '"' + propName + '"' &&
  2824. (propName = jsonPropName);
  2825. maxLength -= propName.length - 2;
  2826. jsonPropName = describeValue(
  2827. value[propName],
  2828. 15 > maxLength ? maxLength : 15
  2829. );
  2830. maxLength -= jsonPropName.length;
  2831. if (0 > maxLength) {
  2832. name += "" === name ? "..." : ", ...";
  2833. break;
  2834. }
  2835. name +=
  2836. ("" === name ? "" : ",") + propName + ":" + jsonPropName;
  2837. }
  2838. return "{" + name + "}";
  2839. }
  2840. return name;
  2841. case "function":
  2842. return (maxLength = value.displayName || value.name)
  2843. ? "function " + maxLength
  2844. : "function";
  2845. default:
  2846. return String(value);
  2847. }
  2848. }
  2849. function describePropValue(value, maxLength) {
  2850. return "string" !== typeof value || needsEscaping.test(value)
  2851. ? "{" + describeValue(value, maxLength - 2) + "}"
  2852. : value.length > maxLength - 2
  2853. ? 5 > maxLength
  2854. ? '"..."'
  2855. : '"' + value.slice(0, maxLength - 5) + '..."'
  2856. : '"' + value + '"';
  2857. }
  2858. function describeExpandedElement(type, props, rowPrefix) {
  2859. var remainingRowLength = 120 - rowPrefix.length - type.length,
  2860. properties = [],
  2861. propName;
  2862. for (propName in props)
  2863. if (props.hasOwnProperty(propName) && "children" !== propName) {
  2864. var propValue = describePropValue(
  2865. props[propName],
  2866. 120 - rowPrefix.length - propName.length - 1
  2867. );
  2868. remainingRowLength -= propName.length + propValue.length + 2;
  2869. properties.push(propName + "=" + propValue);
  2870. }
  2871. return 0 === properties.length
  2872. ? rowPrefix + "<" + type + ">\n"
  2873. : 0 < remainingRowLength
  2874. ? rowPrefix + "<" + type + " " + properties.join(" ") + ">\n"
  2875. : rowPrefix +
  2876. "<" +
  2877. type +
  2878. "\n" +
  2879. rowPrefix +
  2880. " " +
  2881. properties.join("\n" + rowPrefix + " ") +
  2882. "\n" +
  2883. rowPrefix +
  2884. ">\n";
  2885. }
  2886. function describePropertiesDiff(clientObject, serverObject, indent) {
  2887. var properties = "",
  2888. remainingServerProperties = assign({}, serverObject),
  2889. propName;
  2890. for (propName in clientObject)
  2891. if (clientObject.hasOwnProperty(propName)) {
  2892. delete remainingServerProperties[propName];
  2893. var maxLength = 120 - 2 * indent - propName.length - 2,
  2894. clientPropValue = describeValue(clientObject[propName], maxLength);
  2895. serverObject.hasOwnProperty(propName)
  2896. ? ((maxLength = describeValue(serverObject[propName], maxLength)),
  2897. (properties +=
  2898. added(indent) + propName + ": " + clientPropValue + "\n"),
  2899. (properties +=
  2900. removed(indent) + propName + ": " + maxLength + "\n"))
  2901. : (properties +=
  2902. added(indent) + propName + ": " + clientPropValue + "\n");
  2903. }
  2904. for (var _propName in remainingServerProperties)
  2905. remainingServerProperties.hasOwnProperty(_propName) &&
  2906. ((clientObject = describeValue(
  2907. remainingServerProperties[_propName],
  2908. 120 - 2 * indent - _propName.length - 2
  2909. )),
  2910. (properties +=
  2911. removed(indent) + _propName + ": " + clientObject + "\n"));
  2912. return properties;
  2913. }
  2914. function describeElementDiff(type, clientProps, serverProps, indent) {
  2915. var content = "",
  2916. serverPropNames = new Map();
  2917. for (propName$jscomp$0 in serverProps)
  2918. serverProps.hasOwnProperty(propName$jscomp$0) &&
  2919. serverPropNames.set(
  2920. propName$jscomp$0.toLowerCase(),
  2921. propName$jscomp$0
  2922. );
  2923. if (1 === serverPropNames.size && serverPropNames.has("children"))
  2924. content += describeExpandedElement(
  2925. type,
  2926. clientProps,
  2927. indentation(indent)
  2928. );
  2929. else {
  2930. for (var _propName2 in clientProps)
  2931. if (
  2932. clientProps.hasOwnProperty(_propName2) &&
  2933. "children" !== _propName2
  2934. ) {
  2935. var maxLength$jscomp$0 =
  2936. 120 - 2 * (indent + 1) - _propName2.length - 1,
  2937. serverPropName = serverPropNames.get(_propName2.toLowerCase());
  2938. if (void 0 !== serverPropName) {
  2939. serverPropNames.delete(_propName2.toLowerCase());
  2940. var propName$jscomp$0 = clientProps[_propName2];
  2941. serverPropName = serverProps[serverPropName];
  2942. var clientPropValue = describePropValue(
  2943. propName$jscomp$0,
  2944. maxLength$jscomp$0
  2945. );
  2946. maxLength$jscomp$0 = describePropValue(
  2947. serverPropName,
  2948. maxLength$jscomp$0
  2949. );
  2950. "object" === typeof propName$jscomp$0 &&
  2951. null !== propName$jscomp$0 &&
  2952. "object" === typeof serverPropName &&
  2953. null !== serverPropName &&
  2954. "Object" === objectName(propName$jscomp$0) &&
  2955. "Object" === objectName(serverPropName) &&
  2956. (2 < Object.keys(propName$jscomp$0).length ||
  2957. 2 < Object.keys(serverPropName).length ||
  2958. -1 < clientPropValue.indexOf("...") ||
  2959. -1 < maxLength$jscomp$0.indexOf("..."))
  2960. ? (content +=
  2961. indentation(indent + 1) +
  2962. _propName2 +
  2963. "={{\n" +
  2964. describePropertiesDiff(
  2965. propName$jscomp$0,
  2966. serverPropName,
  2967. indent + 2
  2968. ) +
  2969. indentation(indent + 1) +
  2970. "}}\n")
  2971. : ((content +=
  2972. added(indent + 1) +
  2973. _propName2 +
  2974. "=" +
  2975. clientPropValue +
  2976. "\n"),
  2977. (content +=
  2978. removed(indent + 1) +
  2979. _propName2 +
  2980. "=" +
  2981. maxLength$jscomp$0 +
  2982. "\n"));
  2983. } else
  2984. content +=
  2985. indentation(indent + 1) +
  2986. _propName2 +
  2987. "=" +
  2988. describePropValue(clientProps[_propName2], maxLength$jscomp$0) +
  2989. "\n";
  2990. }
  2991. serverPropNames.forEach(function (propName) {
  2992. if ("children" !== propName) {
  2993. var maxLength = 120 - 2 * (indent + 1) - propName.length - 1;
  2994. content +=
  2995. removed(indent + 1) +
  2996. propName +
  2997. "=" +
  2998. describePropValue(serverProps[propName], maxLength) +
  2999. "\n";
  3000. }
  3001. });
  3002. content =
  3003. "" === content
  3004. ? indentation(indent) + "<" + type + ">\n"
  3005. : indentation(indent) +
  3006. "<" +
  3007. type +
  3008. "\n" +
  3009. content +
  3010. indentation(indent) +
  3011. ">\n";
  3012. }
  3013. type = serverProps.children;
  3014. clientProps = clientProps.children;
  3015. if (
  3016. "string" === typeof type ||
  3017. "number" === typeof type ||
  3018. "bigint" === typeof type
  3019. ) {
  3020. serverPropNames = "";
  3021. if (
  3022. "string" === typeof clientProps ||
  3023. "number" === typeof clientProps ||
  3024. "bigint" === typeof clientProps
  3025. )
  3026. serverPropNames = "" + clientProps;
  3027. content += describeTextDiff(serverPropNames, "" + type, indent + 1);
  3028. } else if (
  3029. "string" === typeof clientProps ||
  3030. "number" === typeof clientProps ||
  3031. "bigint" === typeof clientProps
  3032. )
  3033. content =
  3034. null == type
  3035. ? content + describeTextDiff("" + clientProps, null, indent + 1)
  3036. : content + describeTextDiff("" + clientProps, void 0, indent + 1);
  3037. return content;
  3038. }
  3039. function describeSiblingFiber(fiber, indent) {
  3040. var type = describeFiberType(fiber);
  3041. if (null === type) {
  3042. type = "";
  3043. for (fiber = fiber.child; fiber; )
  3044. (type += describeSiblingFiber(fiber, indent)),
  3045. (fiber = fiber.sibling);
  3046. return type;
  3047. }
  3048. return indentation(indent) + "<" + type + ">\n";
  3049. }
  3050. function describeNode(node, indent) {
  3051. var skipToNode = findNotableNode(node, indent);
  3052. if (
  3053. skipToNode !== node &&
  3054. (1 !== node.children.length || node.children[0] !== skipToNode)
  3055. )
  3056. return (
  3057. indentation(indent) + "...\n" + describeNode(skipToNode, indent + 1)
  3058. );
  3059. skipToNode = "";
  3060. var debugInfo = node.fiber._debugInfo;
  3061. if (debugInfo)
  3062. for (var i = 0; i < debugInfo.length; i++) {
  3063. var serverComponentName = debugInfo[i].name;
  3064. "string" === typeof serverComponentName &&
  3065. ((skipToNode +=
  3066. indentation(indent) + "<" + serverComponentName + ">\n"),
  3067. indent++);
  3068. }
  3069. debugInfo = "";
  3070. i = node.fiber.pendingProps;
  3071. if (6 === node.fiber.tag)
  3072. (debugInfo = describeTextDiff(i, node.serverProps, indent)), indent++;
  3073. else if (
  3074. ((serverComponentName = describeFiberType(node.fiber)),
  3075. null !== serverComponentName)
  3076. )
  3077. if (void 0 === node.serverProps) {
  3078. debugInfo = indent;
  3079. var maxLength = 120 - 2 * debugInfo - serverComponentName.length - 2,
  3080. content = "";
  3081. for (propName in i)
  3082. if (i.hasOwnProperty(propName) && "children" !== propName) {
  3083. var propValue = describePropValue(i[propName], 15);
  3084. maxLength -= propName.length + propValue.length + 2;
  3085. if (0 > maxLength) {
  3086. content += " ...";
  3087. break;
  3088. }
  3089. content += " " + propName + "=" + propValue;
  3090. }
  3091. debugInfo =
  3092. indentation(debugInfo) +
  3093. "<" +
  3094. serverComponentName +
  3095. content +
  3096. ">\n";
  3097. indent++;
  3098. } else
  3099. null === node.serverProps
  3100. ? ((debugInfo = describeExpandedElement(
  3101. serverComponentName,
  3102. i,
  3103. added(indent)
  3104. )),
  3105. indent++)
  3106. : "string" === typeof node.serverProps
  3107. ? console.error(
  3108. "Should not have matched a non HostText fiber to a Text node. This is a bug in React."
  3109. )
  3110. : ((debugInfo = describeElementDiff(
  3111. serverComponentName,
  3112. i,
  3113. node.serverProps,
  3114. indent
  3115. )),
  3116. indent++);
  3117. var propName = "";
  3118. i = node.fiber.child;
  3119. for (
  3120. serverComponentName = 0;
  3121. i && serverComponentName < node.children.length;
  3122. )
  3123. (maxLength = node.children[serverComponentName]),
  3124. maxLength.fiber === i
  3125. ? ((propName += describeNode(maxLength, indent)),
  3126. serverComponentName++)
  3127. : (propName += describeSiblingFiber(i, indent)),
  3128. (i = i.sibling);
  3129. i &&
  3130. 0 < node.children.length &&
  3131. (propName += indentation(indent) + "...\n");
  3132. i = node.serverTail;
  3133. null === node.serverProps && indent--;
  3134. for (node = 0; node < i.length; node++)
  3135. (serverComponentName = i[node]),
  3136. (propName =
  3137. "string" === typeof serverComponentName
  3138. ? propName +
  3139. (removed(indent) +
  3140. describeTextNode(serverComponentName, 120 - 2 * indent) +
  3141. "\n")
  3142. : propName +
  3143. describeExpandedElement(
  3144. serverComponentName.type,
  3145. serverComponentName.props,
  3146. removed(indent)
  3147. ));
  3148. return skipToNode + debugInfo + propName;
  3149. }
  3150. function describeDiff(rootNode) {
  3151. try {
  3152. return "\n\n" + describeNode(rootNode, 0);
  3153. } catch (x) {
  3154. return "";
  3155. }
  3156. }
  3157. function describeAncestors(ancestor, child, props) {
  3158. for (var fiber = child, node = null, distanceFromLeaf = 0; fiber; )
  3159. fiber === ancestor && (distanceFromLeaf = 0),
  3160. (node = {
  3161. fiber: fiber,
  3162. children: null !== node ? [node] : [],
  3163. serverProps:
  3164. fiber === child ? props : fiber === ancestor ? null : void 0,
  3165. serverTail: [],
  3166. distanceFromLeaf: distanceFromLeaf
  3167. }),
  3168. distanceFromLeaf++,
  3169. (fiber = fiber.return);
  3170. return null !== node ? describeDiff(node).replaceAll(/^[+-]/gm, ">") : "";
  3171. }
  3172. function updatedAncestorInfoDev(oldInfo, tag) {
  3173. var ancestorInfo = assign({}, oldInfo || emptyAncestorInfoDev),
  3174. info = { tag: tag };
  3175. -1 !== inScopeTags.indexOf(tag) &&
  3176. ((ancestorInfo.aTagInScope = null),
  3177. (ancestorInfo.buttonTagInScope = null),
  3178. (ancestorInfo.nobrTagInScope = null));
  3179. -1 !== buttonScopeTags.indexOf(tag) &&
  3180. (ancestorInfo.pTagInButtonScope = null);
  3181. -1 !== specialTags.indexOf(tag) &&
  3182. "address" !== tag &&
  3183. "div" !== tag &&
  3184. "p" !== tag &&
  3185. ((ancestorInfo.listItemTagAutoclosing = null),
  3186. (ancestorInfo.dlItemTagAutoclosing = null));
  3187. ancestorInfo.current = info;
  3188. "form" === tag && (ancestorInfo.formTag = info);
  3189. "a" === tag && (ancestorInfo.aTagInScope = info);
  3190. "button" === tag && (ancestorInfo.buttonTagInScope = info);
  3191. "nobr" === tag && (ancestorInfo.nobrTagInScope = info);
  3192. "p" === tag && (ancestorInfo.pTagInButtonScope = info);
  3193. "li" === tag && (ancestorInfo.listItemTagAutoclosing = info);
  3194. if ("dd" === tag || "dt" === tag)
  3195. ancestorInfo.dlItemTagAutoclosing = info;
  3196. "#document" === tag || "html" === tag
  3197. ? (ancestorInfo.containerTagInScope = null)
  3198. : ancestorInfo.containerTagInScope ||
  3199. (ancestorInfo.containerTagInScope = info);
  3200. null !== oldInfo ||
  3201. ("#document" !== tag && "html" !== tag && "body" !== tag)
  3202. ? true === ancestorInfo.implicitRootScope &&
  3203. (ancestorInfo.implicitRootScope = false)
  3204. : (ancestorInfo.implicitRootScope = true);
  3205. return ancestorInfo;
  3206. }
  3207. function isTagValidWithParent(tag, parentTag, implicitRootScope) {
  3208. switch (parentTag) {
  3209. case "select":
  3210. return (
  3211. "hr" === tag ||
  3212. "option" === tag ||
  3213. "optgroup" === tag ||
  3214. "script" === tag ||
  3215. "template" === tag ||
  3216. "#text" === tag
  3217. );
  3218. case "optgroup":
  3219. return "option" === tag || "#text" === tag;
  3220. case "option":
  3221. return "#text" === tag;
  3222. case "tr":
  3223. return (
  3224. "th" === tag ||
  3225. "td" === tag ||
  3226. "style" === tag ||
  3227. "script" === tag ||
  3228. "template" === tag
  3229. );
  3230. case "tbody":
  3231. case "thead":
  3232. case "tfoot":
  3233. return (
  3234. "tr" === tag ||
  3235. "style" === tag ||
  3236. "script" === tag ||
  3237. "template" === tag
  3238. );
  3239. case "colgroup":
  3240. return "col" === tag || "template" === tag;
  3241. case "table":
  3242. return (
  3243. "caption" === tag ||
  3244. "colgroup" === tag ||
  3245. "tbody" === tag ||
  3246. "tfoot" === tag ||
  3247. "thead" === tag ||
  3248. "style" === tag ||
  3249. "script" === tag ||
  3250. "template" === tag
  3251. );
  3252. case "head":
  3253. return (
  3254. "base" === tag ||
  3255. "basefont" === tag ||
  3256. "bgsound" === tag ||
  3257. "link" === tag ||
  3258. "meta" === tag ||
  3259. "title" === tag ||
  3260. "noscript" === tag ||
  3261. "noframes" === tag ||
  3262. "style" === tag ||
  3263. "script" === tag ||
  3264. "template" === tag
  3265. );
  3266. case "html":
  3267. if (implicitRootScope) break;
  3268. return "head" === tag || "body" === tag || "frameset" === tag;
  3269. case "frameset":
  3270. return "frame" === tag;
  3271. case "#document":
  3272. if (!implicitRootScope) return "html" === tag;
  3273. }
  3274. switch (tag) {
  3275. case "h1":
  3276. case "h2":
  3277. case "h3":
  3278. case "h4":
  3279. case "h5":
  3280. case "h6":
  3281. return (
  3282. "h1" !== parentTag &&
  3283. "h2" !== parentTag &&
  3284. "h3" !== parentTag &&
  3285. "h4" !== parentTag &&
  3286. "h5" !== parentTag &&
  3287. "h6" !== parentTag
  3288. );
  3289. case "rp":
  3290. case "rt":
  3291. return -1 === impliedEndTags.indexOf(parentTag);
  3292. case "caption":
  3293. case "col":
  3294. case "colgroup":
  3295. case "frameset":
  3296. case "frame":
  3297. case "tbody":
  3298. case "td":
  3299. case "tfoot":
  3300. case "th":
  3301. case "thead":
  3302. case "tr":
  3303. return null == parentTag;
  3304. case "head":
  3305. return implicitRootScope || null === parentTag;
  3306. case "html":
  3307. return (
  3308. (implicitRootScope && "#document" === parentTag) ||
  3309. null === parentTag
  3310. );
  3311. case "body":
  3312. return (
  3313. (implicitRootScope &&
  3314. ("#document" === parentTag || "html" === parentTag)) ||
  3315. null === parentTag
  3316. );
  3317. }
  3318. return true;
  3319. }
  3320. function findInvalidAncestorForTag(tag, ancestorInfo) {
  3321. switch (tag) {
  3322. case "address":
  3323. case "article":
  3324. case "aside":
  3325. case "blockquote":
  3326. case "center":
  3327. case "details":
  3328. case "dialog":
  3329. case "dir":
  3330. case "div":
  3331. case "dl":
  3332. case "fieldset":
  3333. case "figcaption":
  3334. case "figure":
  3335. case "footer":
  3336. case "header":
  3337. case "hgroup":
  3338. case "main":
  3339. case "menu":
  3340. case "nav":
  3341. case "ol":
  3342. case "p":
  3343. case "section":
  3344. case "summary":
  3345. case "ul":
  3346. case "pre":
  3347. case "listing":
  3348. case "table":
  3349. case "hr":
  3350. case "xmp":
  3351. case "h1":
  3352. case "h2":
  3353. case "h3":
  3354. case "h4":
  3355. case "h5":
  3356. case "h6":
  3357. return ancestorInfo.pTagInButtonScope;
  3358. case "form":
  3359. return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
  3360. case "li":
  3361. return ancestorInfo.listItemTagAutoclosing;
  3362. case "dd":
  3363. case "dt":
  3364. return ancestorInfo.dlItemTagAutoclosing;
  3365. case "button":
  3366. return ancestorInfo.buttonTagInScope;
  3367. case "a":
  3368. return ancestorInfo.aTagInScope;
  3369. case "nobr":
  3370. return ancestorInfo.nobrTagInScope;
  3371. }
  3372. return null;
  3373. }
  3374. function findAncestor(parent, tagName) {
  3375. for (; parent; ) {
  3376. switch (parent.tag) {
  3377. case 5:
  3378. case 26:
  3379. case 27:
  3380. if (parent.type === tagName) return parent;
  3381. }
  3382. parent = parent.return;
  3383. }
  3384. return null;
  3385. }
  3386. function validateDOMNesting(childTag, ancestorInfo) {
  3387. ancestorInfo = ancestorInfo || emptyAncestorInfoDev;
  3388. var parentInfo = ancestorInfo.current;
  3389. ancestorInfo = (parentInfo = isTagValidWithParent(
  3390. childTag,
  3391. parentInfo && parentInfo.tag,
  3392. ancestorInfo.implicitRootScope
  3393. )
  3394. ? null
  3395. : parentInfo)
  3396. ? null
  3397. : findInvalidAncestorForTag(childTag, ancestorInfo);
  3398. ancestorInfo = parentInfo || ancestorInfo;
  3399. if (!ancestorInfo) return true;
  3400. var ancestorTag = ancestorInfo.tag;
  3401. ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag;
  3402. if (didWarn[ancestorInfo]) return false;
  3403. didWarn[ancestorInfo] = true;
  3404. var ancestor = (ancestorInfo = current)
  3405. ? findAncestor(ancestorInfo.return, ancestorTag)
  3406. : null,
  3407. ancestorDescription =
  3408. null !== ancestorInfo && null !== ancestor
  3409. ? describeAncestors(ancestor, ancestorInfo, null)
  3410. : "",
  3411. tagDisplayName = "<" + childTag + ">";
  3412. parentInfo
  3413. ? ((parentInfo = ""),
  3414. "table" === ancestorTag &&
  3415. "tr" === childTag &&
  3416. (parentInfo +=
  3417. " Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),
  3418. console.error(
  3419. "In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s",
  3420. tagDisplayName,
  3421. ancestorTag,
  3422. parentInfo,
  3423. ancestorDescription
  3424. ))
  3425. : console.error(
  3426. "In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s",
  3427. tagDisplayName,
  3428. ancestorTag,
  3429. ancestorDescription
  3430. );
  3431. ancestorInfo &&
  3432. ((childTag = ancestorInfo.return),
  3433. null === ancestor ||
  3434. null === childTag ||
  3435. (ancestor === childTag &&
  3436. childTag._debugOwner === ancestorInfo._debugOwner) ||
  3437. runWithFiberInDEV(ancestor, function () {
  3438. console.error(
  3439. "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.",
  3440. ancestorTag,
  3441. tagDisplayName
  3442. );
  3443. }));
  3444. return false;
  3445. }
  3446. function validateTextNesting(childText, parentTag, implicitRootScope) {
  3447. if (implicitRootScope || isTagValidWithParent("#text", parentTag, false))
  3448. return true;
  3449. implicitRootScope = "#text|" + parentTag;
  3450. if (didWarn[implicitRootScope]) return false;
  3451. didWarn[implicitRootScope] = true;
  3452. var ancestor = (implicitRootScope = current)
  3453. ? findAncestor(implicitRootScope, parentTag)
  3454. : null;
  3455. implicitRootScope =
  3456. null !== implicitRootScope && null !== ancestor
  3457. ? describeAncestors(
  3458. ancestor,
  3459. implicitRootScope,
  3460. 6 !== implicitRootScope.tag ? { children: null } : null
  3461. )
  3462. : "";
  3463. /\S/.test(childText)
  3464. ? console.error(
  3465. "In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.%s",
  3466. parentTag,
  3467. implicitRootScope
  3468. )
  3469. : console.error(
  3470. "In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.%s",
  3471. parentTag,
  3472. implicitRootScope
  3473. );
  3474. return false;
  3475. }
  3476. function setTextContent(node, text) {
  3477. if (text) {
  3478. var firstChild = node.firstChild;
  3479. if (
  3480. firstChild &&
  3481. firstChild === node.lastChild &&
  3482. 3 === firstChild.nodeType
  3483. ) {
  3484. firstChild.nodeValue = text;
  3485. return;
  3486. }
  3487. }
  3488. node.textContent = text;
  3489. }
  3490. function camelize(string) {
  3491. return string.replace(hyphenPattern, function (_, character) {
  3492. return character.toUpperCase();
  3493. });
  3494. }
  3495. function setValueForStyle(style, styleName, value) {
  3496. var isCustomProperty = 0 === styleName.indexOf("--");
  3497. isCustomProperty ||
  3498. (-1 < styleName.indexOf("-")
  3499. ? (warnedStyleNames.hasOwnProperty(styleName) &&
  3500. warnedStyleNames[styleName]) ||
  3501. ((warnedStyleNames[styleName] = true),
  3502. console.error(
  3503. "Unsupported style property %s. Did you mean %s?",
  3504. styleName,
  3505. camelize(styleName.replace(msPattern, "ms-"))
  3506. ))
  3507. : badVendoredStyleNamePattern.test(styleName)
  3508. ? (warnedStyleNames.hasOwnProperty(styleName) &&
  3509. warnedStyleNames[styleName]) ||
  3510. ((warnedStyleNames[styleName] = true),
  3511. console.error(
  3512. "Unsupported vendor-prefixed style property %s. Did you mean %s?",
  3513. styleName,
  3514. styleName.charAt(0).toUpperCase() + styleName.slice(1)
  3515. ))
  3516. : !badStyleValueWithSemicolonPattern.test(value) ||
  3517. (warnedStyleValues.hasOwnProperty(value) &&
  3518. warnedStyleValues[value]) ||
  3519. ((warnedStyleValues[value] = true),
  3520. console.error(
  3521. 'Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',
  3522. styleName,
  3523. value.replace(badStyleValueWithSemicolonPattern, "")
  3524. )),
  3525. "number" === typeof value &&
  3526. (isNaN(value)
  3527. ? warnedForNaNValue ||
  3528. ((warnedForNaNValue = true),
  3529. console.error(
  3530. "`NaN` is an invalid value for the `%s` css style property.",
  3531. styleName
  3532. ))
  3533. : isFinite(value) ||
  3534. warnedForInfinityValue ||
  3535. ((warnedForInfinityValue = true),
  3536. console.error(
  3537. "`Infinity` is an invalid value for the `%s` css style property.",
  3538. styleName
  3539. ))));
  3540. null == value || "boolean" === typeof value || "" === value
  3541. ? isCustomProperty
  3542. ? style.setProperty(styleName, "")
  3543. : "float" === styleName
  3544. ? (style.cssFloat = "")
  3545. : (style[styleName] = "")
  3546. : isCustomProperty
  3547. ? style.setProperty(styleName, value)
  3548. : "number" !== typeof value ||
  3549. 0 === value ||
  3550. unitlessNumbers.has(styleName)
  3551. ? "float" === styleName
  3552. ? (style.cssFloat = value)
  3553. : (checkCSSPropertyStringCoercion(value, styleName),
  3554. (style[styleName] = ("" + value).trim()))
  3555. : (style[styleName] = value + "px");
  3556. }
  3557. function setValueForStyles(node, styles, prevStyles) {
  3558. if (null != styles && "object" !== typeof styles)
  3559. throw Error(
  3560. "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
  3561. );
  3562. styles && Object.freeze(styles);
  3563. node = node.style;
  3564. if (null != prevStyles) {
  3565. if (styles) {
  3566. var expandedUpdates = {};
  3567. if (prevStyles)
  3568. for (var key in prevStyles)
  3569. if (prevStyles.hasOwnProperty(key) && !styles.hasOwnProperty(key))
  3570. for (
  3571. var longhands = shorthandToLonghand[key] || [key], i = 0;
  3572. i < longhands.length;
  3573. i++
  3574. )
  3575. expandedUpdates[longhands[i]] = key;
  3576. for (var _key in styles)
  3577. if (
  3578. styles.hasOwnProperty(_key) &&
  3579. (!prevStyles || prevStyles[_key] !== styles[_key])
  3580. )
  3581. for (
  3582. key = shorthandToLonghand[_key] || [_key], longhands = 0;
  3583. longhands < key.length;
  3584. longhands++
  3585. )
  3586. expandedUpdates[key[longhands]] = _key;
  3587. _key = {};
  3588. for (var key$jscomp$0 in styles)
  3589. for (
  3590. key = shorthandToLonghand[key$jscomp$0] || [key$jscomp$0],
  3591. longhands = 0;
  3592. longhands < key.length;
  3593. longhands++
  3594. )
  3595. _key[key[longhands]] = key$jscomp$0;
  3596. key$jscomp$0 = {};
  3597. for (var _key2 in expandedUpdates)
  3598. if (
  3599. ((key = expandedUpdates[_key2]),
  3600. (longhands = _key[_key2]) &&
  3601. key !== longhands &&
  3602. ((i = key + "," + longhands), !key$jscomp$0[i]))
  3603. ) {
  3604. key$jscomp$0[i] = true;
  3605. i = console;
  3606. var value = styles[key];
  3607. i.error.call(
  3608. i,
  3609. "%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",
  3610. null == value || "boolean" === typeof value || "" === value
  3611. ? "Removing"
  3612. : "Updating",
  3613. key,
  3614. longhands
  3615. );
  3616. }
  3617. }
  3618. for (var styleName in prevStyles)
  3619. !prevStyles.hasOwnProperty(styleName) ||
  3620. (null != styles && styles.hasOwnProperty(styleName)) ||
  3621. (0 === styleName.indexOf("--")
  3622. ? node.setProperty(styleName, "")
  3623. : "float" === styleName
  3624. ? (node.cssFloat = "")
  3625. : (node[styleName] = ""));
  3626. for (var _styleName in styles)
  3627. (_key2 = styles[_styleName]),
  3628. styles.hasOwnProperty(_styleName) &&
  3629. prevStyles[_styleName] !== _key2 &&
  3630. setValueForStyle(node, _styleName, _key2);
  3631. } else
  3632. for (expandedUpdates in styles)
  3633. styles.hasOwnProperty(expandedUpdates) &&
  3634. setValueForStyle(node, expandedUpdates, styles[expandedUpdates]);
  3635. }
  3636. function isCustomElement(tagName) {
  3637. if (-1 === tagName.indexOf("-")) return false;
  3638. switch (tagName) {
  3639. case "annotation-xml":
  3640. case "color-profile":
  3641. case "font-face":
  3642. case "font-face-src":
  3643. case "font-face-uri":
  3644. case "font-face-format":
  3645. case "font-face-name":
  3646. case "missing-glyph":
  3647. return false;
  3648. default:
  3649. return true;
  3650. }
  3651. }
  3652. function getAttributeAlias(name) {
  3653. return aliases.get(name) || name;
  3654. }
  3655. function validateProperty$1(tagName, name) {
  3656. if (
  3657. hasOwnProperty.call(warnedProperties$1, name) &&
  3658. warnedProperties$1[name]
  3659. )
  3660. return true;
  3661. if (rARIACamel$1.test(name)) {
  3662. tagName = "aria-" + name.slice(4).toLowerCase();
  3663. tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
  3664. if (null == tagName)
  3665. return (
  3666. console.error(
  3667. "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",
  3668. name
  3669. ),
  3670. (warnedProperties$1[name] = true)
  3671. );
  3672. if (name !== tagName)
  3673. return (
  3674. console.error(
  3675. "Invalid ARIA attribute `%s`. Did you mean `%s`?",
  3676. name,
  3677. tagName
  3678. ),
  3679. (warnedProperties$1[name] = true)
  3680. );
  3681. }
  3682. if (rARIA$1.test(name)) {
  3683. tagName = name.toLowerCase();
  3684. tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
  3685. if (null == tagName) return (warnedProperties$1[name] = true), false;
  3686. name !== tagName &&
  3687. (console.error(
  3688. "Unknown ARIA attribute `%s`. Did you mean `%s`?",
  3689. name,
  3690. tagName
  3691. ),
  3692. (warnedProperties$1[name] = true));
  3693. }
  3694. return true;
  3695. }
  3696. function validateProperties$2(type, props) {
  3697. var invalidProps = [],
  3698. key;
  3699. for (key in props)
  3700. validateProperty$1(type, key) || invalidProps.push(key);
  3701. props = invalidProps
  3702. .map(function (prop) {
  3703. return "`" + prop + "`";
  3704. })
  3705. .join(", ");
  3706. 1 === invalidProps.length
  3707. ? console.error(
  3708. "Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
  3709. props,
  3710. type
  3711. )
  3712. : 1 < invalidProps.length &&
  3713. console.error(
  3714. "Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
  3715. props,
  3716. type
  3717. );
  3718. }
  3719. function validateProperty(tagName, name, value, eventRegistry) {
  3720. if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])
  3721. return true;
  3722. var lowerCasedName = name.toLowerCase();
  3723. if ("onfocusin" === lowerCasedName || "onfocusout" === lowerCasedName)
  3724. return (
  3725. console.error(
  3726. "React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."
  3727. ),
  3728. (warnedProperties[name] = true)
  3729. );
  3730. if (
  3731. "function" === typeof value &&
  3732. (("form" === tagName && "action" === name) ||
  3733. ("input" === tagName && "formAction" === name) ||
  3734. ("button" === tagName && "formAction" === name))
  3735. )
  3736. return true;
  3737. if (null != eventRegistry) {
  3738. tagName = eventRegistry.possibleRegistrationNames;
  3739. if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))
  3740. return true;
  3741. eventRegistry = tagName.hasOwnProperty(lowerCasedName)
  3742. ? tagName[lowerCasedName]
  3743. : null;
  3744. if (null != eventRegistry)
  3745. return (
  3746. console.error(
  3747. "Invalid event handler property `%s`. Did you mean `%s`?",
  3748. name,
  3749. eventRegistry
  3750. ),
  3751. (warnedProperties[name] = true)
  3752. );
  3753. if (EVENT_NAME_REGEX.test(name))
  3754. return (
  3755. console.error(
  3756. "Unknown event handler property `%s`. It will be ignored.",
  3757. name
  3758. ),
  3759. (warnedProperties[name] = true)
  3760. );
  3761. } else if (EVENT_NAME_REGEX.test(name))
  3762. return (
  3763. INVALID_EVENT_NAME_REGEX.test(name) &&
  3764. console.error(
  3765. "Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",
  3766. name
  3767. ),
  3768. (warnedProperties[name] = true)
  3769. );
  3770. if (rARIA.test(name) || rARIACamel.test(name)) return true;
  3771. if ("innerhtml" === lowerCasedName)
  3772. return (
  3773. console.error(
  3774. "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."
  3775. ),
  3776. (warnedProperties[name] = true)
  3777. );
  3778. if ("aria" === lowerCasedName)
  3779. return (
  3780. console.error(
  3781. "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."
  3782. ),
  3783. (warnedProperties[name] = true)
  3784. );
  3785. if (
  3786. "is" === lowerCasedName &&
  3787. null !== value &&
  3788. void 0 !== value &&
  3789. "string" !== typeof value
  3790. )
  3791. return (
  3792. console.error(
  3793. "Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",
  3794. typeof value
  3795. ),
  3796. (warnedProperties[name] = true)
  3797. );
  3798. if ("number" === typeof value && isNaN(value))
  3799. return (
  3800. console.error(
  3801. "Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",
  3802. name
  3803. ),
  3804. (warnedProperties[name] = true)
  3805. );
  3806. if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
  3807. if (
  3808. ((lowerCasedName = possibleStandardNames[lowerCasedName]),
  3809. lowerCasedName !== name)
  3810. )
  3811. return (
  3812. console.error(
  3813. "Invalid DOM property `%s`. Did you mean `%s`?",
  3814. name,
  3815. lowerCasedName
  3816. ),
  3817. (warnedProperties[name] = true)
  3818. );
  3819. } else if (name !== lowerCasedName)
  3820. return (
  3821. console.error(
  3822. "React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",
  3823. name,
  3824. lowerCasedName
  3825. ),
  3826. (warnedProperties[name] = true)
  3827. );
  3828. switch (name) {
  3829. case "dangerouslySetInnerHTML":
  3830. case "children":
  3831. case "style":
  3832. case "suppressContentEditableWarning":
  3833. case "suppressHydrationWarning":
  3834. case "defaultValue":
  3835. case "defaultChecked":
  3836. case "innerHTML":
  3837. case "ref":
  3838. return true;
  3839. case "innerText":
  3840. case "textContent":
  3841. return true;
  3842. }
  3843. switch (typeof value) {
  3844. case "boolean":
  3845. switch (name) {
  3846. case "autoFocus":
  3847. case "checked":
  3848. case "multiple":
  3849. case "muted":
  3850. case "selected":
  3851. case "contentEditable":
  3852. case "spellCheck":
  3853. case "draggable":
  3854. case "value":
  3855. case "autoReverse":
  3856. case "externalResourcesRequired":
  3857. case "focusable":
  3858. case "preserveAlpha":
  3859. case "allowFullScreen":
  3860. case "async":
  3861. case "autoPlay":
  3862. case "controls":
  3863. case "default":
  3864. case "defer":
  3865. case "disabled":
  3866. case "disablePictureInPicture":
  3867. case "disableRemotePlayback":
  3868. case "formNoValidate":
  3869. case "hidden":
  3870. case "loop":
  3871. case "noModule":
  3872. case "noValidate":
  3873. case "open":
  3874. case "playsInline":
  3875. case "readOnly":
  3876. case "required":
  3877. case "reversed":
  3878. case "scoped":
  3879. case "seamless":
  3880. case "itemScope":
  3881. case "capture":
  3882. case "download":
  3883. case "inert":
  3884. return true;
  3885. default:
  3886. lowerCasedName = name.toLowerCase().slice(0, 5);
  3887. if ("data-" === lowerCasedName || "aria-" === lowerCasedName)
  3888. return true;
  3889. value
  3890. ? console.error(
  3891. 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',
  3892. value,
  3893. name,
  3894. name,
  3895. value,
  3896. name
  3897. )
  3898. : console.error(
  3899. 'Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',
  3900. value,
  3901. name,
  3902. name,
  3903. value,
  3904. name,
  3905. name,
  3906. name
  3907. );
  3908. return (warnedProperties[name] = true);
  3909. }
  3910. case "function":
  3911. case "symbol":
  3912. return (warnedProperties[name] = true), false;
  3913. case "string":
  3914. if ("false" === value || "true" === value) {
  3915. switch (name) {
  3916. case "checked":
  3917. case "selected":
  3918. case "multiple":
  3919. case "muted":
  3920. case "allowFullScreen":
  3921. case "async":
  3922. case "autoPlay":
  3923. case "controls":
  3924. case "default":
  3925. case "defer":
  3926. case "disabled":
  3927. case "disablePictureInPicture":
  3928. case "disableRemotePlayback":
  3929. case "formNoValidate":
  3930. case "hidden":
  3931. case "loop":
  3932. case "noModule":
  3933. case "noValidate":
  3934. case "open":
  3935. case "playsInline":
  3936. case "readOnly":
  3937. case "required":
  3938. case "reversed":
  3939. case "scoped":
  3940. case "seamless":
  3941. case "itemScope":
  3942. case "inert":
  3943. break;
  3944. default:
  3945. return true;
  3946. }
  3947. console.error(
  3948. "Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",
  3949. value,
  3950. name,
  3951. "false" === value
  3952. ? "The browser will interpret it as a truthy value."
  3953. : 'Although this works, it will not work as expected if you pass the string "false".',
  3954. name,
  3955. value
  3956. );
  3957. warnedProperties[name] = true;
  3958. }
  3959. }
  3960. return true;
  3961. }
  3962. function warnUnknownProperties(type, props, eventRegistry) {
  3963. var unknownProps = [],
  3964. key;
  3965. for (key in props)
  3966. validateProperty(type, key, props[key], eventRegistry) ||
  3967. unknownProps.push(key);
  3968. props = unknownProps
  3969. .map(function (prop) {
  3970. return "`" + prop + "`";
  3971. })
  3972. .join(", ");
  3973. 1 === unknownProps.length
  3974. ? console.error(
  3975. "Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",
  3976. props,
  3977. type
  3978. )
  3979. : 1 < unknownProps.length &&
  3980. console.error(
  3981. "Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",
  3982. props,
  3983. type
  3984. );
  3985. }
  3986. function sanitizeURL(url) {
  3987. return isJavaScriptProtocol.test("" + url)
  3988. ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"
  3989. : url;
  3990. }
  3991. function noop$1() {}
  3992. function getEventTarget(nativeEvent) {
  3993. nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;
  3994. nativeEvent.correspondingUseElement &&
  3995. (nativeEvent = nativeEvent.correspondingUseElement);
  3996. return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;
  3997. }
  3998. function restoreStateOfTarget(target) {
  3999. var internalInstance = getInstanceFromNode(target);
  4000. if (internalInstance && (target = internalInstance.stateNode)) {
  4001. var props = target[internalPropsKey] || null;
  4002. a: switch (
  4003. ((target = internalInstance.stateNode), internalInstance.type)
  4004. ) {
  4005. case "input":
  4006. updateInput(
  4007. target,
  4008. props.value,
  4009. props.defaultValue,
  4010. props.defaultValue,
  4011. props.checked,
  4012. props.defaultChecked,
  4013. props.type,
  4014. props.name
  4015. );
  4016. internalInstance = props.name;
  4017. if ("radio" === props.type && null != internalInstance) {
  4018. for (props = target; props.parentNode; ) props = props.parentNode;
  4019. checkAttributeStringCoercion(internalInstance, "name");
  4020. props = props.querySelectorAll(
  4021. 'input[name="' +
  4022. escapeSelectorAttributeValueInsideDoubleQuotes(
  4023. "" + internalInstance
  4024. ) +
  4025. '"][type="radio"]'
  4026. );
  4027. for (
  4028. internalInstance = 0;
  4029. internalInstance < props.length;
  4030. internalInstance++
  4031. ) {
  4032. var otherNode = props[internalInstance];
  4033. if (otherNode !== target && otherNode.form === target.form) {
  4034. var otherProps = otherNode[internalPropsKey] || null;
  4035. if (!otherProps)
  4036. throw Error(
  4037. "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."
  4038. );
  4039. updateInput(
  4040. otherNode,
  4041. otherProps.value,
  4042. otherProps.defaultValue,
  4043. otherProps.defaultValue,
  4044. otherProps.checked,
  4045. otherProps.defaultChecked,
  4046. otherProps.type,
  4047. otherProps.name
  4048. );
  4049. }
  4050. }
  4051. for (
  4052. internalInstance = 0;
  4053. internalInstance < props.length;
  4054. internalInstance++
  4055. )
  4056. (otherNode = props[internalInstance]),
  4057. otherNode.form === target.form &&
  4058. updateValueIfChanged(otherNode);
  4059. }
  4060. break a;
  4061. case "textarea":
  4062. updateTextarea(target, props.value, props.defaultValue);
  4063. break a;
  4064. case "select":
  4065. (internalInstance = props.value),
  4066. null != internalInstance &&
  4067. updateOptions(target, !!props.multiple, internalInstance, false);
  4068. }
  4069. }
  4070. }
  4071. function batchedUpdates$1(fn, a, b) {
  4072. if (isInsideEventHandler) return fn(a, b);
  4073. isInsideEventHandler = true;
  4074. try {
  4075. var JSCompiler_inline_result = fn(a);
  4076. return JSCompiler_inline_result;
  4077. } finally {
  4078. if (
  4079. ((isInsideEventHandler = false),
  4080. null !== restoreTarget || null !== restoreQueue)
  4081. )
  4082. if (
  4083. (flushSyncWork$1(),
  4084. restoreTarget &&
  4085. ((a = restoreTarget),
  4086. (fn = restoreQueue),
  4087. (restoreQueue = restoreTarget = null),
  4088. restoreStateOfTarget(a),
  4089. fn))
  4090. )
  4091. for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
  4092. }
  4093. }
  4094. function getListener(inst, registrationName) {
  4095. var stateNode = inst.stateNode;
  4096. if (null === stateNode) return null;
  4097. var props = stateNode[internalPropsKey] || null;
  4098. if (null === props) return null;
  4099. stateNode = props[registrationName];
  4100. a: switch (registrationName) {
  4101. case "onClick":
  4102. case "onClickCapture":
  4103. case "onDoubleClick":
  4104. case "onDoubleClickCapture":
  4105. case "onMouseDown":
  4106. case "onMouseDownCapture":
  4107. case "onMouseMove":
  4108. case "onMouseMoveCapture":
  4109. case "onMouseUp":
  4110. case "onMouseUpCapture":
  4111. case "onMouseEnter":
  4112. (props = !props.disabled) ||
  4113. ((inst = inst.type),
  4114. (props = !(
  4115. "button" === inst ||
  4116. "input" === inst ||
  4117. "select" === inst ||
  4118. "textarea" === inst
  4119. )));
  4120. inst = !props;
  4121. break a;
  4122. default:
  4123. inst = false;
  4124. }
  4125. if (inst) return null;
  4126. if (stateNode && "function" !== typeof stateNode)
  4127. throw Error(
  4128. "Expected `" +
  4129. registrationName +
  4130. "` listener to be a function, instead got a value of `" +
  4131. typeof stateNode +
  4132. "` type."
  4133. );
  4134. return stateNode;
  4135. }
  4136. function getData() {
  4137. if (fallbackText) return fallbackText;
  4138. var start,
  4139. startValue = startText,
  4140. startLength = startValue.length,
  4141. end,
  4142. endValue = "value" in root ? root.value : root.textContent,
  4143. endLength = endValue.length;
  4144. for (
  4145. start = 0;
  4146. start < startLength && startValue[start] === endValue[start];
  4147. start++
  4148. );
  4149. var minEnd = startLength - start;
  4150. for (
  4151. end = 1;
  4152. end <= minEnd &&
  4153. startValue[startLength - end] === endValue[endLength - end];
  4154. end++
  4155. );
  4156. return (fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0));
  4157. }
  4158. function getEventCharCode(nativeEvent) {
  4159. var keyCode = nativeEvent.keyCode;
  4160. "charCode" in nativeEvent
  4161. ? ((nativeEvent = nativeEvent.charCode),
  4162. 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13))
  4163. : (nativeEvent = keyCode);
  4164. 10 === nativeEvent && (nativeEvent = 13);
  4165. return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;
  4166. }
  4167. function functionThatReturnsTrue() {
  4168. return true;
  4169. }
  4170. function functionThatReturnsFalse() {
  4171. return false;
  4172. }
  4173. function createSyntheticEvent(Interface) {
  4174. function SyntheticBaseEvent(
  4175. reactName,
  4176. reactEventType,
  4177. targetInst,
  4178. nativeEvent,
  4179. nativeEventTarget
  4180. ) {
  4181. this._reactName = reactName;
  4182. this._targetInst = targetInst;
  4183. this.type = reactEventType;
  4184. this.nativeEvent = nativeEvent;
  4185. this.target = nativeEventTarget;
  4186. this.currentTarget = null;
  4187. for (var propName in Interface)
  4188. Interface.hasOwnProperty(propName) &&
  4189. ((reactName = Interface[propName]),
  4190. (this[propName] = reactName
  4191. ? reactName(nativeEvent)
  4192. : nativeEvent[propName]));
  4193. this.isDefaultPrevented = (
  4194. null != nativeEvent.defaultPrevented
  4195. ? nativeEvent.defaultPrevented
  4196. : false === nativeEvent.returnValue
  4197. )
  4198. ? functionThatReturnsTrue
  4199. : functionThatReturnsFalse;
  4200. this.isPropagationStopped = functionThatReturnsFalse;
  4201. return this;
  4202. }
  4203. assign(SyntheticBaseEvent.prototype, {
  4204. preventDefault: function () {
  4205. this.defaultPrevented = true;
  4206. var event = this.nativeEvent;
  4207. event &&
  4208. (event.preventDefault
  4209. ? event.preventDefault()
  4210. : "unknown" !== typeof event.returnValue &&
  4211. (event.returnValue = false),
  4212. (this.isDefaultPrevented = functionThatReturnsTrue));
  4213. },
  4214. stopPropagation: function () {
  4215. var event = this.nativeEvent;
  4216. event &&
  4217. (event.stopPropagation
  4218. ? event.stopPropagation()
  4219. : "unknown" !== typeof event.cancelBubble &&
  4220. (event.cancelBubble = true),
  4221. (this.isPropagationStopped = functionThatReturnsTrue));
  4222. },
  4223. persist: function () {},
  4224. isPersistent: functionThatReturnsTrue
  4225. });
  4226. return SyntheticBaseEvent;
  4227. }
  4228. function modifierStateGetter(keyArg) {
  4229. var nativeEvent = this.nativeEvent;
  4230. return nativeEvent.getModifierState
  4231. ? nativeEvent.getModifierState(keyArg)
  4232. : (keyArg = modifierKeyToProp[keyArg])
  4233. ? !!nativeEvent[keyArg]
  4234. : false;
  4235. }
  4236. function getEventModifierState() {
  4237. return modifierStateGetter;
  4238. }
  4239. function isFallbackCompositionEnd(domEventName, nativeEvent) {
  4240. switch (domEventName) {
  4241. case "keyup":
  4242. return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
  4243. case "keydown":
  4244. return nativeEvent.keyCode !== START_KEYCODE;
  4245. case "keypress":
  4246. case "mousedown":
  4247. case "focusout":
  4248. return true;
  4249. default:
  4250. return false;
  4251. }
  4252. }
  4253. function getDataFromCustomEvent(nativeEvent) {
  4254. nativeEvent = nativeEvent.detail;
  4255. return "object" === typeof nativeEvent && "data" in nativeEvent
  4256. ? nativeEvent.data
  4257. : null;
  4258. }
  4259. function getNativeBeforeInputChars(domEventName, nativeEvent) {
  4260. switch (domEventName) {
  4261. case "compositionend":
  4262. return getDataFromCustomEvent(nativeEvent);
  4263. case "keypress":
  4264. if (nativeEvent.which !== SPACEBAR_CODE) return null;
  4265. hasSpaceKeypress = true;
  4266. return SPACEBAR_CHAR;
  4267. case "textInput":
  4268. return (
  4269. (domEventName = nativeEvent.data),
  4270. domEventName === SPACEBAR_CHAR && hasSpaceKeypress
  4271. ? null
  4272. : domEventName
  4273. );
  4274. default:
  4275. return null;
  4276. }
  4277. }
  4278. function getFallbackBeforeInputChars(domEventName, nativeEvent) {
  4279. if (isComposing)
  4280. return "compositionend" === domEventName ||
  4281. (!canUseCompositionEvent &&
  4282. isFallbackCompositionEnd(domEventName, nativeEvent))
  4283. ? ((domEventName = getData()),
  4284. (fallbackText = startText = root = null),
  4285. (isComposing = false),
  4286. domEventName)
  4287. : null;
  4288. switch (domEventName) {
  4289. case "paste":
  4290. return null;
  4291. case "keypress":
  4292. if (
  4293. !(
  4294. nativeEvent.ctrlKey ||
  4295. nativeEvent.altKey ||
  4296. nativeEvent.metaKey
  4297. ) ||
  4298. (nativeEvent.ctrlKey && nativeEvent.altKey)
  4299. ) {
  4300. if (nativeEvent.char && 1 < nativeEvent.char.length)
  4301. return nativeEvent.char;
  4302. if (nativeEvent.which)
  4303. return String.fromCharCode(nativeEvent.which);
  4304. }
  4305. return null;
  4306. case "compositionend":
  4307. return useFallbackCompositionData && "ko" !== nativeEvent.locale
  4308. ? null
  4309. : nativeEvent.data;
  4310. default:
  4311. return null;
  4312. }
  4313. }
  4314. function isTextInputElement(elem) {
  4315. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  4316. return "input" === nodeName
  4317. ? !!supportedInputTypes[elem.type]
  4318. : "textarea" === nodeName
  4319. ? true
  4320. : false;
  4321. }
  4322. function isEventSupported(eventNameSuffix) {
  4323. if (!canUseDOM) return false;
  4324. eventNameSuffix = "on" + eventNameSuffix;
  4325. var isSupported = eventNameSuffix in document;
  4326. isSupported ||
  4327. ((isSupported = document.createElement("div")),
  4328. isSupported.setAttribute(eventNameSuffix, "return;"),
  4329. (isSupported = "function" === typeof isSupported[eventNameSuffix]));
  4330. return isSupported;
  4331. }
  4332. function createAndAccumulateChangeEvent(
  4333. dispatchQueue,
  4334. inst,
  4335. nativeEvent,
  4336. target
  4337. ) {
  4338. restoreTarget
  4339. ? restoreQueue
  4340. ? restoreQueue.push(target)
  4341. : (restoreQueue = [target])
  4342. : (restoreTarget = target);
  4343. inst = accumulateTwoPhaseListeners(inst, "onChange");
  4344. 0 < inst.length &&
  4345. ((nativeEvent = new SyntheticEvent(
  4346. "onChange",
  4347. "change",
  4348. null,
  4349. nativeEvent,
  4350. target
  4351. )),
  4352. dispatchQueue.push({ event: nativeEvent, listeners: inst }));
  4353. }
  4354. function runEventInBatch(dispatchQueue) {
  4355. processDispatchQueue(dispatchQueue, 0);
  4356. }
  4357. function getInstIfValueChanged(targetInst) {
  4358. var targetNode = getNodeFromInstance(targetInst);
  4359. if (updateValueIfChanged(targetNode)) return targetInst;
  4360. }
  4361. function getTargetInstForChangeEvent(domEventName, targetInst) {
  4362. if ("change" === domEventName) return targetInst;
  4363. }
  4364. function stopWatchingForValueChange() {
  4365. activeElement$1 &&
  4366. (activeElement$1.detachEvent("onpropertychange", handlePropertyChange),
  4367. (activeElementInst$1 = activeElement$1 = null));
  4368. }
  4369. function handlePropertyChange(nativeEvent) {
  4370. if (
  4371. "value" === nativeEvent.propertyName &&
  4372. getInstIfValueChanged(activeElementInst$1)
  4373. ) {
  4374. var dispatchQueue = [];
  4375. createAndAccumulateChangeEvent(
  4376. dispatchQueue,
  4377. activeElementInst$1,
  4378. nativeEvent,
  4379. getEventTarget(nativeEvent)
  4380. );
  4381. batchedUpdates$1(runEventInBatch, dispatchQueue);
  4382. }
  4383. }
  4384. function handleEventsForInputEventPolyfill(
  4385. domEventName,
  4386. target,
  4387. targetInst
  4388. ) {
  4389. "focusin" === domEventName
  4390. ? (stopWatchingForValueChange(),
  4391. (activeElement$1 = target),
  4392. (activeElementInst$1 = targetInst),
  4393. activeElement$1.attachEvent("onpropertychange", handlePropertyChange))
  4394. : "focusout" === domEventName && stopWatchingForValueChange();
  4395. }
  4396. function getTargetInstForInputEventPolyfill(domEventName) {
  4397. if (
  4398. "selectionchange" === domEventName ||
  4399. "keyup" === domEventName ||
  4400. "keydown" === domEventName
  4401. )
  4402. return getInstIfValueChanged(activeElementInst$1);
  4403. }
  4404. function getTargetInstForClickEvent(domEventName, targetInst) {
  4405. if ("click" === domEventName) return getInstIfValueChanged(targetInst);
  4406. }
  4407. function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
  4408. if ("input" === domEventName || "change" === domEventName)
  4409. return getInstIfValueChanged(targetInst);
  4410. }
  4411. function is(x, y) {
  4412. return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
  4413. }
  4414. function shallowEqual(objA, objB) {
  4415. if (objectIs(objA, objB)) return true;
  4416. if (
  4417. "object" !== typeof objA ||
  4418. null === objA ||
  4419. "object" !== typeof objB ||
  4420. null === objB
  4421. )
  4422. return false;
  4423. var keysA = Object.keys(objA),
  4424. keysB = Object.keys(objB);
  4425. if (keysA.length !== keysB.length) return false;
  4426. for (keysB = 0; keysB < keysA.length; keysB++) {
  4427. var currentKey = keysA[keysB];
  4428. if (
  4429. !hasOwnProperty.call(objB, currentKey) ||
  4430. !objectIs(objA[currentKey], objB[currentKey])
  4431. )
  4432. return false;
  4433. }
  4434. return true;
  4435. }
  4436. function getLeafNode(node) {
  4437. for (; node && node.firstChild; ) node = node.firstChild;
  4438. return node;
  4439. }
  4440. function getNodeForCharacterOffset(root, offset) {
  4441. var node = getLeafNode(root);
  4442. root = 0;
  4443. for (var nodeEnd; node; ) {
  4444. if (3 === node.nodeType) {
  4445. nodeEnd = root + node.textContent.length;
  4446. if (root <= offset && nodeEnd >= offset)
  4447. return { node: node, offset: offset - root };
  4448. root = nodeEnd;
  4449. }
  4450. a: {
  4451. for (; node; ) {
  4452. if (node.nextSibling) {
  4453. node = node.nextSibling;
  4454. break a;
  4455. }
  4456. node = node.parentNode;
  4457. }
  4458. node = void 0;
  4459. }
  4460. node = getLeafNode(node);
  4461. }
  4462. }
  4463. function containsNode(outerNode, innerNode) {
  4464. return outerNode && innerNode
  4465. ? outerNode === innerNode
  4466. ? true
  4467. : outerNode && 3 === outerNode.nodeType
  4468. ? false
  4469. : innerNode && 3 === innerNode.nodeType
  4470. ? containsNode(outerNode, innerNode.parentNode)
  4471. : "contains" in outerNode
  4472. ? outerNode.contains(innerNode)
  4473. : outerNode.compareDocumentPosition
  4474. ? !!(outerNode.compareDocumentPosition(innerNode) & 16)
  4475. : false
  4476. : false;
  4477. }
  4478. function getActiveElementDeep(containerInfo) {
  4479. containerInfo =
  4480. null != containerInfo &&
  4481. null != containerInfo.ownerDocument &&
  4482. null != containerInfo.ownerDocument.defaultView
  4483. ? containerInfo.ownerDocument.defaultView
  4484. : window;
  4485. for (
  4486. var element = getActiveElement(containerInfo.document);
  4487. element instanceof containerInfo.HTMLIFrameElement;
  4488. ) {
  4489. try {
  4490. var JSCompiler_inline_result =
  4491. "string" === typeof element.contentWindow.location.href;
  4492. } catch (err) {
  4493. JSCompiler_inline_result = false;
  4494. }
  4495. if (JSCompiler_inline_result) containerInfo = element.contentWindow;
  4496. else break;
  4497. element = getActiveElement(containerInfo.document);
  4498. }
  4499. return element;
  4500. }
  4501. function hasSelectionCapabilities(elem) {
  4502. var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  4503. return (
  4504. nodeName &&
  4505. (("input" === nodeName &&
  4506. ("text" === elem.type ||
  4507. "search" === elem.type ||
  4508. "tel" === elem.type ||
  4509. "url" === elem.type ||
  4510. "password" === elem.type)) ||
  4511. "textarea" === nodeName ||
  4512. "true" === elem.contentEditable)
  4513. );
  4514. }
  4515. function constructSelectEvent(
  4516. dispatchQueue,
  4517. nativeEvent,
  4518. nativeEventTarget
  4519. ) {
  4520. var doc =
  4521. nativeEventTarget.window === nativeEventTarget
  4522. ? nativeEventTarget.document
  4523. : 9 === nativeEventTarget.nodeType
  4524. ? nativeEventTarget
  4525. : nativeEventTarget.ownerDocument;
  4526. mouseDown ||
  4527. null == activeElement ||
  4528. activeElement !== getActiveElement(doc) ||
  4529. ((doc = activeElement),
  4530. "selectionStart" in doc && hasSelectionCapabilities(doc)
  4531. ? (doc = { start: doc.selectionStart, end: doc.selectionEnd })
  4532. : ((doc = (
  4533. (doc.ownerDocument && doc.ownerDocument.defaultView) ||
  4534. window
  4535. ).getSelection()),
  4536. (doc = {
  4537. anchorNode: doc.anchorNode,
  4538. anchorOffset: doc.anchorOffset,
  4539. focusNode: doc.focusNode,
  4540. focusOffset: doc.focusOffset
  4541. })),
  4542. (lastSelection && shallowEqual(lastSelection, doc)) ||
  4543. ((lastSelection = doc),
  4544. (doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect")),
  4545. 0 < doc.length &&
  4546. ((nativeEvent = new SyntheticEvent(
  4547. "onSelect",
  4548. "select",
  4549. null,
  4550. nativeEvent,
  4551. nativeEventTarget
  4552. )),
  4553. dispatchQueue.push({ event: nativeEvent, listeners: doc }),
  4554. (nativeEvent.target = activeElement))));
  4555. }
  4556. function makePrefixMap(styleProp, eventName) {
  4557. var prefixes = {};
  4558. prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
  4559. prefixes["Webkit" + styleProp] = "webkit" + eventName;
  4560. prefixes["Moz" + styleProp] = "moz" + eventName;
  4561. return prefixes;
  4562. }
  4563. function getVendorPrefixedEventName(eventName) {
  4564. if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
  4565. if (!vendorPrefixes[eventName]) return eventName;
  4566. var prefixMap = vendorPrefixes[eventName],
  4567. styleProp;
  4568. for (styleProp in prefixMap)
  4569. if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
  4570. return (prefixedEventNames[eventName] = prefixMap[styleProp]);
  4571. return eventName;
  4572. }
  4573. function registerSimpleEvent(domEventName, reactName) {
  4574. topLevelEventsToReactNames.set(domEventName, reactName);
  4575. registerTwoPhaseEvent(reactName, [domEventName]);
  4576. }
  4577. function getArrayKind(array) {
  4578. for (var kind = EMPTY_ARRAY, i = 0; i < array.length; i++) {
  4579. var value = array[i];
  4580. if ("object" === typeof value && null !== value)
  4581. if (
  4582. isArrayImpl(value) &&
  4583. 2 === value.length &&
  4584. "string" === typeof value[0]
  4585. ) {
  4586. if (kind !== EMPTY_ARRAY && kind !== ENTRIES_ARRAY)
  4587. return COMPLEX_ARRAY;
  4588. kind = ENTRIES_ARRAY;
  4589. } else return COMPLEX_ARRAY;
  4590. else {
  4591. if (
  4592. "function" === typeof value ||
  4593. ("string" === typeof value && 50 < value.length) ||
  4594. (kind !== EMPTY_ARRAY && kind !== PRIMITIVE_ARRAY)
  4595. )
  4596. return COMPLEX_ARRAY;
  4597. kind = PRIMITIVE_ARRAY;
  4598. }
  4599. }
  4600. return kind;
  4601. }
  4602. function addObjectToProperties(object, properties, indent, prefix) {
  4603. for (var key in object)
  4604. hasOwnProperty.call(object, key) &&
  4605. "_" !== key[0] &&
  4606. addValueToProperties(key, object[key], properties, indent, prefix);
  4607. }
  4608. function addValueToProperties(
  4609. propertyName,
  4610. value,
  4611. properties,
  4612. indent,
  4613. prefix
  4614. ) {
  4615. switch (typeof value) {
  4616. case "object":
  4617. if (null === value) {
  4618. value = "null";
  4619. break;
  4620. } else {
  4621. if (value.$$typeof === REACT_ELEMENT_TYPE) {
  4622. var typeName = getComponentNameFromType(value.type) || "\u2026",
  4623. key = value.key;
  4624. value = value.props;
  4625. var propsKeys = Object.keys(value),
  4626. propsLength = propsKeys.length;
  4627. if (null == key && 0 === propsLength) {
  4628. value = "<" + typeName + " />";
  4629. break;
  4630. }
  4631. if (
  4632. 3 > indent ||
  4633. (1 === propsLength &&
  4634. "children" === propsKeys[0] &&
  4635. null == key)
  4636. ) {
  4637. value = "<" + typeName + " \u2026 />";
  4638. break;
  4639. }
  4640. properties.push([
  4641. prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
  4642. "<" + typeName
  4643. ]);
  4644. null !== key &&
  4645. addValueToProperties(
  4646. "key",
  4647. key,
  4648. properties,
  4649. indent + 1,
  4650. prefix
  4651. );
  4652. propertyName = false;
  4653. for (var propKey in value)
  4654. "children" === propKey
  4655. ? null != value.children &&
  4656. (!isArrayImpl(value.children) ||
  4657. 0 < value.children.length) &&
  4658. (propertyName = true)
  4659. : hasOwnProperty.call(value, propKey) &&
  4660. "_" !== propKey[0] &&
  4661. addValueToProperties(
  4662. propKey,
  4663. value[propKey],
  4664. properties,
  4665. indent + 1,
  4666. prefix
  4667. );
  4668. properties.push([
  4669. "",
  4670. propertyName ? ">\u2026</" + typeName + ">" : "/>"
  4671. ]);
  4672. return;
  4673. }
  4674. typeName = Object.prototype.toString.call(value);
  4675. typeName = typeName.slice(8, typeName.length - 1);
  4676. if ("Array" === typeName)
  4677. if (
  4678. ((propKey = getArrayKind(value)),
  4679. propKey === PRIMITIVE_ARRAY || propKey === EMPTY_ARRAY)
  4680. ) {
  4681. value = JSON.stringify(value);
  4682. break;
  4683. } else if (propKey === ENTRIES_ARRAY) {
  4684. properties.push([
  4685. prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
  4686. ""
  4687. ]);
  4688. for (
  4689. propertyName = 0;
  4690. propertyName < value.length;
  4691. propertyName++
  4692. )
  4693. (typeName = value[propertyName]),
  4694. addValueToProperties(
  4695. typeName[0],
  4696. typeName[1],
  4697. properties,
  4698. indent + 1,
  4699. prefix
  4700. );
  4701. return;
  4702. }
  4703. if ("Promise" === typeName) {
  4704. if ("fulfilled" === value.status) {
  4705. if (
  4706. ((typeName = properties.length),
  4707. addValueToProperties(
  4708. propertyName,
  4709. value.value,
  4710. properties,
  4711. indent,
  4712. prefix
  4713. ),
  4714. properties.length > typeName)
  4715. ) {
  4716. properties = properties[typeName];
  4717. properties[1] =
  4718. "Promise<" + (properties[1] || "Object") + ">";
  4719. return;
  4720. }
  4721. } else if (
  4722. "rejected" === value.status &&
  4723. ((typeName = properties.length),
  4724. addValueToProperties(
  4725. propertyName,
  4726. value.reason,
  4727. properties,
  4728. indent,
  4729. prefix
  4730. ),
  4731. properties.length > typeName)
  4732. ) {
  4733. properties = properties[typeName];
  4734. properties[1] = "Rejected Promise<" + properties[1] + ">";
  4735. return;
  4736. }
  4737. properties.push([
  4738. "\u00a0\u00a0".repeat(indent) + propertyName,
  4739. "Promise"
  4740. ]);
  4741. return;
  4742. }
  4743. "Object" === typeName &&
  4744. (propKey = Object.getPrototypeOf(value)) &&
  4745. "function" === typeof propKey.constructor &&
  4746. (typeName = propKey.constructor.name);
  4747. properties.push([
  4748. prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
  4749. "Object" === typeName ? (3 > indent ? "" : "\u2026") : typeName
  4750. ]);
  4751. 3 > indent &&
  4752. addObjectToProperties(value, properties, indent + 1, prefix);
  4753. return;
  4754. }
  4755. case "function":
  4756. value = "" === value.name ? "() => {}" : value.name + "() {}";
  4757. break;
  4758. case "string":
  4759. value =
  4760. value === OMITTED_PROP_ERROR ? "\u2026" : JSON.stringify(value);
  4761. break;
  4762. case "undefined":
  4763. value = "undefined";
  4764. break;
  4765. case "boolean":
  4766. value = value ? "true" : "false";
  4767. break;
  4768. default:
  4769. value = String(value);
  4770. }
  4771. properties.push([
  4772. prefix + "\u00a0\u00a0".repeat(indent) + propertyName,
  4773. value
  4774. ]);
  4775. }
  4776. function addObjectDiffToProperties(prev, next, properties, indent) {
  4777. var isDeeplyEqual = true;
  4778. for (key in prev)
  4779. key in next ||
  4780. (properties.push([
  4781. REMOVED + "\u00a0\u00a0".repeat(indent) + key,
  4782. "\u2026"
  4783. ]),
  4784. (isDeeplyEqual = false));
  4785. for (var _key in next)
  4786. if (_key in prev) {
  4787. var key = prev[_key];
  4788. var nextValue = next[_key];
  4789. if (key !== nextValue) {
  4790. if (0 === indent && "children" === _key)
  4791. (isDeeplyEqual = "\u00a0\u00a0".repeat(indent) + _key),
  4792. properties.push(
  4793. [REMOVED + isDeeplyEqual, "\u2026"],
  4794. [ADDED + isDeeplyEqual, "\u2026"]
  4795. );
  4796. else {
  4797. if (!(3 <= indent))
  4798. if (
  4799. "object" === typeof key &&
  4800. "object" === typeof nextValue &&
  4801. null !== key &&
  4802. null !== nextValue &&
  4803. key.$$typeof === nextValue.$$typeof
  4804. )
  4805. if (nextValue.$$typeof === REACT_ELEMENT_TYPE) {
  4806. if (
  4807. key.type === nextValue.type &&
  4808. key.key === nextValue.key
  4809. ) {
  4810. key =
  4811. getComponentNameFromType(nextValue.type) || "\u2026";
  4812. isDeeplyEqual = "\u00a0\u00a0".repeat(indent) + _key;
  4813. key = "<" + key + " \u2026 />";
  4814. properties.push(
  4815. [REMOVED + isDeeplyEqual, key],
  4816. [ADDED + isDeeplyEqual, key]
  4817. );
  4818. isDeeplyEqual = false;
  4819. continue;
  4820. }
  4821. } else {
  4822. var prevKind = Object.prototype.toString.call(key),
  4823. nextKind = Object.prototype.toString.call(nextValue);
  4824. if (
  4825. prevKind === nextKind &&
  4826. ("[object Object]" === nextKind ||
  4827. "[object Array]" === nextKind)
  4828. ) {
  4829. prevKind = [
  4830. UNCHANGED + "\u00a0\u00a0".repeat(indent) + _key,
  4831. "[object Array]" === nextKind ? "Array" : ""
  4832. ];
  4833. properties.push(prevKind);
  4834. nextKind = properties.length;
  4835. addObjectDiffToProperties(
  4836. key,
  4837. nextValue,
  4838. properties,
  4839. indent + 1
  4840. )
  4841. ? nextKind === properties.length &&
  4842. (prevKind[1] =
  4843. "Referentially unequal but deeply equal objects. Consider memoization.")
  4844. : (isDeeplyEqual = false);
  4845. continue;
  4846. }
  4847. }
  4848. else if (
  4849. "function" === typeof key &&
  4850. "function" === typeof nextValue &&
  4851. key.name === nextValue.name &&
  4852. key.length === nextValue.length &&
  4853. ((prevKind = Function.prototype.toString.call(key)),
  4854. (nextKind = Function.prototype.toString.call(nextValue)),
  4855. prevKind === nextKind)
  4856. ) {
  4857. key =
  4858. "" === nextValue.name
  4859. ? "() => {}"
  4860. : nextValue.name + "() {}";
  4861. properties.push([
  4862. UNCHANGED + "\u00a0\u00a0".repeat(indent) + _key,
  4863. key +
  4864. " Referentially unequal function closure. Consider memoization."
  4865. ]);
  4866. continue;
  4867. }
  4868. addValueToProperties(_key, key, properties, indent, REMOVED);
  4869. addValueToProperties(_key, nextValue, properties, indent, ADDED);
  4870. }
  4871. isDeeplyEqual = false;
  4872. }
  4873. } else
  4874. properties.push([
  4875. ADDED + "\u00a0\u00a0".repeat(indent) + _key,
  4876. "\u2026"
  4877. ]),
  4878. (isDeeplyEqual = false);
  4879. return isDeeplyEqual;
  4880. }
  4881. function setCurrentTrackFromLanes(lanes) {
  4882. currentTrack =
  4883. lanes & 63
  4884. ? "Blocking"
  4885. : lanes & 64
  4886. ? "Gesture"
  4887. : lanes & 4194176
  4888. ? "Transition"
  4889. : lanes & 62914560
  4890. ? "Suspense"
  4891. : lanes & 2080374784
  4892. ? "Idle"
  4893. : "Other";
  4894. }
  4895. function logComponentTrigger(fiber, startTime, endTime, trigger) {
  4896. supportsUserTiming &&
  4897. ((reusableComponentOptions.start = startTime),
  4898. (reusableComponentOptions.end = endTime),
  4899. (reusableComponentDevToolDetails.color = "warning"),
  4900. (reusableComponentDevToolDetails.tooltipText = trigger),
  4901. (reusableComponentDevToolDetails.properties = null),
  4902. (fiber = fiber._debugTask)
  4903. ? fiber.run(
  4904. performance.measure.bind(
  4905. performance,
  4906. trigger,
  4907. reusableComponentOptions
  4908. )
  4909. )
  4910. : performance.measure(trigger, reusableComponentOptions));
  4911. }
  4912. function logComponentReappeared(fiber, startTime, endTime) {
  4913. logComponentTrigger(fiber, startTime, endTime, "Reconnect");
  4914. }
  4915. function logComponentRender(
  4916. fiber,
  4917. startTime,
  4918. endTime,
  4919. wasHydrated,
  4920. committedLanes
  4921. ) {
  4922. var name = getComponentNameFromFiber(fiber);
  4923. if (null !== name && supportsUserTiming) {
  4924. var alternate = fiber.alternate,
  4925. selfTime = fiber.actualDuration;
  4926. if (null === alternate || alternate.child !== fiber.child)
  4927. for (var child = fiber.child; null !== child; child = child.sibling)
  4928. selfTime -= child.actualDuration;
  4929. wasHydrated =
  4930. 0.5 > selfTime
  4931. ? wasHydrated
  4932. ? "tertiary-light"
  4933. : "primary-light"
  4934. : 10 > selfTime
  4935. ? wasHydrated
  4936. ? "tertiary"
  4937. : "primary"
  4938. : 100 > selfTime
  4939. ? wasHydrated
  4940. ? "tertiary-dark"
  4941. : "primary-dark"
  4942. : "error";
  4943. var props = fiber.memoizedProps;
  4944. selfTime = fiber._debugTask;
  4945. null !== props &&
  4946. null !== alternate &&
  4947. alternate.memoizedProps !== props
  4948. ? ((child = [resuableChangedPropsEntry]),
  4949. (props = addObjectDiffToProperties(
  4950. alternate.memoizedProps,
  4951. props,
  4952. child,
  4953. 0
  4954. )),
  4955. 1 < child.length &&
  4956. (props &&
  4957. !alreadyWarnedForDeepEquality &&
  4958. 0 === (alternate.lanes & committedLanes) &&
  4959. 100 < fiber.actualDuration
  4960. ? ((alreadyWarnedForDeepEquality = true),
  4961. (child[0] = reusableDeeplyEqualPropsEntry),
  4962. (reusableComponentDevToolDetails.color = "warning"),
  4963. (reusableComponentDevToolDetails.tooltipText =
  4964. DEEP_EQUALITY_WARNING))
  4965. : ((reusableComponentDevToolDetails.color = wasHydrated),
  4966. (reusableComponentDevToolDetails.tooltipText = name)),
  4967. (reusableComponentDevToolDetails.properties = child),
  4968. (reusableComponentOptions.start = startTime),
  4969. (reusableComponentOptions.end = endTime),
  4970. null != selfTime
  4971. ? selfTime.run(
  4972. performance.measure.bind(
  4973. performance,
  4974. "\u200b" + name,
  4975. reusableComponentOptions
  4976. )
  4977. )
  4978. : performance.measure(
  4979. "\u200b" + name,
  4980. reusableComponentOptions
  4981. )))
  4982. : null != selfTime
  4983. ? selfTime.run(
  4984. console.timeStamp.bind(
  4985. console,
  4986. name,
  4987. startTime,
  4988. endTime,
  4989. COMPONENTS_TRACK,
  4990. void 0,
  4991. wasHydrated
  4992. )
  4993. )
  4994. : console.timeStamp(
  4995. name,
  4996. startTime,
  4997. endTime,
  4998. COMPONENTS_TRACK,
  4999. void 0,
  5000. wasHydrated
  5001. );
  5002. }
  5003. }
  5004. function logComponentErrored(fiber, startTime, endTime, errors) {
  5005. if (supportsUserTiming) {
  5006. var name = getComponentNameFromFiber(fiber);
  5007. if (null !== name) {
  5008. for (
  5009. var debugTask = null, properties = [], i = 0;
  5010. i < errors.length;
  5011. i++
  5012. ) {
  5013. var capturedValue = errors[i];
  5014. null == debugTask &&
  5015. null !== capturedValue.source &&
  5016. (debugTask = capturedValue.source._debugTask);
  5017. capturedValue = capturedValue.value;
  5018. properties.push([
  5019. "Error",
  5020. "object" === typeof capturedValue &&
  5021. null !== capturedValue &&
  5022. "string" === typeof capturedValue.message
  5023. ? String(capturedValue.message)
  5024. : String(capturedValue)
  5025. ]);
  5026. }
  5027. null !== fiber.key &&
  5028. addValueToProperties("key", fiber.key, properties, 0, "");
  5029. null !== fiber.memoizedProps &&
  5030. addObjectToProperties(fiber.memoizedProps, properties, 0, "");
  5031. null == debugTask && (debugTask = fiber._debugTask);
  5032. fiber = {
  5033. start: startTime,
  5034. end: endTime,
  5035. detail: {
  5036. devtools: {
  5037. color: "error",
  5038. track: COMPONENTS_TRACK,
  5039. tooltipText:
  5040. 13 === fiber.tag
  5041. ? "Hydration failed"
  5042. : "Error boundary caught an error",
  5043. properties: properties
  5044. }
  5045. }
  5046. };
  5047. debugTask
  5048. ? debugTask.run(
  5049. performance.measure.bind(performance, "\u200b" + name, fiber)
  5050. )
  5051. : performance.measure("\u200b" + name, fiber);
  5052. }
  5053. }
  5054. }
  5055. function logComponentEffect(fiber, startTime, endTime, selfTime, errors) {
  5056. if (null !== errors) {
  5057. if (supportsUserTiming) {
  5058. var name = getComponentNameFromFiber(fiber);
  5059. if (null !== name) {
  5060. selfTime = [];
  5061. for (var i = 0; i < errors.length; i++) {
  5062. var error = errors[i].value;
  5063. selfTime.push([
  5064. "Error",
  5065. "object" === typeof error &&
  5066. null !== error &&
  5067. "string" === typeof error.message
  5068. ? String(error.message)
  5069. : String(error)
  5070. ]);
  5071. }
  5072. null !== fiber.key &&
  5073. addValueToProperties("key", fiber.key, selfTime, 0, "");
  5074. null !== fiber.memoizedProps &&
  5075. addObjectToProperties(fiber.memoizedProps, selfTime, 0, "");
  5076. startTime = {
  5077. start: startTime,
  5078. end: endTime,
  5079. detail: {
  5080. devtools: {
  5081. color: "error",
  5082. track: COMPONENTS_TRACK,
  5083. tooltipText: "A lifecycle or effect errored",
  5084. properties: selfTime
  5085. }
  5086. }
  5087. };
  5088. (fiber = fiber._debugTask)
  5089. ? fiber.run(
  5090. performance.measure.bind(
  5091. performance,
  5092. "\u200b" + name,
  5093. startTime
  5094. )
  5095. )
  5096. : performance.measure("\u200b" + name, startTime);
  5097. }
  5098. }
  5099. } else
  5100. (name = getComponentNameFromFiber(fiber)),
  5101. null !== name &&
  5102. supportsUserTiming &&
  5103. ((errors =
  5104. 1 > selfTime
  5105. ? "secondary-light"
  5106. : 100 > selfTime
  5107. ? "secondary"
  5108. : 500 > selfTime
  5109. ? "secondary-dark"
  5110. : "error"),
  5111. (fiber = fiber._debugTask)
  5112. ? fiber.run(
  5113. console.timeStamp.bind(
  5114. console,
  5115. name,
  5116. startTime,
  5117. endTime,
  5118. COMPONENTS_TRACK,
  5119. void 0,
  5120. errors
  5121. )
  5122. )
  5123. : console.timeStamp(
  5124. name,
  5125. startTime,
  5126. endTime,
  5127. COMPONENTS_TRACK,
  5128. void 0,
  5129. errors
  5130. ));
  5131. }
  5132. function logRenderPhase(startTime, endTime, lanes, debugTask) {
  5133. if (supportsUserTiming && !(endTime <= startTime)) {
  5134. var color =
  5135. (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark";
  5136. lanes =
  5137. (lanes & 536870912) === lanes
  5138. ? "Prepared"
  5139. : (lanes & 201326741) === lanes
  5140. ? "Hydrated"
  5141. : "Render";
  5142. debugTask
  5143. ? debugTask.run(
  5144. console.timeStamp.bind(
  5145. console,
  5146. lanes,
  5147. startTime,
  5148. endTime,
  5149. currentTrack,
  5150. LANES_TRACK_GROUP,
  5151. color
  5152. )
  5153. )
  5154. : console.timeStamp(
  5155. lanes,
  5156. startTime,
  5157. endTime,
  5158. currentTrack,
  5159. LANES_TRACK_GROUP,
  5160. color
  5161. );
  5162. }
  5163. }
  5164. function logSuspendedRenderPhase(startTime, endTime, lanes, debugTask) {
  5165. !supportsUserTiming ||
  5166. endTime <= startTime ||
  5167. ((lanes =
  5168. (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"),
  5169. debugTask
  5170. ? debugTask.run(
  5171. console.timeStamp.bind(
  5172. console,
  5173. "Prewarm",
  5174. startTime,
  5175. endTime,
  5176. currentTrack,
  5177. LANES_TRACK_GROUP,
  5178. lanes
  5179. )
  5180. )
  5181. : console.timeStamp(
  5182. "Prewarm",
  5183. startTime,
  5184. endTime,
  5185. currentTrack,
  5186. LANES_TRACK_GROUP,
  5187. lanes
  5188. ));
  5189. }
  5190. function logSuspendedWithDelayPhase(startTime, endTime, lanes, debugTask) {
  5191. !supportsUserTiming ||
  5192. endTime <= startTime ||
  5193. ((lanes =
  5194. (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark"),
  5195. debugTask
  5196. ? debugTask.run(
  5197. console.timeStamp.bind(
  5198. console,
  5199. "Suspended",
  5200. startTime,
  5201. endTime,
  5202. currentTrack,
  5203. LANES_TRACK_GROUP,
  5204. lanes
  5205. )
  5206. )
  5207. : console.timeStamp(
  5208. "Suspended",
  5209. startTime,
  5210. endTime,
  5211. currentTrack,
  5212. LANES_TRACK_GROUP,
  5213. lanes
  5214. ));
  5215. }
  5216. function logRecoveredRenderPhase(
  5217. startTime,
  5218. endTime,
  5219. lanes,
  5220. recoverableErrors,
  5221. hydrationFailed,
  5222. debugTask
  5223. ) {
  5224. if (supportsUserTiming && !(endTime <= startTime)) {
  5225. lanes = [];
  5226. for (var i = 0; i < recoverableErrors.length; i++) {
  5227. var error = recoverableErrors[i].value;
  5228. lanes.push([
  5229. "Recoverable Error",
  5230. "object" === typeof error &&
  5231. null !== error &&
  5232. "string" === typeof error.message
  5233. ? String(error.message)
  5234. : String(error)
  5235. ]);
  5236. }
  5237. startTime = {
  5238. start: startTime,
  5239. end: endTime,
  5240. detail: {
  5241. devtools: {
  5242. color: "primary-dark",
  5243. track: currentTrack,
  5244. trackGroup: LANES_TRACK_GROUP,
  5245. tooltipText: hydrationFailed
  5246. ? "Hydration Failed"
  5247. : "Recovered after Error",
  5248. properties: lanes
  5249. }
  5250. }
  5251. };
  5252. debugTask
  5253. ? debugTask.run(
  5254. performance.measure.bind(performance, "Recovered", startTime)
  5255. )
  5256. : performance.measure("Recovered", startTime);
  5257. }
  5258. }
  5259. function logErroredRenderPhase(startTime, endTime, lanes, debugTask) {
  5260. !supportsUserTiming ||
  5261. endTime <= startTime ||
  5262. (debugTask
  5263. ? debugTask.run(
  5264. console.timeStamp.bind(
  5265. console,
  5266. "Errored",
  5267. startTime,
  5268. endTime,
  5269. currentTrack,
  5270. LANES_TRACK_GROUP,
  5271. "error"
  5272. )
  5273. )
  5274. : console.timeStamp(
  5275. "Errored",
  5276. startTime,
  5277. endTime,
  5278. currentTrack,
  5279. LANES_TRACK_GROUP,
  5280. "error"
  5281. ));
  5282. }
  5283. function logSuspendedCommitPhase(startTime, endTime, reason, debugTask) {
  5284. !supportsUserTiming ||
  5285. endTime <= startTime ||
  5286. (debugTask
  5287. ? debugTask.run(
  5288. console.timeStamp.bind(
  5289. console,
  5290. reason,
  5291. startTime,
  5292. endTime,
  5293. currentTrack,
  5294. LANES_TRACK_GROUP,
  5295. "secondary-light"
  5296. )
  5297. )
  5298. : console.timeStamp(
  5299. reason,
  5300. startTime,
  5301. endTime,
  5302. currentTrack,
  5303. LANES_TRACK_GROUP,
  5304. "secondary-light"
  5305. ));
  5306. }
  5307. function logCommitErrored(startTime, endTime, errors, passive, debugTask) {
  5308. if (supportsUserTiming && !(endTime <= startTime)) {
  5309. for (var properties = [], i = 0; i < errors.length; i++) {
  5310. var error = errors[i].value;
  5311. properties.push([
  5312. "Error",
  5313. "object" === typeof error &&
  5314. null !== error &&
  5315. "string" === typeof error.message
  5316. ? String(error.message)
  5317. : String(error)
  5318. ]);
  5319. }
  5320. startTime = {
  5321. start: startTime,
  5322. end: endTime,
  5323. detail: {
  5324. devtools: {
  5325. color: "error",
  5326. track: currentTrack,
  5327. trackGroup: LANES_TRACK_GROUP,
  5328. tooltipText: passive
  5329. ? "Remaining Effects Errored"
  5330. : "Commit Errored",
  5331. properties: properties
  5332. }
  5333. }
  5334. };
  5335. debugTask
  5336. ? debugTask.run(
  5337. performance.measure.bind(performance, "Errored", startTime)
  5338. )
  5339. : performance.measure("Errored", startTime);
  5340. }
  5341. }
  5342. function logAnimatingPhase(startTime, endTime, debugTask) {
  5343. !supportsUserTiming ||
  5344. endTime <= startTime ||
  5345. (console.timeStamp(
  5346. "Animating",
  5347. startTime,
  5348. endTime,
  5349. currentTrack,
  5350. LANES_TRACK_GROUP,
  5351. "secondary-dark"
  5352. ));
  5353. }
  5354. function finishQueueingConcurrentUpdates() {
  5355. for (
  5356. var endIndex = concurrentQueuesIndex,
  5357. i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);
  5358. i < endIndex;
  5359. ) {
  5360. var fiber = concurrentQueues[i];
  5361. concurrentQueues[i++] = null;
  5362. var queue = concurrentQueues[i];
  5363. concurrentQueues[i++] = null;
  5364. var update = concurrentQueues[i];
  5365. concurrentQueues[i++] = null;
  5366. var lane = concurrentQueues[i];
  5367. concurrentQueues[i++] = null;
  5368. if (null !== queue && null !== update) {
  5369. var pending = queue.pending;
  5370. null === pending
  5371. ? (update.next = update)
  5372. : ((update.next = pending.next), (pending.next = update));
  5373. queue.pending = update;
  5374. }
  5375. 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
  5376. }
  5377. }
  5378. function enqueueUpdate$1(fiber, queue, update, lane) {
  5379. concurrentQueues[concurrentQueuesIndex++] = fiber;
  5380. concurrentQueues[concurrentQueuesIndex++] = queue;
  5381. concurrentQueues[concurrentQueuesIndex++] = update;
  5382. concurrentQueues[concurrentQueuesIndex++] = lane;
  5383. concurrentlyUpdatedLanes |= lane;
  5384. fiber.lanes |= lane;
  5385. fiber = fiber.alternate;
  5386. null !== fiber && (fiber.lanes |= lane);
  5387. }
  5388. function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
  5389. enqueueUpdate$1(fiber, queue, update, lane);
  5390. return getRootForUpdatedFiber(fiber);
  5391. }
  5392. function enqueueConcurrentRenderForLane(fiber, lane) {
  5393. enqueueUpdate$1(fiber, null, null, lane);
  5394. return getRootForUpdatedFiber(fiber);
  5395. }
  5396. function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
  5397. sourceFiber.lanes |= lane;
  5398. var alternate = sourceFiber.alternate;
  5399. null !== alternate && (alternate.lanes |= lane);
  5400. for (var isHidden = false, parent = sourceFiber.return; null !== parent; )
  5401. (parent.childLanes |= lane),
  5402. (alternate = parent.alternate),
  5403. null !== alternate && (alternate.childLanes |= lane),
  5404. 22 === parent.tag &&
  5405. ((sourceFiber = parent.stateNode),
  5406. null === sourceFiber ||
  5407. sourceFiber._visibility & OffscreenVisible ||
  5408. (isHidden = true)),
  5409. (sourceFiber = parent),
  5410. (parent = parent.return);
  5411. return 3 === sourceFiber.tag
  5412. ? ((parent = sourceFiber.stateNode),
  5413. isHidden &&
  5414. null !== update &&
  5415. ((isHidden = 31 - clz32(lane)),
  5416. (sourceFiber = parent.hiddenUpdates),
  5417. (alternate = sourceFiber[isHidden]),
  5418. null === alternate
  5419. ? (sourceFiber[isHidden] = [update])
  5420. : alternate.push(update),
  5421. (update.lane = lane | 536870912)),
  5422. parent)
  5423. : null;
  5424. }
  5425. function getRootForUpdatedFiber(sourceFiber) {
  5426. if (nestedUpdateCount > NESTED_UPDATE_LIMIT)
  5427. throw (
  5428. ((nestedPassiveUpdateCount = nestedUpdateCount = 0),
  5429. (rootWithPassiveNestedUpdates = rootWithNestedUpdates = null),
  5430. Error(
  5431. "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."
  5432. ))
  5433. );
  5434. nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT &&
  5435. ((nestedPassiveUpdateCount = 0),
  5436. (rootWithPassiveNestedUpdates = null),
  5437. console.error(
  5438. "Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."
  5439. ));
  5440. null === sourceFiber.alternate &&
  5441. 0 !== (sourceFiber.flags & 4098) &&
  5442. warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
  5443. for (var node = sourceFiber, parent = node.return; null !== parent; )
  5444. null === node.alternate &&
  5445. 0 !== (node.flags & 4098) &&
  5446. warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber),
  5447. (node = parent),
  5448. (parent = node.return);
  5449. return 3 === node.tag ? node.stateNode : null;
  5450. }
  5451. function resolveFunctionForHotReloading(type) {
  5452. if (null === resolveFamily) return type;
  5453. var family = resolveFamily(type);
  5454. return void 0 === family ? type : family.current;
  5455. }
  5456. function resolveForwardRefForHotReloading(type) {
  5457. if (null === resolveFamily) return type;
  5458. var family = resolveFamily(type);
  5459. return void 0 === family
  5460. ? null !== type &&
  5461. void 0 !== type &&
  5462. "function" === typeof type.render &&
  5463. ((family = resolveFunctionForHotReloading(type.render)),
  5464. type.render !== family)
  5465. ? ((family = { $$typeof: REACT_FORWARD_REF_TYPE, render: family }),
  5466. void 0 !== type.displayName &&
  5467. (family.displayName = type.displayName),
  5468. family)
  5469. : type
  5470. : family.current;
  5471. }
  5472. function isCompatibleFamilyForHotReloading(fiber, element) {
  5473. if (null === resolveFamily) return false;
  5474. var prevType = fiber.elementType;
  5475. element = element.type;
  5476. var needsCompareFamilies = false,
  5477. $$typeofNextType =
  5478. "object" === typeof element && null !== element
  5479. ? element.$$typeof
  5480. : null;
  5481. switch (fiber.tag) {
  5482. case 1:
  5483. "function" === typeof element && (needsCompareFamilies = true);
  5484. break;
  5485. case 0:
  5486. "function" === typeof element
  5487. ? (needsCompareFamilies = true)
  5488. : $$typeofNextType === REACT_LAZY_TYPE &&
  5489. (needsCompareFamilies = true);
  5490. break;
  5491. case 11:
  5492. $$typeofNextType === REACT_FORWARD_REF_TYPE
  5493. ? (needsCompareFamilies = true)
  5494. : $$typeofNextType === REACT_LAZY_TYPE &&
  5495. (needsCompareFamilies = true);
  5496. break;
  5497. case 14:
  5498. case 15:
  5499. $$typeofNextType === REACT_MEMO_TYPE
  5500. ? (needsCompareFamilies = true)
  5501. : $$typeofNextType === REACT_LAZY_TYPE &&
  5502. (needsCompareFamilies = true);
  5503. break;
  5504. default:
  5505. return false;
  5506. }
  5507. return needsCompareFamilies &&
  5508. ((fiber = resolveFamily(prevType)),
  5509. void 0 !== fiber && fiber === resolveFamily(element))
  5510. ? true
  5511. : false;
  5512. }
  5513. function markFailedErrorBoundaryForHotReloading(fiber) {
  5514. null !== resolveFamily &&
  5515. "function" === typeof WeakSet &&
  5516. (null === failedBoundaries && (failedBoundaries = new WeakSet()),
  5517. failedBoundaries.add(fiber));
  5518. }
  5519. function scheduleFibersWithFamiliesRecursively(
  5520. fiber,
  5521. updatedFamilies,
  5522. staleFamilies
  5523. ) {
  5524. do {
  5525. var _fiber = fiber,
  5526. alternate = _fiber.alternate,
  5527. child = _fiber.child,
  5528. sibling = _fiber.sibling,
  5529. tag = _fiber.tag;
  5530. _fiber = _fiber.type;
  5531. var candidateType = null;
  5532. switch (tag) {
  5533. case 0:
  5534. case 15:
  5535. case 1:
  5536. candidateType = _fiber;
  5537. break;
  5538. case 11:
  5539. candidateType = _fiber.render;
  5540. }
  5541. if (null === resolveFamily)
  5542. throw Error("Expected resolveFamily to be set during hot reload.");
  5543. var needsRender = false;
  5544. _fiber = false;
  5545. null !== candidateType &&
  5546. ((candidateType = resolveFamily(candidateType)),
  5547. void 0 !== candidateType &&
  5548. (staleFamilies.has(candidateType)
  5549. ? (_fiber = true)
  5550. : updatedFamilies.has(candidateType) &&
  5551. (1 === tag ? (_fiber = true) : (needsRender = true))));
  5552. null !== failedBoundaries &&
  5553. (failedBoundaries.has(fiber) ||
  5554. (null !== alternate && failedBoundaries.has(alternate))) &&
  5555. (_fiber = true);
  5556. _fiber && (fiber._debugNeedsRemount = true);
  5557. if (_fiber || needsRender)
  5558. (alternate = enqueueConcurrentRenderForLane(fiber, 2)),
  5559. null !== alternate && scheduleUpdateOnFiber(alternate, fiber, 2);
  5560. null === child ||
  5561. _fiber ||
  5562. scheduleFibersWithFamiliesRecursively(
  5563. child,
  5564. updatedFamilies,
  5565. staleFamilies
  5566. );
  5567. if (null === sibling) break;
  5568. fiber = sibling;
  5569. } while (1);
  5570. }
  5571. function FiberNode(tag, pendingProps, key, mode) {
  5572. this.tag = tag;
  5573. this.key = key;
  5574. this.sibling =
  5575. this.child =
  5576. this.return =
  5577. this.stateNode =
  5578. this.type =
  5579. this.elementType =
  5580. null;
  5581. this.index = 0;
  5582. this.refCleanup = this.ref = null;
  5583. this.pendingProps = pendingProps;
  5584. this.dependencies =
  5585. this.memoizedState =
  5586. this.updateQueue =
  5587. this.memoizedProps =
  5588. null;
  5589. this.mode = mode;
  5590. this.subtreeFlags = this.flags = 0;
  5591. this.deletions = null;
  5592. this.childLanes = this.lanes = 0;
  5593. this.alternate = null;
  5594. this.actualDuration = -0;
  5595. this.actualStartTime = -1.1;
  5596. this.treeBaseDuration = this.selfBaseDuration = -0;
  5597. this._debugTask =
  5598. this._debugStack =
  5599. this._debugOwner =
  5600. this._debugInfo =
  5601. null;
  5602. this._debugNeedsRemount = false;
  5603. this._debugHookTypes = null;
  5604. hasBadMapPolyfill ||
  5605. "function" !== typeof Object.preventExtensions ||
  5606. Object.preventExtensions(this);
  5607. }
  5608. function shouldConstruct(Component) {
  5609. Component = Component.prototype;
  5610. return !(!Component || !Component.isReactComponent);
  5611. }
  5612. function createWorkInProgress(current, pendingProps) {
  5613. var workInProgress = current.alternate;
  5614. null === workInProgress
  5615. ? ((workInProgress = createFiber(
  5616. current.tag,
  5617. pendingProps,
  5618. current.key,
  5619. current.mode
  5620. )),
  5621. (workInProgress.elementType = current.elementType),
  5622. (workInProgress.type = current.type),
  5623. (workInProgress.stateNode = current.stateNode),
  5624. (workInProgress._debugOwner = current._debugOwner),
  5625. (workInProgress._debugStack = current._debugStack),
  5626. (workInProgress._debugTask = current._debugTask),
  5627. (workInProgress._debugHookTypes = current._debugHookTypes),
  5628. (workInProgress.alternate = current),
  5629. (current.alternate = workInProgress))
  5630. : ((workInProgress.pendingProps = pendingProps),
  5631. (workInProgress.type = current.type),
  5632. (workInProgress.flags = 0),
  5633. (workInProgress.subtreeFlags = 0),
  5634. (workInProgress.deletions = null),
  5635. (workInProgress.actualDuration = -0),
  5636. (workInProgress.actualStartTime = -1.1));
  5637. workInProgress.flags = current.flags & 65011712;
  5638. workInProgress.childLanes = current.childLanes;
  5639. workInProgress.lanes = current.lanes;
  5640. workInProgress.child = current.child;
  5641. workInProgress.memoizedProps = current.memoizedProps;
  5642. workInProgress.memoizedState = current.memoizedState;
  5643. workInProgress.updateQueue = current.updateQueue;
  5644. pendingProps = current.dependencies;
  5645. workInProgress.dependencies =
  5646. null === pendingProps
  5647. ? null
  5648. : {
  5649. lanes: pendingProps.lanes,
  5650. firstContext: pendingProps.firstContext,
  5651. _debugThenableState: pendingProps._debugThenableState
  5652. };
  5653. workInProgress.sibling = current.sibling;
  5654. workInProgress.index = current.index;
  5655. workInProgress.ref = current.ref;
  5656. workInProgress.refCleanup = current.refCleanup;
  5657. workInProgress.selfBaseDuration = current.selfBaseDuration;
  5658. workInProgress.treeBaseDuration = current.treeBaseDuration;
  5659. workInProgress._debugInfo = current._debugInfo;
  5660. workInProgress._debugNeedsRemount = current._debugNeedsRemount;
  5661. switch (workInProgress.tag) {
  5662. case 0:
  5663. case 15:
  5664. workInProgress.type = resolveFunctionForHotReloading(current.type);
  5665. break;
  5666. case 1:
  5667. workInProgress.type = resolveFunctionForHotReloading(current.type);
  5668. break;
  5669. case 11:
  5670. workInProgress.type = resolveForwardRefForHotReloading(current.type);
  5671. }
  5672. return workInProgress;
  5673. }
  5674. function resetWorkInProgress(workInProgress, renderLanes) {
  5675. workInProgress.flags &= 65011714;
  5676. var current = workInProgress.alternate;
  5677. null === current
  5678. ? ((workInProgress.childLanes = 0),
  5679. (workInProgress.lanes = renderLanes),
  5680. (workInProgress.child = null),
  5681. (workInProgress.subtreeFlags = 0),
  5682. (workInProgress.memoizedProps = null),
  5683. (workInProgress.memoizedState = null),
  5684. (workInProgress.updateQueue = null),
  5685. (workInProgress.dependencies = null),
  5686. (workInProgress.stateNode = null),
  5687. (workInProgress.selfBaseDuration = 0),
  5688. (workInProgress.treeBaseDuration = 0))
  5689. : ((workInProgress.childLanes = current.childLanes),
  5690. (workInProgress.lanes = current.lanes),
  5691. (workInProgress.child = current.child),
  5692. (workInProgress.subtreeFlags = 0),
  5693. (workInProgress.deletions = null),
  5694. (workInProgress.memoizedProps = current.memoizedProps),
  5695. (workInProgress.memoizedState = current.memoizedState),
  5696. (workInProgress.updateQueue = current.updateQueue),
  5697. (workInProgress.type = current.type),
  5698. (renderLanes = current.dependencies),
  5699. (workInProgress.dependencies =
  5700. null === renderLanes
  5701. ? null
  5702. : {
  5703. lanes: renderLanes.lanes,
  5704. firstContext: renderLanes.firstContext,
  5705. _debugThenableState: renderLanes._debugThenableState
  5706. }),
  5707. (workInProgress.selfBaseDuration = current.selfBaseDuration),
  5708. (workInProgress.treeBaseDuration = current.treeBaseDuration));
  5709. return workInProgress;
  5710. }
  5711. function createFiberFromTypeAndProps(
  5712. type,
  5713. key,
  5714. pendingProps,
  5715. owner,
  5716. mode,
  5717. lanes
  5718. ) {
  5719. var fiberTag = 0,
  5720. resolvedType = type;
  5721. if ("function" === typeof type)
  5722. shouldConstruct(type) && (fiberTag = 1),
  5723. (resolvedType = resolveFunctionForHotReloading(resolvedType));
  5724. else if ("string" === typeof type)
  5725. (fiberTag = getHostContext()),
  5726. (fiberTag = isHostHoistableType(type, pendingProps, fiberTag)
  5727. ? 26
  5728. : "html" === type || "head" === type || "body" === type
  5729. ? 27
  5730. : 5);
  5731. else
  5732. a: switch (type) {
  5733. case REACT_ACTIVITY_TYPE:
  5734. return (
  5735. (key = createFiber(31, pendingProps, key, mode)),
  5736. (key.elementType = REACT_ACTIVITY_TYPE),
  5737. (key.lanes = lanes),
  5738. key
  5739. );
  5740. case REACT_FRAGMENT_TYPE:
  5741. return createFiberFromFragment(
  5742. pendingProps.children,
  5743. mode,
  5744. lanes,
  5745. key
  5746. );
  5747. case REACT_STRICT_MODE_TYPE:
  5748. fiberTag = 8;
  5749. mode |= StrictLegacyMode;
  5750. mode |= StrictEffectsMode;
  5751. break;
  5752. case REACT_PROFILER_TYPE:
  5753. return (
  5754. (type = pendingProps),
  5755. (owner = mode),
  5756. "string" !== typeof type.id &&
  5757. console.error(
  5758. 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',
  5759. typeof type.id
  5760. ),
  5761. (key = createFiber(12, type, key, owner | ProfileMode)),
  5762. (key.elementType = REACT_PROFILER_TYPE),
  5763. (key.lanes = lanes),
  5764. (key.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }),
  5765. key
  5766. );
  5767. case REACT_SUSPENSE_TYPE:
  5768. return (
  5769. (key = createFiber(13, pendingProps, key, mode)),
  5770. (key.elementType = REACT_SUSPENSE_TYPE),
  5771. (key.lanes = lanes),
  5772. key
  5773. );
  5774. case REACT_SUSPENSE_LIST_TYPE:
  5775. return (
  5776. (key = createFiber(19, pendingProps, key, mode)),
  5777. (key.elementType = REACT_SUSPENSE_LIST_TYPE),
  5778. (key.lanes = lanes),
  5779. key
  5780. );
  5781. default:
  5782. if ("object" === typeof type && null !== type)
  5783. switch (type.$$typeof) {
  5784. case REACT_CONTEXT_TYPE:
  5785. fiberTag = 10;
  5786. break a;
  5787. case REACT_CONSUMER_TYPE:
  5788. fiberTag = 9;
  5789. break a;
  5790. case REACT_FORWARD_REF_TYPE:
  5791. fiberTag = 11;
  5792. resolvedType = resolveForwardRefForHotReloading(resolvedType);
  5793. break a;
  5794. case REACT_MEMO_TYPE:
  5795. fiberTag = 14;
  5796. break a;
  5797. case REACT_LAZY_TYPE:
  5798. fiberTag = 16;
  5799. resolvedType = null;
  5800. break a;
  5801. }
  5802. resolvedType = "";
  5803. if (
  5804. void 0 === type ||
  5805. ("object" === typeof type &&
  5806. null !== type &&
  5807. 0 === Object.keys(type).length)
  5808. )
  5809. resolvedType +=
  5810. " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
  5811. null === type
  5812. ? (pendingProps = "null")
  5813. : isArrayImpl(type)
  5814. ? (pendingProps = "array")
  5815. : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE
  5816. ? ((pendingProps =
  5817. "<" +
  5818. (getComponentNameFromType(type.type) || "Unknown") +
  5819. " />"),
  5820. (resolvedType =
  5821. " Did you accidentally export a JSX literal instead of a component?"))
  5822. : (pendingProps = typeof type);
  5823. (fiberTag = owner ? getComponentNameFromOwner(owner) : null) &&
  5824. (resolvedType +=
  5825. "\n\nCheck the render method of `" + fiberTag + "`.");
  5826. fiberTag = 29;
  5827. pendingProps = Error(
  5828. "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
  5829. (pendingProps + "." + resolvedType)
  5830. );
  5831. resolvedType = null;
  5832. }
  5833. key = createFiber(fiberTag, pendingProps, key, mode);
  5834. key.elementType = type;
  5835. key.type = resolvedType;
  5836. key.lanes = lanes;
  5837. key._debugOwner = owner;
  5838. return key;
  5839. }
  5840. function createFiberFromElement(element, mode, lanes) {
  5841. mode = createFiberFromTypeAndProps(
  5842. element.type,
  5843. element.key,
  5844. element.props,
  5845. element._owner,
  5846. mode,
  5847. lanes
  5848. );
  5849. mode._debugOwner = element._owner;
  5850. mode._debugStack = element._debugStack;
  5851. mode._debugTask = element._debugTask;
  5852. return mode;
  5853. }
  5854. function createFiberFromFragment(elements, mode, lanes, key) {
  5855. elements = createFiber(7, elements, key, mode);
  5856. elements.lanes = lanes;
  5857. return elements;
  5858. }
  5859. function createFiberFromText(content, mode, lanes) {
  5860. content = createFiber(6, content, null, mode);
  5861. content.lanes = lanes;
  5862. return content;
  5863. }
  5864. function createFiberFromDehydratedFragment(dehydratedNode) {
  5865. var fiber = createFiber(18, null, null, NoMode);
  5866. fiber.stateNode = dehydratedNode;
  5867. return fiber;
  5868. }
  5869. function createFiberFromPortal(portal, mode, lanes) {
  5870. mode = createFiber(
  5871. 4,
  5872. null !== portal.children ? portal.children : [],
  5873. portal.key,
  5874. mode
  5875. );
  5876. mode.lanes = lanes;
  5877. mode.stateNode = {
  5878. containerInfo: portal.containerInfo,
  5879. pendingChildren: null,
  5880. implementation: portal.implementation
  5881. };
  5882. return mode;
  5883. }
  5884. function createCapturedValueAtFiber(value, source) {
  5885. if ("object" === typeof value && null !== value) {
  5886. var existing = CapturedStacks.get(value);
  5887. if (void 0 !== existing) return existing;
  5888. source = {
  5889. value: value,
  5890. source: source,
  5891. stack: getStackByFiberInDevAndProd(source)
  5892. };
  5893. CapturedStacks.set(value, source);
  5894. return source;
  5895. }
  5896. return {
  5897. value: value,
  5898. source: source,
  5899. stack: getStackByFiberInDevAndProd(source)
  5900. };
  5901. }
  5902. function pushTreeFork(workInProgress, totalChildren) {
  5903. warnIfNotHydrating();
  5904. forkStack[forkStackIndex++] = treeForkCount;
  5905. forkStack[forkStackIndex++] = treeForkProvider;
  5906. treeForkProvider = workInProgress;
  5907. treeForkCount = totalChildren;
  5908. }
  5909. function pushTreeId(workInProgress, totalChildren, index) {
  5910. warnIfNotHydrating();
  5911. idStack[idStackIndex++] = treeContextId;
  5912. idStack[idStackIndex++] = treeContextOverflow;
  5913. idStack[idStackIndex++] = treeContextProvider;
  5914. treeContextProvider = workInProgress;
  5915. var baseIdWithLeadingBit = treeContextId;
  5916. workInProgress = treeContextOverflow;
  5917. var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
  5918. baseIdWithLeadingBit &= ~(1 << baseLength);
  5919. index += 1;
  5920. var length = 32 - clz32(totalChildren) + baseLength;
  5921. if (30 < length) {
  5922. var numberOfOverflowBits = baseLength - (baseLength % 5);
  5923. length = (
  5924. baseIdWithLeadingBit &
  5925. ((1 << numberOfOverflowBits) - 1)
  5926. ).toString(32);
  5927. baseIdWithLeadingBit >>= numberOfOverflowBits;
  5928. baseLength -= numberOfOverflowBits;
  5929. treeContextId =
  5930. (1 << (32 - clz32(totalChildren) + baseLength)) |
  5931. (index << baseLength) |
  5932. baseIdWithLeadingBit;
  5933. treeContextOverflow = length + workInProgress;
  5934. } else
  5935. (treeContextId =
  5936. (1 << length) | (index << baseLength) | baseIdWithLeadingBit),
  5937. (treeContextOverflow = workInProgress);
  5938. }
  5939. function pushMaterializedTreeId(workInProgress) {
  5940. warnIfNotHydrating();
  5941. null !== workInProgress.return &&
  5942. (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));
  5943. }
  5944. function popTreeContext(workInProgress) {
  5945. for (; workInProgress === treeForkProvider; )
  5946. (treeForkProvider = forkStack[--forkStackIndex]),
  5947. (forkStack[forkStackIndex] = null),
  5948. (treeForkCount = forkStack[--forkStackIndex]),
  5949. (forkStack[forkStackIndex] = null);
  5950. for (; workInProgress === treeContextProvider; )
  5951. (treeContextProvider = idStack[--idStackIndex]),
  5952. (idStack[idStackIndex] = null),
  5953. (treeContextOverflow = idStack[--idStackIndex]),
  5954. (idStack[idStackIndex] = null),
  5955. (treeContextId = idStack[--idStackIndex]),
  5956. (idStack[idStackIndex] = null);
  5957. }
  5958. function getSuspendedTreeContext() {
  5959. warnIfNotHydrating();
  5960. return null !== treeContextProvider
  5961. ? { id: treeContextId, overflow: treeContextOverflow }
  5962. : null;
  5963. }
  5964. function restoreSuspendedTreeContext(workInProgress, suspendedContext) {
  5965. warnIfNotHydrating();
  5966. idStack[idStackIndex++] = treeContextId;
  5967. idStack[idStackIndex++] = treeContextOverflow;
  5968. idStack[idStackIndex++] = treeContextProvider;
  5969. treeContextId = suspendedContext.id;
  5970. treeContextOverflow = suspendedContext.overflow;
  5971. treeContextProvider = workInProgress;
  5972. }
  5973. function warnIfNotHydrating() {
  5974. isHydrating ||
  5975. console.error(
  5976. "Expected to be hydrating. This is a bug in React. Please file an issue."
  5977. );
  5978. }
  5979. function buildHydrationDiffNode(fiber, distanceFromLeaf) {
  5980. if (null === fiber.return) {
  5981. if (null === hydrationDiffRootDEV)
  5982. hydrationDiffRootDEV = {
  5983. fiber: fiber,
  5984. children: [],
  5985. serverProps: void 0,
  5986. serverTail: [],
  5987. distanceFromLeaf: distanceFromLeaf
  5988. };
  5989. else {
  5990. if (hydrationDiffRootDEV.fiber !== fiber)
  5991. throw Error(
  5992. "Saw multiple hydration diff roots in a pass. This is a bug in React."
  5993. );
  5994. hydrationDiffRootDEV.distanceFromLeaf > distanceFromLeaf &&
  5995. (hydrationDiffRootDEV.distanceFromLeaf = distanceFromLeaf);
  5996. }
  5997. return hydrationDiffRootDEV;
  5998. }
  5999. var siblings = buildHydrationDiffNode(
  6000. fiber.return,
  6001. distanceFromLeaf + 1
  6002. ).children;
  6003. if (0 < siblings.length && siblings[siblings.length - 1].fiber === fiber)
  6004. return (
  6005. (siblings = siblings[siblings.length - 1]),
  6006. siblings.distanceFromLeaf > distanceFromLeaf &&
  6007. (siblings.distanceFromLeaf = distanceFromLeaf),
  6008. siblings
  6009. );
  6010. distanceFromLeaf = {
  6011. fiber: fiber,
  6012. children: [],
  6013. serverProps: void 0,
  6014. serverTail: [],
  6015. distanceFromLeaf: distanceFromLeaf
  6016. };
  6017. siblings.push(distanceFromLeaf);
  6018. return distanceFromLeaf;
  6019. }
  6020. function warnIfHydrating() {
  6021. isHydrating &&
  6022. console.error(
  6023. "We should not be hydrating here. This is a bug in React. Please file a bug."
  6024. );
  6025. }
  6026. function warnNonHydratedInstance(fiber, rejectedCandidate) {
  6027. didSuspendOrErrorDEV ||
  6028. ((fiber = buildHydrationDiffNode(fiber, 0)),
  6029. (fiber.serverProps = null),
  6030. null !== rejectedCandidate &&
  6031. ((rejectedCandidate =
  6032. describeHydratableInstanceForDevWarnings(rejectedCandidate)),
  6033. fiber.serverTail.push(rejectedCandidate)));
  6034. }
  6035. function throwOnHydrationMismatch(fiber) {
  6036. var fromText =
  6037. 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : false,
  6038. diff = "",
  6039. diffRoot = hydrationDiffRootDEV;
  6040. null !== diffRoot &&
  6041. ((hydrationDiffRootDEV = null), (diff = describeDiff(diffRoot)));
  6042. queueHydrationError(
  6043. createCapturedValueAtFiber(
  6044. Error(
  6045. "Hydration failed because the server rendered " +
  6046. (fromText ? "text" : "HTML") +
  6047. " didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\nhttps://react.dev/link/hydration-mismatch" +
  6048. diff
  6049. ),
  6050. fiber
  6051. )
  6052. );
  6053. throw HydrationMismatchException;
  6054. }
  6055. function prepareToHydrateHostInstance(fiber) {
  6056. var didHydrate = fiber.stateNode;
  6057. var type = fiber.type,
  6058. props = fiber.memoizedProps;
  6059. didHydrate[internalInstanceKey] = fiber;
  6060. didHydrate[internalPropsKey] = props;
  6061. validatePropertiesInDevelopment(type, props);
  6062. switch (type) {
  6063. case "dialog":
  6064. listenToNonDelegatedEvent("cancel", didHydrate);
  6065. listenToNonDelegatedEvent("close", didHydrate);
  6066. break;
  6067. case "iframe":
  6068. case "object":
  6069. case "embed":
  6070. listenToNonDelegatedEvent("load", didHydrate);
  6071. break;
  6072. case "video":
  6073. case "audio":
  6074. for (type = 0; type < mediaEventTypes.length; type++)
  6075. listenToNonDelegatedEvent(mediaEventTypes[type], didHydrate);
  6076. break;
  6077. case "source":
  6078. listenToNonDelegatedEvent("error", didHydrate);
  6079. break;
  6080. case "img":
  6081. case "image":
  6082. case "link":
  6083. listenToNonDelegatedEvent("error", didHydrate);
  6084. listenToNonDelegatedEvent("load", didHydrate);
  6085. break;
  6086. case "details":
  6087. listenToNonDelegatedEvent("toggle", didHydrate);
  6088. break;
  6089. case "input":
  6090. checkControlledValueProps("input", props);
  6091. listenToNonDelegatedEvent("invalid", didHydrate);
  6092. validateInputProps(didHydrate, props);
  6093. initInput(
  6094. didHydrate,
  6095. props.value,
  6096. props.defaultValue,
  6097. props.checked,
  6098. props.defaultChecked,
  6099. props.type,
  6100. props.name,
  6101. true
  6102. );
  6103. break;
  6104. case "option":
  6105. validateOptionProps(didHydrate, props);
  6106. break;
  6107. case "select":
  6108. checkControlledValueProps("select", props);
  6109. listenToNonDelegatedEvent("invalid", didHydrate);
  6110. validateSelectProps(didHydrate, props);
  6111. break;
  6112. case "textarea":
  6113. checkControlledValueProps("textarea", props),
  6114. listenToNonDelegatedEvent("invalid", didHydrate),
  6115. validateTextareaProps(didHydrate, props),
  6116. initTextarea(
  6117. didHydrate,
  6118. props.value,
  6119. props.defaultValue,
  6120. props.children
  6121. );
  6122. }
  6123. type = props.children;
  6124. ("string" !== typeof type &&
  6125. "number" !== typeof type &&
  6126. "bigint" !== typeof type) ||
  6127. didHydrate.textContent === "" + type ||
  6128. true === props.suppressHydrationWarning ||
  6129. checkForUnmatchedText(didHydrate.textContent, type)
  6130. ? (null != props.popover &&
  6131. (listenToNonDelegatedEvent("beforetoggle", didHydrate),
  6132. listenToNonDelegatedEvent("toggle", didHydrate)),
  6133. null != props.onScroll &&
  6134. listenToNonDelegatedEvent("scroll", didHydrate),
  6135. null != props.onScrollEnd &&
  6136. listenToNonDelegatedEvent("scrollend", didHydrate),
  6137. null != props.onClick && (didHydrate.onclick = noop$1),
  6138. (didHydrate = true))
  6139. : (didHydrate = false);
  6140. didHydrate || throwOnHydrationMismatch(fiber, true);
  6141. }
  6142. function popToNextHostParent(fiber) {
  6143. for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
  6144. switch (hydrationParentFiber.tag) {
  6145. case 5:
  6146. case 31:
  6147. case 13:
  6148. rootOrSingletonContext = false;
  6149. return;
  6150. case 27:
  6151. case 3:
  6152. rootOrSingletonContext = true;
  6153. return;
  6154. default:
  6155. hydrationParentFiber = hydrationParentFiber.return;
  6156. }
  6157. }
  6158. function popHydrationState(fiber) {
  6159. if (fiber !== hydrationParentFiber) return false;
  6160. if (!isHydrating)
  6161. return popToNextHostParent(fiber), (isHydrating = true), false;
  6162. var tag = fiber.tag,
  6163. JSCompiler_temp;
  6164. if ((JSCompiler_temp = 3 !== tag && 27 !== tag)) {
  6165. if ((JSCompiler_temp = 5 === tag))
  6166. (JSCompiler_temp = fiber.type),
  6167. (JSCompiler_temp =
  6168. !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) ||
  6169. shouldSetTextContent(fiber.type, fiber.memoizedProps));
  6170. JSCompiler_temp = !JSCompiler_temp;
  6171. }
  6172. if (JSCompiler_temp && nextHydratableInstance) {
  6173. for (JSCompiler_temp = nextHydratableInstance; JSCompiler_temp; ) {
  6174. var diffNode = buildHydrationDiffNode(fiber, 0),
  6175. description =
  6176. describeHydratableInstanceForDevWarnings(JSCompiler_temp);
  6177. diffNode.serverTail.push(description);
  6178. JSCompiler_temp =
  6179. "Suspense" === description.type
  6180. ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp)
  6181. : getNextHydratable(JSCompiler_temp.nextSibling);
  6182. }
  6183. throwOnHydrationMismatch(fiber);
  6184. }
  6185. popToNextHostParent(fiber);
  6186. if (13 === tag) {
  6187. fiber = fiber.memoizedState;
  6188. fiber = null !== fiber ? fiber.dehydrated : null;
  6189. if (!fiber)
  6190. throw Error(
  6191. "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
  6192. );
  6193. nextHydratableInstance =
  6194. getNextHydratableInstanceAfterHydrationBoundary(fiber);
  6195. } else if (31 === tag) {
  6196. fiber = fiber.memoizedState;
  6197. fiber = null !== fiber ? fiber.dehydrated : null;
  6198. if (!fiber)
  6199. throw Error(
  6200. "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
  6201. );
  6202. nextHydratableInstance =
  6203. getNextHydratableInstanceAfterHydrationBoundary(fiber);
  6204. } else
  6205. 27 === tag
  6206. ? ((tag = nextHydratableInstance),
  6207. isSingletonScope(fiber.type)
  6208. ? ((fiber = previousHydratableOnEnteringScopedSingleton),
  6209. (previousHydratableOnEnteringScopedSingleton = null),
  6210. (nextHydratableInstance = fiber))
  6211. : (nextHydratableInstance = tag))
  6212. : (nextHydratableInstance = hydrationParentFiber
  6213. ? getNextHydratable(fiber.stateNode.nextSibling)
  6214. : null);
  6215. return true;
  6216. }
  6217. function resetHydrationState() {
  6218. nextHydratableInstance = hydrationParentFiber = null;
  6219. didSuspendOrErrorDEV = isHydrating = false;
  6220. }
  6221. function upgradeHydrationErrorsToRecoverable() {
  6222. var queuedErrors = hydrationErrors;
  6223. null !== queuedErrors &&
  6224. (null === workInProgressRootRecoverableErrors
  6225. ? (workInProgressRootRecoverableErrors = queuedErrors)
  6226. : workInProgressRootRecoverableErrors.push.apply(
  6227. workInProgressRootRecoverableErrors,
  6228. queuedErrors
  6229. ),
  6230. (hydrationErrors = null));
  6231. return queuedErrors;
  6232. }
  6233. function queueHydrationError(error) {
  6234. null === hydrationErrors
  6235. ? (hydrationErrors = [error])
  6236. : hydrationErrors.push(error);
  6237. }
  6238. function emitPendingHydrationWarnings() {
  6239. var diffRoot = hydrationDiffRootDEV;
  6240. if (null !== diffRoot) {
  6241. hydrationDiffRootDEV = null;
  6242. for (var diff = describeDiff(diffRoot); 0 < diffRoot.children.length; )
  6243. diffRoot = diffRoot.children[0];
  6244. runWithFiberInDEV(diffRoot.fiber, function () {
  6245. console.error(
  6246. "A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:\n\n- A server/client branch `if (typeof window !== 'undefined')`.\n- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.\n- Date formatting in a user's locale which doesn't match the server.\n- External changing data without sending a snapshot of it along with the HTML.\n- Invalid HTML tag nesting.\n\nIt can also happen if the client has a browser extension installed which messes with the HTML before React loaded.\n\n%s%s",
  6247. "https://react.dev/link/hydration-mismatch",
  6248. diff
  6249. );
  6250. });
  6251. }
  6252. }
  6253. function resetContextDependencies() {
  6254. lastContextDependency = currentlyRenderingFiber$1 = null;
  6255. isDisallowedContextReadInDEV = false;
  6256. }
  6257. function pushProvider(providerFiber, context, nextValue) {
  6258. push(valueCursor, context._currentValue, providerFiber);
  6259. context._currentValue = nextValue;
  6260. push(rendererCursorDEV, context._currentRenderer, providerFiber);
  6261. void 0 !== context._currentRenderer &&
  6262. null !== context._currentRenderer &&
  6263. context._currentRenderer !== rendererSigil &&
  6264. console.error(
  6265. "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
  6266. );
  6267. context._currentRenderer = rendererSigil;
  6268. }
  6269. function popProvider(context, providerFiber) {
  6270. context._currentValue = valueCursor.current;
  6271. var currentRenderer = rendererCursorDEV.current;
  6272. pop(rendererCursorDEV, providerFiber);
  6273. context._currentRenderer = currentRenderer;
  6274. pop(valueCursor, providerFiber);
  6275. }
  6276. function scheduleContextWorkOnParentPath(
  6277. parent,
  6278. renderLanes,
  6279. propagationRoot
  6280. ) {
  6281. for (; null !== parent; ) {
  6282. var alternate = parent.alternate;
  6283. (parent.childLanes & renderLanes) !== renderLanes
  6284. ? ((parent.childLanes |= renderLanes),
  6285. null !== alternate && (alternate.childLanes |= renderLanes))
  6286. : null !== alternate &&
  6287. (alternate.childLanes & renderLanes) !== renderLanes &&
  6288. (alternate.childLanes |= renderLanes);
  6289. if (parent === propagationRoot) break;
  6290. parent = parent.return;
  6291. }
  6292. parent !== propagationRoot &&
  6293. console.error(
  6294. "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue."
  6295. );
  6296. }
  6297. function propagateContextChanges(
  6298. workInProgress,
  6299. contexts,
  6300. renderLanes,
  6301. forcePropagateEntireTree
  6302. ) {
  6303. var fiber = workInProgress.child;
  6304. null !== fiber && (fiber.return = workInProgress);
  6305. for (; null !== fiber; ) {
  6306. var list = fiber.dependencies;
  6307. if (null !== list) {
  6308. var nextFiber = fiber.child;
  6309. list = list.firstContext;
  6310. a: for (; null !== list; ) {
  6311. var dependency = list;
  6312. list = fiber;
  6313. for (var i = 0; i < contexts.length; i++)
  6314. if (dependency.context === contexts[i]) {
  6315. list.lanes |= renderLanes;
  6316. dependency = list.alternate;
  6317. null !== dependency && (dependency.lanes |= renderLanes);
  6318. scheduleContextWorkOnParentPath(
  6319. list.return,
  6320. renderLanes,
  6321. workInProgress
  6322. );
  6323. forcePropagateEntireTree || (nextFiber = null);
  6324. break a;
  6325. }
  6326. list = dependency.next;
  6327. }
  6328. } else if (18 === fiber.tag) {
  6329. nextFiber = fiber.return;
  6330. if (null === nextFiber)
  6331. throw Error(
  6332. "We just came from a parent so we must have had a parent. This is a bug in React."
  6333. );
  6334. nextFiber.lanes |= renderLanes;
  6335. list = nextFiber.alternate;
  6336. null !== list && (list.lanes |= renderLanes);
  6337. scheduleContextWorkOnParentPath(
  6338. nextFiber,
  6339. renderLanes,
  6340. workInProgress
  6341. );
  6342. nextFiber = null;
  6343. } else nextFiber = fiber.child;
  6344. if (null !== nextFiber) nextFiber.return = fiber;
  6345. else
  6346. for (nextFiber = fiber; null !== nextFiber; ) {
  6347. if (nextFiber === workInProgress) {
  6348. nextFiber = null;
  6349. break;
  6350. }
  6351. fiber = nextFiber.sibling;
  6352. if (null !== fiber) {
  6353. fiber.return = nextFiber.return;
  6354. nextFiber = fiber;
  6355. break;
  6356. }
  6357. nextFiber = nextFiber.return;
  6358. }
  6359. fiber = nextFiber;
  6360. }
  6361. }
  6362. function propagateParentContextChanges(
  6363. current,
  6364. workInProgress,
  6365. renderLanes,
  6366. forcePropagateEntireTree
  6367. ) {
  6368. current = null;
  6369. for (
  6370. var parent = workInProgress, isInsidePropagationBailout = false;
  6371. null !== parent;
  6372. ) {
  6373. if (!isInsidePropagationBailout)
  6374. if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true;
  6375. else if (0 !== (parent.flags & 262144)) break;
  6376. if (10 === parent.tag) {
  6377. var currentParent = parent.alternate;
  6378. if (null === currentParent)
  6379. throw Error("Should have a current fiber. This is a bug in React.");
  6380. currentParent = currentParent.memoizedProps;
  6381. if (null !== currentParent) {
  6382. var context = parent.type;
  6383. objectIs(parent.pendingProps.value, currentParent.value) ||
  6384. (null !== current
  6385. ? current.push(context)
  6386. : (current = [context]));
  6387. }
  6388. } else if (parent === hostTransitionProviderCursor.current) {
  6389. currentParent = parent.alternate;
  6390. if (null === currentParent)
  6391. throw Error("Should have a current fiber. This is a bug in React.");
  6392. currentParent.memoizedState.memoizedState !==
  6393. parent.memoizedState.memoizedState &&
  6394. (null !== current
  6395. ? current.push(HostTransitionContext)
  6396. : (current = [HostTransitionContext]));
  6397. }
  6398. parent = parent.return;
  6399. }
  6400. null !== current &&
  6401. propagateContextChanges(
  6402. workInProgress,
  6403. current,
  6404. renderLanes,
  6405. forcePropagateEntireTree
  6406. );
  6407. workInProgress.flags |= 262144;
  6408. }
  6409. function checkIfContextChanged(currentDependencies) {
  6410. for (
  6411. currentDependencies = currentDependencies.firstContext;
  6412. null !== currentDependencies;
  6413. ) {
  6414. if (
  6415. !objectIs(
  6416. currentDependencies.context._currentValue,
  6417. currentDependencies.memoizedValue
  6418. )
  6419. )
  6420. return true;
  6421. currentDependencies = currentDependencies.next;
  6422. }
  6423. return false;
  6424. }
  6425. function prepareToReadContext(workInProgress) {
  6426. currentlyRenderingFiber$1 = workInProgress;
  6427. lastContextDependency = null;
  6428. workInProgress = workInProgress.dependencies;
  6429. null !== workInProgress && (workInProgress.firstContext = null);
  6430. }
  6431. function readContext(context) {
  6432. isDisallowedContextReadInDEV &&
  6433. console.error(
  6434. "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
  6435. );
  6436. return readContextForConsumer(currentlyRenderingFiber$1, context);
  6437. }
  6438. function readContextDuringReconciliation(consumer, context) {
  6439. null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);
  6440. return readContextForConsumer(consumer, context);
  6441. }
  6442. function readContextForConsumer(consumer, context) {
  6443. var value = context._currentValue;
  6444. context = { context: context, memoizedValue: value, next: null };
  6445. if (null === lastContextDependency) {
  6446. if (null === consumer)
  6447. throw Error(
  6448. "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
  6449. );
  6450. lastContextDependency = context;
  6451. consumer.dependencies = {
  6452. lanes: 0,
  6453. firstContext: context,
  6454. _debugThenableState: null
  6455. };
  6456. consumer.flags |= 524288;
  6457. } else lastContextDependency = lastContextDependency.next = context;
  6458. return value;
  6459. }
  6460. function createCache() {
  6461. return {
  6462. controller: new AbortControllerLocal(),
  6463. data: new Map(),
  6464. refCount: 0
  6465. };
  6466. }
  6467. function retainCache(cache) {
  6468. cache.controller.signal.aborted &&
  6469. console.warn(
  6470. "A cache instance was retained after it was already freed. This likely indicates a bug in React."
  6471. );
  6472. cache.refCount++;
  6473. }
  6474. function releaseCache(cache) {
  6475. cache.refCount--;
  6476. 0 > cache.refCount &&
  6477. console.warn(
  6478. "A cache instance was released after it was already freed. This likely indicates a bug in React."
  6479. );
  6480. 0 === cache.refCount &&
  6481. scheduleCallback$2(NormalPriority, function () {
  6482. cache.controller.abort();
  6483. });
  6484. }
  6485. function startUpdateTimerByLane(lane, method, fiber) {
  6486. if (0 !== (lane & 127))
  6487. 0 > blockingUpdateTime &&
  6488. ((blockingUpdateTime = now()),
  6489. (blockingUpdateTask = createTask(method)),
  6490. (blockingUpdateMethodName = method),
  6491. null != fiber &&
  6492. (blockingUpdateComponentName = getComponentNameFromFiber(fiber)),
  6493. (executionContext & (RenderContext | CommitContext)) !== NoContext &&
  6494. ((componentEffectSpawnedUpdate = true),
  6495. (blockingUpdateType = SPAWNED_UPDATE)),
  6496. (lane = resolveEventTimeStamp()),
  6497. (method = resolveEventType()),
  6498. lane !== blockingEventRepeatTime || method !== blockingEventType
  6499. ? (blockingEventRepeatTime = -1.1)
  6500. : null !== method && (blockingUpdateType = SPAWNED_UPDATE),
  6501. (blockingEventTime = lane),
  6502. (blockingEventType = method));
  6503. else if (
  6504. 0 !== (lane & 4194048) &&
  6505. 0 > transitionUpdateTime &&
  6506. ((transitionUpdateTime = now()),
  6507. (transitionUpdateTask = createTask(method)),
  6508. (transitionUpdateMethodName = method),
  6509. null != fiber &&
  6510. (transitionUpdateComponentName = getComponentNameFromFiber(fiber)),
  6511. 0 > transitionStartTime)
  6512. ) {
  6513. lane = resolveEventTimeStamp();
  6514. method = resolveEventType();
  6515. if (
  6516. lane !== transitionEventRepeatTime ||
  6517. method !== transitionEventType
  6518. )
  6519. transitionEventRepeatTime = -1.1;
  6520. transitionEventTime = lane;
  6521. transitionEventType = method;
  6522. }
  6523. }
  6524. function startHostActionTimer(fiber) {
  6525. if (0 > blockingUpdateTime) {
  6526. blockingUpdateTime = now();
  6527. blockingUpdateTask = null != fiber._debugTask ? fiber._debugTask : null;
  6528. (executionContext & (RenderContext | CommitContext)) !== NoContext &&
  6529. (blockingUpdateType = SPAWNED_UPDATE);
  6530. var newEventTime = resolveEventTimeStamp(),
  6531. newEventType = resolveEventType();
  6532. newEventTime !== blockingEventRepeatTime ||
  6533. newEventType !== blockingEventType
  6534. ? (blockingEventRepeatTime = -1.1)
  6535. : null !== newEventType && (blockingUpdateType = SPAWNED_UPDATE);
  6536. blockingEventTime = newEventTime;
  6537. blockingEventType = newEventType;
  6538. }
  6539. if (
  6540. 0 > transitionUpdateTime &&
  6541. ((transitionUpdateTime = now()),
  6542. (transitionUpdateTask =
  6543. null != fiber._debugTask ? fiber._debugTask : null),
  6544. 0 > transitionStartTime)
  6545. ) {
  6546. fiber = resolveEventTimeStamp();
  6547. newEventTime = resolveEventType();
  6548. if (
  6549. fiber !== transitionEventRepeatTime ||
  6550. newEventTime !== transitionEventType
  6551. )
  6552. transitionEventRepeatTime = -1.1;
  6553. transitionEventTime = fiber;
  6554. transitionEventType = newEventTime;
  6555. }
  6556. }
  6557. function pushNestedEffectDurations() {
  6558. var prevEffectDuration = profilerEffectDuration;
  6559. profilerEffectDuration = 0;
  6560. return prevEffectDuration;
  6561. }
  6562. function popNestedEffectDurations(prevEffectDuration) {
  6563. var elapsedTime = profilerEffectDuration;
  6564. profilerEffectDuration = prevEffectDuration;
  6565. return elapsedTime;
  6566. }
  6567. function bubbleNestedEffectDurations(prevEffectDuration) {
  6568. var elapsedTime = profilerEffectDuration;
  6569. profilerEffectDuration += prevEffectDuration;
  6570. return elapsedTime;
  6571. }
  6572. function resetComponentEffectTimers() {
  6573. componentEffectEndTime = componentEffectStartTime = -1.1;
  6574. }
  6575. function pushComponentEffectStart() {
  6576. var prevEffectStart = componentEffectStartTime;
  6577. componentEffectStartTime = -1.1;
  6578. return prevEffectStart;
  6579. }
  6580. function popComponentEffectStart(prevEffectStart) {
  6581. 0 <= prevEffectStart && (componentEffectStartTime = prevEffectStart);
  6582. }
  6583. function pushComponentEffectDuration() {
  6584. var prevEffectDuration = componentEffectDuration;
  6585. componentEffectDuration = -0;
  6586. return prevEffectDuration;
  6587. }
  6588. function popComponentEffectDuration(prevEffectDuration) {
  6589. 0 <= prevEffectDuration && (componentEffectDuration = prevEffectDuration);
  6590. }
  6591. function pushComponentEffectErrors() {
  6592. var prevErrors = componentEffectErrors;
  6593. componentEffectErrors = null;
  6594. return prevErrors;
  6595. }
  6596. function pushComponentEffectDidSpawnUpdate() {
  6597. var prev = componentEffectSpawnedUpdate;
  6598. componentEffectSpawnedUpdate = false;
  6599. return prev;
  6600. }
  6601. function startProfilerTimer(fiber) {
  6602. profilerStartTime = now();
  6603. 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
  6604. }
  6605. function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
  6606. if (0 <= profilerStartTime) {
  6607. var elapsedTime = now() - profilerStartTime;
  6608. fiber.actualDuration += elapsedTime;
  6609. fiber.selfBaseDuration = elapsedTime;
  6610. profilerStartTime = -1;
  6611. }
  6612. }
  6613. function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
  6614. if (0 <= profilerStartTime) {
  6615. var elapsedTime = now() - profilerStartTime;
  6616. fiber.actualDuration += elapsedTime;
  6617. profilerStartTime = -1;
  6618. }
  6619. }
  6620. function recordEffectDuration() {
  6621. if (0 <= profilerStartTime) {
  6622. var endTime = now(),
  6623. elapsedTime = endTime - profilerStartTime;
  6624. profilerStartTime = -1;
  6625. profilerEffectDuration += elapsedTime;
  6626. componentEffectDuration += elapsedTime;
  6627. componentEffectEndTime = endTime;
  6628. }
  6629. }
  6630. function recordEffectError(errorInfo) {
  6631. null === componentEffectErrors && (componentEffectErrors = []);
  6632. componentEffectErrors.push(errorInfo);
  6633. null === commitErrors && (commitErrors = []);
  6634. commitErrors.push(errorInfo);
  6635. }
  6636. function startEffectTimer() {
  6637. profilerStartTime = now();
  6638. 0 > componentEffectStartTime &&
  6639. (componentEffectStartTime = profilerStartTime);
  6640. }
  6641. function transferActualDuration(fiber) {
  6642. for (var child = fiber.child; child; )
  6643. (fiber.actualDuration += child.actualDuration), (child = child.sibling);
  6644. }
  6645. function entangleAsyncAction(transition, thenable) {
  6646. if (null === currentEntangledListeners) {
  6647. var entangledListeners = (currentEntangledListeners = []);
  6648. currentEntangledPendingCount = 0;
  6649. currentEntangledLane = requestTransitionLane();
  6650. currentEntangledActionThenable = {
  6651. status: "pending",
  6652. value: void 0,
  6653. then: function (resolve) {
  6654. entangledListeners.push(resolve);
  6655. }
  6656. };
  6657. }
  6658. currentEntangledPendingCount++;
  6659. thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
  6660. return thenable;
  6661. }
  6662. function pingEngtangledActionScope() {
  6663. if (
  6664. 0 === --currentEntangledPendingCount &&
  6665. (-1 < transitionUpdateTime || (transitionStartTime = -1.1),
  6666. null !== currentEntangledListeners)
  6667. ) {
  6668. null !== currentEntangledActionThenable &&
  6669. (currentEntangledActionThenable.status = "fulfilled");
  6670. var listeners = currentEntangledListeners;
  6671. currentEntangledListeners = null;
  6672. currentEntangledLane = 0;
  6673. currentEntangledActionThenable = null;
  6674. for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
  6675. }
  6676. }
  6677. function chainThenableValue(thenable, result) {
  6678. var listeners = [],
  6679. thenableWithOverride = {
  6680. status: "pending",
  6681. value: null,
  6682. reason: null,
  6683. then: function (resolve) {
  6684. listeners.push(resolve);
  6685. }
  6686. };
  6687. thenable.then(
  6688. function () {
  6689. thenableWithOverride.status = "fulfilled";
  6690. thenableWithOverride.value = result;
  6691. for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
  6692. },
  6693. function (error) {
  6694. thenableWithOverride.status = "rejected";
  6695. thenableWithOverride.reason = error;
  6696. for (error = 0; error < listeners.length; error++)
  6697. (0, listeners[error])(void 0);
  6698. }
  6699. );
  6700. return thenableWithOverride;
  6701. }
  6702. function peekCacheFromPool() {
  6703. var cacheResumedFromPreviousRender = resumedCache.current;
  6704. return null !== cacheResumedFromPreviousRender
  6705. ? cacheResumedFromPreviousRender
  6706. : workInProgressRoot.pooledCache;
  6707. }
  6708. function pushTransition(offscreenWorkInProgress, prevCachePool) {
  6709. null === prevCachePool
  6710. ? push(resumedCache, resumedCache.current, offscreenWorkInProgress)
  6711. : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);
  6712. }
  6713. function getSuspendedCache() {
  6714. var cacheFromPool = peekCacheFromPool();
  6715. return null === cacheFromPool
  6716. ? null
  6717. : { parent: CacheContext._currentValue, pool: cacheFromPool };
  6718. }
  6719. function createThenableState() {
  6720. return { didWarnAboutUncachedPromise: false, thenables: [] };
  6721. }
  6722. function isThenableResolved(thenable) {
  6723. thenable = thenable.status;
  6724. return "fulfilled" === thenable || "rejected" === thenable;
  6725. }
  6726. function trackUsedThenable(thenableState, thenable, index) {
  6727. null !== ReactSharedInternals.actQueue &&
  6728. (ReactSharedInternals.didUsePromise = true);
  6729. var trackedThenables = thenableState.thenables;
  6730. index = trackedThenables[index];
  6731. void 0 === index
  6732. ? trackedThenables.push(thenable)
  6733. : index !== thenable &&
  6734. (thenableState.didWarnAboutUncachedPromise ||
  6735. ((thenableState.didWarnAboutUncachedPromise = true),
  6736. console.error(
  6737. "A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework."
  6738. )),
  6739. thenable.then(noop$1, noop$1),
  6740. (thenable = index));
  6741. if (void 0 === thenable._debugInfo) {
  6742. thenableState = performance.now();
  6743. trackedThenables = thenable.displayName;
  6744. var ioInfo = {
  6745. name:
  6746. "string" === typeof trackedThenables ? trackedThenables : "Promise",
  6747. start: thenableState,
  6748. end: thenableState,
  6749. value: thenable
  6750. };
  6751. thenable._debugInfo = [{ awaited: ioInfo }];
  6752. "fulfilled" !== thenable.status &&
  6753. "rejected" !== thenable.status &&
  6754. ((thenableState = function () {
  6755. ioInfo.end = performance.now();
  6756. }),
  6757. thenable.then(thenableState, thenableState));
  6758. }
  6759. switch (thenable.status) {
  6760. case "fulfilled":
  6761. return thenable.value;
  6762. case "rejected":
  6763. throw (
  6764. ((thenableState = thenable.reason),
  6765. checkIfUseWrappedInAsyncCatch(thenableState),
  6766. thenableState)
  6767. );
  6768. default:
  6769. if ("string" === typeof thenable.status)
  6770. thenable.then(noop$1, noop$1);
  6771. else {
  6772. thenableState = workInProgressRoot;
  6773. if (
  6774. null !== thenableState &&
  6775. 100 < thenableState.shellSuspendCounter
  6776. )
  6777. throw Error(
  6778. "An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
  6779. );
  6780. thenableState = thenable;
  6781. thenableState.status = "pending";
  6782. thenableState.then(
  6783. function (fulfilledValue) {
  6784. if ("pending" === thenable.status) {
  6785. var fulfilledThenable = thenable;
  6786. fulfilledThenable.status = "fulfilled";
  6787. fulfilledThenable.value = fulfilledValue;
  6788. }
  6789. },
  6790. function (error) {
  6791. if ("pending" === thenable.status) {
  6792. var rejectedThenable = thenable;
  6793. rejectedThenable.status = "rejected";
  6794. rejectedThenable.reason = error;
  6795. }
  6796. }
  6797. );
  6798. }
  6799. switch (thenable.status) {
  6800. case "fulfilled":
  6801. return thenable.value;
  6802. case "rejected":
  6803. throw (
  6804. ((thenableState = thenable.reason),
  6805. checkIfUseWrappedInAsyncCatch(thenableState),
  6806. thenableState)
  6807. );
  6808. }
  6809. suspendedThenable = thenable;
  6810. needsToResetSuspendedThenableDEV = true;
  6811. throw SuspenseException;
  6812. }
  6813. }
  6814. function resolveLazy(lazyType) {
  6815. try {
  6816. return callLazyInitInDEV(lazyType);
  6817. } catch (x) {
  6818. if (null !== x && "object" === typeof x && "function" === typeof x.then)
  6819. throw (
  6820. ((suspendedThenable = x),
  6821. (needsToResetSuspendedThenableDEV = true),
  6822. SuspenseException)
  6823. );
  6824. throw x;
  6825. }
  6826. }
  6827. function getSuspendedThenable() {
  6828. if (null === suspendedThenable)
  6829. throw Error(
  6830. "Expected a suspended thenable. This is a bug in React. Please file an issue."
  6831. );
  6832. var thenable = suspendedThenable;
  6833. suspendedThenable = null;
  6834. needsToResetSuspendedThenableDEV = false;
  6835. return thenable;
  6836. }
  6837. function checkIfUseWrappedInAsyncCatch(rejectedReason) {
  6838. if (
  6839. rejectedReason === SuspenseException ||
  6840. rejectedReason === SuspenseActionException
  6841. )
  6842. throw Error(
  6843. "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server."
  6844. );
  6845. }
  6846. function pushDebugInfo(debugInfo) {
  6847. var previousDebugInfo = currentDebugInfo;
  6848. null != debugInfo &&
  6849. (currentDebugInfo =
  6850. null === previousDebugInfo
  6851. ? debugInfo
  6852. : previousDebugInfo.concat(debugInfo));
  6853. return previousDebugInfo;
  6854. }
  6855. function getCurrentDebugTask() {
  6856. var debugInfo = currentDebugInfo;
  6857. if (null != debugInfo)
  6858. for (var i = debugInfo.length - 1; 0 <= i; i--)
  6859. if (null != debugInfo[i].name) {
  6860. var debugTask = debugInfo[i].debugTask;
  6861. if (null != debugTask) return debugTask;
  6862. }
  6863. return null;
  6864. }
  6865. function validateFragmentProps(element, fiber, returnFiber) {
  6866. for (var keys = Object.keys(element.props), i = 0; i < keys.length; i++) {
  6867. var key = keys[i];
  6868. if ("children" !== key && "key" !== key) {
  6869. null === fiber &&
  6870. ((fiber = createFiberFromElement(element, returnFiber.mode, 0)),
  6871. (fiber._debugInfo = currentDebugInfo),
  6872. (fiber.return = returnFiber));
  6873. runWithFiberInDEV(
  6874. fiber,
  6875. function (erroredKey) {
  6876. console.error(
  6877. "Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
  6878. erroredKey
  6879. );
  6880. },
  6881. key
  6882. );
  6883. break;
  6884. }
  6885. }
  6886. }
  6887. function unwrapThenable(thenable) {
  6888. var index = thenableIndexCounter$1;
  6889. thenableIndexCounter$1 += 1;
  6890. null === thenableState$1 && (thenableState$1 = createThenableState());
  6891. return trackUsedThenable(thenableState$1, thenable, index);
  6892. }
  6893. function coerceRef(workInProgress, element) {
  6894. element = element.props.ref;
  6895. workInProgress.ref = void 0 !== element ? element : null;
  6896. }
  6897. function throwOnInvalidObjectTypeImpl(returnFiber, newChild) {
  6898. if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
  6899. throw Error(
  6900. 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.'
  6901. );
  6902. returnFiber = Object.prototype.toString.call(newChild);
  6903. throw Error(
  6904. "Objects are not valid as a React child (found: " +
  6905. ("[object Object]" === returnFiber
  6906. ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
  6907. : returnFiber) +
  6908. "). If you meant to render a collection of children, use an array instead."
  6909. );
  6910. }
  6911. function throwOnInvalidObjectType(returnFiber, newChild) {
  6912. var debugTask = getCurrentDebugTask();
  6913. null !== debugTask
  6914. ? debugTask.run(
  6915. throwOnInvalidObjectTypeImpl.bind(null, returnFiber, newChild)
  6916. )
  6917. : throwOnInvalidObjectTypeImpl(returnFiber, newChild);
  6918. }
  6919. function warnOnFunctionTypeImpl(returnFiber, invalidChild) {
  6920. var parentName = getComponentNameFromFiber(returnFiber) || "Component";
  6921. ownerHasFunctionTypeWarning[parentName] ||
  6922. ((ownerHasFunctionTypeWarning[parentName] = true),
  6923. (invalidChild =
  6924. invalidChild.displayName || invalidChild.name || "Component"),
  6925. 3 === returnFiber.tag
  6926. ? console.error(
  6927. "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n root.render(%s)",
  6928. invalidChild,
  6929. invalidChild,
  6930. invalidChild
  6931. )
  6932. : console.error(
  6933. "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\n <%s>{%s}</%s>",
  6934. invalidChild,
  6935. invalidChild,
  6936. parentName,
  6937. invalidChild,
  6938. parentName
  6939. ));
  6940. }
  6941. function warnOnFunctionType(returnFiber, invalidChild) {
  6942. var debugTask = getCurrentDebugTask();
  6943. null !== debugTask
  6944. ? debugTask.run(
  6945. warnOnFunctionTypeImpl.bind(null, returnFiber, invalidChild)
  6946. )
  6947. : warnOnFunctionTypeImpl(returnFiber, invalidChild);
  6948. }
  6949. function warnOnSymbolTypeImpl(returnFiber, invalidChild) {
  6950. var parentName = getComponentNameFromFiber(returnFiber) || "Component";
  6951. ownerHasSymbolTypeWarning[parentName] ||
  6952. ((ownerHasSymbolTypeWarning[parentName] = true),
  6953. (invalidChild = String(invalidChild)),
  6954. 3 === returnFiber.tag
  6955. ? console.error(
  6956. "Symbols are not valid as a React child.\n root.render(%s)",
  6957. invalidChild
  6958. )
  6959. : console.error(
  6960. "Symbols are not valid as a React child.\n <%s>%s</%s>",
  6961. parentName,
  6962. invalidChild,
  6963. parentName
  6964. ));
  6965. }
  6966. function warnOnSymbolType(returnFiber, invalidChild) {
  6967. var debugTask = getCurrentDebugTask();
  6968. null !== debugTask
  6969. ? debugTask.run(
  6970. warnOnSymbolTypeImpl.bind(null, returnFiber, invalidChild)
  6971. )
  6972. : warnOnSymbolTypeImpl(returnFiber, invalidChild);
  6973. }
  6974. function createChildReconciler(shouldTrackSideEffects) {
  6975. function deleteChild(returnFiber, childToDelete) {
  6976. if (shouldTrackSideEffects) {
  6977. var deletions = returnFiber.deletions;
  6978. null === deletions
  6979. ? ((returnFiber.deletions = [childToDelete]),
  6980. (returnFiber.flags |= 16))
  6981. : deletions.push(childToDelete);
  6982. }
  6983. }
  6984. function deleteRemainingChildren(returnFiber, currentFirstChild) {
  6985. if (!shouldTrackSideEffects) return null;
  6986. for (; null !== currentFirstChild; )
  6987. deleteChild(returnFiber, currentFirstChild),
  6988. (currentFirstChild = currentFirstChild.sibling);
  6989. return null;
  6990. }
  6991. function mapRemainingChildren(currentFirstChild) {
  6992. for (var existingChildren = new Map(); null !== currentFirstChild; )
  6993. null !== currentFirstChild.key
  6994. ? existingChildren.set(currentFirstChild.key, currentFirstChild)
  6995. : existingChildren.set(currentFirstChild.index, currentFirstChild),
  6996. (currentFirstChild = currentFirstChild.sibling);
  6997. return existingChildren;
  6998. }
  6999. function useFiber(fiber, pendingProps) {
  7000. fiber = createWorkInProgress(fiber, pendingProps);
  7001. fiber.index = 0;
  7002. fiber.sibling = null;
  7003. return fiber;
  7004. }
  7005. function placeChild(newFiber, lastPlacedIndex, newIndex) {
  7006. newFiber.index = newIndex;
  7007. if (!shouldTrackSideEffects)
  7008. return (newFiber.flags |= 1048576), lastPlacedIndex;
  7009. newIndex = newFiber.alternate;
  7010. if (null !== newIndex)
  7011. return (
  7012. (newIndex = newIndex.index),
  7013. newIndex < lastPlacedIndex
  7014. ? ((newFiber.flags |= 67108866), lastPlacedIndex)
  7015. : newIndex
  7016. );
  7017. newFiber.flags |= 67108866;
  7018. return lastPlacedIndex;
  7019. }
  7020. function placeSingleChild(newFiber) {
  7021. shouldTrackSideEffects &&
  7022. null === newFiber.alternate &&
  7023. (newFiber.flags |= 67108866);
  7024. return newFiber;
  7025. }
  7026. function updateTextNode(returnFiber, current, textContent, lanes) {
  7027. if (null === current || 6 !== current.tag)
  7028. return (
  7029. (current = createFiberFromText(
  7030. textContent,
  7031. returnFiber.mode,
  7032. lanes
  7033. )),
  7034. (current.return = returnFiber),
  7035. (current._debugOwner = returnFiber),
  7036. (current._debugTask = returnFiber._debugTask),
  7037. (current._debugInfo = currentDebugInfo),
  7038. current
  7039. );
  7040. current = useFiber(current, textContent);
  7041. current.return = returnFiber;
  7042. current._debugInfo = currentDebugInfo;
  7043. return current;
  7044. }
  7045. function updateElement(returnFiber, current, element, lanes) {
  7046. var elementType = element.type;
  7047. if (elementType === REACT_FRAGMENT_TYPE)
  7048. return (
  7049. (current = updateFragment(
  7050. returnFiber,
  7051. current,
  7052. element.props.children,
  7053. lanes,
  7054. element.key
  7055. )),
  7056. validateFragmentProps(element, current, returnFiber),
  7057. current
  7058. );
  7059. if (
  7060. null !== current &&
  7061. (current.elementType === elementType ||
  7062. isCompatibleFamilyForHotReloading(current, element) ||
  7063. ("object" === typeof elementType &&
  7064. null !== elementType &&
  7065. elementType.$$typeof === REACT_LAZY_TYPE &&
  7066. resolveLazy(elementType) === current.type))
  7067. )
  7068. return (
  7069. (current = useFiber(current, element.props)),
  7070. coerceRef(current, element),
  7071. (current.return = returnFiber),
  7072. (current._debugOwner = element._owner),
  7073. (current._debugInfo = currentDebugInfo),
  7074. current
  7075. );
  7076. current = createFiberFromElement(element, returnFiber.mode, lanes);
  7077. coerceRef(current, element);
  7078. current.return = returnFiber;
  7079. current._debugInfo = currentDebugInfo;
  7080. return current;
  7081. }
  7082. function updatePortal(returnFiber, current, portal, lanes) {
  7083. if (
  7084. null === current ||
  7085. 4 !== current.tag ||
  7086. current.stateNode.containerInfo !== portal.containerInfo ||
  7087. current.stateNode.implementation !== portal.implementation
  7088. )
  7089. return (
  7090. (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),
  7091. (current.return = returnFiber),
  7092. (current._debugInfo = currentDebugInfo),
  7093. current
  7094. );
  7095. current = useFiber(current, portal.children || []);
  7096. current.return = returnFiber;
  7097. current._debugInfo = currentDebugInfo;
  7098. return current;
  7099. }
  7100. function updateFragment(returnFiber, current, fragment, lanes, key) {
  7101. if (null === current || 7 !== current.tag)
  7102. return (
  7103. (current = createFiberFromFragment(
  7104. fragment,
  7105. returnFiber.mode,
  7106. lanes,
  7107. key
  7108. )),
  7109. (current.return = returnFiber),
  7110. (current._debugOwner = returnFiber),
  7111. (current._debugTask = returnFiber._debugTask),
  7112. (current._debugInfo = currentDebugInfo),
  7113. current
  7114. );
  7115. current = useFiber(current, fragment);
  7116. current.return = returnFiber;
  7117. current._debugInfo = currentDebugInfo;
  7118. return current;
  7119. }
  7120. function createChild(returnFiber, newChild, lanes) {
  7121. if (
  7122. ("string" === typeof newChild && "" !== newChild) ||
  7123. "number" === typeof newChild ||
  7124. "bigint" === typeof newChild
  7125. )
  7126. return (
  7127. (newChild = createFiberFromText(
  7128. "" + newChild,
  7129. returnFiber.mode,
  7130. lanes
  7131. )),
  7132. (newChild.return = returnFiber),
  7133. (newChild._debugOwner = returnFiber),
  7134. (newChild._debugTask = returnFiber._debugTask),
  7135. (newChild._debugInfo = currentDebugInfo),
  7136. newChild
  7137. );
  7138. if ("object" === typeof newChild && null !== newChild) {
  7139. switch (newChild.$$typeof) {
  7140. case REACT_ELEMENT_TYPE:
  7141. return (
  7142. (lanes = createFiberFromElement(
  7143. newChild,
  7144. returnFiber.mode,
  7145. lanes
  7146. )),
  7147. coerceRef(lanes, newChild),
  7148. (lanes.return = returnFiber),
  7149. (returnFiber = pushDebugInfo(newChild._debugInfo)),
  7150. (lanes._debugInfo = currentDebugInfo),
  7151. (currentDebugInfo = returnFiber),
  7152. lanes
  7153. );
  7154. case REACT_PORTAL_TYPE:
  7155. return (
  7156. (newChild = createFiberFromPortal(
  7157. newChild,
  7158. returnFiber.mode,
  7159. lanes
  7160. )),
  7161. (newChild.return = returnFiber),
  7162. (newChild._debugInfo = currentDebugInfo),
  7163. newChild
  7164. );
  7165. case REACT_LAZY_TYPE:
  7166. var _prevDebugInfo = pushDebugInfo(newChild._debugInfo);
  7167. newChild = resolveLazy(newChild);
  7168. returnFiber = createChild(returnFiber, newChild, lanes);
  7169. currentDebugInfo = _prevDebugInfo;
  7170. return returnFiber;
  7171. }
  7172. if (isArrayImpl(newChild) || getIteratorFn(newChild))
  7173. return (
  7174. (lanes = createFiberFromFragment(
  7175. newChild,
  7176. returnFiber.mode,
  7177. lanes,
  7178. null
  7179. )),
  7180. (lanes.return = returnFiber),
  7181. (lanes._debugOwner = returnFiber),
  7182. (lanes._debugTask = returnFiber._debugTask),
  7183. (returnFiber = pushDebugInfo(newChild._debugInfo)),
  7184. (lanes._debugInfo = currentDebugInfo),
  7185. (currentDebugInfo = returnFiber),
  7186. lanes
  7187. );
  7188. if ("function" === typeof newChild.then)
  7189. return (
  7190. (_prevDebugInfo = pushDebugInfo(newChild._debugInfo)),
  7191. (returnFiber = createChild(
  7192. returnFiber,
  7193. unwrapThenable(newChild),
  7194. lanes
  7195. )),
  7196. (currentDebugInfo = _prevDebugInfo),
  7197. returnFiber
  7198. );
  7199. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  7200. return createChild(
  7201. returnFiber,
  7202. readContextDuringReconciliation(returnFiber, newChild),
  7203. lanes
  7204. );
  7205. throwOnInvalidObjectType(returnFiber, newChild);
  7206. }
  7207. "function" === typeof newChild &&
  7208. warnOnFunctionType(returnFiber, newChild);
  7209. "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
  7210. return null;
  7211. }
  7212. function updateSlot(returnFiber, oldFiber, newChild, lanes) {
  7213. var key = null !== oldFiber ? oldFiber.key : null;
  7214. if (
  7215. ("string" === typeof newChild && "" !== newChild) ||
  7216. "number" === typeof newChild ||
  7217. "bigint" === typeof newChild
  7218. )
  7219. return null !== key
  7220. ? null
  7221. : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
  7222. if ("object" === typeof newChild && null !== newChild) {
  7223. switch (newChild.$$typeof) {
  7224. case REACT_ELEMENT_TYPE:
  7225. return newChild.key === key
  7226. ? ((key = pushDebugInfo(newChild._debugInfo)),
  7227. (returnFiber = updateElement(
  7228. returnFiber,
  7229. oldFiber,
  7230. newChild,
  7231. lanes
  7232. )),
  7233. (currentDebugInfo = key),
  7234. returnFiber)
  7235. : null;
  7236. case REACT_PORTAL_TYPE:
  7237. return newChild.key === key
  7238. ? updatePortal(returnFiber, oldFiber, newChild, lanes)
  7239. : null;
  7240. case REACT_LAZY_TYPE:
  7241. return (
  7242. (key = pushDebugInfo(newChild._debugInfo)),
  7243. (newChild = resolveLazy(newChild)),
  7244. (returnFiber = updateSlot(
  7245. returnFiber,
  7246. oldFiber,
  7247. newChild,
  7248. lanes
  7249. )),
  7250. (currentDebugInfo = key),
  7251. returnFiber
  7252. );
  7253. }
  7254. if (isArrayImpl(newChild) || getIteratorFn(newChild)) {
  7255. if (null !== key) return null;
  7256. key = pushDebugInfo(newChild._debugInfo);
  7257. returnFiber = updateFragment(
  7258. returnFiber,
  7259. oldFiber,
  7260. newChild,
  7261. lanes,
  7262. null
  7263. );
  7264. currentDebugInfo = key;
  7265. return returnFiber;
  7266. }
  7267. if ("function" === typeof newChild.then)
  7268. return (
  7269. (key = pushDebugInfo(newChild._debugInfo)),
  7270. (returnFiber = updateSlot(
  7271. returnFiber,
  7272. oldFiber,
  7273. unwrapThenable(newChild),
  7274. lanes
  7275. )),
  7276. (currentDebugInfo = key),
  7277. returnFiber
  7278. );
  7279. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  7280. return updateSlot(
  7281. returnFiber,
  7282. oldFiber,
  7283. readContextDuringReconciliation(returnFiber, newChild),
  7284. lanes
  7285. );
  7286. throwOnInvalidObjectType(returnFiber, newChild);
  7287. }
  7288. "function" === typeof newChild &&
  7289. warnOnFunctionType(returnFiber, newChild);
  7290. "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
  7291. return null;
  7292. }
  7293. function updateFromMap(
  7294. existingChildren,
  7295. returnFiber,
  7296. newIdx,
  7297. newChild,
  7298. lanes
  7299. ) {
  7300. if (
  7301. ("string" === typeof newChild && "" !== newChild) ||
  7302. "number" === typeof newChild ||
  7303. "bigint" === typeof newChild
  7304. )
  7305. return (
  7306. (existingChildren = existingChildren.get(newIdx) || null),
  7307. updateTextNode(returnFiber, existingChildren, "" + newChild, lanes)
  7308. );
  7309. if ("object" === typeof newChild && null !== newChild) {
  7310. switch (newChild.$$typeof) {
  7311. case REACT_ELEMENT_TYPE:
  7312. return (
  7313. (newIdx =
  7314. existingChildren.get(
  7315. null === newChild.key ? newIdx : newChild.key
  7316. ) || null),
  7317. (existingChildren = pushDebugInfo(newChild._debugInfo)),
  7318. (returnFiber = updateElement(
  7319. returnFiber,
  7320. newIdx,
  7321. newChild,
  7322. lanes
  7323. )),
  7324. (currentDebugInfo = existingChildren),
  7325. returnFiber
  7326. );
  7327. case REACT_PORTAL_TYPE:
  7328. return (
  7329. (existingChildren =
  7330. existingChildren.get(
  7331. null === newChild.key ? newIdx : newChild.key
  7332. ) || null),
  7333. updatePortal(returnFiber, existingChildren, newChild, lanes)
  7334. );
  7335. case REACT_LAZY_TYPE:
  7336. var _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo);
  7337. newChild = resolveLazy(newChild);
  7338. returnFiber = updateFromMap(
  7339. existingChildren,
  7340. returnFiber,
  7341. newIdx,
  7342. newChild,
  7343. lanes
  7344. );
  7345. currentDebugInfo = _prevDebugInfo7;
  7346. return returnFiber;
  7347. }
  7348. if (isArrayImpl(newChild) || getIteratorFn(newChild))
  7349. return (
  7350. (newIdx = existingChildren.get(newIdx) || null),
  7351. (existingChildren = pushDebugInfo(newChild._debugInfo)),
  7352. (returnFiber = updateFragment(
  7353. returnFiber,
  7354. newIdx,
  7355. newChild,
  7356. lanes,
  7357. null
  7358. )),
  7359. (currentDebugInfo = existingChildren),
  7360. returnFiber
  7361. );
  7362. if ("function" === typeof newChild.then)
  7363. return (
  7364. (_prevDebugInfo7 = pushDebugInfo(newChild._debugInfo)),
  7365. (returnFiber = updateFromMap(
  7366. existingChildren,
  7367. returnFiber,
  7368. newIdx,
  7369. unwrapThenable(newChild),
  7370. lanes
  7371. )),
  7372. (currentDebugInfo = _prevDebugInfo7),
  7373. returnFiber
  7374. );
  7375. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  7376. return updateFromMap(
  7377. existingChildren,
  7378. returnFiber,
  7379. newIdx,
  7380. readContextDuringReconciliation(returnFiber, newChild),
  7381. lanes
  7382. );
  7383. throwOnInvalidObjectType(returnFiber, newChild);
  7384. }
  7385. "function" === typeof newChild &&
  7386. warnOnFunctionType(returnFiber, newChild);
  7387. "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
  7388. return null;
  7389. }
  7390. function warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys) {
  7391. if ("object" !== typeof child || null === child) return knownKeys;
  7392. switch (child.$$typeof) {
  7393. case REACT_ELEMENT_TYPE:
  7394. case REACT_PORTAL_TYPE:
  7395. warnForMissingKey(returnFiber, workInProgress, child);
  7396. var key = child.key;
  7397. if ("string" !== typeof key) break;
  7398. if (null === knownKeys) {
  7399. knownKeys = new Set();
  7400. knownKeys.add(key);
  7401. break;
  7402. }
  7403. if (!knownKeys.has(key)) {
  7404. knownKeys.add(key);
  7405. break;
  7406. }
  7407. runWithFiberInDEV(workInProgress, function () {
  7408. console.error(
  7409. "Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.",
  7410. key
  7411. );
  7412. });
  7413. break;
  7414. case REACT_LAZY_TYPE:
  7415. (child = resolveLazy(child)),
  7416. warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys);
  7417. }
  7418. return knownKeys;
  7419. }
  7420. function reconcileChildrenArray(
  7421. returnFiber,
  7422. currentFirstChild,
  7423. newChildren,
  7424. lanes
  7425. ) {
  7426. for (
  7427. var knownKeys = null,
  7428. resultingFirstChild = null,
  7429. previousNewFiber = null,
  7430. oldFiber = currentFirstChild,
  7431. newIdx = (currentFirstChild = 0),
  7432. nextOldFiber = null;
  7433. null !== oldFiber && newIdx < newChildren.length;
  7434. newIdx++
  7435. ) {
  7436. oldFiber.index > newIdx
  7437. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  7438. : (nextOldFiber = oldFiber.sibling);
  7439. var newFiber = updateSlot(
  7440. returnFiber,
  7441. oldFiber,
  7442. newChildren[newIdx],
  7443. lanes
  7444. );
  7445. if (null === newFiber) {
  7446. null === oldFiber && (oldFiber = nextOldFiber);
  7447. break;
  7448. }
  7449. knownKeys = warnOnInvalidKey(
  7450. returnFiber,
  7451. newFiber,
  7452. newChildren[newIdx],
  7453. knownKeys
  7454. );
  7455. shouldTrackSideEffects &&
  7456. oldFiber &&
  7457. null === newFiber.alternate &&
  7458. deleteChild(returnFiber, oldFiber);
  7459. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  7460. null === previousNewFiber
  7461. ? (resultingFirstChild = newFiber)
  7462. : (previousNewFiber.sibling = newFiber);
  7463. previousNewFiber = newFiber;
  7464. oldFiber = nextOldFiber;
  7465. }
  7466. if (newIdx === newChildren.length)
  7467. return (
  7468. deleteRemainingChildren(returnFiber, oldFiber),
  7469. isHydrating && pushTreeFork(returnFiber, newIdx),
  7470. resultingFirstChild
  7471. );
  7472. if (null === oldFiber) {
  7473. for (; newIdx < newChildren.length; newIdx++)
  7474. (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),
  7475. null !== oldFiber &&
  7476. ((knownKeys = warnOnInvalidKey(
  7477. returnFiber,
  7478. oldFiber,
  7479. newChildren[newIdx],
  7480. knownKeys
  7481. )),
  7482. (currentFirstChild = placeChild(
  7483. oldFiber,
  7484. currentFirstChild,
  7485. newIdx
  7486. )),
  7487. null === previousNewFiber
  7488. ? (resultingFirstChild = oldFiber)
  7489. : (previousNewFiber.sibling = oldFiber),
  7490. (previousNewFiber = oldFiber));
  7491. isHydrating && pushTreeFork(returnFiber, newIdx);
  7492. return resultingFirstChild;
  7493. }
  7494. for (
  7495. oldFiber = mapRemainingChildren(oldFiber);
  7496. newIdx < newChildren.length;
  7497. newIdx++
  7498. )
  7499. (nextOldFiber = updateFromMap(
  7500. oldFiber,
  7501. returnFiber,
  7502. newIdx,
  7503. newChildren[newIdx],
  7504. lanes
  7505. )),
  7506. null !== nextOldFiber &&
  7507. ((knownKeys = warnOnInvalidKey(
  7508. returnFiber,
  7509. nextOldFiber,
  7510. newChildren[newIdx],
  7511. knownKeys
  7512. )),
  7513. shouldTrackSideEffects &&
  7514. null !== nextOldFiber.alternate &&
  7515. oldFiber.delete(
  7516. null === nextOldFiber.key ? newIdx : nextOldFiber.key
  7517. ),
  7518. (currentFirstChild = placeChild(
  7519. nextOldFiber,
  7520. currentFirstChild,
  7521. newIdx
  7522. )),
  7523. null === previousNewFiber
  7524. ? (resultingFirstChild = nextOldFiber)
  7525. : (previousNewFiber.sibling = nextOldFiber),
  7526. (previousNewFiber = nextOldFiber));
  7527. shouldTrackSideEffects &&
  7528. oldFiber.forEach(function (child) {
  7529. return deleteChild(returnFiber, child);
  7530. });
  7531. isHydrating && pushTreeFork(returnFiber, newIdx);
  7532. return resultingFirstChild;
  7533. }
  7534. function reconcileChildrenIterator(
  7535. returnFiber,
  7536. currentFirstChild,
  7537. newChildren,
  7538. lanes
  7539. ) {
  7540. if (null == newChildren)
  7541. throw Error("An iterable object provided no iterator.");
  7542. for (
  7543. var resultingFirstChild = null,
  7544. previousNewFiber = null,
  7545. oldFiber = currentFirstChild,
  7546. newIdx = (currentFirstChild = 0),
  7547. nextOldFiber = null,
  7548. knownKeys = null,
  7549. step = newChildren.next();
  7550. null !== oldFiber && !step.done;
  7551. newIdx++, step = newChildren.next()
  7552. ) {
  7553. oldFiber.index > newIdx
  7554. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  7555. : (nextOldFiber = oldFiber.sibling);
  7556. var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
  7557. if (null === newFiber) {
  7558. null === oldFiber && (oldFiber = nextOldFiber);
  7559. break;
  7560. }
  7561. knownKeys = warnOnInvalidKey(
  7562. returnFiber,
  7563. newFiber,
  7564. step.value,
  7565. knownKeys
  7566. );
  7567. shouldTrackSideEffects &&
  7568. oldFiber &&
  7569. null === newFiber.alternate &&
  7570. deleteChild(returnFiber, oldFiber);
  7571. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  7572. null === previousNewFiber
  7573. ? (resultingFirstChild = newFiber)
  7574. : (previousNewFiber.sibling = newFiber);
  7575. previousNewFiber = newFiber;
  7576. oldFiber = nextOldFiber;
  7577. }
  7578. if (step.done)
  7579. return (
  7580. deleteRemainingChildren(returnFiber, oldFiber),
  7581. isHydrating && pushTreeFork(returnFiber, newIdx),
  7582. resultingFirstChild
  7583. );
  7584. if (null === oldFiber) {
  7585. for (; !step.done; newIdx++, step = newChildren.next())
  7586. (oldFiber = createChild(returnFiber, step.value, lanes)),
  7587. null !== oldFiber &&
  7588. ((knownKeys = warnOnInvalidKey(
  7589. returnFiber,
  7590. oldFiber,
  7591. step.value,
  7592. knownKeys
  7593. )),
  7594. (currentFirstChild = placeChild(
  7595. oldFiber,
  7596. currentFirstChild,
  7597. newIdx
  7598. )),
  7599. null === previousNewFiber
  7600. ? (resultingFirstChild = oldFiber)
  7601. : (previousNewFiber.sibling = oldFiber),
  7602. (previousNewFiber = oldFiber));
  7603. isHydrating && pushTreeFork(returnFiber, newIdx);
  7604. return resultingFirstChild;
  7605. }
  7606. for (
  7607. oldFiber = mapRemainingChildren(oldFiber);
  7608. !step.done;
  7609. newIdx++, step = newChildren.next()
  7610. )
  7611. (nextOldFiber = updateFromMap(
  7612. oldFiber,
  7613. returnFiber,
  7614. newIdx,
  7615. step.value,
  7616. lanes
  7617. )),
  7618. null !== nextOldFiber &&
  7619. ((knownKeys = warnOnInvalidKey(
  7620. returnFiber,
  7621. nextOldFiber,
  7622. step.value,
  7623. knownKeys
  7624. )),
  7625. shouldTrackSideEffects &&
  7626. null !== nextOldFiber.alternate &&
  7627. oldFiber.delete(
  7628. null === nextOldFiber.key ? newIdx : nextOldFiber.key
  7629. ),
  7630. (currentFirstChild = placeChild(
  7631. nextOldFiber,
  7632. currentFirstChild,
  7633. newIdx
  7634. )),
  7635. null === previousNewFiber
  7636. ? (resultingFirstChild = nextOldFiber)
  7637. : (previousNewFiber.sibling = nextOldFiber),
  7638. (previousNewFiber = nextOldFiber));
  7639. shouldTrackSideEffects &&
  7640. oldFiber.forEach(function (child) {
  7641. return deleteChild(returnFiber, child);
  7642. });
  7643. isHydrating && pushTreeFork(returnFiber, newIdx);
  7644. return resultingFirstChild;
  7645. }
  7646. function reconcileChildFibersImpl(
  7647. returnFiber,
  7648. currentFirstChild,
  7649. newChild,
  7650. lanes
  7651. ) {
  7652. "object" === typeof newChild &&
  7653. null !== newChild &&
  7654. newChild.type === REACT_FRAGMENT_TYPE &&
  7655. null === newChild.key &&
  7656. (validateFragmentProps(newChild, null, returnFiber),
  7657. (newChild = newChild.props.children));
  7658. if ("object" === typeof newChild && null !== newChild) {
  7659. switch (newChild.$$typeof) {
  7660. case REACT_ELEMENT_TYPE:
  7661. var prevDebugInfo = pushDebugInfo(newChild._debugInfo);
  7662. a: {
  7663. for (var key = newChild.key; null !== currentFirstChild; ) {
  7664. if (currentFirstChild.key === key) {
  7665. key = newChild.type;
  7666. if (key === REACT_FRAGMENT_TYPE) {
  7667. if (7 === currentFirstChild.tag) {
  7668. deleteRemainingChildren(
  7669. returnFiber,
  7670. currentFirstChild.sibling
  7671. );
  7672. lanes = useFiber(
  7673. currentFirstChild,
  7674. newChild.props.children
  7675. );
  7676. lanes.return = returnFiber;
  7677. lanes._debugOwner = newChild._owner;
  7678. lanes._debugInfo = currentDebugInfo;
  7679. validateFragmentProps(newChild, lanes, returnFiber);
  7680. returnFiber = lanes;
  7681. break a;
  7682. }
  7683. } else if (
  7684. currentFirstChild.elementType === key ||
  7685. isCompatibleFamilyForHotReloading(
  7686. currentFirstChild,
  7687. newChild
  7688. ) ||
  7689. ("object" === typeof key &&
  7690. null !== key &&
  7691. key.$$typeof === REACT_LAZY_TYPE &&
  7692. resolveLazy(key) === currentFirstChild.type)
  7693. ) {
  7694. deleteRemainingChildren(
  7695. returnFiber,
  7696. currentFirstChild.sibling
  7697. );
  7698. lanes = useFiber(currentFirstChild, newChild.props);
  7699. coerceRef(lanes, newChild);
  7700. lanes.return = returnFiber;
  7701. lanes._debugOwner = newChild._owner;
  7702. lanes._debugInfo = currentDebugInfo;
  7703. returnFiber = lanes;
  7704. break a;
  7705. }
  7706. deleteRemainingChildren(returnFiber, currentFirstChild);
  7707. break;
  7708. } else deleteChild(returnFiber, currentFirstChild);
  7709. currentFirstChild = currentFirstChild.sibling;
  7710. }
  7711. newChild.type === REACT_FRAGMENT_TYPE
  7712. ? ((lanes = createFiberFromFragment(
  7713. newChild.props.children,
  7714. returnFiber.mode,
  7715. lanes,
  7716. newChild.key
  7717. )),
  7718. (lanes.return = returnFiber),
  7719. (lanes._debugOwner = returnFiber),
  7720. (lanes._debugTask = returnFiber._debugTask),
  7721. (lanes._debugInfo = currentDebugInfo),
  7722. validateFragmentProps(newChild, lanes, returnFiber),
  7723. (returnFiber = lanes))
  7724. : ((lanes = createFiberFromElement(
  7725. newChild,
  7726. returnFiber.mode,
  7727. lanes
  7728. )),
  7729. coerceRef(lanes, newChild),
  7730. (lanes.return = returnFiber),
  7731. (lanes._debugInfo = currentDebugInfo),
  7732. (returnFiber = lanes));
  7733. }
  7734. returnFiber = placeSingleChild(returnFiber);
  7735. currentDebugInfo = prevDebugInfo;
  7736. return returnFiber;
  7737. case REACT_PORTAL_TYPE:
  7738. a: {
  7739. prevDebugInfo = newChild;
  7740. for (
  7741. newChild = prevDebugInfo.key;
  7742. null !== currentFirstChild;
  7743. ) {
  7744. if (currentFirstChild.key === newChild)
  7745. if (
  7746. 4 === currentFirstChild.tag &&
  7747. currentFirstChild.stateNode.containerInfo ===
  7748. prevDebugInfo.containerInfo &&
  7749. currentFirstChild.stateNode.implementation ===
  7750. prevDebugInfo.implementation
  7751. ) {
  7752. deleteRemainingChildren(
  7753. returnFiber,
  7754. currentFirstChild.sibling
  7755. );
  7756. lanes = useFiber(
  7757. currentFirstChild,
  7758. prevDebugInfo.children || []
  7759. );
  7760. lanes.return = returnFiber;
  7761. returnFiber = lanes;
  7762. break a;
  7763. } else {
  7764. deleteRemainingChildren(returnFiber, currentFirstChild);
  7765. break;
  7766. }
  7767. else deleteChild(returnFiber, currentFirstChild);
  7768. currentFirstChild = currentFirstChild.sibling;
  7769. }
  7770. lanes = createFiberFromPortal(
  7771. prevDebugInfo,
  7772. returnFiber.mode,
  7773. lanes
  7774. );
  7775. lanes.return = returnFiber;
  7776. returnFiber = lanes;
  7777. }
  7778. return placeSingleChild(returnFiber);
  7779. case REACT_LAZY_TYPE:
  7780. return (
  7781. (prevDebugInfo = pushDebugInfo(newChild._debugInfo)),
  7782. (newChild = resolveLazy(newChild)),
  7783. (returnFiber = reconcileChildFibersImpl(
  7784. returnFiber,
  7785. currentFirstChild,
  7786. newChild,
  7787. lanes
  7788. )),
  7789. (currentDebugInfo = prevDebugInfo),
  7790. returnFiber
  7791. );
  7792. }
  7793. if (isArrayImpl(newChild))
  7794. return (
  7795. (prevDebugInfo = pushDebugInfo(newChild._debugInfo)),
  7796. (returnFiber = reconcileChildrenArray(
  7797. returnFiber,
  7798. currentFirstChild,
  7799. newChild,
  7800. lanes
  7801. )),
  7802. (currentDebugInfo = prevDebugInfo),
  7803. returnFiber
  7804. );
  7805. if (getIteratorFn(newChild)) {
  7806. prevDebugInfo = pushDebugInfo(newChild._debugInfo);
  7807. key = getIteratorFn(newChild);
  7808. if ("function" !== typeof key)
  7809. throw Error(
  7810. "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
  7811. );
  7812. var newChildren = key.call(newChild);
  7813. if (newChildren === newChild) {
  7814. if (
  7815. 0 !== returnFiber.tag ||
  7816. "[object GeneratorFunction]" !==
  7817. Object.prototype.toString.call(returnFiber.type) ||
  7818. "[object Generator]" !==
  7819. Object.prototype.toString.call(newChildren)
  7820. )
  7821. didWarnAboutGenerators ||
  7822. console.error(
  7823. "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."
  7824. ),
  7825. (didWarnAboutGenerators = true);
  7826. } else
  7827. newChild.entries !== key ||
  7828. didWarnAboutMaps ||
  7829. (console.error(
  7830. "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
  7831. ),
  7832. (didWarnAboutMaps = true));
  7833. returnFiber = reconcileChildrenIterator(
  7834. returnFiber,
  7835. currentFirstChild,
  7836. newChildren,
  7837. lanes
  7838. );
  7839. currentDebugInfo = prevDebugInfo;
  7840. return returnFiber;
  7841. }
  7842. if ("function" === typeof newChild.then)
  7843. return (
  7844. (prevDebugInfo = pushDebugInfo(newChild._debugInfo)),
  7845. (returnFiber = reconcileChildFibersImpl(
  7846. returnFiber,
  7847. currentFirstChild,
  7848. unwrapThenable(newChild),
  7849. lanes
  7850. )),
  7851. (currentDebugInfo = prevDebugInfo),
  7852. returnFiber
  7853. );
  7854. if (newChild.$$typeof === REACT_CONTEXT_TYPE)
  7855. return reconcileChildFibersImpl(
  7856. returnFiber,
  7857. currentFirstChild,
  7858. readContextDuringReconciliation(returnFiber, newChild),
  7859. lanes
  7860. );
  7861. throwOnInvalidObjectType(returnFiber, newChild);
  7862. }
  7863. if (
  7864. ("string" === typeof newChild && "" !== newChild) ||
  7865. "number" === typeof newChild ||
  7866. "bigint" === typeof newChild
  7867. )
  7868. return (
  7869. (prevDebugInfo = "" + newChild),
  7870. null !== currentFirstChild && 6 === currentFirstChild.tag
  7871. ? (deleteRemainingChildren(
  7872. returnFiber,
  7873. currentFirstChild.sibling
  7874. ),
  7875. (lanes = useFiber(currentFirstChild, prevDebugInfo)),
  7876. (lanes.return = returnFiber),
  7877. (returnFiber = lanes))
  7878. : (deleteRemainingChildren(returnFiber, currentFirstChild),
  7879. (lanes = createFiberFromText(
  7880. prevDebugInfo,
  7881. returnFiber.mode,
  7882. lanes
  7883. )),
  7884. (lanes.return = returnFiber),
  7885. (lanes._debugOwner = returnFiber),
  7886. (lanes._debugTask = returnFiber._debugTask),
  7887. (lanes._debugInfo = currentDebugInfo),
  7888. (returnFiber = lanes)),
  7889. placeSingleChild(returnFiber)
  7890. );
  7891. "function" === typeof newChild &&
  7892. warnOnFunctionType(returnFiber, newChild);
  7893. "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
  7894. return deleteRemainingChildren(returnFiber, currentFirstChild);
  7895. }
  7896. return function (returnFiber, currentFirstChild, newChild, lanes) {
  7897. var prevDebugInfo = currentDebugInfo;
  7898. currentDebugInfo = null;
  7899. try {
  7900. thenableIndexCounter$1 = 0;
  7901. var firstChildFiber = reconcileChildFibersImpl(
  7902. returnFiber,
  7903. currentFirstChild,
  7904. newChild,
  7905. lanes
  7906. );
  7907. thenableState$1 = null;
  7908. return firstChildFiber;
  7909. } catch (x) {
  7910. if (x === SuspenseException || x === SuspenseActionException) throw x;
  7911. var fiber = createFiber(29, x, null, returnFiber.mode);
  7912. fiber.lanes = lanes;
  7913. fiber.return = returnFiber;
  7914. var debugInfo = (fiber._debugInfo = currentDebugInfo);
  7915. fiber._debugOwner = returnFiber._debugOwner;
  7916. fiber._debugTask = returnFiber._debugTask;
  7917. if (null != debugInfo)
  7918. for (var i = debugInfo.length - 1; 0 <= i; i--)
  7919. if ("string" === typeof debugInfo[i].stack) {
  7920. fiber._debugOwner = debugInfo[i];
  7921. fiber._debugTask = debugInfo[i].debugTask;
  7922. break;
  7923. }
  7924. return fiber;
  7925. } finally {
  7926. currentDebugInfo = prevDebugInfo;
  7927. }
  7928. };
  7929. }
  7930. function validateSuspenseListNestedChild(childSlot, index) {
  7931. var isAnArray = isArrayImpl(childSlot);
  7932. childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot);
  7933. return isAnArray || childSlot
  7934. ? ((isAnArray = isAnArray ? "array" : "iterable"),
  7935. console.error(
  7936. "A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",
  7937. isAnArray,
  7938. index,
  7939. isAnArray
  7940. ),
  7941. false)
  7942. : true;
  7943. }
  7944. function initializeUpdateQueue(fiber) {
  7945. fiber.updateQueue = {
  7946. baseState: fiber.memoizedState,
  7947. firstBaseUpdate: null,
  7948. lastBaseUpdate: null,
  7949. shared: { pending: null, lanes: 0, hiddenCallbacks: null },
  7950. callbacks: null
  7951. };
  7952. }
  7953. function cloneUpdateQueue(current, workInProgress) {
  7954. current = current.updateQueue;
  7955. workInProgress.updateQueue === current &&
  7956. (workInProgress.updateQueue = {
  7957. baseState: current.baseState,
  7958. firstBaseUpdate: current.firstBaseUpdate,
  7959. lastBaseUpdate: current.lastBaseUpdate,
  7960. shared: current.shared,
  7961. callbacks: null
  7962. });
  7963. }
  7964. function createUpdate(lane) {
  7965. return {
  7966. lane: lane,
  7967. tag: UpdateState,
  7968. payload: null,
  7969. callback: null,
  7970. next: null
  7971. };
  7972. }
  7973. function enqueueUpdate(fiber, update, lane) {
  7974. var updateQueue = fiber.updateQueue;
  7975. if (null === updateQueue) return null;
  7976. updateQueue = updateQueue.shared;
  7977. if (
  7978. currentlyProcessingQueue === updateQueue &&
  7979. !didWarnUpdateInsideUpdate
  7980. ) {
  7981. var componentName = getComponentNameFromFiber(fiber);
  7982. console.error(
  7983. "An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.\n\nPlease update the following component: %s",
  7984. componentName
  7985. );
  7986. didWarnUpdateInsideUpdate = true;
  7987. }
  7988. if ((executionContext & RenderContext) !== NoContext)
  7989. return (
  7990. (componentName = updateQueue.pending),
  7991. null === componentName
  7992. ? (update.next = update)
  7993. : ((update.next = componentName.next),
  7994. (componentName.next = update)),
  7995. (updateQueue.pending = update),
  7996. (update = getRootForUpdatedFiber(fiber)),
  7997. markUpdateLaneFromFiberToRoot(fiber, null, lane),
  7998. update
  7999. );
  8000. enqueueUpdate$1(fiber, updateQueue, update, lane);
  8001. return getRootForUpdatedFiber(fiber);
  8002. }
  8003. function entangleTransitions(root, fiber, lane) {
  8004. fiber = fiber.updateQueue;
  8005. if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194048))) {
  8006. var queueLanes = fiber.lanes;
  8007. queueLanes &= root.pendingLanes;
  8008. lane |= queueLanes;
  8009. fiber.lanes = lane;
  8010. markRootEntangled(root, lane);
  8011. }
  8012. }
  8013. function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
  8014. var queue = workInProgress.updateQueue,
  8015. current = workInProgress.alternate;
  8016. if (
  8017. null !== current &&
  8018. ((current = current.updateQueue), queue === current)
  8019. ) {
  8020. var newFirst = null,
  8021. newLast = null;
  8022. queue = queue.firstBaseUpdate;
  8023. if (null !== queue) {
  8024. do {
  8025. var clone = {
  8026. lane: queue.lane,
  8027. tag: queue.tag,
  8028. payload: queue.payload,
  8029. callback: null,
  8030. next: null
  8031. };
  8032. null === newLast
  8033. ? (newFirst = newLast = clone)
  8034. : (newLast = newLast.next = clone);
  8035. queue = queue.next;
  8036. } while (null !== queue);
  8037. null === newLast
  8038. ? (newFirst = newLast = capturedUpdate)
  8039. : (newLast = newLast.next = capturedUpdate);
  8040. } else newFirst = newLast = capturedUpdate;
  8041. queue = {
  8042. baseState: current.baseState,
  8043. firstBaseUpdate: newFirst,
  8044. lastBaseUpdate: newLast,
  8045. shared: current.shared,
  8046. callbacks: current.callbacks
  8047. };
  8048. workInProgress.updateQueue = queue;
  8049. return;
  8050. }
  8051. workInProgress = queue.lastBaseUpdate;
  8052. null === workInProgress
  8053. ? (queue.firstBaseUpdate = capturedUpdate)
  8054. : (workInProgress.next = capturedUpdate);
  8055. queue.lastBaseUpdate = capturedUpdate;
  8056. }
  8057. function suspendIfUpdateReadFromEntangledAsyncAction() {
  8058. if (didReadFromEntangledAsyncAction) {
  8059. var entangledActionThenable = currentEntangledActionThenable;
  8060. if (null !== entangledActionThenable) throw entangledActionThenable;
  8061. }
  8062. }
  8063. function processUpdateQueue(
  8064. workInProgress,
  8065. props,
  8066. instance$jscomp$0,
  8067. renderLanes
  8068. ) {
  8069. didReadFromEntangledAsyncAction = false;
  8070. var queue = workInProgress.updateQueue;
  8071. hasForceUpdate = false;
  8072. currentlyProcessingQueue = queue.shared;
  8073. var firstBaseUpdate = queue.firstBaseUpdate,
  8074. lastBaseUpdate = queue.lastBaseUpdate,
  8075. pendingQueue = queue.shared.pending;
  8076. if (null !== pendingQueue) {
  8077. queue.shared.pending = null;
  8078. var lastPendingUpdate = pendingQueue,
  8079. firstPendingUpdate = lastPendingUpdate.next;
  8080. lastPendingUpdate.next = null;
  8081. null === lastBaseUpdate
  8082. ? (firstBaseUpdate = firstPendingUpdate)
  8083. : (lastBaseUpdate.next = firstPendingUpdate);
  8084. lastBaseUpdate = lastPendingUpdate;
  8085. var current = workInProgress.alternate;
  8086. null !== current &&
  8087. ((current = current.updateQueue),
  8088. (pendingQueue = current.lastBaseUpdate),
  8089. pendingQueue !== lastBaseUpdate &&
  8090. (null === pendingQueue
  8091. ? (current.firstBaseUpdate = firstPendingUpdate)
  8092. : (pendingQueue.next = firstPendingUpdate),
  8093. (current.lastBaseUpdate = lastPendingUpdate)));
  8094. }
  8095. if (null !== firstBaseUpdate) {
  8096. var newState = queue.baseState;
  8097. lastBaseUpdate = 0;
  8098. current = firstPendingUpdate = lastPendingUpdate = null;
  8099. pendingQueue = firstBaseUpdate;
  8100. do {
  8101. var updateLane = pendingQueue.lane & -536870913,
  8102. isHiddenUpdate = updateLane !== pendingQueue.lane;
  8103. if (
  8104. isHiddenUpdate
  8105. ? (workInProgressRootRenderLanes & updateLane) === updateLane
  8106. : (renderLanes & updateLane) === updateLane
  8107. ) {
  8108. 0 !== updateLane &&
  8109. updateLane === currentEntangledLane &&
  8110. (didReadFromEntangledAsyncAction = true);
  8111. null !== current &&
  8112. (current = current.next =
  8113. {
  8114. lane: 0,
  8115. tag: pendingQueue.tag,
  8116. payload: pendingQueue.payload,
  8117. callback: null,
  8118. next: null
  8119. });
  8120. a: {
  8121. updateLane = workInProgress;
  8122. var partialState = pendingQueue;
  8123. var nextProps = props,
  8124. instance = instance$jscomp$0;
  8125. switch (partialState.tag) {
  8126. case ReplaceState:
  8127. partialState = partialState.payload;
  8128. if ("function" === typeof partialState) {
  8129. isDisallowedContextReadInDEV = true;
  8130. var nextState = partialState.call(
  8131. instance,
  8132. newState,
  8133. nextProps
  8134. );
  8135. if (updateLane.mode & StrictLegacyMode) {
  8136. setIsStrictModeForDevtools(true);
  8137. try {
  8138. partialState.call(instance, newState, nextProps);
  8139. } finally {
  8140. setIsStrictModeForDevtools(false);
  8141. }
  8142. }
  8143. isDisallowedContextReadInDEV = false;
  8144. newState = nextState;
  8145. break a;
  8146. }
  8147. newState = partialState;
  8148. break a;
  8149. case CaptureUpdate:
  8150. updateLane.flags = (updateLane.flags & -65537) | 128;
  8151. case UpdateState:
  8152. nextState = partialState.payload;
  8153. if ("function" === typeof nextState) {
  8154. isDisallowedContextReadInDEV = true;
  8155. partialState = nextState.call(
  8156. instance,
  8157. newState,
  8158. nextProps
  8159. );
  8160. if (updateLane.mode & StrictLegacyMode) {
  8161. setIsStrictModeForDevtools(true);
  8162. try {
  8163. nextState.call(instance, newState, nextProps);
  8164. } finally {
  8165. setIsStrictModeForDevtools(false);
  8166. }
  8167. }
  8168. isDisallowedContextReadInDEV = false;
  8169. } else partialState = nextState;
  8170. if (null === partialState || void 0 === partialState) break a;
  8171. newState = assign({}, newState, partialState);
  8172. break a;
  8173. case ForceUpdate:
  8174. hasForceUpdate = true;
  8175. }
  8176. }
  8177. updateLane = pendingQueue.callback;
  8178. null !== updateLane &&
  8179. ((workInProgress.flags |= 64),
  8180. isHiddenUpdate && (workInProgress.flags |= 8192),
  8181. (isHiddenUpdate = queue.callbacks),
  8182. null === isHiddenUpdate
  8183. ? (queue.callbacks = [updateLane])
  8184. : isHiddenUpdate.push(updateLane));
  8185. } else
  8186. (isHiddenUpdate = {
  8187. lane: updateLane,
  8188. tag: pendingQueue.tag,
  8189. payload: pendingQueue.payload,
  8190. callback: pendingQueue.callback,
  8191. next: null
  8192. }),
  8193. null === current
  8194. ? ((firstPendingUpdate = current = isHiddenUpdate),
  8195. (lastPendingUpdate = newState))
  8196. : (current = current.next = isHiddenUpdate),
  8197. (lastBaseUpdate |= updateLane);
  8198. pendingQueue = pendingQueue.next;
  8199. if (null === pendingQueue)
  8200. if (((pendingQueue = queue.shared.pending), null === pendingQueue))
  8201. break;
  8202. else
  8203. (isHiddenUpdate = pendingQueue),
  8204. (pendingQueue = isHiddenUpdate.next),
  8205. (isHiddenUpdate.next = null),
  8206. (queue.lastBaseUpdate = isHiddenUpdate),
  8207. (queue.shared.pending = null);
  8208. } while (1);
  8209. null === current && (lastPendingUpdate = newState);
  8210. queue.baseState = lastPendingUpdate;
  8211. queue.firstBaseUpdate = firstPendingUpdate;
  8212. queue.lastBaseUpdate = current;
  8213. null === firstBaseUpdate && (queue.shared.lanes = 0);
  8214. workInProgressRootSkippedLanes |= lastBaseUpdate;
  8215. workInProgress.lanes = lastBaseUpdate;
  8216. workInProgress.memoizedState = newState;
  8217. }
  8218. currentlyProcessingQueue = null;
  8219. }
  8220. function callCallback(callback, context) {
  8221. if ("function" !== typeof callback)
  8222. throw Error(
  8223. "Invalid argument passed as callback. Expected a function. Instead received: " +
  8224. callback
  8225. );
  8226. callback.call(context);
  8227. }
  8228. function commitHiddenCallbacks(updateQueue, context) {
  8229. var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;
  8230. if (null !== hiddenCallbacks)
  8231. for (
  8232. updateQueue.shared.hiddenCallbacks = null, updateQueue = 0;
  8233. updateQueue < hiddenCallbacks.length;
  8234. updateQueue++
  8235. )
  8236. callCallback(hiddenCallbacks[updateQueue], context);
  8237. }
  8238. function commitCallbacks(updateQueue, context) {
  8239. var callbacks = updateQueue.callbacks;
  8240. if (null !== callbacks)
  8241. for (
  8242. updateQueue.callbacks = null, updateQueue = 0;
  8243. updateQueue < callbacks.length;
  8244. updateQueue++
  8245. )
  8246. callCallback(callbacks[updateQueue], context);
  8247. }
  8248. function pushHiddenContext(fiber, context) {
  8249. var prevEntangledRenderLanes = entangledRenderLanes;
  8250. push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber);
  8251. push(currentTreeHiddenStackCursor, context, fiber);
  8252. entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes;
  8253. }
  8254. function reuseHiddenContextOnStack(fiber) {
  8255. push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber);
  8256. push(
  8257. currentTreeHiddenStackCursor,
  8258. currentTreeHiddenStackCursor.current,
  8259. fiber
  8260. );
  8261. }
  8262. function popHiddenContext(fiber) {
  8263. entangledRenderLanes = prevEntangledRenderLanesCursor.current;
  8264. pop(currentTreeHiddenStackCursor, fiber);
  8265. pop(prevEntangledRenderLanesCursor, fiber);
  8266. }
  8267. function pushPrimaryTreeSuspenseHandler(handler) {
  8268. var current = handler.alternate;
  8269. push(
  8270. suspenseStackCursor,
  8271. suspenseStackCursor.current & SubtreeSuspenseContextMask,
  8272. handler
  8273. );
  8274. push(suspenseHandlerStackCursor, handler, handler);
  8275. null === shellBoundary &&
  8276. (null === current || null !== currentTreeHiddenStackCursor.current
  8277. ? (shellBoundary = handler)
  8278. : null !== current.memoizedState && (shellBoundary = handler));
  8279. }
  8280. function pushDehydratedActivitySuspenseHandler(fiber) {
  8281. push(suspenseStackCursor, suspenseStackCursor.current, fiber);
  8282. push(suspenseHandlerStackCursor, fiber, fiber);
  8283. null === shellBoundary && (shellBoundary = fiber);
  8284. }
  8285. function pushOffscreenSuspenseHandler(fiber) {
  8286. 22 === fiber.tag
  8287. ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber),
  8288. push(suspenseHandlerStackCursor, fiber, fiber),
  8289. null === shellBoundary && (shellBoundary = fiber))
  8290. : reuseSuspenseHandlerOnStack(fiber);
  8291. }
  8292. function reuseSuspenseHandlerOnStack(fiber) {
  8293. push(suspenseStackCursor, suspenseStackCursor.current, fiber);
  8294. push(
  8295. suspenseHandlerStackCursor,
  8296. suspenseHandlerStackCursor.current,
  8297. fiber
  8298. );
  8299. }
  8300. function popSuspenseHandler(fiber) {
  8301. pop(suspenseHandlerStackCursor, fiber);
  8302. shellBoundary === fiber && (shellBoundary = null);
  8303. pop(suspenseStackCursor, fiber);
  8304. }
  8305. function findFirstSuspended(row) {
  8306. for (var node = row; null !== node; ) {
  8307. if (13 === node.tag) {
  8308. var state = node.memoizedState;
  8309. if (
  8310. null !== state &&
  8311. ((state = state.dehydrated),
  8312. null === state ||
  8313. isSuspenseInstancePending(state) ||
  8314. isSuspenseInstanceFallback(state))
  8315. )
  8316. return node;
  8317. } else if (
  8318. 19 === node.tag &&
  8319. ("forwards" === node.memoizedProps.revealOrder ||
  8320. "backwards" === node.memoizedProps.revealOrder ||
  8321. "unstable_legacy-backwards" === node.memoizedProps.revealOrder ||
  8322. "together" === node.memoizedProps.revealOrder)
  8323. ) {
  8324. if (0 !== (node.flags & 128)) return node;
  8325. } else if (null !== node.child) {
  8326. node.child.return = node;
  8327. node = node.child;
  8328. continue;
  8329. }
  8330. if (node === row) break;
  8331. for (; null === node.sibling; ) {
  8332. if (null === node.return || node.return === row) return null;
  8333. node = node.return;
  8334. }
  8335. node.sibling.return = node.return;
  8336. node = node.sibling;
  8337. }
  8338. return null;
  8339. }
  8340. function mountHookTypesDev() {
  8341. var hookName = currentHookNameInDev;
  8342. null === hookTypesDev
  8343. ? (hookTypesDev = [hookName])
  8344. : hookTypesDev.push(hookName);
  8345. }
  8346. function updateHookTypesDev() {
  8347. var hookName = currentHookNameInDev;
  8348. if (
  8349. null !== hookTypesDev &&
  8350. (hookTypesUpdateIndexDev++,
  8351. hookTypesDev[hookTypesUpdateIndexDev] !== hookName)
  8352. ) {
  8353. var componentName = getComponentNameFromFiber(currentlyRenderingFiber);
  8354. if (
  8355. !didWarnAboutMismatchedHooksForComponent.has(componentName) &&
  8356. (didWarnAboutMismatchedHooksForComponent.add(componentName),
  8357. null !== hookTypesDev)
  8358. ) {
  8359. for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) {
  8360. var oldHookName = hookTypesDev[i],
  8361. newHookName =
  8362. i === hookTypesUpdateIndexDev ? hookName : oldHookName;
  8363. for (
  8364. oldHookName = i + 1 + ". " + oldHookName;
  8365. 30 > oldHookName.length;
  8366. )
  8367. oldHookName += " ";
  8368. oldHookName += newHookName + "\n";
  8369. table += oldHookName;
  8370. }
  8371. console.error(
  8372. "React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
  8373. componentName,
  8374. table
  8375. );
  8376. }
  8377. }
  8378. }
  8379. function checkDepsAreArrayDev(deps) {
  8380. void 0 === deps ||
  8381. null === deps ||
  8382. isArrayImpl(deps) ||
  8383. console.error(
  8384. "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",
  8385. currentHookNameInDev,
  8386. typeof deps
  8387. );
  8388. }
  8389. function warnOnUseFormStateInDev() {
  8390. var componentName = getComponentNameFromFiber(currentlyRenderingFiber);
  8391. didWarnAboutUseFormState.has(componentName) ||
  8392. (didWarnAboutUseFormState.add(componentName),
  8393. console.error(
  8394. "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",
  8395. componentName
  8396. ));
  8397. }
  8398. function throwInvalidHookError() {
  8399. throw Error(
  8400. "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
  8401. );
  8402. }
  8403. function areHookInputsEqual(nextDeps, prevDeps) {
  8404. if (ignorePreviousDependencies) return false;
  8405. if (null === prevDeps)
  8406. return (
  8407. console.error(
  8408. "%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",
  8409. currentHookNameInDev
  8410. ),
  8411. false
  8412. );
  8413. nextDeps.length !== prevDeps.length &&
  8414. console.error(
  8415. "The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",
  8416. currentHookNameInDev,
  8417. "[" + prevDeps.join(", ") + "]",
  8418. "[" + nextDeps.join(", ") + "]"
  8419. );
  8420. for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
  8421. if (!objectIs(nextDeps[i], prevDeps[i])) return false;
  8422. return true;
  8423. }
  8424. function renderWithHooks(
  8425. current,
  8426. workInProgress,
  8427. Component,
  8428. props,
  8429. secondArg,
  8430. nextRenderLanes
  8431. ) {
  8432. renderLanes = nextRenderLanes;
  8433. currentlyRenderingFiber = workInProgress;
  8434. hookTypesDev = null !== current ? current._debugHookTypes : null;
  8435. hookTypesUpdateIndexDev = -1;
  8436. ignorePreviousDependencies =
  8437. null !== current && current.type !== workInProgress.type;
  8438. if (
  8439. "[object AsyncFunction]" ===
  8440. Object.prototype.toString.call(Component) ||
  8441. "[object AsyncGeneratorFunction]" ===
  8442. Object.prototype.toString.call(Component)
  8443. )
  8444. (nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber)),
  8445. didWarnAboutAsyncClientComponent.has(nextRenderLanes) ||
  8446. (didWarnAboutAsyncClientComponent.add(nextRenderLanes),
  8447. console.error(
  8448. "%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
  8449. null === nextRenderLanes
  8450. ? "An unknown Component"
  8451. : "<" + nextRenderLanes + ">"
  8452. ));
  8453. workInProgress.memoizedState = null;
  8454. workInProgress.updateQueue = null;
  8455. workInProgress.lanes = 0;
  8456. ReactSharedInternals.H =
  8457. null !== current && null !== current.memoizedState
  8458. ? HooksDispatcherOnUpdateInDEV
  8459. : null !== hookTypesDev
  8460. ? HooksDispatcherOnMountWithHookTypesInDEV
  8461. : HooksDispatcherOnMountInDEV;
  8462. shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes =
  8463. (workInProgress.mode & StrictLegacyMode) !== NoMode;
  8464. var children = callComponentInDEV(Component, props, secondArg);
  8465. shouldDoubleInvokeUserFnsInHooksDEV = false;
  8466. didScheduleRenderPhaseUpdateDuringThisPass &&
  8467. (children = renderWithHooksAgain(
  8468. workInProgress,
  8469. Component,
  8470. props,
  8471. secondArg
  8472. ));
  8473. if (nextRenderLanes) {
  8474. setIsStrictModeForDevtools(true);
  8475. try {
  8476. children = renderWithHooksAgain(
  8477. workInProgress,
  8478. Component,
  8479. props,
  8480. secondArg
  8481. );
  8482. } finally {
  8483. setIsStrictModeForDevtools(false);
  8484. }
  8485. }
  8486. finishRenderingHooks(current, workInProgress);
  8487. return children;
  8488. }
  8489. function finishRenderingHooks(current, workInProgress) {
  8490. workInProgress._debugHookTypes = hookTypesDev;
  8491. null === workInProgress.dependencies
  8492. ? null !== thenableState &&
  8493. (workInProgress.dependencies = {
  8494. lanes: 0,
  8495. firstContext: null,
  8496. _debugThenableState: thenableState
  8497. })
  8498. : (workInProgress.dependencies._debugThenableState = thenableState);
  8499. ReactSharedInternals.H = ContextOnlyDispatcher;
  8500. var didRenderTooFewHooks =
  8501. null !== currentHook && null !== currentHook.next;
  8502. renderLanes = 0;
  8503. hookTypesDev =
  8504. currentHookNameInDev =
  8505. workInProgressHook =
  8506. currentHook =
  8507. currentlyRenderingFiber =
  8508. null;
  8509. hookTypesUpdateIndexDev = -1;
  8510. null !== current &&
  8511. (current.flags & 65011712) !== (workInProgress.flags & 65011712) &&
  8512. console.error(
  8513. "Internal React error: Expected static flag was missing. Please notify the React team."
  8514. );
  8515. didScheduleRenderPhaseUpdate = false;
  8516. thenableIndexCounter = 0;
  8517. thenableState = null;
  8518. if (didRenderTooFewHooks)
  8519. throw Error(
  8520. "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
  8521. );
  8522. null === current ||
  8523. didReceiveUpdate ||
  8524. ((current = current.dependencies),
  8525. null !== current &&
  8526. checkIfContextChanged(current) &&
  8527. (didReceiveUpdate = true));
  8528. needsToResetSuspendedThenableDEV
  8529. ? ((needsToResetSuspendedThenableDEV = false), (current = true))
  8530. : (current = false);
  8531. current &&
  8532. ((workInProgress =
  8533. getComponentNameFromFiber(workInProgress) || "Unknown"),
  8534. didWarnAboutUseWrappedInTryCatch.has(workInProgress) ||
  8535. didWarnAboutAsyncClientComponent.has(workInProgress) ||
  8536. (didWarnAboutUseWrappedInTryCatch.add(workInProgress),
  8537. console.error(
  8538. "`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary."
  8539. )));
  8540. }
  8541. function renderWithHooksAgain(workInProgress, Component, props, secondArg) {
  8542. currentlyRenderingFiber = workInProgress;
  8543. var numberOfReRenders = 0;
  8544. do {
  8545. didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);
  8546. thenableIndexCounter = 0;
  8547. didScheduleRenderPhaseUpdateDuringThisPass = false;
  8548. if (numberOfReRenders >= RE_RENDER_LIMIT)
  8549. throw Error(
  8550. "Too many re-renders. React limits the number of renders to prevent an infinite loop."
  8551. );
  8552. numberOfReRenders += 1;
  8553. ignorePreviousDependencies = false;
  8554. workInProgressHook = currentHook = null;
  8555. if (null != workInProgress.updateQueue) {
  8556. var children = workInProgress.updateQueue;
  8557. children.lastEffect = null;
  8558. children.events = null;
  8559. children.stores = null;
  8560. null != children.memoCache && (children.memoCache.index = 0);
  8561. }
  8562. hookTypesUpdateIndexDev = -1;
  8563. ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV;
  8564. children = callComponentInDEV(Component, props, secondArg);
  8565. } while (didScheduleRenderPhaseUpdateDuringThisPass);
  8566. return children;
  8567. }
  8568. function TransitionAwareHostComponent() {
  8569. var dispatcher = ReactSharedInternals.H,
  8570. maybeThenable = dispatcher.useState()[0];
  8571. maybeThenable =
  8572. "function" === typeof maybeThenable.then
  8573. ? useThenable(maybeThenable)
  8574. : maybeThenable;
  8575. dispatcher = dispatcher.useState()[0];
  8576. (null !== currentHook ? currentHook.memoizedState : null) !==
  8577. dispatcher && (currentlyRenderingFiber.flags |= 1024);
  8578. return maybeThenable;
  8579. }
  8580. function checkDidRenderIdHook() {
  8581. var didRenderIdHook = 0 !== localIdCounter;
  8582. localIdCounter = 0;
  8583. return didRenderIdHook;
  8584. }
  8585. function bailoutHooks(current, workInProgress, lanes) {
  8586. workInProgress.updateQueue = current.updateQueue;
  8587. workInProgress.flags =
  8588. (workInProgress.mode & StrictEffectsMode) !== NoMode
  8589. ? workInProgress.flags & -402655237
  8590. : workInProgress.flags & -2053;
  8591. current.lanes &= ~lanes;
  8592. }
  8593. function resetHooksOnUnwind(workInProgress) {
  8594. if (didScheduleRenderPhaseUpdate) {
  8595. for (
  8596. workInProgress = workInProgress.memoizedState;
  8597. null !== workInProgress;
  8598. ) {
  8599. var queue = workInProgress.queue;
  8600. null !== queue && (queue.pending = null);
  8601. workInProgress = workInProgress.next;
  8602. }
  8603. didScheduleRenderPhaseUpdate = false;
  8604. }
  8605. renderLanes = 0;
  8606. hookTypesDev =
  8607. workInProgressHook =
  8608. currentHook =
  8609. currentlyRenderingFiber =
  8610. null;
  8611. hookTypesUpdateIndexDev = -1;
  8612. currentHookNameInDev = null;
  8613. didScheduleRenderPhaseUpdateDuringThisPass = false;
  8614. thenableIndexCounter = localIdCounter = 0;
  8615. thenableState = null;
  8616. }
  8617. function mountWorkInProgressHook() {
  8618. var hook = {
  8619. memoizedState: null,
  8620. baseState: null,
  8621. baseQueue: null,
  8622. queue: null,
  8623. next: null
  8624. };
  8625. null === workInProgressHook
  8626. ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook)
  8627. : (workInProgressHook = workInProgressHook.next = hook);
  8628. return workInProgressHook;
  8629. }
  8630. function updateWorkInProgressHook() {
  8631. if (null === currentHook) {
  8632. var nextCurrentHook = currentlyRenderingFiber.alternate;
  8633. nextCurrentHook =
  8634. null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
  8635. } else nextCurrentHook = currentHook.next;
  8636. var nextWorkInProgressHook =
  8637. null === workInProgressHook
  8638. ? currentlyRenderingFiber.memoizedState
  8639. : workInProgressHook.next;
  8640. if (null !== nextWorkInProgressHook)
  8641. (workInProgressHook = nextWorkInProgressHook),
  8642. (currentHook = nextCurrentHook);
  8643. else {
  8644. if (null === nextCurrentHook) {
  8645. if (null === currentlyRenderingFiber.alternate)
  8646. throw Error(
  8647. "Update hook called on initial render. This is likely a bug in React. Please file an issue."
  8648. );
  8649. throw Error("Rendered more hooks than during the previous render.");
  8650. }
  8651. currentHook = nextCurrentHook;
  8652. nextCurrentHook = {
  8653. memoizedState: currentHook.memoizedState,
  8654. baseState: currentHook.baseState,
  8655. baseQueue: currentHook.baseQueue,
  8656. queue: currentHook.queue,
  8657. next: null
  8658. };
  8659. null === workInProgressHook
  8660. ? (currentlyRenderingFiber.memoizedState = workInProgressHook =
  8661. nextCurrentHook)
  8662. : (workInProgressHook = workInProgressHook.next = nextCurrentHook);
  8663. }
  8664. return workInProgressHook;
  8665. }
  8666. function createFunctionComponentUpdateQueue() {
  8667. return { lastEffect: null, events: null, stores: null, memoCache: null };
  8668. }
  8669. function useThenable(thenable) {
  8670. var index = thenableIndexCounter;
  8671. thenableIndexCounter += 1;
  8672. null === thenableState && (thenableState = createThenableState());
  8673. thenable = trackUsedThenable(thenableState, thenable, index);
  8674. index = currentlyRenderingFiber;
  8675. null ===
  8676. (null === workInProgressHook
  8677. ? index.memoizedState
  8678. : workInProgressHook.next) &&
  8679. ((index = index.alternate),
  8680. (ReactSharedInternals.H =
  8681. null !== index && null !== index.memoizedState
  8682. ? HooksDispatcherOnUpdateInDEV
  8683. : HooksDispatcherOnMountInDEV));
  8684. return thenable;
  8685. }
  8686. function use(usable) {
  8687. if (null !== usable && "object" === typeof usable) {
  8688. if ("function" === typeof usable.then) return useThenable(usable);
  8689. if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
  8690. }
  8691. throw Error("An unsupported type was passed to use(): " + String(usable));
  8692. }
  8693. function useMemoCache(size) {
  8694. var memoCache = null,
  8695. updateQueue = currentlyRenderingFiber.updateQueue;
  8696. null !== updateQueue && (memoCache = updateQueue.memoCache);
  8697. if (null == memoCache) {
  8698. var current = currentlyRenderingFiber.alternate;
  8699. null !== current &&
  8700. ((current = current.updateQueue),
  8701. null !== current &&
  8702. ((current = current.memoCache),
  8703. null != current &&
  8704. (memoCache = {
  8705. data: current.data.map(function (array) {
  8706. return array.slice();
  8707. }),
  8708. index: 0
  8709. })));
  8710. }
  8711. null == memoCache && (memoCache = { data: [], index: 0 });
  8712. null === updateQueue &&
  8713. ((updateQueue = createFunctionComponentUpdateQueue()),
  8714. (currentlyRenderingFiber.updateQueue = updateQueue));
  8715. updateQueue.memoCache = memoCache;
  8716. updateQueue = memoCache.data[memoCache.index];
  8717. if (void 0 === updateQueue || ignorePreviousDependencies)
  8718. for (
  8719. updateQueue = memoCache.data[memoCache.index] = Array(size),
  8720. current = 0;
  8721. current < size;
  8722. current++
  8723. )
  8724. updateQueue[current] = REACT_MEMO_CACHE_SENTINEL;
  8725. else
  8726. updateQueue.length !== size &&
  8727. console.error(
  8728. "Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",
  8729. updateQueue.length,
  8730. size
  8731. );
  8732. memoCache.index++;
  8733. return updateQueue;
  8734. }
  8735. function basicStateReducer(state, action) {
  8736. return "function" === typeof action ? action(state) : action;
  8737. }
  8738. function mountReducer(reducer, initialArg, init) {
  8739. var hook = mountWorkInProgressHook();
  8740. if (void 0 !== init) {
  8741. var initialState = init(initialArg);
  8742. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  8743. setIsStrictModeForDevtools(true);
  8744. try {
  8745. init(initialArg);
  8746. } finally {
  8747. setIsStrictModeForDevtools(false);
  8748. }
  8749. }
  8750. } else initialState = initialArg;
  8751. hook.memoizedState = hook.baseState = initialState;
  8752. reducer = {
  8753. pending: null,
  8754. lanes: 0,
  8755. dispatch: null,
  8756. lastRenderedReducer: reducer,
  8757. lastRenderedState: initialState
  8758. };
  8759. hook.queue = reducer;
  8760. reducer = reducer.dispatch = dispatchReducerAction.bind(
  8761. null,
  8762. currentlyRenderingFiber,
  8763. reducer
  8764. );
  8765. return [hook.memoizedState, reducer];
  8766. }
  8767. function updateReducer(reducer) {
  8768. var hook = updateWorkInProgressHook();
  8769. return updateReducerImpl(hook, currentHook, reducer);
  8770. }
  8771. function updateReducerImpl(hook, current, reducer) {
  8772. var queue = hook.queue;
  8773. if (null === queue)
  8774. throw Error(
  8775. "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
  8776. );
  8777. queue.lastRenderedReducer = reducer;
  8778. var baseQueue = hook.baseQueue,
  8779. pendingQueue = queue.pending;
  8780. if (null !== pendingQueue) {
  8781. if (null !== baseQueue) {
  8782. var baseFirst = baseQueue.next;
  8783. baseQueue.next = pendingQueue.next;
  8784. pendingQueue.next = baseFirst;
  8785. }
  8786. current.baseQueue !== baseQueue &&
  8787. console.error(
  8788. "Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."
  8789. );
  8790. current.baseQueue = baseQueue = pendingQueue;
  8791. queue.pending = null;
  8792. }
  8793. pendingQueue = hook.baseState;
  8794. if (null === baseQueue) hook.memoizedState = pendingQueue;
  8795. else {
  8796. current = baseQueue.next;
  8797. var newBaseQueueFirst = (baseFirst = null),
  8798. newBaseQueueLast = null,
  8799. update = current,
  8800. didReadFromEntangledAsyncAction = false;
  8801. do {
  8802. var updateLane = update.lane & -536870913;
  8803. if (
  8804. updateLane !== update.lane
  8805. ? (workInProgressRootRenderLanes & updateLane) === updateLane
  8806. : (renderLanes & updateLane) === updateLane
  8807. ) {
  8808. var revertLane = update.revertLane;
  8809. if (0 === revertLane)
  8810. null !== newBaseQueueLast &&
  8811. (newBaseQueueLast = newBaseQueueLast.next =
  8812. {
  8813. lane: 0,
  8814. revertLane: 0,
  8815. gesture: null,
  8816. action: update.action,
  8817. hasEagerState: update.hasEagerState,
  8818. eagerState: update.eagerState,
  8819. next: null
  8820. }),
  8821. updateLane === currentEntangledLane &&
  8822. (didReadFromEntangledAsyncAction = true);
  8823. else if ((renderLanes & revertLane) === revertLane) {
  8824. update = update.next;
  8825. revertLane === currentEntangledLane &&
  8826. (didReadFromEntangledAsyncAction = true);
  8827. continue;
  8828. } else
  8829. (updateLane = {
  8830. lane: 0,
  8831. revertLane: update.revertLane,
  8832. gesture: null,
  8833. action: update.action,
  8834. hasEagerState: update.hasEagerState,
  8835. eagerState: update.eagerState,
  8836. next: null
  8837. }),
  8838. null === newBaseQueueLast
  8839. ? ((newBaseQueueFirst = newBaseQueueLast = updateLane),
  8840. (baseFirst = pendingQueue))
  8841. : (newBaseQueueLast = newBaseQueueLast.next = updateLane),
  8842. (currentlyRenderingFiber.lanes |= revertLane),
  8843. (workInProgressRootSkippedLanes |= revertLane);
  8844. updateLane = update.action;
  8845. shouldDoubleInvokeUserFnsInHooksDEV &&
  8846. reducer(pendingQueue, updateLane);
  8847. pendingQueue = update.hasEagerState
  8848. ? update.eagerState
  8849. : reducer(pendingQueue, updateLane);
  8850. } else
  8851. (revertLane = {
  8852. lane: updateLane,
  8853. revertLane: update.revertLane,
  8854. gesture: update.gesture,
  8855. action: update.action,
  8856. hasEagerState: update.hasEagerState,
  8857. eagerState: update.eagerState,
  8858. next: null
  8859. }),
  8860. null === newBaseQueueLast
  8861. ? ((newBaseQueueFirst = newBaseQueueLast = revertLane),
  8862. (baseFirst = pendingQueue))
  8863. : (newBaseQueueLast = newBaseQueueLast.next = revertLane),
  8864. (currentlyRenderingFiber.lanes |= updateLane),
  8865. (workInProgressRootSkippedLanes |= updateLane);
  8866. update = update.next;
  8867. } while (null !== update && update !== current);
  8868. null === newBaseQueueLast
  8869. ? (baseFirst = pendingQueue)
  8870. : (newBaseQueueLast.next = newBaseQueueFirst);
  8871. if (
  8872. !objectIs(pendingQueue, hook.memoizedState) &&
  8873. ((didReceiveUpdate = true),
  8874. didReadFromEntangledAsyncAction &&
  8875. ((reducer = currentEntangledActionThenable), null !== reducer))
  8876. )
  8877. throw reducer;
  8878. hook.memoizedState = pendingQueue;
  8879. hook.baseState = baseFirst;
  8880. hook.baseQueue = newBaseQueueLast;
  8881. queue.lastRenderedState = pendingQueue;
  8882. }
  8883. null === baseQueue && (queue.lanes = 0);
  8884. return [hook.memoizedState, queue.dispatch];
  8885. }
  8886. function rerenderReducer(reducer) {
  8887. var hook = updateWorkInProgressHook(),
  8888. queue = hook.queue;
  8889. if (null === queue)
  8890. throw Error(
  8891. "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
  8892. );
  8893. queue.lastRenderedReducer = reducer;
  8894. var dispatch = queue.dispatch,
  8895. lastRenderPhaseUpdate = queue.pending,
  8896. newState = hook.memoizedState;
  8897. if (null !== lastRenderPhaseUpdate) {
  8898. queue.pending = null;
  8899. var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);
  8900. do
  8901. (newState = reducer(newState, update.action)), (update = update.next);
  8902. while (update !== lastRenderPhaseUpdate);
  8903. objectIs(newState, hook.memoizedState) || (didReceiveUpdate = true);
  8904. hook.memoizedState = newState;
  8905. null === hook.baseQueue && (hook.baseState = newState);
  8906. queue.lastRenderedState = newState;
  8907. }
  8908. return [newState, dispatch];
  8909. }
  8910. function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
  8911. var fiber = currentlyRenderingFiber,
  8912. hook = mountWorkInProgressHook();
  8913. if (isHydrating) {
  8914. if (void 0 === getServerSnapshot)
  8915. throw Error(
  8916. "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
  8917. );
  8918. var nextSnapshot = getServerSnapshot();
  8919. didWarnUncachedGetSnapshot ||
  8920. nextSnapshot === getServerSnapshot() ||
  8921. (console.error(
  8922. "The result of getServerSnapshot should be cached to avoid an infinite loop"
  8923. ),
  8924. (didWarnUncachedGetSnapshot = true));
  8925. } else {
  8926. nextSnapshot = getSnapshot();
  8927. didWarnUncachedGetSnapshot ||
  8928. ((getServerSnapshot = getSnapshot()),
  8929. objectIs(nextSnapshot, getServerSnapshot) ||
  8930. (console.error(
  8931. "The result of getSnapshot should be cached to avoid an infinite loop"
  8932. ),
  8933. (didWarnUncachedGetSnapshot = true)));
  8934. if (null === workInProgressRoot)
  8935. throw Error(
  8936. "Expected a work-in-progress root. This is a bug in React. Please file an issue."
  8937. );
  8938. 0 !== (workInProgressRootRenderLanes & 127) ||
  8939. pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
  8940. }
  8941. hook.memoizedState = nextSnapshot;
  8942. getServerSnapshot = { value: nextSnapshot, getSnapshot: getSnapshot };
  8943. hook.queue = getServerSnapshot;
  8944. mountEffect(
  8945. subscribeToStore.bind(null, fiber, getServerSnapshot, subscribe),
  8946. [subscribe]
  8947. );
  8948. fiber.flags |= 2048;
  8949. pushSimpleEffect(
  8950. HasEffect | Passive,
  8951. { destroy: void 0 },
  8952. updateStoreInstance.bind(
  8953. null,
  8954. fiber,
  8955. getServerSnapshot,
  8956. nextSnapshot,
  8957. getSnapshot
  8958. ),
  8959. null
  8960. );
  8961. return nextSnapshot;
  8962. }
  8963. function updateSyncExternalStore(
  8964. subscribe,
  8965. getSnapshot,
  8966. getServerSnapshot
  8967. ) {
  8968. var fiber = currentlyRenderingFiber,
  8969. hook = updateWorkInProgressHook(),
  8970. isHydrating$jscomp$0 = isHydrating;
  8971. if (isHydrating$jscomp$0) {
  8972. if (void 0 === getServerSnapshot)
  8973. throw Error(
  8974. "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
  8975. );
  8976. getServerSnapshot = getServerSnapshot();
  8977. } else if (
  8978. ((getServerSnapshot = getSnapshot()), !didWarnUncachedGetSnapshot)
  8979. ) {
  8980. var cachedSnapshot = getSnapshot();
  8981. objectIs(getServerSnapshot, cachedSnapshot) ||
  8982. (console.error(
  8983. "The result of getSnapshot should be cached to avoid an infinite loop"
  8984. ),
  8985. (didWarnUncachedGetSnapshot = true));
  8986. }
  8987. if (
  8988. (cachedSnapshot = !objectIs(
  8989. (currentHook || hook).memoizedState,
  8990. getServerSnapshot
  8991. ))
  8992. )
  8993. (hook.memoizedState = getServerSnapshot), (didReceiveUpdate = true);
  8994. hook = hook.queue;
  8995. var create = subscribeToStore.bind(null, fiber, hook, subscribe);
  8996. updateEffectImpl(2048, Passive, create, [subscribe]);
  8997. if (
  8998. hook.getSnapshot !== getSnapshot ||
  8999. cachedSnapshot ||
  9000. (null !== workInProgressHook &&
  9001. workInProgressHook.memoizedState.tag & HasEffect)
  9002. ) {
  9003. fiber.flags |= 2048;
  9004. pushSimpleEffect(
  9005. HasEffect | Passive,
  9006. { destroy: void 0 },
  9007. updateStoreInstance.bind(
  9008. null,
  9009. fiber,
  9010. hook,
  9011. getServerSnapshot,
  9012. getSnapshot
  9013. ),
  9014. null
  9015. );
  9016. if (null === workInProgressRoot)
  9017. throw Error(
  9018. "Expected a work-in-progress root. This is a bug in React. Please file an issue."
  9019. );
  9020. isHydrating$jscomp$0 ||
  9021. 0 !== (renderLanes & 127) ||
  9022. pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
  9023. }
  9024. return getServerSnapshot;
  9025. }
  9026. function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
  9027. fiber.flags |= 16384;
  9028. fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };
  9029. getSnapshot = currentlyRenderingFiber.updateQueue;
  9030. null === getSnapshot
  9031. ? ((getSnapshot = createFunctionComponentUpdateQueue()),
  9032. (currentlyRenderingFiber.updateQueue = getSnapshot),
  9033. (getSnapshot.stores = [fiber]))
  9034. : ((renderedSnapshot = getSnapshot.stores),
  9035. null === renderedSnapshot
  9036. ? (getSnapshot.stores = [fiber])
  9037. : renderedSnapshot.push(fiber));
  9038. }
  9039. function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
  9040. inst.value = nextSnapshot;
  9041. inst.getSnapshot = getSnapshot;
  9042. checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
  9043. }
  9044. function subscribeToStore(fiber, inst, subscribe) {
  9045. return subscribe(function () {
  9046. checkIfSnapshotChanged(inst) &&
  9047. (startUpdateTimerByLane(2, "updateSyncExternalStore()", fiber),
  9048. forceStoreRerender(fiber));
  9049. });
  9050. }
  9051. function checkIfSnapshotChanged(inst) {
  9052. var latestGetSnapshot = inst.getSnapshot;
  9053. inst = inst.value;
  9054. try {
  9055. var nextValue = latestGetSnapshot();
  9056. return !objectIs(inst, nextValue);
  9057. } catch (error) {
  9058. return true;
  9059. }
  9060. }
  9061. function forceStoreRerender(fiber) {
  9062. var root = enqueueConcurrentRenderForLane(fiber, 2);
  9063. null !== root && scheduleUpdateOnFiber(root, fiber, 2);
  9064. }
  9065. function mountStateImpl(initialState) {
  9066. var hook = mountWorkInProgressHook();
  9067. if ("function" === typeof initialState) {
  9068. var initialStateInitializer = initialState;
  9069. initialState = initialStateInitializer();
  9070. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  9071. setIsStrictModeForDevtools(true);
  9072. try {
  9073. initialStateInitializer();
  9074. } finally {
  9075. setIsStrictModeForDevtools(false);
  9076. }
  9077. }
  9078. }
  9079. hook.memoizedState = hook.baseState = initialState;
  9080. hook.queue = {
  9081. pending: null,
  9082. lanes: 0,
  9083. dispatch: null,
  9084. lastRenderedReducer: basicStateReducer,
  9085. lastRenderedState: initialState
  9086. };
  9087. return hook;
  9088. }
  9089. function mountState(initialState) {
  9090. initialState = mountStateImpl(initialState);
  9091. var queue = initialState.queue,
  9092. dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
  9093. queue.dispatch = dispatch;
  9094. return [initialState.memoizedState, dispatch];
  9095. }
  9096. function mountOptimistic(passthrough) {
  9097. var hook = mountWorkInProgressHook();
  9098. hook.memoizedState = hook.baseState = passthrough;
  9099. var queue = {
  9100. pending: null,
  9101. lanes: 0,
  9102. dispatch: null,
  9103. lastRenderedReducer: null,
  9104. lastRenderedState: null
  9105. };
  9106. hook.queue = queue;
  9107. hook = dispatchOptimisticSetState.bind(
  9108. null,
  9109. currentlyRenderingFiber,
  9110. true,
  9111. queue
  9112. );
  9113. queue.dispatch = hook;
  9114. return [passthrough, hook];
  9115. }
  9116. function updateOptimistic(passthrough, reducer) {
  9117. var hook = updateWorkInProgressHook();
  9118. return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
  9119. }
  9120. function updateOptimisticImpl(hook, current, passthrough, reducer) {
  9121. hook.baseState = passthrough;
  9122. return updateReducerImpl(
  9123. hook,
  9124. currentHook,
  9125. "function" === typeof reducer ? reducer : basicStateReducer
  9126. );
  9127. }
  9128. function rerenderOptimistic(passthrough, reducer) {
  9129. var hook = updateWorkInProgressHook();
  9130. if (null !== currentHook)
  9131. return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
  9132. hook.baseState = passthrough;
  9133. return [passthrough, hook.queue.dispatch];
  9134. }
  9135. function dispatchActionState(
  9136. fiber,
  9137. actionQueue,
  9138. setPendingState,
  9139. setState,
  9140. payload
  9141. ) {
  9142. if (isRenderPhaseUpdate(fiber))
  9143. throw Error("Cannot update form state while rendering.");
  9144. fiber = actionQueue.action;
  9145. if (null !== fiber) {
  9146. var actionNode = {
  9147. payload: payload,
  9148. action: fiber,
  9149. next: null,
  9150. isTransition: true,
  9151. status: "pending",
  9152. value: null,
  9153. reason: null,
  9154. listeners: [],
  9155. then: function (listener) {
  9156. actionNode.listeners.push(listener);
  9157. }
  9158. };
  9159. null !== ReactSharedInternals.T
  9160. ? setPendingState(true)
  9161. : (actionNode.isTransition = false);
  9162. setState(actionNode);
  9163. setPendingState = actionQueue.pending;
  9164. null === setPendingState
  9165. ? ((actionNode.next = actionQueue.pending = actionNode),
  9166. runActionStateAction(actionQueue, actionNode))
  9167. : ((actionNode.next = setPendingState.next),
  9168. (actionQueue.pending = setPendingState.next = actionNode));
  9169. }
  9170. }
  9171. function runActionStateAction(actionQueue, node) {
  9172. var action = node.action,
  9173. payload = node.payload,
  9174. prevState = actionQueue.state;
  9175. if (node.isTransition) {
  9176. var prevTransition = ReactSharedInternals.T,
  9177. currentTransition = {};
  9178. currentTransition._updatedFibers = new Set();
  9179. ReactSharedInternals.T = currentTransition;
  9180. try {
  9181. var returnValue = action(prevState, payload),
  9182. onStartTransitionFinish = ReactSharedInternals.S;
  9183. null !== onStartTransitionFinish &&
  9184. onStartTransitionFinish(currentTransition, returnValue);
  9185. handleActionReturnValue(actionQueue, node, returnValue);
  9186. } catch (error) {
  9187. onActionError(actionQueue, node, error);
  9188. } finally {
  9189. null !== prevTransition &&
  9190. null !== currentTransition.types &&
  9191. (null !== prevTransition.types &&
  9192. prevTransition.types !== currentTransition.types &&
  9193. console.error(
  9194. "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
  9195. ),
  9196. (prevTransition.types = currentTransition.types)),
  9197. (ReactSharedInternals.T = prevTransition),
  9198. null === prevTransition &&
  9199. currentTransition._updatedFibers &&
  9200. ((actionQueue = currentTransition._updatedFibers.size),
  9201. currentTransition._updatedFibers.clear(),
  9202. 10 < actionQueue &&
  9203. console.warn(
  9204. "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
  9205. ));
  9206. }
  9207. } else
  9208. try {
  9209. (currentTransition = action(prevState, payload)),
  9210. handleActionReturnValue(actionQueue, node, currentTransition);
  9211. } catch (error$4) {
  9212. onActionError(actionQueue, node, error$4);
  9213. }
  9214. }
  9215. function handleActionReturnValue(actionQueue, node, returnValue) {
  9216. null !== returnValue &&
  9217. "object" === typeof returnValue &&
  9218. "function" === typeof returnValue.then
  9219. ? (ReactSharedInternals.asyncTransitions++,
  9220. returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
  9221. returnValue.then(
  9222. function (nextState) {
  9223. onActionSuccess(actionQueue, node, nextState);
  9224. },
  9225. function (error) {
  9226. return onActionError(actionQueue, node, error);
  9227. }
  9228. ),
  9229. node.isTransition ||
  9230. console.error(
  9231. "An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop."
  9232. ))
  9233. : onActionSuccess(actionQueue, node, returnValue);
  9234. }
  9235. function onActionSuccess(actionQueue, actionNode, nextState) {
  9236. actionNode.status = "fulfilled";
  9237. actionNode.value = nextState;
  9238. notifyActionListeners(actionNode);
  9239. actionQueue.state = nextState;
  9240. actionNode = actionQueue.pending;
  9241. null !== actionNode &&
  9242. ((nextState = actionNode.next),
  9243. nextState === actionNode
  9244. ? (actionQueue.pending = null)
  9245. : ((nextState = nextState.next),
  9246. (actionNode.next = nextState),
  9247. runActionStateAction(actionQueue, nextState)));
  9248. }
  9249. function onActionError(actionQueue, actionNode, error) {
  9250. var last = actionQueue.pending;
  9251. actionQueue.pending = null;
  9252. if (null !== last) {
  9253. last = last.next;
  9254. do
  9255. (actionNode.status = "rejected"),
  9256. (actionNode.reason = error),
  9257. notifyActionListeners(actionNode),
  9258. (actionNode = actionNode.next);
  9259. while (actionNode !== last);
  9260. }
  9261. actionQueue.action = null;
  9262. }
  9263. function notifyActionListeners(actionNode) {
  9264. actionNode = actionNode.listeners;
  9265. for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();
  9266. }
  9267. function actionStateReducer(oldState, newState) {
  9268. return newState;
  9269. }
  9270. function mountActionState(action, initialStateProp) {
  9271. if (isHydrating) {
  9272. var ssrFormState = workInProgressRoot.formState;
  9273. if (null !== ssrFormState) {
  9274. a: {
  9275. var isMatching = currentlyRenderingFiber;
  9276. if (isHydrating) {
  9277. if (nextHydratableInstance) {
  9278. b: {
  9279. var markerInstance = nextHydratableInstance;
  9280. for (
  9281. var inRootOrSingleton = rootOrSingletonContext;
  9282. 8 !== markerInstance.nodeType;
  9283. ) {
  9284. if (!inRootOrSingleton) {
  9285. markerInstance = null;
  9286. break b;
  9287. }
  9288. markerInstance = getNextHydratable(
  9289. markerInstance.nextSibling
  9290. );
  9291. if (null === markerInstance) {
  9292. markerInstance = null;
  9293. break b;
  9294. }
  9295. }
  9296. inRootOrSingleton = markerInstance.data;
  9297. markerInstance =
  9298. inRootOrSingleton === FORM_STATE_IS_MATCHING ||
  9299. inRootOrSingleton === FORM_STATE_IS_NOT_MATCHING
  9300. ? markerInstance
  9301. : null;
  9302. }
  9303. if (markerInstance) {
  9304. nextHydratableInstance = getNextHydratable(
  9305. markerInstance.nextSibling
  9306. );
  9307. isMatching = markerInstance.data === FORM_STATE_IS_MATCHING;
  9308. break a;
  9309. }
  9310. }
  9311. throwOnHydrationMismatch(isMatching);
  9312. }
  9313. isMatching = false;
  9314. }
  9315. isMatching && (initialStateProp = ssrFormState[0]);
  9316. }
  9317. }
  9318. ssrFormState = mountWorkInProgressHook();
  9319. ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
  9320. isMatching = {
  9321. pending: null,
  9322. lanes: 0,
  9323. dispatch: null,
  9324. lastRenderedReducer: actionStateReducer,
  9325. lastRenderedState: initialStateProp
  9326. };
  9327. ssrFormState.queue = isMatching;
  9328. ssrFormState = dispatchSetState.bind(
  9329. null,
  9330. currentlyRenderingFiber,
  9331. isMatching
  9332. );
  9333. isMatching.dispatch = ssrFormState;
  9334. isMatching = mountStateImpl(false);
  9335. inRootOrSingleton = dispatchOptimisticSetState.bind(
  9336. null,
  9337. currentlyRenderingFiber,
  9338. false,
  9339. isMatching.queue
  9340. );
  9341. isMatching = mountWorkInProgressHook();
  9342. markerInstance = {
  9343. state: initialStateProp,
  9344. dispatch: null,
  9345. action: action,
  9346. pending: null
  9347. };
  9348. isMatching.queue = markerInstance;
  9349. ssrFormState = dispatchActionState.bind(
  9350. null,
  9351. currentlyRenderingFiber,
  9352. markerInstance,
  9353. inRootOrSingleton,
  9354. ssrFormState
  9355. );
  9356. markerInstance.dispatch = ssrFormState;
  9357. isMatching.memoizedState = action;
  9358. return [initialStateProp, ssrFormState, false];
  9359. }
  9360. function updateActionState(action) {
  9361. var stateHook = updateWorkInProgressHook();
  9362. return updateActionStateImpl(stateHook, currentHook, action);
  9363. }
  9364. function updateActionStateImpl(stateHook, currentStateHook, action) {
  9365. currentStateHook = updateReducerImpl(
  9366. stateHook,
  9367. currentStateHook,
  9368. actionStateReducer
  9369. )[0];
  9370. stateHook = updateReducer(basicStateReducer)[0];
  9371. if (
  9372. "object" === typeof currentStateHook &&
  9373. null !== currentStateHook &&
  9374. "function" === typeof currentStateHook.then
  9375. )
  9376. try {
  9377. var state = useThenable(currentStateHook);
  9378. } catch (x) {
  9379. if (x === SuspenseException) throw SuspenseActionException;
  9380. throw x;
  9381. }
  9382. else state = currentStateHook;
  9383. currentStateHook = updateWorkInProgressHook();
  9384. var actionQueue = currentStateHook.queue,
  9385. dispatch = actionQueue.dispatch;
  9386. action !== currentStateHook.memoizedState &&
  9387. ((currentlyRenderingFiber.flags |= 2048),
  9388. pushSimpleEffect(
  9389. HasEffect | Passive,
  9390. { destroy: void 0 },
  9391. actionStateActionEffect.bind(null, actionQueue, action),
  9392. null
  9393. ));
  9394. return [state, dispatch, stateHook];
  9395. }
  9396. function actionStateActionEffect(actionQueue, action) {
  9397. actionQueue.action = action;
  9398. }
  9399. function rerenderActionState(action) {
  9400. var stateHook = updateWorkInProgressHook(),
  9401. currentStateHook = currentHook;
  9402. if (null !== currentStateHook)
  9403. return updateActionStateImpl(stateHook, currentStateHook, action);
  9404. updateWorkInProgressHook();
  9405. stateHook = stateHook.memoizedState;
  9406. currentStateHook = updateWorkInProgressHook();
  9407. var dispatch = currentStateHook.queue.dispatch;
  9408. currentStateHook.memoizedState = action;
  9409. return [stateHook, dispatch, false];
  9410. }
  9411. function pushSimpleEffect(tag, inst, create, deps) {
  9412. tag = { tag: tag, create: create, deps: deps, inst: inst, next: null };
  9413. inst = currentlyRenderingFiber.updateQueue;
  9414. null === inst &&
  9415. ((inst = createFunctionComponentUpdateQueue()),
  9416. (currentlyRenderingFiber.updateQueue = inst));
  9417. create = inst.lastEffect;
  9418. null === create
  9419. ? (inst.lastEffect = tag.next = tag)
  9420. : ((deps = create.next),
  9421. (create.next = tag),
  9422. (tag.next = deps),
  9423. (inst.lastEffect = tag));
  9424. return tag;
  9425. }
  9426. function mountRef(initialValue) {
  9427. var hook = mountWorkInProgressHook();
  9428. initialValue = { current: initialValue };
  9429. return (hook.memoizedState = initialValue);
  9430. }
  9431. function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
  9432. var hook = mountWorkInProgressHook();
  9433. currentlyRenderingFiber.flags |= fiberFlags;
  9434. hook.memoizedState = pushSimpleEffect(
  9435. HasEffect | hookFlags,
  9436. { destroy: void 0 },
  9437. create,
  9438. void 0 === deps ? null : deps
  9439. );
  9440. }
  9441. function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
  9442. var hook = updateWorkInProgressHook();
  9443. deps = void 0 === deps ? null : deps;
  9444. var inst = hook.memoizedState.inst;
  9445. null !== currentHook &&
  9446. null !== deps &&
  9447. areHookInputsEqual(deps, currentHook.memoizedState.deps)
  9448. ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps))
  9449. : ((currentlyRenderingFiber.flags |= fiberFlags),
  9450. (hook.memoizedState = pushSimpleEffect(
  9451. HasEffect | hookFlags,
  9452. inst,
  9453. create,
  9454. deps
  9455. )));
  9456. }
  9457. function mountEffect(create, deps) {
  9458. (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode
  9459. ? mountEffectImpl(276826112, Passive, create, deps)
  9460. : mountEffectImpl(8390656, Passive, create, deps);
  9461. }
  9462. function useEffectEventImpl(payload) {
  9463. currentlyRenderingFiber.flags |= 4;
  9464. var componentUpdateQueue = currentlyRenderingFiber.updateQueue;
  9465. if (null === componentUpdateQueue)
  9466. (componentUpdateQueue = createFunctionComponentUpdateQueue()),
  9467. (currentlyRenderingFiber.updateQueue = componentUpdateQueue),
  9468. (componentUpdateQueue.events = [payload]);
  9469. else {
  9470. var events = componentUpdateQueue.events;
  9471. null === events
  9472. ? (componentUpdateQueue.events = [payload])
  9473. : events.push(payload);
  9474. }
  9475. }
  9476. function mountEvent(callback) {
  9477. var hook = mountWorkInProgressHook(),
  9478. ref = { impl: callback };
  9479. hook.memoizedState = ref;
  9480. return function () {
  9481. if ((executionContext & RenderContext) !== NoContext)
  9482. throw Error(
  9483. "A function wrapped in useEffectEvent can't be called during rendering."
  9484. );
  9485. return ref.impl.apply(void 0, arguments);
  9486. };
  9487. }
  9488. function updateEvent(callback) {
  9489. var ref = updateWorkInProgressHook().memoizedState;
  9490. useEffectEventImpl({ ref: ref, nextImpl: callback });
  9491. return function () {
  9492. if ((executionContext & RenderContext) !== NoContext)
  9493. throw Error(
  9494. "A function wrapped in useEffectEvent can't be called during rendering."
  9495. );
  9496. return ref.impl.apply(void 0, arguments);
  9497. };
  9498. }
  9499. function mountLayoutEffect(create, deps) {
  9500. var fiberFlags = 4194308;
  9501. (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode &&
  9502. (fiberFlags |= 134217728);
  9503. return mountEffectImpl(fiberFlags, Layout, create, deps);
  9504. }
  9505. function imperativeHandleEffect(create, ref) {
  9506. if ("function" === typeof ref) {
  9507. create = create();
  9508. var refCleanup = ref(create);
  9509. return function () {
  9510. "function" === typeof refCleanup ? refCleanup() : ref(null);
  9511. };
  9512. }
  9513. if (null !== ref && void 0 !== ref)
  9514. return (
  9515. ref.hasOwnProperty("current") ||
  9516. console.error(
  9517. "Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.",
  9518. "an object with keys {" + Object.keys(ref).join(", ") + "}"
  9519. ),
  9520. (create = create()),
  9521. (ref.current = create),
  9522. function () {
  9523. ref.current = null;
  9524. }
  9525. );
  9526. }
  9527. function mountImperativeHandle(ref, create, deps) {
  9528. "function" !== typeof create &&
  9529. console.error(
  9530. "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
  9531. null !== create ? typeof create : "null"
  9532. );
  9533. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  9534. var fiberFlags = 4194308;
  9535. (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode &&
  9536. (fiberFlags |= 134217728);
  9537. mountEffectImpl(
  9538. fiberFlags,
  9539. Layout,
  9540. imperativeHandleEffect.bind(null, create, ref),
  9541. deps
  9542. );
  9543. }
  9544. function updateImperativeHandle(ref, create, deps) {
  9545. "function" !== typeof create &&
  9546. console.error(
  9547. "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
  9548. null !== create ? typeof create : "null"
  9549. );
  9550. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  9551. updateEffectImpl(
  9552. 4,
  9553. Layout,
  9554. imperativeHandleEffect.bind(null, create, ref),
  9555. deps
  9556. );
  9557. }
  9558. function mountCallback(callback, deps) {
  9559. mountWorkInProgressHook().memoizedState = [
  9560. callback,
  9561. void 0 === deps ? null : deps
  9562. ];
  9563. return callback;
  9564. }
  9565. function updateCallback(callback, deps) {
  9566. var hook = updateWorkInProgressHook();
  9567. deps = void 0 === deps ? null : deps;
  9568. var prevState = hook.memoizedState;
  9569. if (null !== deps && areHookInputsEqual(deps, prevState[1]))
  9570. return prevState[0];
  9571. hook.memoizedState = [callback, deps];
  9572. return callback;
  9573. }
  9574. function mountMemo(nextCreate, deps) {
  9575. var hook = mountWorkInProgressHook();
  9576. deps = void 0 === deps ? null : deps;
  9577. var nextValue = nextCreate();
  9578. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  9579. setIsStrictModeForDevtools(true);
  9580. try {
  9581. nextCreate();
  9582. } finally {
  9583. setIsStrictModeForDevtools(false);
  9584. }
  9585. }
  9586. hook.memoizedState = [nextValue, deps];
  9587. return nextValue;
  9588. }
  9589. function updateMemo(nextCreate, deps) {
  9590. var hook = updateWorkInProgressHook();
  9591. deps = void 0 === deps ? null : deps;
  9592. var prevState = hook.memoizedState;
  9593. if (null !== deps && areHookInputsEqual(deps, prevState[1]))
  9594. return prevState[0];
  9595. prevState = nextCreate();
  9596. if (shouldDoubleInvokeUserFnsInHooksDEV) {
  9597. setIsStrictModeForDevtools(true);
  9598. try {
  9599. nextCreate();
  9600. } finally {
  9601. setIsStrictModeForDevtools(false);
  9602. }
  9603. }
  9604. hook.memoizedState = [prevState, deps];
  9605. return prevState;
  9606. }
  9607. function mountDeferredValue(value, initialValue) {
  9608. var hook = mountWorkInProgressHook();
  9609. return mountDeferredValueImpl(hook, value, initialValue);
  9610. }
  9611. function updateDeferredValue(value, initialValue) {
  9612. var hook = updateWorkInProgressHook();
  9613. return updateDeferredValueImpl(
  9614. hook,
  9615. currentHook.memoizedState,
  9616. value,
  9617. initialValue
  9618. );
  9619. }
  9620. function rerenderDeferredValue(value, initialValue) {
  9621. var hook = updateWorkInProgressHook();
  9622. return null === currentHook
  9623. ? mountDeferredValueImpl(hook, value, initialValue)
  9624. : updateDeferredValueImpl(
  9625. hook,
  9626. currentHook.memoizedState,
  9627. value,
  9628. initialValue
  9629. );
  9630. }
  9631. function mountDeferredValueImpl(hook, value, initialValue) {
  9632. if (
  9633. void 0 === initialValue ||
  9634. (0 !== (renderLanes & 1073741824) &&
  9635. 0 === (workInProgressRootRenderLanes & 261930))
  9636. )
  9637. return (hook.memoizedState = value);
  9638. hook.memoizedState = initialValue;
  9639. hook = requestDeferredLane();
  9640. currentlyRenderingFiber.lanes |= hook;
  9641. workInProgressRootSkippedLanes |= hook;
  9642. return initialValue;
  9643. }
  9644. function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
  9645. if (objectIs(value, prevValue)) return value;
  9646. if (null !== currentTreeHiddenStackCursor.current)
  9647. return (
  9648. (hook = mountDeferredValueImpl(hook, value, initialValue)),
  9649. objectIs(hook, prevValue) || (didReceiveUpdate = true),
  9650. hook
  9651. );
  9652. if (
  9653. 0 === (renderLanes & 42) ||
  9654. (0 !== (renderLanes & 1073741824) &&
  9655. 0 === (workInProgressRootRenderLanes & 261930))
  9656. )
  9657. return (didReceiveUpdate = true), (hook.memoizedState = value);
  9658. hook = requestDeferredLane();
  9659. currentlyRenderingFiber.lanes |= hook;
  9660. workInProgressRootSkippedLanes |= hook;
  9661. return prevValue;
  9662. }
  9663. function releaseAsyncTransition() {
  9664. ReactSharedInternals.asyncTransitions--;
  9665. }
  9666. function startTransition(
  9667. fiber,
  9668. queue,
  9669. pendingState,
  9670. finishedState,
  9671. callback
  9672. ) {
  9673. var previousPriority = ReactDOMSharedInternals.p;
  9674. ReactDOMSharedInternals.p =
  9675. 0 !== previousPriority && previousPriority < ContinuousEventPriority
  9676. ? previousPriority
  9677. : ContinuousEventPriority;
  9678. var prevTransition = ReactSharedInternals.T,
  9679. currentTransition = {};
  9680. currentTransition._updatedFibers = new Set();
  9681. ReactSharedInternals.T = currentTransition;
  9682. dispatchOptimisticSetState(fiber, false, queue, pendingState);
  9683. try {
  9684. var returnValue = callback(),
  9685. onStartTransitionFinish = ReactSharedInternals.S;
  9686. null !== onStartTransitionFinish &&
  9687. onStartTransitionFinish(currentTransition, returnValue);
  9688. if (
  9689. null !== returnValue &&
  9690. "object" === typeof returnValue &&
  9691. "function" === typeof returnValue.then
  9692. ) {
  9693. ReactSharedInternals.asyncTransitions++;
  9694. returnValue.then(releaseAsyncTransition, releaseAsyncTransition);
  9695. var thenableForFinishedState = chainThenableValue(
  9696. returnValue,
  9697. finishedState
  9698. );
  9699. dispatchSetStateInternal(
  9700. fiber,
  9701. queue,
  9702. thenableForFinishedState,
  9703. requestUpdateLane(fiber)
  9704. );
  9705. } else
  9706. dispatchSetStateInternal(
  9707. fiber,
  9708. queue,
  9709. finishedState,
  9710. requestUpdateLane(fiber)
  9711. );
  9712. } catch (error) {
  9713. dispatchSetStateInternal(
  9714. fiber,
  9715. queue,
  9716. { then: function () {}, status: "rejected", reason: error },
  9717. requestUpdateLane(fiber)
  9718. );
  9719. } finally {
  9720. (ReactDOMSharedInternals.p = previousPriority),
  9721. null !== prevTransition &&
  9722. null !== currentTransition.types &&
  9723. (null !== prevTransition.types &&
  9724. prevTransition.types !== currentTransition.types &&
  9725. console.error(
  9726. "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
  9727. ),
  9728. (prevTransition.types = currentTransition.types)),
  9729. (ReactSharedInternals.T = prevTransition),
  9730. null === prevTransition &&
  9731. currentTransition._updatedFibers &&
  9732. ((fiber = currentTransition._updatedFibers.size),
  9733. currentTransition._updatedFibers.clear(),
  9734. 10 < fiber &&
  9735. console.warn(
  9736. "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
  9737. ));
  9738. }
  9739. }
  9740. function startHostTransition(formFiber, pendingState, action, formData) {
  9741. if (5 !== formFiber.tag)
  9742. throw Error(
  9743. "Expected the form instance to be a HostComponent. This is a bug in React."
  9744. );
  9745. var queue = ensureFormComponentIsStateful(formFiber).queue;
  9746. startHostActionTimer(formFiber);
  9747. startTransition(
  9748. formFiber,
  9749. queue,
  9750. pendingState,
  9751. NotPendingTransition,
  9752. null === action
  9753. ? noop
  9754. : function () {
  9755. requestFormReset$1(formFiber);
  9756. return action(formData);
  9757. }
  9758. );
  9759. }
  9760. function ensureFormComponentIsStateful(formFiber) {
  9761. var existingStateHook = formFiber.memoizedState;
  9762. if (null !== existingStateHook) return existingStateHook;
  9763. existingStateHook = {
  9764. memoizedState: NotPendingTransition,
  9765. baseState: NotPendingTransition,
  9766. baseQueue: null,
  9767. queue: {
  9768. pending: null,
  9769. lanes: 0,
  9770. dispatch: null,
  9771. lastRenderedReducer: basicStateReducer,
  9772. lastRenderedState: NotPendingTransition
  9773. },
  9774. next: null
  9775. };
  9776. var initialResetState = {};
  9777. existingStateHook.next = {
  9778. memoizedState: initialResetState,
  9779. baseState: initialResetState,
  9780. baseQueue: null,
  9781. queue: {
  9782. pending: null,
  9783. lanes: 0,
  9784. dispatch: null,
  9785. lastRenderedReducer: basicStateReducer,
  9786. lastRenderedState: initialResetState
  9787. },
  9788. next: null
  9789. };
  9790. formFiber.memoizedState = existingStateHook;
  9791. formFiber = formFiber.alternate;
  9792. null !== formFiber && (formFiber.memoizedState = existingStateHook);
  9793. return existingStateHook;
  9794. }
  9795. function requestFormReset$1(formFiber) {
  9796. null === ReactSharedInternals.T &&
  9797. console.error(
  9798. "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition."
  9799. );
  9800. var stateHook = ensureFormComponentIsStateful(formFiber);
  9801. null === stateHook.next &&
  9802. (stateHook = formFiber.alternate.memoizedState);
  9803. dispatchSetStateInternal(
  9804. formFiber,
  9805. stateHook.next.queue,
  9806. {},
  9807. requestUpdateLane(formFiber)
  9808. );
  9809. }
  9810. function mountTransition() {
  9811. var stateHook = mountStateImpl(false);
  9812. stateHook = startTransition.bind(
  9813. null,
  9814. currentlyRenderingFiber,
  9815. stateHook.queue,
  9816. true,
  9817. false
  9818. );
  9819. mountWorkInProgressHook().memoizedState = stateHook;
  9820. return [false, stateHook];
  9821. }
  9822. function updateTransition() {
  9823. var booleanOrThenable = updateReducer(basicStateReducer)[0],
  9824. start = updateWorkInProgressHook().memoizedState;
  9825. return [
  9826. "boolean" === typeof booleanOrThenable
  9827. ? booleanOrThenable
  9828. : useThenable(booleanOrThenable),
  9829. start
  9830. ];
  9831. }
  9832. function rerenderTransition() {
  9833. var booleanOrThenable = rerenderReducer(basicStateReducer)[0],
  9834. start = updateWorkInProgressHook().memoizedState;
  9835. return [
  9836. "boolean" === typeof booleanOrThenable
  9837. ? booleanOrThenable
  9838. : useThenable(booleanOrThenable),
  9839. start
  9840. ];
  9841. }
  9842. function useHostTransitionStatus() {
  9843. return readContext(HostTransitionContext);
  9844. }
  9845. function mountId() {
  9846. var hook = mountWorkInProgressHook(),
  9847. identifierPrefix = workInProgressRoot.identifierPrefix;
  9848. if (isHydrating) {
  9849. var treeId = treeContextOverflow;
  9850. var idWithLeadingBit = treeContextId;
  9851. treeId =
  9852. (
  9853. idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1))
  9854. ).toString(32) + treeId;
  9855. identifierPrefix = "_" + identifierPrefix + "R_" + treeId;
  9856. treeId = localIdCounter++;
  9857. 0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
  9858. identifierPrefix += "_";
  9859. } else
  9860. (treeId = globalClientIdCounter++),
  9861. (identifierPrefix =
  9862. "_" + identifierPrefix + "r_" + treeId.toString(32) + "_");
  9863. return (hook.memoizedState = identifierPrefix);
  9864. }
  9865. function mountRefresh() {
  9866. return (mountWorkInProgressHook().memoizedState = refreshCache.bind(
  9867. null,
  9868. currentlyRenderingFiber
  9869. ));
  9870. }
  9871. function refreshCache(fiber, seedKey) {
  9872. for (var provider = fiber.return; null !== provider; ) {
  9873. switch (provider.tag) {
  9874. case 24:
  9875. case 3:
  9876. var lane = requestUpdateLane(provider),
  9877. refreshUpdate = createUpdate(lane),
  9878. root = enqueueUpdate(provider, refreshUpdate, lane);
  9879. null !== root &&
  9880. (startUpdateTimerByLane(lane, "refresh()", fiber),
  9881. scheduleUpdateOnFiber(root, provider, lane),
  9882. entangleTransitions(root, provider, lane));
  9883. fiber = createCache();
  9884. null !== seedKey &&
  9885. void 0 !== seedKey &&
  9886. null !== root &&
  9887. console.error(
  9888. "The seed argument is not enabled outside experimental channels."
  9889. );
  9890. refreshUpdate.payload = { cache: fiber };
  9891. return;
  9892. }
  9893. provider = provider.return;
  9894. }
  9895. }
  9896. function dispatchReducerAction(fiber, queue, action) {
  9897. var args = arguments;
  9898. "function" === typeof args[3] &&
  9899. console.error(
  9900. "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
  9901. );
  9902. args = requestUpdateLane(fiber);
  9903. var update = {
  9904. lane: args,
  9905. revertLane: 0,
  9906. gesture: null,
  9907. action: action,
  9908. hasEagerState: false,
  9909. eagerState: null,
  9910. next: null
  9911. };
  9912. isRenderPhaseUpdate(fiber)
  9913. ? enqueueRenderPhaseUpdate(queue, update)
  9914. : ((update = enqueueConcurrentHookUpdate(fiber, queue, update, args)),
  9915. null !== update &&
  9916. (startUpdateTimerByLane(args, "dispatch()", fiber),
  9917. scheduleUpdateOnFiber(update, fiber, args),
  9918. entangleTransitionUpdate(update, queue, args)));
  9919. }
  9920. function dispatchSetState(fiber, queue, action) {
  9921. var args = arguments;
  9922. "function" === typeof args[3] &&
  9923. console.error(
  9924. "State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."
  9925. );
  9926. args = requestUpdateLane(fiber);
  9927. dispatchSetStateInternal(fiber, queue, action, args) &&
  9928. startUpdateTimerByLane(args, "setState()", fiber);
  9929. }
  9930. function dispatchSetStateInternal(fiber, queue, action, lane) {
  9931. var update = {
  9932. lane: lane,
  9933. revertLane: 0,
  9934. gesture: null,
  9935. action: action,
  9936. hasEagerState: false,
  9937. eagerState: null,
  9938. next: null
  9939. };
  9940. if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
  9941. else {
  9942. var alternate = fiber.alternate;
  9943. if (
  9944. 0 === fiber.lanes &&
  9945. (null === alternate || 0 === alternate.lanes) &&
  9946. ((alternate = queue.lastRenderedReducer), null !== alternate)
  9947. ) {
  9948. var prevDispatcher = ReactSharedInternals.H;
  9949. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  9950. try {
  9951. var currentState = queue.lastRenderedState,
  9952. eagerState = alternate(currentState, action);
  9953. update.hasEagerState = !0;
  9954. update.eagerState = eagerState;
  9955. if (objectIs(eagerState, currentState))
  9956. return (
  9957. enqueueUpdate$1(fiber, queue, update, 0),
  9958. null === workInProgressRoot &&
  9959. finishQueueingConcurrentUpdates(),
  9960. !1
  9961. );
  9962. } catch (error) {
  9963. } finally {
  9964. ReactSharedInternals.H = prevDispatcher;
  9965. }
  9966. }
  9967. action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
  9968. if (null !== action)
  9969. return (
  9970. scheduleUpdateOnFiber(action, fiber, lane),
  9971. entangleTransitionUpdate(action, queue, lane),
  9972. true
  9973. );
  9974. }
  9975. return false;
  9976. }
  9977. function dispatchOptimisticSetState(
  9978. fiber,
  9979. throwIfDuringRender,
  9980. queue,
  9981. action
  9982. ) {
  9983. null === ReactSharedInternals.T &&
  9984. 0 === currentEntangledLane &&
  9985. console.error(
  9986. "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."
  9987. );
  9988. action = {
  9989. lane: 2,
  9990. revertLane: requestTransitionLane(),
  9991. gesture: null,
  9992. action: action,
  9993. hasEagerState: false,
  9994. eagerState: null,
  9995. next: null
  9996. };
  9997. if (isRenderPhaseUpdate(fiber)) {
  9998. if (throwIfDuringRender)
  9999. throw Error("Cannot update optimistic state while rendering.");
  10000. console.error("Cannot call startTransition while rendering.");
  10001. } else
  10002. (throwIfDuringRender = enqueueConcurrentHookUpdate(
  10003. fiber,
  10004. queue,
  10005. action,
  10006. 2
  10007. )),
  10008. null !== throwIfDuringRender &&
  10009. (startUpdateTimerByLane(2, "setOptimistic()", fiber),
  10010. scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2));
  10011. }
  10012. function isRenderPhaseUpdate(fiber) {
  10013. var alternate = fiber.alternate;
  10014. return (
  10015. fiber === currentlyRenderingFiber ||
  10016. (null !== alternate && alternate === currentlyRenderingFiber)
  10017. );
  10018. }
  10019. function enqueueRenderPhaseUpdate(queue, update) {
  10020. didScheduleRenderPhaseUpdateDuringThisPass =
  10021. didScheduleRenderPhaseUpdate = true;
  10022. var pending = queue.pending;
  10023. null === pending
  10024. ? (update.next = update)
  10025. : ((update.next = pending.next), (pending.next = update));
  10026. queue.pending = update;
  10027. }
  10028. function entangleTransitionUpdate(root, queue, lane) {
  10029. if (0 !== (lane & 4194048)) {
  10030. var queueLanes = queue.lanes;
  10031. queueLanes &= root.pendingLanes;
  10032. lane |= queueLanes;
  10033. queue.lanes = lane;
  10034. markRootEntangled(root, lane);
  10035. }
  10036. }
  10037. function warnOnInvalidCallback(callback) {
  10038. if (null !== callback && "function" !== typeof callback) {
  10039. var key = String(callback);
  10040. didWarnOnInvalidCallback.has(key) ||
  10041. (didWarnOnInvalidCallback.add(key),
  10042. console.error(
  10043. "Expected the last optional `callback` argument to be a function. Instead received: %s.",
  10044. callback
  10045. ));
  10046. }
  10047. }
  10048. function applyDerivedStateFromProps(
  10049. workInProgress,
  10050. ctor,
  10051. getDerivedStateFromProps,
  10052. nextProps
  10053. ) {
  10054. var prevState = workInProgress.memoizedState,
  10055. partialState = getDerivedStateFromProps(nextProps, prevState);
  10056. if (workInProgress.mode & StrictLegacyMode) {
  10057. setIsStrictModeForDevtools(true);
  10058. try {
  10059. partialState = getDerivedStateFromProps(nextProps, prevState);
  10060. } finally {
  10061. setIsStrictModeForDevtools(false);
  10062. }
  10063. }
  10064. void 0 === partialState &&
  10065. ((ctor = getComponentNameFromType(ctor) || "Component"),
  10066. didWarnAboutUndefinedDerivedState.has(ctor) ||
  10067. (didWarnAboutUndefinedDerivedState.add(ctor),
  10068. console.error(
  10069. "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
  10070. ctor
  10071. )));
  10072. prevState =
  10073. null === partialState || void 0 === partialState
  10074. ? prevState
  10075. : assign({}, prevState, partialState);
  10076. workInProgress.memoizedState = prevState;
  10077. 0 === workInProgress.lanes &&
  10078. (workInProgress.updateQueue.baseState = prevState);
  10079. }
  10080. function checkShouldComponentUpdate(
  10081. workInProgress,
  10082. ctor,
  10083. oldProps,
  10084. newProps,
  10085. oldState,
  10086. newState,
  10087. nextContext
  10088. ) {
  10089. var instance = workInProgress.stateNode;
  10090. if ("function" === typeof instance.shouldComponentUpdate) {
  10091. oldProps = instance.shouldComponentUpdate(
  10092. newProps,
  10093. newState,
  10094. nextContext
  10095. );
  10096. if (workInProgress.mode & StrictLegacyMode) {
  10097. setIsStrictModeForDevtools(true);
  10098. try {
  10099. oldProps = instance.shouldComponentUpdate(
  10100. newProps,
  10101. newState,
  10102. nextContext
  10103. );
  10104. } finally {
  10105. setIsStrictModeForDevtools(false);
  10106. }
  10107. }
  10108. void 0 === oldProps &&
  10109. console.error(
  10110. "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",
  10111. getComponentNameFromType(ctor) || "Component"
  10112. );
  10113. return oldProps;
  10114. }
  10115. return ctor.prototype && ctor.prototype.isPureReactComponent
  10116. ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)
  10117. : true;
  10118. }
  10119. function callComponentWillReceiveProps(
  10120. workInProgress,
  10121. instance,
  10122. newProps,
  10123. nextContext
  10124. ) {
  10125. var oldState = instance.state;
  10126. "function" === typeof instance.componentWillReceiveProps &&
  10127. instance.componentWillReceiveProps(newProps, nextContext);
  10128. "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
  10129. instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  10130. instance.state !== oldState &&
  10131. ((workInProgress =
  10132. getComponentNameFromFiber(workInProgress) || "Component"),
  10133. didWarnAboutStateAssignmentForComponent.has(workInProgress) ||
  10134. (didWarnAboutStateAssignmentForComponent.add(workInProgress),
  10135. console.error(
  10136. "%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
  10137. workInProgress
  10138. )),
  10139. classComponentUpdater.enqueueReplaceState(
  10140. instance,
  10141. instance.state,
  10142. null
  10143. ));
  10144. }
  10145. function resolveClassComponentProps(Component, baseProps) {
  10146. var newProps = baseProps;
  10147. if ("ref" in baseProps) {
  10148. newProps = {};
  10149. for (var propName in baseProps)
  10150. "ref" !== propName && (newProps[propName] = baseProps[propName]);
  10151. }
  10152. if ((Component = Component.defaultProps)) {
  10153. newProps === baseProps && (newProps = assign({}, newProps));
  10154. for (var _propName in Component)
  10155. void 0 === newProps[_propName] &&
  10156. (newProps[_propName] = Component[_propName]);
  10157. }
  10158. return newProps;
  10159. }
  10160. function defaultOnUncaughtError(error) {
  10161. reportGlobalError(error);
  10162. console.warn(
  10163. "%s\n\n%s\n",
  10164. componentName
  10165. ? "An error occurred in the <" + componentName + "> component."
  10166. : "An error occurred in one of your React components.",
  10167. "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://react.dev/link/error-boundaries to learn more about error boundaries."
  10168. );
  10169. }
  10170. function defaultOnCaughtError(error) {
  10171. var componentNameMessage = componentName
  10172. ? "The above error occurred in the <" + componentName + "> component."
  10173. : "The above error occurred in one of your React components.",
  10174. recreateMessage =
  10175. "React will try to recreate this component tree from scratch using the error boundary you provided, " +
  10176. ((errorBoundaryName || "Anonymous") + ".");
  10177. if (
  10178. "object" === typeof error &&
  10179. null !== error &&
  10180. "string" === typeof error.environmentName
  10181. ) {
  10182. var JSCompiler_inline_result = error.environmentName;
  10183. error = [
  10184. "%o\n\n%s\n\n%s\n",
  10185. error,
  10186. componentNameMessage,
  10187. recreateMessage
  10188. ].slice(0);
  10189. "string" === typeof error[0]
  10190. ? error.splice(
  10191. 0,
  10192. 1,
  10193. badgeFormat + " " + error[0],
  10194. badgeStyle,
  10195. pad + JSCompiler_inline_result + pad,
  10196. resetStyle
  10197. )
  10198. : error.splice(
  10199. 0,
  10200. 0,
  10201. badgeFormat,
  10202. badgeStyle,
  10203. pad + JSCompiler_inline_result + pad,
  10204. resetStyle
  10205. );
  10206. error.unshift(console);
  10207. JSCompiler_inline_result = bind.apply(console.error, error);
  10208. JSCompiler_inline_result();
  10209. } else
  10210. console.error(
  10211. "%o\n\n%s\n\n%s\n",
  10212. error,
  10213. componentNameMessage,
  10214. recreateMessage
  10215. );
  10216. }
  10217. function defaultOnRecoverableError(error) {
  10218. reportGlobalError(error);
  10219. }
  10220. function logUncaughtError(root, errorInfo) {
  10221. try {
  10222. componentName = errorInfo.source
  10223. ? getComponentNameFromFiber(errorInfo.source)
  10224. : null;
  10225. errorBoundaryName = null;
  10226. var error = errorInfo.value;
  10227. if (null !== ReactSharedInternals.actQueue)
  10228. ReactSharedInternals.thrownErrors.push(error);
  10229. else {
  10230. var onUncaughtError = root.onUncaughtError;
  10231. onUncaughtError(error, { componentStack: errorInfo.stack });
  10232. }
  10233. } catch (e$5) {
  10234. setTimeout(function () {
  10235. throw e$5;
  10236. });
  10237. }
  10238. }
  10239. function logCaughtError(root, boundary, errorInfo) {
  10240. try {
  10241. componentName = errorInfo.source
  10242. ? getComponentNameFromFiber(errorInfo.source)
  10243. : null;
  10244. errorBoundaryName = getComponentNameFromFiber(boundary);
  10245. var onCaughtError = root.onCaughtError;
  10246. onCaughtError(errorInfo.value, {
  10247. componentStack: errorInfo.stack,
  10248. errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
  10249. });
  10250. } catch (e$6) {
  10251. setTimeout(function () {
  10252. throw e$6;
  10253. });
  10254. }
  10255. }
  10256. function createRootErrorUpdate(root, errorInfo, lane) {
  10257. lane = createUpdate(lane);
  10258. lane.tag = CaptureUpdate;
  10259. lane.payload = { element: null };
  10260. lane.callback = function () {
  10261. runWithFiberInDEV(errorInfo.source, logUncaughtError, root, errorInfo);
  10262. };
  10263. return lane;
  10264. }
  10265. function createClassErrorUpdate(lane) {
  10266. lane = createUpdate(lane);
  10267. lane.tag = CaptureUpdate;
  10268. return lane;
  10269. }
  10270. function initializeClassErrorUpdate(update, root, fiber, errorInfo) {
  10271. var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
  10272. if ("function" === typeof getDerivedStateFromError) {
  10273. var error = errorInfo.value;
  10274. update.payload = function () {
  10275. return getDerivedStateFromError(error);
  10276. };
  10277. update.callback = function () {
  10278. markFailedErrorBoundaryForHotReloading(fiber);
  10279. runWithFiberInDEV(
  10280. errorInfo.source,
  10281. logCaughtError,
  10282. root,
  10283. fiber,
  10284. errorInfo
  10285. );
  10286. };
  10287. }
  10288. var inst = fiber.stateNode;
  10289. null !== inst &&
  10290. "function" === typeof inst.componentDidCatch &&
  10291. (update.callback = function () {
  10292. markFailedErrorBoundaryForHotReloading(fiber);
  10293. runWithFiberInDEV(
  10294. errorInfo.source,
  10295. logCaughtError,
  10296. root,
  10297. fiber,
  10298. errorInfo
  10299. );
  10300. "function" !== typeof getDerivedStateFromError &&
  10301. (null === legacyErrorBoundariesThatAlreadyFailed
  10302. ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
  10303. : legacyErrorBoundariesThatAlreadyFailed.add(this));
  10304. callComponentDidCatchInDEV(this, errorInfo);
  10305. "function" === typeof getDerivedStateFromError ||
  10306. (0 === (fiber.lanes & 2) &&
  10307. console.error(
  10308. "%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",
  10309. getComponentNameFromFiber(fiber) || "Unknown"
  10310. ));
  10311. });
  10312. }
  10313. function throwException(
  10314. root,
  10315. returnFiber,
  10316. sourceFiber,
  10317. value,
  10318. rootRenderLanes
  10319. ) {
  10320. sourceFiber.flags |= 32768;
  10321. isDevToolsPresent && restorePendingUpdaters(root, rootRenderLanes);
  10322. if (
  10323. null !== value &&
  10324. "object" === typeof value &&
  10325. "function" === typeof value.then
  10326. ) {
  10327. returnFiber = sourceFiber.alternate;
  10328. null !== returnFiber &&
  10329. propagateParentContextChanges(
  10330. returnFiber,
  10331. sourceFiber,
  10332. rootRenderLanes,
  10333. true
  10334. );
  10335. isHydrating && (didSuspendOrErrorDEV = true);
  10336. sourceFiber = suspenseHandlerStackCursor.current;
  10337. if (null !== sourceFiber) {
  10338. switch (sourceFiber.tag) {
  10339. case 31:
  10340. case 13:
  10341. return (
  10342. null === shellBoundary
  10343. ? renderDidSuspendDelayIfPossible()
  10344. : null === sourceFiber.alternate &&
  10345. workInProgressRootExitStatus === RootInProgress &&
  10346. (workInProgressRootExitStatus = RootSuspended),
  10347. (sourceFiber.flags &= -257),
  10348. (sourceFiber.flags |= 65536),
  10349. (sourceFiber.lanes = rootRenderLanes),
  10350. value === noopSuspenseyCommitThenable
  10351. ? (sourceFiber.flags |= 16384)
  10352. : ((returnFiber = sourceFiber.updateQueue),
  10353. null === returnFiber
  10354. ? (sourceFiber.updateQueue = new Set([value]))
  10355. : returnFiber.add(value),
  10356. attachPingListener(root, value, rootRenderLanes)),
  10357. false
  10358. );
  10359. case 22:
  10360. return (
  10361. (sourceFiber.flags |= 65536),
  10362. value === noopSuspenseyCommitThenable
  10363. ? (sourceFiber.flags |= 16384)
  10364. : ((returnFiber = sourceFiber.updateQueue),
  10365. null === returnFiber
  10366. ? ((returnFiber = {
  10367. transitions: null,
  10368. markerInstances: null,
  10369. retryQueue: new Set([value])
  10370. }),
  10371. (sourceFiber.updateQueue = returnFiber))
  10372. : ((sourceFiber = returnFiber.retryQueue),
  10373. null === sourceFiber
  10374. ? (returnFiber.retryQueue = new Set([value]))
  10375. : sourceFiber.add(value)),
  10376. attachPingListener(root, value, rootRenderLanes)),
  10377. false
  10378. );
  10379. }
  10380. throw Error(
  10381. "Unexpected Suspense handler tag (" +
  10382. sourceFiber.tag +
  10383. "). This is a bug in React."
  10384. );
  10385. }
  10386. attachPingListener(root, value, rootRenderLanes);
  10387. renderDidSuspendDelayIfPossible();
  10388. return false;
  10389. }
  10390. if (isHydrating)
  10391. return (
  10392. (didSuspendOrErrorDEV = true),
  10393. (returnFiber = suspenseHandlerStackCursor.current),
  10394. null !== returnFiber
  10395. ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256),
  10396. (returnFiber.flags |= 65536),
  10397. (returnFiber.lanes = rootRenderLanes),
  10398. value !== HydrationMismatchException &&
  10399. queueHydrationError(
  10400. createCapturedValueAtFiber(
  10401. Error(
  10402. "There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",
  10403. { cause: value }
  10404. ),
  10405. sourceFiber
  10406. )
  10407. ))
  10408. : (value !== HydrationMismatchException &&
  10409. queueHydrationError(
  10410. createCapturedValueAtFiber(
  10411. Error(
  10412. "There was an error while hydrating but React was able to recover by instead client rendering the entire root.",
  10413. { cause: value }
  10414. ),
  10415. sourceFiber
  10416. )
  10417. ),
  10418. (root = root.current.alternate),
  10419. (root.flags |= 65536),
  10420. (rootRenderLanes &= -rootRenderLanes),
  10421. (root.lanes |= rootRenderLanes),
  10422. (value = createCapturedValueAtFiber(value, sourceFiber)),
  10423. (rootRenderLanes = createRootErrorUpdate(
  10424. root.stateNode,
  10425. value,
  10426. rootRenderLanes
  10427. )),
  10428. enqueueCapturedUpdate(root, rootRenderLanes),
  10429. workInProgressRootExitStatus !== RootSuspendedWithDelay &&
  10430. (workInProgressRootExitStatus = RootErrored)),
  10431. false
  10432. );
  10433. var error = createCapturedValueAtFiber(
  10434. Error(
  10435. "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",
  10436. { cause: value }
  10437. ),
  10438. sourceFiber
  10439. );
  10440. null === workInProgressRootConcurrentErrors
  10441. ? (workInProgressRootConcurrentErrors = [error])
  10442. : workInProgressRootConcurrentErrors.push(error);
  10443. workInProgressRootExitStatus !== RootSuspendedWithDelay &&
  10444. (workInProgressRootExitStatus = RootErrored);
  10445. if (null === returnFiber) return true;
  10446. value = createCapturedValueAtFiber(value, sourceFiber);
  10447. sourceFiber = returnFiber;
  10448. do {
  10449. switch (sourceFiber.tag) {
  10450. case 3:
  10451. return (
  10452. (sourceFiber.flags |= 65536),
  10453. (root = rootRenderLanes & -rootRenderLanes),
  10454. (sourceFiber.lanes |= root),
  10455. (root = createRootErrorUpdate(
  10456. sourceFiber.stateNode,
  10457. value,
  10458. root
  10459. )),
  10460. enqueueCapturedUpdate(sourceFiber, root),
  10461. false
  10462. );
  10463. case 1:
  10464. if (
  10465. ((returnFiber = sourceFiber.type),
  10466. (error = sourceFiber.stateNode),
  10467. 0 === (sourceFiber.flags & 128) &&
  10468. ("function" === typeof returnFiber.getDerivedStateFromError ||
  10469. (null !== error &&
  10470. "function" === typeof error.componentDidCatch &&
  10471. (null === legacyErrorBoundariesThatAlreadyFailed ||
  10472. !legacyErrorBoundariesThatAlreadyFailed.has(error)))))
  10473. )
  10474. return (
  10475. (sourceFiber.flags |= 65536),
  10476. (rootRenderLanes &= -rootRenderLanes),
  10477. (sourceFiber.lanes |= rootRenderLanes),
  10478. (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)),
  10479. initializeClassErrorUpdate(
  10480. rootRenderLanes,
  10481. root,
  10482. sourceFiber,
  10483. value
  10484. ),
  10485. enqueueCapturedUpdate(sourceFiber, rootRenderLanes),
  10486. false
  10487. );
  10488. }
  10489. sourceFiber = sourceFiber.return;
  10490. } while (null !== sourceFiber);
  10491. return false;
  10492. }
  10493. function reconcileChildren(
  10494. current,
  10495. workInProgress,
  10496. nextChildren,
  10497. renderLanes
  10498. ) {
  10499. workInProgress.child =
  10500. null === current
  10501. ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)
  10502. : reconcileChildFibers(
  10503. workInProgress,
  10504. current.child,
  10505. nextChildren,
  10506. renderLanes
  10507. );
  10508. }
  10509. function updateForwardRef(
  10510. current,
  10511. workInProgress,
  10512. Component,
  10513. nextProps,
  10514. renderLanes
  10515. ) {
  10516. Component = Component.render;
  10517. var ref = workInProgress.ref;
  10518. if ("ref" in nextProps) {
  10519. var propsWithoutRef = {};
  10520. for (var key in nextProps)
  10521. "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
  10522. } else propsWithoutRef = nextProps;
  10523. prepareToReadContext(workInProgress);
  10524. nextProps = renderWithHooks(
  10525. current,
  10526. workInProgress,
  10527. Component,
  10528. propsWithoutRef,
  10529. ref,
  10530. renderLanes
  10531. );
  10532. key = checkDidRenderIdHook();
  10533. if (null !== current && !didReceiveUpdate)
  10534. return (
  10535. bailoutHooks(current, workInProgress, renderLanes),
  10536. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  10537. );
  10538. isHydrating && key && pushMaterializedTreeId(workInProgress);
  10539. workInProgress.flags |= 1;
  10540. reconcileChildren(current, workInProgress, nextProps, renderLanes);
  10541. return workInProgress.child;
  10542. }
  10543. function updateMemoComponent(
  10544. current,
  10545. workInProgress,
  10546. Component,
  10547. nextProps,
  10548. renderLanes
  10549. ) {
  10550. if (null === current) {
  10551. var type = Component.type;
  10552. if (
  10553. "function" === typeof type &&
  10554. !shouldConstruct(type) &&
  10555. void 0 === type.defaultProps &&
  10556. null === Component.compare
  10557. )
  10558. return (
  10559. (Component = resolveFunctionForHotReloading(type)),
  10560. (workInProgress.tag = 15),
  10561. (workInProgress.type = Component),
  10562. validateFunctionComponentInDev(workInProgress, type),
  10563. updateSimpleMemoComponent(
  10564. current,
  10565. workInProgress,
  10566. Component,
  10567. nextProps,
  10568. renderLanes
  10569. )
  10570. );
  10571. current = createFiberFromTypeAndProps(
  10572. Component.type,
  10573. null,
  10574. nextProps,
  10575. workInProgress,
  10576. workInProgress.mode,
  10577. renderLanes
  10578. );
  10579. current.ref = workInProgress.ref;
  10580. current.return = workInProgress;
  10581. return (workInProgress.child = current);
  10582. }
  10583. type = current.child;
  10584. if (!checkScheduledUpdateOrContext(current, renderLanes)) {
  10585. var prevProps = type.memoizedProps;
  10586. Component = Component.compare;
  10587. Component = null !== Component ? Component : shallowEqual;
  10588. if (
  10589. Component(prevProps, nextProps) &&
  10590. current.ref === workInProgress.ref
  10591. )
  10592. return bailoutOnAlreadyFinishedWork(
  10593. current,
  10594. workInProgress,
  10595. renderLanes
  10596. );
  10597. }
  10598. workInProgress.flags |= 1;
  10599. current = createWorkInProgress(type, nextProps);
  10600. current.ref = workInProgress.ref;
  10601. current.return = workInProgress;
  10602. return (workInProgress.child = current);
  10603. }
  10604. function updateSimpleMemoComponent(
  10605. current,
  10606. workInProgress,
  10607. Component,
  10608. nextProps,
  10609. renderLanes
  10610. ) {
  10611. if (null !== current) {
  10612. var prevProps = current.memoizedProps;
  10613. if (
  10614. shallowEqual(prevProps, nextProps) &&
  10615. current.ref === workInProgress.ref &&
  10616. workInProgress.type === current.type
  10617. )
  10618. if (
  10619. ((didReceiveUpdate = false),
  10620. (workInProgress.pendingProps = nextProps = prevProps),
  10621. checkScheduledUpdateOrContext(current, renderLanes))
  10622. )
  10623. 0 !== (current.flags & 131072) && (didReceiveUpdate = true);
  10624. else
  10625. return (
  10626. (workInProgress.lanes = current.lanes),
  10627. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  10628. );
  10629. }
  10630. return updateFunctionComponent(
  10631. current,
  10632. workInProgress,
  10633. Component,
  10634. nextProps,
  10635. renderLanes
  10636. );
  10637. }
  10638. function updateOffscreenComponent(
  10639. current,
  10640. workInProgress,
  10641. renderLanes,
  10642. nextProps
  10643. ) {
  10644. var nextChildren = nextProps.children,
  10645. prevState = null !== current ? current.memoizedState : null;
  10646. null === current &&
  10647. null === workInProgress.stateNode &&
  10648. (workInProgress.stateNode = {
  10649. _visibility: OffscreenVisible,
  10650. _pendingMarkers: null,
  10651. _retryCache: null,
  10652. _transitions: null
  10653. });
  10654. if ("hidden" === nextProps.mode) {
  10655. if (0 !== (workInProgress.flags & 128)) {
  10656. prevState =
  10657. null !== prevState
  10658. ? prevState.baseLanes | renderLanes
  10659. : renderLanes;
  10660. if (null !== current) {
  10661. nextProps = workInProgress.child = current.child;
  10662. for (nextChildren = 0; null !== nextProps; )
  10663. (nextChildren =
  10664. nextChildren | nextProps.lanes | nextProps.childLanes),
  10665. (nextProps = nextProps.sibling);
  10666. nextProps = nextChildren & ~prevState;
  10667. } else (nextProps = 0), (workInProgress.child = null);
  10668. return deferHiddenOffscreenComponent(
  10669. current,
  10670. workInProgress,
  10671. prevState,
  10672. renderLanes,
  10673. nextProps
  10674. );
  10675. }
  10676. if (0 !== (renderLanes & 536870912))
  10677. (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),
  10678. null !== current &&
  10679. pushTransition(
  10680. workInProgress,
  10681. null !== prevState ? prevState.cachePool : null
  10682. ),
  10683. null !== prevState
  10684. ? pushHiddenContext(workInProgress, prevState)
  10685. : reuseHiddenContextOnStack(workInProgress),
  10686. pushOffscreenSuspenseHandler(workInProgress);
  10687. else
  10688. return (
  10689. (nextProps = workInProgress.lanes = 536870912),
  10690. deferHiddenOffscreenComponent(
  10691. current,
  10692. workInProgress,
  10693. null !== prevState
  10694. ? prevState.baseLanes | renderLanes
  10695. : renderLanes,
  10696. renderLanes,
  10697. nextProps
  10698. )
  10699. );
  10700. } else
  10701. null !== prevState
  10702. ? (pushTransition(workInProgress, prevState.cachePool),
  10703. pushHiddenContext(workInProgress, prevState),
  10704. reuseSuspenseHandlerOnStack(workInProgress),
  10705. (workInProgress.memoizedState = null))
  10706. : (null !== current && pushTransition(workInProgress, null),
  10707. reuseHiddenContextOnStack(workInProgress),
  10708. reuseSuspenseHandlerOnStack(workInProgress));
  10709. reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  10710. return workInProgress.child;
  10711. }
  10712. function bailoutOffscreenComponent(current, workInProgress) {
  10713. (null !== current && 22 === current.tag) ||
  10714. null !== workInProgress.stateNode ||
  10715. (workInProgress.stateNode = {
  10716. _visibility: OffscreenVisible,
  10717. _pendingMarkers: null,
  10718. _retryCache: null,
  10719. _transitions: null
  10720. });
  10721. return workInProgress.sibling;
  10722. }
  10723. function deferHiddenOffscreenComponent(
  10724. current,
  10725. workInProgress,
  10726. nextBaseLanes,
  10727. renderLanes,
  10728. remainingChildLanes
  10729. ) {
  10730. var JSCompiler_inline_result = peekCacheFromPool();
  10731. JSCompiler_inline_result =
  10732. null === JSCompiler_inline_result
  10733. ? null
  10734. : {
  10735. parent: CacheContext._currentValue,
  10736. pool: JSCompiler_inline_result
  10737. };
  10738. workInProgress.memoizedState = {
  10739. baseLanes: nextBaseLanes,
  10740. cachePool: JSCompiler_inline_result
  10741. };
  10742. null !== current && pushTransition(workInProgress, null);
  10743. reuseHiddenContextOnStack(workInProgress);
  10744. pushOffscreenSuspenseHandler(workInProgress);
  10745. null !== current &&
  10746. propagateParentContextChanges(current, workInProgress, renderLanes, true);
  10747. workInProgress.childLanes = remainingChildLanes;
  10748. return null;
  10749. }
  10750. function mountActivityChildren(workInProgress, nextProps) {
  10751. var hiddenProp = nextProps.hidden;
  10752. void 0 !== hiddenProp &&
  10753. console.error(
  10754. '<Activity> doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- <Activity %s>\n+ <Activity %s>',
  10755. true === hiddenProp
  10756. ? "hidden"
  10757. : false === hiddenProp
  10758. ? "hidden={false}"
  10759. : "hidden={...}",
  10760. hiddenProp ? 'mode="hidden"' : 'mode="visible"'
  10761. );
  10762. nextProps = mountWorkInProgressOffscreenFiber(
  10763. { mode: nextProps.mode, children: nextProps.children },
  10764. workInProgress.mode
  10765. );
  10766. nextProps.ref = workInProgress.ref;
  10767. workInProgress.child = nextProps;
  10768. nextProps.return = workInProgress;
  10769. return nextProps;
  10770. }
  10771. function retryActivityComponentWithoutHydrating(
  10772. current,
  10773. workInProgress,
  10774. renderLanes
  10775. ) {
  10776. reconcileChildFibers(workInProgress, current.child, null, renderLanes);
  10777. current = mountActivityChildren(
  10778. workInProgress,
  10779. workInProgress.pendingProps
  10780. );
  10781. current.flags |= 2;
  10782. popSuspenseHandler(workInProgress);
  10783. workInProgress.memoizedState = null;
  10784. return current;
  10785. }
  10786. function updateActivityComponent(current, workInProgress, renderLanes) {
  10787. var nextProps = workInProgress.pendingProps,
  10788. didSuspend = 0 !== (workInProgress.flags & 128);
  10789. workInProgress.flags &= -129;
  10790. if (null === current) {
  10791. if (isHydrating) {
  10792. if ("hidden" === nextProps.mode)
  10793. return (
  10794. (current = mountActivityChildren(workInProgress, nextProps)),
  10795. (workInProgress.lanes = 536870912),
  10796. bailoutOffscreenComponent(null, current)
  10797. );
  10798. pushDehydratedActivitySuspenseHandler(workInProgress);
  10799. (current = nextHydratableInstance)
  10800. ? ((renderLanes = canHydrateHydrationBoundary(
  10801. current,
  10802. rootOrSingletonContext
  10803. )),
  10804. (renderLanes =
  10805. null !== renderLanes && renderLanes.data === ACTIVITY_START_DATA
  10806. ? renderLanes
  10807. : null),
  10808. null !== renderLanes &&
  10809. ((nextProps = {
  10810. dehydrated: renderLanes,
  10811. treeContext: getSuspendedTreeContext(),
  10812. retryLane: 536870912,
  10813. hydrationErrors: null
  10814. }),
  10815. (workInProgress.memoizedState = nextProps),
  10816. (nextProps = createFiberFromDehydratedFragment(renderLanes)),
  10817. (nextProps.return = workInProgress),
  10818. (workInProgress.child = nextProps),
  10819. (hydrationParentFiber = workInProgress),
  10820. (nextHydratableInstance = null)))
  10821. : (renderLanes = null);
  10822. if (null === renderLanes)
  10823. throw (
  10824. (warnNonHydratedInstance(workInProgress, current),
  10825. throwOnHydrationMismatch(workInProgress))
  10826. );
  10827. workInProgress.lanes = 536870912;
  10828. return null;
  10829. }
  10830. return mountActivityChildren(workInProgress, nextProps);
  10831. }
  10832. var prevState = current.memoizedState;
  10833. if (null !== prevState) {
  10834. var activityInstance = prevState.dehydrated;
  10835. pushDehydratedActivitySuspenseHandler(workInProgress);
  10836. if (didSuspend)
  10837. if (workInProgress.flags & 256)
  10838. (workInProgress.flags &= -257),
  10839. (workInProgress = retryActivityComponentWithoutHydrating(
  10840. current,
  10841. workInProgress,
  10842. renderLanes
  10843. ));
  10844. else if (null !== workInProgress.memoizedState)
  10845. (workInProgress.child = current.child),
  10846. (workInProgress.flags |= 128),
  10847. (workInProgress = null);
  10848. else
  10849. throw Error(
  10850. "Client rendering an Activity suspended it again. This is a bug in React."
  10851. );
  10852. else if (
  10853. (warnIfHydrating(),
  10854. 0 !== (renderLanes & 536870912) &&
  10855. markRenderDerivedCause(workInProgress),
  10856. didReceiveUpdate ||
  10857. propagateParentContextChanges(
  10858. current,
  10859. workInProgress,
  10860. renderLanes,
  10861. false
  10862. ),
  10863. (didSuspend = 0 !== (renderLanes & current.childLanes)),
  10864. didReceiveUpdate || didSuspend)
  10865. ) {
  10866. nextProps = workInProgressRoot;
  10867. if (
  10868. null !== nextProps &&
  10869. ((activityInstance = getBumpedLaneForHydration(
  10870. nextProps,
  10871. renderLanes
  10872. )),
  10873. 0 !== activityInstance && activityInstance !== prevState.retryLane)
  10874. )
  10875. throw (
  10876. ((prevState.retryLane = activityInstance),
  10877. enqueueConcurrentRenderForLane(current, activityInstance),
  10878. scheduleUpdateOnFiber(nextProps, current, activityInstance),
  10879. SelectiveHydrationException)
  10880. );
  10881. renderDidSuspendDelayIfPossible();
  10882. workInProgress = retryActivityComponentWithoutHydrating(
  10883. current,
  10884. workInProgress,
  10885. renderLanes
  10886. );
  10887. } else
  10888. (current = prevState.treeContext),
  10889. (nextHydratableInstance = getNextHydratable(
  10890. activityInstance.nextSibling
  10891. )),
  10892. (hydrationParentFiber = workInProgress),
  10893. (isHydrating = true),
  10894. (hydrationErrors = null),
  10895. (didSuspendOrErrorDEV = false),
  10896. (hydrationDiffRootDEV = null),
  10897. (rootOrSingletonContext = false),
  10898. null !== current &&
  10899. restoreSuspendedTreeContext(workInProgress, current),
  10900. (workInProgress = mountActivityChildren(workInProgress, nextProps)),
  10901. (workInProgress.flags |= 4096);
  10902. return workInProgress;
  10903. }
  10904. prevState = current.child;
  10905. nextProps = { mode: nextProps.mode, children: nextProps.children };
  10906. 0 !== (renderLanes & 536870912) &&
  10907. 0 !== (renderLanes & current.lanes) &&
  10908. markRenderDerivedCause(workInProgress);
  10909. current = createWorkInProgress(prevState, nextProps);
  10910. current.ref = workInProgress.ref;
  10911. workInProgress.child = current;
  10912. current.return = workInProgress;
  10913. return current;
  10914. }
  10915. function markRef(current, workInProgress) {
  10916. var ref = workInProgress.ref;
  10917. if (null === ref)
  10918. null !== current &&
  10919. null !== current.ref &&
  10920. (workInProgress.flags |= 4194816);
  10921. else {
  10922. if ("function" !== typeof ref && "object" !== typeof ref)
  10923. throw Error(
  10924. "Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
  10925. );
  10926. if (null === current || current.ref !== ref)
  10927. workInProgress.flags |= 4194816;
  10928. }
  10929. }
  10930. function updateFunctionComponent(
  10931. current,
  10932. workInProgress,
  10933. Component,
  10934. nextProps,
  10935. renderLanes
  10936. ) {
  10937. if (
  10938. Component.prototype &&
  10939. "function" === typeof Component.prototype.render
  10940. ) {
  10941. var componentName = getComponentNameFromType(Component) || "Unknown";
  10942. didWarnAboutBadClass[componentName] ||
  10943. (console.error(
  10944. "The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",
  10945. componentName,
  10946. componentName
  10947. ),
  10948. (didWarnAboutBadClass[componentName] = true));
  10949. }
  10950. workInProgress.mode & StrictLegacyMode &&
  10951. ReactStrictModeWarnings.recordLegacyContextWarning(
  10952. workInProgress,
  10953. null
  10954. );
  10955. null === current &&
  10956. (validateFunctionComponentInDev(workInProgress, workInProgress.type),
  10957. Component.contextTypes &&
  10958. ((componentName = getComponentNameFromType(Component) || "Unknown"),
  10959. didWarnAboutContextTypes[componentName] ||
  10960. ((didWarnAboutContextTypes[componentName] = true),
  10961. console.error(
  10962. "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
  10963. componentName
  10964. ))));
  10965. prepareToReadContext(workInProgress);
  10966. Component = renderWithHooks(
  10967. current,
  10968. workInProgress,
  10969. Component,
  10970. nextProps,
  10971. void 0,
  10972. renderLanes
  10973. );
  10974. nextProps = checkDidRenderIdHook();
  10975. if (null !== current && !didReceiveUpdate)
  10976. return (
  10977. bailoutHooks(current, workInProgress, renderLanes),
  10978. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  10979. );
  10980. isHydrating && nextProps && pushMaterializedTreeId(workInProgress);
  10981. workInProgress.flags |= 1;
  10982. reconcileChildren(current, workInProgress, Component, renderLanes);
  10983. return workInProgress.child;
  10984. }
  10985. function replayFunctionComponent(
  10986. current,
  10987. workInProgress,
  10988. nextProps,
  10989. Component,
  10990. secondArg,
  10991. renderLanes
  10992. ) {
  10993. prepareToReadContext(workInProgress);
  10994. hookTypesUpdateIndexDev = -1;
  10995. ignorePreviousDependencies =
  10996. null !== current && current.type !== workInProgress.type;
  10997. workInProgress.updateQueue = null;
  10998. nextProps = renderWithHooksAgain(
  10999. workInProgress,
  11000. Component,
  11001. nextProps,
  11002. secondArg
  11003. );
  11004. finishRenderingHooks(current, workInProgress);
  11005. Component = checkDidRenderIdHook();
  11006. if (null !== current && !didReceiveUpdate)
  11007. return (
  11008. bailoutHooks(current, workInProgress, renderLanes),
  11009. bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)
  11010. );
  11011. isHydrating && Component && pushMaterializedTreeId(workInProgress);
  11012. workInProgress.flags |= 1;
  11013. reconcileChildren(current, workInProgress, nextProps, renderLanes);
  11014. return workInProgress.child;
  11015. }
  11016. function updateClassComponent(
  11017. current,
  11018. workInProgress,
  11019. Component,
  11020. nextProps,
  11021. renderLanes
  11022. ) {
  11023. switch (shouldErrorImpl(workInProgress)) {
  11024. case false:
  11025. var _instance = workInProgress.stateNode,
  11026. state = new workInProgress.type(
  11027. workInProgress.memoizedProps,
  11028. _instance.context
  11029. ).state;
  11030. _instance.updater.enqueueSetState(_instance, state, null);
  11031. break;
  11032. case true:
  11033. workInProgress.flags |= 128;
  11034. workInProgress.flags |= 65536;
  11035. _instance = Error("Simulated error coming from DevTools");
  11036. var lane = renderLanes & -renderLanes;
  11037. workInProgress.lanes |= lane;
  11038. state = workInProgressRoot;
  11039. if (null === state)
  11040. throw Error(
  11041. "Expected a work-in-progress root. This is a bug in React. Please file an issue."
  11042. );
  11043. lane = createClassErrorUpdate(lane);
  11044. initializeClassErrorUpdate(
  11045. lane,
  11046. state,
  11047. workInProgress,
  11048. createCapturedValueAtFiber(_instance, workInProgress)
  11049. );
  11050. enqueueCapturedUpdate(workInProgress, lane);
  11051. }
  11052. prepareToReadContext(workInProgress);
  11053. if (null === workInProgress.stateNode) {
  11054. state = emptyContextObject;
  11055. _instance = Component.contextType;
  11056. "contextType" in Component &&
  11057. null !== _instance &&
  11058. (void 0 === _instance || _instance.$$typeof !== REACT_CONTEXT_TYPE) &&
  11059. !didWarnAboutInvalidateContextType.has(Component) &&
  11060. (didWarnAboutInvalidateContextType.add(Component),
  11061. (lane =
  11062. void 0 === _instance
  11063. ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file."
  11064. : "object" !== typeof _instance
  11065. ? " However, it is set to a " + typeof _instance + "."
  11066. : _instance.$$typeof === REACT_CONSUMER_TYPE
  11067. ? " Did you accidentally pass the Context.Consumer instead?"
  11068. : " However, it is set to an object with keys {" +
  11069. Object.keys(_instance).join(", ") +
  11070. "}."),
  11071. console.error(
  11072. "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
  11073. getComponentNameFromType(Component) || "Component",
  11074. lane
  11075. ));
  11076. "object" === typeof _instance &&
  11077. null !== _instance &&
  11078. (state = readContext(_instance));
  11079. _instance = new Component(nextProps, state);
  11080. if (workInProgress.mode & StrictLegacyMode) {
  11081. setIsStrictModeForDevtools(true);
  11082. try {
  11083. _instance = new Component(nextProps, state);
  11084. } finally {
  11085. setIsStrictModeForDevtools(false);
  11086. }
  11087. }
  11088. state = workInProgress.memoizedState =
  11089. null !== _instance.state && void 0 !== _instance.state
  11090. ? _instance.state
  11091. : null;
  11092. _instance.updater = classComponentUpdater;
  11093. workInProgress.stateNode = _instance;
  11094. _instance._reactInternals = workInProgress;
  11095. _instance._reactInternalInstance = fakeInternalInstance;
  11096. "function" === typeof Component.getDerivedStateFromProps &&
  11097. null === state &&
  11098. ((state = getComponentNameFromType(Component) || "Component"),
  11099. didWarnAboutUninitializedState.has(state) ||
  11100. (didWarnAboutUninitializedState.add(state),
  11101. console.error(
  11102. "`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",
  11103. state,
  11104. null === _instance.state ? "null" : "undefined",
  11105. state
  11106. )));
  11107. if (
  11108. "function" === typeof Component.getDerivedStateFromProps ||
  11109. "function" === typeof _instance.getSnapshotBeforeUpdate
  11110. ) {
  11111. var foundWillUpdateName = (lane = state = null);
  11112. "function" === typeof _instance.componentWillMount &&
  11113. true !== _instance.componentWillMount.__suppressDeprecationWarning
  11114. ? (state = "componentWillMount")
  11115. : "function" === typeof _instance.UNSAFE_componentWillMount &&
  11116. (state = "UNSAFE_componentWillMount");
  11117. "function" === typeof _instance.componentWillReceiveProps &&
  11118. true !==
  11119. _instance.componentWillReceiveProps.__suppressDeprecationWarning
  11120. ? (lane = "componentWillReceiveProps")
  11121. : "function" ===
  11122. typeof _instance.UNSAFE_componentWillReceiveProps &&
  11123. (lane = "UNSAFE_componentWillReceiveProps");
  11124. "function" === typeof _instance.componentWillUpdate &&
  11125. true !== _instance.componentWillUpdate.__suppressDeprecationWarning
  11126. ? (foundWillUpdateName = "componentWillUpdate")
  11127. : "function" === typeof _instance.UNSAFE_componentWillUpdate &&
  11128. (foundWillUpdateName = "UNSAFE_componentWillUpdate");
  11129. if (null !== state || null !== lane || null !== foundWillUpdateName) {
  11130. _instance = getComponentNameFromType(Component) || "Component";
  11131. var newApiName =
  11132. "function" === typeof Component.getDerivedStateFromProps
  11133. ? "getDerivedStateFromProps()"
  11134. : "getSnapshotBeforeUpdate()";
  11135. didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) ||
  11136. (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance),
  11137. console.error(
  11138. "Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://react.dev/link/unsafe-component-lifecycles",
  11139. _instance,
  11140. newApiName,
  11141. null !== state ? "\n " + state : "",
  11142. null !== lane ? "\n " + lane : "",
  11143. null !== foundWillUpdateName ? "\n " + foundWillUpdateName : ""
  11144. ));
  11145. }
  11146. }
  11147. _instance = workInProgress.stateNode;
  11148. state = getComponentNameFromType(Component) || "Component";
  11149. _instance.render ||
  11150. (Component.prototype &&
  11151. "function" === typeof Component.prototype.render
  11152. ? console.error(
  11153. "No `render` method found on the %s instance: did you accidentally return an object from the constructor?",
  11154. state
  11155. )
  11156. : console.error(
  11157. "No `render` method found on the %s instance: you may have forgotten to define `render`.",
  11158. state
  11159. ));
  11160. !_instance.getInitialState ||
  11161. _instance.getInitialState.isReactClassApproved ||
  11162. _instance.state ||
  11163. console.error(
  11164. "getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",
  11165. state
  11166. );
  11167. _instance.getDefaultProps &&
  11168. !_instance.getDefaultProps.isReactClassApproved &&
  11169. console.error(
  11170. "getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
  11171. state
  11172. );
  11173. _instance.contextType &&
  11174. console.error(
  11175. "contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
  11176. state
  11177. );
  11178. Component.childContextTypes &&
  11179. !didWarnAboutChildContextTypes.has(Component) &&
  11180. (didWarnAboutChildContextTypes.add(Component),
  11181. console.error(
  11182. "%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",
  11183. state
  11184. ));
  11185. Component.contextTypes &&
  11186. !didWarnAboutContextTypes$1.has(Component) &&
  11187. (didWarnAboutContextTypes$1.add(Component),
  11188. console.error(
  11189. "%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",
  11190. state
  11191. ));
  11192. "function" === typeof _instance.componentShouldUpdate &&
  11193. console.error(
  11194. "%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",
  11195. state
  11196. );
  11197. Component.prototype &&
  11198. Component.prototype.isPureReactComponent &&
  11199. "undefined" !== typeof _instance.shouldComponentUpdate &&
  11200. console.error(
  11201. "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",
  11202. getComponentNameFromType(Component) || "A pure component"
  11203. );
  11204. "function" === typeof _instance.componentDidUnmount &&
  11205. console.error(
  11206. "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",
  11207. state
  11208. );
  11209. "function" === typeof _instance.componentDidReceiveProps &&
  11210. console.error(
  11211. "%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",
  11212. state
  11213. );
  11214. "function" === typeof _instance.componentWillRecieveProps &&
  11215. console.error(
  11216. "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",
  11217. state
  11218. );
  11219. "function" === typeof _instance.UNSAFE_componentWillRecieveProps &&
  11220. console.error(
  11221. "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
  11222. state
  11223. );
  11224. lane = _instance.props !== nextProps;
  11225. void 0 !== _instance.props &&
  11226. lane &&
  11227. console.error(
  11228. "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
  11229. state
  11230. );
  11231. _instance.defaultProps &&
  11232. console.error(
  11233. "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
  11234. state,
  11235. state
  11236. );
  11237. "function" !== typeof _instance.getSnapshotBeforeUpdate ||
  11238. "function" === typeof _instance.componentDidUpdate ||
  11239. didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) ||
  11240. (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component),
  11241. console.error(
  11242. "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
  11243. getComponentNameFromType(Component)
  11244. ));
  11245. "function" === typeof _instance.getDerivedStateFromProps &&
  11246. console.error(
  11247. "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
  11248. state
  11249. );
  11250. "function" === typeof _instance.getDerivedStateFromError &&
  11251. console.error(
  11252. "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
  11253. state
  11254. );
  11255. "function" === typeof Component.getSnapshotBeforeUpdate &&
  11256. console.error(
  11257. "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
  11258. state
  11259. );
  11260. (lane = _instance.state) &&
  11261. ("object" !== typeof lane || isArrayImpl(lane)) &&
  11262. console.error("%s.state: must be set to an object or null", state);
  11263. "function" === typeof _instance.getChildContext &&
  11264. "object" !== typeof Component.childContextTypes &&
  11265. console.error(
  11266. "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
  11267. state
  11268. );
  11269. _instance = workInProgress.stateNode;
  11270. _instance.props = nextProps;
  11271. _instance.state = workInProgress.memoizedState;
  11272. _instance.refs = {};
  11273. initializeUpdateQueue(workInProgress);
  11274. state = Component.contextType;
  11275. _instance.context =
  11276. "object" === typeof state && null !== state
  11277. ? readContext(state)
  11278. : emptyContextObject;
  11279. _instance.state === nextProps &&
  11280. ((state = getComponentNameFromType(Component) || "Component"),
  11281. didWarnAboutDirectlyAssigningPropsToState.has(state) ||
  11282. (didWarnAboutDirectlyAssigningPropsToState.add(state),
  11283. console.error(
  11284. "%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",
  11285. state
  11286. )));
  11287. workInProgress.mode & StrictLegacyMode &&
  11288. ReactStrictModeWarnings.recordLegacyContextWarning(
  11289. workInProgress,
  11290. _instance
  11291. );
  11292. ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(
  11293. workInProgress,
  11294. _instance
  11295. );
  11296. _instance.state = workInProgress.memoizedState;
  11297. state = Component.getDerivedStateFromProps;
  11298. "function" === typeof state &&
  11299. (applyDerivedStateFromProps(
  11300. workInProgress,
  11301. Component,
  11302. state,
  11303. nextProps
  11304. ),
  11305. (_instance.state = workInProgress.memoizedState));
  11306. "function" === typeof Component.getDerivedStateFromProps ||
  11307. "function" === typeof _instance.getSnapshotBeforeUpdate ||
  11308. ("function" !== typeof _instance.UNSAFE_componentWillMount &&
  11309. "function" !== typeof _instance.componentWillMount) ||
  11310. ((state = _instance.state),
  11311. "function" === typeof _instance.componentWillMount &&
  11312. _instance.componentWillMount(),
  11313. "function" === typeof _instance.UNSAFE_componentWillMount &&
  11314. _instance.UNSAFE_componentWillMount(),
  11315. state !== _instance.state &&
  11316. (console.error(
  11317. "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
  11318. getComponentNameFromFiber(workInProgress) || "Component"
  11319. ),
  11320. classComponentUpdater.enqueueReplaceState(
  11321. _instance,
  11322. _instance.state,
  11323. null
  11324. )),
  11325. processUpdateQueue(workInProgress, nextProps, _instance, renderLanes),
  11326. suspendIfUpdateReadFromEntangledAsyncAction(),
  11327. (_instance.state = workInProgress.memoizedState));
  11328. "function" === typeof _instance.componentDidMount &&
  11329. (workInProgress.flags |= 4194308);
  11330. (workInProgress.mode & StrictEffectsMode) !== NoMode &&
  11331. (workInProgress.flags |= 134217728);
  11332. _instance = true;
  11333. } else if (null === current) {
  11334. _instance = workInProgress.stateNode;
  11335. var unresolvedOldProps = workInProgress.memoizedProps;
  11336. lane = resolveClassComponentProps(Component, unresolvedOldProps);
  11337. _instance.props = lane;
  11338. var oldContext = _instance.context;
  11339. foundWillUpdateName = Component.contextType;
  11340. state = emptyContextObject;
  11341. "object" === typeof foundWillUpdateName &&
  11342. null !== foundWillUpdateName &&
  11343. (state = readContext(foundWillUpdateName));
  11344. newApiName = Component.getDerivedStateFromProps;
  11345. foundWillUpdateName =
  11346. "function" === typeof newApiName ||
  11347. "function" === typeof _instance.getSnapshotBeforeUpdate;
  11348. unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps;
  11349. foundWillUpdateName ||
  11350. ("function" !== typeof _instance.UNSAFE_componentWillReceiveProps &&
  11351. "function" !== typeof _instance.componentWillReceiveProps) ||
  11352. ((unresolvedOldProps || oldContext !== state) &&
  11353. callComponentWillReceiveProps(
  11354. workInProgress,
  11355. _instance,
  11356. nextProps,
  11357. state
  11358. ));
  11359. hasForceUpdate = false;
  11360. var oldState = workInProgress.memoizedState;
  11361. _instance.state = oldState;
  11362. processUpdateQueue(workInProgress, nextProps, _instance, renderLanes);
  11363. suspendIfUpdateReadFromEntangledAsyncAction();
  11364. oldContext = workInProgress.memoizedState;
  11365. unresolvedOldProps || oldState !== oldContext || hasForceUpdate
  11366. ? ("function" === typeof newApiName &&
  11367. (applyDerivedStateFromProps(
  11368. workInProgress,
  11369. Component,
  11370. newApiName,
  11371. nextProps
  11372. ),
  11373. (oldContext = workInProgress.memoizedState)),
  11374. (lane =
  11375. hasForceUpdate ||
  11376. checkShouldComponentUpdate(
  11377. workInProgress,
  11378. Component,
  11379. lane,
  11380. nextProps,
  11381. oldState,
  11382. oldContext,
  11383. state
  11384. ))
  11385. ? (foundWillUpdateName ||
  11386. ("function" !== typeof _instance.UNSAFE_componentWillMount &&
  11387. "function" !== typeof _instance.componentWillMount) ||
  11388. ("function" === typeof _instance.componentWillMount &&
  11389. _instance.componentWillMount(),
  11390. "function" === typeof _instance.UNSAFE_componentWillMount &&
  11391. _instance.UNSAFE_componentWillMount()),
  11392. "function" === typeof _instance.componentDidMount &&
  11393. (workInProgress.flags |= 4194308),
  11394. (workInProgress.mode & StrictEffectsMode) !== NoMode &&
  11395. (workInProgress.flags |= 134217728))
  11396. : ("function" === typeof _instance.componentDidMount &&
  11397. (workInProgress.flags |= 4194308),
  11398. (workInProgress.mode & StrictEffectsMode) !== NoMode &&
  11399. (workInProgress.flags |= 134217728),
  11400. (workInProgress.memoizedProps = nextProps),
  11401. (workInProgress.memoizedState = oldContext)),
  11402. (_instance.props = nextProps),
  11403. (_instance.state = oldContext),
  11404. (_instance.context = state),
  11405. (_instance = lane))
  11406. : ("function" === typeof _instance.componentDidMount &&
  11407. (workInProgress.flags |= 4194308),
  11408. (workInProgress.mode & StrictEffectsMode) !== NoMode &&
  11409. (workInProgress.flags |= 134217728),
  11410. (_instance = false));
  11411. } else {
  11412. _instance = workInProgress.stateNode;
  11413. cloneUpdateQueue(current, workInProgress);
  11414. state = workInProgress.memoizedProps;
  11415. foundWillUpdateName = resolveClassComponentProps(Component, state);
  11416. _instance.props = foundWillUpdateName;
  11417. newApiName = workInProgress.pendingProps;
  11418. oldState = _instance.context;
  11419. oldContext = Component.contextType;
  11420. lane = emptyContextObject;
  11421. "object" === typeof oldContext &&
  11422. null !== oldContext &&
  11423. (lane = readContext(oldContext));
  11424. unresolvedOldProps = Component.getDerivedStateFromProps;
  11425. (oldContext =
  11426. "function" === typeof unresolvedOldProps ||
  11427. "function" === typeof _instance.getSnapshotBeforeUpdate) ||
  11428. ("function" !== typeof _instance.UNSAFE_componentWillReceiveProps &&
  11429. "function" !== typeof _instance.componentWillReceiveProps) ||
  11430. ((state !== newApiName || oldState !== lane) &&
  11431. callComponentWillReceiveProps(
  11432. workInProgress,
  11433. _instance,
  11434. nextProps,
  11435. lane
  11436. ));
  11437. hasForceUpdate = false;
  11438. oldState = workInProgress.memoizedState;
  11439. _instance.state = oldState;
  11440. processUpdateQueue(workInProgress, nextProps, _instance, renderLanes);
  11441. suspendIfUpdateReadFromEntangledAsyncAction();
  11442. var newState = workInProgress.memoizedState;
  11443. state !== newApiName ||
  11444. oldState !== newState ||
  11445. hasForceUpdate ||
  11446. (null !== current &&
  11447. null !== current.dependencies &&
  11448. checkIfContextChanged(current.dependencies))
  11449. ? ("function" === typeof unresolvedOldProps &&
  11450. (applyDerivedStateFromProps(
  11451. workInProgress,
  11452. Component,
  11453. unresolvedOldProps,
  11454. nextProps
  11455. ),
  11456. (newState = workInProgress.memoizedState)),
  11457. (foundWillUpdateName =
  11458. hasForceUpdate ||
  11459. checkShouldComponentUpdate(
  11460. workInProgress,
  11461. Component,
  11462. foundWillUpdateName,
  11463. nextProps,
  11464. oldState,
  11465. newState,
  11466. lane
  11467. ) ||
  11468. (null !== current &&
  11469. null !== current.dependencies &&
  11470. checkIfContextChanged(current.dependencies)))
  11471. ? (oldContext ||
  11472. ("function" !== typeof _instance.UNSAFE_componentWillUpdate &&
  11473. "function" !== typeof _instance.componentWillUpdate) ||
  11474. ("function" === typeof _instance.componentWillUpdate &&
  11475. _instance.componentWillUpdate(nextProps, newState, lane),
  11476. "function" === typeof _instance.UNSAFE_componentWillUpdate &&
  11477. _instance.UNSAFE_componentWillUpdate(
  11478. nextProps,
  11479. newState,
  11480. lane
  11481. )),
  11482. "function" === typeof _instance.componentDidUpdate &&
  11483. (workInProgress.flags |= 4),
  11484. "function" === typeof _instance.getSnapshotBeforeUpdate &&
  11485. (workInProgress.flags |= 1024))
  11486. : ("function" !== typeof _instance.componentDidUpdate ||
  11487. (state === current.memoizedProps &&
  11488. oldState === current.memoizedState) ||
  11489. (workInProgress.flags |= 4),
  11490. "function" !== typeof _instance.getSnapshotBeforeUpdate ||
  11491. (state === current.memoizedProps &&
  11492. oldState === current.memoizedState) ||
  11493. (workInProgress.flags |= 1024),
  11494. (workInProgress.memoizedProps = nextProps),
  11495. (workInProgress.memoizedState = newState)),
  11496. (_instance.props = nextProps),
  11497. (_instance.state = newState),
  11498. (_instance.context = lane),
  11499. (_instance = foundWillUpdateName))
  11500. : ("function" !== typeof _instance.componentDidUpdate ||
  11501. (state === current.memoizedProps &&
  11502. oldState === current.memoizedState) ||
  11503. (workInProgress.flags |= 4),
  11504. "function" !== typeof _instance.getSnapshotBeforeUpdate ||
  11505. (state === current.memoizedProps &&
  11506. oldState === current.memoizedState) ||
  11507. (workInProgress.flags |= 1024),
  11508. (_instance = false));
  11509. }
  11510. lane = _instance;
  11511. markRef(current, workInProgress);
  11512. state = 0 !== (workInProgress.flags & 128);
  11513. if (lane || state) {
  11514. lane = workInProgress.stateNode;
  11515. setCurrentFiber(workInProgress);
  11516. if (state && "function" !== typeof Component.getDerivedStateFromError)
  11517. (Component = null), (profilerStartTime = -1);
  11518. else if (
  11519. ((Component = callRenderInDEV(lane)),
  11520. workInProgress.mode & StrictLegacyMode)
  11521. ) {
  11522. setIsStrictModeForDevtools(true);
  11523. try {
  11524. callRenderInDEV(lane);
  11525. } finally {
  11526. setIsStrictModeForDevtools(false);
  11527. }
  11528. }
  11529. workInProgress.flags |= 1;
  11530. null !== current && state
  11531. ? ((workInProgress.child = reconcileChildFibers(
  11532. workInProgress,
  11533. current.child,
  11534. null,
  11535. renderLanes
  11536. )),
  11537. (workInProgress.child = reconcileChildFibers(
  11538. workInProgress,
  11539. null,
  11540. Component,
  11541. renderLanes
  11542. )))
  11543. : reconcileChildren(current, workInProgress, Component, renderLanes);
  11544. workInProgress.memoizedState = lane.state;
  11545. current = workInProgress.child;
  11546. } else
  11547. current = bailoutOnAlreadyFinishedWork(
  11548. current,
  11549. workInProgress,
  11550. renderLanes
  11551. );
  11552. renderLanes = workInProgress.stateNode;
  11553. _instance &&
  11554. renderLanes.props !== nextProps &&
  11555. (didWarnAboutReassigningProps ||
  11556. console.error(
  11557. "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",
  11558. getComponentNameFromFiber(workInProgress) || "a component"
  11559. ),
  11560. (didWarnAboutReassigningProps = true));
  11561. return current;
  11562. }
  11563. function mountHostRootWithoutHydrating(
  11564. current,
  11565. workInProgress,
  11566. nextChildren,
  11567. renderLanes
  11568. ) {
  11569. resetHydrationState();
  11570. workInProgress.flags |= 256;
  11571. reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  11572. return workInProgress.child;
  11573. }
  11574. function validateFunctionComponentInDev(workInProgress, Component) {
  11575. Component &&
  11576. Component.childContextTypes &&
  11577. console.error(
  11578. "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
  11579. Component.displayName || Component.name || "Component"
  11580. );
  11581. "function" === typeof Component.getDerivedStateFromProps &&
  11582. ((workInProgress = getComponentNameFromType(Component) || "Unknown"),
  11583. didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] ||
  11584. (console.error(
  11585. "%s: Function components do not support getDerivedStateFromProps.",
  11586. workInProgress
  11587. ),
  11588. (didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress] =
  11589. true)));
  11590. "object" === typeof Component.contextType &&
  11591. null !== Component.contextType &&
  11592. ((Component = getComponentNameFromType(Component) || "Unknown"),
  11593. didWarnAboutContextTypeOnFunctionComponent[Component] ||
  11594. (console.error(
  11595. "%s: Function components do not support contextType.",
  11596. Component
  11597. ),
  11598. (didWarnAboutContextTypeOnFunctionComponent[Component] = true)));
  11599. }
  11600. function mountSuspenseOffscreenState(renderLanes) {
  11601. return { baseLanes: renderLanes, cachePool: getSuspendedCache() };
  11602. }
  11603. function getRemainingWorkInPrimaryTree(
  11604. current,
  11605. primaryTreeDidDefer,
  11606. renderLanes
  11607. ) {
  11608. current = null !== current ? current.childLanes & ~renderLanes : 0;
  11609. primaryTreeDidDefer && (current |= workInProgressDeferredLane);
  11610. return current;
  11611. }
  11612. function updateSuspenseComponent(current, workInProgress, renderLanes) {
  11613. var JSCompiler_object_inline_digest_2724;
  11614. var JSCompiler_object_inline_stack_2725 = workInProgress.pendingProps;
  11615. shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128);
  11616. var JSCompiler_object_inline_message_2723 = false;
  11617. var didSuspend = 0 !== (workInProgress.flags & 128);
  11618. (JSCompiler_object_inline_digest_2724 = didSuspend) ||
  11619. (JSCompiler_object_inline_digest_2724 =
  11620. null !== current && null === current.memoizedState
  11621. ? false
  11622. : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
  11623. JSCompiler_object_inline_digest_2724 &&
  11624. ((JSCompiler_object_inline_message_2723 = true),
  11625. (workInProgress.flags &= -129));
  11626. JSCompiler_object_inline_digest_2724 = 0 !== (workInProgress.flags & 32);
  11627. workInProgress.flags &= -33;
  11628. if (null === current) {
  11629. if (isHydrating) {
  11630. JSCompiler_object_inline_message_2723
  11631. ? pushPrimaryTreeSuspenseHandler(workInProgress)
  11632. : reuseSuspenseHandlerOnStack(workInProgress);
  11633. (current = nextHydratableInstance)
  11634. ? ((renderLanes = canHydrateHydrationBoundary(
  11635. current,
  11636. rootOrSingletonContext
  11637. )),
  11638. (renderLanes =
  11639. null !== renderLanes && renderLanes.data !== ACTIVITY_START_DATA
  11640. ? renderLanes
  11641. : null),
  11642. null !== renderLanes &&
  11643. ((JSCompiler_object_inline_digest_2724 = {
  11644. dehydrated: renderLanes,
  11645. treeContext: getSuspendedTreeContext(),
  11646. retryLane: 536870912,
  11647. hydrationErrors: null
  11648. }),
  11649. (workInProgress.memoizedState =
  11650. JSCompiler_object_inline_digest_2724),
  11651. (JSCompiler_object_inline_digest_2724 =
  11652. createFiberFromDehydratedFragment(renderLanes)),
  11653. (JSCompiler_object_inline_digest_2724.return = workInProgress),
  11654. (workInProgress.child = JSCompiler_object_inline_digest_2724),
  11655. (hydrationParentFiber = workInProgress),
  11656. (nextHydratableInstance = null)))
  11657. : (renderLanes = null);
  11658. if (null === renderLanes)
  11659. throw (
  11660. (warnNonHydratedInstance(workInProgress, current),
  11661. throwOnHydrationMismatch(workInProgress))
  11662. );
  11663. isSuspenseInstanceFallback(renderLanes)
  11664. ? (workInProgress.lanes = 32)
  11665. : (workInProgress.lanes = 536870912);
  11666. return null;
  11667. }
  11668. var nextPrimaryChildren = JSCompiler_object_inline_stack_2725.children;
  11669. JSCompiler_object_inline_stack_2725 =
  11670. JSCompiler_object_inline_stack_2725.fallback;
  11671. if (JSCompiler_object_inline_message_2723) {
  11672. reuseSuspenseHandlerOnStack(workInProgress);
  11673. var mode = workInProgress.mode;
  11674. nextPrimaryChildren = mountWorkInProgressOffscreenFiber(
  11675. { mode: "hidden", children: nextPrimaryChildren },
  11676. mode
  11677. );
  11678. JSCompiler_object_inline_stack_2725 = createFiberFromFragment(
  11679. JSCompiler_object_inline_stack_2725,
  11680. mode,
  11681. renderLanes,
  11682. null
  11683. );
  11684. nextPrimaryChildren.return = workInProgress;
  11685. JSCompiler_object_inline_stack_2725.return = workInProgress;
  11686. nextPrimaryChildren.sibling = JSCompiler_object_inline_stack_2725;
  11687. workInProgress.child = nextPrimaryChildren;
  11688. JSCompiler_object_inline_stack_2725 = workInProgress.child;
  11689. JSCompiler_object_inline_stack_2725.memoizedState =
  11690. mountSuspenseOffscreenState(renderLanes);
  11691. JSCompiler_object_inline_stack_2725.childLanes =
  11692. getRemainingWorkInPrimaryTree(
  11693. current,
  11694. JSCompiler_object_inline_digest_2724,
  11695. renderLanes
  11696. );
  11697. workInProgress.memoizedState = SUSPENDED_MARKER;
  11698. return bailoutOffscreenComponent(
  11699. null,
  11700. JSCompiler_object_inline_stack_2725
  11701. );
  11702. }
  11703. pushPrimaryTreeSuspenseHandler(workInProgress);
  11704. return mountSuspensePrimaryChildren(
  11705. workInProgress,
  11706. nextPrimaryChildren
  11707. );
  11708. }
  11709. var prevState = current.memoizedState;
  11710. if (null !== prevState) {
  11711. var JSCompiler_object_inline_componentStack_2726 = prevState.dehydrated;
  11712. if (null !== JSCompiler_object_inline_componentStack_2726) {
  11713. if (didSuspend)
  11714. workInProgress.flags & 256
  11715. ? (pushPrimaryTreeSuspenseHandler(workInProgress),
  11716. (workInProgress.flags &= -257),
  11717. (workInProgress = retrySuspenseComponentWithoutHydrating(
  11718. current,
  11719. workInProgress,
  11720. renderLanes
  11721. )))
  11722. : null !== workInProgress.memoizedState
  11723. ? (reuseSuspenseHandlerOnStack(workInProgress),
  11724. (workInProgress.child = current.child),
  11725. (workInProgress.flags |= 128),
  11726. (workInProgress = null))
  11727. : (reuseSuspenseHandlerOnStack(workInProgress),
  11728. (nextPrimaryChildren =
  11729. JSCompiler_object_inline_stack_2725.fallback),
  11730. (mode = workInProgress.mode),
  11731. (JSCompiler_object_inline_stack_2725 =
  11732. mountWorkInProgressOffscreenFiber(
  11733. {
  11734. mode: "visible",
  11735. children: JSCompiler_object_inline_stack_2725.children
  11736. },
  11737. mode
  11738. )),
  11739. (nextPrimaryChildren = createFiberFromFragment(
  11740. nextPrimaryChildren,
  11741. mode,
  11742. renderLanes,
  11743. null
  11744. )),
  11745. (nextPrimaryChildren.flags |= 2),
  11746. (JSCompiler_object_inline_stack_2725.return = workInProgress),
  11747. (nextPrimaryChildren.return = workInProgress),
  11748. (JSCompiler_object_inline_stack_2725.sibling =
  11749. nextPrimaryChildren),
  11750. (workInProgress.child = JSCompiler_object_inline_stack_2725),
  11751. reconcileChildFibers(
  11752. workInProgress,
  11753. current.child,
  11754. null,
  11755. renderLanes
  11756. ),
  11757. (JSCompiler_object_inline_stack_2725 = workInProgress.child),
  11758. (JSCompiler_object_inline_stack_2725.memoizedState =
  11759. mountSuspenseOffscreenState(renderLanes)),
  11760. (JSCompiler_object_inline_stack_2725.childLanes =
  11761. getRemainingWorkInPrimaryTree(
  11762. current,
  11763. JSCompiler_object_inline_digest_2724,
  11764. renderLanes
  11765. )),
  11766. (workInProgress.memoizedState = SUSPENDED_MARKER),
  11767. (workInProgress = bailoutOffscreenComponent(
  11768. null,
  11769. JSCompiler_object_inline_stack_2725
  11770. )));
  11771. else if (
  11772. (pushPrimaryTreeSuspenseHandler(workInProgress),
  11773. warnIfHydrating(),
  11774. 0 !== (renderLanes & 536870912) &&
  11775. markRenderDerivedCause(workInProgress),
  11776. isSuspenseInstanceFallback(
  11777. JSCompiler_object_inline_componentStack_2726
  11778. ))
  11779. ) {
  11780. JSCompiler_object_inline_digest_2724 =
  11781. JSCompiler_object_inline_componentStack_2726.nextSibling &&
  11782. JSCompiler_object_inline_componentStack_2726.nextSibling.dataset;
  11783. if (JSCompiler_object_inline_digest_2724) {
  11784. nextPrimaryChildren = JSCompiler_object_inline_digest_2724.dgst;
  11785. var message = JSCompiler_object_inline_digest_2724.msg;
  11786. mode = JSCompiler_object_inline_digest_2724.stck;
  11787. var componentStack = JSCompiler_object_inline_digest_2724.cstck;
  11788. }
  11789. JSCompiler_object_inline_message_2723 = message;
  11790. JSCompiler_object_inline_digest_2724 = nextPrimaryChildren;
  11791. JSCompiler_object_inline_stack_2725 = mode;
  11792. JSCompiler_object_inline_componentStack_2726 = componentStack;
  11793. nextPrimaryChildren = JSCompiler_object_inline_message_2723;
  11794. mode = JSCompiler_object_inline_componentStack_2726;
  11795. nextPrimaryChildren = nextPrimaryChildren
  11796. ? Error(nextPrimaryChildren)
  11797. : Error(
  11798. "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
  11799. );
  11800. nextPrimaryChildren.stack =
  11801. JSCompiler_object_inline_stack_2725 || "";
  11802. nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2724;
  11803. JSCompiler_object_inline_digest_2724 =
  11804. void 0 === mode ? null : mode;
  11805. JSCompiler_object_inline_stack_2725 = {
  11806. value: nextPrimaryChildren,
  11807. source: null,
  11808. stack: JSCompiler_object_inline_digest_2724
  11809. };
  11810. "string" === typeof JSCompiler_object_inline_digest_2724 &&
  11811. CapturedStacks.set(
  11812. nextPrimaryChildren,
  11813. JSCompiler_object_inline_stack_2725
  11814. );
  11815. queueHydrationError(JSCompiler_object_inline_stack_2725);
  11816. workInProgress = retrySuspenseComponentWithoutHydrating(
  11817. current,
  11818. workInProgress,
  11819. renderLanes
  11820. );
  11821. } else if (
  11822. (didReceiveUpdate ||
  11823. propagateParentContextChanges(
  11824. current,
  11825. workInProgress,
  11826. renderLanes,
  11827. false
  11828. ),
  11829. (JSCompiler_object_inline_digest_2724 =
  11830. 0 !== (renderLanes & current.childLanes)),
  11831. didReceiveUpdate || JSCompiler_object_inline_digest_2724)
  11832. ) {
  11833. JSCompiler_object_inline_digest_2724 = workInProgressRoot;
  11834. if (
  11835. null !== JSCompiler_object_inline_digest_2724 &&
  11836. ((JSCompiler_object_inline_stack_2725 = getBumpedLaneForHydration(
  11837. JSCompiler_object_inline_digest_2724,
  11838. renderLanes
  11839. )),
  11840. 0 !== JSCompiler_object_inline_stack_2725 &&
  11841. JSCompiler_object_inline_stack_2725 !== prevState.retryLane)
  11842. )
  11843. throw (
  11844. ((prevState.retryLane = JSCompiler_object_inline_stack_2725),
  11845. enqueueConcurrentRenderForLane(
  11846. current,
  11847. JSCompiler_object_inline_stack_2725
  11848. ),
  11849. scheduleUpdateOnFiber(
  11850. JSCompiler_object_inline_digest_2724,
  11851. current,
  11852. JSCompiler_object_inline_stack_2725
  11853. ),
  11854. SelectiveHydrationException)
  11855. );
  11856. isSuspenseInstancePending(
  11857. JSCompiler_object_inline_componentStack_2726
  11858. ) || renderDidSuspendDelayIfPossible();
  11859. workInProgress = retrySuspenseComponentWithoutHydrating(
  11860. current,
  11861. workInProgress,
  11862. renderLanes
  11863. );
  11864. } else
  11865. isSuspenseInstancePending(
  11866. JSCompiler_object_inline_componentStack_2726
  11867. )
  11868. ? ((workInProgress.flags |= 192),
  11869. (workInProgress.child = current.child),
  11870. (workInProgress = null))
  11871. : ((current = prevState.treeContext),
  11872. (nextHydratableInstance = getNextHydratable(
  11873. JSCompiler_object_inline_componentStack_2726.nextSibling
  11874. )),
  11875. (hydrationParentFiber = workInProgress),
  11876. (isHydrating = true),
  11877. (hydrationErrors = null),
  11878. (didSuspendOrErrorDEV = false),
  11879. (hydrationDiffRootDEV = null),
  11880. (rootOrSingletonContext = false),
  11881. null !== current &&
  11882. restoreSuspendedTreeContext(workInProgress, current),
  11883. (workInProgress = mountSuspensePrimaryChildren(
  11884. workInProgress,
  11885. JSCompiler_object_inline_stack_2725.children
  11886. )),
  11887. (workInProgress.flags |= 4096));
  11888. return workInProgress;
  11889. }
  11890. }
  11891. if (JSCompiler_object_inline_message_2723)
  11892. return (
  11893. reuseSuspenseHandlerOnStack(workInProgress),
  11894. (nextPrimaryChildren = JSCompiler_object_inline_stack_2725.fallback),
  11895. (mode = workInProgress.mode),
  11896. (componentStack = current.child),
  11897. (JSCompiler_object_inline_componentStack_2726 =
  11898. componentStack.sibling),
  11899. (JSCompiler_object_inline_stack_2725 = createWorkInProgress(
  11900. componentStack,
  11901. {
  11902. mode: "hidden",
  11903. children: JSCompiler_object_inline_stack_2725.children
  11904. }
  11905. )),
  11906. (JSCompiler_object_inline_stack_2725.subtreeFlags =
  11907. componentStack.subtreeFlags & 65011712),
  11908. null !== JSCompiler_object_inline_componentStack_2726
  11909. ? (nextPrimaryChildren = createWorkInProgress(
  11910. JSCompiler_object_inline_componentStack_2726,
  11911. nextPrimaryChildren
  11912. ))
  11913. : ((nextPrimaryChildren = createFiberFromFragment(
  11914. nextPrimaryChildren,
  11915. mode,
  11916. renderLanes,
  11917. null
  11918. )),
  11919. (nextPrimaryChildren.flags |= 2)),
  11920. (nextPrimaryChildren.return = workInProgress),
  11921. (JSCompiler_object_inline_stack_2725.return = workInProgress),
  11922. (JSCompiler_object_inline_stack_2725.sibling = nextPrimaryChildren),
  11923. (workInProgress.child = JSCompiler_object_inline_stack_2725),
  11924. bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_2725),
  11925. (JSCompiler_object_inline_stack_2725 = workInProgress.child),
  11926. (nextPrimaryChildren = current.child.memoizedState),
  11927. null === nextPrimaryChildren
  11928. ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))
  11929. : ((mode = nextPrimaryChildren.cachePool),
  11930. null !== mode
  11931. ? ((componentStack = CacheContext._currentValue),
  11932. (mode =
  11933. mode.parent !== componentStack
  11934. ? { parent: componentStack, pool: componentStack }
  11935. : mode))
  11936. : (mode = getSuspendedCache()),
  11937. (nextPrimaryChildren = {
  11938. baseLanes: nextPrimaryChildren.baseLanes | renderLanes,
  11939. cachePool: mode
  11940. })),
  11941. (JSCompiler_object_inline_stack_2725.memoizedState =
  11942. nextPrimaryChildren),
  11943. (JSCompiler_object_inline_stack_2725.childLanes =
  11944. getRemainingWorkInPrimaryTree(
  11945. current,
  11946. JSCompiler_object_inline_digest_2724,
  11947. renderLanes
  11948. )),
  11949. (workInProgress.memoizedState = SUSPENDED_MARKER),
  11950. bailoutOffscreenComponent(
  11951. current.child,
  11952. JSCompiler_object_inline_stack_2725
  11953. )
  11954. );
  11955. null !== prevState &&
  11956. (renderLanes & 62914560) === renderLanes &&
  11957. 0 !== (renderLanes & current.lanes) &&
  11958. markRenderDerivedCause(workInProgress);
  11959. pushPrimaryTreeSuspenseHandler(workInProgress);
  11960. renderLanes = current.child;
  11961. current = renderLanes.sibling;
  11962. renderLanes = createWorkInProgress(renderLanes, {
  11963. mode: "visible",
  11964. children: JSCompiler_object_inline_stack_2725.children
  11965. });
  11966. renderLanes.return = workInProgress;
  11967. renderLanes.sibling = null;
  11968. null !== current &&
  11969. ((JSCompiler_object_inline_digest_2724 = workInProgress.deletions),
  11970. null === JSCompiler_object_inline_digest_2724
  11971. ? ((workInProgress.deletions = [current]),
  11972. (workInProgress.flags |= 16))
  11973. : JSCompiler_object_inline_digest_2724.push(current));
  11974. workInProgress.child = renderLanes;
  11975. workInProgress.memoizedState = null;
  11976. return renderLanes;
  11977. }
  11978. function mountSuspensePrimaryChildren(workInProgress, primaryChildren) {
  11979. primaryChildren = mountWorkInProgressOffscreenFiber(
  11980. { mode: "visible", children: primaryChildren },
  11981. workInProgress.mode
  11982. );
  11983. primaryChildren.return = workInProgress;
  11984. return (workInProgress.child = primaryChildren);
  11985. }
  11986. function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
  11987. offscreenProps = createFiber(22, offscreenProps, null, mode);
  11988. offscreenProps.lanes = 0;
  11989. return offscreenProps;
  11990. }
  11991. function retrySuspenseComponentWithoutHydrating(
  11992. current,
  11993. workInProgress,
  11994. renderLanes
  11995. ) {
  11996. reconcileChildFibers(workInProgress, current.child, null, renderLanes);
  11997. current = mountSuspensePrimaryChildren(
  11998. workInProgress,
  11999. workInProgress.pendingProps.children
  12000. );
  12001. current.flags |= 2;
  12002. workInProgress.memoizedState = null;
  12003. return current;
  12004. }
  12005. function scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {
  12006. fiber.lanes |= renderLanes;
  12007. var alternate = fiber.alternate;
  12008. null !== alternate && (alternate.lanes |= renderLanes);
  12009. scheduleContextWorkOnParentPath(
  12010. fiber.return,
  12011. renderLanes,
  12012. propagationRoot
  12013. );
  12014. }
  12015. function initSuspenseListRenderState(
  12016. workInProgress,
  12017. isBackwards,
  12018. tail,
  12019. lastContentRow,
  12020. tailMode,
  12021. treeForkCount
  12022. ) {
  12023. var renderState = workInProgress.memoizedState;
  12024. null === renderState
  12025. ? (workInProgress.memoizedState = {
  12026. isBackwards: isBackwards,
  12027. rendering: null,
  12028. renderingStartTime: 0,
  12029. last: lastContentRow,
  12030. tail: tail,
  12031. tailMode: tailMode,
  12032. treeForkCount: treeForkCount
  12033. })
  12034. : ((renderState.isBackwards = isBackwards),
  12035. (renderState.rendering = null),
  12036. (renderState.renderingStartTime = 0),
  12037. (renderState.last = lastContentRow),
  12038. (renderState.tail = tail),
  12039. (renderState.tailMode = tailMode),
  12040. (renderState.treeForkCount = treeForkCount));
  12041. }
  12042. function updateSuspenseListComponent(current, workInProgress, renderLanes) {
  12043. var nextProps = workInProgress.pendingProps,
  12044. revealOrder = nextProps.revealOrder,
  12045. tailMode = nextProps.tail,
  12046. newChildren = nextProps.children,
  12047. suspenseContext = suspenseStackCursor.current;
  12048. (nextProps = 0 !== (suspenseContext & ForceSuspenseFallback))
  12049. ? ((suspenseContext =
  12050. (suspenseContext & SubtreeSuspenseContextMask) |
  12051. ForceSuspenseFallback),
  12052. (workInProgress.flags |= 128))
  12053. : (suspenseContext &= SubtreeSuspenseContextMask);
  12054. push(suspenseStackCursor, suspenseContext, workInProgress);
  12055. suspenseContext = null == revealOrder ? "null" : revealOrder;
  12056. if (
  12057. "forwards" !== revealOrder &&
  12058. "unstable_legacy-backwards" !== revealOrder &&
  12059. "together" !== revealOrder &&
  12060. "independent" !== revealOrder &&
  12061. !didWarnAboutRevealOrder[suspenseContext]
  12062. )
  12063. if (
  12064. ((didWarnAboutRevealOrder[suspenseContext] = true), null == revealOrder)
  12065. )
  12066. console.error(
  12067. 'The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".'
  12068. );
  12069. else if ("backwards" === revealOrder)
  12070. console.error(
  12071. 'The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.'
  12072. );
  12073. else if ("string" === typeof revealOrder)
  12074. switch (revealOrder.toLowerCase()) {
  12075. case "together":
  12076. case "forwards":
  12077. case "backwards":
  12078. case "independent":
  12079. console.error(
  12080. '"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',
  12081. revealOrder,
  12082. revealOrder.toLowerCase()
  12083. );
  12084. break;
  12085. case "forward":
  12086. case "backward":
  12087. console.error(
  12088. '"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',
  12089. revealOrder,
  12090. revealOrder.toLowerCase()
  12091. );
  12092. break;
  12093. default:
  12094. console.error(
  12095. '"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',
  12096. revealOrder
  12097. );
  12098. }
  12099. else
  12100. console.error(
  12101. '%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',
  12102. revealOrder
  12103. );
  12104. suspenseContext = null == tailMode ? "null" : tailMode;
  12105. if (!didWarnAboutTailOptions[suspenseContext])
  12106. if (null == tailMode) {
  12107. if (
  12108. "forwards" === revealOrder ||
  12109. "backwards" === revealOrder ||
  12110. "unstable_legacy-backwards" === revealOrder
  12111. )
  12112. (didWarnAboutTailOptions[suspenseContext] = true),
  12113. console.error(
  12114. 'The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".'
  12115. );
  12116. } else
  12117. "visible" !== tailMode &&
  12118. "collapsed" !== tailMode &&
  12119. "hidden" !== tailMode
  12120. ? ((didWarnAboutTailOptions[suspenseContext] = true),
  12121. console.error(
  12122. '"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',
  12123. tailMode
  12124. ))
  12125. : "forwards" !== revealOrder &&
  12126. "backwards" !== revealOrder &&
  12127. "unstable_legacy-backwards" !== revealOrder &&
  12128. ((didWarnAboutTailOptions[suspenseContext] = true),
  12129. console.error(
  12130. '<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',
  12131. tailMode
  12132. ));
  12133. a: if (
  12134. ("forwards" === revealOrder ||
  12135. "backwards" === revealOrder ||
  12136. "unstable_legacy-backwards" === revealOrder) &&
  12137. void 0 !== newChildren &&
  12138. null !== newChildren &&
  12139. false !== newChildren
  12140. )
  12141. if (isArrayImpl(newChildren))
  12142. for (
  12143. suspenseContext = 0;
  12144. suspenseContext < newChildren.length;
  12145. suspenseContext++
  12146. ) {
  12147. if (
  12148. !validateSuspenseListNestedChild(
  12149. newChildren[suspenseContext],
  12150. suspenseContext
  12151. )
  12152. )
  12153. break a;
  12154. }
  12155. else if (
  12156. ((suspenseContext = getIteratorFn(newChildren)),
  12157. "function" === typeof suspenseContext)
  12158. ) {
  12159. if ((suspenseContext = suspenseContext.call(newChildren)))
  12160. for (
  12161. var step = suspenseContext.next(), _i = 0;
  12162. !step.done;
  12163. step = suspenseContext.next()
  12164. ) {
  12165. if (!validateSuspenseListNestedChild(step.value, _i)) break a;
  12166. _i++;
  12167. }
  12168. } else
  12169. console.error(
  12170. 'A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',
  12171. revealOrder
  12172. );
  12173. reconcileChildren(current, workInProgress, newChildren, renderLanes);
  12174. isHydrating
  12175. ? (warnIfNotHydrating(), (newChildren = treeForkCount))
  12176. : (newChildren = 0);
  12177. if (!nextProps && null !== current && 0 !== (current.flags & 128))
  12178. a: for (current = workInProgress.child; null !== current; ) {
  12179. if (13 === current.tag)
  12180. null !== current.memoizedState &&
  12181. scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
  12182. else if (19 === current.tag)
  12183. scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);
  12184. else if (null !== current.child) {
  12185. current.child.return = current;
  12186. current = current.child;
  12187. continue;
  12188. }
  12189. if (current === workInProgress) break a;
  12190. for (; null === current.sibling; ) {
  12191. if (null === current.return || current.return === workInProgress)
  12192. break a;
  12193. current = current.return;
  12194. }
  12195. current.sibling.return = current.return;
  12196. current = current.sibling;
  12197. }
  12198. switch (revealOrder) {
  12199. case "forwards":
  12200. renderLanes = workInProgress.child;
  12201. for (revealOrder = null; null !== renderLanes; )
  12202. (current = renderLanes.alternate),
  12203. null !== current &&
  12204. null === findFirstSuspended(current) &&
  12205. (revealOrder = renderLanes),
  12206. (renderLanes = renderLanes.sibling);
  12207. renderLanes = revealOrder;
  12208. null === renderLanes
  12209. ? ((revealOrder = workInProgress.child),
  12210. (workInProgress.child = null))
  12211. : ((revealOrder = renderLanes.sibling),
  12212. (renderLanes.sibling = null));
  12213. initSuspenseListRenderState(
  12214. workInProgress,
  12215. false,
  12216. revealOrder,
  12217. renderLanes,
  12218. tailMode,
  12219. newChildren
  12220. );
  12221. break;
  12222. case "backwards":
  12223. case "unstable_legacy-backwards":
  12224. renderLanes = null;
  12225. revealOrder = workInProgress.child;
  12226. for (workInProgress.child = null; null !== revealOrder; ) {
  12227. current = revealOrder.alternate;
  12228. if (null !== current && null === findFirstSuspended(current)) {
  12229. workInProgress.child = revealOrder;
  12230. break;
  12231. }
  12232. current = revealOrder.sibling;
  12233. revealOrder.sibling = renderLanes;
  12234. renderLanes = revealOrder;
  12235. revealOrder = current;
  12236. }
  12237. initSuspenseListRenderState(
  12238. workInProgress,
  12239. true,
  12240. renderLanes,
  12241. null,
  12242. tailMode,
  12243. newChildren
  12244. );
  12245. break;
  12246. case "together":
  12247. initSuspenseListRenderState(
  12248. workInProgress,
  12249. false,
  12250. null,
  12251. null,
  12252. void 0,
  12253. newChildren
  12254. );
  12255. break;
  12256. default:
  12257. workInProgress.memoizedState = null;
  12258. }
  12259. return workInProgress.child;
  12260. }
  12261. function bailoutOnAlreadyFinishedWork(
  12262. current,
  12263. workInProgress,
  12264. renderLanes
  12265. ) {
  12266. null !== current && (workInProgress.dependencies = current.dependencies);
  12267. profilerStartTime = -1;
  12268. workInProgressRootSkippedLanes |= workInProgress.lanes;
  12269. if (0 === (renderLanes & workInProgress.childLanes))
  12270. if (null !== current) {
  12271. if (
  12272. (propagateParentContextChanges(
  12273. current,
  12274. workInProgress,
  12275. renderLanes,
  12276. false
  12277. ),
  12278. 0 === (renderLanes & workInProgress.childLanes))
  12279. )
  12280. return null;
  12281. } else return null;
  12282. if (null !== current && workInProgress.child !== current.child)
  12283. throw Error("Resuming work not yet implemented.");
  12284. if (null !== workInProgress.child) {
  12285. current = workInProgress.child;
  12286. renderLanes = createWorkInProgress(current, current.pendingProps);
  12287. workInProgress.child = renderLanes;
  12288. for (renderLanes.return = workInProgress; null !== current.sibling; )
  12289. (current = current.sibling),
  12290. (renderLanes = renderLanes.sibling =
  12291. createWorkInProgress(current, current.pendingProps)),
  12292. (renderLanes.return = workInProgress);
  12293. renderLanes.sibling = null;
  12294. }
  12295. return workInProgress.child;
  12296. }
  12297. function checkScheduledUpdateOrContext(current, renderLanes) {
  12298. if (0 !== (current.lanes & renderLanes)) return true;
  12299. current = current.dependencies;
  12300. return null !== current && checkIfContextChanged(current) ? true : false;
  12301. }
  12302. function attemptEarlyBailoutIfNoScheduledUpdate(
  12303. current,
  12304. workInProgress,
  12305. renderLanes
  12306. ) {
  12307. switch (workInProgress.tag) {
  12308. case 3:
  12309. pushHostContainer(
  12310. workInProgress,
  12311. workInProgress.stateNode.containerInfo
  12312. );
  12313. pushProvider(
  12314. workInProgress,
  12315. CacheContext,
  12316. current.memoizedState.cache
  12317. );
  12318. resetHydrationState();
  12319. break;
  12320. case 27:
  12321. case 5:
  12322. pushHostContext(workInProgress);
  12323. break;
  12324. case 4:
  12325. pushHostContainer(
  12326. workInProgress,
  12327. workInProgress.stateNode.containerInfo
  12328. );
  12329. break;
  12330. case 10:
  12331. pushProvider(
  12332. workInProgress,
  12333. workInProgress.type,
  12334. workInProgress.memoizedProps.value
  12335. );
  12336. break;
  12337. case 12:
  12338. 0 !== (renderLanes & workInProgress.childLanes) &&
  12339. (workInProgress.flags |= 4);
  12340. workInProgress.flags |= 2048;
  12341. var stateNode = workInProgress.stateNode;
  12342. stateNode.effectDuration = -0;
  12343. stateNode.passiveEffectDuration = -0;
  12344. break;
  12345. case 31:
  12346. if (null !== workInProgress.memoizedState)
  12347. return (
  12348. (workInProgress.flags |= 128),
  12349. pushDehydratedActivitySuspenseHandler(workInProgress),
  12350. null
  12351. );
  12352. break;
  12353. case 13:
  12354. stateNode = workInProgress.memoizedState;
  12355. if (null !== stateNode) {
  12356. if (null !== stateNode.dehydrated)
  12357. return (
  12358. pushPrimaryTreeSuspenseHandler(workInProgress),
  12359. (workInProgress.flags |= 128),
  12360. null
  12361. );
  12362. if (0 !== (renderLanes & workInProgress.child.childLanes))
  12363. return updateSuspenseComponent(
  12364. current,
  12365. workInProgress,
  12366. renderLanes
  12367. );
  12368. pushPrimaryTreeSuspenseHandler(workInProgress);
  12369. current = bailoutOnAlreadyFinishedWork(
  12370. current,
  12371. workInProgress,
  12372. renderLanes
  12373. );
  12374. return null !== current ? current.sibling : null;
  12375. }
  12376. pushPrimaryTreeSuspenseHandler(workInProgress);
  12377. break;
  12378. case 19:
  12379. var didSuspendBefore = 0 !== (current.flags & 128);
  12380. stateNode = 0 !== (renderLanes & workInProgress.childLanes);
  12381. stateNode ||
  12382. (propagateParentContextChanges(
  12383. current,
  12384. workInProgress,
  12385. renderLanes,
  12386. false
  12387. ),
  12388. (stateNode = 0 !== (renderLanes & workInProgress.childLanes)));
  12389. if (didSuspendBefore) {
  12390. if (stateNode)
  12391. return updateSuspenseListComponent(
  12392. current,
  12393. workInProgress,
  12394. renderLanes
  12395. );
  12396. workInProgress.flags |= 128;
  12397. }
  12398. didSuspendBefore = workInProgress.memoizedState;
  12399. null !== didSuspendBefore &&
  12400. ((didSuspendBefore.rendering = null),
  12401. (didSuspendBefore.tail = null),
  12402. (didSuspendBefore.lastEffect = null));
  12403. push(
  12404. suspenseStackCursor,
  12405. suspenseStackCursor.current,
  12406. workInProgress
  12407. );
  12408. if (stateNode) break;
  12409. else return null;
  12410. case 22:
  12411. return (
  12412. (workInProgress.lanes = 0),
  12413. updateOffscreenComponent(
  12414. current,
  12415. workInProgress,
  12416. renderLanes,
  12417. workInProgress.pendingProps
  12418. )
  12419. );
  12420. case 24:
  12421. pushProvider(
  12422. workInProgress,
  12423. CacheContext,
  12424. current.memoizedState.cache
  12425. );
  12426. }
  12427. return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
  12428. }
  12429. function beginWork(current, workInProgress, renderLanes) {
  12430. if (workInProgress._debugNeedsRemount && null !== current) {
  12431. renderLanes = createFiberFromTypeAndProps(
  12432. workInProgress.type,
  12433. workInProgress.key,
  12434. workInProgress.pendingProps,
  12435. workInProgress._debugOwner || null,
  12436. workInProgress.mode,
  12437. workInProgress.lanes
  12438. );
  12439. renderLanes._debugStack = workInProgress._debugStack;
  12440. renderLanes._debugTask = workInProgress._debugTask;
  12441. var returnFiber = workInProgress.return;
  12442. if (null === returnFiber) throw Error("Cannot swap the root fiber.");
  12443. current.alternate = null;
  12444. workInProgress.alternate = null;
  12445. renderLanes.index = workInProgress.index;
  12446. renderLanes.sibling = workInProgress.sibling;
  12447. renderLanes.return = workInProgress.return;
  12448. renderLanes.ref = workInProgress.ref;
  12449. renderLanes._debugInfo = workInProgress._debugInfo;
  12450. if (workInProgress === returnFiber.child)
  12451. returnFiber.child = renderLanes;
  12452. else {
  12453. var prevSibling = returnFiber.child;
  12454. if (null === prevSibling)
  12455. throw Error("Expected parent to have a child.");
  12456. for (; prevSibling.sibling !== workInProgress; )
  12457. if (((prevSibling = prevSibling.sibling), null === prevSibling))
  12458. throw Error("Expected to find the previous sibling.");
  12459. prevSibling.sibling = renderLanes;
  12460. }
  12461. workInProgress = returnFiber.deletions;
  12462. null === workInProgress
  12463. ? ((returnFiber.deletions = [current]), (returnFiber.flags |= 16))
  12464. : workInProgress.push(current);
  12465. renderLanes.flags |= 2;
  12466. return renderLanes;
  12467. }
  12468. if (null !== current)
  12469. if (
  12470. current.memoizedProps !== workInProgress.pendingProps ||
  12471. workInProgress.type !== current.type
  12472. )
  12473. didReceiveUpdate = true;
  12474. else {
  12475. if (
  12476. !checkScheduledUpdateOrContext(current, renderLanes) &&
  12477. 0 === (workInProgress.flags & 128)
  12478. )
  12479. return (
  12480. (didReceiveUpdate = false),
  12481. attemptEarlyBailoutIfNoScheduledUpdate(
  12482. current,
  12483. workInProgress,
  12484. renderLanes
  12485. )
  12486. );
  12487. didReceiveUpdate = 0 !== (current.flags & 131072) ? true : false;
  12488. }
  12489. else {
  12490. didReceiveUpdate = false;
  12491. if ((returnFiber = isHydrating))
  12492. warnIfNotHydrating(),
  12493. (returnFiber = 0 !== (workInProgress.flags & 1048576));
  12494. returnFiber &&
  12495. ((returnFiber = workInProgress.index),
  12496. warnIfNotHydrating(),
  12497. pushTreeId(workInProgress, treeForkCount, returnFiber));
  12498. }
  12499. workInProgress.lanes = 0;
  12500. switch (workInProgress.tag) {
  12501. case 16:
  12502. a: if (
  12503. ((returnFiber = workInProgress.pendingProps),
  12504. (current = resolveLazy(workInProgress.elementType)),
  12505. (workInProgress.type = current),
  12506. "function" === typeof current)
  12507. )
  12508. shouldConstruct(current)
  12509. ? ((returnFiber = resolveClassComponentProps(
  12510. current,
  12511. returnFiber
  12512. )),
  12513. (workInProgress.tag = 1),
  12514. (workInProgress.type = current =
  12515. resolveFunctionForHotReloading(current)),
  12516. (workInProgress = updateClassComponent(
  12517. null,
  12518. workInProgress,
  12519. current,
  12520. returnFiber,
  12521. renderLanes
  12522. )))
  12523. : ((workInProgress.tag = 0),
  12524. validateFunctionComponentInDev(workInProgress, current),
  12525. (workInProgress.type = current =
  12526. resolveFunctionForHotReloading(current)),
  12527. (workInProgress = updateFunctionComponent(
  12528. null,
  12529. workInProgress,
  12530. current,
  12531. returnFiber,
  12532. renderLanes
  12533. )));
  12534. else {
  12535. if (void 0 !== current && null !== current)
  12536. if (
  12537. ((prevSibling = current.$$typeof),
  12538. prevSibling === REACT_FORWARD_REF_TYPE)
  12539. ) {
  12540. workInProgress.tag = 11;
  12541. workInProgress.type = current =
  12542. resolveForwardRefForHotReloading(current);
  12543. workInProgress = updateForwardRef(
  12544. null,
  12545. workInProgress,
  12546. current,
  12547. returnFiber,
  12548. renderLanes
  12549. );
  12550. break a;
  12551. } else if (prevSibling === REACT_MEMO_TYPE) {
  12552. workInProgress.tag = 14;
  12553. workInProgress = updateMemoComponent(
  12554. null,
  12555. workInProgress,
  12556. current,
  12557. returnFiber,
  12558. renderLanes
  12559. );
  12560. break a;
  12561. }
  12562. workInProgress = "";
  12563. null !== current &&
  12564. "object" === typeof current &&
  12565. current.$$typeof === REACT_LAZY_TYPE &&
  12566. (workInProgress =
  12567. " Did you wrap a component in React.lazy() more than once?");
  12568. renderLanes = getComponentNameFromType(current) || current;
  12569. throw Error(
  12570. "Element type is invalid. Received a promise that resolves to: " +
  12571. renderLanes +
  12572. ". Lazy element type must resolve to a class or function." +
  12573. workInProgress
  12574. );
  12575. }
  12576. return workInProgress;
  12577. case 0:
  12578. return updateFunctionComponent(
  12579. current,
  12580. workInProgress,
  12581. workInProgress.type,
  12582. workInProgress.pendingProps,
  12583. renderLanes
  12584. );
  12585. case 1:
  12586. return (
  12587. (returnFiber = workInProgress.type),
  12588. (prevSibling = resolveClassComponentProps(
  12589. returnFiber,
  12590. workInProgress.pendingProps
  12591. )),
  12592. updateClassComponent(
  12593. current,
  12594. workInProgress,
  12595. returnFiber,
  12596. prevSibling,
  12597. renderLanes
  12598. )
  12599. );
  12600. case 3:
  12601. a: {
  12602. pushHostContainer(
  12603. workInProgress,
  12604. workInProgress.stateNode.containerInfo
  12605. );
  12606. if (null === current)
  12607. throw Error(
  12608. "Should have a current fiber. This is a bug in React."
  12609. );
  12610. returnFiber = workInProgress.pendingProps;
  12611. var prevState = workInProgress.memoizedState;
  12612. prevSibling = prevState.element;
  12613. cloneUpdateQueue(current, workInProgress);
  12614. processUpdateQueue(workInProgress, returnFiber, null, renderLanes);
  12615. var nextState = workInProgress.memoizedState;
  12616. returnFiber = nextState.cache;
  12617. pushProvider(workInProgress, CacheContext, returnFiber);
  12618. returnFiber !== prevState.cache &&
  12619. propagateContextChanges(
  12620. workInProgress,
  12621. [CacheContext],
  12622. renderLanes,
  12623. true
  12624. );
  12625. suspendIfUpdateReadFromEntangledAsyncAction();
  12626. returnFiber = nextState.element;
  12627. if (prevState.isDehydrated)
  12628. if (
  12629. ((prevState = {
  12630. element: returnFiber,
  12631. isDehydrated: false,
  12632. cache: nextState.cache
  12633. }),
  12634. (workInProgress.updateQueue.baseState = prevState),
  12635. (workInProgress.memoizedState = prevState),
  12636. workInProgress.flags & 256)
  12637. ) {
  12638. workInProgress = mountHostRootWithoutHydrating(
  12639. current,
  12640. workInProgress,
  12641. returnFiber,
  12642. renderLanes
  12643. );
  12644. break a;
  12645. } else if (returnFiber !== prevSibling) {
  12646. prevSibling = createCapturedValueAtFiber(
  12647. Error(
  12648. "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."
  12649. ),
  12650. workInProgress
  12651. );
  12652. queueHydrationError(prevSibling);
  12653. workInProgress = mountHostRootWithoutHydrating(
  12654. current,
  12655. workInProgress,
  12656. returnFiber,
  12657. renderLanes
  12658. );
  12659. break a;
  12660. } else {
  12661. current = workInProgress.stateNode.containerInfo;
  12662. switch (current.nodeType) {
  12663. case 9:
  12664. current = current.body;
  12665. break;
  12666. default:
  12667. current =
  12668. "HTML" === current.nodeName
  12669. ? current.ownerDocument.body
  12670. : current;
  12671. }
  12672. nextHydratableInstance = getNextHydratable(current.firstChild);
  12673. hydrationParentFiber = workInProgress;
  12674. isHydrating = true;
  12675. hydrationErrors = null;
  12676. didSuspendOrErrorDEV = false;
  12677. hydrationDiffRootDEV = null;
  12678. rootOrSingletonContext = true;
  12679. renderLanes = mountChildFibers(
  12680. workInProgress,
  12681. null,
  12682. returnFiber,
  12683. renderLanes
  12684. );
  12685. for (workInProgress.child = renderLanes; renderLanes; )
  12686. (renderLanes.flags = (renderLanes.flags & -3) | 4096),
  12687. (renderLanes = renderLanes.sibling);
  12688. }
  12689. else {
  12690. resetHydrationState();
  12691. if (returnFiber === prevSibling) {
  12692. workInProgress = bailoutOnAlreadyFinishedWork(
  12693. current,
  12694. workInProgress,
  12695. renderLanes
  12696. );
  12697. break a;
  12698. }
  12699. reconcileChildren(
  12700. current,
  12701. workInProgress,
  12702. returnFiber,
  12703. renderLanes
  12704. );
  12705. }
  12706. workInProgress = workInProgress.child;
  12707. }
  12708. return workInProgress;
  12709. case 26:
  12710. return (
  12711. markRef(current, workInProgress),
  12712. null === current
  12713. ? (renderLanes = getResource(
  12714. workInProgress.type,
  12715. null,
  12716. workInProgress.pendingProps,
  12717. null
  12718. ))
  12719. ? (workInProgress.memoizedState = renderLanes)
  12720. : isHydrating ||
  12721. ((renderLanes = workInProgress.type),
  12722. (current = workInProgress.pendingProps),
  12723. (returnFiber = requiredContext(
  12724. rootInstanceStackCursor.current
  12725. )),
  12726. (returnFiber =
  12727. getOwnerDocumentFromRootContainer(
  12728. returnFiber
  12729. ).createElement(renderLanes)),
  12730. (returnFiber[internalInstanceKey] = workInProgress),
  12731. (returnFiber[internalPropsKey] = current),
  12732. setInitialProperties(returnFiber, renderLanes, current),
  12733. markNodeAsHoistable(returnFiber),
  12734. (workInProgress.stateNode = returnFiber))
  12735. : (workInProgress.memoizedState = getResource(
  12736. workInProgress.type,
  12737. current.memoizedProps,
  12738. workInProgress.pendingProps,
  12739. current.memoizedState
  12740. )),
  12741. null
  12742. );
  12743. case 27:
  12744. return (
  12745. pushHostContext(workInProgress),
  12746. null === current &&
  12747. isHydrating &&
  12748. ((returnFiber = requiredContext(rootInstanceStackCursor.current)),
  12749. (prevSibling = getHostContext()),
  12750. (returnFiber = workInProgress.stateNode =
  12751. resolveSingletonInstance(
  12752. workInProgress.type,
  12753. workInProgress.pendingProps,
  12754. returnFiber,
  12755. prevSibling,
  12756. false
  12757. )),
  12758. didSuspendOrErrorDEV ||
  12759. ((prevSibling = diffHydratedProperties(
  12760. returnFiber,
  12761. workInProgress.type,
  12762. workInProgress.pendingProps,
  12763. prevSibling
  12764. )),
  12765. null !== prevSibling &&
  12766. (buildHydrationDiffNode(workInProgress, 0).serverProps =
  12767. prevSibling)),
  12768. (hydrationParentFiber = workInProgress),
  12769. (rootOrSingletonContext = true),
  12770. (prevSibling = nextHydratableInstance),
  12771. isSingletonScope(workInProgress.type)
  12772. ? ((previousHydratableOnEnteringScopedSingleton = prevSibling),
  12773. (nextHydratableInstance = getNextHydratable(
  12774. returnFiber.firstChild
  12775. )))
  12776. : (nextHydratableInstance = prevSibling)),
  12777. reconcileChildren(
  12778. current,
  12779. workInProgress,
  12780. workInProgress.pendingProps.children,
  12781. renderLanes
  12782. ),
  12783. markRef(current, workInProgress),
  12784. null === current && (workInProgress.flags |= 4194304),
  12785. workInProgress.child
  12786. );
  12787. case 5:
  12788. return (
  12789. null === current &&
  12790. isHydrating &&
  12791. ((prevState = getHostContext()),
  12792. (returnFiber = validateDOMNesting(
  12793. workInProgress.type,
  12794. prevState.ancestorInfo
  12795. )),
  12796. (prevSibling = nextHydratableInstance),
  12797. (nextState = !prevSibling) ||
  12798. ((nextState = canHydrateInstance(
  12799. prevSibling,
  12800. workInProgress.type,
  12801. workInProgress.pendingProps,
  12802. rootOrSingletonContext
  12803. )),
  12804. null !== nextState
  12805. ? ((workInProgress.stateNode = nextState),
  12806. didSuspendOrErrorDEV ||
  12807. ((prevState = diffHydratedProperties(
  12808. nextState,
  12809. workInProgress.type,
  12810. workInProgress.pendingProps,
  12811. prevState
  12812. )),
  12813. null !== prevState &&
  12814. (buildHydrationDiffNode(workInProgress, 0).serverProps =
  12815. prevState)),
  12816. (hydrationParentFiber = workInProgress),
  12817. (nextHydratableInstance = getNextHydratable(
  12818. nextState.firstChild
  12819. )),
  12820. (rootOrSingletonContext = false),
  12821. (prevState = true))
  12822. : (prevState = false),
  12823. (nextState = !prevState)),
  12824. nextState &&
  12825. (returnFiber &&
  12826. warnNonHydratedInstance(workInProgress, prevSibling),
  12827. throwOnHydrationMismatch(workInProgress))),
  12828. pushHostContext(workInProgress),
  12829. (prevSibling = workInProgress.type),
  12830. (prevState = workInProgress.pendingProps),
  12831. (nextState = null !== current ? current.memoizedProps : null),
  12832. (returnFiber = prevState.children),
  12833. shouldSetTextContent(prevSibling, prevState)
  12834. ? (returnFiber = null)
  12835. : null !== nextState &&
  12836. shouldSetTextContent(prevSibling, nextState) &&
  12837. (workInProgress.flags |= 32),
  12838. null !== workInProgress.memoizedState &&
  12839. ((prevSibling = renderWithHooks(
  12840. current,
  12841. workInProgress,
  12842. TransitionAwareHostComponent,
  12843. null,
  12844. null,
  12845. renderLanes
  12846. )),
  12847. (HostTransitionContext._currentValue = prevSibling)),
  12848. markRef(current, workInProgress),
  12849. reconcileChildren(
  12850. current,
  12851. workInProgress,
  12852. returnFiber,
  12853. renderLanes
  12854. ),
  12855. workInProgress.child
  12856. );
  12857. case 6:
  12858. return (
  12859. null === current &&
  12860. isHydrating &&
  12861. ((renderLanes = workInProgress.pendingProps),
  12862. (current = getHostContext()),
  12863. (returnFiber = current.ancestorInfo.current),
  12864. (renderLanes =
  12865. null != returnFiber
  12866. ? validateTextNesting(
  12867. renderLanes,
  12868. returnFiber.tag,
  12869. current.ancestorInfo.implicitRootScope
  12870. )
  12871. : true),
  12872. (current = nextHydratableInstance),
  12873. (returnFiber = !current) ||
  12874. ((returnFiber = canHydrateTextInstance(
  12875. current,
  12876. workInProgress.pendingProps,
  12877. rootOrSingletonContext
  12878. )),
  12879. null !== returnFiber
  12880. ? ((workInProgress.stateNode = returnFiber),
  12881. (hydrationParentFiber = workInProgress),
  12882. (nextHydratableInstance = null),
  12883. (returnFiber = true))
  12884. : (returnFiber = false),
  12885. (returnFiber = !returnFiber)),
  12886. returnFiber &&
  12887. (renderLanes &&
  12888. warnNonHydratedInstance(workInProgress, current),
  12889. throwOnHydrationMismatch(workInProgress))),
  12890. null
  12891. );
  12892. case 13:
  12893. return updateSuspenseComponent(current, workInProgress, renderLanes);
  12894. case 4:
  12895. return (
  12896. pushHostContainer(
  12897. workInProgress,
  12898. workInProgress.stateNode.containerInfo
  12899. ),
  12900. (returnFiber = workInProgress.pendingProps),
  12901. null === current
  12902. ? (workInProgress.child = reconcileChildFibers(
  12903. workInProgress,
  12904. null,
  12905. returnFiber,
  12906. renderLanes
  12907. ))
  12908. : reconcileChildren(
  12909. current,
  12910. workInProgress,
  12911. returnFiber,
  12912. renderLanes
  12913. ),
  12914. workInProgress.child
  12915. );
  12916. case 11:
  12917. return updateForwardRef(
  12918. current,
  12919. workInProgress,
  12920. workInProgress.type,
  12921. workInProgress.pendingProps,
  12922. renderLanes
  12923. );
  12924. case 7:
  12925. return (
  12926. reconcileChildren(
  12927. current,
  12928. workInProgress,
  12929. workInProgress.pendingProps,
  12930. renderLanes
  12931. ),
  12932. workInProgress.child
  12933. );
  12934. case 8:
  12935. return (
  12936. reconcileChildren(
  12937. current,
  12938. workInProgress,
  12939. workInProgress.pendingProps.children,
  12940. renderLanes
  12941. ),
  12942. workInProgress.child
  12943. );
  12944. case 12:
  12945. return (
  12946. (workInProgress.flags |= 4),
  12947. (workInProgress.flags |= 2048),
  12948. (returnFiber = workInProgress.stateNode),
  12949. (returnFiber.effectDuration = -0),
  12950. (returnFiber.passiveEffectDuration = -0),
  12951. reconcileChildren(
  12952. current,
  12953. workInProgress,
  12954. workInProgress.pendingProps.children,
  12955. renderLanes
  12956. ),
  12957. workInProgress.child
  12958. );
  12959. case 10:
  12960. return (
  12961. (returnFiber = workInProgress.type),
  12962. (prevSibling = workInProgress.pendingProps),
  12963. (prevState = prevSibling.value),
  12964. "value" in prevSibling ||
  12965. hasWarnedAboutUsingNoValuePropOnContextProvider ||
  12966. ((hasWarnedAboutUsingNoValuePropOnContextProvider = true),
  12967. console.error(
  12968. "The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"
  12969. )),
  12970. pushProvider(workInProgress, returnFiber, prevState),
  12971. reconcileChildren(
  12972. current,
  12973. workInProgress,
  12974. prevSibling.children,
  12975. renderLanes
  12976. ),
  12977. workInProgress.child
  12978. );
  12979. case 9:
  12980. return (
  12981. (prevSibling = workInProgress.type._context),
  12982. (returnFiber = workInProgress.pendingProps.children),
  12983. "function" !== typeof returnFiber &&
  12984. console.error(
  12985. "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
  12986. ),
  12987. prepareToReadContext(workInProgress),
  12988. (prevSibling = readContext(prevSibling)),
  12989. (returnFiber = callComponentInDEV(
  12990. returnFiber,
  12991. prevSibling,
  12992. void 0
  12993. )),
  12994. (workInProgress.flags |= 1),
  12995. reconcileChildren(
  12996. current,
  12997. workInProgress,
  12998. returnFiber,
  12999. renderLanes
  13000. ),
  13001. workInProgress.child
  13002. );
  13003. case 14:
  13004. return updateMemoComponent(
  13005. current,
  13006. workInProgress,
  13007. workInProgress.type,
  13008. workInProgress.pendingProps,
  13009. renderLanes
  13010. );
  13011. case 15:
  13012. return updateSimpleMemoComponent(
  13013. current,
  13014. workInProgress,
  13015. workInProgress.type,
  13016. workInProgress.pendingProps,
  13017. renderLanes
  13018. );
  13019. case 19:
  13020. return updateSuspenseListComponent(
  13021. current,
  13022. workInProgress,
  13023. renderLanes
  13024. );
  13025. case 31:
  13026. return updateActivityComponent(current, workInProgress, renderLanes);
  13027. case 22:
  13028. return updateOffscreenComponent(
  13029. current,
  13030. workInProgress,
  13031. renderLanes,
  13032. workInProgress.pendingProps
  13033. );
  13034. case 24:
  13035. return (
  13036. prepareToReadContext(workInProgress),
  13037. (returnFiber = readContext(CacheContext)),
  13038. null === current
  13039. ? ((prevSibling = peekCacheFromPool()),
  13040. null === prevSibling &&
  13041. ((prevSibling = workInProgressRoot),
  13042. (prevState = createCache()),
  13043. (prevSibling.pooledCache = prevState),
  13044. retainCache(prevState),
  13045. null !== prevState &&
  13046. (prevSibling.pooledCacheLanes |= renderLanes),
  13047. (prevSibling = prevState)),
  13048. (workInProgress.memoizedState = {
  13049. parent: returnFiber,
  13050. cache: prevSibling
  13051. }),
  13052. initializeUpdateQueue(workInProgress),
  13053. pushProvider(workInProgress, CacheContext, prevSibling))
  13054. : (0 !== (current.lanes & renderLanes) &&
  13055. (cloneUpdateQueue(current, workInProgress),
  13056. processUpdateQueue(workInProgress, null, null, renderLanes),
  13057. suspendIfUpdateReadFromEntangledAsyncAction()),
  13058. (prevSibling = current.memoizedState),
  13059. (prevState = workInProgress.memoizedState),
  13060. prevSibling.parent !== returnFiber
  13061. ? ((prevSibling = {
  13062. parent: returnFiber,
  13063. cache: returnFiber
  13064. }),
  13065. (workInProgress.memoizedState = prevSibling),
  13066. 0 === workInProgress.lanes &&
  13067. (workInProgress.memoizedState =
  13068. workInProgress.updateQueue.baseState =
  13069. prevSibling),
  13070. pushProvider(workInProgress, CacheContext, returnFiber))
  13071. : ((returnFiber = prevState.cache),
  13072. pushProvider(workInProgress, CacheContext, returnFiber),
  13073. returnFiber !== prevSibling.cache &&
  13074. propagateContextChanges(
  13075. workInProgress,
  13076. [CacheContext],
  13077. renderLanes,
  13078. true
  13079. ))),
  13080. reconcileChildren(
  13081. current,
  13082. workInProgress,
  13083. workInProgress.pendingProps.children,
  13084. renderLanes
  13085. ),
  13086. workInProgress.child
  13087. );
  13088. case 29:
  13089. throw workInProgress.pendingProps;
  13090. }
  13091. throw Error(
  13092. "Unknown unit of work tag (" +
  13093. workInProgress.tag +
  13094. "). This error is likely caused by a bug in React. Please file an issue."
  13095. );
  13096. }
  13097. function markUpdate(workInProgress) {
  13098. workInProgress.flags |= 4;
  13099. }
  13100. function preloadInstanceAndSuspendIfNeeded(
  13101. workInProgress,
  13102. type,
  13103. oldProps,
  13104. newProps,
  13105. renderLanes
  13106. ) {
  13107. if ((type = (workInProgress.mode & SuspenseyImagesMode) !== NoMode))
  13108. type = false;
  13109. if (type) {
  13110. if (
  13111. ((workInProgress.flags |= 16777216),
  13112. (renderLanes & 335544128) === renderLanes)
  13113. )
  13114. if (workInProgress.stateNode.complete) workInProgress.flags |= 8192;
  13115. else if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;
  13116. else
  13117. throw (
  13118. ((suspendedThenable = noopSuspenseyCommitThenable),
  13119. SuspenseyCommitException)
  13120. );
  13121. } else workInProgress.flags &= -16777217;
  13122. }
  13123. function preloadResourceAndSuspendIfNeeded(workInProgress, resource) {
  13124. if (
  13125. "stylesheet" !== resource.type ||
  13126. (resource.state.loading & Inserted) !== NotLoaded
  13127. )
  13128. workInProgress.flags &= -16777217;
  13129. else if (((workInProgress.flags |= 16777216), !preloadResource(resource)))
  13130. if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;
  13131. else
  13132. throw (
  13133. ((suspendedThenable = noopSuspenseyCommitThenable),
  13134. SuspenseyCommitException)
  13135. );
  13136. }
  13137. function scheduleRetryEffect(workInProgress, retryQueue) {
  13138. null !== retryQueue && (workInProgress.flags |= 4);
  13139. workInProgress.flags & 16384 &&
  13140. ((retryQueue =
  13141. 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),
  13142. (workInProgress.lanes |= retryQueue),
  13143. (workInProgressSuspendedRetryLanes |= retryQueue));
  13144. }
  13145. function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  13146. if (!isHydrating)
  13147. switch (renderState.tailMode) {
  13148. case "hidden":
  13149. hasRenderedATailFallback = renderState.tail;
  13150. for (var lastTailNode = null; null !== hasRenderedATailFallback; )
  13151. null !== hasRenderedATailFallback.alternate &&
  13152. (lastTailNode = hasRenderedATailFallback),
  13153. (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
  13154. null === lastTailNode
  13155. ? (renderState.tail = null)
  13156. : (lastTailNode.sibling = null);
  13157. break;
  13158. case "collapsed":
  13159. lastTailNode = renderState.tail;
  13160. for (var _lastTailNode = null; null !== lastTailNode; )
  13161. null !== lastTailNode.alternate && (_lastTailNode = lastTailNode),
  13162. (lastTailNode = lastTailNode.sibling);
  13163. null === _lastTailNode
  13164. ? hasRenderedATailFallback || null === renderState.tail
  13165. ? (renderState.tail = null)
  13166. : (renderState.tail.sibling = null)
  13167. : (_lastTailNode.sibling = null);
  13168. }
  13169. }
  13170. function bubbleProperties(completedWork) {
  13171. var didBailout =
  13172. null !== completedWork.alternate &&
  13173. completedWork.alternate.child === completedWork.child,
  13174. newChildLanes = 0,
  13175. subtreeFlags = 0;
  13176. if (didBailout)
  13177. if ((completedWork.mode & ProfileMode) !== NoMode) {
  13178. for (
  13179. var _treeBaseDuration = completedWork.selfBaseDuration,
  13180. _child2 = completedWork.child;
  13181. null !== _child2;
  13182. )
  13183. (newChildLanes |= _child2.lanes | _child2.childLanes),
  13184. (subtreeFlags |= _child2.subtreeFlags & 65011712),
  13185. (subtreeFlags |= _child2.flags & 65011712),
  13186. (_treeBaseDuration += _child2.treeBaseDuration),
  13187. (_child2 = _child2.sibling);
  13188. completedWork.treeBaseDuration = _treeBaseDuration;
  13189. } else
  13190. for (
  13191. _treeBaseDuration = completedWork.child;
  13192. null !== _treeBaseDuration;
  13193. )
  13194. (newChildLanes |=
  13195. _treeBaseDuration.lanes | _treeBaseDuration.childLanes),
  13196. (subtreeFlags |= _treeBaseDuration.subtreeFlags & 65011712),
  13197. (subtreeFlags |= _treeBaseDuration.flags & 65011712),
  13198. (_treeBaseDuration.return = completedWork),
  13199. (_treeBaseDuration = _treeBaseDuration.sibling);
  13200. else if ((completedWork.mode & ProfileMode) !== NoMode) {
  13201. _treeBaseDuration = completedWork.actualDuration;
  13202. _child2 = completedWork.selfBaseDuration;
  13203. for (var child = completedWork.child; null !== child; )
  13204. (newChildLanes |= child.lanes | child.childLanes),
  13205. (subtreeFlags |= child.subtreeFlags),
  13206. (subtreeFlags |= child.flags),
  13207. (_treeBaseDuration += child.actualDuration),
  13208. (_child2 += child.treeBaseDuration),
  13209. (child = child.sibling);
  13210. completedWork.actualDuration = _treeBaseDuration;
  13211. completedWork.treeBaseDuration = _child2;
  13212. } else
  13213. for (
  13214. _treeBaseDuration = completedWork.child;
  13215. null !== _treeBaseDuration;
  13216. )
  13217. (newChildLanes |=
  13218. _treeBaseDuration.lanes | _treeBaseDuration.childLanes),
  13219. (subtreeFlags |= _treeBaseDuration.subtreeFlags),
  13220. (subtreeFlags |= _treeBaseDuration.flags),
  13221. (_treeBaseDuration.return = completedWork),
  13222. (_treeBaseDuration = _treeBaseDuration.sibling);
  13223. completedWork.subtreeFlags |= subtreeFlags;
  13224. completedWork.childLanes = newChildLanes;
  13225. return didBailout;
  13226. }
  13227. function completeWork(current, workInProgress, renderLanes) {
  13228. var newProps = workInProgress.pendingProps;
  13229. popTreeContext(workInProgress);
  13230. switch (workInProgress.tag) {
  13231. case 16:
  13232. case 15:
  13233. case 0:
  13234. case 11:
  13235. case 7:
  13236. case 8:
  13237. case 12:
  13238. case 9:
  13239. case 14:
  13240. return bubbleProperties(workInProgress), null;
  13241. case 1:
  13242. return bubbleProperties(workInProgress), null;
  13243. case 3:
  13244. renderLanes = workInProgress.stateNode;
  13245. newProps = null;
  13246. null !== current && (newProps = current.memoizedState.cache);
  13247. workInProgress.memoizedState.cache !== newProps &&
  13248. (workInProgress.flags |= 2048);
  13249. popProvider(CacheContext, workInProgress);
  13250. popHostContainer(workInProgress);
  13251. renderLanes.pendingContext &&
  13252. ((renderLanes.context = renderLanes.pendingContext),
  13253. (renderLanes.pendingContext = null));
  13254. if (null === current || null === current.child)
  13255. popHydrationState(workInProgress)
  13256. ? (emitPendingHydrationWarnings(), markUpdate(workInProgress))
  13257. : null === current ||
  13258. (current.memoizedState.isDehydrated &&
  13259. 0 === (workInProgress.flags & 256)) ||
  13260. ((workInProgress.flags |= 1024),
  13261. upgradeHydrationErrorsToRecoverable());
  13262. bubbleProperties(workInProgress);
  13263. return null;
  13264. case 26:
  13265. var type = workInProgress.type,
  13266. nextResource = workInProgress.memoizedState;
  13267. null === current
  13268. ? (markUpdate(workInProgress),
  13269. null !== nextResource
  13270. ? (bubbleProperties(workInProgress),
  13271. preloadResourceAndSuspendIfNeeded(
  13272. workInProgress,
  13273. nextResource
  13274. ))
  13275. : (bubbleProperties(workInProgress),
  13276. preloadInstanceAndSuspendIfNeeded(
  13277. workInProgress,
  13278. type,
  13279. null,
  13280. newProps,
  13281. renderLanes
  13282. )))
  13283. : nextResource
  13284. ? nextResource !== current.memoizedState
  13285. ? (markUpdate(workInProgress),
  13286. bubbleProperties(workInProgress),
  13287. preloadResourceAndSuspendIfNeeded(
  13288. workInProgress,
  13289. nextResource
  13290. ))
  13291. : (bubbleProperties(workInProgress),
  13292. (workInProgress.flags &= -16777217))
  13293. : ((current = current.memoizedProps),
  13294. current !== newProps && markUpdate(workInProgress),
  13295. bubbleProperties(workInProgress),
  13296. preloadInstanceAndSuspendIfNeeded(
  13297. workInProgress,
  13298. type,
  13299. current,
  13300. newProps,
  13301. renderLanes
  13302. ));
  13303. return null;
  13304. case 27:
  13305. popHostContext(workInProgress);
  13306. renderLanes = requiredContext(rootInstanceStackCursor.current);
  13307. type = workInProgress.type;
  13308. if (null !== current && null != workInProgress.stateNode)
  13309. current.memoizedProps !== newProps && markUpdate(workInProgress);
  13310. else {
  13311. if (!newProps) {
  13312. if (null === workInProgress.stateNode)
  13313. throw Error(
  13314. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  13315. );
  13316. bubbleProperties(workInProgress);
  13317. return null;
  13318. }
  13319. current = getHostContext();
  13320. popHydrationState(workInProgress)
  13321. ? prepareToHydrateHostInstance(workInProgress)
  13322. : ((current = resolveSingletonInstance(
  13323. type,
  13324. newProps,
  13325. renderLanes,
  13326. current,
  13327. true
  13328. )),
  13329. (workInProgress.stateNode = current),
  13330. markUpdate(workInProgress));
  13331. }
  13332. bubbleProperties(workInProgress);
  13333. return null;
  13334. case 5:
  13335. popHostContext(workInProgress);
  13336. type = workInProgress.type;
  13337. if (null !== current && null != workInProgress.stateNode)
  13338. current.memoizedProps !== newProps && markUpdate(workInProgress);
  13339. else {
  13340. if (!newProps) {
  13341. if (null === workInProgress.stateNode)
  13342. throw Error(
  13343. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  13344. );
  13345. bubbleProperties(workInProgress);
  13346. return null;
  13347. }
  13348. var _currentHostContext = getHostContext();
  13349. if (popHydrationState(workInProgress))
  13350. prepareToHydrateHostInstance(workInProgress);
  13351. else {
  13352. nextResource = requiredContext(rootInstanceStackCursor.current);
  13353. validateDOMNesting(type, _currentHostContext.ancestorInfo);
  13354. _currentHostContext = _currentHostContext.context;
  13355. nextResource = getOwnerDocumentFromRootContainer(nextResource);
  13356. switch (_currentHostContext) {
  13357. case HostContextNamespaceSvg:
  13358. nextResource = nextResource.createElementNS(
  13359. SVG_NAMESPACE,
  13360. type
  13361. );
  13362. break;
  13363. case HostContextNamespaceMath:
  13364. nextResource = nextResource.createElementNS(
  13365. MATH_NAMESPACE,
  13366. type
  13367. );
  13368. break;
  13369. default:
  13370. switch (type) {
  13371. case "svg":
  13372. nextResource = nextResource.createElementNS(
  13373. SVG_NAMESPACE,
  13374. type
  13375. );
  13376. break;
  13377. case "math":
  13378. nextResource = nextResource.createElementNS(
  13379. MATH_NAMESPACE,
  13380. type
  13381. );
  13382. break;
  13383. case "script":
  13384. nextResource = nextResource.createElement("div");
  13385. nextResource.innerHTML = "<script>\x3c/script>";
  13386. nextResource = nextResource.removeChild(
  13387. nextResource.firstChild
  13388. );
  13389. break;
  13390. case "select":
  13391. nextResource =
  13392. "string" === typeof newProps.is
  13393. ? nextResource.createElement("select", {
  13394. is: newProps.is
  13395. })
  13396. : nextResource.createElement("select");
  13397. newProps.multiple
  13398. ? (nextResource.multiple = true)
  13399. : newProps.size && (nextResource.size = newProps.size);
  13400. break;
  13401. default:
  13402. (nextResource =
  13403. "string" === typeof newProps.is
  13404. ? nextResource.createElement(type, {
  13405. is: newProps.is
  13406. })
  13407. : nextResource.createElement(type)),
  13408. -1 === type.indexOf("-") &&
  13409. (type !== type.toLowerCase() &&
  13410. console.error(
  13411. "<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",
  13412. type
  13413. ),
  13414. "[object HTMLUnknownElement]" !==
  13415. Object.prototype.toString.call(nextResource) ||
  13416. hasOwnProperty.call(warnedUnknownTags, type) ||
  13417. ((warnedUnknownTags[type] = true),
  13418. console.error(
  13419. "The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",
  13420. type
  13421. )));
  13422. }
  13423. }
  13424. nextResource[internalInstanceKey] = workInProgress;
  13425. nextResource[internalPropsKey] = newProps;
  13426. a: for (
  13427. _currentHostContext = workInProgress.child;
  13428. null !== _currentHostContext;
  13429. ) {
  13430. if (
  13431. 5 === _currentHostContext.tag ||
  13432. 6 === _currentHostContext.tag
  13433. )
  13434. nextResource.appendChild(_currentHostContext.stateNode);
  13435. else if (
  13436. 4 !== _currentHostContext.tag &&
  13437. 27 !== _currentHostContext.tag &&
  13438. null !== _currentHostContext.child
  13439. ) {
  13440. _currentHostContext.child.return = _currentHostContext;
  13441. _currentHostContext = _currentHostContext.child;
  13442. continue;
  13443. }
  13444. if (_currentHostContext === workInProgress) break a;
  13445. for (; null === _currentHostContext.sibling; ) {
  13446. if (
  13447. null === _currentHostContext.return ||
  13448. _currentHostContext.return === workInProgress
  13449. )
  13450. break a;
  13451. _currentHostContext = _currentHostContext.return;
  13452. }
  13453. _currentHostContext.sibling.return = _currentHostContext.return;
  13454. _currentHostContext = _currentHostContext.sibling;
  13455. }
  13456. workInProgress.stateNode = nextResource;
  13457. a: switch (
  13458. (setInitialProperties(nextResource, type, newProps), type)
  13459. ) {
  13460. case "button":
  13461. case "input":
  13462. case "select":
  13463. case "textarea":
  13464. newProps = !!newProps.autoFocus;
  13465. break a;
  13466. case "img":
  13467. newProps = true;
  13468. break a;
  13469. default:
  13470. newProps = false;
  13471. }
  13472. newProps && markUpdate(workInProgress);
  13473. }
  13474. }
  13475. bubbleProperties(workInProgress);
  13476. preloadInstanceAndSuspendIfNeeded(
  13477. workInProgress,
  13478. workInProgress.type,
  13479. null === current ? null : current.memoizedProps,
  13480. workInProgress.pendingProps,
  13481. renderLanes
  13482. );
  13483. return null;
  13484. case 6:
  13485. if (current && null != workInProgress.stateNode)
  13486. current.memoizedProps !== newProps && markUpdate(workInProgress);
  13487. else {
  13488. if (
  13489. "string" !== typeof newProps &&
  13490. null === workInProgress.stateNode
  13491. )
  13492. throw Error(
  13493. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  13494. );
  13495. current = requiredContext(rootInstanceStackCursor.current);
  13496. renderLanes = getHostContext();
  13497. if (popHydrationState(workInProgress)) {
  13498. current = workInProgress.stateNode;
  13499. renderLanes = workInProgress.memoizedProps;
  13500. type = !didSuspendOrErrorDEV;
  13501. newProps = null;
  13502. nextResource = hydrationParentFiber;
  13503. if (null !== nextResource)
  13504. switch (nextResource.tag) {
  13505. case 3:
  13506. type &&
  13507. ((type = diffHydratedTextForDevWarnings(
  13508. current,
  13509. renderLanes,
  13510. newProps
  13511. )),
  13512. null !== type &&
  13513. (buildHydrationDiffNode(workInProgress, 0).serverProps =
  13514. type));
  13515. break;
  13516. case 27:
  13517. case 5:
  13518. (newProps = nextResource.memoizedProps),
  13519. type &&
  13520. ((type = diffHydratedTextForDevWarnings(
  13521. current,
  13522. renderLanes,
  13523. newProps
  13524. )),
  13525. null !== type &&
  13526. (buildHydrationDiffNode(
  13527. workInProgress,
  13528. 0
  13529. ).serverProps = type));
  13530. }
  13531. current[internalInstanceKey] = workInProgress;
  13532. current =
  13533. current.nodeValue === renderLanes ||
  13534. (null !== newProps &&
  13535. true === newProps.suppressHydrationWarning) ||
  13536. checkForUnmatchedText(current.nodeValue, renderLanes)
  13537. ? true
  13538. : false;
  13539. current || throwOnHydrationMismatch(workInProgress, true);
  13540. } else
  13541. (type = renderLanes.ancestorInfo.current),
  13542. null != type &&
  13543. validateTextNesting(
  13544. newProps,
  13545. type.tag,
  13546. renderLanes.ancestorInfo.implicitRootScope
  13547. ),
  13548. (current =
  13549. getOwnerDocumentFromRootContainer(current).createTextNode(
  13550. newProps
  13551. )),
  13552. (current[internalInstanceKey] = workInProgress),
  13553. (workInProgress.stateNode = current);
  13554. }
  13555. bubbleProperties(workInProgress);
  13556. return null;
  13557. case 31:
  13558. renderLanes = workInProgress.memoizedState;
  13559. if (null === current || null !== current.memoizedState) {
  13560. newProps = popHydrationState(workInProgress);
  13561. if (null !== renderLanes) {
  13562. if (null === current) {
  13563. if (!newProps)
  13564. throw Error(
  13565. "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
  13566. );
  13567. current = workInProgress.memoizedState;
  13568. current = null !== current ? current.dehydrated : null;
  13569. if (!current)
  13570. throw Error(
  13571. "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue."
  13572. );
  13573. current[internalInstanceKey] = workInProgress;
  13574. bubbleProperties(workInProgress);
  13575. (workInProgress.mode & ProfileMode) !== NoMode &&
  13576. null !== renderLanes &&
  13577. ((current = workInProgress.child),
  13578. null !== current &&
  13579. (workInProgress.treeBaseDuration -=
  13580. current.treeBaseDuration));
  13581. } else
  13582. emitPendingHydrationWarnings(),
  13583. resetHydrationState(),
  13584. 0 === (workInProgress.flags & 128) &&
  13585. (renderLanes = workInProgress.memoizedState = null),
  13586. (workInProgress.flags |= 4),
  13587. bubbleProperties(workInProgress),
  13588. (workInProgress.mode & ProfileMode) !== NoMode &&
  13589. null !== renderLanes &&
  13590. ((current = workInProgress.child),
  13591. null !== current &&
  13592. (workInProgress.treeBaseDuration -=
  13593. current.treeBaseDuration));
  13594. current = false;
  13595. } else
  13596. (renderLanes = upgradeHydrationErrorsToRecoverable()),
  13597. null !== current &&
  13598. null !== current.memoizedState &&
  13599. (current.memoizedState.hydrationErrors = renderLanes),
  13600. (current = true);
  13601. if (!current) {
  13602. if (workInProgress.flags & 256)
  13603. return popSuspenseHandler(workInProgress), workInProgress;
  13604. popSuspenseHandler(workInProgress);
  13605. return null;
  13606. }
  13607. if (0 !== (workInProgress.flags & 128))
  13608. throw Error(
  13609. "Client rendering an Activity suspended it again. This is a bug in React."
  13610. );
  13611. }
  13612. bubbleProperties(workInProgress);
  13613. return null;
  13614. case 13:
  13615. newProps = workInProgress.memoizedState;
  13616. if (
  13617. null === current ||
  13618. (null !== current.memoizedState &&
  13619. null !== current.memoizedState.dehydrated)
  13620. ) {
  13621. type = newProps;
  13622. nextResource = popHydrationState(workInProgress);
  13623. if (null !== type && null !== type.dehydrated) {
  13624. if (null === current) {
  13625. if (!nextResource)
  13626. throw Error(
  13627. "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
  13628. );
  13629. nextResource = workInProgress.memoizedState;
  13630. nextResource =
  13631. null !== nextResource ? nextResource.dehydrated : null;
  13632. if (!nextResource)
  13633. throw Error(
  13634. "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
  13635. );
  13636. nextResource[internalInstanceKey] = workInProgress;
  13637. bubbleProperties(workInProgress);
  13638. (workInProgress.mode & ProfileMode) !== NoMode &&
  13639. null !== type &&
  13640. ((type = workInProgress.child),
  13641. null !== type &&
  13642. (workInProgress.treeBaseDuration -= type.treeBaseDuration));
  13643. } else
  13644. emitPendingHydrationWarnings(),
  13645. resetHydrationState(),
  13646. 0 === (workInProgress.flags & 128) &&
  13647. (type = workInProgress.memoizedState = null),
  13648. (workInProgress.flags |= 4),
  13649. bubbleProperties(workInProgress),
  13650. (workInProgress.mode & ProfileMode) !== NoMode &&
  13651. null !== type &&
  13652. ((type = workInProgress.child),
  13653. null !== type &&
  13654. (workInProgress.treeBaseDuration -=
  13655. type.treeBaseDuration));
  13656. type = false;
  13657. } else
  13658. (type = upgradeHydrationErrorsToRecoverable()),
  13659. null !== current &&
  13660. null !== current.memoizedState &&
  13661. (current.memoizedState.hydrationErrors = type),
  13662. (type = true);
  13663. if (!type) {
  13664. if (workInProgress.flags & 256)
  13665. return popSuspenseHandler(workInProgress), workInProgress;
  13666. popSuspenseHandler(workInProgress);
  13667. return null;
  13668. }
  13669. }
  13670. popSuspenseHandler(workInProgress);
  13671. if (0 !== (workInProgress.flags & 128))
  13672. return (
  13673. (workInProgress.lanes = renderLanes),
  13674. (workInProgress.mode & ProfileMode) !== NoMode &&
  13675. transferActualDuration(workInProgress),
  13676. workInProgress
  13677. );
  13678. renderLanes = null !== newProps;
  13679. current = null !== current && null !== current.memoizedState;
  13680. renderLanes &&
  13681. ((newProps = workInProgress.child),
  13682. (type = null),
  13683. null !== newProps.alternate &&
  13684. null !== newProps.alternate.memoizedState &&
  13685. null !== newProps.alternate.memoizedState.cachePool &&
  13686. (type = newProps.alternate.memoizedState.cachePool.pool),
  13687. (nextResource = null),
  13688. null !== newProps.memoizedState &&
  13689. null !== newProps.memoizedState.cachePool &&
  13690. (nextResource = newProps.memoizedState.cachePool.pool),
  13691. nextResource !== type && (newProps.flags |= 2048));
  13692. renderLanes !== current &&
  13693. renderLanes &&
  13694. (workInProgress.child.flags |= 8192);
  13695. scheduleRetryEffect(workInProgress, workInProgress.updateQueue);
  13696. bubbleProperties(workInProgress);
  13697. (workInProgress.mode & ProfileMode) !== NoMode &&
  13698. renderLanes &&
  13699. ((current = workInProgress.child),
  13700. null !== current &&
  13701. (workInProgress.treeBaseDuration -= current.treeBaseDuration));
  13702. return null;
  13703. case 4:
  13704. return (
  13705. popHostContainer(workInProgress),
  13706. null === current &&
  13707. listenToAllSupportedEvents(
  13708. workInProgress.stateNode.containerInfo
  13709. ),
  13710. bubbleProperties(workInProgress),
  13711. null
  13712. );
  13713. case 10:
  13714. return (
  13715. popProvider(workInProgress.type, workInProgress),
  13716. bubbleProperties(workInProgress),
  13717. null
  13718. );
  13719. case 19:
  13720. pop(suspenseStackCursor, workInProgress);
  13721. newProps = workInProgress.memoizedState;
  13722. if (null === newProps) return bubbleProperties(workInProgress), null;
  13723. type = 0 !== (workInProgress.flags & 128);
  13724. nextResource = newProps.rendering;
  13725. if (null === nextResource)
  13726. if (type) cutOffTailIfNeeded(newProps, false);
  13727. else {
  13728. if (
  13729. workInProgressRootExitStatus !== RootInProgress ||
  13730. (null !== current && 0 !== (current.flags & 128))
  13731. )
  13732. for (current = workInProgress.child; null !== current; ) {
  13733. nextResource = findFirstSuspended(current);
  13734. if (null !== nextResource) {
  13735. workInProgress.flags |= 128;
  13736. cutOffTailIfNeeded(newProps, false);
  13737. current = nextResource.updateQueue;
  13738. workInProgress.updateQueue = current;
  13739. scheduleRetryEffect(workInProgress, current);
  13740. workInProgress.subtreeFlags = 0;
  13741. current = renderLanes;
  13742. for (
  13743. renderLanes = workInProgress.child;
  13744. null !== renderLanes;
  13745. )
  13746. resetWorkInProgress(renderLanes, current),
  13747. (renderLanes = renderLanes.sibling);
  13748. push(
  13749. suspenseStackCursor,
  13750. (suspenseStackCursor.current &
  13751. SubtreeSuspenseContextMask) |
  13752. ForceSuspenseFallback,
  13753. workInProgress
  13754. );
  13755. isHydrating &&
  13756. pushTreeFork(workInProgress, newProps.treeForkCount);
  13757. return workInProgress.child;
  13758. }
  13759. current = current.sibling;
  13760. }
  13761. null !== newProps.tail &&
  13762. now$1() > workInProgressRootRenderTargetTime &&
  13763. ((workInProgress.flags |= 128),
  13764. (type = true),
  13765. cutOffTailIfNeeded(newProps, false),
  13766. (workInProgress.lanes = 4194304));
  13767. }
  13768. else {
  13769. if (!type)
  13770. if (
  13771. ((current = findFirstSuspended(nextResource)), null !== current)
  13772. ) {
  13773. if (
  13774. ((workInProgress.flags |= 128),
  13775. (type = true),
  13776. (current = current.updateQueue),
  13777. (workInProgress.updateQueue = current),
  13778. scheduleRetryEffect(workInProgress, current),
  13779. cutOffTailIfNeeded(newProps, true),
  13780. null === newProps.tail &&
  13781. "hidden" === newProps.tailMode &&
  13782. !nextResource.alternate &&
  13783. !isHydrating)
  13784. )
  13785. return bubbleProperties(workInProgress), null;
  13786. } else
  13787. 2 * now$1() - newProps.renderingStartTime >
  13788. workInProgressRootRenderTargetTime &&
  13789. 536870912 !== renderLanes &&
  13790. ((workInProgress.flags |= 128),
  13791. (type = true),
  13792. cutOffTailIfNeeded(newProps, false),
  13793. (workInProgress.lanes = 4194304));
  13794. newProps.isBackwards
  13795. ? ((nextResource.sibling = workInProgress.child),
  13796. (workInProgress.child = nextResource))
  13797. : ((current = newProps.last),
  13798. null !== current
  13799. ? (current.sibling = nextResource)
  13800. : (workInProgress.child = nextResource),
  13801. (newProps.last = nextResource));
  13802. }
  13803. if (null !== newProps.tail)
  13804. return (
  13805. (current = newProps.tail),
  13806. (newProps.rendering = current),
  13807. (newProps.tail = current.sibling),
  13808. (newProps.renderingStartTime = now$1()),
  13809. (current.sibling = null),
  13810. (renderLanes = suspenseStackCursor.current),
  13811. (renderLanes = type
  13812. ? (renderLanes & SubtreeSuspenseContextMask) |
  13813. ForceSuspenseFallback
  13814. : renderLanes & SubtreeSuspenseContextMask),
  13815. push(suspenseStackCursor, renderLanes, workInProgress),
  13816. isHydrating &&
  13817. pushTreeFork(workInProgress, newProps.treeForkCount),
  13818. current
  13819. );
  13820. bubbleProperties(workInProgress);
  13821. return null;
  13822. case 22:
  13823. case 23:
  13824. return (
  13825. popSuspenseHandler(workInProgress),
  13826. popHiddenContext(workInProgress),
  13827. (newProps = null !== workInProgress.memoizedState),
  13828. null !== current
  13829. ? (null !== current.memoizedState) !== newProps &&
  13830. (workInProgress.flags |= 8192)
  13831. : newProps && (workInProgress.flags |= 8192),
  13832. newProps
  13833. ? 0 !== (renderLanes & 536870912) &&
  13834. 0 === (workInProgress.flags & 128) &&
  13835. (bubbleProperties(workInProgress),
  13836. workInProgress.subtreeFlags & 6 &&
  13837. (workInProgress.flags |= 8192))
  13838. : bubbleProperties(workInProgress),
  13839. (renderLanes = workInProgress.updateQueue),
  13840. null !== renderLanes &&
  13841. scheduleRetryEffect(workInProgress, renderLanes.retryQueue),
  13842. (renderLanes = null),
  13843. null !== current &&
  13844. null !== current.memoizedState &&
  13845. null !== current.memoizedState.cachePool &&
  13846. (renderLanes = current.memoizedState.cachePool.pool),
  13847. (newProps = null),
  13848. null !== workInProgress.memoizedState &&
  13849. null !== workInProgress.memoizedState.cachePool &&
  13850. (newProps = workInProgress.memoizedState.cachePool.pool),
  13851. newProps !== renderLanes && (workInProgress.flags |= 2048),
  13852. null !== current && pop(resumedCache, workInProgress),
  13853. null
  13854. );
  13855. case 24:
  13856. return (
  13857. (renderLanes = null),
  13858. null !== current && (renderLanes = current.memoizedState.cache),
  13859. workInProgress.memoizedState.cache !== renderLanes &&
  13860. (workInProgress.flags |= 2048),
  13861. popProvider(CacheContext, workInProgress),
  13862. bubbleProperties(workInProgress),
  13863. null
  13864. );
  13865. case 25:
  13866. return null;
  13867. case 30:
  13868. return null;
  13869. }
  13870. throw Error(
  13871. "Unknown unit of work tag (" +
  13872. workInProgress.tag +
  13873. "). This error is likely caused by a bug in React. Please file an issue."
  13874. );
  13875. }
  13876. function unwindWork(current, workInProgress) {
  13877. popTreeContext(workInProgress);
  13878. switch (workInProgress.tag) {
  13879. case 1:
  13880. return (
  13881. (current = workInProgress.flags),
  13882. current & 65536
  13883. ? ((workInProgress.flags = (current & -65537) | 128),
  13884. (workInProgress.mode & ProfileMode) !== NoMode &&
  13885. transferActualDuration(workInProgress),
  13886. workInProgress)
  13887. : null
  13888. );
  13889. case 3:
  13890. return (
  13891. popProvider(CacheContext, workInProgress),
  13892. popHostContainer(workInProgress),
  13893. (current = workInProgress.flags),
  13894. 0 !== (current & 65536) && 0 === (current & 128)
  13895. ? ((workInProgress.flags = (current & -65537) | 128),
  13896. workInProgress)
  13897. : null
  13898. );
  13899. case 26:
  13900. case 27:
  13901. case 5:
  13902. return popHostContext(workInProgress), null;
  13903. case 31:
  13904. if (null !== workInProgress.memoizedState) {
  13905. popSuspenseHandler(workInProgress);
  13906. if (null === workInProgress.alternate)
  13907. throw Error(
  13908. "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
  13909. );
  13910. resetHydrationState();
  13911. }
  13912. current = workInProgress.flags;
  13913. return current & 65536
  13914. ? ((workInProgress.flags = (current & -65537) | 128),
  13915. (workInProgress.mode & ProfileMode) !== NoMode &&
  13916. transferActualDuration(workInProgress),
  13917. workInProgress)
  13918. : null;
  13919. case 13:
  13920. popSuspenseHandler(workInProgress);
  13921. current = workInProgress.memoizedState;
  13922. if (null !== current && null !== current.dehydrated) {
  13923. if (null === workInProgress.alternate)
  13924. throw Error(
  13925. "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
  13926. );
  13927. resetHydrationState();
  13928. }
  13929. current = workInProgress.flags;
  13930. return current & 65536
  13931. ? ((workInProgress.flags = (current & -65537) | 128),
  13932. (workInProgress.mode & ProfileMode) !== NoMode &&
  13933. transferActualDuration(workInProgress),
  13934. workInProgress)
  13935. : null;
  13936. case 19:
  13937. return pop(suspenseStackCursor, workInProgress), null;
  13938. case 4:
  13939. return popHostContainer(workInProgress), null;
  13940. case 10:
  13941. return popProvider(workInProgress.type, workInProgress), null;
  13942. case 22:
  13943. case 23:
  13944. return (
  13945. popSuspenseHandler(workInProgress),
  13946. popHiddenContext(workInProgress),
  13947. null !== current && pop(resumedCache, workInProgress),
  13948. (current = workInProgress.flags),
  13949. current & 65536
  13950. ? ((workInProgress.flags = (current & -65537) | 128),
  13951. (workInProgress.mode & ProfileMode) !== NoMode &&
  13952. transferActualDuration(workInProgress),
  13953. workInProgress)
  13954. : null
  13955. );
  13956. case 24:
  13957. return popProvider(CacheContext, workInProgress), null;
  13958. case 25:
  13959. return null;
  13960. default:
  13961. return null;
  13962. }
  13963. }
  13964. function unwindInterruptedWork(current, interruptedWork) {
  13965. popTreeContext(interruptedWork);
  13966. switch (interruptedWork.tag) {
  13967. case 3:
  13968. popProvider(CacheContext, interruptedWork);
  13969. popHostContainer(interruptedWork);
  13970. break;
  13971. case 26:
  13972. case 27:
  13973. case 5:
  13974. popHostContext(interruptedWork);
  13975. break;
  13976. case 4:
  13977. popHostContainer(interruptedWork);
  13978. break;
  13979. case 31:
  13980. null !== interruptedWork.memoizedState &&
  13981. popSuspenseHandler(interruptedWork);
  13982. break;
  13983. case 13:
  13984. popSuspenseHandler(interruptedWork);
  13985. break;
  13986. case 19:
  13987. pop(suspenseStackCursor, interruptedWork);
  13988. break;
  13989. case 10:
  13990. popProvider(interruptedWork.type, interruptedWork);
  13991. break;
  13992. case 22:
  13993. case 23:
  13994. popSuspenseHandler(interruptedWork);
  13995. popHiddenContext(interruptedWork);
  13996. null !== current && pop(resumedCache, interruptedWork);
  13997. break;
  13998. case 24:
  13999. popProvider(CacheContext, interruptedWork);
  14000. }
  14001. }
  14002. function shouldProfile(current) {
  14003. return (current.mode & ProfileMode) !== NoMode;
  14004. }
  14005. function commitHookLayoutEffects(finishedWork, hookFlags) {
  14006. shouldProfile(finishedWork)
  14007. ? (startEffectTimer(),
  14008. commitHookEffectListMount(hookFlags, finishedWork),
  14009. recordEffectDuration())
  14010. : commitHookEffectListMount(hookFlags, finishedWork);
  14011. }
  14012. function commitHookLayoutUnmountEffects(
  14013. finishedWork,
  14014. nearestMountedAncestor,
  14015. hookFlags
  14016. ) {
  14017. shouldProfile(finishedWork)
  14018. ? (startEffectTimer(),
  14019. commitHookEffectListUnmount(
  14020. hookFlags,
  14021. finishedWork,
  14022. nearestMountedAncestor
  14023. ),
  14024. recordEffectDuration())
  14025. : commitHookEffectListUnmount(
  14026. hookFlags,
  14027. finishedWork,
  14028. nearestMountedAncestor
  14029. );
  14030. }
  14031. function commitHookEffectListMount(flags, finishedWork) {
  14032. try {
  14033. var updateQueue = finishedWork.updateQueue,
  14034. lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
  14035. if (null !== lastEffect) {
  14036. var firstEffect = lastEffect.next;
  14037. updateQueue = firstEffect;
  14038. do {
  14039. if (
  14040. (updateQueue.tag & flags) === flags &&
  14041. ((lastEffect = void 0),
  14042. (flags & Insertion) !== NoFlags &&
  14043. (isRunningInsertionEffect = !0),
  14044. (lastEffect = runWithFiberInDEV(
  14045. finishedWork,
  14046. callCreateInDEV,
  14047. updateQueue
  14048. )),
  14049. (flags & Insertion) !== NoFlags &&
  14050. (isRunningInsertionEffect = !1),
  14051. void 0 !== lastEffect && "function" !== typeof lastEffect)
  14052. ) {
  14053. var hookName = void 0;
  14054. hookName =
  14055. 0 !== (updateQueue.tag & Layout)
  14056. ? "useLayoutEffect"
  14057. : 0 !== (updateQueue.tag & Insertion)
  14058. ? "useInsertionEffect"
  14059. : "useEffect";
  14060. var addendum = void 0;
  14061. addendum =
  14062. null === lastEffect
  14063. ? " You returned null. If your effect does not require clean up, return undefined (or nothing)."
  14064. : "function" === typeof lastEffect.then
  14065. ? "\n\nIt looks like you wrote " +
  14066. hookName +
  14067. "(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n" +
  14068. hookName +
  14069. "(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching"
  14070. : " You returned: " + lastEffect;
  14071. runWithFiberInDEV(
  14072. finishedWork,
  14073. function (n, a) {
  14074. console.error(
  14075. "%s must not return anything besides a function, which is used for clean-up.%s",
  14076. n,
  14077. a
  14078. );
  14079. },
  14080. hookName,
  14081. addendum
  14082. );
  14083. }
  14084. updateQueue = updateQueue.next;
  14085. } while (updateQueue !== firstEffect);
  14086. }
  14087. } catch (error) {
  14088. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  14089. }
  14090. }
  14091. function commitHookEffectListUnmount(
  14092. flags,
  14093. finishedWork,
  14094. nearestMountedAncestor
  14095. ) {
  14096. try {
  14097. var updateQueue = finishedWork.updateQueue,
  14098. lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
  14099. if (null !== lastEffect) {
  14100. var firstEffect = lastEffect.next;
  14101. updateQueue = firstEffect;
  14102. do {
  14103. if ((updateQueue.tag & flags) === flags) {
  14104. var inst = updateQueue.inst,
  14105. destroy = inst.destroy;
  14106. void 0 !== destroy &&
  14107. ((inst.destroy = void 0),
  14108. (flags & Insertion) !== NoFlags &&
  14109. (isRunningInsertionEffect = !0),
  14110. (lastEffect = finishedWork),
  14111. runWithFiberInDEV(
  14112. lastEffect,
  14113. callDestroyInDEV,
  14114. lastEffect,
  14115. nearestMountedAncestor,
  14116. destroy
  14117. ),
  14118. (flags & Insertion) !== NoFlags &&
  14119. (isRunningInsertionEffect = !1));
  14120. }
  14121. updateQueue = updateQueue.next;
  14122. } while (updateQueue !== firstEffect);
  14123. }
  14124. } catch (error) {
  14125. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  14126. }
  14127. }
  14128. function commitHookPassiveMountEffects(finishedWork, hookFlags) {
  14129. shouldProfile(finishedWork)
  14130. ? (startEffectTimer(),
  14131. commitHookEffectListMount(hookFlags, finishedWork),
  14132. recordEffectDuration())
  14133. : commitHookEffectListMount(hookFlags, finishedWork);
  14134. }
  14135. function commitHookPassiveUnmountEffects(
  14136. finishedWork,
  14137. nearestMountedAncestor,
  14138. hookFlags
  14139. ) {
  14140. shouldProfile(finishedWork)
  14141. ? (startEffectTimer(),
  14142. commitHookEffectListUnmount(
  14143. hookFlags,
  14144. finishedWork,
  14145. nearestMountedAncestor
  14146. ),
  14147. recordEffectDuration())
  14148. : commitHookEffectListUnmount(
  14149. hookFlags,
  14150. finishedWork,
  14151. nearestMountedAncestor
  14152. );
  14153. }
  14154. function commitClassCallbacks(finishedWork) {
  14155. var updateQueue = finishedWork.updateQueue;
  14156. if (null !== updateQueue) {
  14157. var instance = finishedWork.stateNode;
  14158. finishedWork.type.defaultProps ||
  14159. "ref" in finishedWork.memoizedProps ||
  14160. didWarnAboutReassigningProps ||
  14161. (instance.props !== finishedWork.memoizedProps &&
  14162. console.error(
  14163. "Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
  14164. getComponentNameFromFiber(finishedWork) || "instance"
  14165. ),
  14166. instance.state !== finishedWork.memoizedState &&
  14167. console.error(
  14168. "Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
  14169. getComponentNameFromFiber(finishedWork) || "instance"
  14170. ));
  14171. try {
  14172. runWithFiberInDEV(
  14173. finishedWork,
  14174. commitCallbacks,
  14175. updateQueue,
  14176. instance
  14177. );
  14178. } catch (error) {
  14179. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  14180. }
  14181. }
  14182. }
  14183. function callGetSnapshotBeforeUpdates(instance, prevProps, prevState) {
  14184. return instance.getSnapshotBeforeUpdate(prevProps, prevState);
  14185. }
  14186. function commitClassSnapshot(finishedWork, current) {
  14187. var prevProps = current.memoizedProps,
  14188. prevState = current.memoizedState;
  14189. current = finishedWork.stateNode;
  14190. finishedWork.type.defaultProps ||
  14191. "ref" in finishedWork.memoizedProps ||
  14192. didWarnAboutReassigningProps ||
  14193. (current.props !== finishedWork.memoizedProps &&
  14194. console.error(
  14195. "Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
  14196. getComponentNameFromFiber(finishedWork) || "instance"
  14197. ),
  14198. current.state !== finishedWork.memoizedState &&
  14199. console.error(
  14200. "Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
  14201. getComponentNameFromFiber(finishedWork) || "instance"
  14202. ));
  14203. try {
  14204. var resolvedPrevProps = resolveClassComponentProps(
  14205. finishedWork.type,
  14206. prevProps
  14207. );
  14208. var snapshot = runWithFiberInDEV(
  14209. finishedWork,
  14210. callGetSnapshotBeforeUpdates,
  14211. current,
  14212. resolvedPrevProps,
  14213. prevState
  14214. );
  14215. prevProps = didWarnAboutUndefinedSnapshotBeforeUpdate;
  14216. void 0 !== snapshot ||
  14217. prevProps.has(finishedWork.type) ||
  14218. (prevProps.add(finishedWork.type),
  14219. runWithFiberInDEV(finishedWork, function () {
  14220. console.error(
  14221. "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",
  14222. getComponentNameFromFiber(finishedWork)
  14223. );
  14224. }));
  14225. current.__reactInternalSnapshotBeforeUpdate = snapshot;
  14226. } catch (error) {
  14227. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  14228. }
  14229. }
  14230. function safelyCallComponentWillUnmount(
  14231. current,
  14232. nearestMountedAncestor,
  14233. instance
  14234. ) {
  14235. instance.props = resolveClassComponentProps(
  14236. current.type,
  14237. current.memoizedProps
  14238. );
  14239. instance.state = current.memoizedState;
  14240. shouldProfile(current)
  14241. ? (startEffectTimer(),
  14242. runWithFiberInDEV(
  14243. current,
  14244. callComponentWillUnmountInDEV,
  14245. current,
  14246. nearestMountedAncestor,
  14247. instance
  14248. ),
  14249. recordEffectDuration())
  14250. : runWithFiberInDEV(
  14251. current,
  14252. callComponentWillUnmountInDEV,
  14253. current,
  14254. nearestMountedAncestor,
  14255. instance
  14256. );
  14257. }
  14258. function commitAttachRef(finishedWork) {
  14259. var ref = finishedWork.ref;
  14260. if (null !== ref) {
  14261. switch (finishedWork.tag) {
  14262. case 26:
  14263. case 27:
  14264. case 5:
  14265. var instanceToUse = finishedWork.stateNode;
  14266. break;
  14267. case 30:
  14268. instanceToUse = finishedWork.stateNode;
  14269. break;
  14270. default:
  14271. instanceToUse = finishedWork.stateNode;
  14272. }
  14273. if ("function" === typeof ref)
  14274. if (shouldProfile(finishedWork))
  14275. try {
  14276. startEffectTimer(),
  14277. (finishedWork.refCleanup = ref(instanceToUse));
  14278. } finally {
  14279. recordEffectDuration();
  14280. }
  14281. else finishedWork.refCleanup = ref(instanceToUse);
  14282. else
  14283. "string" === typeof ref
  14284. ? console.error("String refs are no longer supported.")
  14285. : ref.hasOwnProperty("current") ||
  14286. console.error(
  14287. "Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",
  14288. getComponentNameFromFiber(finishedWork)
  14289. ),
  14290. (ref.current = instanceToUse);
  14291. }
  14292. }
  14293. function safelyAttachRef(current, nearestMountedAncestor) {
  14294. try {
  14295. runWithFiberInDEV(current, commitAttachRef, current);
  14296. } catch (error) {
  14297. captureCommitPhaseError(current, nearestMountedAncestor, error);
  14298. }
  14299. }
  14300. function safelyDetachRef(current, nearestMountedAncestor) {
  14301. var ref = current.ref,
  14302. refCleanup = current.refCleanup;
  14303. if (null !== ref)
  14304. if ("function" === typeof refCleanup)
  14305. try {
  14306. if (shouldProfile(current))
  14307. try {
  14308. startEffectTimer(), runWithFiberInDEV(current, refCleanup);
  14309. } finally {
  14310. recordEffectDuration(current);
  14311. }
  14312. else runWithFiberInDEV(current, refCleanup);
  14313. } catch (error) {
  14314. captureCommitPhaseError(current, nearestMountedAncestor, error);
  14315. } finally {
  14316. (current.refCleanup = null),
  14317. (current = current.alternate),
  14318. null != current && (current.refCleanup = null);
  14319. }
  14320. else if ("function" === typeof ref)
  14321. try {
  14322. if (shouldProfile(current))
  14323. try {
  14324. startEffectTimer(), runWithFiberInDEV(current, ref, null);
  14325. } finally {
  14326. recordEffectDuration(current);
  14327. }
  14328. else runWithFiberInDEV(current, ref, null);
  14329. } catch (error$7) {
  14330. captureCommitPhaseError(current, nearestMountedAncestor, error$7);
  14331. }
  14332. else ref.current = null;
  14333. }
  14334. function commitProfiler(
  14335. finishedWork,
  14336. current,
  14337. commitStartTime,
  14338. effectDuration
  14339. ) {
  14340. var _finishedWork$memoize = finishedWork.memoizedProps,
  14341. id = _finishedWork$memoize.id,
  14342. onCommit = _finishedWork$memoize.onCommit;
  14343. _finishedWork$memoize = _finishedWork$memoize.onRender;
  14344. current = null === current ? "mount" : "update";
  14345. currentUpdateIsNested && (current = "nested-update");
  14346. "function" === typeof _finishedWork$memoize &&
  14347. _finishedWork$memoize(
  14348. id,
  14349. current,
  14350. finishedWork.actualDuration,
  14351. finishedWork.treeBaseDuration,
  14352. finishedWork.actualStartTime,
  14353. commitStartTime
  14354. );
  14355. "function" === typeof onCommit &&
  14356. onCommit(id, current, effectDuration, commitStartTime);
  14357. }
  14358. function commitProfilerPostCommitImpl(
  14359. finishedWork,
  14360. current,
  14361. commitStartTime,
  14362. passiveEffectDuration
  14363. ) {
  14364. var _finishedWork$memoize2 = finishedWork.memoizedProps;
  14365. finishedWork = _finishedWork$memoize2.id;
  14366. _finishedWork$memoize2 = _finishedWork$memoize2.onPostCommit;
  14367. current = null === current ? "mount" : "update";
  14368. currentUpdateIsNested && (current = "nested-update");
  14369. "function" === typeof _finishedWork$memoize2 &&
  14370. _finishedWork$memoize2(
  14371. finishedWork,
  14372. current,
  14373. passiveEffectDuration,
  14374. commitStartTime
  14375. );
  14376. }
  14377. function commitHostMount(finishedWork) {
  14378. var type = finishedWork.type,
  14379. props = finishedWork.memoizedProps,
  14380. instance = finishedWork.stateNode;
  14381. try {
  14382. runWithFiberInDEV(
  14383. finishedWork,
  14384. commitMount,
  14385. instance,
  14386. type,
  14387. props,
  14388. finishedWork
  14389. );
  14390. } catch (error) {
  14391. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  14392. }
  14393. }
  14394. function commitHostUpdate(finishedWork, newProps, oldProps) {
  14395. try {
  14396. runWithFiberInDEV(
  14397. finishedWork,
  14398. commitUpdate,
  14399. finishedWork.stateNode,
  14400. finishedWork.type,
  14401. oldProps,
  14402. newProps,
  14403. finishedWork
  14404. );
  14405. } catch (error) {
  14406. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  14407. }
  14408. }
  14409. function isHostParent(fiber) {
  14410. return (
  14411. 5 === fiber.tag ||
  14412. 3 === fiber.tag ||
  14413. 26 === fiber.tag ||
  14414. (27 === fiber.tag && isSingletonScope(fiber.type)) ||
  14415. 4 === fiber.tag
  14416. );
  14417. }
  14418. function getHostSibling(fiber) {
  14419. a: for (;;) {
  14420. for (; null === fiber.sibling; ) {
  14421. if (null === fiber.return || isHostParent(fiber.return)) return null;
  14422. fiber = fiber.return;
  14423. }
  14424. fiber.sibling.return = fiber.return;
  14425. for (
  14426. fiber = fiber.sibling;
  14427. 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag;
  14428. ) {
  14429. if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;
  14430. if (fiber.flags & 2) continue a;
  14431. if (null === fiber.child || 4 === fiber.tag) continue a;
  14432. else (fiber.child.return = fiber), (fiber = fiber.child);
  14433. }
  14434. if (!(fiber.flags & 2)) return fiber.stateNode;
  14435. }
  14436. }
  14437. function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
  14438. var tag = node.tag;
  14439. if (5 === tag || 6 === tag)
  14440. (node = node.stateNode),
  14441. before
  14442. ? (warnForReactChildrenConflict(parent),
  14443. (9 === parent.nodeType
  14444. ? parent.body
  14445. : "HTML" === parent.nodeName
  14446. ? parent.ownerDocument.body
  14447. : parent
  14448. ).insertBefore(node, before))
  14449. : (warnForReactChildrenConflict(parent),
  14450. (before =
  14451. 9 === parent.nodeType
  14452. ? parent.body
  14453. : "HTML" === parent.nodeName
  14454. ? parent.ownerDocument.body
  14455. : parent),
  14456. before.appendChild(node),
  14457. (parent = parent._reactRootContainer),
  14458. (null !== parent && void 0 !== parent) ||
  14459. null !== before.onclick ||
  14460. (before.onclick = noop$1));
  14461. else if (
  14462. 4 !== tag &&
  14463. (27 === tag &&
  14464. isSingletonScope(node.type) &&
  14465. ((parent = node.stateNode), (before = null)),
  14466. (node = node.child),
  14467. null !== node)
  14468. )
  14469. for (
  14470. insertOrAppendPlacementNodeIntoContainer(node, before, parent),
  14471. node = node.sibling;
  14472. null !== node;
  14473. )
  14474. insertOrAppendPlacementNodeIntoContainer(node, before, parent),
  14475. (node = node.sibling);
  14476. }
  14477. function insertOrAppendPlacementNode(node, before, parent) {
  14478. var tag = node.tag;
  14479. if (5 === tag || 6 === tag)
  14480. (node = node.stateNode),
  14481. before ? parent.insertBefore(node, before) : parent.appendChild(node);
  14482. else if (
  14483. 4 !== tag &&
  14484. (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode),
  14485. (node = node.child),
  14486. null !== node)
  14487. )
  14488. for (
  14489. insertOrAppendPlacementNode(node, before, parent),
  14490. node = node.sibling;
  14491. null !== node;
  14492. )
  14493. insertOrAppendPlacementNode(node, before, parent),
  14494. (node = node.sibling);
  14495. }
  14496. function commitPlacement(finishedWork) {
  14497. for (
  14498. var hostParentFiber, parentFiber = finishedWork.return;
  14499. null !== parentFiber;
  14500. ) {
  14501. if (isHostParent(parentFiber)) {
  14502. hostParentFiber = parentFiber;
  14503. break;
  14504. }
  14505. parentFiber = parentFiber.return;
  14506. }
  14507. if (null == hostParentFiber)
  14508. throw Error(
  14509. "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
  14510. );
  14511. switch (hostParentFiber.tag) {
  14512. case 27:
  14513. hostParentFiber = hostParentFiber.stateNode;
  14514. parentFiber = getHostSibling(finishedWork);
  14515. insertOrAppendPlacementNode(
  14516. finishedWork,
  14517. parentFiber,
  14518. hostParentFiber
  14519. );
  14520. break;
  14521. case 5:
  14522. parentFiber = hostParentFiber.stateNode;
  14523. hostParentFiber.flags & 32 &&
  14524. (resetTextContent(parentFiber), (hostParentFiber.flags &= -33));
  14525. hostParentFiber = getHostSibling(finishedWork);
  14526. insertOrAppendPlacementNode(
  14527. finishedWork,
  14528. hostParentFiber,
  14529. parentFiber
  14530. );
  14531. break;
  14532. case 3:
  14533. case 4:
  14534. hostParentFiber = hostParentFiber.stateNode.containerInfo;
  14535. parentFiber = getHostSibling(finishedWork);
  14536. insertOrAppendPlacementNodeIntoContainer(
  14537. finishedWork,
  14538. parentFiber,
  14539. hostParentFiber
  14540. );
  14541. break;
  14542. default:
  14543. throw Error(
  14544. "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
  14545. );
  14546. }
  14547. }
  14548. function commitHostSingletonAcquisition(finishedWork) {
  14549. var singleton = finishedWork.stateNode,
  14550. props = finishedWork.memoizedProps;
  14551. try {
  14552. runWithFiberInDEV(
  14553. finishedWork,
  14554. acquireSingletonInstance,
  14555. finishedWork.type,
  14556. props,
  14557. singleton,
  14558. finishedWork
  14559. );
  14560. } catch (error) {
  14561. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  14562. }
  14563. }
  14564. function isHydratingParent(current, finishedWork) {
  14565. return 31 === finishedWork.tag
  14566. ? ((finishedWork = finishedWork.memoizedState),
  14567. null !== current.memoizedState && null === finishedWork)
  14568. : 13 === finishedWork.tag
  14569. ? ((current = current.memoizedState),
  14570. (finishedWork = finishedWork.memoizedState),
  14571. null !== current &&
  14572. null !== current.dehydrated &&
  14573. (null === finishedWork || null === finishedWork.dehydrated))
  14574. : 3 === finishedWork.tag
  14575. ? current.memoizedState.isDehydrated &&
  14576. 0 === (finishedWork.flags & 256)
  14577. : false;
  14578. }
  14579. function commitBeforeMutationEffects(root, firstChild) {
  14580. root = root.containerInfo;
  14581. eventsEnabled = _enabled;
  14582. root = getActiveElementDeep(root);
  14583. if (hasSelectionCapabilities(root)) {
  14584. if ("selectionStart" in root)
  14585. var JSCompiler_temp = {
  14586. start: root.selectionStart,
  14587. end: root.selectionEnd
  14588. };
  14589. else
  14590. a: {
  14591. JSCompiler_temp =
  14592. ((JSCompiler_temp = root.ownerDocument) &&
  14593. JSCompiler_temp.defaultView) ||
  14594. window;
  14595. var selection =
  14596. JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
  14597. if (selection && 0 !== selection.rangeCount) {
  14598. JSCompiler_temp = selection.anchorNode;
  14599. var anchorOffset = selection.anchorOffset,
  14600. focusNode = selection.focusNode;
  14601. selection = selection.focusOffset;
  14602. try {
  14603. JSCompiler_temp.nodeType, focusNode.nodeType;
  14604. } catch (e$2) {
  14605. JSCompiler_temp = null;
  14606. break a;
  14607. }
  14608. var length = 0,
  14609. start = -1,
  14610. end = -1,
  14611. indexWithinAnchor = 0,
  14612. indexWithinFocus = 0,
  14613. node = root,
  14614. parentNode = null;
  14615. b: for (;;) {
  14616. for (var next; ; ) {
  14617. node !== JSCompiler_temp ||
  14618. (0 !== anchorOffset && 3 !== node.nodeType) ||
  14619. (start = length + anchorOffset);
  14620. node !== focusNode ||
  14621. (0 !== selection && 3 !== node.nodeType) ||
  14622. (end = length + selection);
  14623. 3 === node.nodeType && (length += node.nodeValue.length);
  14624. if (null === (next = node.firstChild)) break;
  14625. parentNode = node;
  14626. node = next;
  14627. }
  14628. for (;;) {
  14629. if (node === root) break b;
  14630. parentNode === JSCompiler_temp &&
  14631. ++indexWithinAnchor === anchorOffset &&
  14632. (start = length);
  14633. parentNode === focusNode &&
  14634. ++indexWithinFocus === selection &&
  14635. (end = length);
  14636. if (null !== (next = node.nextSibling)) break;
  14637. node = parentNode;
  14638. parentNode = node.parentNode;
  14639. }
  14640. node = next;
  14641. }
  14642. JSCompiler_temp =
  14643. -1 === start || -1 === end ? null : { start: start, end: end };
  14644. } else JSCompiler_temp = null;
  14645. }
  14646. JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
  14647. } else JSCompiler_temp = null;
  14648. selectionInformation = {
  14649. focusedElem: root,
  14650. selectionRange: JSCompiler_temp
  14651. };
  14652. _enabled = false;
  14653. for (nextEffect = firstChild; null !== nextEffect; )
  14654. if (
  14655. ((firstChild = nextEffect),
  14656. (root = firstChild.child),
  14657. 0 !== (firstChild.subtreeFlags & 1028) && null !== root)
  14658. )
  14659. (root.return = firstChild), (nextEffect = root);
  14660. else
  14661. for (; null !== nextEffect; ) {
  14662. root = firstChild = nextEffect;
  14663. JSCompiler_temp = root.alternate;
  14664. anchorOffset = root.flags;
  14665. switch (root.tag) {
  14666. case 0:
  14667. if (
  14668. 0 !== (anchorOffset & 4) &&
  14669. ((root = root.updateQueue),
  14670. (root = null !== root ? root.events : null),
  14671. null !== root)
  14672. )
  14673. for (
  14674. JSCompiler_temp = 0;
  14675. JSCompiler_temp < root.length;
  14676. JSCompiler_temp++
  14677. )
  14678. (anchorOffset = root[JSCompiler_temp]),
  14679. (anchorOffset.ref.impl = anchorOffset.nextImpl);
  14680. break;
  14681. case 11:
  14682. case 15:
  14683. break;
  14684. case 1:
  14685. 0 !== (anchorOffset & 1024) &&
  14686. null !== JSCompiler_temp &&
  14687. commitClassSnapshot(root, JSCompiler_temp);
  14688. break;
  14689. case 3:
  14690. if (0 !== (anchorOffset & 1024))
  14691. if (
  14692. ((root = root.stateNode.containerInfo),
  14693. (JSCompiler_temp = root.nodeType),
  14694. 9 === JSCompiler_temp)
  14695. )
  14696. clearContainerSparingly(root);
  14697. else if (1 === JSCompiler_temp)
  14698. switch (root.nodeName) {
  14699. case "HEAD":
  14700. case "HTML":
  14701. case "BODY":
  14702. clearContainerSparingly(root);
  14703. break;
  14704. default:
  14705. root.textContent = "";
  14706. }
  14707. break;
  14708. case 5:
  14709. case 26:
  14710. case 27:
  14711. case 6:
  14712. case 4:
  14713. case 17:
  14714. break;
  14715. default:
  14716. if (0 !== (anchorOffset & 1024))
  14717. throw Error(
  14718. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  14719. );
  14720. }
  14721. root = firstChild.sibling;
  14722. if (null !== root) {
  14723. root.return = firstChild.return;
  14724. nextEffect = root;
  14725. break;
  14726. }
  14727. nextEffect = firstChild.return;
  14728. }
  14729. }
  14730. function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
  14731. var prevEffectStart = pushComponentEffectStart(),
  14732. prevEffectDuration = pushComponentEffectDuration(),
  14733. prevEffectErrors = pushComponentEffectErrors(),
  14734. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),
  14735. flags = finishedWork.flags;
  14736. switch (finishedWork.tag) {
  14737. case 0:
  14738. case 11:
  14739. case 15:
  14740. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  14741. flags & 4 &&
  14742. commitHookLayoutEffects(finishedWork, Layout | HasEffect);
  14743. break;
  14744. case 1:
  14745. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  14746. if (flags & 4)
  14747. if (((finishedRoot = finishedWork.stateNode), null === current))
  14748. finishedWork.type.defaultProps ||
  14749. "ref" in finishedWork.memoizedProps ||
  14750. didWarnAboutReassigningProps ||
  14751. (finishedRoot.props !== finishedWork.memoizedProps &&
  14752. console.error(
  14753. "Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
  14754. getComponentNameFromFiber(finishedWork) || "instance"
  14755. ),
  14756. finishedRoot.state !== finishedWork.memoizedState &&
  14757. console.error(
  14758. "Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
  14759. getComponentNameFromFiber(finishedWork) || "instance"
  14760. )),
  14761. shouldProfile(finishedWork)
  14762. ? (startEffectTimer(),
  14763. runWithFiberInDEV(
  14764. finishedWork,
  14765. callComponentDidMountInDEV,
  14766. finishedWork,
  14767. finishedRoot
  14768. ),
  14769. recordEffectDuration())
  14770. : runWithFiberInDEV(
  14771. finishedWork,
  14772. callComponentDidMountInDEV,
  14773. finishedWork,
  14774. finishedRoot
  14775. );
  14776. else {
  14777. var prevProps = resolveClassComponentProps(
  14778. finishedWork.type,
  14779. current.memoizedProps
  14780. );
  14781. current = current.memoizedState;
  14782. finishedWork.type.defaultProps ||
  14783. "ref" in finishedWork.memoizedProps ||
  14784. didWarnAboutReassigningProps ||
  14785. (finishedRoot.props !== finishedWork.memoizedProps &&
  14786. console.error(
  14787. "Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",
  14788. getComponentNameFromFiber(finishedWork) || "instance"
  14789. ),
  14790. finishedRoot.state !== finishedWork.memoizedState &&
  14791. console.error(
  14792. "Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",
  14793. getComponentNameFromFiber(finishedWork) || "instance"
  14794. ));
  14795. shouldProfile(finishedWork)
  14796. ? (startEffectTimer(),
  14797. runWithFiberInDEV(
  14798. finishedWork,
  14799. callComponentDidUpdateInDEV,
  14800. finishedWork,
  14801. finishedRoot,
  14802. prevProps,
  14803. current,
  14804. finishedRoot.__reactInternalSnapshotBeforeUpdate
  14805. ),
  14806. recordEffectDuration())
  14807. : runWithFiberInDEV(
  14808. finishedWork,
  14809. callComponentDidUpdateInDEV,
  14810. finishedWork,
  14811. finishedRoot,
  14812. prevProps,
  14813. current,
  14814. finishedRoot.__reactInternalSnapshotBeforeUpdate
  14815. );
  14816. }
  14817. flags & 64 && commitClassCallbacks(finishedWork);
  14818. flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
  14819. break;
  14820. case 3:
  14821. current = pushNestedEffectDurations();
  14822. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  14823. if (
  14824. flags & 64 &&
  14825. ((flags = finishedWork.updateQueue), null !== flags)
  14826. ) {
  14827. prevProps = null;
  14828. if (null !== finishedWork.child)
  14829. switch (finishedWork.child.tag) {
  14830. case 27:
  14831. case 5:
  14832. prevProps = finishedWork.child.stateNode;
  14833. break;
  14834. case 1:
  14835. prevProps = finishedWork.child.stateNode;
  14836. }
  14837. try {
  14838. runWithFiberInDEV(
  14839. finishedWork,
  14840. commitCallbacks,
  14841. flags,
  14842. prevProps
  14843. );
  14844. } catch (error) {
  14845. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  14846. }
  14847. }
  14848. finishedRoot.effectDuration += popNestedEffectDurations(current);
  14849. break;
  14850. case 27:
  14851. null === current &&
  14852. flags & 4 &&
  14853. commitHostSingletonAcquisition(finishedWork);
  14854. case 26:
  14855. case 5:
  14856. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  14857. if (null === current)
  14858. if (flags & 4) commitHostMount(finishedWork);
  14859. else if (flags & 64) {
  14860. finishedRoot = finishedWork.type;
  14861. current = finishedWork.memoizedProps;
  14862. prevProps = finishedWork.stateNode;
  14863. try {
  14864. runWithFiberInDEV(
  14865. finishedWork,
  14866. commitHydratedInstance,
  14867. prevProps,
  14868. finishedRoot,
  14869. current,
  14870. finishedWork
  14871. );
  14872. } catch (error) {
  14873. captureCommitPhaseError(
  14874. finishedWork,
  14875. finishedWork.return,
  14876. error
  14877. );
  14878. }
  14879. }
  14880. flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
  14881. break;
  14882. case 12:
  14883. if (flags & 4) {
  14884. flags = pushNestedEffectDurations();
  14885. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  14886. finishedRoot = finishedWork.stateNode;
  14887. finishedRoot.effectDuration += bubbleNestedEffectDurations(flags);
  14888. try {
  14889. runWithFiberInDEV(
  14890. finishedWork,
  14891. commitProfiler,
  14892. finishedWork,
  14893. current,
  14894. commitStartTime,
  14895. finishedRoot.effectDuration
  14896. );
  14897. } catch (error) {
  14898. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  14899. }
  14900. } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  14901. break;
  14902. case 31:
  14903. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  14904. flags & 4 &&
  14905. commitActivityHydrationCallbacks(finishedRoot, finishedWork);
  14906. break;
  14907. case 13:
  14908. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  14909. flags & 4 &&
  14910. commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
  14911. flags & 64 &&
  14912. ((finishedRoot = finishedWork.memoizedState),
  14913. null !== finishedRoot &&
  14914. ((finishedRoot = finishedRoot.dehydrated),
  14915. null !== finishedRoot &&
  14916. ((flags = retryDehydratedSuspenseBoundary.bind(
  14917. null,
  14918. finishedWork
  14919. )),
  14920. registerSuspenseInstanceRetry(finishedRoot, flags))));
  14921. break;
  14922. case 22:
  14923. flags =
  14924. null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
  14925. if (!flags) {
  14926. current =
  14927. (null !== current && null !== current.memoizedState) ||
  14928. offscreenSubtreeWasHidden;
  14929. prevProps = offscreenSubtreeIsHidden;
  14930. var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
  14931. offscreenSubtreeIsHidden = flags;
  14932. (offscreenSubtreeWasHidden = current) &&
  14933. !prevOffscreenSubtreeWasHidden
  14934. ? (recursivelyTraverseReappearLayoutEffects(
  14935. finishedRoot,
  14936. finishedWork,
  14937. 0 !== (finishedWork.subtreeFlags & 8772)
  14938. ),
  14939. (finishedWork.mode & ProfileMode) !== NoMode &&
  14940. 0 <= componentEffectStartTime &&
  14941. 0 <= componentEffectEndTime &&
  14942. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  14943. logComponentReappeared(
  14944. finishedWork,
  14945. componentEffectStartTime,
  14946. componentEffectEndTime
  14947. ))
  14948. : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  14949. offscreenSubtreeIsHidden = prevProps;
  14950. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
  14951. }
  14952. break;
  14953. case 30:
  14954. break;
  14955. default:
  14956. recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
  14957. }
  14958. (finishedWork.mode & ProfileMode) !== NoMode &&
  14959. 0 <= componentEffectStartTime &&
  14960. 0 <= componentEffectEndTime &&
  14961. ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  14962. logComponentEffect(
  14963. finishedWork,
  14964. componentEffectStartTime,
  14965. componentEffectEndTime,
  14966. componentEffectDuration,
  14967. componentEffectErrors
  14968. ),
  14969. null === finishedWork.alternate &&
  14970. null !== finishedWork.return &&
  14971. null !== finishedWork.return.alternate &&
  14972. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  14973. (isHydratingParent(
  14974. finishedWork.return.alternate,
  14975. finishedWork.return
  14976. ) ||
  14977. logComponentTrigger(
  14978. finishedWork,
  14979. componentEffectStartTime,
  14980. componentEffectEndTime,
  14981. "Mount"
  14982. )));
  14983. popComponentEffectStart(prevEffectStart);
  14984. popComponentEffectDuration(prevEffectDuration);
  14985. componentEffectErrors = prevEffectErrors;
  14986. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  14987. }
  14988. function detachFiberAfterEffects(fiber) {
  14989. var alternate = fiber.alternate;
  14990. null !== alternate &&
  14991. ((fiber.alternate = null), detachFiberAfterEffects(alternate));
  14992. fiber.child = null;
  14993. fiber.deletions = null;
  14994. fiber.sibling = null;
  14995. 5 === fiber.tag &&
  14996. ((alternate = fiber.stateNode),
  14997. null !== alternate && detachDeletedInstance(alternate));
  14998. fiber.stateNode = null;
  14999. fiber._debugOwner = null;
  15000. fiber.return = null;
  15001. fiber.dependencies = null;
  15002. fiber.memoizedProps = null;
  15003. fiber.memoizedState = null;
  15004. fiber.pendingProps = null;
  15005. fiber.stateNode = null;
  15006. fiber.updateQueue = null;
  15007. }
  15008. function recursivelyTraverseDeletionEffects(
  15009. finishedRoot,
  15010. nearestMountedAncestor,
  15011. parent
  15012. ) {
  15013. for (parent = parent.child; null !== parent; )
  15014. commitDeletionEffectsOnFiber(
  15015. finishedRoot,
  15016. nearestMountedAncestor,
  15017. parent
  15018. ),
  15019. (parent = parent.sibling);
  15020. }
  15021. function commitDeletionEffectsOnFiber(
  15022. finishedRoot,
  15023. nearestMountedAncestor,
  15024. deletedFiber
  15025. ) {
  15026. if (
  15027. injectedHook &&
  15028. "function" === typeof injectedHook.onCommitFiberUnmount
  15029. )
  15030. try {
  15031. injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
  15032. } catch (err) {
  15033. hasLoggedError ||
  15034. ((hasLoggedError = true),
  15035. console.error(
  15036. "React instrumentation encountered an error: %o",
  15037. err
  15038. ));
  15039. }
  15040. var prevEffectStart = pushComponentEffectStart(),
  15041. prevEffectDuration = pushComponentEffectDuration(),
  15042. prevEffectErrors = pushComponentEffectErrors(),
  15043. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  15044. switch (deletedFiber.tag) {
  15045. case 26:
  15046. offscreenSubtreeWasHidden ||
  15047. safelyDetachRef(deletedFiber, nearestMountedAncestor);
  15048. recursivelyTraverseDeletionEffects(
  15049. finishedRoot,
  15050. nearestMountedAncestor,
  15051. deletedFiber
  15052. );
  15053. deletedFiber.memoizedState
  15054. ? deletedFiber.memoizedState.count--
  15055. : deletedFiber.stateNode &&
  15056. ((finishedRoot = deletedFiber.stateNode),
  15057. finishedRoot.parentNode.removeChild(finishedRoot));
  15058. break;
  15059. case 27:
  15060. offscreenSubtreeWasHidden ||
  15061. safelyDetachRef(deletedFiber, nearestMountedAncestor);
  15062. var prevHostParent = hostParent,
  15063. prevHostParentIsContainer = hostParentIsContainer;
  15064. isSingletonScope(deletedFiber.type) &&
  15065. ((hostParent = deletedFiber.stateNode),
  15066. (hostParentIsContainer = false));
  15067. recursivelyTraverseDeletionEffects(
  15068. finishedRoot,
  15069. nearestMountedAncestor,
  15070. deletedFiber
  15071. );
  15072. runWithFiberInDEV(
  15073. deletedFiber,
  15074. releaseSingletonInstance,
  15075. deletedFiber.stateNode
  15076. );
  15077. hostParent = prevHostParent;
  15078. hostParentIsContainer = prevHostParentIsContainer;
  15079. break;
  15080. case 5:
  15081. offscreenSubtreeWasHidden ||
  15082. safelyDetachRef(deletedFiber, nearestMountedAncestor);
  15083. case 6:
  15084. prevHostParent = hostParent;
  15085. prevHostParentIsContainer = hostParentIsContainer;
  15086. hostParent = null;
  15087. recursivelyTraverseDeletionEffects(
  15088. finishedRoot,
  15089. nearestMountedAncestor,
  15090. deletedFiber
  15091. );
  15092. hostParent = prevHostParent;
  15093. hostParentIsContainer = prevHostParentIsContainer;
  15094. if (null !== hostParent)
  15095. if (hostParentIsContainer)
  15096. try {
  15097. runWithFiberInDEV(
  15098. deletedFiber,
  15099. removeChildFromContainer,
  15100. hostParent,
  15101. deletedFiber.stateNode
  15102. );
  15103. } catch (error) {
  15104. captureCommitPhaseError(
  15105. deletedFiber,
  15106. nearestMountedAncestor,
  15107. error
  15108. );
  15109. }
  15110. else
  15111. try {
  15112. runWithFiberInDEV(
  15113. deletedFiber,
  15114. removeChild,
  15115. hostParent,
  15116. deletedFiber.stateNode
  15117. );
  15118. } catch (error) {
  15119. captureCommitPhaseError(
  15120. deletedFiber,
  15121. nearestMountedAncestor,
  15122. error
  15123. );
  15124. }
  15125. break;
  15126. case 18:
  15127. null !== hostParent &&
  15128. (hostParentIsContainer
  15129. ? ((finishedRoot = hostParent),
  15130. clearHydrationBoundary(
  15131. 9 === finishedRoot.nodeType
  15132. ? finishedRoot.body
  15133. : "HTML" === finishedRoot.nodeName
  15134. ? finishedRoot.ownerDocument.body
  15135. : finishedRoot,
  15136. deletedFiber.stateNode
  15137. ),
  15138. retryIfBlockedOn(finishedRoot))
  15139. : clearHydrationBoundary(hostParent, deletedFiber.stateNode));
  15140. break;
  15141. case 4:
  15142. prevHostParent = hostParent;
  15143. prevHostParentIsContainer = hostParentIsContainer;
  15144. hostParent = deletedFiber.stateNode.containerInfo;
  15145. hostParentIsContainer = true;
  15146. recursivelyTraverseDeletionEffects(
  15147. finishedRoot,
  15148. nearestMountedAncestor,
  15149. deletedFiber
  15150. );
  15151. hostParent = prevHostParent;
  15152. hostParentIsContainer = prevHostParentIsContainer;
  15153. break;
  15154. case 0:
  15155. case 11:
  15156. case 14:
  15157. case 15:
  15158. commitHookEffectListUnmount(
  15159. Insertion,
  15160. deletedFiber,
  15161. nearestMountedAncestor
  15162. );
  15163. offscreenSubtreeWasHidden ||
  15164. commitHookLayoutUnmountEffects(
  15165. deletedFiber,
  15166. nearestMountedAncestor,
  15167. Layout
  15168. );
  15169. recursivelyTraverseDeletionEffects(
  15170. finishedRoot,
  15171. nearestMountedAncestor,
  15172. deletedFiber
  15173. );
  15174. break;
  15175. case 1:
  15176. offscreenSubtreeWasHidden ||
  15177. (safelyDetachRef(deletedFiber, nearestMountedAncestor),
  15178. (prevHostParent = deletedFiber.stateNode),
  15179. "function" === typeof prevHostParent.componentWillUnmount &&
  15180. safelyCallComponentWillUnmount(
  15181. deletedFiber,
  15182. nearestMountedAncestor,
  15183. prevHostParent
  15184. ));
  15185. recursivelyTraverseDeletionEffects(
  15186. finishedRoot,
  15187. nearestMountedAncestor,
  15188. deletedFiber
  15189. );
  15190. break;
  15191. case 21:
  15192. recursivelyTraverseDeletionEffects(
  15193. finishedRoot,
  15194. nearestMountedAncestor,
  15195. deletedFiber
  15196. );
  15197. break;
  15198. case 22:
  15199. offscreenSubtreeWasHidden =
  15200. (prevHostParent = offscreenSubtreeWasHidden) ||
  15201. null !== deletedFiber.memoizedState;
  15202. recursivelyTraverseDeletionEffects(
  15203. finishedRoot,
  15204. nearestMountedAncestor,
  15205. deletedFiber
  15206. );
  15207. offscreenSubtreeWasHidden = prevHostParent;
  15208. break;
  15209. default:
  15210. recursivelyTraverseDeletionEffects(
  15211. finishedRoot,
  15212. nearestMountedAncestor,
  15213. deletedFiber
  15214. );
  15215. }
  15216. (deletedFiber.mode & ProfileMode) !== NoMode &&
  15217. 0 <= componentEffectStartTime &&
  15218. 0 <= componentEffectEndTime &&
  15219. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  15220. logComponentEffect(
  15221. deletedFiber,
  15222. componentEffectStartTime,
  15223. componentEffectEndTime,
  15224. componentEffectDuration,
  15225. componentEffectErrors
  15226. );
  15227. popComponentEffectStart(prevEffectStart);
  15228. popComponentEffectDuration(prevEffectDuration);
  15229. componentEffectErrors = prevEffectErrors;
  15230. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  15231. }
  15232. function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {
  15233. if (
  15234. null === finishedWork.memoizedState &&
  15235. ((finishedRoot = finishedWork.alternate),
  15236. null !== finishedRoot &&
  15237. ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot))
  15238. ) {
  15239. finishedRoot = finishedRoot.dehydrated;
  15240. try {
  15241. runWithFiberInDEV(
  15242. finishedWork,
  15243. commitHydratedActivityInstance,
  15244. finishedRoot
  15245. );
  15246. } catch (error) {
  15247. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  15248. }
  15249. }
  15250. }
  15251. function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
  15252. if (
  15253. null === finishedWork.memoizedState &&
  15254. ((finishedRoot = finishedWork.alternate),
  15255. null !== finishedRoot &&
  15256. ((finishedRoot = finishedRoot.memoizedState),
  15257. null !== finishedRoot &&
  15258. ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot)))
  15259. )
  15260. try {
  15261. runWithFiberInDEV(
  15262. finishedWork,
  15263. commitHydratedSuspenseInstance,
  15264. finishedRoot
  15265. );
  15266. } catch (error) {
  15267. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  15268. }
  15269. }
  15270. function getRetryCache(finishedWork) {
  15271. switch (finishedWork.tag) {
  15272. case 31:
  15273. case 13:
  15274. case 19:
  15275. var retryCache = finishedWork.stateNode;
  15276. null === retryCache &&
  15277. (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
  15278. return retryCache;
  15279. case 22:
  15280. return (
  15281. (finishedWork = finishedWork.stateNode),
  15282. (retryCache = finishedWork._retryCache),
  15283. null === retryCache &&
  15284. (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),
  15285. retryCache
  15286. );
  15287. default:
  15288. throw Error(
  15289. "Unexpected Suspense handler tag (" +
  15290. finishedWork.tag +
  15291. "). This is a bug in React."
  15292. );
  15293. }
  15294. }
  15295. function attachSuspenseRetryListeners(finishedWork, wakeables) {
  15296. var retryCache = getRetryCache(finishedWork);
  15297. wakeables.forEach(function (wakeable) {
  15298. if (!retryCache.has(wakeable)) {
  15299. retryCache.add(wakeable);
  15300. if (isDevToolsPresent)
  15301. if (null !== inProgressLanes && null !== inProgressRoot)
  15302. restorePendingUpdaters(inProgressRoot, inProgressLanes);
  15303. else
  15304. throw Error(
  15305. "Expected finished root and lanes to be set. This is a bug in React."
  15306. );
  15307. var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
  15308. wakeable.then(retry, retry);
  15309. }
  15310. });
  15311. }
  15312. function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
  15313. var deletions = parentFiber.deletions;
  15314. if (null !== deletions)
  15315. for (var i = 0; i < deletions.length; i++) {
  15316. var root = root$jscomp$0,
  15317. returnFiber = parentFiber,
  15318. deletedFiber = deletions[i],
  15319. prevEffectStart = pushComponentEffectStart(),
  15320. parent = returnFiber;
  15321. a: for (; null !== parent; ) {
  15322. switch (parent.tag) {
  15323. case 27:
  15324. if (isSingletonScope(parent.type)) {
  15325. hostParent = parent.stateNode;
  15326. hostParentIsContainer = false;
  15327. break a;
  15328. }
  15329. break;
  15330. case 5:
  15331. hostParent = parent.stateNode;
  15332. hostParentIsContainer = false;
  15333. break a;
  15334. case 3:
  15335. case 4:
  15336. hostParent = parent.stateNode.containerInfo;
  15337. hostParentIsContainer = true;
  15338. break a;
  15339. }
  15340. parent = parent.return;
  15341. }
  15342. if (null === hostParent)
  15343. throw Error(
  15344. "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
  15345. );
  15346. commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);
  15347. hostParent = null;
  15348. hostParentIsContainer = false;
  15349. (deletedFiber.mode & ProfileMode) !== NoMode &&
  15350. 0 <= componentEffectStartTime &&
  15351. 0 <= componentEffectEndTime &&
  15352. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  15353. logComponentTrigger(
  15354. deletedFiber,
  15355. componentEffectStartTime,
  15356. componentEffectEndTime,
  15357. "Unmount"
  15358. );
  15359. popComponentEffectStart(prevEffectStart);
  15360. root = deletedFiber;
  15361. returnFiber = root.alternate;
  15362. null !== returnFiber && (returnFiber.return = null);
  15363. root.return = null;
  15364. }
  15365. if (parentFiber.subtreeFlags & 13886)
  15366. for (parentFiber = parentFiber.child; null !== parentFiber; )
  15367. commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),
  15368. (parentFiber = parentFiber.sibling);
  15369. }
  15370. function commitMutationEffectsOnFiber(finishedWork, root) {
  15371. var prevEffectStart = pushComponentEffectStart(),
  15372. prevEffectDuration = pushComponentEffectDuration(),
  15373. prevEffectErrors = pushComponentEffectErrors(),
  15374. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),
  15375. current = finishedWork.alternate,
  15376. flags = finishedWork.flags;
  15377. switch (finishedWork.tag) {
  15378. case 0:
  15379. case 11:
  15380. case 14:
  15381. case 15:
  15382. recursivelyTraverseMutationEffects(root, finishedWork);
  15383. commitReconciliationEffects(finishedWork);
  15384. flags & 4 &&
  15385. (commitHookEffectListUnmount(
  15386. Insertion | HasEffect,
  15387. finishedWork,
  15388. finishedWork.return
  15389. ),
  15390. commitHookEffectListMount(Insertion | HasEffect, finishedWork),
  15391. commitHookLayoutUnmountEffects(
  15392. finishedWork,
  15393. finishedWork.return,
  15394. Layout | HasEffect
  15395. ));
  15396. break;
  15397. case 1:
  15398. recursivelyTraverseMutationEffects(root, finishedWork);
  15399. commitReconciliationEffects(finishedWork);
  15400. flags & 512 &&
  15401. (offscreenSubtreeWasHidden ||
  15402. null === current ||
  15403. safelyDetachRef(current, current.return));
  15404. if (
  15405. flags & 64 &&
  15406. offscreenSubtreeIsHidden &&
  15407. ((flags = finishedWork.updateQueue),
  15408. null !== flags && ((current = flags.callbacks), null !== current))
  15409. ) {
  15410. var existingHiddenCallbacks = flags.shared.hiddenCallbacks;
  15411. flags.shared.hiddenCallbacks =
  15412. null === existingHiddenCallbacks
  15413. ? current
  15414. : existingHiddenCallbacks.concat(current);
  15415. }
  15416. break;
  15417. case 26:
  15418. existingHiddenCallbacks = currentHoistableRoot;
  15419. recursivelyTraverseMutationEffects(root, finishedWork);
  15420. commitReconciliationEffects(finishedWork);
  15421. flags & 512 &&
  15422. (offscreenSubtreeWasHidden ||
  15423. null === current ||
  15424. safelyDetachRef(current, current.return));
  15425. if (flags & 4) {
  15426. var currentResource =
  15427. null !== current ? current.memoizedState : null;
  15428. flags = finishedWork.memoizedState;
  15429. if (null === current)
  15430. if (null === flags)
  15431. if (null === finishedWork.stateNode) {
  15432. a: {
  15433. flags = finishedWork.type;
  15434. current = finishedWork.memoizedProps;
  15435. existingHiddenCallbacks =
  15436. existingHiddenCallbacks.ownerDocument ||
  15437. existingHiddenCallbacks;
  15438. b: switch (flags) {
  15439. case "title":
  15440. currentResource =
  15441. existingHiddenCallbacks.getElementsByTagName(
  15442. "title"
  15443. )[0];
  15444. if (
  15445. !currentResource ||
  15446. currentResource[internalHoistableMarker] ||
  15447. currentResource[internalInstanceKey] ||
  15448. currentResource.namespaceURI === SVG_NAMESPACE ||
  15449. currentResource.hasAttribute("itemprop")
  15450. )
  15451. (currentResource =
  15452. existingHiddenCallbacks.createElement(flags)),
  15453. existingHiddenCallbacks.head.insertBefore(
  15454. currentResource,
  15455. existingHiddenCallbacks.querySelector(
  15456. "head > title"
  15457. )
  15458. );
  15459. setInitialProperties(currentResource, flags, current);
  15460. currentResource[internalInstanceKey] = finishedWork;
  15461. markNodeAsHoistable(currentResource);
  15462. flags = currentResource;
  15463. break a;
  15464. case "link":
  15465. var maybeNodes = getHydratableHoistableCache(
  15466. "link",
  15467. "href",
  15468. existingHiddenCallbacks
  15469. ).get(flags + (current.href || ""));
  15470. if (maybeNodes)
  15471. for (var i = 0; i < maybeNodes.length; i++)
  15472. if (
  15473. ((currentResource = maybeNodes[i]),
  15474. currentResource.getAttribute("href") ===
  15475. (null == current.href || "" === current.href
  15476. ? null
  15477. : current.href) &&
  15478. currentResource.getAttribute("rel") ===
  15479. (null == current.rel ? null : current.rel) &&
  15480. currentResource.getAttribute("title") ===
  15481. (null == current.title
  15482. ? null
  15483. : current.title) &&
  15484. currentResource.getAttribute("crossorigin") ===
  15485. (null == current.crossOrigin
  15486. ? null
  15487. : current.crossOrigin))
  15488. ) {
  15489. maybeNodes.splice(i, 1);
  15490. break b;
  15491. }
  15492. currentResource =
  15493. existingHiddenCallbacks.createElement(flags);
  15494. setInitialProperties(currentResource, flags, current);
  15495. existingHiddenCallbacks.head.appendChild(
  15496. currentResource
  15497. );
  15498. break;
  15499. case "meta":
  15500. if (
  15501. (maybeNodes = getHydratableHoistableCache(
  15502. "meta",
  15503. "content",
  15504. existingHiddenCallbacks
  15505. ).get(flags + (current.content || "")))
  15506. )
  15507. for (i = 0; i < maybeNodes.length; i++)
  15508. if (
  15509. ((currentResource = maybeNodes[i]),
  15510. checkAttributeStringCoercion(
  15511. current.content,
  15512. "content"
  15513. ),
  15514. currentResource.getAttribute("content") ===
  15515. (null == current.content
  15516. ? null
  15517. : "" + current.content) &&
  15518. currentResource.getAttribute("name") ===
  15519. (null == current.name
  15520. ? null
  15521. : current.name) &&
  15522. currentResource.getAttribute("property") ===
  15523. (null == current.property
  15524. ? null
  15525. : current.property) &&
  15526. currentResource.getAttribute("http-equiv") ===
  15527. (null == current.httpEquiv
  15528. ? null
  15529. : current.httpEquiv) &&
  15530. currentResource.getAttribute("charset") ===
  15531. (null == current.charSet
  15532. ? null
  15533. : current.charSet))
  15534. ) {
  15535. maybeNodes.splice(i, 1);
  15536. break b;
  15537. }
  15538. currentResource =
  15539. existingHiddenCallbacks.createElement(flags);
  15540. setInitialProperties(currentResource, flags, current);
  15541. existingHiddenCallbacks.head.appendChild(
  15542. currentResource
  15543. );
  15544. break;
  15545. default:
  15546. throw Error(
  15547. 'getNodesForType encountered a type it did not expect: "' +
  15548. flags +
  15549. '". This is a bug in React.'
  15550. );
  15551. }
  15552. currentResource[internalInstanceKey] = finishedWork;
  15553. markNodeAsHoistable(currentResource);
  15554. flags = currentResource;
  15555. }
  15556. finishedWork.stateNode = flags;
  15557. } else
  15558. mountHoistable(
  15559. existingHiddenCallbacks,
  15560. finishedWork.type,
  15561. finishedWork.stateNode
  15562. );
  15563. else
  15564. finishedWork.stateNode = acquireResource(
  15565. existingHiddenCallbacks,
  15566. flags,
  15567. finishedWork.memoizedProps
  15568. );
  15569. else
  15570. currentResource !== flags
  15571. ? (null === currentResource
  15572. ? null !== current.stateNode &&
  15573. ((current = current.stateNode),
  15574. current.parentNode.removeChild(current))
  15575. : currentResource.count--,
  15576. null === flags
  15577. ? mountHoistable(
  15578. existingHiddenCallbacks,
  15579. finishedWork.type,
  15580. finishedWork.stateNode
  15581. )
  15582. : acquireResource(
  15583. existingHiddenCallbacks,
  15584. flags,
  15585. finishedWork.memoizedProps
  15586. ))
  15587. : null === flags &&
  15588. null !== finishedWork.stateNode &&
  15589. commitHostUpdate(
  15590. finishedWork,
  15591. finishedWork.memoizedProps,
  15592. current.memoizedProps
  15593. );
  15594. }
  15595. break;
  15596. case 27:
  15597. recursivelyTraverseMutationEffects(root, finishedWork);
  15598. commitReconciliationEffects(finishedWork);
  15599. flags & 512 &&
  15600. (offscreenSubtreeWasHidden ||
  15601. null === current ||
  15602. safelyDetachRef(current, current.return));
  15603. null !== current &&
  15604. flags & 4 &&
  15605. commitHostUpdate(
  15606. finishedWork,
  15607. finishedWork.memoizedProps,
  15608. current.memoizedProps
  15609. );
  15610. break;
  15611. case 5:
  15612. recursivelyTraverseMutationEffects(root, finishedWork);
  15613. commitReconciliationEffects(finishedWork);
  15614. flags & 512 &&
  15615. (offscreenSubtreeWasHidden ||
  15616. null === current ||
  15617. safelyDetachRef(current, current.return));
  15618. if (finishedWork.flags & 32) {
  15619. existingHiddenCallbacks = finishedWork.stateNode;
  15620. try {
  15621. runWithFiberInDEV(
  15622. finishedWork,
  15623. resetTextContent,
  15624. existingHiddenCallbacks
  15625. );
  15626. } catch (error) {
  15627. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  15628. }
  15629. }
  15630. flags & 4 &&
  15631. null != finishedWork.stateNode &&
  15632. ((existingHiddenCallbacks = finishedWork.memoizedProps),
  15633. commitHostUpdate(
  15634. finishedWork,
  15635. existingHiddenCallbacks,
  15636. null !== current ? current.memoizedProps : existingHiddenCallbacks
  15637. ));
  15638. flags & 1024 &&
  15639. ((needsFormReset = true),
  15640. "form" !== finishedWork.type &&
  15641. console.error(
  15642. "Unexpected host component type. Expected a form. This is a bug in React."
  15643. ));
  15644. break;
  15645. case 6:
  15646. recursivelyTraverseMutationEffects(root, finishedWork);
  15647. commitReconciliationEffects(finishedWork);
  15648. if (flags & 4) {
  15649. if (null === finishedWork.stateNode)
  15650. throw Error(
  15651. "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
  15652. );
  15653. flags = finishedWork.memoizedProps;
  15654. current = null !== current ? current.memoizedProps : flags;
  15655. existingHiddenCallbacks = finishedWork.stateNode;
  15656. try {
  15657. runWithFiberInDEV(
  15658. finishedWork,
  15659. commitTextUpdate,
  15660. existingHiddenCallbacks,
  15661. current,
  15662. flags
  15663. );
  15664. } catch (error) {
  15665. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  15666. }
  15667. }
  15668. break;
  15669. case 3:
  15670. existingHiddenCallbacks = pushNestedEffectDurations();
  15671. tagCaches = null;
  15672. currentResource = currentHoistableRoot;
  15673. currentHoistableRoot = getHoistableRoot(root.containerInfo);
  15674. recursivelyTraverseMutationEffects(root, finishedWork);
  15675. currentHoistableRoot = currentResource;
  15676. commitReconciliationEffects(finishedWork);
  15677. if (
  15678. flags & 4 &&
  15679. null !== current &&
  15680. current.memoizedState.isDehydrated
  15681. )
  15682. try {
  15683. runWithFiberInDEV(
  15684. finishedWork,
  15685. commitHydratedContainer,
  15686. root.containerInfo
  15687. );
  15688. } catch (error) {
  15689. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  15690. }
  15691. needsFormReset &&
  15692. ((needsFormReset = false), recursivelyResetForms(finishedWork));
  15693. root.effectDuration += popNestedEffectDurations(
  15694. existingHiddenCallbacks
  15695. );
  15696. break;
  15697. case 4:
  15698. flags = currentHoistableRoot;
  15699. currentHoistableRoot = getHoistableRoot(
  15700. finishedWork.stateNode.containerInfo
  15701. );
  15702. recursivelyTraverseMutationEffects(root, finishedWork);
  15703. commitReconciliationEffects(finishedWork);
  15704. currentHoistableRoot = flags;
  15705. break;
  15706. case 12:
  15707. flags = pushNestedEffectDurations();
  15708. recursivelyTraverseMutationEffects(root, finishedWork);
  15709. commitReconciliationEffects(finishedWork);
  15710. finishedWork.stateNode.effectDuration +=
  15711. bubbleNestedEffectDurations(flags);
  15712. break;
  15713. case 31:
  15714. recursivelyTraverseMutationEffects(root, finishedWork);
  15715. commitReconciliationEffects(finishedWork);
  15716. flags & 4 &&
  15717. ((flags = finishedWork.updateQueue),
  15718. null !== flags &&
  15719. ((finishedWork.updateQueue = null),
  15720. attachSuspenseRetryListeners(finishedWork, flags)));
  15721. break;
  15722. case 13:
  15723. recursivelyTraverseMutationEffects(root, finishedWork);
  15724. commitReconciliationEffects(finishedWork);
  15725. finishedWork.child.flags & 8192 &&
  15726. (null !== finishedWork.memoizedState) !==
  15727. (null !== current && null !== current.memoizedState) &&
  15728. (globalMostRecentFallbackTime = now$1());
  15729. flags & 4 &&
  15730. ((flags = finishedWork.updateQueue),
  15731. null !== flags &&
  15732. ((finishedWork.updateQueue = null),
  15733. attachSuspenseRetryListeners(finishedWork, flags)));
  15734. break;
  15735. case 22:
  15736. existingHiddenCallbacks = null !== finishedWork.memoizedState;
  15737. var wasHidden = null !== current && null !== current.memoizedState,
  15738. prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,
  15739. prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
  15740. offscreenSubtreeIsHidden =
  15741. prevOffscreenSubtreeIsHidden || existingHiddenCallbacks;
  15742. offscreenSubtreeWasHidden =
  15743. prevOffscreenSubtreeWasHidden || wasHidden;
  15744. recursivelyTraverseMutationEffects(root, finishedWork);
  15745. offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
  15746. offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
  15747. wasHidden &&
  15748. !existingHiddenCallbacks &&
  15749. !prevOffscreenSubtreeIsHidden &&
  15750. !prevOffscreenSubtreeWasHidden &&
  15751. (finishedWork.mode & ProfileMode) !== NoMode &&
  15752. 0 <= componentEffectStartTime &&
  15753. 0 <= componentEffectEndTime &&
  15754. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  15755. logComponentReappeared(
  15756. finishedWork,
  15757. componentEffectStartTime,
  15758. componentEffectEndTime
  15759. );
  15760. commitReconciliationEffects(finishedWork);
  15761. if (flags & 8192)
  15762. a: for (
  15763. root = finishedWork.stateNode,
  15764. root._visibility = existingHiddenCallbacks
  15765. ? root._visibility & ~OffscreenVisible
  15766. : root._visibility | OffscreenVisible,
  15767. !existingHiddenCallbacks ||
  15768. null === current ||
  15769. wasHidden ||
  15770. offscreenSubtreeIsHidden ||
  15771. offscreenSubtreeWasHidden ||
  15772. (recursivelyTraverseDisappearLayoutEffects(finishedWork),
  15773. (finishedWork.mode & ProfileMode) !== NoMode &&
  15774. 0 <= componentEffectStartTime &&
  15775. 0 <= componentEffectEndTime &&
  15776. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  15777. logComponentTrigger(
  15778. finishedWork,
  15779. componentEffectStartTime,
  15780. componentEffectEndTime,
  15781. "Disconnect"
  15782. )),
  15783. current = null,
  15784. root = finishedWork;
  15785. ;
  15786. ) {
  15787. if (5 === root.tag || 26 === root.tag) {
  15788. if (null === current) {
  15789. wasHidden = current = root;
  15790. try {
  15791. (currentResource = wasHidden.stateNode),
  15792. existingHiddenCallbacks
  15793. ? runWithFiberInDEV(
  15794. wasHidden,
  15795. hideInstance,
  15796. currentResource
  15797. )
  15798. : runWithFiberInDEV(
  15799. wasHidden,
  15800. unhideInstance,
  15801. wasHidden.stateNode,
  15802. wasHidden.memoizedProps
  15803. );
  15804. } catch (error) {
  15805. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  15806. }
  15807. }
  15808. } else if (6 === root.tag) {
  15809. if (null === current) {
  15810. wasHidden = root;
  15811. try {
  15812. (maybeNodes = wasHidden.stateNode),
  15813. existingHiddenCallbacks
  15814. ? runWithFiberInDEV(
  15815. wasHidden,
  15816. hideTextInstance,
  15817. maybeNodes
  15818. )
  15819. : runWithFiberInDEV(
  15820. wasHidden,
  15821. unhideTextInstance,
  15822. maybeNodes,
  15823. wasHidden.memoizedProps
  15824. );
  15825. } catch (error) {
  15826. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  15827. }
  15828. }
  15829. } else if (18 === root.tag) {
  15830. if (null === current) {
  15831. wasHidden = root;
  15832. try {
  15833. (i = wasHidden.stateNode),
  15834. existingHiddenCallbacks
  15835. ? runWithFiberInDEV(
  15836. wasHidden,
  15837. hideDehydratedBoundary,
  15838. i
  15839. )
  15840. : runWithFiberInDEV(
  15841. wasHidden,
  15842. unhideDehydratedBoundary,
  15843. wasHidden.stateNode
  15844. );
  15845. } catch (error) {
  15846. captureCommitPhaseError(wasHidden, wasHidden.return, error);
  15847. }
  15848. }
  15849. } else if (
  15850. ((22 !== root.tag && 23 !== root.tag) ||
  15851. null === root.memoizedState ||
  15852. root === finishedWork) &&
  15853. null !== root.child
  15854. ) {
  15855. root.child.return = root;
  15856. root = root.child;
  15857. continue;
  15858. }
  15859. if (root === finishedWork) break a;
  15860. for (; null === root.sibling; ) {
  15861. if (null === root.return || root.return === finishedWork)
  15862. break a;
  15863. current === root && (current = null);
  15864. root = root.return;
  15865. }
  15866. current === root && (current = null);
  15867. root.sibling.return = root.return;
  15868. root = root.sibling;
  15869. }
  15870. flags & 4 &&
  15871. ((flags = finishedWork.updateQueue),
  15872. null !== flags &&
  15873. ((current = flags.retryQueue),
  15874. null !== current &&
  15875. ((flags.retryQueue = null),
  15876. attachSuspenseRetryListeners(finishedWork, current))));
  15877. break;
  15878. case 19:
  15879. recursivelyTraverseMutationEffects(root, finishedWork);
  15880. commitReconciliationEffects(finishedWork);
  15881. flags & 4 &&
  15882. ((flags = finishedWork.updateQueue),
  15883. null !== flags &&
  15884. ((finishedWork.updateQueue = null),
  15885. attachSuspenseRetryListeners(finishedWork, flags)));
  15886. break;
  15887. case 30:
  15888. break;
  15889. case 21:
  15890. break;
  15891. default:
  15892. recursivelyTraverseMutationEffects(root, finishedWork),
  15893. commitReconciliationEffects(finishedWork);
  15894. }
  15895. (finishedWork.mode & ProfileMode) !== NoMode &&
  15896. 0 <= componentEffectStartTime &&
  15897. 0 <= componentEffectEndTime &&
  15898. ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  15899. logComponentEffect(
  15900. finishedWork,
  15901. componentEffectStartTime,
  15902. componentEffectEndTime,
  15903. componentEffectDuration,
  15904. componentEffectErrors
  15905. ),
  15906. null === finishedWork.alternate &&
  15907. null !== finishedWork.return &&
  15908. null !== finishedWork.return.alternate &&
  15909. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  15910. (isHydratingParent(
  15911. finishedWork.return.alternate,
  15912. finishedWork.return
  15913. ) ||
  15914. logComponentTrigger(
  15915. finishedWork,
  15916. componentEffectStartTime,
  15917. componentEffectEndTime,
  15918. "Mount"
  15919. )));
  15920. popComponentEffectStart(prevEffectStart);
  15921. popComponentEffectDuration(prevEffectDuration);
  15922. componentEffectErrors = prevEffectErrors;
  15923. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  15924. }
  15925. function commitReconciliationEffects(finishedWork) {
  15926. var flags = finishedWork.flags;
  15927. if (flags & 2) {
  15928. try {
  15929. runWithFiberInDEV(finishedWork, commitPlacement, finishedWork);
  15930. } catch (error) {
  15931. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  15932. }
  15933. finishedWork.flags &= -3;
  15934. }
  15935. flags & 4096 && (finishedWork.flags &= -4097);
  15936. }
  15937. function recursivelyResetForms(parentFiber) {
  15938. if (parentFiber.subtreeFlags & 1024)
  15939. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  15940. var fiber = parentFiber;
  15941. recursivelyResetForms(fiber);
  15942. 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();
  15943. parentFiber = parentFiber.sibling;
  15944. }
  15945. }
  15946. function recursivelyTraverseLayoutEffects(root, parentFiber) {
  15947. if (parentFiber.subtreeFlags & 8772)
  15948. for (parentFiber = parentFiber.child; null !== parentFiber; )
  15949. commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),
  15950. (parentFiber = parentFiber.sibling);
  15951. }
  15952. function disappearLayoutEffects(finishedWork) {
  15953. var prevEffectStart = pushComponentEffectStart(),
  15954. prevEffectDuration = pushComponentEffectDuration(),
  15955. prevEffectErrors = pushComponentEffectErrors(),
  15956. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  15957. switch (finishedWork.tag) {
  15958. case 0:
  15959. case 11:
  15960. case 14:
  15961. case 15:
  15962. commitHookLayoutUnmountEffects(
  15963. finishedWork,
  15964. finishedWork.return,
  15965. Layout
  15966. );
  15967. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  15968. break;
  15969. case 1:
  15970. safelyDetachRef(finishedWork, finishedWork.return);
  15971. var instance = finishedWork.stateNode;
  15972. "function" === typeof instance.componentWillUnmount &&
  15973. safelyCallComponentWillUnmount(
  15974. finishedWork,
  15975. finishedWork.return,
  15976. instance
  15977. );
  15978. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  15979. break;
  15980. case 27:
  15981. runWithFiberInDEV(
  15982. finishedWork,
  15983. releaseSingletonInstance,
  15984. finishedWork.stateNode
  15985. );
  15986. case 26:
  15987. case 5:
  15988. safelyDetachRef(finishedWork, finishedWork.return);
  15989. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  15990. break;
  15991. case 22:
  15992. null === finishedWork.memoizedState &&
  15993. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  15994. break;
  15995. case 30:
  15996. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  15997. break;
  15998. default:
  15999. recursivelyTraverseDisappearLayoutEffects(finishedWork);
  16000. }
  16001. (finishedWork.mode & ProfileMode) !== NoMode &&
  16002. 0 <= componentEffectStartTime &&
  16003. 0 <= componentEffectEndTime &&
  16004. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  16005. logComponentEffect(
  16006. finishedWork,
  16007. componentEffectStartTime,
  16008. componentEffectEndTime,
  16009. componentEffectDuration,
  16010. componentEffectErrors
  16011. );
  16012. popComponentEffectStart(prevEffectStart);
  16013. popComponentEffectDuration(prevEffectDuration);
  16014. componentEffectErrors = prevEffectErrors;
  16015. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  16016. }
  16017. function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
  16018. for (parentFiber = parentFiber.child; null !== parentFiber; )
  16019. disappearLayoutEffects(parentFiber),
  16020. (parentFiber = parentFiber.sibling);
  16021. }
  16022. function reappearLayoutEffects(
  16023. finishedRoot,
  16024. current,
  16025. finishedWork,
  16026. includeWorkInProgressEffects
  16027. ) {
  16028. var prevEffectStart = pushComponentEffectStart(),
  16029. prevEffectDuration = pushComponentEffectDuration(),
  16030. prevEffectErrors = pushComponentEffectErrors(),
  16031. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),
  16032. flags = finishedWork.flags;
  16033. switch (finishedWork.tag) {
  16034. case 0:
  16035. case 11:
  16036. case 15:
  16037. recursivelyTraverseReappearLayoutEffects(
  16038. finishedRoot,
  16039. finishedWork,
  16040. includeWorkInProgressEffects
  16041. );
  16042. commitHookLayoutEffects(finishedWork, Layout);
  16043. break;
  16044. case 1:
  16045. recursivelyTraverseReappearLayoutEffects(
  16046. finishedRoot,
  16047. finishedWork,
  16048. includeWorkInProgressEffects
  16049. );
  16050. current = finishedWork.stateNode;
  16051. "function" === typeof current.componentDidMount &&
  16052. runWithFiberInDEV(
  16053. finishedWork,
  16054. callComponentDidMountInDEV,
  16055. finishedWork,
  16056. current
  16057. );
  16058. current = finishedWork.updateQueue;
  16059. if (null !== current) {
  16060. finishedRoot = finishedWork.stateNode;
  16061. try {
  16062. runWithFiberInDEV(
  16063. finishedWork,
  16064. commitHiddenCallbacks,
  16065. current,
  16066. finishedRoot
  16067. );
  16068. } catch (error) {
  16069. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  16070. }
  16071. }
  16072. includeWorkInProgressEffects &&
  16073. flags & 64 &&
  16074. commitClassCallbacks(finishedWork);
  16075. safelyAttachRef(finishedWork, finishedWork.return);
  16076. break;
  16077. case 27:
  16078. commitHostSingletonAcquisition(finishedWork);
  16079. case 26:
  16080. case 5:
  16081. recursivelyTraverseReappearLayoutEffects(
  16082. finishedRoot,
  16083. finishedWork,
  16084. includeWorkInProgressEffects
  16085. );
  16086. includeWorkInProgressEffects &&
  16087. null === current &&
  16088. flags & 4 &&
  16089. commitHostMount(finishedWork);
  16090. safelyAttachRef(finishedWork, finishedWork.return);
  16091. break;
  16092. case 12:
  16093. if (includeWorkInProgressEffects && flags & 4) {
  16094. flags = pushNestedEffectDurations();
  16095. recursivelyTraverseReappearLayoutEffects(
  16096. finishedRoot,
  16097. finishedWork,
  16098. includeWorkInProgressEffects
  16099. );
  16100. includeWorkInProgressEffects = finishedWork.stateNode;
  16101. includeWorkInProgressEffects.effectDuration +=
  16102. bubbleNestedEffectDurations(flags);
  16103. try {
  16104. runWithFiberInDEV(
  16105. finishedWork,
  16106. commitProfiler,
  16107. finishedWork,
  16108. current,
  16109. commitStartTime,
  16110. includeWorkInProgressEffects.effectDuration
  16111. );
  16112. } catch (error) {
  16113. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  16114. }
  16115. } else
  16116. recursivelyTraverseReappearLayoutEffects(
  16117. finishedRoot,
  16118. finishedWork,
  16119. includeWorkInProgressEffects
  16120. );
  16121. break;
  16122. case 31:
  16123. recursivelyTraverseReappearLayoutEffects(
  16124. finishedRoot,
  16125. finishedWork,
  16126. includeWorkInProgressEffects
  16127. );
  16128. includeWorkInProgressEffects &&
  16129. flags & 4 &&
  16130. commitActivityHydrationCallbacks(finishedRoot, finishedWork);
  16131. break;
  16132. case 13:
  16133. recursivelyTraverseReappearLayoutEffects(
  16134. finishedRoot,
  16135. finishedWork,
  16136. includeWorkInProgressEffects
  16137. );
  16138. includeWorkInProgressEffects &&
  16139. flags & 4 &&
  16140. commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
  16141. break;
  16142. case 22:
  16143. null === finishedWork.memoizedState &&
  16144. recursivelyTraverseReappearLayoutEffects(
  16145. finishedRoot,
  16146. finishedWork,
  16147. includeWorkInProgressEffects
  16148. );
  16149. safelyAttachRef(finishedWork, finishedWork.return);
  16150. break;
  16151. case 30:
  16152. break;
  16153. default:
  16154. recursivelyTraverseReappearLayoutEffects(
  16155. finishedRoot,
  16156. finishedWork,
  16157. includeWorkInProgressEffects
  16158. );
  16159. }
  16160. (finishedWork.mode & ProfileMode) !== NoMode &&
  16161. 0 <= componentEffectStartTime &&
  16162. 0 <= componentEffectEndTime &&
  16163. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  16164. logComponentEffect(
  16165. finishedWork,
  16166. componentEffectStartTime,
  16167. componentEffectEndTime,
  16168. componentEffectDuration,
  16169. componentEffectErrors
  16170. );
  16171. popComponentEffectStart(prevEffectStart);
  16172. popComponentEffectDuration(prevEffectDuration);
  16173. componentEffectErrors = prevEffectErrors;
  16174. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  16175. }
  16176. function recursivelyTraverseReappearLayoutEffects(
  16177. finishedRoot,
  16178. parentFiber,
  16179. includeWorkInProgressEffects
  16180. ) {
  16181. includeWorkInProgressEffects =
  16182. includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
  16183. for (parentFiber = parentFiber.child; null !== parentFiber; )
  16184. reappearLayoutEffects(
  16185. finishedRoot,
  16186. parentFiber.alternate,
  16187. parentFiber,
  16188. includeWorkInProgressEffects
  16189. ),
  16190. (parentFiber = parentFiber.sibling);
  16191. }
  16192. function commitOffscreenPassiveMountEffects(current, finishedWork) {
  16193. var previousCache = null;
  16194. null !== current &&
  16195. null !== current.memoizedState &&
  16196. null !== current.memoizedState.cachePool &&
  16197. (previousCache = current.memoizedState.cachePool.pool);
  16198. current = null;
  16199. null !== finishedWork.memoizedState &&
  16200. null !== finishedWork.memoizedState.cachePool &&
  16201. (current = finishedWork.memoizedState.cachePool.pool);
  16202. current !== previousCache &&
  16203. (null != current && retainCache(current),
  16204. null != previousCache && releaseCache(previousCache));
  16205. }
  16206. function commitCachePassiveMountEffect(current, finishedWork) {
  16207. current = null;
  16208. null !== finishedWork.alternate &&
  16209. (current = finishedWork.alternate.memoizedState.cache);
  16210. finishedWork = finishedWork.memoizedState.cache;
  16211. finishedWork !== current &&
  16212. (retainCache(finishedWork), null != current && releaseCache(current));
  16213. }
  16214. function recursivelyTraversePassiveMountEffects(
  16215. root,
  16216. parentFiber,
  16217. committedLanes,
  16218. committedTransitions,
  16219. endTime
  16220. ) {
  16221. if (
  16222. parentFiber.subtreeFlags & 10256 ||
  16223. (0 !== parentFiber.actualDuration &&
  16224. (null === parentFiber.alternate ||
  16225. parentFiber.alternate.child !== parentFiber.child))
  16226. )
  16227. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  16228. var nextSibling = parentFiber.sibling;
  16229. commitPassiveMountOnFiber(
  16230. root,
  16231. parentFiber,
  16232. committedLanes,
  16233. committedTransitions,
  16234. null !== nextSibling ? nextSibling.actualStartTime : endTime
  16235. );
  16236. parentFiber = nextSibling;
  16237. }
  16238. }
  16239. function commitPassiveMountOnFiber(
  16240. finishedRoot,
  16241. finishedWork,
  16242. committedLanes,
  16243. committedTransitions,
  16244. endTime
  16245. ) {
  16246. var prevEffectStart = pushComponentEffectStart(),
  16247. prevEffectDuration = pushComponentEffectDuration(),
  16248. prevEffectErrors = pushComponentEffectErrors(),
  16249. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),
  16250. prevDeepEquality = alreadyWarnedForDeepEquality,
  16251. flags = finishedWork.flags;
  16252. switch (finishedWork.tag) {
  16253. case 0:
  16254. case 11:
  16255. case 15:
  16256. (finishedWork.mode & ProfileMode) !== NoMode &&
  16257. 0 < finishedWork.actualStartTime &&
  16258. 0 !== (finishedWork.flags & 1) &&
  16259. logComponentRender(
  16260. finishedWork,
  16261. finishedWork.actualStartTime,
  16262. endTime,
  16263. inHydratedSubtree,
  16264. committedLanes
  16265. );
  16266. recursivelyTraversePassiveMountEffects(
  16267. finishedRoot,
  16268. finishedWork,
  16269. committedLanes,
  16270. committedTransitions,
  16271. endTime
  16272. );
  16273. flags & 2048 &&
  16274. commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
  16275. break;
  16276. case 1:
  16277. (finishedWork.mode & ProfileMode) !== NoMode &&
  16278. 0 < finishedWork.actualStartTime &&
  16279. (0 !== (finishedWork.flags & 128)
  16280. ? logComponentErrored(
  16281. finishedWork,
  16282. finishedWork.actualStartTime,
  16283. endTime,
  16284. []
  16285. )
  16286. : 0 !== (finishedWork.flags & 1) &&
  16287. logComponentRender(
  16288. finishedWork,
  16289. finishedWork.actualStartTime,
  16290. endTime,
  16291. inHydratedSubtree,
  16292. committedLanes
  16293. ));
  16294. recursivelyTraversePassiveMountEffects(
  16295. finishedRoot,
  16296. finishedWork,
  16297. committedLanes,
  16298. committedTransitions,
  16299. endTime
  16300. );
  16301. break;
  16302. case 3:
  16303. var prevProfilerEffectDuration = pushNestedEffectDurations(),
  16304. wasInHydratedSubtree = inHydratedSubtree;
  16305. inHydratedSubtree =
  16306. null !== finishedWork.alternate &&
  16307. finishedWork.alternate.memoizedState.isDehydrated &&
  16308. 0 === (finishedWork.flags & 256);
  16309. recursivelyTraversePassiveMountEffects(
  16310. finishedRoot,
  16311. finishedWork,
  16312. committedLanes,
  16313. committedTransitions,
  16314. endTime
  16315. );
  16316. inHydratedSubtree = wasInHydratedSubtree;
  16317. flags & 2048 &&
  16318. ((committedLanes = null),
  16319. null !== finishedWork.alternate &&
  16320. (committedLanes = finishedWork.alternate.memoizedState.cache),
  16321. (committedTransitions = finishedWork.memoizedState.cache),
  16322. committedTransitions !== committedLanes &&
  16323. (retainCache(committedTransitions),
  16324. null != committedLanes && releaseCache(committedLanes)));
  16325. finishedRoot.passiveEffectDuration += popNestedEffectDurations(
  16326. prevProfilerEffectDuration
  16327. );
  16328. break;
  16329. case 12:
  16330. if (flags & 2048) {
  16331. flags = pushNestedEffectDurations();
  16332. recursivelyTraversePassiveMountEffects(
  16333. finishedRoot,
  16334. finishedWork,
  16335. committedLanes,
  16336. committedTransitions,
  16337. endTime
  16338. );
  16339. finishedRoot = finishedWork.stateNode;
  16340. finishedRoot.passiveEffectDuration +=
  16341. bubbleNestedEffectDurations(flags);
  16342. try {
  16343. runWithFiberInDEV(
  16344. finishedWork,
  16345. commitProfilerPostCommitImpl,
  16346. finishedWork,
  16347. finishedWork.alternate,
  16348. commitStartTime,
  16349. finishedRoot.passiveEffectDuration
  16350. );
  16351. } catch (error) {
  16352. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  16353. }
  16354. } else
  16355. recursivelyTraversePassiveMountEffects(
  16356. finishedRoot,
  16357. finishedWork,
  16358. committedLanes,
  16359. committedTransitions,
  16360. endTime
  16361. );
  16362. break;
  16363. case 31:
  16364. flags = inHydratedSubtree;
  16365. prevProfilerEffectDuration =
  16366. null !== finishedWork.alternate
  16367. ? finishedWork.alternate.memoizedState
  16368. : null;
  16369. wasInHydratedSubtree = finishedWork.memoizedState;
  16370. null !== prevProfilerEffectDuration && null === wasInHydratedSubtree
  16371. ? ((wasInHydratedSubtree = finishedWork.deletions),
  16372. null !== wasInHydratedSubtree &&
  16373. 0 < wasInHydratedSubtree.length &&
  16374. 18 === wasInHydratedSubtree[0].tag
  16375. ? ((inHydratedSubtree = false),
  16376. (prevProfilerEffectDuration =
  16377. prevProfilerEffectDuration.hydrationErrors),
  16378. null !== prevProfilerEffectDuration &&
  16379. logComponentErrored(
  16380. finishedWork,
  16381. finishedWork.actualStartTime,
  16382. endTime,
  16383. prevProfilerEffectDuration
  16384. ))
  16385. : (inHydratedSubtree = true))
  16386. : (inHydratedSubtree = false);
  16387. recursivelyTraversePassiveMountEffects(
  16388. finishedRoot,
  16389. finishedWork,
  16390. committedLanes,
  16391. committedTransitions,
  16392. endTime
  16393. );
  16394. inHydratedSubtree = flags;
  16395. break;
  16396. case 13:
  16397. flags = inHydratedSubtree;
  16398. prevProfilerEffectDuration =
  16399. null !== finishedWork.alternate
  16400. ? finishedWork.alternate.memoizedState
  16401. : null;
  16402. wasInHydratedSubtree = finishedWork.memoizedState;
  16403. null === prevProfilerEffectDuration ||
  16404. null === prevProfilerEffectDuration.dehydrated ||
  16405. (null !== wasInHydratedSubtree &&
  16406. null !== wasInHydratedSubtree.dehydrated)
  16407. ? (inHydratedSubtree = false)
  16408. : ((wasInHydratedSubtree = finishedWork.deletions),
  16409. null !== wasInHydratedSubtree &&
  16410. 0 < wasInHydratedSubtree.length &&
  16411. 18 === wasInHydratedSubtree[0].tag
  16412. ? ((inHydratedSubtree = false),
  16413. (prevProfilerEffectDuration =
  16414. prevProfilerEffectDuration.hydrationErrors),
  16415. null !== prevProfilerEffectDuration &&
  16416. logComponentErrored(
  16417. finishedWork,
  16418. finishedWork.actualStartTime,
  16419. endTime,
  16420. prevProfilerEffectDuration
  16421. ))
  16422. : (inHydratedSubtree = true));
  16423. recursivelyTraversePassiveMountEffects(
  16424. finishedRoot,
  16425. finishedWork,
  16426. committedLanes,
  16427. committedTransitions,
  16428. endTime
  16429. );
  16430. inHydratedSubtree = flags;
  16431. break;
  16432. case 23:
  16433. break;
  16434. case 22:
  16435. wasInHydratedSubtree = finishedWork.stateNode;
  16436. prevProfilerEffectDuration = finishedWork.alternate;
  16437. null !== finishedWork.memoizedState
  16438. ? wasInHydratedSubtree._visibility &
  16439. OffscreenPassiveEffectsConnected
  16440. ? recursivelyTraversePassiveMountEffects(
  16441. finishedRoot,
  16442. finishedWork,
  16443. committedLanes,
  16444. committedTransitions,
  16445. endTime
  16446. )
  16447. : recursivelyTraverseAtomicPassiveEffects(
  16448. finishedRoot,
  16449. finishedWork,
  16450. committedLanes,
  16451. committedTransitions,
  16452. endTime
  16453. )
  16454. : wasInHydratedSubtree._visibility &
  16455. OffscreenPassiveEffectsConnected
  16456. ? recursivelyTraversePassiveMountEffects(
  16457. finishedRoot,
  16458. finishedWork,
  16459. committedLanes,
  16460. committedTransitions,
  16461. endTime
  16462. )
  16463. : ((wasInHydratedSubtree._visibility |=
  16464. OffscreenPassiveEffectsConnected),
  16465. recursivelyTraverseReconnectPassiveEffects(
  16466. finishedRoot,
  16467. finishedWork,
  16468. committedLanes,
  16469. committedTransitions,
  16470. 0 !== (finishedWork.subtreeFlags & 10256) ||
  16471. (0 !== finishedWork.actualDuration &&
  16472. (null === finishedWork.alternate ||
  16473. finishedWork.alternate.child !== finishedWork.child)),
  16474. endTime
  16475. ),
  16476. (finishedWork.mode & ProfileMode) === NoMode ||
  16477. inHydratedSubtree ||
  16478. ((finishedRoot = finishedWork.actualStartTime),
  16479. 0 <= finishedRoot &&
  16480. 0.05 < endTime - finishedRoot &&
  16481. logComponentReappeared(finishedWork, finishedRoot, endTime),
  16482. 0 <= componentEffectStartTime &&
  16483. 0 <= componentEffectEndTime &&
  16484. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  16485. logComponentReappeared(
  16486. finishedWork,
  16487. componentEffectStartTime,
  16488. componentEffectEndTime
  16489. )));
  16490. flags & 2048 &&
  16491. commitOffscreenPassiveMountEffects(
  16492. prevProfilerEffectDuration,
  16493. finishedWork
  16494. );
  16495. break;
  16496. case 24:
  16497. recursivelyTraversePassiveMountEffects(
  16498. finishedRoot,
  16499. finishedWork,
  16500. committedLanes,
  16501. committedTransitions,
  16502. endTime
  16503. );
  16504. flags & 2048 &&
  16505. commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
  16506. break;
  16507. default:
  16508. recursivelyTraversePassiveMountEffects(
  16509. finishedRoot,
  16510. finishedWork,
  16511. committedLanes,
  16512. committedTransitions,
  16513. endTime
  16514. );
  16515. }
  16516. if ((finishedWork.mode & ProfileMode) !== NoMode) {
  16517. if (
  16518. (finishedRoot =
  16519. !inHydratedSubtree &&
  16520. null === finishedWork.alternate &&
  16521. null !== finishedWork.return &&
  16522. null !== finishedWork.return.alternate)
  16523. )
  16524. (committedLanes = finishedWork.actualStartTime),
  16525. 0 <= committedLanes &&
  16526. 0.05 < endTime - committedLanes &&
  16527. logComponentTrigger(
  16528. finishedWork,
  16529. committedLanes,
  16530. endTime,
  16531. "Mount"
  16532. );
  16533. 0 <= componentEffectStartTime &&
  16534. 0 <= componentEffectEndTime &&
  16535. ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  16536. logComponentEffect(
  16537. finishedWork,
  16538. componentEffectStartTime,
  16539. componentEffectEndTime,
  16540. componentEffectDuration,
  16541. componentEffectErrors
  16542. ),
  16543. finishedRoot &&
  16544. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  16545. logComponentTrigger(
  16546. finishedWork,
  16547. componentEffectStartTime,
  16548. componentEffectEndTime,
  16549. "Mount"
  16550. ));
  16551. }
  16552. popComponentEffectStart(prevEffectStart);
  16553. popComponentEffectDuration(prevEffectDuration);
  16554. componentEffectErrors = prevEffectErrors;
  16555. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  16556. alreadyWarnedForDeepEquality = prevDeepEquality;
  16557. }
  16558. function recursivelyTraverseReconnectPassiveEffects(
  16559. finishedRoot,
  16560. parentFiber,
  16561. committedLanes,
  16562. committedTransitions,
  16563. includeWorkInProgressEffects,
  16564. endTime
  16565. ) {
  16566. includeWorkInProgressEffects =
  16567. includeWorkInProgressEffects &&
  16568. (0 !== (parentFiber.subtreeFlags & 10256) ||
  16569. (0 !== parentFiber.actualDuration &&
  16570. (null === parentFiber.alternate ||
  16571. parentFiber.alternate.child !== parentFiber.child)));
  16572. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  16573. var nextSibling = parentFiber.sibling;
  16574. reconnectPassiveEffects(
  16575. finishedRoot,
  16576. parentFiber,
  16577. committedLanes,
  16578. committedTransitions,
  16579. includeWorkInProgressEffects,
  16580. null !== nextSibling ? nextSibling.actualStartTime : endTime
  16581. );
  16582. parentFiber = nextSibling;
  16583. }
  16584. }
  16585. function reconnectPassiveEffects(
  16586. finishedRoot,
  16587. finishedWork,
  16588. committedLanes,
  16589. committedTransitions,
  16590. includeWorkInProgressEffects,
  16591. endTime
  16592. ) {
  16593. var prevEffectStart = pushComponentEffectStart(),
  16594. prevEffectDuration = pushComponentEffectDuration(),
  16595. prevEffectErrors = pushComponentEffectErrors(),
  16596. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(),
  16597. prevDeepEquality = alreadyWarnedForDeepEquality;
  16598. includeWorkInProgressEffects &&
  16599. (finishedWork.mode & ProfileMode) !== NoMode &&
  16600. 0 < finishedWork.actualStartTime &&
  16601. 0 !== (finishedWork.flags & 1) &&
  16602. logComponentRender(
  16603. finishedWork,
  16604. finishedWork.actualStartTime,
  16605. endTime,
  16606. inHydratedSubtree,
  16607. committedLanes
  16608. );
  16609. var flags = finishedWork.flags;
  16610. switch (finishedWork.tag) {
  16611. case 0:
  16612. case 11:
  16613. case 15:
  16614. recursivelyTraverseReconnectPassiveEffects(
  16615. finishedRoot,
  16616. finishedWork,
  16617. committedLanes,
  16618. committedTransitions,
  16619. includeWorkInProgressEffects,
  16620. endTime
  16621. );
  16622. commitHookPassiveMountEffects(finishedWork, Passive);
  16623. break;
  16624. case 23:
  16625. break;
  16626. case 22:
  16627. var _instance2 = finishedWork.stateNode;
  16628. null !== finishedWork.memoizedState
  16629. ? _instance2._visibility & OffscreenPassiveEffectsConnected
  16630. ? recursivelyTraverseReconnectPassiveEffects(
  16631. finishedRoot,
  16632. finishedWork,
  16633. committedLanes,
  16634. committedTransitions,
  16635. includeWorkInProgressEffects,
  16636. endTime
  16637. )
  16638. : recursivelyTraverseAtomicPassiveEffects(
  16639. finishedRoot,
  16640. finishedWork,
  16641. committedLanes,
  16642. committedTransitions,
  16643. endTime
  16644. )
  16645. : ((_instance2._visibility |= OffscreenPassiveEffectsConnected),
  16646. recursivelyTraverseReconnectPassiveEffects(
  16647. finishedRoot,
  16648. finishedWork,
  16649. committedLanes,
  16650. committedTransitions,
  16651. includeWorkInProgressEffects,
  16652. endTime
  16653. ));
  16654. includeWorkInProgressEffects &&
  16655. flags & 2048 &&
  16656. commitOffscreenPassiveMountEffects(
  16657. finishedWork.alternate,
  16658. finishedWork
  16659. );
  16660. break;
  16661. case 24:
  16662. recursivelyTraverseReconnectPassiveEffects(
  16663. finishedRoot,
  16664. finishedWork,
  16665. committedLanes,
  16666. committedTransitions,
  16667. includeWorkInProgressEffects,
  16668. endTime
  16669. );
  16670. includeWorkInProgressEffects &&
  16671. flags & 2048 &&
  16672. commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
  16673. break;
  16674. default:
  16675. recursivelyTraverseReconnectPassiveEffects(
  16676. finishedRoot,
  16677. finishedWork,
  16678. committedLanes,
  16679. committedTransitions,
  16680. includeWorkInProgressEffects,
  16681. endTime
  16682. );
  16683. }
  16684. (finishedWork.mode & ProfileMode) !== NoMode &&
  16685. 0 <= componentEffectStartTime &&
  16686. 0 <= componentEffectEndTime &&
  16687. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  16688. logComponentEffect(
  16689. finishedWork,
  16690. componentEffectStartTime,
  16691. componentEffectEndTime,
  16692. componentEffectDuration,
  16693. componentEffectErrors
  16694. );
  16695. popComponentEffectStart(prevEffectStart);
  16696. popComponentEffectDuration(prevEffectDuration);
  16697. componentEffectErrors = prevEffectErrors;
  16698. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  16699. alreadyWarnedForDeepEquality = prevDeepEquality;
  16700. }
  16701. function recursivelyTraverseAtomicPassiveEffects(
  16702. finishedRoot$jscomp$0,
  16703. parentFiber,
  16704. committedLanes$jscomp$0,
  16705. committedTransitions$jscomp$0,
  16706. endTime$jscomp$0
  16707. ) {
  16708. if (
  16709. parentFiber.subtreeFlags & 10256 ||
  16710. (0 !== parentFiber.actualDuration &&
  16711. (null === parentFiber.alternate ||
  16712. parentFiber.alternate.child !== parentFiber.child))
  16713. )
  16714. for (var child = parentFiber.child; null !== child; ) {
  16715. parentFiber = child.sibling;
  16716. var finishedRoot = finishedRoot$jscomp$0,
  16717. committedLanes = committedLanes$jscomp$0,
  16718. committedTransitions = committedTransitions$jscomp$0,
  16719. endTime =
  16720. null !== parentFiber
  16721. ? parentFiber.actualStartTime
  16722. : endTime$jscomp$0,
  16723. prevDeepEquality = alreadyWarnedForDeepEquality;
  16724. (child.mode & ProfileMode) !== NoMode &&
  16725. 0 < child.actualStartTime &&
  16726. 0 !== (child.flags & 1) &&
  16727. logComponentRender(
  16728. child,
  16729. child.actualStartTime,
  16730. endTime,
  16731. inHydratedSubtree,
  16732. committedLanes
  16733. );
  16734. var flags = child.flags;
  16735. switch (child.tag) {
  16736. case 22:
  16737. recursivelyTraverseAtomicPassiveEffects(
  16738. finishedRoot,
  16739. child,
  16740. committedLanes,
  16741. committedTransitions,
  16742. endTime
  16743. );
  16744. flags & 2048 &&
  16745. commitOffscreenPassiveMountEffects(child.alternate, child);
  16746. break;
  16747. case 24:
  16748. recursivelyTraverseAtomicPassiveEffects(
  16749. finishedRoot,
  16750. child,
  16751. committedLanes,
  16752. committedTransitions,
  16753. endTime
  16754. );
  16755. flags & 2048 &&
  16756. commitCachePassiveMountEffect(child.alternate, child);
  16757. break;
  16758. default:
  16759. recursivelyTraverseAtomicPassiveEffects(
  16760. finishedRoot,
  16761. child,
  16762. committedLanes,
  16763. committedTransitions,
  16764. endTime
  16765. );
  16766. }
  16767. alreadyWarnedForDeepEquality = prevDeepEquality;
  16768. child = parentFiber;
  16769. }
  16770. }
  16771. function recursivelyAccumulateSuspenseyCommit(
  16772. parentFiber,
  16773. committedLanes,
  16774. suspendedState
  16775. ) {
  16776. if (parentFiber.subtreeFlags & suspenseyCommitFlag)
  16777. for (parentFiber = parentFiber.child; null !== parentFiber; )
  16778. accumulateSuspenseyCommitOnFiber(
  16779. parentFiber,
  16780. committedLanes,
  16781. suspendedState
  16782. ),
  16783. (parentFiber = parentFiber.sibling);
  16784. }
  16785. function accumulateSuspenseyCommitOnFiber(
  16786. fiber,
  16787. committedLanes,
  16788. suspendedState
  16789. ) {
  16790. switch (fiber.tag) {
  16791. case 26:
  16792. recursivelyAccumulateSuspenseyCommit(
  16793. fiber,
  16794. committedLanes,
  16795. suspendedState
  16796. );
  16797. fiber.flags & suspenseyCommitFlag &&
  16798. null !== fiber.memoizedState &&
  16799. suspendResource(
  16800. suspendedState,
  16801. currentHoistableRoot,
  16802. fiber.memoizedState,
  16803. fiber.memoizedProps
  16804. );
  16805. break;
  16806. case 5:
  16807. recursivelyAccumulateSuspenseyCommit(
  16808. fiber,
  16809. committedLanes,
  16810. suspendedState
  16811. );
  16812. break;
  16813. case 3:
  16814. case 4:
  16815. var previousHoistableRoot = currentHoistableRoot;
  16816. currentHoistableRoot = getHoistableRoot(
  16817. fiber.stateNode.containerInfo
  16818. );
  16819. recursivelyAccumulateSuspenseyCommit(
  16820. fiber,
  16821. committedLanes,
  16822. suspendedState
  16823. );
  16824. currentHoistableRoot = previousHoistableRoot;
  16825. break;
  16826. case 22:
  16827. null === fiber.memoizedState &&
  16828. ((previousHoistableRoot = fiber.alternate),
  16829. null !== previousHoistableRoot &&
  16830. null !== previousHoistableRoot.memoizedState
  16831. ? ((previousHoistableRoot = suspenseyCommitFlag),
  16832. (suspenseyCommitFlag = 16777216),
  16833. recursivelyAccumulateSuspenseyCommit(
  16834. fiber,
  16835. committedLanes,
  16836. suspendedState
  16837. ),
  16838. (suspenseyCommitFlag = previousHoistableRoot))
  16839. : recursivelyAccumulateSuspenseyCommit(
  16840. fiber,
  16841. committedLanes,
  16842. suspendedState
  16843. ));
  16844. break;
  16845. default:
  16846. recursivelyAccumulateSuspenseyCommit(
  16847. fiber,
  16848. committedLanes,
  16849. suspendedState
  16850. );
  16851. }
  16852. }
  16853. function detachAlternateSiblings(parentFiber) {
  16854. var previousFiber = parentFiber.alternate;
  16855. if (
  16856. null !== previousFiber &&
  16857. ((parentFiber = previousFiber.child), null !== parentFiber)
  16858. ) {
  16859. previousFiber.child = null;
  16860. do
  16861. (previousFiber = parentFiber.sibling),
  16862. (parentFiber.sibling = null),
  16863. (parentFiber = previousFiber);
  16864. while (null !== parentFiber);
  16865. }
  16866. }
  16867. function recursivelyTraversePassiveUnmountEffects(parentFiber) {
  16868. var deletions = parentFiber.deletions;
  16869. if (0 !== (parentFiber.flags & 16)) {
  16870. if (null !== deletions)
  16871. for (var i = 0; i < deletions.length; i++) {
  16872. var childToDelete = deletions[i],
  16873. prevEffectStart = pushComponentEffectStart();
  16874. nextEffect = childToDelete;
  16875. commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  16876. childToDelete,
  16877. parentFiber
  16878. );
  16879. (childToDelete.mode & ProfileMode) !== NoMode &&
  16880. 0 <= componentEffectStartTime &&
  16881. 0 <= componentEffectEndTime &&
  16882. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  16883. logComponentTrigger(
  16884. childToDelete,
  16885. componentEffectStartTime,
  16886. componentEffectEndTime,
  16887. "Unmount"
  16888. );
  16889. popComponentEffectStart(prevEffectStart);
  16890. }
  16891. detachAlternateSiblings(parentFiber);
  16892. }
  16893. if (parentFiber.subtreeFlags & 10256)
  16894. for (parentFiber = parentFiber.child; null !== parentFiber; )
  16895. commitPassiveUnmountOnFiber(parentFiber),
  16896. (parentFiber = parentFiber.sibling);
  16897. }
  16898. function commitPassiveUnmountOnFiber(finishedWork) {
  16899. var prevEffectStart = pushComponentEffectStart(),
  16900. prevEffectDuration = pushComponentEffectDuration(),
  16901. prevEffectErrors = pushComponentEffectErrors(),
  16902. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  16903. switch (finishedWork.tag) {
  16904. case 0:
  16905. case 11:
  16906. case 15:
  16907. recursivelyTraversePassiveUnmountEffects(finishedWork);
  16908. finishedWork.flags & 2048 &&
  16909. commitHookPassiveUnmountEffects(
  16910. finishedWork,
  16911. finishedWork.return,
  16912. Passive | HasEffect
  16913. );
  16914. break;
  16915. case 3:
  16916. var prevProfilerEffectDuration = pushNestedEffectDurations();
  16917. recursivelyTraversePassiveUnmountEffects(finishedWork);
  16918. finishedWork.stateNode.passiveEffectDuration +=
  16919. popNestedEffectDurations(prevProfilerEffectDuration);
  16920. break;
  16921. case 12:
  16922. prevProfilerEffectDuration = pushNestedEffectDurations();
  16923. recursivelyTraversePassiveUnmountEffects(finishedWork);
  16924. finishedWork.stateNode.passiveEffectDuration +=
  16925. bubbleNestedEffectDurations(prevProfilerEffectDuration);
  16926. break;
  16927. case 22:
  16928. prevProfilerEffectDuration = finishedWork.stateNode;
  16929. null !== finishedWork.memoizedState &&
  16930. prevProfilerEffectDuration._visibility &
  16931. OffscreenPassiveEffectsConnected &&
  16932. (null === finishedWork.return || 13 !== finishedWork.return.tag)
  16933. ? ((prevProfilerEffectDuration._visibility &=
  16934. ~OffscreenPassiveEffectsConnected),
  16935. recursivelyTraverseDisconnectPassiveEffects(finishedWork),
  16936. (finishedWork.mode & ProfileMode) !== NoMode &&
  16937. 0 <= componentEffectStartTime &&
  16938. 0 <= componentEffectEndTime &&
  16939. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  16940. logComponentTrigger(
  16941. finishedWork,
  16942. componentEffectStartTime,
  16943. componentEffectEndTime,
  16944. "Disconnect"
  16945. ))
  16946. : recursivelyTraversePassiveUnmountEffects(finishedWork);
  16947. break;
  16948. default:
  16949. recursivelyTraversePassiveUnmountEffects(finishedWork);
  16950. }
  16951. (finishedWork.mode & ProfileMode) !== NoMode &&
  16952. 0 <= componentEffectStartTime &&
  16953. 0 <= componentEffectEndTime &&
  16954. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  16955. logComponentEffect(
  16956. finishedWork,
  16957. componentEffectStartTime,
  16958. componentEffectEndTime,
  16959. componentEffectDuration,
  16960. componentEffectErrors
  16961. );
  16962. popComponentEffectStart(prevEffectStart);
  16963. popComponentEffectDuration(prevEffectDuration);
  16964. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  16965. componentEffectErrors = prevEffectErrors;
  16966. }
  16967. function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
  16968. var deletions = parentFiber.deletions;
  16969. if (0 !== (parentFiber.flags & 16)) {
  16970. if (null !== deletions)
  16971. for (var i = 0; i < deletions.length; i++) {
  16972. var childToDelete = deletions[i],
  16973. prevEffectStart = pushComponentEffectStart();
  16974. nextEffect = childToDelete;
  16975. commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  16976. childToDelete,
  16977. parentFiber
  16978. );
  16979. (childToDelete.mode & ProfileMode) !== NoMode &&
  16980. 0 <= componentEffectStartTime &&
  16981. 0 <= componentEffectEndTime &&
  16982. 0.05 < componentEffectEndTime - componentEffectStartTime &&
  16983. logComponentTrigger(
  16984. childToDelete,
  16985. componentEffectStartTime,
  16986. componentEffectEndTime,
  16987. "Unmount"
  16988. );
  16989. popComponentEffectStart(prevEffectStart);
  16990. }
  16991. detachAlternateSiblings(parentFiber);
  16992. }
  16993. for (parentFiber = parentFiber.child; null !== parentFiber; )
  16994. disconnectPassiveEffect(parentFiber),
  16995. (parentFiber = parentFiber.sibling);
  16996. }
  16997. function disconnectPassiveEffect(finishedWork) {
  16998. var prevEffectStart = pushComponentEffectStart(),
  16999. prevEffectDuration = pushComponentEffectDuration(),
  17000. prevEffectErrors = pushComponentEffectErrors(),
  17001. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  17002. switch (finishedWork.tag) {
  17003. case 0:
  17004. case 11:
  17005. case 15:
  17006. commitHookPassiveUnmountEffects(
  17007. finishedWork,
  17008. finishedWork.return,
  17009. Passive
  17010. );
  17011. recursivelyTraverseDisconnectPassiveEffects(finishedWork);
  17012. break;
  17013. case 22:
  17014. var instance = finishedWork.stateNode;
  17015. instance._visibility & OffscreenPassiveEffectsConnected &&
  17016. ((instance._visibility &= ~OffscreenPassiveEffectsConnected),
  17017. recursivelyTraverseDisconnectPassiveEffects(finishedWork));
  17018. break;
  17019. default:
  17020. recursivelyTraverseDisconnectPassiveEffects(finishedWork);
  17021. }
  17022. (finishedWork.mode & ProfileMode) !== NoMode &&
  17023. 0 <= componentEffectStartTime &&
  17024. 0 <= componentEffectEndTime &&
  17025. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  17026. logComponentEffect(
  17027. finishedWork,
  17028. componentEffectStartTime,
  17029. componentEffectEndTime,
  17030. componentEffectDuration,
  17031. componentEffectErrors
  17032. );
  17033. popComponentEffectStart(prevEffectStart);
  17034. popComponentEffectDuration(prevEffectDuration);
  17035. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  17036. componentEffectErrors = prevEffectErrors;
  17037. }
  17038. function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
  17039. deletedSubtreeRoot,
  17040. nearestMountedAncestor$jscomp$0
  17041. ) {
  17042. for (; null !== nextEffect; ) {
  17043. var fiber = nextEffect,
  17044. current = fiber,
  17045. nearestMountedAncestor = nearestMountedAncestor$jscomp$0,
  17046. prevEffectStart = pushComponentEffectStart(),
  17047. prevEffectDuration = pushComponentEffectDuration(),
  17048. prevEffectErrors = pushComponentEffectErrors(),
  17049. prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
  17050. switch (current.tag) {
  17051. case 0:
  17052. case 11:
  17053. case 15:
  17054. commitHookPassiveUnmountEffects(
  17055. current,
  17056. nearestMountedAncestor,
  17057. Passive
  17058. );
  17059. break;
  17060. case 23:
  17061. case 22:
  17062. null !== current.memoizedState &&
  17063. null !== current.memoizedState.cachePool &&
  17064. ((nearestMountedAncestor = current.memoizedState.cachePool.pool),
  17065. null != nearestMountedAncestor &&
  17066. retainCache(nearestMountedAncestor));
  17067. break;
  17068. case 24:
  17069. releaseCache(current.memoizedState.cache);
  17070. }
  17071. (current.mode & ProfileMode) !== NoMode &&
  17072. 0 <= componentEffectStartTime &&
  17073. 0 <= componentEffectEndTime &&
  17074. (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) &&
  17075. logComponentEffect(
  17076. current,
  17077. componentEffectStartTime,
  17078. componentEffectEndTime,
  17079. componentEffectDuration,
  17080. componentEffectErrors
  17081. );
  17082. popComponentEffectStart(prevEffectStart);
  17083. popComponentEffectDuration(prevEffectDuration);
  17084. componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
  17085. componentEffectErrors = prevEffectErrors;
  17086. current = fiber.child;
  17087. if (null !== current) (current.return = fiber), (nextEffect = current);
  17088. else
  17089. a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
  17090. current = nextEffect;
  17091. prevEffectStart = current.sibling;
  17092. prevEffectDuration = current.return;
  17093. detachFiberAfterEffects(current);
  17094. if (current === fiber) {
  17095. nextEffect = null;
  17096. break a;
  17097. }
  17098. if (null !== prevEffectStart) {
  17099. prevEffectStart.return = prevEffectDuration;
  17100. nextEffect = prevEffectStart;
  17101. break a;
  17102. }
  17103. nextEffect = prevEffectDuration;
  17104. }
  17105. }
  17106. }
  17107. function onCommitRoot() {
  17108. commitHooks.forEach(function (commitHook) {
  17109. return commitHook();
  17110. });
  17111. }
  17112. function isConcurrentActEnvironment() {
  17113. var isReactActEnvironmentGlobal =
  17114. "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT
  17115. ? IS_REACT_ACT_ENVIRONMENT
  17116. : void 0;
  17117. isReactActEnvironmentGlobal ||
  17118. null === ReactSharedInternals.actQueue ||
  17119. console.error(
  17120. "The current testing environment is not configured to support act(...)"
  17121. );
  17122. return isReactActEnvironmentGlobal;
  17123. }
  17124. function requestUpdateLane(fiber) {
  17125. if (
  17126. (executionContext & RenderContext) !== NoContext &&
  17127. 0 !== workInProgressRootRenderLanes
  17128. )
  17129. return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
  17130. var transition = ReactSharedInternals.T;
  17131. return null !== transition
  17132. ? (transition._updatedFibers || (transition._updatedFibers = new Set()),
  17133. transition._updatedFibers.add(fiber),
  17134. requestTransitionLane())
  17135. : resolveUpdatePriority();
  17136. }
  17137. function requestDeferredLane() {
  17138. if (0 === workInProgressDeferredLane)
  17139. if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {
  17140. var lane = nextTransitionDeferredLane;
  17141. nextTransitionDeferredLane <<= 1;
  17142. 0 === (nextTransitionDeferredLane & 3932160) &&
  17143. (nextTransitionDeferredLane = 262144);
  17144. workInProgressDeferredLane = lane;
  17145. } else workInProgressDeferredLane = 536870912;
  17146. lane = suspenseHandlerStackCursor.current;
  17147. null !== lane && (lane.flags |= 32);
  17148. return workInProgressDeferredLane;
  17149. }
  17150. function scheduleUpdateOnFiber(root, fiber, lane) {
  17151. isRunningInsertionEffect &&
  17152. console.error("useInsertionEffect must not schedule updates.");
  17153. isFlushingPassiveEffects && (didScheduleUpdateDuringPassiveEffects = true);
  17154. if (
  17155. (root === workInProgressRoot &&
  17156. (workInProgressSuspendedReason === SuspendedOnData ||
  17157. workInProgressSuspendedReason === SuspendedOnAction)) ||
  17158. null !== root.cancelPendingCommit
  17159. )
  17160. prepareFreshStack(root, 0),
  17161. markRootSuspended(
  17162. root,
  17163. workInProgressRootRenderLanes,
  17164. workInProgressDeferredLane,
  17165. false
  17166. );
  17167. markRootUpdated$1(root, lane);
  17168. if (
  17169. (executionContext & RenderContext) !== NoContext &&
  17170. root === workInProgressRoot
  17171. ) {
  17172. if (isRendering)
  17173. switch (fiber.tag) {
  17174. case 0:
  17175. case 11:
  17176. case 15:
  17177. root =
  17178. (workInProgress && getComponentNameFromFiber(workInProgress)) ||
  17179. "Unknown";
  17180. didWarnAboutUpdateInRenderForAnotherComponent.has(root) ||
  17181. (didWarnAboutUpdateInRenderForAnotherComponent.add(root),
  17182. (fiber = getComponentNameFromFiber(fiber) || "Unknown"),
  17183. console.error(
  17184. "Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",
  17185. fiber,
  17186. root,
  17187. root
  17188. ));
  17189. break;
  17190. case 1:
  17191. didWarnAboutUpdateInRender ||
  17192. (console.error(
  17193. "Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."
  17194. ),
  17195. (didWarnAboutUpdateInRender = true));
  17196. }
  17197. } else
  17198. isDevToolsPresent && addFiberToLanesMap(root, fiber, lane),
  17199. warnIfUpdatesNotWrappedWithActDEV(fiber),
  17200. root === workInProgressRoot &&
  17201. ((executionContext & RenderContext) === NoContext &&
  17202. (workInProgressRootInterleavedUpdatedLanes |= lane),
  17203. workInProgressRootExitStatus === RootSuspendedWithDelay &&
  17204. markRootSuspended(
  17205. root,
  17206. workInProgressRootRenderLanes,
  17207. workInProgressDeferredLane,
  17208. false
  17209. )),
  17210. ensureRootIsScheduled(root);
  17211. }
  17212. function performWorkOnRoot(root, lanes, forceSync) {
  17213. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  17214. throw Error("Should not already be working.");
  17215. if (0 !== workInProgressRootRenderLanes && null !== workInProgress) {
  17216. var yieldedFiber = workInProgress,
  17217. yieldEndTime = now$1();
  17218. switch (yieldReason) {
  17219. case SuspendedOnImmediate:
  17220. case SuspendedOnData:
  17221. var startTime = yieldStartTime;
  17222. supportsUserTiming &&
  17223. ((yieldedFiber = yieldedFiber._debugTask)
  17224. ? yieldedFiber.run(
  17225. console.timeStamp.bind(
  17226. console,
  17227. "Suspended",
  17228. startTime,
  17229. yieldEndTime,
  17230. COMPONENTS_TRACK,
  17231. void 0,
  17232. "primary-light"
  17233. )
  17234. )
  17235. : console.timeStamp(
  17236. "Suspended",
  17237. startTime,
  17238. yieldEndTime,
  17239. COMPONENTS_TRACK,
  17240. void 0,
  17241. "primary-light"
  17242. ));
  17243. break;
  17244. case SuspendedOnAction:
  17245. startTime = yieldStartTime;
  17246. supportsUserTiming &&
  17247. ((yieldedFiber = yieldedFiber._debugTask)
  17248. ? yieldedFiber.run(
  17249. console.timeStamp.bind(
  17250. console,
  17251. "Action",
  17252. startTime,
  17253. yieldEndTime,
  17254. COMPONENTS_TRACK,
  17255. void 0,
  17256. "primary-light"
  17257. )
  17258. )
  17259. : console.timeStamp(
  17260. "Action",
  17261. startTime,
  17262. yieldEndTime,
  17263. COMPONENTS_TRACK,
  17264. void 0,
  17265. "primary-light"
  17266. ));
  17267. break;
  17268. default:
  17269. supportsUserTiming &&
  17270. ((yieldedFiber = yieldEndTime - yieldStartTime),
  17271. 3 > yieldedFiber ||
  17272. console.timeStamp(
  17273. "Blocked",
  17274. yieldStartTime,
  17275. yieldEndTime,
  17276. COMPONENTS_TRACK,
  17277. void 0,
  17278. 5 > yieldedFiber
  17279. ? "primary-light"
  17280. : 10 > yieldedFiber
  17281. ? "primary"
  17282. : 100 > yieldedFiber
  17283. ? "primary-dark"
  17284. : "error"
  17285. ));
  17286. }
  17287. }
  17288. startTime = (forceSync =
  17289. (!forceSync &&
  17290. 0 === (lanes & 127) &&
  17291. 0 === (lanes & root.expiredLanes)) ||
  17292. checkIfRootIsPrerendering(root, lanes))
  17293. ? renderRootConcurrent(root, lanes)
  17294. : renderRootSync(root, lanes, true);
  17295. var renderWasConcurrent = forceSync;
  17296. do {
  17297. if (startTime === RootInProgress) {
  17298. workInProgressRootIsPrerendering &&
  17299. !forceSync &&
  17300. markRootSuspended(root, lanes, 0, false);
  17301. lanes = workInProgressSuspendedReason;
  17302. yieldStartTime = now();
  17303. yieldReason = lanes;
  17304. break;
  17305. } else {
  17306. yieldedFiber = now$1();
  17307. yieldEndTime = root.current.alternate;
  17308. if (
  17309. renderWasConcurrent &&
  17310. !isRenderConsistentWithExternalStores(yieldEndTime)
  17311. ) {
  17312. setCurrentTrackFromLanes(lanes);
  17313. yieldEndTime = renderStartTime;
  17314. startTime = yieldedFiber;
  17315. !supportsUserTiming ||
  17316. startTime <= yieldEndTime ||
  17317. (workInProgressUpdateTask
  17318. ? workInProgressUpdateTask.run(
  17319. console.timeStamp.bind(
  17320. console,
  17321. "Teared Render",
  17322. yieldEndTime,
  17323. startTime,
  17324. currentTrack,
  17325. LANES_TRACK_GROUP,
  17326. "error"
  17327. )
  17328. )
  17329. : console.timeStamp(
  17330. "Teared Render",
  17331. yieldEndTime,
  17332. startTime,
  17333. currentTrack,
  17334. LANES_TRACK_GROUP,
  17335. "error"
  17336. ));
  17337. finalizeRender(lanes, yieldedFiber);
  17338. startTime = renderRootSync(root, lanes, false);
  17339. renderWasConcurrent = false;
  17340. continue;
  17341. }
  17342. if (startTime === RootErrored) {
  17343. renderWasConcurrent = lanes;
  17344. if (root.errorRecoveryDisabledLanes & renderWasConcurrent)
  17345. var errorRetryLanes = 0;
  17346. else
  17347. (errorRetryLanes = root.pendingLanes & -536870913),
  17348. (errorRetryLanes =
  17349. 0 !== errorRetryLanes
  17350. ? errorRetryLanes
  17351. : errorRetryLanes & 536870912
  17352. ? 536870912
  17353. : 0);
  17354. if (0 !== errorRetryLanes) {
  17355. setCurrentTrackFromLanes(lanes);
  17356. logErroredRenderPhase(
  17357. renderStartTime,
  17358. yieldedFiber,
  17359. lanes,
  17360. workInProgressUpdateTask
  17361. );
  17362. finalizeRender(lanes, yieldedFiber);
  17363. lanes = errorRetryLanes;
  17364. a: {
  17365. yieldedFiber = root;
  17366. startTime = renderWasConcurrent;
  17367. renderWasConcurrent = workInProgressRootConcurrentErrors;
  17368. var wasRootDehydrated =
  17369. yieldedFiber.current.memoizedState.isDehydrated;
  17370. wasRootDehydrated &&
  17371. (prepareFreshStack(yieldedFiber, errorRetryLanes).flags |=
  17372. 256);
  17373. errorRetryLanes = renderRootSync(
  17374. yieldedFiber,
  17375. errorRetryLanes,
  17376. false
  17377. );
  17378. if (errorRetryLanes !== RootErrored) {
  17379. if (
  17380. workInProgressRootDidAttachPingListener &&
  17381. !wasRootDehydrated
  17382. ) {
  17383. yieldedFiber.errorRecoveryDisabledLanes |= startTime;
  17384. workInProgressRootInterleavedUpdatedLanes |= startTime;
  17385. startTime = RootSuspendedWithDelay;
  17386. break a;
  17387. }
  17388. yieldedFiber = workInProgressRootRecoverableErrors;
  17389. workInProgressRootRecoverableErrors = renderWasConcurrent;
  17390. null !== yieldedFiber &&
  17391. (null === workInProgressRootRecoverableErrors
  17392. ? (workInProgressRootRecoverableErrors = yieldedFiber)
  17393. : workInProgressRootRecoverableErrors.push.apply(
  17394. workInProgressRootRecoverableErrors,
  17395. yieldedFiber
  17396. ));
  17397. }
  17398. startTime = errorRetryLanes;
  17399. }
  17400. renderWasConcurrent = false;
  17401. if (startTime !== RootErrored) continue;
  17402. else yieldedFiber = now$1();
  17403. }
  17404. }
  17405. if (startTime === RootFatalErrored) {
  17406. setCurrentTrackFromLanes(lanes);
  17407. logErroredRenderPhase(
  17408. renderStartTime,
  17409. yieldedFiber,
  17410. lanes,
  17411. workInProgressUpdateTask
  17412. );
  17413. finalizeRender(lanes, yieldedFiber);
  17414. prepareFreshStack(root, 0);
  17415. markRootSuspended(root, lanes, 0, true);
  17416. break;
  17417. }
  17418. a: {
  17419. forceSync = root;
  17420. switch (startTime) {
  17421. case RootInProgress:
  17422. case RootFatalErrored:
  17423. throw Error("Root did not complete. This is a bug in React.");
  17424. case RootSuspendedWithDelay:
  17425. if ((lanes & 4194048) !== lanes) break;
  17426. case RootSuspendedAtTheShell:
  17427. setCurrentTrackFromLanes(lanes);
  17428. logSuspendedRenderPhase(
  17429. renderStartTime,
  17430. yieldedFiber,
  17431. lanes,
  17432. workInProgressUpdateTask
  17433. );
  17434. finalizeRender(lanes, yieldedFiber);
  17435. yieldEndTime = lanes;
  17436. 0 !== (yieldEndTime & 127)
  17437. ? (blockingSuspendedTime = yieldedFiber)
  17438. : 0 !== (yieldEndTime & 4194048) &&
  17439. (transitionSuspendedTime = yieldedFiber);
  17440. markRootSuspended(
  17441. forceSync,
  17442. lanes,
  17443. workInProgressDeferredLane,
  17444. !workInProgressRootDidSkipSuspendedSiblings
  17445. );
  17446. break a;
  17447. case RootErrored:
  17448. workInProgressRootRecoverableErrors = null;
  17449. break;
  17450. case RootSuspended:
  17451. case RootCompleted:
  17452. break;
  17453. default:
  17454. throw Error("Unknown root exit status.");
  17455. }
  17456. if (null !== ReactSharedInternals.actQueue)
  17457. commitRoot(
  17458. forceSync,
  17459. yieldEndTime,
  17460. lanes,
  17461. workInProgressRootRecoverableErrors,
  17462. workInProgressTransitions,
  17463. workInProgressRootDidIncludeRecursiveRenderUpdate,
  17464. workInProgressDeferredLane,
  17465. workInProgressRootInterleavedUpdatedLanes,
  17466. workInProgressSuspendedRetryLanes,
  17467. startTime,
  17468. null,
  17469. null,
  17470. renderStartTime,
  17471. yieldedFiber
  17472. );
  17473. else {
  17474. if (
  17475. (lanes & 62914560) === lanes &&
  17476. ((renderWasConcurrent =
  17477. globalMostRecentFallbackTime +
  17478. FALLBACK_THROTTLE_MS -
  17479. now$1()),
  17480. 10 < renderWasConcurrent)
  17481. ) {
  17482. markRootSuspended(
  17483. forceSync,
  17484. lanes,
  17485. workInProgressDeferredLane,
  17486. !workInProgressRootDidSkipSuspendedSiblings
  17487. );
  17488. if (0 !== getNextLanes(forceSync, 0, true)) break a;
  17489. pendingEffectsLanes = lanes;
  17490. forceSync.timeoutHandle = scheduleTimeout(
  17491. commitRootWhenReady.bind(
  17492. null,
  17493. forceSync,
  17494. yieldEndTime,
  17495. workInProgressRootRecoverableErrors,
  17496. workInProgressTransitions,
  17497. workInProgressRootDidIncludeRecursiveRenderUpdate,
  17498. lanes,
  17499. workInProgressDeferredLane,
  17500. workInProgressRootInterleavedUpdatedLanes,
  17501. workInProgressSuspendedRetryLanes,
  17502. workInProgressRootDidSkipSuspendedSiblings,
  17503. startTime,
  17504. "Throttled",
  17505. renderStartTime,
  17506. yieldedFiber
  17507. ),
  17508. renderWasConcurrent
  17509. );
  17510. break a;
  17511. }
  17512. commitRootWhenReady(
  17513. forceSync,
  17514. yieldEndTime,
  17515. workInProgressRootRecoverableErrors,
  17516. workInProgressTransitions,
  17517. workInProgressRootDidIncludeRecursiveRenderUpdate,
  17518. lanes,
  17519. workInProgressDeferredLane,
  17520. workInProgressRootInterleavedUpdatedLanes,
  17521. workInProgressSuspendedRetryLanes,
  17522. workInProgressRootDidSkipSuspendedSiblings,
  17523. startTime,
  17524. null,
  17525. renderStartTime,
  17526. yieldedFiber
  17527. );
  17528. }
  17529. }
  17530. }
  17531. break;
  17532. } while (1);
  17533. ensureRootIsScheduled(root);
  17534. }
  17535. function commitRootWhenReady(
  17536. root,
  17537. finishedWork,
  17538. recoverableErrors,
  17539. transitions,
  17540. didIncludeRenderPhaseUpdate,
  17541. lanes,
  17542. spawnedLane,
  17543. updatedLanes,
  17544. suspendedRetryLanes,
  17545. didSkipSuspendedSiblings,
  17546. exitStatus,
  17547. suspendedCommitReason,
  17548. completedRenderStartTime,
  17549. completedRenderEndTime
  17550. ) {
  17551. root.timeoutHandle = noTimeout;
  17552. var subtreeFlags = finishedWork.subtreeFlags,
  17553. suspendedState = null;
  17554. if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408))
  17555. if (
  17556. ((suspendedState = {
  17557. stylesheets: null,
  17558. count: 0,
  17559. imgCount: 0,
  17560. imgBytes: 0,
  17561. suspenseyImages: [],
  17562. waitingForImages: true,
  17563. waitingForViewTransition: false,
  17564. unsuspend: noop$1
  17565. }),
  17566. accumulateSuspenseyCommitOnFiber(finishedWork, lanes, suspendedState),
  17567. (subtreeFlags =
  17568. (lanes & 62914560) === lanes
  17569. ? globalMostRecentFallbackTime - now$1()
  17570. : (lanes & 4194048) === lanes
  17571. ? globalMostRecentTransitionTime - now$1()
  17572. : 0),
  17573. (subtreeFlags = waitForCommitToBeReady(suspendedState, subtreeFlags)),
  17574. null !== subtreeFlags)
  17575. ) {
  17576. pendingEffectsLanes = lanes;
  17577. root.cancelPendingCommit = subtreeFlags(
  17578. commitRoot.bind(
  17579. null,
  17580. root,
  17581. finishedWork,
  17582. lanes,
  17583. recoverableErrors,
  17584. transitions,
  17585. didIncludeRenderPhaseUpdate,
  17586. spawnedLane,
  17587. updatedLanes,
  17588. suspendedRetryLanes,
  17589. exitStatus,
  17590. suspendedState,
  17591. suspendedState.waitingForViewTransition
  17592. ? "Waiting for the previous Animation"
  17593. : 0 < suspendedState.count
  17594. ? 0 < suspendedState.imgCount
  17595. ? "Suspended on CSS and Images"
  17596. : "Suspended on CSS"
  17597. : 1 === suspendedState.imgCount
  17598. ? "Suspended on an Image"
  17599. : 0 < suspendedState.imgCount
  17600. ? "Suspended on Images"
  17601. : null,
  17602. completedRenderStartTime,
  17603. completedRenderEndTime
  17604. )
  17605. );
  17606. markRootSuspended(
  17607. root,
  17608. lanes,
  17609. spawnedLane,
  17610. !didSkipSuspendedSiblings
  17611. );
  17612. return;
  17613. }
  17614. commitRoot(
  17615. root,
  17616. finishedWork,
  17617. lanes,
  17618. recoverableErrors,
  17619. transitions,
  17620. didIncludeRenderPhaseUpdate,
  17621. spawnedLane,
  17622. updatedLanes,
  17623. suspendedRetryLanes,
  17624. exitStatus,
  17625. suspendedState,
  17626. suspendedCommitReason,
  17627. completedRenderStartTime,
  17628. completedRenderEndTime
  17629. );
  17630. }
  17631. function isRenderConsistentWithExternalStores(finishedWork) {
  17632. for (var node = finishedWork; ; ) {
  17633. var tag = node.tag;
  17634. if (
  17635. (0 === tag || 11 === tag || 15 === tag) &&
  17636. node.flags & 16384 &&
  17637. ((tag = node.updateQueue),
  17638. null !== tag && ((tag = tag.stores), null !== tag))
  17639. )
  17640. for (var i = 0; i < tag.length; i++) {
  17641. var check = tag[i],
  17642. getSnapshot = check.getSnapshot;
  17643. check = check.value;
  17644. try {
  17645. if (!objectIs(getSnapshot(), check)) return !1;
  17646. } catch (error) {
  17647. return false;
  17648. }
  17649. }
  17650. tag = node.child;
  17651. if (node.subtreeFlags & 16384 && null !== tag)
  17652. (tag.return = node), (node = tag);
  17653. else {
  17654. if (node === finishedWork) break;
  17655. for (; null === node.sibling; ) {
  17656. if (null === node.return || node.return === finishedWork) return true;
  17657. node = node.return;
  17658. }
  17659. node.sibling.return = node.return;
  17660. node = node.sibling;
  17661. }
  17662. }
  17663. return true;
  17664. }
  17665. function markRootSuspended(
  17666. root,
  17667. suspendedLanes,
  17668. spawnedLane,
  17669. didAttemptEntireTree
  17670. ) {
  17671. suspendedLanes &= ~workInProgressRootPingedLanes;
  17672. suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
  17673. root.suspendedLanes |= suspendedLanes;
  17674. root.pingedLanes &= ~suspendedLanes;
  17675. didAttemptEntireTree && (root.warmLanes |= suspendedLanes);
  17676. didAttemptEntireTree = root.expirationTimes;
  17677. for (var lanes = suspendedLanes; 0 < lanes; ) {
  17678. var index = 31 - clz32(lanes),
  17679. lane = 1 << index;
  17680. didAttemptEntireTree[index] = -1;
  17681. lanes &= ~lane;
  17682. }
  17683. 0 !== spawnedLane &&
  17684. markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);
  17685. }
  17686. function flushSyncWork$1() {
  17687. return (executionContext & (RenderContext | CommitContext)) === NoContext
  17688. ? (flushSyncWorkAcrossRoots_impl(0), false)
  17689. : true;
  17690. }
  17691. function resetWorkInProgressStack() {
  17692. if (null !== workInProgress) {
  17693. if (workInProgressSuspendedReason === NotSuspended)
  17694. var interruptedWork = workInProgress.return;
  17695. else
  17696. (interruptedWork = workInProgress),
  17697. resetContextDependencies(),
  17698. resetHooksOnUnwind(interruptedWork),
  17699. (thenableState$1 = null),
  17700. (thenableIndexCounter$1 = 0),
  17701. (interruptedWork = workInProgress);
  17702. for (; null !== interruptedWork; )
  17703. unwindInterruptedWork(interruptedWork.alternate, interruptedWork),
  17704. (interruptedWork = interruptedWork.return);
  17705. workInProgress = null;
  17706. }
  17707. }
  17708. function finalizeRender(lanes, finalizationTime) {
  17709. 0 !== (lanes & 127) && (blockingClampTime = finalizationTime);
  17710. 0 !== (lanes & 4194048) && (transitionClampTime = finalizationTime);
  17711. 0 !== (lanes & 62914560) && (retryClampTime = finalizationTime);
  17712. 0 !== (lanes & 2080374784) && (idleClampTime = finalizationTime);
  17713. }
  17714. function prepareFreshStack(root, lanes) {
  17715. supportsUserTiming &&
  17716. (console.timeStamp(
  17717. "Blocking Track",
  17718. 0.003,
  17719. 0.003,
  17720. "Blocking",
  17721. LANES_TRACK_GROUP,
  17722. "primary-light"
  17723. ),
  17724. console.timeStamp(
  17725. "Transition Track",
  17726. 0.003,
  17727. 0.003,
  17728. "Transition",
  17729. LANES_TRACK_GROUP,
  17730. "primary-light"
  17731. ),
  17732. console.timeStamp(
  17733. "Suspense Track",
  17734. 0.003,
  17735. 0.003,
  17736. "Suspense",
  17737. LANES_TRACK_GROUP,
  17738. "primary-light"
  17739. ),
  17740. console.timeStamp(
  17741. "Idle Track",
  17742. 0.003,
  17743. 0.003,
  17744. "Idle",
  17745. LANES_TRACK_GROUP,
  17746. "primary-light"
  17747. ));
  17748. var previousRenderStartTime = renderStartTime;
  17749. renderStartTime = now();
  17750. if (0 !== workInProgressRootRenderLanes && 0 < previousRenderStartTime) {
  17751. setCurrentTrackFromLanes(workInProgressRootRenderLanes);
  17752. if (
  17753. workInProgressRootExitStatus === RootSuspended ||
  17754. workInProgressRootExitStatus === RootSuspendedWithDelay
  17755. )
  17756. logSuspendedRenderPhase(
  17757. previousRenderStartTime,
  17758. renderStartTime,
  17759. lanes,
  17760. workInProgressUpdateTask
  17761. );
  17762. else {
  17763. var endTime = renderStartTime,
  17764. debugTask = workInProgressUpdateTask;
  17765. if (supportsUserTiming && !(endTime <= previousRenderStartTime)) {
  17766. var color =
  17767. (lanes & 738197653) === lanes
  17768. ? "tertiary-dark"
  17769. : "primary-dark",
  17770. label =
  17771. (lanes & 536870912) === lanes
  17772. ? "Prewarm"
  17773. : (lanes & 201326741) === lanes
  17774. ? "Interrupted Hydration"
  17775. : "Interrupted Render";
  17776. debugTask
  17777. ? debugTask.run(
  17778. console.timeStamp.bind(
  17779. console,
  17780. label,
  17781. previousRenderStartTime,
  17782. endTime,
  17783. currentTrack,
  17784. LANES_TRACK_GROUP,
  17785. color
  17786. )
  17787. )
  17788. : console.timeStamp(
  17789. label,
  17790. previousRenderStartTime,
  17791. endTime,
  17792. currentTrack,
  17793. LANES_TRACK_GROUP,
  17794. color
  17795. );
  17796. }
  17797. }
  17798. finalizeRender(workInProgressRootRenderLanes, renderStartTime);
  17799. }
  17800. previousRenderStartTime = workInProgressUpdateTask;
  17801. workInProgressUpdateTask = null;
  17802. if (0 !== (lanes & 127)) {
  17803. workInProgressUpdateTask = blockingUpdateTask;
  17804. debugTask =
  17805. 0 <= blockingUpdateTime && blockingUpdateTime < blockingClampTime
  17806. ? blockingClampTime
  17807. : blockingUpdateTime;
  17808. endTime =
  17809. 0 <= blockingEventTime && blockingEventTime < blockingClampTime
  17810. ? blockingClampTime
  17811. : blockingEventTime;
  17812. color =
  17813. 0 <= endTime ? endTime : 0 <= debugTask ? debugTask : renderStartTime;
  17814. 0 <= blockingSuspendedTime
  17815. ? (setCurrentTrackFromLanes(2),
  17816. logSuspendedWithDelayPhase(
  17817. blockingSuspendedTime,
  17818. color,
  17819. lanes,
  17820. previousRenderStartTime
  17821. ))
  17822. : 0 !== (animatingLanes & 127);
  17823. previousRenderStartTime = debugTask;
  17824. var eventTime = endTime,
  17825. eventType = blockingEventType,
  17826. eventIsRepeat = 0 < blockingEventRepeatTime,
  17827. isSpawnedUpdate = blockingUpdateType === SPAWNED_UPDATE,
  17828. isPingedUpdate = blockingUpdateType === PINGED_UPDATE;
  17829. debugTask = renderStartTime;
  17830. endTime = blockingUpdateTask;
  17831. color = blockingUpdateMethodName;
  17832. label = blockingUpdateComponentName;
  17833. if (supportsUserTiming) {
  17834. currentTrack = "Blocking";
  17835. 0 < previousRenderStartTime
  17836. ? previousRenderStartTime > debugTask &&
  17837. (previousRenderStartTime = debugTask)
  17838. : (previousRenderStartTime = debugTask);
  17839. 0 < eventTime
  17840. ? eventTime > previousRenderStartTime &&
  17841. (eventTime = previousRenderStartTime)
  17842. : (eventTime = previousRenderStartTime);
  17843. if (null !== eventType && previousRenderStartTime > eventTime) {
  17844. var color$jscomp$0 = eventIsRepeat ? "secondary-light" : "warning";
  17845. endTime
  17846. ? endTime.run(
  17847. console.timeStamp.bind(
  17848. console,
  17849. eventIsRepeat ? "Consecutive" : "Event: " + eventType,
  17850. eventTime,
  17851. previousRenderStartTime,
  17852. currentTrack,
  17853. LANES_TRACK_GROUP,
  17854. color$jscomp$0
  17855. )
  17856. )
  17857. : console.timeStamp(
  17858. eventIsRepeat ? "Consecutive" : "Event: " + eventType,
  17859. eventTime,
  17860. previousRenderStartTime,
  17861. currentTrack,
  17862. LANES_TRACK_GROUP,
  17863. color$jscomp$0
  17864. );
  17865. }
  17866. debugTask > previousRenderStartTime &&
  17867. ((eventTime = isSpawnedUpdate
  17868. ? "error"
  17869. : (lanes & 738197653) === lanes
  17870. ? "tertiary-light"
  17871. : "primary-light"),
  17872. (isSpawnedUpdate = isPingedUpdate
  17873. ? "Promise Resolved"
  17874. : isSpawnedUpdate
  17875. ? "Cascading Update"
  17876. : 5 < debugTask - previousRenderStartTime
  17877. ? "Update Blocked"
  17878. : "Update"),
  17879. (isPingedUpdate = []),
  17880. null != label && isPingedUpdate.push(["Component name", label]),
  17881. null != color && isPingedUpdate.push(["Method name", color]),
  17882. (previousRenderStartTime = {
  17883. start: previousRenderStartTime,
  17884. end: debugTask,
  17885. detail: {
  17886. devtools: {
  17887. properties: isPingedUpdate,
  17888. track: currentTrack,
  17889. trackGroup: LANES_TRACK_GROUP,
  17890. color: eventTime
  17891. }
  17892. }
  17893. }),
  17894. endTime
  17895. ? endTime.run(
  17896. performance.measure.bind(
  17897. performance,
  17898. isSpawnedUpdate,
  17899. previousRenderStartTime
  17900. )
  17901. )
  17902. : performance.measure(isSpawnedUpdate, previousRenderStartTime));
  17903. }
  17904. blockingUpdateTime = -1.1;
  17905. blockingUpdateType = 0;
  17906. blockingUpdateComponentName = blockingUpdateMethodName = null;
  17907. blockingSuspendedTime = -1.1;
  17908. blockingEventRepeatTime = blockingEventTime;
  17909. blockingEventTime = -1.1;
  17910. blockingClampTime = now();
  17911. }
  17912. 0 !== (lanes & 4194048) &&
  17913. ((workInProgressUpdateTask = transitionUpdateTask),
  17914. (debugTask =
  17915. 0 <= transitionStartTime && transitionStartTime < transitionClampTime
  17916. ? transitionClampTime
  17917. : transitionStartTime),
  17918. (previousRenderStartTime =
  17919. 0 <= transitionUpdateTime &&
  17920. transitionUpdateTime < transitionClampTime
  17921. ? transitionClampTime
  17922. : transitionUpdateTime),
  17923. (endTime =
  17924. 0 <= transitionEventTime && transitionEventTime < transitionClampTime
  17925. ? transitionClampTime
  17926. : transitionEventTime),
  17927. (color =
  17928. 0 <= endTime
  17929. ? endTime
  17930. : 0 <= previousRenderStartTime
  17931. ? previousRenderStartTime
  17932. : renderStartTime),
  17933. 0 <= transitionSuspendedTime
  17934. ? (setCurrentTrackFromLanes(256),
  17935. logSuspendedWithDelayPhase(
  17936. transitionSuspendedTime,
  17937. color,
  17938. lanes,
  17939. workInProgressUpdateTask
  17940. ))
  17941. : 0 !== (animatingLanes & 4194048),
  17942. (isPingedUpdate = endTime),
  17943. (eventTime = transitionEventType),
  17944. (eventType = 0 < transitionEventRepeatTime),
  17945. (eventIsRepeat = transitionUpdateType === PINGED_UPDATE),
  17946. (color = renderStartTime),
  17947. (endTime = transitionUpdateTask),
  17948. (label = transitionUpdateMethodName),
  17949. (isSpawnedUpdate = transitionUpdateComponentName),
  17950. supportsUserTiming &&
  17951. ((currentTrack = "Transition"),
  17952. 0 < previousRenderStartTime
  17953. ? previousRenderStartTime > color &&
  17954. (previousRenderStartTime = color)
  17955. : (previousRenderStartTime = color),
  17956. 0 < debugTask
  17957. ? debugTask > previousRenderStartTime &&
  17958. (debugTask = previousRenderStartTime)
  17959. : (debugTask = previousRenderStartTime),
  17960. 0 < isPingedUpdate
  17961. ? isPingedUpdate > debugTask && (isPingedUpdate = debugTask)
  17962. : (isPingedUpdate = debugTask),
  17963. debugTask > isPingedUpdate &&
  17964. null !== eventTime &&
  17965. ((color$jscomp$0 = eventType ? "secondary-light" : "warning"),
  17966. endTime
  17967. ? endTime.run(
  17968. console.timeStamp.bind(
  17969. console,
  17970. eventType ? "Consecutive" : "Event: " + eventTime,
  17971. isPingedUpdate,
  17972. debugTask,
  17973. currentTrack,
  17974. LANES_TRACK_GROUP,
  17975. color$jscomp$0
  17976. )
  17977. )
  17978. : console.timeStamp(
  17979. eventType ? "Consecutive" : "Event: " + eventTime,
  17980. isPingedUpdate,
  17981. debugTask,
  17982. currentTrack,
  17983. LANES_TRACK_GROUP,
  17984. color$jscomp$0
  17985. )),
  17986. previousRenderStartTime > debugTask &&
  17987. (endTime
  17988. ? endTime.run(
  17989. console.timeStamp.bind(
  17990. console,
  17991. "Action",
  17992. debugTask,
  17993. previousRenderStartTime,
  17994. currentTrack,
  17995. LANES_TRACK_GROUP,
  17996. "primary-dark"
  17997. )
  17998. )
  17999. : console.timeStamp(
  18000. "Action",
  18001. debugTask,
  18002. previousRenderStartTime,
  18003. currentTrack,
  18004. LANES_TRACK_GROUP,
  18005. "primary-dark"
  18006. )),
  18007. color > previousRenderStartTime &&
  18008. ((debugTask = eventIsRepeat
  18009. ? "Promise Resolved"
  18010. : 5 < color - previousRenderStartTime
  18011. ? "Update Blocked"
  18012. : "Update"),
  18013. (isPingedUpdate = []),
  18014. null != isSpawnedUpdate &&
  18015. isPingedUpdate.push(["Component name", isSpawnedUpdate]),
  18016. null != label && isPingedUpdate.push(["Method name", label]),
  18017. (previousRenderStartTime = {
  18018. start: previousRenderStartTime,
  18019. end: color,
  18020. detail: {
  18021. devtools: {
  18022. properties: isPingedUpdate,
  18023. track: currentTrack,
  18024. trackGroup: LANES_TRACK_GROUP,
  18025. color: "primary-light"
  18026. }
  18027. }
  18028. }),
  18029. endTime
  18030. ? endTime.run(
  18031. performance.measure.bind(
  18032. performance,
  18033. debugTask,
  18034. previousRenderStartTime
  18035. )
  18036. )
  18037. : performance.measure(debugTask, previousRenderStartTime))),
  18038. (transitionUpdateTime = transitionStartTime = -1.1),
  18039. (transitionUpdateType = 0),
  18040. (transitionSuspendedTime = -1.1),
  18041. (transitionEventRepeatTime = transitionEventTime),
  18042. (transitionEventTime = -1.1),
  18043. (transitionClampTime = now()));
  18044. 0 !== (lanes & 62914560) &&
  18045. 0 !== (animatingLanes & 62914560) &&
  18046. (setCurrentTrackFromLanes(4194304),
  18047. logAnimatingPhase(retryClampTime, renderStartTime));
  18048. 0 !== (lanes & 2080374784) &&
  18049. 0 !== (animatingLanes & 2080374784) &&
  18050. (setCurrentTrackFromLanes(268435456),
  18051. logAnimatingPhase(idleClampTime, renderStartTime));
  18052. previousRenderStartTime = root.timeoutHandle;
  18053. previousRenderStartTime !== noTimeout &&
  18054. ((root.timeoutHandle = noTimeout),
  18055. cancelTimeout(previousRenderStartTime));
  18056. previousRenderStartTime = root.cancelPendingCommit;
  18057. null !== previousRenderStartTime &&
  18058. ((root.cancelPendingCommit = null), previousRenderStartTime());
  18059. pendingEffectsLanes = 0;
  18060. resetWorkInProgressStack();
  18061. workInProgressRoot = root;
  18062. workInProgress = previousRenderStartTime = createWorkInProgress(
  18063. root.current,
  18064. null
  18065. );
  18066. workInProgressRootRenderLanes = lanes;
  18067. workInProgressSuspendedReason = NotSuspended;
  18068. workInProgressThrownValue = null;
  18069. workInProgressRootDidSkipSuspendedSiblings = false;
  18070. workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);
  18071. workInProgressRootDidAttachPingListener = false;
  18072. workInProgressRootExitStatus = RootInProgress;
  18073. workInProgressSuspendedRetryLanes =
  18074. workInProgressDeferredLane =
  18075. workInProgressRootPingedLanes =
  18076. workInProgressRootInterleavedUpdatedLanes =
  18077. workInProgressRootSkippedLanes =
  18078. 0;
  18079. workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =
  18080. null;
  18081. workInProgressRootDidIncludeRecursiveRenderUpdate = false;
  18082. 0 !== (lanes & 8) && (lanes |= lanes & 32);
  18083. endTime = root.entangledLanes;
  18084. if (0 !== endTime)
  18085. for (root = root.entanglements, endTime &= lanes; 0 < endTime; )
  18086. (debugTask = 31 - clz32(endTime)),
  18087. (color = 1 << debugTask),
  18088. (lanes |= root[debugTask]),
  18089. (endTime &= ~color);
  18090. entangledRenderLanes = lanes;
  18091. finishQueueingConcurrentUpdates();
  18092. root = getCurrentTime();
  18093. 1e3 < root - lastResetTime &&
  18094. ((ReactSharedInternals.recentlyCreatedOwnerStacks = 0),
  18095. (lastResetTime = root));
  18096. ReactStrictModeWarnings.discardPendingWarnings();
  18097. return previousRenderStartTime;
  18098. }
  18099. function handleThrow(root, thrownValue) {
  18100. currentlyRenderingFiber = null;
  18101. ReactSharedInternals.H = ContextOnlyDispatcher;
  18102. ReactSharedInternals.getCurrentStack = null;
  18103. isRendering = false;
  18104. current = null;
  18105. thrownValue === SuspenseException ||
  18106. thrownValue === SuspenseActionException
  18107. ? ((thrownValue = getSuspendedThenable()),
  18108. (workInProgressSuspendedReason = SuspendedOnImmediate))
  18109. : thrownValue === SuspenseyCommitException
  18110. ? ((thrownValue = getSuspendedThenable()),
  18111. (workInProgressSuspendedReason = SuspendedOnInstance))
  18112. : (workInProgressSuspendedReason =
  18113. thrownValue === SelectiveHydrationException
  18114. ? SuspendedOnHydration
  18115. : null !== thrownValue &&
  18116. "object" === typeof thrownValue &&
  18117. "function" === typeof thrownValue.then
  18118. ? SuspendedOnDeprecatedThrowPromise
  18119. : SuspendedOnError);
  18120. workInProgressThrownValue = thrownValue;
  18121. var erroredWork = workInProgress;
  18122. null === erroredWork
  18123. ? ((workInProgressRootExitStatus = RootFatalErrored),
  18124. logUncaughtError(
  18125. root,
  18126. createCapturedValueAtFiber(thrownValue, root.current)
  18127. ))
  18128. : erroredWork.mode & ProfileMode &&
  18129. stopProfilerTimerIfRunningAndRecordDuration(erroredWork);
  18130. }
  18131. function shouldRemainOnPreviousScreen() {
  18132. var handler = suspenseHandlerStackCursor.current;
  18133. return null === handler
  18134. ? true
  18135. : (workInProgressRootRenderLanes & 4194048) ===
  18136. workInProgressRootRenderLanes
  18137. ? null === shellBoundary
  18138. ? true
  18139. : false
  18140. : (workInProgressRootRenderLanes & 62914560) ===
  18141. workInProgressRootRenderLanes ||
  18142. 0 !== (workInProgressRootRenderLanes & 536870912)
  18143. ? handler === shellBoundary
  18144. : false;
  18145. }
  18146. function pushDispatcher() {
  18147. var prevDispatcher = ReactSharedInternals.H;
  18148. ReactSharedInternals.H = ContextOnlyDispatcher;
  18149. return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
  18150. }
  18151. function pushAsyncDispatcher() {
  18152. var prevAsyncDispatcher = ReactSharedInternals.A;
  18153. ReactSharedInternals.A = DefaultAsyncDispatcher;
  18154. return prevAsyncDispatcher;
  18155. }
  18156. function markRenderDerivedCause(fiber) {
  18157. null === workInProgressUpdateTask &&
  18158. (workInProgressUpdateTask =
  18159. null == fiber._debugTask ? null : fiber._debugTask);
  18160. }
  18161. function renderDidSuspendDelayIfPossible() {
  18162. workInProgressRootExitStatus = RootSuspendedWithDelay;
  18163. workInProgressRootDidSkipSuspendedSiblings ||
  18164. ((workInProgressRootRenderLanes & 4194048) !==
  18165. workInProgressRootRenderLanes &&
  18166. null !== suspenseHandlerStackCursor.current) ||
  18167. (workInProgressRootIsPrerendering = true);
  18168. (0 === (workInProgressRootSkippedLanes & 134217727) &&
  18169. 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||
  18170. null === workInProgressRoot ||
  18171. markRootSuspended(
  18172. workInProgressRoot,
  18173. workInProgressRootRenderLanes,
  18174. workInProgressDeferredLane,
  18175. false
  18176. );
  18177. }
  18178. function renderRootSync(root, lanes, shouldYieldForPrerendering) {
  18179. var prevExecutionContext = executionContext;
  18180. executionContext |= RenderContext;
  18181. var prevDispatcher = pushDispatcher(),
  18182. prevAsyncDispatcher = pushAsyncDispatcher();
  18183. if (
  18184. workInProgressRoot !== root ||
  18185. workInProgressRootRenderLanes !== lanes
  18186. ) {
  18187. if (isDevToolsPresent) {
  18188. var memoizedUpdaters = root.memoizedUpdaters;
  18189. 0 < memoizedUpdaters.size &&
  18190. (restorePendingUpdaters(root, workInProgressRootRenderLanes),
  18191. memoizedUpdaters.clear());
  18192. movePendingFibersToMemoized(root, lanes);
  18193. }
  18194. workInProgressTransitions = null;
  18195. prepareFreshStack(root, lanes);
  18196. }
  18197. lanes = false;
  18198. memoizedUpdaters = workInProgressRootExitStatus;
  18199. a: do
  18200. try {
  18201. if (
  18202. workInProgressSuspendedReason !== NotSuspended &&
  18203. null !== workInProgress
  18204. ) {
  18205. var unitOfWork = workInProgress,
  18206. thrownValue = workInProgressThrownValue;
  18207. switch (workInProgressSuspendedReason) {
  18208. case SuspendedOnHydration:
  18209. resetWorkInProgressStack();
  18210. memoizedUpdaters = RootSuspendedAtTheShell;
  18211. break a;
  18212. case SuspendedOnImmediate:
  18213. case SuspendedOnData:
  18214. case SuspendedOnAction:
  18215. case SuspendedOnDeprecatedThrowPromise:
  18216. null === suspenseHandlerStackCursor.current && (lanes = !0);
  18217. var reason = workInProgressSuspendedReason;
  18218. workInProgressSuspendedReason = NotSuspended;
  18219. workInProgressThrownValue = null;
  18220. throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);
  18221. if (
  18222. shouldYieldForPrerendering &&
  18223. workInProgressRootIsPrerendering
  18224. ) {
  18225. memoizedUpdaters = RootInProgress;
  18226. break a;
  18227. }
  18228. break;
  18229. default:
  18230. (reason = workInProgressSuspendedReason),
  18231. (workInProgressSuspendedReason = NotSuspended),
  18232. (workInProgressThrownValue = null),
  18233. throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);
  18234. }
  18235. }
  18236. workLoopSync();
  18237. memoizedUpdaters = workInProgressRootExitStatus;
  18238. break;
  18239. } catch (thrownValue$8) {
  18240. handleThrow(root, thrownValue$8);
  18241. }
  18242. while (1);
  18243. lanes && root.shellSuspendCounter++;
  18244. resetContextDependencies();
  18245. executionContext = prevExecutionContext;
  18246. ReactSharedInternals.H = prevDispatcher;
  18247. ReactSharedInternals.A = prevAsyncDispatcher;
  18248. null === workInProgress &&
  18249. ((workInProgressRoot = null),
  18250. (workInProgressRootRenderLanes = 0),
  18251. finishQueueingConcurrentUpdates());
  18252. return memoizedUpdaters;
  18253. }
  18254. function workLoopSync() {
  18255. for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
  18256. }
  18257. function renderRootConcurrent(root, lanes) {
  18258. var prevExecutionContext = executionContext;
  18259. executionContext |= RenderContext;
  18260. var prevDispatcher = pushDispatcher(),
  18261. prevAsyncDispatcher = pushAsyncDispatcher();
  18262. if (
  18263. workInProgressRoot !== root ||
  18264. workInProgressRootRenderLanes !== lanes
  18265. ) {
  18266. if (isDevToolsPresent) {
  18267. var memoizedUpdaters = root.memoizedUpdaters;
  18268. 0 < memoizedUpdaters.size &&
  18269. (restorePendingUpdaters(root, workInProgressRootRenderLanes),
  18270. memoizedUpdaters.clear());
  18271. movePendingFibersToMemoized(root, lanes);
  18272. }
  18273. workInProgressTransitions = null;
  18274. workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS;
  18275. prepareFreshStack(root, lanes);
  18276. } else
  18277. workInProgressRootIsPrerendering = checkIfRootIsPrerendering(
  18278. root,
  18279. lanes
  18280. );
  18281. a: do
  18282. try {
  18283. if (
  18284. workInProgressSuspendedReason !== NotSuspended &&
  18285. null !== workInProgress
  18286. )
  18287. b: switch (
  18288. ((lanes = workInProgress),
  18289. (memoizedUpdaters = workInProgressThrownValue),
  18290. workInProgressSuspendedReason)
  18291. ) {
  18292. case SuspendedOnError:
  18293. workInProgressSuspendedReason = NotSuspended;
  18294. workInProgressThrownValue = null;
  18295. throwAndUnwindWorkLoop(
  18296. root,
  18297. lanes,
  18298. memoizedUpdaters,
  18299. SuspendedOnError
  18300. );
  18301. break;
  18302. case SuspendedOnData:
  18303. case SuspendedOnAction:
  18304. if (isThenableResolved(memoizedUpdaters)) {
  18305. workInProgressSuspendedReason = NotSuspended;
  18306. workInProgressThrownValue = null;
  18307. replaySuspendedUnitOfWork(lanes);
  18308. break;
  18309. }
  18310. lanes = function () {
  18311. (workInProgressSuspendedReason !== SuspendedOnData &&
  18312. workInProgressSuspendedReason !== SuspendedOnAction) ||
  18313. workInProgressRoot !== root ||
  18314. (workInProgressSuspendedReason =
  18315. SuspendedAndReadyToContinue);
  18316. ensureRootIsScheduled(root);
  18317. };
  18318. memoizedUpdaters.then(lanes, lanes);
  18319. break a;
  18320. case SuspendedOnImmediate:
  18321. workInProgressSuspendedReason = SuspendedAndReadyToContinue;
  18322. break a;
  18323. case SuspendedOnInstance:
  18324. workInProgressSuspendedReason =
  18325. SuspendedOnInstanceAndReadyToContinue;
  18326. break a;
  18327. case SuspendedAndReadyToContinue:
  18328. isThenableResolved(memoizedUpdaters)
  18329. ? ((workInProgressSuspendedReason = NotSuspended),
  18330. (workInProgressThrownValue = null),
  18331. replaySuspendedUnitOfWork(lanes))
  18332. : ((workInProgressSuspendedReason = NotSuspended),
  18333. (workInProgressThrownValue = null),
  18334. throwAndUnwindWorkLoop(
  18335. root,
  18336. lanes,
  18337. memoizedUpdaters,
  18338. SuspendedAndReadyToContinue
  18339. ));
  18340. break;
  18341. case SuspendedOnInstanceAndReadyToContinue:
  18342. var resource = null;
  18343. switch (workInProgress.tag) {
  18344. case 26:
  18345. resource = workInProgress.memoizedState;
  18346. case 5:
  18347. case 27:
  18348. var hostFiber = workInProgress;
  18349. if (
  18350. resource
  18351. ? preloadResource(resource)
  18352. : hostFiber.stateNode.complete
  18353. ) {
  18354. workInProgressSuspendedReason = NotSuspended;
  18355. workInProgressThrownValue = null;
  18356. var sibling = hostFiber.sibling;
  18357. if (null !== sibling) workInProgress = sibling;
  18358. else {
  18359. var returnFiber = hostFiber.return;
  18360. null !== returnFiber
  18361. ? ((workInProgress = returnFiber),
  18362. completeUnitOfWork(returnFiber))
  18363. : (workInProgress = null);
  18364. }
  18365. break b;
  18366. }
  18367. break;
  18368. default:
  18369. console.error(
  18370. "Unexpected type of fiber triggered a suspensey commit. This is a bug in React."
  18371. );
  18372. }
  18373. workInProgressSuspendedReason = NotSuspended;
  18374. workInProgressThrownValue = null;
  18375. throwAndUnwindWorkLoop(
  18376. root,
  18377. lanes,
  18378. memoizedUpdaters,
  18379. SuspendedOnInstanceAndReadyToContinue
  18380. );
  18381. break;
  18382. case SuspendedOnDeprecatedThrowPromise:
  18383. workInProgressSuspendedReason = NotSuspended;
  18384. workInProgressThrownValue = null;
  18385. throwAndUnwindWorkLoop(
  18386. root,
  18387. lanes,
  18388. memoizedUpdaters,
  18389. SuspendedOnDeprecatedThrowPromise
  18390. );
  18391. break;
  18392. case SuspendedOnHydration:
  18393. resetWorkInProgressStack();
  18394. workInProgressRootExitStatus = RootSuspendedAtTheShell;
  18395. break a;
  18396. default:
  18397. throw Error(
  18398. "Unexpected SuspendedReason. This is a bug in React."
  18399. );
  18400. }
  18401. null !== ReactSharedInternals.actQueue
  18402. ? workLoopSync()
  18403. : workLoopConcurrentByScheduler();
  18404. break;
  18405. } catch (thrownValue$9) {
  18406. handleThrow(root, thrownValue$9);
  18407. }
  18408. while (1);
  18409. resetContextDependencies();
  18410. ReactSharedInternals.H = prevDispatcher;
  18411. ReactSharedInternals.A = prevAsyncDispatcher;
  18412. executionContext = prevExecutionContext;
  18413. if (null !== workInProgress) return RootInProgress;
  18414. workInProgressRoot = null;
  18415. workInProgressRootRenderLanes = 0;
  18416. finishQueueingConcurrentUpdates();
  18417. return workInProgressRootExitStatus;
  18418. }
  18419. function workLoopConcurrentByScheduler() {
  18420. for (; null !== workInProgress && !shouldYield(); )
  18421. performUnitOfWork(workInProgress);
  18422. }
  18423. function performUnitOfWork(unitOfWork) {
  18424. var current = unitOfWork.alternate;
  18425. (unitOfWork.mode & ProfileMode) !== NoMode
  18426. ? (startProfilerTimer(unitOfWork),
  18427. (current = runWithFiberInDEV(
  18428. unitOfWork,
  18429. beginWork,
  18430. current,
  18431. unitOfWork,
  18432. entangledRenderLanes
  18433. )),
  18434. stopProfilerTimerIfRunningAndRecordDuration(unitOfWork))
  18435. : (current = runWithFiberInDEV(
  18436. unitOfWork,
  18437. beginWork,
  18438. current,
  18439. unitOfWork,
  18440. entangledRenderLanes
  18441. ));
  18442. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  18443. null === current
  18444. ? completeUnitOfWork(unitOfWork)
  18445. : (workInProgress = current);
  18446. }
  18447. function replaySuspendedUnitOfWork(unitOfWork) {
  18448. var next = runWithFiberInDEV(unitOfWork, replayBeginWork, unitOfWork);
  18449. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  18450. null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
  18451. }
  18452. function replayBeginWork(unitOfWork) {
  18453. var current = unitOfWork.alternate,
  18454. isProfilingMode = (unitOfWork.mode & ProfileMode) !== NoMode;
  18455. isProfilingMode && startProfilerTimer(unitOfWork);
  18456. switch (unitOfWork.tag) {
  18457. case 15:
  18458. case 0:
  18459. current = replayFunctionComponent(
  18460. current,
  18461. unitOfWork,
  18462. unitOfWork.pendingProps,
  18463. unitOfWork.type,
  18464. void 0,
  18465. workInProgressRootRenderLanes
  18466. );
  18467. break;
  18468. case 11:
  18469. current = replayFunctionComponent(
  18470. current,
  18471. unitOfWork,
  18472. unitOfWork.pendingProps,
  18473. unitOfWork.type.render,
  18474. unitOfWork.ref,
  18475. workInProgressRootRenderLanes
  18476. );
  18477. break;
  18478. case 5:
  18479. resetHooksOnUnwind(unitOfWork);
  18480. default:
  18481. unwindInterruptedWork(current, unitOfWork),
  18482. (unitOfWork = workInProgress =
  18483. resetWorkInProgress(unitOfWork, entangledRenderLanes)),
  18484. (current = beginWork(current, unitOfWork, entangledRenderLanes));
  18485. }
  18486. isProfilingMode &&
  18487. stopProfilerTimerIfRunningAndRecordDuration(unitOfWork);
  18488. return current;
  18489. }
  18490. function throwAndUnwindWorkLoop(
  18491. root,
  18492. unitOfWork,
  18493. thrownValue,
  18494. suspendedReason
  18495. ) {
  18496. resetContextDependencies();
  18497. resetHooksOnUnwind(unitOfWork);
  18498. thenableState$1 = null;
  18499. thenableIndexCounter$1 = 0;
  18500. var returnFiber = unitOfWork.return;
  18501. try {
  18502. if (
  18503. throwException(
  18504. root,
  18505. returnFiber,
  18506. unitOfWork,
  18507. thrownValue,
  18508. workInProgressRootRenderLanes
  18509. )
  18510. ) {
  18511. workInProgressRootExitStatus = RootFatalErrored;
  18512. logUncaughtError(
  18513. root,
  18514. createCapturedValueAtFiber(thrownValue, root.current)
  18515. );
  18516. workInProgress = null;
  18517. return;
  18518. }
  18519. } catch (error) {
  18520. if (null !== returnFiber) throw ((workInProgress = returnFiber), error);
  18521. workInProgressRootExitStatus = RootFatalErrored;
  18522. logUncaughtError(
  18523. root,
  18524. createCapturedValueAtFiber(thrownValue, root.current)
  18525. );
  18526. workInProgress = null;
  18527. return;
  18528. }
  18529. if (unitOfWork.flags & 32768) {
  18530. if (isHydrating || suspendedReason === SuspendedOnError) root = true;
  18531. else if (
  18532. workInProgressRootIsPrerendering ||
  18533. 0 !== (workInProgressRootRenderLanes & 536870912)
  18534. )
  18535. root = false;
  18536. else if (
  18537. ((workInProgressRootDidSkipSuspendedSiblings = root = true),
  18538. suspendedReason === SuspendedOnData ||
  18539. suspendedReason === SuspendedOnAction ||
  18540. suspendedReason === SuspendedOnImmediate ||
  18541. suspendedReason === SuspendedOnDeprecatedThrowPromise)
  18542. )
  18543. (suspendedReason = suspenseHandlerStackCursor.current),
  18544. null !== suspendedReason &&
  18545. 13 === suspendedReason.tag &&
  18546. (suspendedReason.flags |= 16384);
  18547. unwindUnitOfWork(unitOfWork, root);
  18548. } else completeUnitOfWork(unitOfWork);
  18549. }
  18550. function completeUnitOfWork(unitOfWork) {
  18551. var completedWork = unitOfWork;
  18552. do {
  18553. if (0 !== (completedWork.flags & 32768)) {
  18554. unwindUnitOfWork(
  18555. completedWork,
  18556. workInProgressRootDidSkipSuspendedSiblings
  18557. );
  18558. return;
  18559. }
  18560. var current = completedWork.alternate;
  18561. unitOfWork = completedWork.return;
  18562. startProfilerTimer(completedWork);
  18563. current = runWithFiberInDEV(
  18564. completedWork,
  18565. completeWork,
  18566. current,
  18567. completedWork,
  18568. entangledRenderLanes
  18569. );
  18570. (completedWork.mode & ProfileMode) !== NoMode &&
  18571. stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork);
  18572. if (null !== current) {
  18573. workInProgress = current;
  18574. return;
  18575. }
  18576. completedWork = completedWork.sibling;
  18577. if (null !== completedWork) {
  18578. workInProgress = completedWork;
  18579. return;
  18580. }
  18581. workInProgress = completedWork = unitOfWork;
  18582. } while (null !== completedWork);
  18583. workInProgressRootExitStatus === RootInProgress &&
  18584. (workInProgressRootExitStatus = RootCompleted);
  18585. }
  18586. function unwindUnitOfWork(unitOfWork, skipSiblings) {
  18587. do {
  18588. var next = unwindWork(unitOfWork.alternate, unitOfWork);
  18589. if (null !== next) {
  18590. next.flags &= 32767;
  18591. workInProgress = next;
  18592. return;
  18593. }
  18594. if ((unitOfWork.mode & ProfileMode) !== NoMode) {
  18595. stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
  18596. next = unitOfWork.actualDuration;
  18597. for (var child = unitOfWork.child; null !== child; )
  18598. (next += child.actualDuration), (child = child.sibling);
  18599. unitOfWork.actualDuration = next;
  18600. }
  18601. next = unitOfWork.return;
  18602. null !== next &&
  18603. ((next.flags |= 32768),
  18604. (next.subtreeFlags = 0),
  18605. (next.deletions = null));
  18606. if (
  18607. !skipSiblings &&
  18608. ((unitOfWork = unitOfWork.sibling), null !== unitOfWork)
  18609. ) {
  18610. workInProgress = unitOfWork;
  18611. return;
  18612. }
  18613. workInProgress = unitOfWork = next;
  18614. } while (null !== unitOfWork);
  18615. workInProgressRootExitStatus = RootSuspendedAtTheShell;
  18616. workInProgress = null;
  18617. }
  18618. function commitRoot(
  18619. root,
  18620. finishedWork,
  18621. lanes,
  18622. recoverableErrors,
  18623. transitions,
  18624. didIncludeRenderPhaseUpdate,
  18625. spawnedLane,
  18626. updatedLanes,
  18627. suspendedRetryLanes,
  18628. exitStatus,
  18629. suspendedState,
  18630. suspendedCommitReason,
  18631. completedRenderStartTime,
  18632. completedRenderEndTime
  18633. ) {
  18634. root.cancelPendingCommit = null;
  18635. do flushPendingEffects();
  18636. while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
  18637. ReactStrictModeWarnings.flushLegacyContextWarning();
  18638. ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
  18639. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  18640. throw Error("Should not already be working.");
  18641. setCurrentTrackFromLanes(lanes);
  18642. exitStatus === RootErrored
  18643. ? logErroredRenderPhase(
  18644. completedRenderStartTime,
  18645. completedRenderEndTime,
  18646. lanes,
  18647. workInProgressUpdateTask
  18648. )
  18649. : null !== recoverableErrors
  18650. ? logRecoveredRenderPhase(
  18651. completedRenderStartTime,
  18652. completedRenderEndTime,
  18653. lanes,
  18654. recoverableErrors,
  18655. null !== finishedWork &&
  18656. null !== finishedWork.alternate &&
  18657. finishedWork.alternate.memoizedState.isDehydrated &&
  18658. 0 !== (finishedWork.flags & 256),
  18659. workInProgressUpdateTask
  18660. )
  18661. : logRenderPhase(
  18662. completedRenderStartTime,
  18663. completedRenderEndTime,
  18664. lanes,
  18665. workInProgressUpdateTask
  18666. );
  18667. if (null !== finishedWork) {
  18668. 0 === lanes &&
  18669. console.error(
  18670. "finishedLanes should not be empty during a commit. This is a bug in React."
  18671. );
  18672. if (finishedWork === root.current)
  18673. throw Error(
  18674. "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
  18675. );
  18676. didIncludeRenderPhaseUpdate =
  18677. finishedWork.lanes | finishedWork.childLanes;
  18678. didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
  18679. markRootFinished(
  18680. root,
  18681. lanes,
  18682. didIncludeRenderPhaseUpdate,
  18683. spawnedLane,
  18684. updatedLanes,
  18685. suspendedRetryLanes
  18686. );
  18687. root === workInProgressRoot &&
  18688. ((workInProgress = workInProgressRoot = null),
  18689. (workInProgressRootRenderLanes = 0));
  18690. pendingFinishedWork = finishedWork;
  18691. pendingEffectsRoot = root;
  18692. pendingEffectsLanes = lanes;
  18693. pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
  18694. pendingPassiveTransitions = transitions;
  18695. pendingRecoverableErrors = recoverableErrors;
  18696. pendingEffectsRenderEndTime = completedRenderEndTime;
  18697. pendingSuspendedCommitReason = suspendedCommitReason;
  18698. pendingDelayedCommitReason = IMMEDIATE_COMMIT;
  18699. pendingSuspendedViewTransitionReason = null;
  18700. 0 !== finishedWork.actualDuration ||
  18701. 0 !== (finishedWork.subtreeFlags & 10256) ||
  18702. 0 !== (finishedWork.flags & 10256)
  18703. ? ((root.callbackNode = null),
  18704. (root.callbackPriority = 0),
  18705. scheduleCallback$1(NormalPriority$1, function () {
  18706. schedulerEvent = window.event;
  18707. pendingDelayedCommitReason === IMMEDIATE_COMMIT &&
  18708. (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);
  18709. flushPassiveEffects();
  18710. return null;
  18711. }))
  18712. : ((root.callbackNode = null), (root.callbackPriority = 0));
  18713. commitErrors = null;
  18714. commitStartTime = now();
  18715. null !== suspendedCommitReason &&
  18716. logSuspendedCommitPhase(
  18717. completedRenderEndTime,
  18718. commitStartTime,
  18719. suspendedCommitReason,
  18720. workInProgressUpdateTask
  18721. );
  18722. recoverableErrors = 0 !== (finishedWork.flags & 13878);
  18723. if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {
  18724. recoverableErrors = ReactSharedInternals.T;
  18725. ReactSharedInternals.T = null;
  18726. transitions = ReactDOMSharedInternals.p;
  18727. ReactDOMSharedInternals.p = DiscreteEventPriority;
  18728. spawnedLane = executionContext;
  18729. executionContext |= CommitContext;
  18730. try {
  18731. commitBeforeMutationEffects(root, finishedWork, lanes);
  18732. } finally {
  18733. (executionContext = spawnedLane),
  18734. (ReactDOMSharedInternals.p = transitions),
  18735. (ReactSharedInternals.T = recoverableErrors);
  18736. }
  18737. }
  18738. pendingEffectsStatus = PENDING_MUTATION_PHASE;
  18739. flushMutationEffects();
  18740. flushLayoutEffects();
  18741. flushSpawnedWork();
  18742. }
  18743. }
  18744. function flushMutationEffects() {
  18745. if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
  18746. pendingEffectsStatus = NO_PENDING_EFFECTS;
  18747. var root = pendingEffectsRoot,
  18748. finishedWork = pendingFinishedWork,
  18749. lanes = pendingEffectsLanes,
  18750. rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
  18751. if (
  18752. 0 !== (finishedWork.subtreeFlags & 13878) ||
  18753. rootMutationHasEffect
  18754. ) {
  18755. rootMutationHasEffect = ReactSharedInternals.T;
  18756. ReactSharedInternals.T = null;
  18757. var previousPriority = ReactDOMSharedInternals.p;
  18758. ReactDOMSharedInternals.p = DiscreteEventPriority;
  18759. var prevExecutionContext = executionContext;
  18760. executionContext |= CommitContext;
  18761. try {
  18762. inProgressLanes = lanes;
  18763. inProgressRoot = root;
  18764. resetComponentEffectTimers();
  18765. commitMutationEffectsOnFiber(finishedWork, root);
  18766. inProgressRoot = inProgressLanes = null;
  18767. lanes = selectionInformation;
  18768. var curFocusedElem = getActiveElementDeep(root.containerInfo),
  18769. priorFocusedElem = lanes.focusedElem,
  18770. priorSelectionRange = lanes.selectionRange;
  18771. if (
  18772. curFocusedElem !== priorFocusedElem &&
  18773. priorFocusedElem &&
  18774. priorFocusedElem.ownerDocument &&
  18775. containsNode(
  18776. priorFocusedElem.ownerDocument.documentElement,
  18777. priorFocusedElem
  18778. )
  18779. ) {
  18780. if (
  18781. null !== priorSelectionRange &&
  18782. hasSelectionCapabilities(priorFocusedElem)
  18783. ) {
  18784. var start = priorSelectionRange.start,
  18785. end = priorSelectionRange.end;
  18786. void 0 === end && (end = start);
  18787. if ("selectionStart" in priorFocusedElem)
  18788. (priorFocusedElem.selectionStart = start),
  18789. (priorFocusedElem.selectionEnd = Math.min(
  18790. end,
  18791. priorFocusedElem.value.length
  18792. ));
  18793. else {
  18794. var doc = priorFocusedElem.ownerDocument || document,
  18795. win = (doc && doc.defaultView) || window;
  18796. if (win.getSelection) {
  18797. var selection = win.getSelection(),
  18798. length = priorFocusedElem.textContent.length,
  18799. start$jscomp$0 = Math.min(
  18800. priorSelectionRange.start,
  18801. length
  18802. ),
  18803. end$jscomp$0 =
  18804. void 0 === priorSelectionRange.end
  18805. ? start$jscomp$0
  18806. : Math.min(priorSelectionRange.end, length);
  18807. !selection.extend &&
  18808. start$jscomp$0 > end$jscomp$0 &&
  18809. ((curFocusedElem = end$jscomp$0),
  18810. (end$jscomp$0 = start$jscomp$0),
  18811. (start$jscomp$0 = curFocusedElem));
  18812. var startMarker = getNodeForCharacterOffset(
  18813. priorFocusedElem,
  18814. start$jscomp$0
  18815. ),
  18816. endMarker = getNodeForCharacterOffset(
  18817. priorFocusedElem,
  18818. end$jscomp$0
  18819. );
  18820. if (
  18821. startMarker &&
  18822. endMarker &&
  18823. (1 !== selection.rangeCount ||
  18824. selection.anchorNode !== startMarker.node ||
  18825. selection.anchorOffset !== startMarker.offset ||
  18826. selection.focusNode !== endMarker.node ||
  18827. selection.focusOffset !== endMarker.offset)
  18828. ) {
  18829. var range = doc.createRange();
  18830. range.setStart(startMarker.node, startMarker.offset);
  18831. selection.removeAllRanges();
  18832. start$jscomp$0 > end$jscomp$0
  18833. ? (selection.addRange(range),
  18834. selection.extend(endMarker.node, endMarker.offset))
  18835. : (range.setEnd(endMarker.node, endMarker.offset),
  18836. selection.addRange(range));
  18837. }
  18838. }
  18839. }
  18840. }
  18841. doc = [];
  18842. for (
  18843. selection = priorFocusedElem;
  18844. (selection = selection.parentNode);
  18845. )
  18846. 1 === selection.nodeType &&
  18847. doc.push({
  18848. element: selection,
  18849. left: selection.scrollLeft,
  18850. top: selection.scrollTop
  18851. });
  18852. "function" === typeof priorFocusedElem.focus &&
  18853. priorFocusedElem.focus();
  18854. for (
  18855. priorFocusedElem = 0;
  18856. priorFocusedElem < doc.length;
  18857. priorFocusedElem++
  18858. ) {
  18859. var info = doc[priorFocusedElem];
  18860. info.element.scrollLeft = info.left;
  18861. info.element.scrollTop = info.top;
  18862. }
  18863. }
  18864. _enabled = !!eventsEnabled;
  18865. selectionInformation = eventsEnabled = null;
  18866. } finally {
  18867. (executionContext = prevExecutionContext),
  18868. (ReactDOMSharedInternals.p = previousPriority),
  18869. (ReactSharedInternals.T = rootMutationHasEffect);
  18870. }
  18871. }
  18872. root.current = finishedWork;
  18873. pendingEffectsStatus = PENDING_LAYOUT_PHASE;
  18874. }
  18875. }
  18876. function flushLayoutEffects() {
  18877. if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
  18878. pendingEffectsStatus = NO_PENDING_EFFECTS;
  18879. var suspendedViewTransitionReason =
  18880. pendingSuspendedViewTransitionReason;
  18881. if (null !== suspendedViewTransitionReason) {
  18882. commitStartTime = now();
  18883. var startTime = commitEndTime,
  18884. endTime = commitStartTime;
  18885. !supportsUserTiming ||
  18886. endTime <= startTime ||
  18887. (console.timeStamp(
  18888. suspendedViewTransitionReason,
  18889. startTime,
  18890. endTime,
  18891. currentTrack,
  18892. LANES_TRACK_GROUP,
  18893. "secondary-light"
  18894. ));
  18895. }
  18896. suspendedViewTransitionReason = pendingEffectsRoot;
  18897. startTime = pendingFinishedWork;
  18898. endTime = pendingEffectsLanes;
  18899. var rootHasLayoutEffect = 0 !== (startTime.flags & 8772);
  18900. if (0 !== (startTime.subtreeFlags & 8772) || rootHasLayoutEffect) {
  18901. rootHasLayoutEffect = ReactSharedInternals.T;
  18902. ReactSharedInternals.T = null;
  18903. var _previousPriority = ReactDOMSharedInternals.p;
  18904. ReactDOMSharedInternals.p = DiscreteEventPriority;
  18905. var _prevExecutionContext = executionContext;
  18906. executionContext |= CommitContext;
  18907. try {
  18908. (inProgressLanes = endTime),
  18909. (inProgressRoot = suspendedViewTransitionReason),
  18910. resetComponentEffectTimers(),
  18911. commitLayoutEffectOnFiber(
  18912. suspendedViewTransitionReason,
  18913. startTime.alternate,
  18914. startTime
  18915. ),
  18916. (inProgressRoot = inProgressLanes = null);
  18917. } finally {
  18918. (executionContext = _prevExecutionContext),
  18919. (ReactDOMSharedInternals.p = _previousPriority),
  18920. (ReactSharedInternals.T = rootHasLayoutEffect);
  18921. }
  18922. }
  18923. suspendedViewTransitionReason = pendingEffectsRenderEndTime;
  18924. startTime = pendingSuspendedCommitReason;
  18925. commitEndTime = now();
  18926. suspendedViewTransitionReason =
  18927. null === startTime ? suspendedViewTransitionReason : commitStartTime;
  18928. startTime = commitEndTime;
  18929. endTime = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
  18930. rootHasLayoutEffect = workInProgressUpdateTask;
  18931. null !== commitErrors
  18932. ? logCommitErrored(
  18933. suspendedViewTransitionReason,
  18934. startTime,
  18935. commitErrors,
  18936. false,
  18937. rootHasLayoutEffect
  18938. )
  18939. : !supportsUserTiming ||
  18940. startTime <= suspendedViewTransitionReason ||
  18941. (rootHasLayoutEffect
  18942. ? rootHasLayoutEffect.run(
  18943. console.timeStamp.bind(
  18944. console,
  18945. endTime ? "Commit Interrupted View Transition" : "Commit",
  18946. suspendedViewTransitionReason,
  18947. startTime,
  18948. currentTrack,
  18949. LANES_TRACK_GROUP,
  18950. endTime ? "error" : "secondary-dark"
  18951. )
  18952. )
  18953. : console.timeStamp(
  18954. endTime ? "Commit Interrupted View Transition" : "Commit",
  18955. suspendedViewTransitionReason,
  18956. startTime,
  18957. currentTrack,
  18958. LANES_TRACK_GROUP,
  18959. endTime ? "error" : "secondary-dark"
  18960. ));
  18961. pendingEffectsStatus = PENDING_AFTER_MUTATION_PHASE;
  18962. }
  18963. }
  18964. function flushSpawnedWork() {
  18965. if (
  18966. pendingEffectsStatus === PENDING_SPAWNED_WORK ||
  18967. pendingEffectsStatus === PENDING_AFTER_MUTATION_PHASE
  18968. ) {
  18969. if (pendingEffectsStatus === PENDING_SPAWNED_WORK) {
  18970. var startViewTransitionStartTime = commitEndTime;
  18971. commitEndTime = now();
  18972. var endTime = commitEndTime,
  18973. abortedViewTransition =
  18974. pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
  18975. !supportsUserTiming ||
  18976. endTime <= startViewTransitionStartTime ||
  18977. (console.timeStamp(
  18978. abortedViewTransition
  18979. ? "Interrupted View Transition"
  18980. : "Starting Animation",
  18981. startViewTransitionStartTime,
  18982. endTime,
  18983. currentTrack,
  18984. LANES_TRACK_GROUP,
  18985. abortedViewTransition ? " error" : "secondary-light"
  18986. ));
  18987. pendingDelayedCommitReason !== ABORTED_VIEW_TRANSITION_COMMIT &&
  18988. (pendingDelayedCommitReason = ANIMATION_STARTED_COMMIT);
  18989. }
  18990. pendingEffectsStatus = NO_PENDING_EFFECTS;
  18991. requestPaint();
  18992. startViewTransitionStartTime = pendingEffectsRoot;
  18993. var finishedWork = pendingFinishedWork;
  18994. endTime = pendingEffectsLanes;
  18995. abortedViewTransition = pendingRecoverableErrors;
  18996. var rootDidHavePassiveEffects =
  18997. 0 !== finishedWork.actualDuration ||
  18998. 0 !== (finishedWork.subtreeFlags & 10256) ||
  18999. 0 !== (finishedWork.flags & 10256);
  19000. rootDidHavePassiveEffects
  19001. ? (pendingEffectsStatus = PENDING_PASSIVE_PHASE)
  19002. : ((pendingEffectsStatus = NO_PENDING_EFFECTS),
  19003. (pendingFinishedWork = pendingEffectsRoot = null),
  19004. releaseRootPooledCache(
  19005. startViewTransitionStartTime,
  19006. startViewTransitionStartTime.pendingLanes
  19007. ),
  19008. (nestedPassiveUpdateCount = 0),
  19009. (rootWithPassiveNestedUpdates = null));
  19010. var remainingLanes = startViewTransitionStartTime.pendingLanes;
  19011. 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
  19012. rootDidHavePassiveEffects ||
  19013. commitDoubleInvokeEffectsInDEV(startViewTransitionStartTime);
  19014. remainingLanes = lanesToEventPriority(endTime);
  19015. finishedWork = finishedWork.stateNode;
  19016. if (
  19017. injectedHook &&
  19018. "function" === typeof injectedHook.onCommitFiberRoot
  19019. )
  19020. try {
  19021. var didError = 128 === (finishedWork.current.flags & 128);
  19022. switch (remainingLanes) {
  19023. case DiscreteEventPriority:
  19024. var schedulerPriority = ImmediatePriority;
  19025. break;
  19026. case ContinuousEventPriority:
  19027. schedulerPriority = UserBlockingPriority;
  19028. break;
  19029. case DefaultEventPriority:
  19030. schedulerPriority = NormalPriority$1;
  19031. break;
  19032. case IdleEventPriority:
  19033. schedulerPriority = IdlePriority;
  19034. break;
  19035. default:
  19036. schedulerPriority = NormalPriority$1;
  19037. }
  19038. injectedHook.onCommitFiberRoot(
  19039. rendererID,
  19040. finishedWork,
  19041. schedulerPriority,
  19042. didError
  19043. );
  19044. } catch (err) {
  19045. hasLoggedError ||
  19046. ((hasLoggedError = true),
  19047. console.error(
  19048. "React instrumentation encountered an error: %o",
  19049. err
  19050. ));
  19051. }
  19052. isDevToolsPresent &&
  19053. startViewTransitionStartTime.memoizedUpdaters.clear();
  19054. onCommitRoot();
  19055. if (null !== abortedViewTransition) {
  19056. didError = ReactSharedInternals.T;
  19057. schedulerPriority = ReactDOMSharedInternals.p;
  19058. ReactDOMSharedInternals.p = DiscreteEventPriority;
  19059. ReactSharedInternals.T = null;
  19060. try {
  19061. var onRecoverableError =
  19062. startViewTransitionStartTime.onRecoverableError;
  19063. for (
  19064. finishedWork = 0;
  19065. finishedWork < abortedViewTransition.length;
  19066. finishedWork++
  19067. ) {
  19068. var recoverableError = abortedViewTransition[finishedWork],
  19069. errorInfo = makeErrorInfo(recoverableError.stack);
  19070. runWithFiberInDEV(
  19071. recoverableError.source,
  19072. onRecoverableError,
  19073. recoverableError.value,
  19074. errorInfo
  19075. );
  19076. }
  19077. } finally {
  19078. (ReactSharedInternals.T = didError),
  19079. (ReactDOMSharedInternals.p = schedulerPriority);
  19080. }
  19081. }
  19082. 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();
  19083. ensureRootIsScheduled(startViewTransitionStartTime);
  19084. remainingLanes = startViewTransitionStartTime.pendingLanes;
  19085. 0 !== (endTime & 261930) && 0 !== (remainingLanes & 42)
  19086. ? ((nestedUpdateScheduled = true),
  19087. startViewTransitionStartTime === rootWithNestedUpdates
  19088. ? nestedUpdateCount++
  19089. : ((nestedUpdateCount = 0),
  19090. (rootWithNestedUpdates = startViewTransitionStartTime)))
  19091. : (nestedUpdateCount = 0);
  19092. rootDidHavePassiveEffects || finalizeRender(endTime, commitEndTime);
  19093. flushSyncWorkAcrossRoots_impl(0);
  19094. }
  19095. }
  19096. function makeErrorInfo(componentStack) {
  19097. componentStack = { componentStack: componentStack };
  19098. Object.defineProperty(componentStack, "digest", {
  19099. get: function () {
  19100. console.error(
  19101. 'You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.'
  19102. );
  19103. }
  19104. });
  19105. return componentStack;
  19106. }
  19107. function releaseRootPooledCache(root, remainingLanes) {
  19108. 0 === (root.pooledCacheLanes &= remainingLanes) &&
  19109. ((remainingLanes = root.pooledCache),
  19110. null != remainingLanes &&
  19111. ((root.pooledCache = null), releaseCache(remainingLanes)));
  19112. }
  19113. function flushPendingEffects() {
  19114. flushMutationEffects();
  19115. flushLayoutEffects();
  19116. flushSpawnedWork();
  19117. return flushPassiveEffects();
  19118. }
  19119. function flushPassiveEffects() {
  19120. if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return false;
  19121. var root = pendingEffectsRoot,
  19122. remainingLanes = pendingEffectsRemainingLanes;
  19123. pendingEffectsRemainingLanes = 0;
  19124. var renderPriority = lanesToEventPriority(pendingEffectsLanes),
  19125. priority =
  19126. DefaultEventPriority > renderPriority
  19127. ? DefaultEventPriority
  19128. : renderPriority;
  19129. renderPriority = ReactSharedInternals.T;
  19130. var previousPriority = ReactDOMSharedInternals.p;
  19131. try {
  19132. ReactDOMSharedInternals.p = priority;
  19133. ReactSharedInternals.T = null;
  19134. var transitions = pendingPassiveTransitions;
  19135. pendingPassiveTransitions = null;
  19136. priority = pendingEffectsRoot;
  19137. var lanes = pendingEffectsLanes;
  19138. pendingEffectsStatus = NO_PENDING_EFFECTS;
  19139. pendingFinishedWork = pendingEffectsRoot = null;
  19140. pendingEffectsLanes = 0;
  19141. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  19142. throw Error("Cannot flush passive effects while already rendering.");
  19143. setCurrentTrackFromLanes(lanes);
  19144. isFlushingPassiveEffects = !0;
  19145. didScheduleUpdateDuringPassiveEffects = !1;
  19146. var passiveEffectStartTime = 0;
  19147. commitErrors = null;
  19148. passiveEffectStartTime = now$1();
  19149. if (pendingDelayedCommitReason === ANIMATION_STARTED_COMMIT)
  19150. logAnimatingPhase(
  19151. commitEndTime,
  19152. passiveEffectStartTime,
  19153. animatingTask
  19154. );
  19155. else {
  19156. var startTime = commitEndTime,
  19157. endTime = passiveEffectStartTime,
  19158. delayedUntilPaint =
  19159. pendingDelayedCommitReason === DELAYED_PASSIVE_COMMIT;
  19160. !supportsUserTiming ||
  19161. endTime <= startTime ||
  19162. (workInProgressUpdateTask
  19163. ? workInProgressUpdateTask.run(
  19164. console.timeStamp.bind(
  19165. console,
  19166. delayedUntilPaint ? "Waiting for Paint" : "Waiting",
  19167. startTime,
  19168. endTime,
  19169. currentTrack,
  19170. LANES_TRACK_GROUP,
  19171. "secondary-light"
  19172. )
  19173. )
  19174. : console.timeStamp(
  19175. delayedUntilPaint ? "Waiting for Paint" : "Waiting",
  19176. startTime,
  19177. endTime,
  19178. currentTrack,
  19179. LANES_TRACK_GROUP,
  19180. "secondary-light"
  19181. ));
  19182. }
  19183. startTime = executionContext;
  19184. executionContext |= CommitContext;
  19185. var finishedWork = priority.current;
  19186. resetComponentEffectTimers();
  19187. commitPassiveUnmountOnFiber(finishedWork);
  19188. var finishedWork$jscomp$0 = priority.current;
  19189. finishedWork = pendingEffectsRenderEndTime;
  19190. resetComponentEffectTimers();
  19191. commitPassiveMountOnFiber(
  19192. priority,
  19193. finishedWork$jscomp$0,
  19194. lanes,
  19195. transitions,
  19196. finishedWork
  19197. );
  19198. commitDoubleInvokeEffectsInDEV(priority);
  19199. executionContext = startTime;
  19200. var passiveEffectsEndTime = now$1();
  19201. finishedWork$jscomp$0 = passiveEffectStartTime;
  19202. finishedWork = workInProgressUpdateTask;
  19203. null !== commitErrors
  19204. ? logCommitErrored(
  19205. finishedWork$jscomp$0,
  19206. passiveEffectsEndTime,
  19207. commitErrors,
  19208. !0,
  19209. finishedWork
  19210. )
  19211. : !supportsUserTiming ||
  19212. passiveEffectsEndTime <= finishedWork$jscomp$0 ||
  19213. (finishedWork
  19214. ? finishedWork.run(
  19215. console.timeStamp.bind(
  19216. console,
  19217. "Remaining Effects",
  19218. finishedWork$jscomp$0,
  19219. passiveEffectsEndTime,
  19220. currentTrack,
  19221. LANES_TRACK_GROUP,
  19222. "secondary-dark"
  19223. )
  19224. )
  19225. : console.timeStamp(
  19226. "Remaining Effects",
  19227. finishedWork$jscomp$0,
  19228. passiveEffectsEndTime,
  19229. currentTrack,
  19230. LANES_TRACK_GROUP,
  19231. "secondary-dark"
  19232. ));
  19233. finalizeRender(lanes, passiveEffectsEndTime);
  19234. flushSyncWorkAcrossRoots_impl(0, !1);
  19235. didScheduleUpdateDuringPassiveEffects
  19236. ? priority === rootWithPassiveNestedUpdates
  19237. ? nestedPassiveUpdateCount++
  19238. : ((nestedPassiveUpdateCount = 0),
  19239. (rootWithPassiveNestedUpdates = priority))
  19240. : (nestedPassiveUpdateCount = 0);
  19241. didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = !1;
  19242. if (
  19243. injectedHook &&
  19244. "function" === typeof injectedHook.onPostCommitFiberRoot
  19245. )
  19246. try {
  19247. injectedHook.onPostCommitFiberRoot(rendererID, priority);
  19248. } catch (err) {
  19249. hasLoggedError ||
  19250. ((hasLoggedError = !0),
  19251. console.error(
  19252. "React instrumentation encountered an error: %o",
  19253. err
  19254. ));
  19255. }
  19256. var stateNode = priority.current.stateNode;
  19257. stateNode.effectDuration = 0;
  19258. stateNode.passiveEffectDuration = 0;
  19259. return !0;
  19260. } finally {
  19261. (ReactDOMSharedInternals.p = previousPriority),
  19262. (ReactSharedInternals.T = renderPriority),
  19263. releaseRootPooledCache(root, remainingLanes);
  19264. }
  19265. }
  19266. function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
  19267. sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
  19268. recordEffectError(sourceFiber);
  19269. sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
  19270. rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
  19271. null !== rootFiber &&
  19272. (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
  19273. }
  19274. function captureCommitPhaseError(
  19275. sourceFiber,
  19276. nearestMountedAncestor,
  19277. error
  19278. ) {
  19279. isRunningInsertionEffect = false;
  19280. if (3 === sourceFiber.tag)
  19281. captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
  19282. else {
  19283. for (; null !== nearestMountedAncestor; ) {
  19284. if (3 === nearestMountedAncestor.tag) {
  19285. captureCommitPhaseErrorOnRoot(
  19286. nearestMountedAncestor,
  19287. sourceFiber,
  19288. error
  19289. );
  19290. return;
  19291. }
  19292. if (1 === nearestMountedAncestor.tag) {
  19293. var instance = nearestMountedAncestor.stateNode;
  19294. if (
  19295. "function" ===
  19296. typeof nearestMountedAncestor.type.getDerivedStateFromError ||
  19297. ("function" === typeof instance.componentDidCatch &&
  19298. (null === legacyErrorBoundariesThatAlreadyFailed ||
  19299. !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
  19300. ) {
  19301. sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
  19302. recordEffectError(sourceFiber);
  19303. error = createClassErrorUpdate(2);
  19304. instance = enqueueUpdate(nearestMountedAncestor, error, 2);
  19305. null !== instance &&
  19306. (initializeClassErrorUpdate(
  19307. error,
  19308. instance,
  19309. nearestMountedAncestor,
  19310. sourceFiber
  19311. ),
  19312. markRootUpdated$1(instance, 2),
  19313. ensureRootIsScheduled(instance));
  19314. return;
  19315. }
  19316. }
  19317. nearestMountedAncestor = nearestMountedAncestor.return;
  19318. }
  19319. console.error(
  19320. "Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s",
  19321. error
  19322. );
  19323. }
  19324. }
  19325. function attachPingListener(root, wakeable, lanes) {
  19326. var pingCache = root.pingCache;
  19327. if (null === pingCache) {
  19328. pingCache = root.pingCache = new PossiblyWeakMap();
  19329. var threadIDs = new Set();
  19330. pingCache.set(wakeable, threadIDs);
  19331. } else
  19332. (threadIDs = pingCache.get(wakeable)),
  19333. void 0 === threadIDs &&
  19334. ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));
  19335. threadIDs.has(lanes) ||
  19336. ((workInProgressRootDidAttachPingListener = true),
  19337. threadIDs.add(lanes),
  19338. (pingCache = pingSuspendedRoot.bind(null, root, wakeable, lanes)),
  19339. isDevToolsPresent && restorePendingUpdaters(root, lanes),
  19340. wakeable.then(pingCache, pingCache));
  19341. }
  19342. function pingSuspendedRoot(root, wakeable, pingedLanes) {
  19343. var pingCache = root.pingCache;
  19344. null !== pingCache && pingCache.delete(wakeable);
  19345. root.pingedLanes |= root.suspendedLanes & pingedLanes;
  19346. root.warmLanes &= ~pingedLanes;
  19347. 0 !== (pingedLanes & 127)
  19348. ? 0 > blockingUpdateTime &&
  19349. ((blockingClampTime = blockingUpdateTime = now()),
  19350. (blockingUpdateTask = createTask("Promise Resolved")),
  19351. (blockingUpdateType = PINGED_UPDATE))
  19352. : 0 !== (pingedLanes & 4194048) &&
  19353. 0 > transitionUpdateTime &&
  19354. ((transitionClampTime = transitionUpdateTime = now()),
  19355. (transitionUpdateTask = createTask("Promise Resolved")),
  19356. (transitionUpdateType = PINGED_UPDATE));
  19357. isConcurrentActEnvironment() &&
  19358. null === ReactSharedInternals.actQueue &&
  19359. console.error(
  19360. "A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act"
  19361. );
  19362. workInProgressRoot === root &&
  19363. (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&
  19364. (workInProgressRootExitStatus === RootSuspendedWithDelay ||
  19365. (workInProgressRootExitStatus === RootSuspended &&
  19366. (workInProgressRootRenderLanes & 62914560) ===
  19367. workInProgressRootRenderLanes &&
  19368. now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)
  19369. ? (executionContext & RenderContext) === NoContext &&
  19370. prepareFreshStack(root, 0)
  19371. : (workInProgressRootPingedLanes |= pingedLanes),
  19372. workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
  19373. (workInProgressSuspendedRetryLanes = 0));
  19374. ensureRootIsScheduled(root);
  19375. }
  19376. function retryTimedOutBoundary(boundaryFiber, retryLane) {
  19377. 0 === retryLane && (retryLane = claimNextRetryLane());
  19378. boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
  19379. null !== boundaryFiber &&
  19380. (markRootUpdated$1(boundaryFiber, retryLane),
  19381. ensureRootIsScheduled(boundaryFiber));
  19382. }
  19383. function retryDehydratedSuspenseBoundary(boundaryFiber) {
  19384. var suspenseState = boundaryFiber.memoizedState,
  19385. retryLane = 0;
  19386. null !== suspenseState && (retryLane = suspenseState.retryLane);
  19387. retryTimedOutBoundary(boundaryFiber, retryLane);
  19388. }
  19389. function resolveRetryWakeable(boundaryFiber, wakeable) {
  19390. var retryLane = 0;
  19391. switch (boundaryFiber.tag) {
  19392. case 31:
  19393. case 13:
  19394. var retryCache = boundaryFiber.stateNode;
  19395. var suspenseState = boundaryFiber.memoizedState;
  19396. null !== suspenseState && (retryLane = suspenseState.retryLane);
  19397. break;
  19398. case 19:
  19399. retryCache = boundaryFiber.stateNode;
  19400. break;
  19401. case 22:
  19402. retryCache = boundaryFiber.stateNode._retryCache;
  19403. break;
  19404. default:
  19405. throw Error(
  19406. "Pinged unknown suspense boundary type. This is probably a bug in React."
  19407. );
  19408. }
  19409. null !== retryCache && retryCache.delete(wakeable);
  19410. retryTimedOutBoundary(boundaryFiber, retryLane);
  19411. }
  19412. function recursivelyTraverseAndDoubleInvokeEffectsInDEV(
  19413. root$jscomp$0,
  19414. parentFiber,
  19415. isInStrictMode
  19416. ) {
  19417. if (0 !== (parentFiber.subtreeFlags & 67117056))
  19418. for (parentFiber = parentFiber.child; null !== parentFiber; ) {
  19419. var root = root$jscomp$0,
  19420. fiber = parentFiber,
  19421. isStrictModeFiber = fiber.type === REACT_STRICT_MODE_TYPE;
  19422. isStrictModeFiber = isInStrictMode || isStrictModeFiber;
  19423. 22 !== fiber.tag
  19424. ? fiber.flags & 67108864
  19425. ? isStrictModeFiber &&
  19426. runWithFiberInDEV(
  19427. fiber,
  19428. doubleInvokeEffectsOnFiber,
  19429. root,
  19430. fiber
  19431. )
  19432. : recursivelyTraverseAndDoubleInvokeEffectsInDEV(
  19433. root,
  19434. fiber,
  19435. isStrictModeFiber
  19436. )
  19437. : null === fiber.memoizedState &&
  19438. (isStrictModeFiber && fiber.flags & 8192
  19439. ? runWithFiberInDEV(
  19440. fiber,
  19441. doubleInvokeEffectsOnFiber,
  19442. root,
  19443. fiber
  19444. )
  19445. : fiber.subtreeFlags & 67108864 &&
  19446. runWithFiberInDEV(
  19447. fiber,
  19448. recursivelyTraverseAndDoubleInvokeEffectsInDEV,
  19449. root,
  19450. fiber,
  19451. isStrictModeFiber
  19452. ));
  19453. parentFiber = parentFiber.sibling;
  19454. }
  19455. }
  19456. function doubleInvokeEffectsOnFiber(root, fiber) {
  19457. setIsStrictModeForDevtools(true);
  19458. try {
  19459. disappearLayoutEffects(fiber),
  19460. disconnectPassiveEffect(fiber),
  19461. reappearLayoutEffects(root, fiber.alternate, fiber, !1),
  19462. reconnectPassiveEffects(root, fiber, 0, null, !1, 0);
  19463. } finally {
  19464. setIsStrictModeForDevtools(false);
  19465. }
  19466. }
  19467. function commitDoubleInvokeEffectsInDEV(root) {
  19468. var doubleInvokeEffects = true;
  19469. root.current.mode & (StrictLegacyMode | StrictEffectsMode) ||
  19470. (doubleInvokeEffects = false);
  19471. recursivelyTraverseAndDoubleInvokeEffectsInDEV(
  19472. root,
  19473. root.current,
  19474. doubleInvokeEffects
  19475. );
  19476. }
  19477. function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
  19478. if ((executionContext & RenderContext) === NoContext) {
  19479. var tag = fiber.tag;
  19480. if (
  19481. 3 === tag ||
  19482. 1 === tag ||
  19483. 0 === tag ||
  19484. 11 === tag ||
  19485. 14 === tag ||
  19486. 15 === tag
  19487. ) {
  19488. tag = getComponentNameFromFiber(fiber) || "ReactComponent";
  19489. if (null !== didWarnStateUpdateForNotYetMountedComponent) {
  19490. if (didWarnStateUpdateForNotYetMountedComponent.has(tag)) return;
  19491. didWarnStateUpdateForNotYetMountedComponent.add(tag);
  19492. } else didWarnStateUpdateForNotYetMountedComponent = new Set([tag]);
  19493. runWithFiberInDEV(fiber, function () {
  19494. console.error(
  19495. "Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead."
  19496. );
  19497. });
  19498. }
  19499. }
  19500. }
  19501. function restorePendingUpdaters(root, lanes) {
  19502. isDevToolsPresent &&
  19503. root.memoizedUpdaters.forEach(function (schedulingFiber) {
  19504. addFiberToLanesMap(root, schedulingFiber, lanes);
  19505. });
  19506. }
  19507. function scheduleCallback$1(priorityLevel, callback) {
  19508. var actQueue = ReactSharedInternals.actQueue;
  19509. return null !== actQueue
  19510. ? (actQueue.push(callback), fakeActCallbackNode$1)
  19511. : scheduleCallback$3(priorityLevel, callback);
  19512. }
  19513. function warnIfUpdatesNotWrappedWithActDEV(fiber) {
  19514. isConcurrentActEnvironment() &&
  19515. null === ReactSharedInternals.actQueue &&
  19516. runWithFiberInDEV(fiber, function () {
  19517. console.error(
  19518. "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act",
  19519. getComponentNameFromFiber(fiber)
  19520. );
  19521. });
  19522. }
  19523. function ensureRootIsScheduled(root) {
  19524. root !== lastScheduledRoot &&
  19525. null === root.next &&
  19526. (null === lastScheduledRoot
  19527. ? (firstScheduledRoot = lastScheduledRoot = root)
  19528. : (lastScheduledRoot = lastScheduledRoot.next = root));
  19529. mightHavePendingSyncWork = true;
  19530. null !== ReactSharedInternals.actQueue
  19531. ? didScheduleMicrotask_act ||
  19532. ((didScheduleMicrotask_act = true), scheduleImmediateRootScheduleTask())
  19533. : didScheduleMicrotask ||
  19534. ((didScheduleMicrotask = true), scheduleImmediateRootScheduleTask());
  19535. }
  19536. function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
  19537. if (!isFlushingWork && mightHavePendingSyncWork) {
  19538. isFlushingWork = true;
  19539. do {
  19540. var didPerformSomeWork = false;
  19541. for (var root = firstScheduledRoot; null !== root; ) {
  19542. if (0 !== syncTransitionLanes) {
  19543. var pendingLanes = root.pendingLanes;
  19544. if (0 === pendingLanes) var nextLanes = 0;
  19545. else {
  19546. var suspendedLanes = root.suspendedLanes,
  19547. pingedLanes = root.pingedLanes;
  19548. nextLanes =
  19549. (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1;
  19550. nextLanes &= pendingLanes & ~(suspendedLanes & ~pingedLanes);
  19551. nextLanes =
  19552. nextLanes & 201326741
  19553. ? (nextLanes & 201326741) | 1
  19554. : nextLanes
  19555. ? nextLanes | 2
  19556. : 0;
  19557. }
  19558. 0 !== nextLanes &&
  19559. ((didPerformSomeWork = true),
  19560. performSyncWorkOnRoot(root, nextLanes));
  19561. } else
  19562. (nextLanes = workInProgressRootRenderLanes),
  19563. (nextLanes = getNextLanes(
  19564. root,
  19565. root === workInProgressRoot ? nextLanes : 0,
  19566. null !== root.cancelPendingCommit ||
  19567. root.timeoutHandle !== noTimeout
  19568. )),
  19569. 0 === (nextLanes & 3) ||
  19570. checkIfRootIsPrerendering(root, nextLanes) ||
  19571. ((didPerformSomeWork = true),
  19572. performSyncWorkOnRoot(root, nextLanes));
  19573. root = root.next;
  19574. }
  19575. } while (didPerformSomeWork);
  19576. isFlushingWork = false;
  19577. }
  19578. }
  19579. function processRootScheduleInImmediateTask() {
  19580. schedulerEvent = window.event;
  19581. processRootScheduleInMicrotask();
  19582. }
  19583. function processRootScheduleInMicrotask() {
  19584. mightHavePendingSyncWork =
  19585. didScheduleMicrotask_act =
  19586. didScheduleMicrotask =
  19587. false;
  19588. var syncTransitionLanes = 0;
  19589. 0 !== currentEventTransitionLane &&
  19590. shouldAttemptEagerTransition() &&
  19591. (syncTransitionLanes = currentEventTransitionLane);
  19592. for (
  19593. var currentTime = now$1(), prev = null, root = firstScheduledRoot;
  19594. null !== root;
  19595. ) {
  19596. var next = root.next,
  19597. nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);
  19598. if (0 === nextLanes)
  19599. (root.next = null),
  19600. null === prev ? (firstScheduledRoot = next) : (prev.next = next),
  19601. null === next && (lastScheduledRoot = prev);
  19602. else if (
  19603. ((prev = root), 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))
  19604. )
  19605. mightHavePendingSyncWork = true;
  19606. root = next;
  19607. }
  19608. (pendingEffectsStatus !== NO_PENDING_EFFECTS &&
  19609. pendingEffectsStatus !== PENDING_PASSIVE_PHASE) ||
  19610. flushSyncWorkAcrossRoots_impl(syncTransitionLanes);
  19611. 0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
  19612. }
  19613. function scheduleTaskForRootDuringMicrotask(root, currentTime) {
  19614. for (
  19615. var suspendedLanes = root.suspendedLanes,
  19616. pingedLanes = root.pingedLanes,
  19617. expirationTimes = root.expirationTimes,
  19618. lanes = root.pendingLanes & -62914561;
  19619. 0 < lanes;
  19620. ) {
  19621. var index = 31 - clz32(lanes),
  19622. lane = 1 << index,
  19623. expirationTime = expirationTimes[index];
  19624. if (-1 === expirationTime) {
  19625. if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
  19626. expirationTimes[index] = computeExpirationTime(lane, currentTime);
  19627. } else expirationTime <= currentTime && (root.expiredLanes |= lane);
  19628. lanes &= ~lane;
  19629. }
  19630. currentTime = workInProgressRoot;
  19631. suspendedLanes = workInProgressRootRenderLanes;
  19632. suspendedLanes = getNextLanes(
  19633. root,
  19634. root === currentTime ? suspendedLanes : 0,
  19635. null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
  19636. );
  19637. pingedLanes = root.callbackNode;
  19638. if (
  19639. 0 === suspendedLanes ||
  19640. (root === currentTime &&
  19641. (workInProgressSuspendedReason === SuspendedOnData ||
  19642. workInProgressSuspendedReason === SuspendedOnAction)) ||
  19643. null !== root.cancelPendingCommit
  19644. )
  19645. return (
  19646. null !== pingedLanes && cancelCallback(pingedLanes),
  19647. (root.callbackNode = null),
  19648. (root.callbackPriority = 0)
  19649. );
  19650. if (
  19651. 0 === (suspendedLanes & 3) ||
  19652. checkIfRootIsPrerendering(root, suspendedLanes)
  19653. ) {
  19654. currentTime = suspendedLanes & -suspendedLanes;
  19655. if (
  19656. currentTime !== root.callbackPriority ||
  19657. (null !== ReactSharedInternals.actQueue &&
  19658. pingedLanes !== fakeActCallbackNode)
  19659. )
  19660. cancelCallback(pingedLanes);
  19661. else return currentTime;
  19662. switch (lanesToEventPriority(suspendedLanes)) {
  19663. case DiscreteEventPriority:
  19664. case ContinuousEventPriority:
  19665. suspendedLanes = UserBlockingPriority;
  19666. break;
  19667. case DefaultEventPriority:
  19668. suspendedLanes = NormalPriority$1;
  19669. break;
  19670. case IdleEventPriority:
  19671. suspendedLanes = IdlePriority;
  19672. break;
  19673. default:
  19674. suspendedLanes = NormalPriority$1;
  19675. }
  19676. pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);
  19677. null !== ReactSharedInternals.actQueue
  19678. ? (ReactSharedInternals.actQueue.push(pingedLanes),
  19679. (suspendedLanes = fakeActCallbackNode))
  19680. : (suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes));
  19681. root.callbackPriority = currentTime;
  19682. root.callbackNode = suspendedLanes;
  19683. return currentTime;
  19684. }
  19685. null !== pingedLanes && cancelCallback(pingedLanes);
  19686. root.callbackPriority = 2;
  19687. root.callbackNode = null;
  19688. return 2;
  19689. }
  19690. function performWorkOnRootViaSchedulerTask(root, didTimeout) {
  19691. nestedUpdateScheduled = currentUpdateIsNested = false;
  19692. schedulerEvent = window.event;
  19693. if (
  19694. pendingEffectsStatus !== NO_PENDING_EFFECTS &&
  19695. pendingEffectsStatus !== PENDING_PASSIVE_PHASE
  19696. )
  19697. return (root.callbackNode = null), (root.callbackPriority = 0), null;
  19698. var originalCallbackNode = root.callbackNode;
  19699. pendingDelayedCommitReason === IMMEDIATE_COMMIT &&
  19700. (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);
  19701. if (flushPendingEffects() && root.callbackNode !== originalCallbackNode)
  19702. return null;
  19703. var workInProgressRootRenderLanes$jscomp$0 =
  19704. workInProgressRootRenderLanes;
  19705. workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
  19706. root,
  19707. root === workInProgressRoot
  19708. ? workInProgressRootRenderLanes$jscomp$0
  19709. : 0,
  19710. null !== root.cancelPendingCommit || root.timeoutHandle !== noTimeout
  19711. );
  19712. if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
  19713. performWorkOnRoot(
  19714. root,
  19715. workInProgressRootRenderLanes$jscomp$0,
  19716. didTimeout
  19717. );
  19718. scheduleTaskForRootDuringMicrotask(root, now$1());
  19719. return null != root.callbackNode &&
  19720. root.callbackNode === originalCallbackNode
  19721. ? performWorkOnRootViaSchedulerTask.bind(null, root)
  19722. : null;
  19723. }
  19724. function performSyncWorkOnRoot(root, lanes) {
  19725. if (flushPendingEffects()) return null;
  19726. currentUpdateIsNested = nestedUpdateScheduled;
  19727. nestedUpdateScheduled = false;
  19728. performWorkOnRoot(root, lanes, true);
  19729. }
  19730. function cancelCallback(callbackNode) {
  19731. callbackNode !== fakeActCallbackNode &&
  19732. null !== callbackNode &&
  19733. cancelCallback$1(callbackNode);
  19734. }
  19735. function scheduleImmediateRootScheduleTask() {
  19736. null !== ReactSharedInternals.actQueue &&
  19737. ReactSharedInternals.actQueue.push(function () {
  19738. processRootScheduleInMicrotask();
  19739. return null;
  19740. });
  19741. scheduleMicrotask(function () {
  19742. (executionContext & (RenderContext | CommitContext)) !== NoContext
  19743. ? scheduleCallback$3(
  19744. ImmediatePriority,
  19745. processRootScheduleInImmediateTask
  19746. )
  19747. : processRootScheduleInMicrotask();
  19748. });
  19749. }
  19750. function requestTransitionLane() {
  19751. if (0 === currentEventTransitionLane) {
  19752. var actionScopeLane = currentEntangledLane;
  19753. 0 === actionScopeLane &&
  19754. ((actionScopeLane = nextTransitionUpdateLane),
  19755. (nextTransitionUpdateLane <<= 1),
  19756. 0 === (nextTransitionUpdateLane & 261888) &&
  19757. (nextTransitionUpdateLane = 256));
  19758. currentEventTransitionLane = actionScopeLane;
  19759. }
  19760. return currentEventTransitionLane;
  19761. }
  19762. function coerceFormActionProp(actionProp) {
  19763. if (
  19764. null == actionProp ||
  19765. "symbol" === typeof actionProp ||
  19766. "boolean" === typeof actionProp
  19767. )
  19768. return null;
  19769. if ("function" === typeof actionProp) return actionProp;
  19770. checkAttributeStringCoercion(actionProp, "action");
  19771. return sanitizeURL("" + actionProp);
  19772. }
  19773. function createFormDataWithSubmitter(form, submitter) {
  19774. var temp = submitter.ownerDocument.createElement("input");
  19775. temp.name = submitter.name;
  19776. temp.value = submitter.value;
  19777. form.id && temp.setAttribute("form", form.id);
  19778. submitter.parentNode.insertBefore(temp, submitter);
  19779. form = new FormData(form);
  19780. temp.parentNode.removeChild(temp);
  19781. return form;
  19782. }
  19783. function extractEvents$1(
  19784. dispatchQueue,
  19785. domEventName,
  19786. maybeTargetInst,
  19787. nativeEvent,
  19788. nativeEventTarget
  19789. ) {
  19790. if (
  19791. "submit" === domEventName &&
  19792. maybeTargetInst &&
  19793. maybeTargetInst.stateNode === nativeEventTarget
  19794. ) {
  19795. var action = coerceFormActionProp(
  19796. (nativeEventTarget[internalPropsKey] || null).action
  19797. ),
  19798. submitter = nativeEvent.submitter;
  19799. submitter &&
  19800. ((domEventName = (domEventName = submitter[internalPropsKey] || null)
  19801. ? coerceFormActionProp(domEventName.formAction)
  19802. : submitter.getAttribute("formAction")),
  19803. null !== domEventName &&
  19804. ((action = domEventName), (submitter = null)));
  19805. var event = new SyntheticEvent(
  19806. "action",
  19807. "action",
  19808. null,
  19809. nativeEvent,
  19810. nativeEventTarget
  19811. );
  19812. dispatchQueue.push({
  19813. event: event,
  19814. listeners: [
  19815. {
  19816. instance: null,
  19817. listener: function () {
  19818. if (nativeEvent.defaultPrevented) {
  19819. if (0 !== currentEventTransitionLane) {
  19820. var formData = submitter
  19821. ? createFormDataWithSubmitter(
  19822. nativeEventTarget,
  19823. submitter
  19824. )
  19825. : new FormData(nativeEventTarget),
  19826. pendingState = {
  19827. pending: true,
  19828. data: formData,
  19829. method: nativeEventTarget.method,
  19830. action: action
  19831. };
  19832. Object.freeze(pendingState);
  19833. startHostTransition(
  19834. maybeTargetInst,
  19835. pendingState,
  19836. null,
  19837. formData
  19838. );
  19839. }
  19840. } else
  19841. "function" === typeof action &&
  19842. (event.preventDefault(),
  19843. (formData = submitter
  19844. ? createFormDataWithSubmitter(
  19845. nativeEventTarget,
  19846. submitter
  19847. )
  19848. : new FormData(nativeEventTarget)),
  19849. (pendingState = {
  19850. pending: true,
  19851. data: formData,
  19852. method: nativeEventTarget.method,
  19853. action: action
  19854. }),
  19855. Object.freeze(pendingState),
  19856. startHostTransition(
  19857. maybeTargetInst,
  19858. pendingState,
  19859. action,
  19860. formData
  19861. ));
  19862. },
  19863. currentTarget: nativeEventTarget
  19864. }
  19865. ]
  19866. });
  19867. }
  19868. }
  19869. function executeDispatch(event, listener, currentTarget) {
  19870. event.currentTarget = currentTarget;
  19871. try {
  19872. listener(event);
  19873. } catch (error) {
  19874. reportGlobalError(error);
  19875. }
  19876. event.currentTarget = null;
  19877. }
  19878. function processDispatchQueue(dispatchQueue, eventSystemFlags) {
  19879. eventSystemFlags = 0 !== (eventSystemFlags & 4);
  19880. for (var i = 0; i < dispatchQueue.length; i++) {
  19881. var _dispatchQueue$i = dispatchQueue[i];
  19882. a: {
  19883. var previousInstance = void 0,
  19884. event = _dispatchQueue$i.event;
  19885. _dispatchQueue$i = _dispatchQueue$i.listeners;
  19886. if (eventSystemFlags)
  19887. for (
  19888. var i$jscomp$0 = _dispatchQueue$i.length - 1;
  19889. 0 <= i$jscomp$0;
  19890. i$jscomp$0--
  19891. ) {
  19892. var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0],
  19893. instance = _dispatchListeners$i.instance,
  19894. currentTarget = _dispatchListeners$i.currentTarget;
  19895. _dispatchListeners$i = _dispatchListeners$i.listener;
  19896. if (instance !== previousInstance && event.isPropagationStopped())
  19897. break a;
  19898. null !== instance
  19899. ? runWithFiberInDEV(
  19900. instance,
  19901. executeDispatch,
  19902. event,
  19903. _dispatchListeners$i,
  19904. currentTarget
  19905. )
  19906. : executeDispatch(event, _dispatchListeners$i, currentTarget);
  19907. previousInstance = instance;
  19908. }
  19909. else
  19910. for (
  19911. i$jscomp$0 = 0;
  19912. i$jscomp$0 < _dispatchQueue$i.length;
  19913. i$jscomp$0++
  19914. ) {
  19915. _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];
  19916. instance = _dispatchListeners$i.instance;
  19917. currentTarget = _dispatchListeners$i.currentTarget;
  19918. _dispatchListeners$i = _dispatchListeners$i.listener;
  19919. if (instance !== previousInstance && event.isPropagationStopped())
  19920. break a;
  19921. null !== instance
  19922. ? runWithFiberInDEV(
  19923. instance,
  19924. executeDispatch,
  19925. event,
  19926. _dispatchListeners$i,
  19927. currentTarget
  19928. )
  19929. : executeDispatch(event, _dispatchListeners$i, currentTarget);
  19930. previousInstance = instance;
  19931. }
  19932. }
  19933. }
  19934. }
  19935. function listenToNonDelegatedEvent(domEventName, targetElement) {
  19936. nonDelegatedEvents.has(domEventName) ||
  19937. console.error(
  19938. 'Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',
  19939. domEventName
  19940. );
  19941. var listenerSet = targetElement[internalEventHandlersKey];
  19942. void 0 === listenerSet &&
  19943. (listenerSet = targetElement[internalEventHandlersKey] = new Set());
  19944. var listenerSetKey = domEventName + "__bubble";
  19945. listenerSet.has(listenerSetKey) ||
  19946. (addTrappedEventListener(targetElement, domEventName, 2, false),
  19947. listenerSet.add(listenerSetKey));
  19948. }
  19949. function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
  19950. nonDelegatedEvents.has(domEventName) &&
  19951. !isCapturePhaseListener &&
  19952. console.error(
  19953. 'Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',
  19954. domEventName
  19955. );
  19956. var eventSystemFlags = 0;
  19957. isCapturePhaseListener && (eventSystemFlags |= 4);
  19958. addTrappedEventListener(
  19959. target,
  19960. domEventName,
  19961. eventSystemFlags,
  19962. isCapturePhaseListener
  19963. );
  19964. }
  19965. function listenToAllSupportedEvents(rootContainerElement) {
  19966. if (!rootContainerElement[listeningMarker]) {
  19967. rootContainerElement[listeningMarker] = true;
  19968. allNativeEvents.forEach(function (domEventName) {
  19969. "selectionchange" !== domEventName &&
  19970. (nonDelegatedEvents.has(domEventName) ||
  19971. listenToNativeEvent(domEventName, false, rootContainerElement),
  19972. listenToNativeEvent(domEventName, true, rootContainerElement));
  19973. });
  19974. var ownerDocument =
  19975. 9 === rootContainerElement.nodeType
  19976. ? rootContainerElement
  19977. : rootContainerElement.ownerDocument;
  19978. null === ownerDocument ||
  19979. ownerDocument[listeningMarker] ||
  19980. ((ownerDocument[listeningMarker] = true),
  19981. listenToNativeEvent("selectionchange", false, ownerDocument));
  19982. }
  19983. }
  19984. function addTrappedEventListener(
  19985. targetContainer,
  19986. domEventName,
  19987. eventSystemFlags,
  19988. isCapturePhaseListener
  19989. ) {
  19990. switch (getEventPriority(domEventName)) {
  19991. case DiscreteEventPriority:
  19992. var listenerWrapper = dispatchDiscreteEvent;
  19993. break;
  19994. case ContinuousEventPriority:
  19995. listenerWrapper = dispatchContinuousEvent;
  19996. break;
  19997. default:
  19998. listenerWrapper = dispatchEvent;
  19999. }
  20000. eventSystemFlags = listenerWrapper.bind(
  20001. null,
  20002. domEventName,
  20003. eventSystemFlags,
  20004. targetContainer
  20005. );
  20006. listenerWrapper = void 0;
  20007. !passiveBrowserEventsSupported ||
  20008. ("touchstart" !== domEventName &&
  20009. "touchmove" !== domEventName &&
  20010. "wheel" !== domEventName) ||
  20011. (listenerWrapper = true);
  20012. isCapturePhaseListener
  20013. ? void 0 !== listenerWrapper
  20014. ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
  20015. capture: true,
  20016. passive: listenerWrapper
  20017. })
  20018. : targetContainer.addEventListener(domEventName, eventSystemFlags, true)
  20019. : void 0 !== listenerWrapper
  20020. ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
  20021. passive: listenerWrapper
  20022. })
  20023. : targetContainer.addEventListener(
  20024. domEventName,
  20025. eventSystemFlags,
  20026. false
  20027. );
  20028. }
  20029. function dispatchEventForPluginEventSystem(
  20030. domEventName,
  20031. eventSystemFlags,
  20032. nativeEvent,
  20033. targetInst$jscomp$0,
  20034. targetContainer
  20035. ) {
  20036. var ancestorInst = targetInst$jscomp$0;
  20037. if (
  20038. 0 === (eventSystemFlags & 1) &&
  20039. 0 === (eventSystemFlags & 2) &&
  20040. null !== targetInst$jscomp$0
  20041. )
  20042. a: for (;;) {
  20043. if (null === targetInst$jscomp$0) return;
  20044. var nodeTag = targetInst$jscomp$0.tag;
  20045. if (3 === nodeTag || 4 === nodeTag) {
  20046. var container = targetInst$jscomp$0.stateNode.containerInfo;
  20047. if (container === targetContainer) break;
  20048. if (4 === nodeTag)
  20049. for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
  20050. var grandTag = nodeTag.tag;
  20051. if (
  20052. (3 === grandTag || 4 === grandTag) &&
  20053. nodeTag.stateNode.containerInfo === targetContainer
  20054. )
  20055. return;
  20056. nodeTag = nodeTag.return;
  20057. }
  20058. for (; null !== container; ) {
  20059. nodeTag = getClosestInstanceFromNode(container);
  20060. if (null === nodeTag) return;
  20061. grandTag = nodeTag.tag;
  20062. if (
  20063. 5 === grandTag ||
  20064. 6 === grandTag ||
  20065. 26 === grandTag ||
  20066. 27 === grandTag
  20067. ) {
  20068. targetInst$jscomp$0 = ancestorInst = nodeTag;
  20069. continue a;
  20070. }
  20071. container = container.parentNode;
  20072. }
  20073. }
  20074. targetInst$jscomp$0 = targetInst$jscomp$0.return;
  20075. }
  20076. batchedUpdates$1(function () {
  20077. var targetInst = ancestorInst,
  20078. nativeEventTarget = getEventTarget(nativeEvent),
  20079. dispatchQueue = [];
  20080. a: {
  20081. var reactName = topLevelEventsToReactNames.get(domEventName);
  20082. if (void 0 !== reactName) {
  20083. var SyntheticEventCtor = SyntheticEvent,
  20084. reactEventType = domEventName;
  20085. switch (domEventName) {
  20086. case "keypress":
  20087. if (0 === getEventCharCode(nativeEvent)) break a;
  20088. case "keydown":
  20089. case "keyup":
  20090. SyntheticEventCtor = SyntheticKeyboardEvent;
  20091. break;
  20092. case "focusin":
  20093. reactEventType = "focus";
  20094. SyntheticEventCtor = SyntheticFocusEvent;
  20095. break;
  20096. case "focusout":
  20097. reactEventType = "blur";
  20098. SyntheticEventCtor = SyntheticFocusEvent;
  20099. break;
  20100. case "beforeblur":
  20101. case "afterblur":
  20102. SyntheticEventCtor = SyntheticFocusEvent;
  20103. break;
  20104. case "click":
  20105. if (2 === nativeEvent.button) break a;
  20106. case "auxclick":
  20107. case "dblclick":
  20108. case "mousedown":
  20109. case "mousemove":
  20110. case "mouseup":
  20111. case "mouseout":
  20112. case "mouseover":
  20113. case "contextmenu":
  20114. SyntheticEventCtor = SyntheticMouseEvent;
  20115. break;
  20116. case "drag":
  20117. case "dragend":
  20118. case "dragenter":
  20119. case "dragexit":
  20120. case "dragleave":
  20121. case "dragover":
  20122. case "dragstart":
  20123. case "drop":
  20124. SyntheticEventCtor = SyntheticDragEvent;
  20125. break;
  20126. case "touchcancel":
  20127. case "touchend":
  20128. case "touchmove":
  20129. case "touchstart":
  20130. SyntheticEventCtor = SyntheticTouchEvent;
  20131. break;
  20132. case ANIMATION_END:
  20133. case ANIMATION_ITERATION:
  20134. case ANIMATION_START:
  20135. SyntheticEventCtor = SyntheticAnimationEvent;
  20136. break;
  20137. case TRANSITION_END:
  20138. SyntheticEventCtor = SyntheticTransitionEvent;
  20139. break;
  20140. case "scroll":
  20141. case "scrollend":
  20142. SyntheticEventCtor = SyntheticUIEvent;
  20143. break;
  20144. case "wheel":
  20145. SyntheticEventCtor = SyntheticWheelEvent;
  20146. break;
  20147. case "copy":
  20148. case "cut":
  20149. case "paste":
  20150. SyntheticEventCtor = SyntheticClipboardEvent;
  20151. break;
  20152. case "gotpointercapture":
  20153. case "lostpointercapture":
  20154. case "pointercancel":
  20155. case "pointerdown":
  20156. case "pointermove":
  20157. case "pointerout":
  20158. case "pointerover":
  20159. case "pointerup":
  20160. SyntheticEventCtor = SyntheticPointerEvent;
  20161. break;
  20162. case "toggle":
  20163. case "beforetoggle":
  20164. SyntheticEventCtor = SyntheticToggleEvent;
  20165. }
  20166. var inCapturePhase = 0 !== (eventSystemFlags & 4),
  20167. accumulateTargetOnly =
  20168. !inCapturePhase &&
  20169. ("scroll" === domEventName || "scrollend" === domEventName),
  20170. reactEventName = inCapturePhase
  20171. ? null !== reactName
  20172. ? reactName + "Capture"
  20173. : null
  20174. : reactName;
  20175. inCapturePhase = [];
  20176. for (
  20177. var instance = targetInst, lastHostComponent;
  20178. null !== instance;
  20179. ) {
  20180. var _instance2 = instance;
  20181. lastHostComponent = _instance2.stateNode;
  20182. _instance2 = _instance2.tag;
  20183. (5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2) ||
  20184. null === lastHostComponent ||
  20185. null === reactEventName ||
  20186. ((_instance2 = getListener(instance, reactEventName)),
  20187. null != _instance2 &&
  20188. inCapturePhase.push(
  20189. createDispatchListener(
  20190. instance,
  20191. _instance2,
  20192. lastHostComponent
  20193. )
  20194. ));
  20195. if (accumulateTargetOnly) break;
  20196. instance = instance.return;
  20197. }
  20198. 0 < inCapturePhase.length &&
  20199. ((reactName = new SyntheticEventCtor(
  20200. reactName,
  20201. reactEventType,
  20202. null,
  20203. nativeEvent,
  20204. nativeEventTarget
  20205. )),
  20206. dispatchQueue.push({
  20207. event: reactName,
  20208. listeners: inCapturePhase
  20209. }));
  20210. }
  20211. }
  20212. if (0 === (eventSystemFlags & 7)) {
  20213. a: {
  20214. reactName =
  20215. "mouseover" === domEventName || "pointerover" === domEventName;
  20216. SyntheticEventCtor =
  20217. "mouseout" === domEventName || "pointerout" === domEventName;
  20218. if (
  20219. reactName &&
  20220. nativeEvent !== currentReplayingEvent &&
  20221. (reactEventType =
  20222. nativeEvent.relatedTarget || nativeEvent.fromElement) &&
  20223. (getClosestInstanceFromNode(reactEventType) ||
  20224. reactEventType[internalContainerInstanceKey])
  20225. )
  20226. break a;
  20227. if (SyntheticEventCtor || reactName) {
  20228. reactName =
  20229. nativeEventTarget.window === nativeEventTarget
  20230. ? nativeEventTarget
  20231. : (reactName = nativeEventTarget.ownerDocument)
  20232. ? reactName.defaultView || reactName.parentWindow
  20233. : window;
  20234. if (SyntheticEventCtor) {
  20235. if (
  20236. ((reactEventType =
  20237. nativeEvent.relatedTarget || nativeEvent.toElement),
  20238. (SyntheticEventCtor = targetInst),
  20239. (reactEventType = reactEventType
  20240. ? getClosestInstanceFromNode(reactEventType)
  20241. : null),
  20242. null !== reactEventType &&
  20243. ((accumulateTargetOnly =
  20244. getNearestMountedFiber(reactEventType)),
  20245. (inCapturePhase = reactEventType.tag),
  20246. reactEventType !== accumulateTargetOnly ||
  20247. (5 !== inCapturePhase &&
  20248. 27 !== inCapturePhase &&
  20249. 6 !== inCapturePhase)))
  20250. )
  20251. reactEventType = null;
  20252. } else (SyntheticEventCtor = null), (reactEventType = targetInst);
  20253. if (SyntheticEventCtor !== reactEventType) {
  20254. inCapturePhase = SyntheticMouseEvent;
  20255. _instance2 = "onMouseLeave";
  20256. reactEventName = "onMouseEnter";
  20257. instance = "mouse";
  20258. if (
  20259. "pointerout" === domEventName ||
  20260. "pointerover" === domEventName
  20261. )
  20262. (inCapturePhase = SyntheticPointerEvent),
  20263. (_instance2 = "onPointerLeave"),
  20264. (reactEventName = "onPointerEnter"),
  20265. (instance = "pointer");
  20266. accumulateTargetOnly =
  20267. null == SyntheticEventCtor
  20268. ? reactName
  20269. : getNodeFromInstance(SyntheticEventCtor);
  20270. lastHostComponent =
  20271. null == reactEventType
  20272. ? reactName
  20273. : getNodeFromInstance(reactEventType);
  20274. reactName = new inCapturePhase(
  20275. _instance2,
  20276. instance + "leave",
  20277. SyntheticEventCtor,
  20278. nativeEvent,
  20279. nativeEventTarget
  20280. );
  20281. reactName.target = accumulateTargetOnly;
  20282. reactName.relatedTarget = lastHostComponent;
  20283. _instance2 = null;
  20284. getClosestInstanceFromNode(nativeEventTarget) === targetInst &&
  20285. ((inCapturePhase = new inCapturePhase(
  20286. reactEventName,
  20287. instance + "enter",
  20288. reactEventType,
  20289. nativeEvent,
  20290. nativeEventTarget
  20291. )),
  20292. (inCapturePhase.target = lastHostComponent),
  20293. (inCapturePhase.relatedTarget = accumulateTargetOnly),
  20294. (_instance2 = inCapturePhase));
  20295. accumulateTargetOnly = _instance2;
  20296. if (SyntheticEventCtor && reactEventType)
  20297. b: {
  20298. inCapturePhase = getParent;
  20299. reactEventName = SyntheticEventCtor;
  20300. instance = reactEventType;
  20301. lastHostComponent = 0;
  20302. for (
  20303. _instance2 = reactEventName;
  20304. _instance2;
  20305. _instance2 = inCapturePhase(_instance2)
  20306. )
  20307. lastHostComponent++;
  20308. _instance2 = 0;
  20309. for (
  20310. var tempB = instance;
  20311. tempB;
  20312. tempB = inCapturePhase(tempB)
  20313. )
  20314. _instance2++;
  20315. for (; 0 < lastHostComponent - _instance2; )
  20316. (reactEventName = inCapturePhase(reactEventName)),
  20317. lastHostComponent--;
  20318. for (; 0 < _instance2 - lastHostComponent; )
  20319. (instance = inCapturePhase(instance)), _instance2--;
  20320. for (; lastHostComponent--; ) {
  20321. if (
  20322. reactEventName === instance ||
  20323. (null !== instance &&
  20324. reactEventName === instance.alternate)
  20325. ) {
  20326. inCapturePhase = reactEventName;
  20327. break b;
  20328. }
  20329. reactEventName = inCapturePhase(reactEventName);
  20330. instance = inCapturePhase(instance);
  20331. }
  20332. inCapturePhase = null;
  20333. }
  20334. else inCapturePhase = null;
  20335. null !== SyntheticEventCtor &&
  20336. accumulateEnterLeaveListenersForEvent(
  20337. dispatchQueue,
  20338. reactName,
  20339. SyntheticEventCtor,
  20340. inCapturePhase,
  20341. !1
  20342. );
  20343. null !== reactEventType &&
  20344. null !== accumulateTargetOnly &&
  20345. accumulateEnterLeaveListenersForEvent(
  20346. dispatchQueue,
  20347. accumulateTargetOnly,
  20348. reactEventType,
  20349. inCapturePhase,
  20350. !0
  20351. );
  20352. }
  20353. }
  20354. }
  20355. a: {
  20356. reactName = targetInst ? getNodeFromInstance(targetInst) : window;
  20357. SyntheticEventCtor =
  20358. reactName.nodeName && reactName.nodeName.toLowerCase();
  20359. if (
  20360. "select" === SyntheticEventCtor ||
  20361. ("input" === SyntheticEventCtor && "file" === reactName.type)
  20362. )
  20363. var getTargetInstFunc = getTargetInstForChangeEvent;
  20364. else if (isTextInputElement(reactName))
  20365. if (isInputEventSupported)
  20366. getTargetInstFunc = getTargetInstForInputOrChangeEvent;
  20367. else {
  20368. getTargetInstFunc = getTargetInstForInputEventPolyfill;
  20369. var handleEventFunc = handleEventsForInputEventPolyfill;
  20370. }
  20371. else
  20372. (SyntheticEventCtor = reactName.nodeName),
  20373. !SyntheticEventCtor ||
  20374. "input" !== SyntheticEventCtor.toLowerCase() ||
  20375. ("checkbox" !== reactName.type && "radio" !== reactName.type)
  20376. ? targetInst &&
  20377. isCustomElement(targetInst.elementType) &&
  20378. (getTargetInstFunc = getTargetInstForChangeEvent)
  20379. : (getTargetInstFunc = getTargetInstForClickEvent);
  20380. if (
  20381. getTargetInstFunc &&
  20382. (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))
  20383. ) {
  20384. createAndAccumulateChangeEvent(
  20385. dispatchQueue,
  20386. getTargetInstFunc,
  20387. nativeEvent,
  20388. nativeEventTarget
  20389. );
  20390. break a;
  20391. }
  20392. handleEventFunc &&
  20393. handleEventFunc(domEventName, reactName, targetInst);
  20394. "focusout" === domEventName &&
  20395. targetInst &&
  20396. "number" === reactName.type &&
  20397. null != targetInst.memoizedProps.value &&
  20398. setDefaultValue(reactName, "number", reactName.value);
  20399. }
  20400. handleEventFunc = targetInst
  20401. ? getNodeFromInstance(targetInst)
  20402. : window;
  20403. switch (domEventName) {
  20404. case "focusin":
  20405. if (
  20406. isTextInputElement(handleEventFunc) ||
  20407. "true" === handleEventFunc.contentEditable
  20408. )
  20409. (activeElement = handleEventFunc),
  20410. (activeElementInst = targetInst),
  20411. (lastSelection = null);
  20412. break;
  20413. case "focusout":
  20414. lastSelection = activeElementInst = activeElement = null;
  20415. break;
  20416. case "mousedown":
  20417. mouseDown = !0;
  20418. break;
  20419. case "contextmenu":
  20420. case "mouseup":
  20421. case "dragend":
  20422. mouseDown = !1;
  20423. constructSelectEvent(
  20424. dispatchQueue,
  20425. nativeEvent,
  20426. nativeEventTarget
  20427. );
  20428. break;
  20429. case "selectionchange":
  20430. if (skipSelectionChangeEvent) break;
  20431. case "keydown":
  20432. case "keyup":
  20433. constructSelectEvent(
  20434. dispatchQueue,
  20435. nativeEvent,
  20436. nativeEventTarget
  20437. );
  20438. }
  20439. var fallbackData;
  20440. if (canUseCompositionEvent)
  20441. b: {
  20442. switch (domEventName) {
  20443. case "compositionstart":
  20444. var eventType = "onCompositionStart";
  20445. break b;
  20446. case "compositionend":
  20447. eventType = "onCompositionEnd";
  20448. break b;
  20449. case "compositionupdate":
  20450. eventType = "onCompositionUpdate";
  20451. break b;
  20452. }
  20453. eventType = void 0;
  20454. }
  20455. else
  20456. isComposing
  20457. ? isFallbackCompositionEnd(domEventName, nativeEvent) &&
  20458. (eventType = "onCompositionEnd")
  20459. : "keydown" === domEventName &&
  20460. nativeEvent.keyCode === START_KEYCODE &&
  20461. (eventType = "onCompositionStart");
  20462. eventType &&
  20463. (useFallbackCompositionData &&
  20464. "ko" !== nativeEvent.locale &&
  20465. (isComposing || "onCompositionStart" !== eventType
  20466. ? "onCompositionEnd" === eventType &&
  20467. isComposing &&
  20468. (fallbackData = getData())
  20469. : ((root = nativeEventTarget),
  20470. (startText = "value" in root ? root.value : root.textContent),
  20471. (isComposing = !0))),
  20472. (handleEventFunc = accumulateTwoPhaseListeners(
  20473. targetInst,
  20474. eventType
  20475. )),
  20476. 0 < handleEventFunc.length &&
  20477. ((eventType = new SyntheticCompositionEvent(
  20478. eventType,
  20479. domEventName,
  20480. null,
  20481. nativeEvent,
  20482. nativeEventTarget
  20483. )),
  20484. dispatchQueue.push({
  20485. event: eventType,
  20486. listeners: handleEventFunc
  20487. }),
  20488. fallbackData
  20489. ? (eventType.data = fallbackData)
  20490. : ((fallbackData = getDataFromCustomEvent(nativeEvent)),
  20491. null !== fallbackData && (eventType.data = fallbackData))));
  20492. if (
  20493. (fallbackData = canUseTextInputEvent
  20494. ? getNativeBeforeInputChars(domEventName, nativeEvent)
  20495. : getFallbackBeforeInputChars(domEventName, nativeEvent))
  20496. )
  20497. (eventType = accumulateTwoPhaseListeners(
  20498. targetInst,
  20499. "onBeforeInput"
  20500. )),
  20501. 0 < eventType.length &&
  20502. ((handleEventFunc = new SyntheticInputEvent(
  20503. "onBeforeInput",
  20504. "beforeinput",
  20505. null,
  20506. nativeEvent,
  20507. nativeEventTarget
  20508. )),
  20509. dispatchQueue.push({
  20510. event: handleEventFunc,
  20511. listeners: eventType
  20512. }),
  20513. (handleEventFunc.data = fallbackData));
  20514. extractEvents$1(
  20515. dispatchQueue,
  20516. domEventName,
  20517. targetInst,
  20518. nativeEvent,
  20519. nativeEventTarget
  20520. );
  20521. }
  20522. processDispatchQueue(dispatchQueue, eventSystemFlags);
  20523. });
  20524. }
  20525. function createDispatchListener(instance, listener, currentTarget) {
  20526. return {
  20527. instance: instance,
  20528. listener: listener,
  20529. currentTarget: currentTarget
  20530. };
  20531. }
  20532. function accumulateTwoPhaseListeners(targetFiber, reactName) {
  20533. for (
  20534. var captureName = reactName + "Capture", listeners = [];
  20535. null !== targetFiber;
  20536. ) {
  20537. var _instance3 = targetFiber,
  20538. stateNode = _instance3.stateNode;
  20539. _instance3 = _instance3.tag;
  20540. (5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3) ||
  20541. null === stateNode ||
  20542. ((_instance3 = getListener(targetFiber, captureName)),
  20543. null != _instance3 &&
  20544. listeners.unshift(
  20545. createDispatchListener(targetFiber, _instance3, stateNode)
  20546. ),
  20547. (_instance3 = getListener(targetFiber, reactName)),
  20548. null != _instance3 &&
  20549. listeners.push(
  20550. createDispatchListener(targetFiber, _instance3, stateNode)
  20551. ));
  20552. if (3 === targetFiber.tag) return listeners;
  20553. targetFiber = targetFiber.return;
  20554. }
  20555. return [];
  20556. }
  20557. function getParent(inst) {
  20558. if (null === inst) return null;
  20559. do inst = inst.return;
  20560. while (inst && 5 !== inst.tag && 27 !== inst.tag);
  20561. return inst ? inst : null;
  20562. }
  20563. function accumulateEnterLeaveListenersForEvent(
  20564. dispatchQueue,
  20565. event,
  20566. target,
  20567. common,
  20568. inCapturePhase
  20569. ) {
  20570. for (
  20571. var registrationName = event._reactName, listeners = [];
  20572. null !== target && target !== common;
  20573. ) {
  20574. var _instance4 = target,
  20575. alternate = _instance4.alternate,
  20576. stateNode = _instance4.stateNode;
  20577. _instance4 = _instance4.tag;
  20578. if (null !== alternate && alternate === common) break;
  20579. (5 !== _instance4 && 26 !== _instance4 && 27 !== _instance4) ||
  20580. null === stateNode ||
  20581. ((alternate = stateNode),
  20582. inCapturePhase
  20583. ? ((stateNode = getListener(target, registrationName)),
  20584. null != stateNode &&
  20585. listeners.unshift(
  20586. createDispatchListener(target, stateNode, alternate)
  20587. ))
  20588. : inCapturePhase ||
  20589. ((stateNode = getListener(target, registrationName)),
  20590. null != stateNode &&
  20591. listeners.push(
  20592. createDispatchListener(target, stateNode, alternate)
  20593. )));
  20594. target = target.return;
  20595. }
  20596. 0 !== listeners.length &&
  20597. dispatchQueue.push({ event: event, listeners: listeners });
  20598. }
  20599. function validatePropertiesInDevelopment(type, props) {
  20600. validateProperties$2(type, props);
  20601. ("input" !== type && "textarea" !== type && "select" !== type) ||
  20602. null == props ||
  20603. null !== props.value ||
  20604. didWarnValueNull ||
  20605. ((didWarnValueNull = true),
  20606. "select" === type && props.multiple
  20607. ? console.error(
  20608. "`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",
  20609. type
  20610. )
  20611. : console.error(
  20612. "`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",
  20613. type
  20614. ));
  20615. var eventRegistry = {
  20616. registrationNameDependencies: registrationNameDependencies,
  20617. possibleRegistrationNames: possibleRegistrationNames
  20618. };
  20619. isCustomElement(type) ||
  20620. "string" === typeof props.is ||
  20621. warnUnknownProperties(type, props, eventRegistry);
  20622. props.contentEditable &&
  20623. !props.suppressContentEditableWarning &&
  20624. null != props.children &&
  20625. console.error(
  20626. "A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."
  20627. );
  20628. }
  20629. function warnForPropDifference(
  20630. propName,
  20631. serverValue,
  20632. clientValue,
  20633. serverDifferences
  20634. ) {
  20635. serverValue !== clientValue &&
  20636. ((clientValue = normalizeMarkupForTextOrAttribute(clientValue)),
  20637. normalizeMarkupForTextOrAttribute(serverValue) !== clientValue &&
  20638. (serverDifferences[propName] = serverValue));
  20639. }
  20640. function warnForExtraAttributes(
  20641. domElement,
  20642. attributeNames,
  20643. serverDifferences
  20644. ) {
  20645. attributeNames.forEach(function (attributeName) {
  20646. serverDifferences[getPropNameFromAttributeName(attributeName)] =
  20647. "style" === attributeName
  20648. ? getStylesObjectFromElement(domElement)
  20649. : domElement.getAttribute(attributeName);
  20650. });
  20651. }
  20652. function warnForInvalidEventListener(registrationName, listener) {
  20653. false === listener
  20654. ? console.error(
  20655. "Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",
  20656. registrationName,
  20657. registrationName,
  20658. registrationName
  20659. )
  20660. : console.error(
  20661. "Expected `%s` listener to be a function, instead got a value of `%s` type.",
  20662. registrationName,
  20663. typeof listener
  20664. );
  20665. }
  20666. function normalizeHTML(parent, html) {
  20667. parent =
  20668. parent.namespaceURI === MATH_NAMESPACE ||
  20669. parent.namespaceURI === SVG_NAMESPACE
  20670. ? parent.ownerDocument.createElementNS(
  20671. parent.namespaceURI,
  20672. parent.tagName
  20673. )
  20674. : parent.ownerDocument.createElement(parent.tagName);
  20675. parent.innerHTML = html;
  20676. return parent.innerHTML;
  20677. }
  20678. function normalizeMarkupForTextOrAttribute(markup) {
  20679. willCoercionThrow(markup) &&
  20680. (console.error(
  20681. "The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",
  20682. typeName(markup)
  20683. ),
  20684. testStringCoercion(markup));
  20685. return ("string" === typeof markup ? markup : "" + markup)
  20686. .replace(NORMALIZE_NEWLINES_REGEX, "\n")
  20687. .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
  20688. }
  20689. function checkForUnmatchedText(serverText, clientText) {
  20690. clientText = normalizeMarkupForTextOrAttribute(clientText);
  20691. return normalizeMarkupForTextOrAttribute(serverText) === clientText
  20692. ? true
  20693. : false;
  20694. }
  20695. function setProp(domElement, tag, key, value, props, prevValue) {
  20696. switch (key) {
  20697. case "children":
  20698. if ("string" === typeof value)
  20699. validateTextNesting(value, tag, false),
  20700. "body" === tag ||
  20701. ("textarea" === tag && "" === value) ||
  20702. setTextContent(domElement, value);
  20703. else if ("number" === typeof value || "bigint" === typeof value)
  20704. validateTextNesting("" + value, tag, false),
  20705. "body" !== tag && setTextContent(domElement, "" + value);
  20706. break;
  20707. case "className":
  20708. setValueForKnownAttribute(domElement, "class", value);
  20709. break;
  20710. case "tabIndex":
  20711. setValueForKnownAttribute(domElement, "tabindex", value);
  20712. break;
  20713. case "dir":
  20714. case "role":
  20715. case "viewBox":
  20716. case "width":
  20717. case "height":
  20718. setValueForKnownAttribute(domElement, key, value);
  20719. break;
  20720. case "style":
  20721. setValueForStyles(domElement, value, prevValue);
  20722. break;
  20723. case "data":
  20724. if ("object" !== tag) {
  20725. setValueForKnownAttribute(domElement, "data", value);
  20726. break;
  20727. }
  20728. case "src":
  20729. case "href":
  20730. if ("" === value && ("a" !== tag || "href" !== key)) {
  20731. "src" === key
  20732. ? console.error(
  20733. 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
  20734. key,
  20735. key
  20736. )
  20737. : console.error(
  20738. 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
  20739. key,
  20740. key
  20741. );
  20742. domElement.removeAttribute(key);
  20743. break;
  20744. }
  20745. if (
  20746. null == value ||
  20747. "function" === typeof value ||
  20748. "symbol" === typeof value ||
  20749. "boolean" === typeof value
  20750. ) {
  20751. domElement.removeAttribute(key);
  20752. break;
  20753. }
  20754. checkAttributeStringCoercion(value, key);
  20755. value = sanitizeURL("" + value);
  20756. domElement.setAttribute(key, value);
  20757. break;
  20758. case "action":
  20759. case "formAction":
  20760. null != value &&
  20761. ("form" === tag
  20762. ? "formAction" === key
  20763. ? console.error(
  20764. "You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."
  20765. )
  20766. : "function" === typeof value &&
  20767. ((null == props.encType && null == props.method) ||
  20768. didWarnFormActionMethod ||
  20769. ((didWarnFormActionMethod = true),
  20770. console.error(
  20771. "Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden."
  20772. )),
  20773. null == props.target ||
  20774. didWarnFormActionTarget ||
  20775. ((didWarnFormActionTarget = true),
  20776. console.error(
  20777. "Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."
  20778. )))
  20779. : "input" === tag || "button" === tag
  20780. ? "action" === key
  20781. ? console.error(
  20782. "You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."
  20783. )
  20784. : "input" !== tag ||
  20785. "submit" === props.type ||
  20786. "image" === props.type ||
  20787. didWarnFormActionType
  20788. ? "button" !== tag ||
  20789. null == props.type ||
  20790. "submit" === props.type ||
  20791. didWarnFormActionType
  20792. ? "function" === typeof value &&
  20793. (null == props.name ||
  20794. didWarnFormActionName ||
  20795. ((didWarnFormActionName = true),
  20796. console.error(
  20797. 'Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'
  20798. )),
  20799. (null == props.formEncType &&
  20800. null == props.formMethod) ||
  20801. didWarnFormActionMethod ||
  20802. ((didWarnFormActionMethod = true),
  20803. console.error(
  20804. "Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden."
  20805. )),
  20806. null == props.formTarget ||
  20807. didWarnFormActionTarget ||
  20808. ((didWarnFormActionTarget = true),
  20809. console.error(
  20810. "Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."
  20811. )))
  20812. : ((didWarnFormActionType = true),
  20813. console.error(
  20814. 'A button can only specify a formAction along with type="submit" or no type.'
  20815. ))
  20816. : ((didWarnFormActionType = true),
  20817. console.error(
  20818. 'An input can only specify a formAction along with type="submit" or type="image".'
  20819. ))
  20820. : "action" === key
  20821. ? console.error(
  20822. "You can only pass the action prop to <form>."
  20823. )
  20824. : console.error(
  20825. "You can only pass the formAction prop to <input> or <button>."
  20826. ));
  20827. if ("function" === typeof value) {
  20828. domElement.setAttribute(
  20829. key,
  20830. "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().')"
  20831. );
  20832. break;
  20833. } else
  20834. "function" === typeof prevValue &&
  20835. ("formAction" === key
  20836. ? ("input" !== tag &&
  20837. setProp(domElement, tag, "name", props.name, props, null),
  20838. setProp(
  20839. domElement,
  20840. tag,
  20841. "formEncType",
  20842. props.formEncType,
  20843. props,
  20844. null
  20845. ),
  20846. setProp(
  20847. domElement,
  20848. tag,
  20849. "formMethod",
  20850. props.formMethod,
  20851. props,
  20852. null
  20853. ),
  20854. setProp(
  20855. domElement,
  20856. tag,
  20857. "formTarget",
  20858. props.formTarget,
  20859. props,
  20860. null
  20861. ))
  20862. : (setProp(
  20863. domElement,
  20864. tag,
  20865. "encType",
  20866. props.encType,
  20867. props,
  20868. null
  20869. ),
  20870. setProp(domElement, tag, "method", props.method, props, null),
  20871. setProp(
  20872. domElement,
  20873. tag,
  20874. "target",
  20875. props.target,
  20876. props,
  20877. null
  20878. )));
  20879. if (
  20880. null == value ||
  20881. "symbol" === typeof value ||
  20882. "boolean" === typeof value
  20883. ) {
  20884. domElement.removeAttribute(key);
  20885. break;
  20886. }
  20887. checkAttributeStringCoercion(value, key);
  20888. value = sanitizeURL("" + value);
  20889. domElement.setAttribute(key, value);
  20890. break;
  20891. case "onClick":
  20892. null != value &&
  20893. ("function" !== typeof value &&
  20894. warnForInvalidEventListener(key, value),
  20895. (domElement.onclick = noop$1));
  20896. break;
  20897. case "onScroll":
  20898. null != value &&
  20899. ("function" !== typeof value &&
  20900. warnForInvalidEventListener(key, value),
  20901. listenToNonDelegatedEvent("scroll", domElement));
  20902. break;
  20903. case "onScrollEnd":
  20904. null != value &&
  20905. ("function" !== typeof value &&
  20906. warnForInvalidEventListener(key, value),
  20907. listenToNonDelegatedEvent("scrollend", domElement));
  20908. break;
  20909. case "dangerouslySetInnerHTML":
  20910. if (null != value) {
  20911. if ("object" !== typeof value || !("__html" in value))
  20912. throw Error(
  20913. "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
  20914. );
  20915. key = value.__html;
  20916. if (null != key) {
  20917. if (null != props.children)
  20918. throw Error(
  20919. "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
  20920. );
  20921. domElement.innerHTML = key;
  20922. }
  20923. }
  20924. break;
  20925. case "multiple":
  20926. domElement.multiple =
  20927. value && "function" !== typeof value && "symbol" !== typeof value;
  20928. break;
  20929. case "muted":
  20930. domElement.muted =
  20931. value && "function" !== typeof value && "symbol" !== typeof value;
  20932. break;
  20933. case "suppressContentEditableWarning":
  20934. case "suppressHydrationWarning":
  20935. case "defaultValue":
  20936. case "defaultChecked":
  20937. case "innerHTML":
  20938. case "ref":
  20939. break;
  20940. case "autoFocus":
  20941. break;
  20942. case "xlinkHref":
  20943. if (
  20944. null == value ||
  20945. "function" === typeof value ||
  20946. "boolean" === typeof value ||
  20947. "symbol" === typeof value
  20948. ) {
  20949. domElement.removeAttribute("xlink:href");
  20950. break;
  20951. }
  20952. checkAttributeStringCoercion(value, key);
  20953. key = sanitizeURL("" + value);
  20954. domElement.setAttributeNS(xlinkNamespace, "xlink:href", key);
  20955. break;
  20956. case "contentEditable":
  20957. case "spellCheck":
  20958. case "draggable":
  20959. case "value":
  20960. case "autoReverse":
  20961. case "externalResourcesRequired":
  20962. case "focusable":
  20963. case "preserveAlpha":
  20964. null != value &&
  20965. "function" !== typeof value &&
  20966. "symbol" !== typeof value
  20967. ? (checkAttributeStringCoercion(value, key),
  20968. domElement.setAttribute(key, "" + value))
  20969. : domElement.removeAttribute(key);
  20970. break;
  20971. case "inert":
  20972. "" !== value ||
  20973. didWarnForNewBooleanPropsWithEmptyValue[key] ||
  20974. ((didWarnForNewBooleanPropsWithEmptyValue[key] = true),
  20975. console.error(
  20976. "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
  20977. key
  20978. ));
  20979. case "allowFullScreen":
  20980. case "async":
  20981. case "autoPlay":
  20982. case "controls":
  20983. case "default":
  20984. case "defer":
  20985. case "disabled":
  20986. case "disablePictureInPicture":
  20987. case "disableRemotePlayback":
  20988. case "formNoValidate":
  20989. case "hidden":
  20990. case "loop":
  20991. case "noModule":
  20992. case "noValidate":
  20993. case "open":
  20994. case "playsInline":
  20995. case "readOnly":
  20996. case "required":
  20997. case "reversed":
  20998. case "scoped":
  20999. case "seamless":
  21000. case "itemScope":
  21001. value && "function" !== typeof value && "symbol" !== typeof value
  21002. ? domElement.setAttribute(key, "")
  21003. : domElement.removeAttribute(key);
  21004. break;
  21005. case "capture":
  21006. case "download":
  21007. true === value
  21008. ? domElement.setAttribute(key, "")
  21009. : false !== value &&
  21010. null != value &&
  21011. "function" !== typeof value &&
  21012. "symbol" !== typeof value
  21013. ? (checkAttributeStringCoercion(value, key),
  21014. domElement.setAttribute(key, value))
  21015. : domElement.removeAttribute(key);
  21016. break;
  21017. case "cols":
  21018. case "rows":
  21019. case "size":
  21020. case "span":
  21021. null != value &&
  21022. "function" !== typeof value &&
  21023. "symbol" !== typeof value &&
  21024. !isNaN(value) &&
  21025. 1 <= value
  21026. ? (checkAttributeStringCoercion(value, key),
  21027. domElement.setAttribute(key, value))
  21028. : domElement.removeAttribute(key);
  21029. break;
  21030. case "rowSpan":
  21031. case "start":
  21032. null == value ||
  21033. "function" === typeof value ||
  21034. "symbol" === typeof value ||
  21035. isNaN(value)
  21036. ? domElement.removeAttribute(key)
  21037. : (checkAttributeStringCoercion(value, key),
  21038. domElement.setAttribute(key, value));
  21039. break;
  21040. case "popover":
  21041. listenToNonDelegatedEvent("beforetoggle", domElement);
  21042. listenToNonDelegatedEvent("toggle", domElement);
  21043. setValueForAttribute(domElement, "popover", value);
  21044. break;
  21045. case "xlinkActuate":
  21046. setValueForNamespacedAttribute(
  21047. domElement,
  21048. xlinkNamespace,
  21049. "xlink:actuate",
  21050. value
  21051. );
  21052. break;
  21053. case "xlinkArcrole":
  21054. setValueForNamespacedAttribute(
  21055. domElement,
  21056. xlinkNamespace,
  21057. "xlink:arcrole",
  21058. value
  21059. );
  21060. break;
  21061. case "xlinkRole":
  21062. setValueForNamespacedAttribute(
  21063. domElement,
  21064. xlinkNamespace,
  21065. "xlink:role",
  21066. value
  21067. );
  21068. break;
  21069. case "xlinkShow":
  21070. setValueForNamespacedAttribute(
  21071. domElement,
  21072. xlinkNamespace,
  21073. "xlink:show",
  21074. value
  21075. );
  21076. break;
  21077. case "xlinkTitle":
  21078. setValueForNamespacedAttribute(
  21079. domElement,
  21080. xlinkNamespace,
  21081. "xlink:title",
  21082. value
  21083. );
  21084. break;
  21085. case "xlinkType":
  21086. setValueForNamespacedAttribute(
  21087. domElement,
  21088. xlinkNamespace,
  21089. "xlink:type",
  21090. value
  21091. );
  21092. break;
  21093. case "xmlBase":
  21094. setValueForNamespacedAttribute(
  21095. domElement,
  21096. xmlNamespace,
  21097. "xml:base",
  21098. value
  21099. );
  21100. break;
  21101. case "xmlLang":
  21102. setValueForNamespacedAttribute(
  21103. domElement,
  21104. xmlNamespace,
  21105. "xml:lang",
  21106. value
  21107. );
  21108. break;
  21109. case "xmlSpace":
  21110. setValueForNamespacedAttribute(
  21111. domElement,
  21112. xmlNamespace,
  21113. "xml:space",
  21114. value
  21115. );
  21116. break;
  21117. case "is":
  21118. null != prevValue &&
  21119. console.error(
  21120. 'Cannot update the "is" prop after it has been initialized.'
  21121. );
  21122. setValueForAttribute(domElement, "is", value);
  21123. break;
  21124. case "innerText":
  21125. case "textContent":
  21126. break;
  21127. case "popoverTarget":
  21128. didWarnPopoverTargetObject ||
  21129. null == value ||
  21130. "object" !== typeof value ||
  21131. ((didWarnPopoverTargetObject = true),
  21132. console.error(
  21133. "The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",
  21134. value
  21135. ));
  21136. default:
  21137. !(2 < key.length) ||
  21138. ("o" !== key[0] && "O" !== key[0]) ||
  21139. ("n" !== key[1] && "N" !== key[1])
  21140. ? ((key = getAttributeAlias(key)),
  21141. setValueForAttribute(domElement, key, value))
  21142. : registrationNameDependencies.hasOwnProperty(key) &&
  21143. null != value &&
  21144. "function" !== typeof value &&
  21145. warnForInvalidEventListener(key, value);
  21146. }
  21147. }
  21148. function setPropOnCustomElement(
  21149. domElement,
  21150. tag,
  21151. key,
  21152. value,
  21153. props,
  21154. prevValue
  21155. ) {
  21156. switch (key) {
  21157. case "style":
  21158. setValueForStyles(domElement, value, prevValue);
  21159. break;
  21160. case "dangerouslySetInnerHTML":
  21161. if (null != value) {
  21162. if ("object" !== typeof value || !("__html" in value))
  21163. throw Error(
  21164. "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
  21165. );
  21166. key = value.__html;
  21167. if (null != key) {
  21168. if (null != props.children)
  21169. throw Error(
  21170. "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
  21171. );
  21172. domElement.innerHTML = key;
  21173. }
  21174. }
  21175. break;
  21176. case "children":
  21177. "string" === typeof value
  21178. ? setTextContent(domElement, value)
  21179. : ("number" === typeof value || "bigint" === typeof value) &&
  21180. setTextContent(domElement, "" + value);
  21181. break;
  21182. case "onScroll":
  21183. null != value &&
  21184. ("function" !== typeof value &&
  21185. warnForInvalidEventListener(key, value),
  21186. listenToNonDelegatedEvent("scroll", domElement));
  21187. break;
  21188. case "onScrollEnd":
  21189. null != value &&
  21190. ("function" !== typeof value &&
  21191. warnForInvalidEventListener(key, value),
  21192. listenToNonDelegatedEvent("scrollend", domElement));
  21193. break;
  21194. case "onClick":
  21195. null != value &&
  21196. ("function" !== typeof value &&
  21197. warnForInvalidEventListener(key, value),
  21198. (domElement.onclick = noop$1));
  21199. break;
  21200. case "suppressContentEditableWarning":
  21201. case "suppressHydrationWarning":
  21202. case "innerHTML":
  21203. case "ref":
  21204. break;
  21205. case "innerText":
  21206. case "textContent":
  21207. break;
  21208. default:
  21209. if (registrationNameDependencies.hasOwnProperty(key))
  21210. null != value &&
  21211. "function" !== typeof value &&
  21212. warnForInvalidEventListener(key, value);
  21213. else
  21214. a: {
  21215. if (
  21216. "o" === key[0] &&
  21217. "n" === key[1] &&
  21218. ((props = key.endsWith("Capture")),
  21219. (tag = key.slice(2, props ? key.length - 7 : void 0)),
  21220. (prevValue = domElement[internalPropsKey] || null),
  21221. (prevValue = null != prevValue ? prevValue[key] : null),
  21222. "function" === typeof prevValue &&
  21223. domElement.removeEventListener(tag, prevValue, props),
  21224. "function" === typeof value)
  21225. ) {
  21226. "function" !== typeof prevValue &&
  21227. null !== prevValue &&
  21228. (key in domElement
  21229. ? (domElement[key] = null)
  21230. : domElement.hasAttribute(key) &&
  21231. domElement.removeAttribute(key));
  21232. domElement.addEventListener(tag, value, props);
  21233. break a;
  21234. }
  21235. key in domElement
  21236. ? (domElement[key] = value)
  21237. : true === value
  21238. ? domElement.setAttribute(key, "")
  21239. : setValueForAttribute(domElement, key, value);
  21240. }
  21241. }
  21242. }
  21243. function setInitialProperties(domElement, tag, props) {
  21244. validatePropertiesInDevelopment(tag, props);
  21245. switch (tag) {
  21246. case "div":
  21247. case "span":
  21248. case "svg":
  21249. case "path":
  21250. case "a":
  21251. case "g":
  21252. case "p":
  21253. case "li":
  21254. break;
  21255. case "img":
  21256. listenToNonDelegatedEvent("error", domElement);
  21257. listenToNonDelegatedEvent("load", domElement);
  21258. var hasSrc = false,
  21259. hasSrcSet = false,
  21260. propKey;
  21261. for (propKey in props)
  21262. if (props.hasOwnProperty(propKey)) {
  21263. var propValue = props[propKey];
  21264. if (null != propValue)
  21265. switch (propKey) {
  21266. case "src":
  21267. hasSrc = true;
  21268. break;
  21269. case "srcSet":
  21270. hasSrcSet = true;
  21271. break;
  21272. case "children":
  21273. case "dangerouslySetInnerHTML":
  21274. throw Error(
  21275. tag +
  21276. " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  21277. );
  21278. default:
  21279. setProp(domElement, tag, propKey, propValue, props, null);
  21280. }
  21281. }
  21282. hasSrcSet &&
  21283. setProp(domElement, tag, "srcSet", props.srcSet, props, null);
  21284. hasSrc && setProp(domElement, tag, "src", props.src, props, null);
  21285. return;
  21286. case "input":
  21287. checkControlledValueProps("input", props);
  21288. listenToNonDelegatedEvent("invalid", domElement);
  21289. var defaultValue = (propKey = propValue = hasSrcSet = null),
  21290. checked = null,
  21291. defaultChecked = null;
  21292. for (hasSrc in props)
  21293. if (props.hasOwnProperty(hasSrc)) {
  21294. var _propValue = props[hasSrc];
  21295. if (null != _propValue)
  21296. switch (hasSrc) {
  21297. case "name":
  21298. hasSrcSet = _propValue;
  21299. break;
  21300. case "type":
  21301. propValue = _propValue;
  21302. break;
  21303. case "checked":
  21304. checked = _propValue;
  21305. break;
  21306. case "defaultChecked":
  21307. defaultChecked = _propValue;
  21308. break;
  21309. case "value":
  21310. propKey = _propValue;
  21311. break;
  21312. case "defaultValue":
  21313. defaultValue = _propValue;
  21314. break;
  21315. case "children":
  21316. case "dangerouslySetInnerHTML":
  21317. if (null != _propValue)
  21318. throw Error(
  21319. tag +
  21320. " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  21321. );
  21322. break;
  21323. default:
  21324. setProp(domElement, tag, hasSrc, _propValue, props, null);
  21325. }
  21326. }
  21327. validateInputProps(domElement, props);
  21328. initInput(
  21329. domElement,
  21330. propKey,
  21331. defaultValue,
  21332. checked,
  21333. defaultChecked,
  21334. propValue,
  21335. hasSrcSet,
  21336. false
  21337. );
  21338. return;
  21339. case "select":
  21340. checkControlledValueProps("select", props);
  21341. listenToNonDelegatedEvent("invalid", domElement);
  21342. hasSrc = propValue = propKey = null;
  21343. for (hasSrcSet in props)
  21344. if (
  21345. props.hasOwnProperty(hasSrcSet) &&
  21346. ((defaultValue = props[hasSrcSet]), null != defaultValue)
  21347. )
  21348. switch (hasSrcSet) {
  21349. case "value":
  21350. propKey = defaultValue;
  21351. break;
  21352. case "defaultValue":
  21353. propValue = defaultValue;
  21354. break;
  21355. case "multiple":
  21356. hasSrc = defaultValue;
  21357. default:
  21358. setProp(
  21359. domElement,
  21360. tag,
  21361. hasSrcSet,
  21362. defaultValue,
  21363. props,
  21364. null
  21365. );
  21366. }
  21367. validateSelectProps(domElement, props);
  21368. tag = propKey;
  21369. props = propValue;
  21370. domElement.multiple = !!hasSrc;
  21371. null != tag
  21372. ? updateOptions(domElement, !!hasSrc, tag, false)
  21373. : null != props && updateOptions(domElement, !!hasSrc, props, true);
  21374. return;
  21375. case "textarea":
  21376. checkControlledValueProps("textarea", props);
  21377. listenToNonDelegatedEvent("invalid", domElement);
  21378. propKey = hasSrcSet = hasSrc = null;
  21379. for (propValue in props)
  21380. if (
  21381. props.hasOwnProperty(propValue) &&
  21382. ((defaultValue = props[propValue]), null != defaultValue)
  21383. )
  21384. switch (propValue) {
  21385. case "value":
  21386. hasSrc = defaultValue;
  21387. break;
  21388. case "defaultValue":
  21389. hasSrcSet = defaultValue;
  21390. break;
  21391. case "children":
  21392. propKey = defaultValue;
  21393. break;
  21394. case "dangerouslySetInnerHTML":
  21395. if (null != defaultValue)
  21396. throw Error(
  21397. "`dangerouslySetInnerHTML` does not make sense on <textarea>."
  21398. );
  21399. break;
  21400. default:
  21401. setProp(
  21402. domElement,
  21403. tag,
  21404. propValue,
  21405. defaultValue,
  21406. props,
  21407. null
  21408. );
  21409. }
  21410. validateTextareaProps(domElement, props);
  21411. initTextarea(domElement, hasSrc, hasSrcSet, propKey);
  21412. return;
  21413. case "option":
  21414. validateOptionProps(domElement, props);
  21415. for (checked in props)
  21416. if (
  21417. props.hasOwnProperty(checked) &&
  21418. ((hasSrc = props[checked]), null != hasSrc)
  21419. )
  21420. switch (checked) {
  21421. case "selected":
  21422. domElement.selected =
  21423. hasSrc &&
  21424. "function" !== typeof hasSrc &&
  21425. "symbol" !== typeof hasSrc;
  21426. break;
  21427. default:
  21428. setProp(domElement, tag, checked, hasSrc, props, null);
  21429. }
  21430. return;
  21431. case "dialog":
  21432. listenToNonDelegatedEvent("beforetoggle", domElement);
  21433. listenToNonDelegatedEvent("toggle", domElement);
  21434. listenToNonDelegatedEvent("cancel", domElement);
  21435. listenToNonDelegatedEvent("close", domElement);
  21436. break;
  21437. case "iframe":
  21438. case "object":
  21439. listenToNonDelegatedEvent("load", domElement);
  21440. break;
  21441. case "video":
  21442. case "audio":
  21443. for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)
  21444. listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);
  21445. break;
  21446. case "image":
  21447. listenToNonDelegatedEvent("error", domElement);
  21448. listenToNonDelegatedEvent("load", domElement);
  21449. break;
  21450. case "details":
  21451. listenToNonDelegatedEvent("toggle", domElement);
  21452. break;
  21453. case "embed":
  21454. case "source":
  21455. case "link":
  21456. listenToNonDelegatedEvent("error", domElement),
  21457. listenToNonDelegatedEvent("load", domElement);
  21458. case "area":
  21459. case "base":
  21460. case "br":
  21461. case "col":
  21462. case "hr":
  21463. case "keygen":
  21464. case "meta":
  21465. case "param":
  21466. case "track":
  21467. case "wbr":
  21468. case "menuitem":
  21469. for (defaultChecked in props)
  21470. if (
  21471. props.hasOwnProperty(defaultChecked) &&
  21472. ((hasSrc = props[defaultChecked]), null != hasSrc)
  21473. )
  21474. switch (defaultChecked) {
  21475. case "children":
  21476. case "dangerouslySetInnerHTML":
  21477. throw Error(
  21478. tag +
  21479. " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  21480. );
  21481. default:
  21482. setProp(domElement, tag, defaultChecked, hasSrc, props, null);
  21483. }
  21484. return;
  21485. default:
  21486. if (isCustomElement(tag)) {
  21487. for (_propValue in props)
  21488. props.hasOwnProperty(_propValue) &&
  21489. ((hasSrc = props[_propValue]),
  21490. void 0 !== hasSrc &&
  21491. setPropOnCustomElement(
  21492. domElement,
  21493. tag,
  21494. _propValue,
  21495. hasSrc,
  21496. props,
  21497. void 0
  21498. ));
  21499. return;
  21500. }
  21501. }
  21502. for (defaultValue in props)
  21503. props.hasOwnProperty(defaultValue) &&
  21504. ((hasSrc = props[defaultValue]),
  21505. null != hasSrc &&
  21506. setProp(domElement, tag, defaultValue, hasSrc, props, null));
  21507. }
  21508. function updateProperties(domElement, tag, lastProps, nextProps) {
  21509. validatePropertiesInDevelopment(tag, nextProps);
  21510. switch (tag) {
  21511. case "div":
  21512. case "span":
  21513. case "svg":
  21514. case "path":
  21515. case "a":
  21516. case "g":
  21517. case "p":
  21518. case "li":
  21519. break;
  21520. case "input":
  21521. var name = null,
  21522. type = null,
  21523. value = null,
  21524. defaultValue = null,
  21525. lastDefaultValue = null,
  21526. checked = null,
  21527. defaultChecked = null;
  21528. for (propKey in lastProps) {
  21529. var lastProp = lastProps[propKey];
  21530. if (lastProps.hasOwnProperty(propKey) && null != lastProp)
  21531. switch (propKey) {
  21532. case "checked":
  21533. break;
  21534. case "value":
  21535. break;
  21536. case "defaultValue":
  21537. lastDefaultValue = lastProp;
  21538. default:
  21539. nextProps.hasOwnProperty(propKey) ||
  21540. setProp(
  21541. domElement,
  21542. tag,
  21543. propKey,
  21544. null,
  21545. nextProps,
  21546. lastProp
  21547. );
  21548. }
  21549. }
  21550. for (var _propKey8 in nextProps) {
  21551. var propKey = nextProps[_propKey8];
  21552. lastProp = lastProps[_propKey8];
  21553. if (
  21554. nextProps.hasOwnProperty(_propKey8) &&
  21555. (null != propKey || null != lastProp)
  21556. )
  21557. switch (_propKey8) {
  21558. case "type":
  21559. type = propKey;
  21560. break;
  21561. case "name":
  21562. name = propKey;
  21563. break;
  21564. case "checked":
  21565. checked = propKey;
  21566. break;
  21567. case "defaultChecked":
  21568. defaultChecked = propKey;
  21569. break;
  21570. case "value":
  21571. value = propKey;
  21572. break;
  21573. case "defaultValue":
  21574. defaultValue = propKey;
  21575. break;
  21576. case "children":
  21577. case "dangerouslySetInnerHTML":
  21578. if (null != propKey)
  21579. throw Error(
  21580. tag +
  21581. " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  21582. );
  21583. break;
  21584. default:
  21585. propKey !== lastProp &&
  21586. setProp(
  21587. domElement,
  21588. tag,
  21589. _propKey8,
  21590. propKey,
  21591. nextProps,
  21592. lastProp
  21593. );
  21594. }
  21595. }
  21596. tag =
  21597. "checkbox" === lastProps.type || "radio" === lastProps.type
  21598. ? null != lastProps.checked
  21599. : null != lastProps.value;
  21600. nextProps =
  21601. "checkbox" === nextProps.type || "radio" === nextProps.type
  21602. ? null != nextProps.checked
  21603. : null != nextProps.value;
  21604. tag ||
  21605. !nextProps ||
  21606. didWarnUncontrolledToControlled ||
  21607. (console.error(
  21608. "A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"
  21609. ),
  21610. (didWarnUncontrolledToControlled = true));
  21611. !tag ||
  21612. nextProps ||
  21613. didWarnControlledToUncontrolled ||
  21614. (console.error(
  21615. "A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"
  21616. ),
  21617. (didWarnControlledToUncontrolled = true));
  21618. updateInput(
  21619. domElement,
  21620. value,
  21621. defaultValue,
  21622. lastDefaultValue,
  21623. checked,
  21624. defaultChecked,
  21625. type,
  21626. name
  21627. );
  21628. return;
  21629. case "select":
  21630. propKey = value = defaultValue = _propKey8 = null;
  21631. for (type in lastProps)
  21632. if (
  21633. ((lastDefaultValue = lastProps[type]),
  21634. lastProps.hasOwnProperty(type) && null != lastDefaultValue)
  21635. )
  21636. switch (type) {
  21637. case "value":
  21638. break;
  21639. case "multiple":
  21640. propKey = lastDefaultValue;
  21641. default:
  21642. nextProps.hasOwnProperty(type) ||
  21643. setProp(
  21644. domElement,
  21645. tag,
  21646. type,
  21647. null,
  21648. nextProps,
  21649. lastDefaultValue
  21650. );
  21651. }
  21652. for (name in nextProps)
  21653. if (
  21654. ((type = nextProps[name]),
  21655. (lastDefaultValue = lastProps[name]),
  21656. nextProps.hasOwnProperty(name) &&
  21657. (null != type || null != lastDefaultValue))
  21658. )
  21659. switch (name) {
  21660. case "value":
  21661. _propKey8 = type;
  21662. break;
  21663. case "defaultValue":
  21664. defaultValue = type;
  21665. break;
  21666. case "multiple":
  21667. value = type;
  21668. default:
  21669. type !== lastDefaultValue &&
  21670. setProp(
  21671. domElement,
  21672. tag,
  21673. name,
  21674. type,
  21675. nextProps,
  21676. lastDefaultValue
  21677. );
  21678. }
  21679. nextProps = defaultValue;
  21680. tag = value;
  21681. lastProps = propKey;
  21682. null != _propKey8
  21683. ? updateOptions(domElement, !!tag, _propKey8, false)
  21684. : !!lastProps !== !!tag &&
  21685. (null != nextProps
  21686. ? updateOptions(domElement, !!tag, nextProps, true)
  21687. : updateOptions(domElement, !!tag, tag ? [] : "", false));
  21688. return;
  21689. case "textarea":
  21690. propKey = _propKey8 = null;
  21691. for (defaultValue in lastProps)
  21692. if (
  21693. ((name = lastProps[defaultValue]),
  21694. lastProps.hasOwnProperty(defaultValue) &&
  21695. null != name &&
  21696. !nextProps.hasOwnProperty(defaultValue))
  21697. )
  21698. switch (defaultValue) {
  21699. case "value":
  21700. break;
  21701. case "children":
  21702. break;
  21703. default:
  21704. setProp(domElement, tag, defaultValue, null, nextProps, name);
  21705. }
  21706. for (value in nextProps)
  21707. if (
  21708. ((name = nextProps[value]),
  21709. (type = lastProps[value]),
  21710. nextProps.hasOwnProperty(value) && (null != name || null != type))
  21711. )
  21712. switch (value) {
  21713. case "value":
  21714. _propKey8 = name;
  21715. break;
  21716. case "defaultValue":
  21717. propKey = name;
  21718. break;
  21719. case "children":
  21720. break;
  21721. case "dangerouslySetInnerHTML":
  21722. if (null != name)
  21723. throw Error(
  21724. "`dangerouslySetInnerHTML` does not make sense on <textarea>."
  21725. );
  21726. break;
  21727. default:
  21728. name !== type &&
  21729. setProp(domElement, tag, value, name, nextProps, type);
  21730. }
  21731. updateTextarea(domElement, _propKey8, propKey);
  21732. return;
  21733. case "option":
  21734. for (var _propKey13 in lastProps)
  21735. if (
  21736. ((_propKey8 = lastProps[_propKey13]),
  21737. lastProps.hasOwnProperty(_propKey13) &&
  21738. null != _propKey8 &&
  21739. !nextProps.hasOwnProperty(_propKey13))
  21740. )
  21741. switch (_propKey13) {
  21742. case "selected":
  21743. domElement.selected = false;
  21744. break;
  21745. default:
  21746. setProp(
  21747. domElement,
  21748. tag,
  21749. _propKey13,
  21750. null,
  21751. nextProps,
  21752. _propKey8
  21753. );
  21754. }
  21755. for (lastDefaultValue in nextProps)
  21756. if (
  21757. ((_propKey8 = nextProps[lastDefaultValue]),
  21758. (propKey = lastProps[lastDefaultValue]),
  21759. nextProps.hasOwnProperty(lastDefaultValue) &&
  21760. _propKey8 !== propKey &&
  21761. (null != _propKey8 || null != propKey))
  21762. )
  21763. switch (lastDefaultValue) {
  21764. case "selected":
  21765. domElement.selected =
  21766. _propKey8 &&
  21767. "function" !== typeof _propKey8 &&
  21768. "symbol" !== typeof _propKey8;
  21769. break;
  21770. default:
  21771. setProp(
  21772. domElement,
  21773. tag,
  21774. lastDefaultValue,
  21775. _propKey8,
  21776. nextProps,
  21777. propKey
  21778. );
  21779. }
  21780. return;
  21781. case "img":
  21782. case "link":
  21783. case "area":
  21784. case "base":
  21785. case "br":
  21786. case "col":
  21787. case "embed":
  21788. case "hr":
  21789. case "keygen":
  21790. case "meta":
  21791. case "param":
  21792. case "source":
  21793. case "track":
  21794. case "wbr":
  21795. case "menuitem":
  21796. for (var _propKey15 in lastProps)
  21797. (_propKey8 = lastProps[_propKey15]),
  21798. lastProps.hasOwnProperty(_propKey15) &&
  21799. null != _propKey8 &&
  21800. !nextProps.hasOwnProperty(_propKey15) &&
  21801. setProp(
  21802. domElement,
  21803. tag,
  21804. _propKey15,
  21805. null,
  21806. nextProps,
  21807. _propKey8
  21808. );
  21809. for (checked in nextProps)
  21810. if (
  21811. ((_propKey8 = nextProps[checked]),
  21812. (propKey = lastProps[checked]),
  21813. nextProps.hasOwnProperty(checked) &&
  21814. _propKey8 !== propKey &&
  21815. (null != _propKey8 || null != propKey))
  21816. )
  21817. switch (checked) {
  21818. case "children":
  21819. case "dangerouslySetInnerHTML":
  21820. if (null != _propKey8)
  21821. throw Error(
  21822. tag +
  21823. " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  21824. );
  21825. break;
  21826. default:
  21827. setProp(
  21828. domElement,
  21829. tag,
  21830. checked,
  21831. _propKey8,
  21832. nextProps,
  21833. propKey
  21834. );
  21835. }
  21836. return;
  21837. default:
  21838. if (isCustomElement(tag)) {
  21839. for (var _propKey17 in lastProps)
  21840. (_propKey8 = lastProps[_propKey17]),
  21841. lastProps.hasOwnProperty(_propKey17) &&
  21842. void 0 !== _propKey8 &&
  21843. !nextProps.hasOwnProperty(_propKey17) &&
  21844. setPropOnCustomElement(
  21845. domElement,
  21846. tag,
  21847. _propKey17,
  21848. void 0,
  21849. nextProps,
  21850. _propKey8
  21851. );
  21852. for (defaultChecked in nextProps)
  21853. (_propKey8 = nextProps[defaultChecked]),
  21854. (propKey = lastProps[defaultChecked]),
  21855. !nextProps.hasOwnProperty(defaultChecked) ||
  21856. _propKey8 === propKey ||
  21857. (void 0 === _propKey8 && void 0 === propKey) ||
  21858. setPropOnCustomElement(
  21859. domElement,
  21860. tag,
  21861. defaultChecked,
  21862. _propKey8,
  21863. nextProps,
  21864. propKey
  21865. );
  21866. return;
  21867. }
  21868. }
  21869. for (var _propKey19 in lastProps)
  21870. (_propKey8 = lastProps[_propKey19]),
  21871. lastProps.hasOwnProperty(_propKey19) &&
  21872. null != _propKey8 &&
  21873. !nextProps.hasOwnProperty(_propKey19) &&
  21874. setProp(domElement, tag, _propKey19, null, nextProps, _propKey8);
  21875. for (lastProp in nextProps)
  21876. (_propKey8 = nextProps[lastProp]),
  21877. (propKey = lastProps[lastProp]),
  21878. !nextProps.hasOwnProperty(lastProp) ||
  21879. _propKey8 === propKey ||
  21880. (null == _propKey8 && null == propKey) ||
  21881. setProp(domElement, tag, lastProp, _propKey8, nextProps, propKey);
  21882. }
  21883. function getPropNameFromAttributeName(attrName) {
  21884. switch (attrName) {
  21885. case "class":
  21886. return "className";
  21887. case "for":
  21888. return "htmlFor";
  21889. default:
  21890. return attrName;
  21891. }
  21892. }
  21893. function getStylesObjectFromElement(domElement) {
  21894. var serverValueInObjectForm = {};
  21895. domElement = domElement.style;
  21896. for (var i = 0; i < domElement.length; i++) {
  21897. var styleName = domElement[i];
  21898. serverValueInObjectForm[styleName] =
  21899. domElement.getPropertyValue(styleName);
  21900. }
  21901. return serverValueInObjectForm;
  21902. }
  21903. function diffHydratedStyles(domElement, value$jscomp$0, serverDifferences) {
  21904. if (null != value$jscomp$0 && "object" !== typeof value$jscomp$0)
  21905. console.error(
  21906. "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
  21907. );
  21908. else {
  21909. var clientValue;
  21910. var delimiter = (clientValue = ""),
  21911. styleName;
  21912. for (styleName in value$jscomp$0)
  21913. if (value$jscomp$0.hasOwnProperty(styleName)) {
  21914. var value = value$jscomp$0[styleName];
  21915. null != value &&
  21916. "boolean" !== typeof value &&
  21917. "" !== value &&
  21918. (0 === styleName.indexOf("--")
  21919. ? (checkCSSPropertyStringCoercion(value, styleName),
  21920. (clientValue +=
  21921. delimiter + styleName + ":" + ("" + value).trim()))
  21922. : "number" !== typeof value ||
  21923. 0 === value ||
  21924. unitlessNumbers.has(styleName)
  21925. ? (checkCSSPropertyStringCoercion(value, styleName),
  21926. (clientValue +=
  21927. delimiter +
  21928. styleName
  21929. .replace(uppercasePattern, "-$1")
  21930. .toLowerCase()
  21931. .replace(msPattern$1, "-ms-") +
  21932. ":" +
  21933. ("" + value).trim()))
  21934. : (clientValue +=
  21935. delimiter +
  21936. styleName
  21937. .replace(uppercasePattern, "-$1")
  21938. .toLowerCase()
  21939. .replace(msPattern$1, "-ms-") +
  21940. ":" +
  21941. value +
  21942. "px"),
  21943. (delimiter = ";"));
  21944. }
  21945. clientValue = clientValue || null;
  21946. value$jscomp$0 = domElement.getAttribute("style");
  21947. value$jscomp$0 !== clientValue &&
  21948. ((clientValue = normalizeMarkupForTextOrAttribute(clientValue)),
  21949. normalizeMarkupForTextOrAttribute(value$jscomp$0) !== clientValue &&
  21950. (serverDifferences.style = getStylesObjectFromElement(domElement)));
  21951. }
  21952. }
  21953. function hydrateAttribute(
  21954. domElement,
  21955. propKey,
  21956. attributeName,
  21957. value,
  21958. extraAttributes,
  21959. serverDifferences
  21960. ) {
  21961. extraAttributes.delete(attributeName);
  21962. domElement = domElement.getAttribute(attributeName);
  21963. if (null === domElement)
  21964. switch (typeof value) {
  21965. case "undefined":
  21966. case "function":
  21967. case "symbol":
  21968. case "boolean":
  21969. return;
  21970. }
  21971. else if (null != value)
  21972. switch (typeof value) {
  21973. case "function":
  21974. case "symbol":
  21975. case "boolean":
  21976. break;
  21977. default:
  21978. if (
  21979. (checkAttributeStringCoercion(value, propKey),
  21980. domElement === "" + value)
  21981. )
  21982. return;
  21983. }
  21984. warnForPropDifference(propKey, domElement, value, serverDifferences);
  21985. }
  21986. function hydrateBooleanAttribute(
  21987. domElement,
  21988. propKey,
  21989. attributeName,
  21990. value,
  21991. extraAttributes,
  21992. serverDifferences
  21993. ) {
  21994. extraAttributes.delete(attributeName);
  21995. domElement = domElement.getAttribute(attributeName);
  21996. if (null === domElement) {
  21997. switch (typeof value) {
  21998. case "function":
  21999. case "symbol":
  22000. return;
  22001. }
  22002. if (!value) return;
  22003. } else
  22004. switch (typeof value) {
  22005. case "function":
  22006. case "symbol":
  22007. break;
  22008. default:
  22009. if (value) return;
  22010. }
  22011. warnForPropDifference(propKey, domElement, value, serverDifferences);
  22012. }
  22013. function hydrateBooleanishAttribute(
  22014. domElement,
  22015. propKey,
  22016. attributeName,
  22017. value,
  22018. extraAttributes,
  22019. serverDifferences
  22020. ) {
  22021. extraAttributes.delete(attributeName);
  22022. domElement = domElement.getAttribute(attributeName);
  22023. if (null === domElement)
  22024. switch (typeof value) {
  22025. case "undefined":
  22026. case "function":
  22027. case "symbol":
  22028. return;
  22029. }
  22030. else if (null != value)
  22031. switch (typeof value) {
  22032. case "function":
  22033. case "symbol":
  22034. break;
  22035. default:
  22036. if (
  22037. (checkAttributeStringCoercion(value, attributeName),
  22038. domElement === "" + value)
  22039. )
  22040. return;
  22041. }
  22042. warnForPropDifference(propKey, domElement, value, serverDifferences);
  22043. }
  22044. function hydrateNumericAttribute(
  22045. domElement,
  22046. propKey,
  22047. attributeName,
  22048. value,
  22049. extraAttributes,
  22050. serverDifferences
  22051. ) {
  22052. extraAttributes.delete(attributeName);
  22053. domElement = domElement.getAttribute(attributeName);
  22054. if (null === domElement)
  22055. switch (typeof value) {
  22056. case "undefined":
  22057. case "function":
  22058. case "symbol":
  22059. case "boolean":
  22060. return;
  22061. default:
  22062. if (isNaN(value)) return;
  22063. }
  22064. else if (null != value)
  22065. switch (typeof value) {
  22066. case "function":
  22067. case "symbol":
  22068. case "boolean":
  22069. break;
  22070. default:
  22071. if (
  22072. !isNaN(value) &&
  22073. (checkAttributeStringCoercion(value, propKey),
  22074. domElement === "" + value)
  22075. )
  22076. return;
  22077. }
  22078. warnForPropDifference(propKey, domElement, value, serverDifferences);
  22079. }
  22080. function hydrateSanitizedAttribute(
  22081. domElement,
  22082. propKey,
  22083. attributeName,
  22084. value,
  22085. extraAttributes,
  22086. serverDifferences
  22087. ) {
  22088. extraAttributes.delete(attributeName);
  22089. domElement = domElement.getAttribute(attributeName);
  22090. if (null === domElement)
  22091. switch (typeof value) {
  22092. case "undefined":
  22093. case "function":
  22094. case "symbol":
  22095. case "boolean":
  22096. return;
  22097. }
  22098. else if (null != value)
  22099. switch (typeof value) {
  22100. case "function":
  22101. case "symbol":
  22102. case "boolean":
  22103. break;
  22104. default:
  22105. if (
  22106. (checkAttributeStringCoercion(value, propKey),
  22107. (attributeName = sanitizeURL("" + value)),
  22108. domElement === attributeName)
  22109. )
  22110. return;
  22111. }
  22112. warnForPropDifference(propKey, domElement, value, serverDifferences);
  22113. }
  22114. function diffHydratedProperties(domElement, tag, props, hostContext) {
  22115. for (
  22116. var serverDifferences = {},
  22117. extraAttributes = new Set(),
  22118. attributes = domElement.attributes,
  22119. i = 0;
  22120. i < attributes.length;
  22121. i++
  22122. )
  22123. switch (attributes[i].name.toLowerCase()) {
  22124. case "value":
  22125. break;
  22126. case "checked":
  22127. break;
  22128. case "selected":
  22129. break;
  22130. default:
  22131. extraAttributes.add(attributes[i].name);
  22132. }
  22133. if (isCustomElement(tag))
  22134. for (var propKey in props) {
  22135. if (props.hasOwnProperty(propKey)) {
  22136. var value = props[propKey];
  22137. if (null != value)
  22138. if (registrationNameDependencies.hasOwnProperty(propKey))
  22139. "function" !== typeof value &&
  22140. warnForInvalidEventListener(propKey, value);
  22141. else if (true !== props.suppressHydrationWarning)
  22142. switch (propKey) {
  22143. case "children":
  22144. ("string" !== typeof value && "number" !== typeof value) ||
  22145. warnForPropDifference(
  22146. "children",
  22147. domElement.textContent,
  22148. value,
  22149. serverDifferences
  22150. );
  22151. continue;
  22152. case "suppressContentEditableWarning":
  22153. case "suppressHydrationWarning":
  22154. case "defaultValue":
  22155. case "defaultChecked":
  22156. case "innerHTML":
  22157. case "ref":
  22158. continue;
  22159. case "dangerouslySetInnerHTML":
  22160. attributes = domElement.innerHTML;
  22161. value = value ? value.__html : void 0;
  22162. null != value &&
  22163. ((value = normalizeHTML(domElement, value)),
  22164. warnForPropDifference(
  22165. propKey,
  22166. attributes,
  22167. value,
  22168. serverDifferences
  22169. ));
  22170. continue;
  22171. case "style":
  22172. extraAttributes.delete(propKey);
  22173. diffHydratedStyles(domElement, value, serverDifferences);
  22174. continue;
  22175. case "offsetParent":
  22176. case "offsetTop":
  22177. case "offsetLeft":
  22178. case "offsetWidth":
  22179. case "offsetHeight":
  22180. case "isContentEditable":
  22181. case "outerText":
  22182. case "outerHTML":
  22183. extraAttributes.delete(propKey.toLowerCase());
  22184. console.error(
  22185. "Assignment to read-only property will result in a no-op: `%s`",
  22186. propKey
  22187. );
  22188. continue;
  22189. case "className":
  22190. extraAttributes.delete("class");
  22191. attributes = getValueForAttributeOnCustomComponent(
  22192. domElement,
  22193. "class",
  22194. value
  22195. );
  22196. warnForPropDifference(
  22197. "className",
  22198. attributes,
  22199. value,
  22200. serverDifferences
  22201. );
  22202. continue;
  22203. default:
  22204. hostContext.context === HostContextNamespaceNone &&
  22205. "svg" !== tag &&
  22206. "math" !== tag
  22207. ? extraAttributes.delete(propKey.toLowerCase())
  22208. : extraAttributes.delete(propKey),
  22209. (attributes = getValueForAttributeOnCustomComponent(
  22210. domElement,
  22211. propKey,
  22212. value
  22213. )),
  22214. warnForPropDifference(
  22215. propKey,
  22216. attributes,
  22217. value,
  22218. serverDifferences
  22219. );
  22220. }
  22221. }
  22222. }
  22223. else
  22224. for (value in props)
  22225. if (
  22226. props.hasOwnProperty(value) &&
  22227. ((propKey = props[value]), null != propKey)
  22228. )
  22229. if (registrationNameDependencies.hasOwnProperty(value))
  22230. "function" !== typeof propKey &&
  22231. warnForInvalidEventListener(value, propKey);
  22232. else if (true !== props.suppressHydrationWarning)
  22233. switch (value) {
  22234. case "children":
  22235. ("string" !== typeof propKey &&
  22236. "number" !== typeof propKey) ||
  22237. warnForPropDifference(
  22238. "children",
  22239. domElement.textContent,
  22240. propKey,
  22241. serverDifferences
  22242. );
  22243. continue;
  22244. case "suppressContentEditableWarning":
  22245. case "suppressHydrationWarning":
  22246. case "value":
  22247. case "checked":
  22248. case "selected":
  22249. case "defaultValue":
  22250. case "defaultChecked":
  22251. case "innerHTML":
  22252. case "ref":
  22253. continue;
  22254. case "dangerouslySetInnerHTML":
  22255. attributes = domElement.innerHTML;
  22256. propKey = propKey ? propKey.__html : void 0;
  22257. null != propKey &&
  22258. ((propKey = normalizeHTML(domElement, propKey)),
  22259. attributes !== propKey &&
  22260. (serverDifferences[value] = { __html: attributes }));
  22261. continue;
  22262. case "className":
  22263. hydrateAttribute(
  22264. domElement,
  22265. value,
  22266. "class",
  22267. propKey,
  22268. extraAttributes,
  22269. serverDifferences
  22270. );
  22271. continue;
  22272. case "tabIndex":
  22273. hydrateAttribute(
  22274. domElement,
  22275. value,
  22276. "tabindex",
  22277. propKey,
  22278. extraAttributes,
  22279. serverDifferences
  22280. );
  22281. continue;
  22282. case "style":
  22283. extraAttributes.delete(value);
  22284. diffHydratedStyles(domElement, propKey, serverDifferences);
  22285. continue;
  22286. case "multiple":
  22287. extraAttributes.delete(value);
  22288. warnForPropDifference(
  22289. value,
  22290. domElement.multiple,
  22291. propKey,
  22292. serverDifferences
  22293. );
  22294. continue;
  22295. case "muted":
  22296. extraAttributes.delete(value);
  22297. warnForPropDifference(
  22298. value,
  22299. domElement.muted,
  22300. propKey,
  22301. serverDifferences
  22302. );
  22303. continue;
  22304. case "autoFocus":
  22305. extraAttributes.delete("autofocus");
  22306. warnForPropDifference(
  22307. value,
  22308. domElement.autofocus,
  22309. propKey,
  22310. serverDifferences
  22311. );
  22312. continue;
  22313. case "data":
  22314. if ("object" !== tag) {
  22315. extraAttributes.delete(value);
  22316. attributes = domElement.getAttribute("data");
  22317. warnForPropDifference(
  22318. value,
  22319. attributes,
  22320. propKey,
  22321. serverDifferences
  22322. );
  22323. continue;
  22324. }
  22325. case "src":
  22326. case "href":
  22327. if (
  22328. !(
  22329. "" !== propKey ||
  22330. ("a" === tag && "href" === value) ||
  22331. ("object" === tag && "data" === value)
  22332. )
  22333. ) {
  22334. "src" === value
  22335. ? console.error(
  22336. 'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
  22337. value,
  22338. value
  22339. )
  22340. : console.error(
  22341. 'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',
  22342. value,
  22343. value
  22344. );
  22345. continue;
  22346. }
  22347. hydrateSanitizedAttribute(
  22348. domElement,
  22349. value,
  22350. value,
  22351. propKey,
  22352. extraAttributes,
  22353. serverDifferences
  22354. );
  22355. continue;
  22356. case "action":
  22357. case "formAction":
  22358. attributes = domElement.getAttribute(value);
  22359. if ("function" === typeof propKey) {
  22360. extraAttributes.delete(value.toLowerCase());
  22361. "formAction" === value
  22362. ? (extraAttributes.delete("name"),
  22363. extraAttributes.delete("formenctype"),
  22364. extraAttributes.delete("formmethod"),
  22365. extraAttributes.delete("formtarget"))
  22366. : (extraAttributes.delete("enctype"),
  22367. extraAttributes.delete("method"),
  22368. extraAttributes.delete("target"));
  22369. continue;
  22370. } else if (attributes === EXPECTED_FORM_ACTION_URL) {
  22371. extraAttributes.delete(value.toLowerCase());
  22372. warnForPropDifference(
  22373. value,
  22374. "function",
  22375. propKey,
  22376. serverDifferences
  22377. );
  22378. continue;
  22379. }
  22380. hydrateSanitizedAttribute(
  22381. domElement,
  22382. value,
  22383. value.toLowerCase(),
  22384. propKey,
  22385. extraAttributes,
  22386. serverDifferences
  22387. );
  22388. continue;
  22389. case "xlinkHref":
  22390. hydrateSanitizedAttribute(
  22391. domElement,
  22392. value,
  22393. "xlink:href",
  22394. propKey,
  22395. extraAttributes,
  22396. serverDifferences
  22397. );
  22398. continue;
  22399. case "contentEditable":
  22400. hydrateBooleanishAttribute(
  22401. domElement,
  22402. value,
  22403. "contenteditable",
  22404. propKey,
  22405. extraAttributes,
  22406. serverDifferences
  22407. );
  22408. continue;
  22409. case "spellCheck":
  22410. hydrateBooleanishAttribute(
  22411. domElement,
  22412. value,
  22413. "spellcheck",
  22414. propKey,
  22415. extraAttributes,
  22416. serverDifferences
  22417. );
  22418. continue;
  22419. case "draggable":
  22420. case "autoReverse":
  22421. case "externalResourcesRequired":
  22422. case "focusable":
  22423. case "preserveAlpha":
  22424. hydrateBooleanishAttribute(
  22425. domElement,
  22426. value,
  22427. value,
  22428. propKey,
  22429. extraAttributes,
  22430. serverDifferences
  22431. );
  22432. continue;
  22433. case "allowFullScreen":
  22434. case "async":
  22435. case "autoPlay":
  22436. case "controls":
  22437. case "default":
  22438. case "defer":
  22439. case "disabled":
  22440. case "disablePictureInPicture":
  22441. case "disableRemotePlayback":
  22442. case "formNoValidate":
  22443. case "hidden":
  22444. case "loop":
  22445. case "noModule":
  22446. case "noValidate":
  22447. case "open":
  22448. case "playsInline":
  22449. case "readOnly":
  22450. case "required":
  22451. case "reversed":
  22452. case "scoped":
  22453. case "seamless":
  22454. case "itemScope":
  22455. hydrateBooleanAttribute(
  22456. domElement,
  22457. value,
  22458. value.toLowerCase(),
  22459. propKey,
  22460. extraAttributes,
  22461. serverDifferences
  22462. );
  22463. continue;
  22464. case "capture":
  22465. case "download":
  22466. a: {
  22467. i = domElement;
  22468. var attributeName = (attributes = value),
  22469. serverDifferences$jscomp$0 = serverDifferences;
  22470. extraAttributes.delete(attributeName);
  22471. i = i.getAttribute(attributeName);
  22472. if (null === i)
  22473. switch (typeof propKey) {
  22474. case "undefined":
  22475. case "function":
  22476. case "symbol":
  22477. break a;
  22478. default:
  22479. if (false === propKey) break a;
  22480. }
  22481. else if (null != propKey)
  22482. switch (typeof propKey) {
  22483. case "function":
  22484. case "symbol":
  22485. break;
  22486. case "boolean":
  22487. if (true === propKey && "" === i) break a;
  22488. break;
  22489. default:
  22490. if (
  22491. (checkAttributeStringCoercion(propKey, attributes),
  22492. i === "" + propKey)
  22493. )
  22494. break a;
  22495. }
  22496. warnForPropDifference(
  22497. attributes,
  22498. i,
  22499. propKey,
  22500. serverDifferences$jscomp$0
  22501. );
  22502. }
  22503. continue;
  22504. case "cols":
  22505. case "rows":
  22506. case "size":
  22507. case "span":
  22508. a: {
  22509. i = domElement;
  22510. attributeName = attributes = value;
  22511. serverDifferences$jscomp$0 = serverDifferences;
  22512. extraAttributes.delete(attributeName);
  22513. i = i.getAttribute(attributeName);
  22514. if (null === i)
  22515. switch (typeof propKey) {
  22516. case "undefined":
  22517. case "function":
  22518. case "symbol":
  22519. case "boolean":
  22520. break a;
  22521. default:
  22522. if (isNaN(propKey) || 1 > propKey) break a;
  22523. }
  22524. else if (null != propKey)
  22525. switch (typeof propKey) {
  22526. case "function":
  22527. case "symbol":
  22528. case "boolean":
  22529. break;
  22530. default:
  22531. if (
  22532. !(isNaN(propKey) || 1 > propKey) &&
  22533. (checkAttributeStringCoercion(propKey, attributes),
  22534. i === "" + propKey)
  22535. )
  22536. break a;
  22537. }
  22538. warnForPropDifference(
  22539. attributes,
  22540. i,
  22541. propKey,
  22542. serverDifferences$jscomp$0
  22543. );
  22544. }
  22545. continue;
  22546. case "rowSpan":
  22547. hydrateNumericAttribute(
  22548. domElement,
  22549. value,
  22550. "rowspan",
  22551. propKey,
  22552. extraAttributes,
  22553. serverDifferences
  22554. );
  22555. continue;
  22556. case "start":
  22557. hydrateNumericAttribute(
  22558. domElement,
  22559. value,
  22560. value,
  22561. propKey,
  22562. extraAttributes,
  22563. serverDifferences
  22564. );
  22565. continue;
  22566. case "xHeight":
  22567. hydrateAttribute(
  22568. domElement,
  22569. value,
  22570. "x-height",
  22571. propKey,
  22572. extraAttributes,
  22573. serverDifferences
  22574. );
  22575. continue;
  22576. case "xlinkActuate":
  22577. hydrateAttribute(
  22578. domElement,
  22579. value,
  22580. "xlink:actuate",
  22581. propKey,
  22582. extraAttributes,
  22583. serverDifferences
  22584. );
  22585. continue;
  22586. case "xlinkArcrole":
  22587. hydrateAttribute(
  22588. domElement,
  22589. value,
  22590. "xlink:arcrole",
  22591. propKey,
  22592. extraAttributes,
  22593. serverDifferences
  22594. );
  22595. continue;
  22596. case "xlinkRole":
  22597. hydrateAttribute(
  22598. domElement,
  22599. value,
  22600. "xlink:role",
  22601. propKey,
  22602. extraAttributes,
  22603. serverDifferences
  22604. );
  22605. continue;
  22606. case "xlinkShow":
  22607. hydrateAttribute(
  22608. domElement,
  22609. value,
  22610. "xlink:show",
  22611. propKey,
  22612. extraAttributes,
  22613. serverDifferences
  22614. );
  22615. continue;
  22616. case "xlinkTitle":
  22617. hydrateAttribute(
  22618. domElement,
  22619. value,
  22620. "xlink:title",
  22621. propKey,
  22622. extraAttributes,
  22623. serverDifferences
  22624. );
  22625. continue;
  22626. case "xlinkType":
  22627. hydrateAttribute(
  22628. domElement,
  22629. value,
  22630. "xlink:type",
  22631. propKey,
  22632. extraAttributes,
  22633. serverDifferences
  22634. );
  22635. continue;
  22636. case "xmlBase":
  22637. hydrateAttribute(
  22638. domElement,
  22639. value,
  22640. "xml:base",
  22641. propKey,
  22642. extraAttributes,
  22643. serverDifferences
  22644. );
  22645. continue;
  22646. case "xmlLang":
  22647. hydrateAttribute(
  22648. domElement,
  22649. value,
  22650. "xml:lang",
  22651. propKey,
  22652. extraAttributes,
  22653. serverDifferences
  22654. );
  22655. continue;
  22656. case "xmlSpace":
  22657. hydrateAttribute(
  22658. domElement,
  22659. value,
  22660. "xml:space",
  22661. propKey,
  22662. extraAttributes,
  22663. serverDifferences
  22664. );
  22665. continue;
  22666. case "inert":
  22667. "" !== propKey ||
  22668. didWarnForNewBooleanPropsWithEmptyValue[value] ||
  22669. ((didWarnForNewBooleanPropsWithEmptyValue[value] = true),
  22670. console.error(
  22671. "Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
  22672. value
  22673. ));
  22674. hydrateBooleanAttribute(
  22675. domElement,
  22676. value,
  22677. value,
  22678. propKey,
  22679. extraAttributes,
  22680. serverDifferences
  22681. );
  22682. continue;
  22683. default:
  22684. if (
  22685. !(2 < value.length) ||
  22686. ("o" !== value[0] && "O" !== value[0]) ||
  22687. ("n" !== value[1] && "N" !== value[1])
  22688. ) {
  22689. i = getAttributeAlias(value);
  22690. attributes = false;
  22691. hostContext.context === HostContextNamespaceNone &&
  22692. "svg" !== tag &&
  22693. "math" !== tag
  22694. ? extraAttributes.delete(i.toLowerCase())
  22695. : ((attributeName = value.toLowerCase()),
  22696. (attributeName = possibleStandardNames.hasOwnProperty(
  22697. attributeName
  22698. )
  22699. ? possibleStandardNames[attributeName] || null
  22700. : null),
  22701. null !== attributeName &&
  22702. attributeName !== value &&
  22703. ((attributes = true),
  22704. extraAttributes.delete(attributeName)),
  22705. extraAttributes.delete(i));
  22706. a: if (
  22707. ((attributeName = domElement),
  22708. (serverDifferences$jscomp$0 = i),
  22709. (i = propKey),
  22710. isAttributeNameSafe(serverDifferences$jscomp$0))
  22711. )
  22712. if (
  22713. attributeName.hasAttribute(serverDifferences$jscomp$0)
  22714. )
  22715. (attributeName = attributeName.getAttribute(
  22716. serverDifferences$jscomp$0
  22717. )),
  22718. checkAttributeStringCoercion(
  22719. i,
  22720. serverDifferences$jscomp$0
  22721. ),
  22722. (i = attributeName === "" + i ? i : attributeName);
  22723. else {
  22724. switch (typeof i) {
  22725. case "function":
  22726. case "symbol":
  22727. break a;
  22728. case "boolean":
  22729. if (
  22730. ((attributeName = serverDifferences$jscomp$0
  22731. .toLowerCase()
  22732. .slice(0, 5)),
  22733. "data-" !== attributeName &&
  22734. "aria-" !== attributeName)
  22735. )
  22736. break a;
  22737. }
  22738. i = void 0 === i ? void 0 : null;
  22739. }
  22740. else i = void 0;
  22741. attributes ||
  22742. warnForPropDifference(
  22743. value,
  22744. i,
  22745. propKey,
  22746. serverDifferences
  22747. );
  22748. }
  22749. }
  22750. 0 < extraAttributes.size &&
  22751. true !== props.suppressHydrationWarning &&
  22752. warnForExtraAttributes(domElement, extraAttributes, serverDifferences);
  22753. return 0 === Object.keys(serverDifferences).length
  22754. ? null
  22755. : serverDifferences;
  22756. }
  22757. function propNamesListJoin(list, combinator) {
  22758. switch (list.length) {
  22759. case 0:
  22760. return "";
  22761. case 1:
  22762. return list[0];
  22763. case 2:
  22764. return list[0] + " " + combinator + " " + list[1];
  22765. default:
  22766. return (
  22767. list.slice(0, -1).join(", ") +
  22768. ", " +
  22769. combinator +
  22770. " " +
  22771. list[list.length - 1]
  22772. );
  22773. }
  22774. }
  22775. function isLikelyStaticResource(initiatorType) {
  22776. switch (initiatorType) {
  22777. case "css":
  22778. case "script":
  22779. case "font":
  22780. case "img":
  22781. case "image":
  22782. case "input":
  22783. case "link":
  22784. return true;
  22785. default:
  22786. return false;
  22787. }
  22788. }
  22789. function estimateBandwidth() {
  22790. if ("function" === typeof performance.getEntriesByType) {
  22791. for (
  22792. var count = 0,
  22793. bits = 0,
  22794. resourceEntries = performance.getEntriesByType("resource"),
  22795. i = 0;
  22796. i < resourceEntries.length;
  22797. i++
  22798. ) {
  22799. var entry = resourceEntries[i],
  22800. transferSize = entry.transferSize,
  22801. initiatorType = entry.initiatorType,
  22802. duration = entry.duration;
  22803. if (
  22804. transferSize &&
  22805. duration &&
  22806. isLikelyStaticResource(initiatorType)
  22807. ) {
  22808. initiatorType = 0;
  22809. duration = entry.responseEnd;
  22810. for (i += 1; i < resourceEntries.length; i++) {
  22811. var overlapEntry = resourceEntries[i],
  22812. overlapStartTime = overlapEntry.startTime;
  22813. if (overlapStartTime > duration) break;
  22814. var overlapTransferSize = overlapEntry.transferSize,
  22815. overlapInitiatorType = overlapEntry.initiatorType;
  22816. overlapTransferSize &&
  22817. isLikelyStaticResource(overlapInitiatorType) &&
  22818. ((overlapEntry = overlapEntry.responseEnd),
  22819. (initiatorType +=
  22820. overlapTransferSize *
  22821. (overlapEntry < duration
  22822. ? 1
  22823. : (duration - overlapStartTime) /
  22824. (overlapEntry - overlapStartTime))));
  22825. }
  22826. --i;
  22827. bits +=
  22828. (8 * (transferSize + initiatorType)) / (entry.duration / 1e3);
  22829. count++;
  22830. if (10 < count) break;
  22831. }
  22832. }
  22833. if (0 < count) return bits / count / 1e6;
  22834. }
  22835. return navigator.connection &&
  22836. ((count = navigator.connection.downlink), "number" === typeof count)
  22837. ? count
  22838. : 5;
  22839. }
  22840. function getOwnerDocumentFromRootContainer(rootContainerElement) {
  22841. return 9 === rootContainerElement.nodeType
  22842. ? rootContainerElement
  22843. : rootContainerElement.ownerDocument;
  22844. }
  22845. function getOwnHostContext(namespaceURI) {
  22846. switch (namespaceURI) {
  22847. case SVG_NAMESPACE:
  22848. return HostContextNamespaceSvg;
  22849. case MATH_NAMESPACE:
  22850. return HostContextNamespaceMath;
  22851. default:
  22852. return HostContextNamespaceNone;
  22853. }
  22854. }
  22855. function getChildHostContextProd(parentNamespace, type) {
  22856. if (parentNamespace === HostContextNamespaceNone)
  22857. switch (type) {
  22858. case "svg":
  22859. return HostContextNamespaceSvg;
  22860. case "math":
  22861. return HostContextNamespaceMath;
  22862. default:
  22863. return HostContextNamespaceNone;
  22864. }
  22865. return parentNamespace === HostContextNamespaceSvg &&
  22866. "foreignObject" === type
  22867. ? HostContextNamespaceNone
  22868. : parentNamespace;
  22869. }
  22870. function shouldSetTextContent(type, props) {
  22871. return (
  22872. "textarea" === type ||
  22873. "noscript" === type ||
  22874. "string" === typeof props.children ||
  22875. "number" === typeof props.children ||
  22876. "bigint" === typeof props.children ||
  22877. ("object" === typeof props.dangerouslySetInnerHTML &&
  22878. null !== props.dangerouslySetInnerHTML &&
  22879. null != props.dangerouslySetInnerHTML.__html)
  22880. );
  22881. }
  22882. function shouldAttemptEagerTransition() {
  22883. var event = window.event;
  22884. if (event && "popstate" === event.type) {
  22885. if (event === currentPopstateTransitionEvent) return false;
  22886. currentPopstateTransitionEvent = event;
  22887. return true;
  22888. }
  22889. currentPopstateTransitionEvent = null;
  22890. return false;
  22891. }
  22892. function resolveEventType() {
  22893. var event = window.event;
  22894. return event && event !== schedulerEvent ? event.type : null;
  22895. }
  22896. function resolveEventTimeStamp() {
  22897. var event = window.event;
  22898. return event && event !== schedulerEvent ? event.timeStamp : -1.1;
  22899. }
  22900. function handleErrorInNextTick(error) {
  22901. setTimeout(function () {
  22902. throw error;
  22903. });
  22904. }
  22905. function commitMount(domElement, type, newProps) {
  22906. switch (type) {
  22907. case "button":
  22908. case "input":
  22909. case "select":
  22910. case "textarea":
  22911. newProps.autoFocus && domElement.focus();
  22912. break;
  22913. case "img":
  22914. newProps.src
  22915. ? (domElement.src = newProps.src)
  22916. : newProps.srcSet && (domElement.srcset = newProps.srcSet);
  22917. }
  22918. }
  22919. function commitHydratedInstance() {}
  22920. function commitUpdate(domElement, type, oldProps, newProps) {
  22921. updateProperties(domElement, type, oldProps, newProps);
  22922. domElement[internalPropsKey] = newProps;
  22923. }
  22924. function resetTextContent(domElement) {
  22925. setTextContent(domElement, "");
  22926. }
  22927. function commitTextUpdate(textInstance, oldText, newText) {
  22928. textInstance.nodeValue = newText;
  22929. }
  22930. function warnForReactChildrenConflict(container) {
  22931. if (!container.__reactWarnedAboutChildrenConflict) {
  22932. var props = container[internalPropsKey] || null;
  22933. if (null !== props) {
  22934. var fiber = getInstanceFromNode(container);
  22935. null !== fiber &&
  22936. ("string" === typeof props.children ||
  22937. "number" === typeof props.children
  22938. ? ((container.__reactWarnedAboutChildrenConflict = true),
  22939. runWithFiberInDEV(fiber, function () {
  22940. console.error(
  22941. 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
  22942. );
  22943. }))
  22944. : null != props.dangerouslySetInnerHTML &&
  22945. ((container.__reactWarnedAboutChildrenConflict = true),
  22946. runWithFiberInDEV(fiber, function () {
  22947. console.error(
  22948. 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
  22949. );
  22950. })));
  22951. }
  22952. }
  22953. }
  22954. function isSingletonScope(type) {
  22955. return "head" === type;
  22956. }
  22957. function removeChild(parentInstance, child) {
  22958. parentInstance.removeChild(child);
  22959. }
  22960. function removeChildFromContainer(container, child) {
  22961. (9 === container.nodeType
  22962. ? container.body
  22963. : "HTML" === container.nodeName
  22964. ? container.ownerDocument.body
  22965. : container
  22966. ).removeChild(child);
  22967. }
  22968. function clearHydrationBoundary(parentInstance, hydrationInstance) {
  22969. var node = hydrationInstance,
  22970. depth = 0;
  22971. do {
  22972. var nextNode = node.nextSibling;
  22973. parentInstance.removeChild(node);
  22974. if (nextNode && 8 === nextNode.nodeType)
  22975. if (
  22976. ((node = nextNode.data),
  22977. node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA)
  22978. ) {
  22979. if (0 === depth) {
  22980. parentInstance.removeChild(nextNode);
  22981. retryIfBlockedOn(hydrationInstance);
  22982. return;
  22983. }
  22984. depth--;
  22985. } else if (
  22986. node === SUSPENSE_START_DATA ||
  22987. node === SUSPENSE_PENDING_START_DATA ||
  22988. node === SUSPENSE_QUEUED_START_DATA ||
  22989. node === SUSPENSE_FALLBACK_START_DATA ||
  22990. node === ACTIVITY_START_DATA
  22991. )
  22992. depth++;
  22993. else if (node === PREAMBLE_CONTRIBUTION_HTML)
  22994. releaseSingletonInstance(
  22995. parentInstance.ownerDocument.documentElement
  22996. );
  22997. else if (node === PREAMBLE_CONTRIBUTION_HEAD) {
  22998. node = parentInstance.ownerDocument.head;
  22999. releaseSingletonInstance(node);
  23000. for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {
  23001. var nextNode$jscomp$0 = node$jscomp$0.nextSibling,
  23002. nodeName = node$jscomp$0.nodeName;
  23003. node$jscomp$0[internalHoistableMarker] ||
  23004. "SCRIPT" === nodeName ||
  23005. "STYLE" === nodeName ||
  23006. ("LINK" === nodeName &&
  23007. "stylesheet" === node$jscomp$0.rel.toLowerCase()) ||
  23008. node.removeChild(node$jscomp$0);
  23009. node$jscomp$0 = nextNode$jscomp$0;
  23010. }
  23011. } else
  23012. node === PREAMBLE_CONTRIBUTION_BODY &&
  23013. releaseSingletonInstance(parentInstance.ownerDocument.body);
  23014. node = nextNode;
  23015. } while (node);
  23016. retryIfBlockedOn(hydrationInstance);
  23017. }
  23018. function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {
  23019. var node = suspenseInstance;
  23020. suspenseInstance = 0;
  23021. do {
  23022. var nextNode = node.nextSibling;
  23023. 1 === node.nodeType
  23024. ? isHidden
  23025. ? ((node._stashedDisplay = node.style.display),
  23026. (node.style.display = "none"))
  23027. : ((node.style.display = node._stashedDisplay || ""),
  23028. "" === node.getAttribute("style") &&
  23029. node.removeAttribute("style"))
  23030. : 3 === node.nodeType &&
  23031. (isHidden
  23032. ? ((node._stashedText = node.nodeValue), (node.nodeValue = ""))
  23033. : (node.nodeValue = node._stashedText || ""));
  23034. if (nextNode && 8 === nextNode.nodeType)
  23035. if (((node = nextNode.data), node === SUSPENSE_END_DATA))
  23036. if (0 === suspenseInstance) break;
  23037. else suspenseInstance--;
  23038. else
  23039. (node !== SUSPENSE_START_DATA &&
  23040. node !== SUSPENSE_PENDING_START_DATA &&
  23041. node !== SUSPENSE_QUEUED_START_DATA &&
  23042. node !== SUSPENSE_FALLBACK_START_DATA) ||
  23043. suspenseInstance++;
  23044. node = nextNode;
  23045. } while (node);
  23046. }
  23047. function hideDehydratedBoundary(suspenseInstance) {
  23048. hideOrUnhideDehydratedBoundary(suspenseInstance, true);
  23049. }
  23050. function hideInstance(instance) {
  23051. instance = instance.style;
  23052. "function" === typeof instance.setProperty
  23053. ? instance.setProperty("display", "none", "important")
  23054. : (instance.display = "none");
  23055. }
  23056. function hideTextInstance(textInstance) {
  23057. textInstance.nodeValue = "";
  23058. }
  23059. function unhideDehydratedBoundary(dehydratedInstance) {
  23060. hideOrUnhideDehydratedBoundary(dehydratedInstance, false);
  23061. }
  23062. function unhideInstance(instance, props) {
  23063. props = props[STYLE];
  23064. props =
  23065. void 0 !== props && null !== props && props.hasOwnProperty("display")
  23066. ? props.display
  23067. : null;
  23068. instance.style.display =
  23069. null == props || "boolean" === typeof props ? "" : ("" + props).trim();
  23070. }
  23071. function unhideTextInstance(textInstance, text) {
  23072. textInstance.nodeValue = text;
  23073. }
  23074. function clearContainerSparingly(container) {
  23075. var nextNode = container.firstChild;
  23076. nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
  23077. for (; nextNode; ) {
  23078. var node = nextNode;
  23079. nextNode = nextNode.nextSibling;
  23080. switch (node.nodeName) {
  23081. case "HTML":
  23082. case "HEAD":
  23083. case "BODY":
  23084. clearContainerSparingly(node);
  23085. detachDeletedInstance(node);
  23086. continue;
  23087. case "SCRIPT":
  23088. case "STYLE":
  23089. continue;
  23090. case "LINK":
  23091. if ("stylesheet" === node.rel.toLowerCase()) continue;
  23092. }
  23093. container.removeChild(node);
  23094. }
  23095. }
  23096. function canHydrateInstance(instance, type, props, inRootOrSingleton) {
  23097. for (; 1 === instance.nodeType; ) {
  23098. var anyProps = props;
  23099. if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
  23100. if (
  23101. !inRootOrSingleton &&
  23102. ("INPUT" !== instance.nodeName || "hidden" !== instance.type)
  23103. )
  23104. break;
  23105. } else if (!inRootOrSingleton)
  23106. if ("input" === type && "hidden" === instance.type) {
  23107. checkAttributeStringCoercion(anyProps.name, "name");
  23108. var name = null == anyProps.name ? null : "" + anyProps.name;
  23109. if (
  23110. "hidden" === anyProps.type &&
  23111. instance.getAttribute("name") === name
  23112. )
  23113. return instance;
  23114. } else return instance;
  23115. else if (!instance[internalHoistableMarker])
  23116. switch (type) {
  23117. case "meta":
  23118. if (!instance.hasAttribute("itemprop")) break;
  23119. return instance;
  23120. case "link":
  23121. name = instance.getAttribute("rel");
  23122. if (
  23123. "stylesheet" === name &&
  23124. instance.hasAttribute("data-precedence")
  23125. )
  23126. break;
  23127. else if (
  23128. name !== anyProps.rel ||
  23129. instance.getAttribute("href") !==
  23130. (null == anyProps.href || "" === anyProps.href
  23131. ? null
  23132. : anyProps.href) ||
  23133. instance.getAttribute("crossorigin") !==
  23134. (null == anyProps.crossOrigin
  23135. ? null
  23136. : anyProps.crossOrigin) ||
  23137. instance.getAttribute("title") !==
  23138. (null == anyProps.title ? null : anyProps.title)
  23139. )
  23140. break;
  23141. return instance;
  23142. case "style":
  23143. if (instance.hasAttribute("data-precedence")) break;
  23144. return instance;
  23145. case "script":
  23146. name = instance.getAttribute("src");
  23147. if (
  23148. (name !== (null == anyProps.src ? null : anyProps.src) ||
  23149. instance.getAttribute("type") !==
  23150. (null == anyProps.type ? null : anyProps.type) ||
  23151. instance.getAttribute("crossorigin") !==
  23152. (null == anyProps.crossOrigin
  23153. ? null
  23154. : anyProps.crossOrigin)) &&
  23155. name &&
  23156. instance.hasAttribute("async") &&
  23157. !instance.hasAttribute("itemprop")
  23158. )
  23159. break;
  23160. return instance;
  23161. default:
  23162. return instance;
  23163. }
  23164. instance = getNextHydratable(instance.nextSibling);
  23165. if (null === instance) break;
  23166. }
  23167. return null;
  23168. }
  23169. function canHydrateTextInstance(instance, text, inRootOrSingleton) {
  23170. if ("" === text) return null;
  23171. for (; 3 !== instance.nodeType; ) {
  23172. if (
  23173. (1 !== instance.nodeType ||
  23174. "INPUT" !== instance.nodeName ||
  23175. "hidden" !== instance.type) &&
  23176. !inRootOrSingleton
  23177. )
  23178. return null;
  23179. instance = getNextHydratable(instance.nextSibling);
  23180. if (null === instance) return null;
  23181. }
  23182. return instance;
  23183. }
  23184. function canHydrateHydrationBoundary(instance, inRootOrSingleton) {
  23185. for (; 8 !== instance.nodeType; ) {
  23186. if (
  23187. (1 !== instance.nodeType ||
  23188. "INPUT" !== instance.nodeName ||
  23189. "hidden" !== instance.type) &&
  23190. !inRootOrSingleton
  23191. )
  23192. return null;
  23193. instance = getNextHydratable(instance.nextSibling);
  23194. if (null === instance) return null;
  23195. }
  23196. return instance;
  23197. }
  23198. function isSuspenseInstancePending(instance) {
  23199. return (
  23200. instance.data === SUSPENSE_PENDING_START_DATA ||
  23201. instance.data === SUSPENSE_QUEUED_START_DATA
  23202. );
  23203. }
  23204. function isSuspenseInstanceFallback(instance) {
  23205. return (
  23206. instance.data === SUSPENSE_FALLBACK_START_DATA ||
  23207. (instance.data === SUSPENSE_PENDING_START_DATA &&
  23208. instance.ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING)
  23209. );
  23210. }
  23211. function registerSuspenseInstanceRetry(instance, callback) {
  23212. var ownerDocument = instance.ownerDocument;
  23213. if (instance.data === SUSPENSE_QUEUED_START_DATA)
  23214. instance._reactRetry = callback;
  23215. else if (
  23216. instance.data !== SUSPENSE_PENDING_START_DATA ||
  23217. ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING
  23218. )
  23219. callback();
  23220. else {
  23221. var listener = function () {
  23222. callback();
  23223. ownerDocument.removeEventListener("DOMContentLoaded", listener);
  23224. };
  23225. ownerDocument.addEventListener("DOMContentLoaded", listener);
  23226. instance._reactRetry = listener;
  23227. }
  23228. }
  23229. function getNextHydratable(node) {
  23230. for (; null != node; node = node.nextSibling) {
  23231. var nodeType = node.nodeType;
  23232. if (1 === nodeType || 3 === nodeType) break;
  23233. if (8 === nodeType) {
  23234. nodeType = node.data;
  23235. if (
  23236. nodeType === SUSPENSE_START_DATA ||
  23237. nodeType === SUSPENSE_FALLBACK_START_DATA ||
  23238. nodeType === SUSPENSE_PENDING_START_DATA ||
  23239. nodeType === SUSPENSE_QUEUED_START_DATA ||
  23240. nodeType === ACTIVITY_START_DATA ||
  23241. nodeType === FORM_STATE_IS_MATCHING ||
  23242. nodeType === FORM_STATE_IS_NOT_MATCHING
  23243. )
  23244. break;
  23245. if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA)
  23246. return null;
  23247. }
  23248. }
  23249. return node;
  23250. }
  23251. function describeHydratableInstanceForDevWarnings(instance) {
  23252. if (1 === instance.nodeType) {
  23253. for (
  23254. var JSCompiler_temp_const = instance.nodeName.toLowerCase(),
  23255. serverDifferences = {},
  23256. attributes = instance.attributes,
  23257. i = 0;
  23258. i < attributes.length;
  23259. i++
  23260. ) {
  23261. var attr = attributes[i];
  23262. serverDifferences[getPropNameFromAttributeName(attr.name)] =
  23263. "style" === attr.name.toLowerCase()
  23264. ? getStylesObjectFromElement(instance)
  23265. : attr.value;
  23266. }
  23267. return { type: JSCompiler_temp_const, props: serverDifferences };
  23268. }
  23269. return 8 === instance.nodeType
  23270. ? instance.data === ACTIVITY_START_DATA
  23271. ? { type: "Activity", props: {} }
  23272. : { type: "Suspense", props: {} }
  23273. : instance.nodeValue;
  23274. }
  23275. function diffHydratedTextForDevWarnings(textInstance, text, parentProps) {
  23276. return null === parentProps ||
  23277. true !== parentProps[SUPPRESS_HYDRATION_WARNING]
  23278. ? (textInstance.nodeValue === text
  23279. ? (textInstance = null)
  23280. : ((text = normalizeMarkupForTextOrAttribute(text)),
  23281. (textInstance =
  23282. normalizeMarkupForTextOrAttribute(textInstance.nodeValue) ===
  23283. text
  23284. ? null
  23285. : textInstance.nodeValue)),
  23286. textInstance)
  23287. : null;
  23288. }
  23289. function getNextHydratableInstanceAfterHydrationBoundary(
  23290. hydrationInstance
  23291. ) {
  23292. hydrationInstance = hydrationInstance.nextSibling;
  23293. for (var depth = 0; hydrationInstance; ) {
  23294. if (8 === hydrationInstance.nodeType) {
  23295. var data = hydrationInstance.data;
  23296. if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) {
  23297. if (0 === depth)
  23298. return getNextHydratable(hydrationInstance.nextSibling);
  23299. depth--;
  23300. } else
  23301. (data !== SUSPENSE_START_DATA &&
  23302. data !== SUSPENSE_FALLBACK_START_DATA &&
  23303. data !== SUSPENSE_PENDING_START_DATA &&
  23304. data !== SUSPENSE_QUEUED_START_DATA &&
  23305. data !== ACTIVITY_START_DATA) ||
  23306. depth++;
  23307. }
  23308. hydrationInstance = hydrationInstance.nextSibling;
  23309. }
  23310. return null;
  23311. }
  23312. function getParentHydrationBoundary(targetInstance) {
  23313. targetInstance = targetInstance.previousSibling;
  23314. for (var depth = 0; targetInstance; ) {
  23315. if (8 === targetInstance.nodeType) {
  23316. var data = targetInstance.data;
  23317. if (
  23318. data === SUSPENSE_START_DATA ||
  23319. data === SUSPENSE_FALLBACK_START_DATA ||
  23320. data === SUSPENSE_PENDING_START_DATA ||
  23321. data === SUSPENSE_QUEUED_START_DATA ||
  23322. data === ACTIVITY_START_DATA
  23323. ) {
  23324. if (0 === depth) return targetInstance;
  23325. depth--;
  23326. } else
  23327. (data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA) ||
  23328. depth++;
  23329. }
  23330. targetInstance = targetInstance.previousSibling;
  23331. }
  23332. return null;
  23333. }
  23334. function commitHydratedContainer(container) {
  23335. retryIfBlockedOn(container);
  23336. }
  23337. function commitHydratedActivityInstance(activityInstance) {
  23338. retryIfBlockedOn(activityInstance);
  23339. }
  23340. function commitHydratedSuspenseInstance(suspenseInstance) {
  23341. retryIfBlockedOn(suspenseInstance);
  23342. }
  23343. function resolveSingletonInstance(
  23344. type,
  23345. props,
  23346. rootContainerInstance,
  23347. hostContext,
  23348. validateDOMNestingDev
  23349. ) {
  23350. validateDOMNestingDev &&
  23351. validateDOMNesting(type, hostContext.ancestorInfo);
  23352. props = getOwnerDocumentFromRootContainer(rootContainerInstance);
  23353. switch (type) {
  23354. case "html":
  23355. type = props.documentElement;
  23356. if (!type)
  23357. throw Error(
  23358. "React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page."
  23359. );
  23360. return type;
  23361. case "head":
  23362. type = props.head;
  23363. if (!type)
  23364. throw Error(
  23365. "React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page."
  23366. );
  23367. return type;
  23368. case "body":
  23369. type = props.body;
  23370. if (!type)
  23371. throw Error(
  23372. "React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page."
  23373. );
  23374. return type;
  23375. default:
  23376. throw Error(
  23377. "resolveSingletonInstance was called with an element type that is not supported. This is a bug in React."
  23378. );
  23379. }
  23380. }
  23381. function acquireSingletonInstance(
  23382. type,
  23383. props,
  23384. instance,
  23385. internalInstanceHandle
  23386. ) {
  23387. if (
  23388. !instance[internalContainerInstanceKey] &&
  23389. getInstanceFromNode(instance)
  23390. ) {
  23391. var tagName = instance.tagName.toLowerCase();
  23392. console.error(
  23393. "You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",
  23394. tagName,
  23395. tagName,
  23396. tagName
  23397. );
  23398. }
  23399. switch (type) {
  23400. case "html":
  23401. case "head":
  23402. case "body":
  23403. break;
  23404. default:
  23405. console.error(
  23406. "acquireSingletonInstance was called with an element type that is not supported. This is a bug in React."
  23407. );
  23408. }
  23409. for (tagName = instance.attributes; tagName.length; )
  23410. instance.removeAttributeNode(tagName[0]);
  23411. setInitialProperties(instance, type, props);
  23412. instance[internalInstanceKey] = internalInstanceHandle;
  23413. instance[internalPropsKey] = props;
  23414. }
  23415. function releaseSingletonInstance(instance) {
  23416. for (var attributes = instance.attributes; attributes.length; )
  23417. instance.removeAttributeNode(attributes[0]);
  23418. detachDeletedInstance(instance);
  23419. }
  23420. function getHoistableRoot(container) {
  23421. return "function" === typeof container.getRootNode
  23422. ? container.getRootNode()
  23423. : 9 === container.nodeType
  23424. ? container
  23425. : container.ownerDocument;
  23426. }
  23427. function preconnectAs(rel, href, crossOrigin) {
  23428. var ownerDocument = globalDocument;
  23429. if (ownerDocument && "string" === typeof href && href) {
  23430. var limitedEscapedHref =
  23431. escapeSelectorAttributeValueInsideDoubleQuotes(href);
  23432. limitedEscapedHref =
  23433. 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]';
  23434. "string" === typeof crossOrigin &&
  23435. (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]');
  23436. preconnectsSet.has(limitedEscapedHref) ||
  23437. (preconnectsSet.add(limitedEscapedHref),
  23438. (rel = { rel: rel, crossOrigin: crossOrigin, href: href }),
  23439. null === ownerDocument.querySelector(limitedEscapedHref) &&
  23440. ((href = ownerDocument.createElement("link")),
  23441. setInitialProperties(href, "link", rel),
  23442. markNodeAsHoistable(href),
  23443. ownerDocument.head.appendChild(href)));
  23444. }
  23445. }
  23446. function getResource(type, currentProps, pendingProps, currentResource) {
  23447. var resourceRoot = (resourceRoot = rootInstanceStackCursor.current)
  23448. ? getHoistableRoot(resourceRoot)
  23449. : null;
  23450. if (!resourceRoot)
  23451. throw Error(
  23452. '"resourceRoot" was expected to exist. This is a bug in React.'
  23453. );
  23454. switch (type) {
  23455. case "meta":
  23456. case "title":
  23457. return null;
  23458. case "style":
  23459. return "string" === typeof pendingProps.precedence &&
  23460. "string" === typeof pendingProps.href
  23461. ? ((pendingProps = getStyleKey(pendingProps.href)),
  23462. (currentProps =
  23463. getResourcesFromRoot(resourceRoot).hoistableStyles),
  23464. (currentResource = currentProps.get(pendingProps)),
  23465. currentResource ||
  23466. ((currentResource = {
  23467. type: "style",
  23468. instance: null,
  23469. count: 0,
  23470. state: null
  23471. }),
  23472. currentProps.set(pendingProps, currentResource)),
  23473. currentResource)
  23474. : { type: "void", instance: null, count: 0, state: null };
  23475. case "link":
  23476. if (
  23477. "stylesheet" === pendingProps.rel &&
  23478. "string" === typeof pendingProps.href &&
  23479. "string" === typeof pendingProps.precedence
  23480. ) {
  23481. type = getStyleKey(pendingProps.href);
  23482. var _styles = getResourcesFromRoot(resourceRoot).hoistableStyles,
  23483. _resource = _styles.get(type);
  23484. if (
  23485. !_resource &&
  23486. ((resourceRoot = resourceRoot.ownerDocument || resourceRoot),
  23487. (_resource = {
  23488. type: "stylesheet",
  23489. instance: null,
  23490. count: 0,
  23491. state: { loading: NotLoaded, preload: null }
  23492. }),
  23493. _styles.set(type, _resource),
  23494. (_styles = resourceRoot.querySelector(
  23495. getStylesheetSelectorFromKey(type)
  23496. )) &&
  23497. !_styles._p &&
  23498. ((_resource.instance = _styles),
  23499. (_resource.state.loading = Loaded | Inserted)),
  23500. !preloadPropsMap.has(type))
  23501. ) {
  23502. var preloadProps = {
  23503. rel: "preload",
  23504. as: "style",
  23505. href: pendingProps.href,
  23506. crossOrigin: pendingProps.crossOrigin,
  23507. integrity: pendingProps.integrity,
  23508. media: pendingProps.media,
  23509. hrefLang: pendingProps.hrefLang,
  23510. referrerPolicy: pendingProps.referrerPolicy
  23511. };
  23512. preloadPropsMap.set(type, preloadProps);
  23513. _styles ||
  23514. preloadStylesheet(
  23515. resourceRoot,
  23516. type,
  23517. preloadProps,
  23518. _resource.state
  23519. );
  23520. }
  23521. if (currentProps && null === currentResource)
  23522. throw (
  23523. ((pendingProps =
  23524. "\n\n - " +
  23525. describeLinkForResourceErrorDEV(currentProps) +
  23526. "\n + " +
  23527. describeLinkForResourceErrorDEV(pendingProps)),
  23528. Error(
  23529. "Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." +
  23530. pendingProps
  23531. ))
  23532. );
  23533. return _resource;
  23534. }
  23535. if (currentProps && null !== currentResource)
  23536. throw (
  23537. ((pendingProps =
  23538. "\n\n - " +
  23539. describeLinkForResourceErrorDEV(currentProps) +
  23540. "\n + " +
  23541. describeLinkForResourceErrorDEV(pendingProps)),
  23542. Error(
  23543. "Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." +
  23544. pendingProps
  23545. ))
  23546. );
  23547. return null;
  23548. case "script":
  23549. return (
  23550. (currentProps = pendingProps.async),
  23551. (pendingProps = pendingProps.src),
  23552. "string" === typeof pendingProps &&
  23553. currentProps &&
  23554. "function" !== typeof currentProps &&
  23555. "symbol" !== typeof currentProps
  23556. ? ((pendingProps = getScriptKey(pendingProps)),
  23557. (currentProps =
  23558. getResourcesFromRoot(resourceRoot).hoistableScripts),
  23559. (currentResource = currentProps.get(pendingProps)),
  23560. currentResource ||
  23561. ((currentResource = {
  23562. type: "script",
  23563. instance: null,
  23564. count: 0,
  23565. state: null
  23566. }),
  23567. currentProps.set(pendingProps, currentResource)),
  23568. currentResource)
  23569. : { type: "void", instance: null, count: 0, state: null }
  23570. );
  23571. default:
  23572. throw Error(
  23573. 'getResource encountered a type it did not expect: "' +
  23574. type +
  23575. '". this is a bug in React.'
  23576. );
  23577. }
  23578. }
  23579. function describeLinkForResourceErrorDEV(props) {
  23580. var describedProps = 0,
  23581. description = "<link";
  23582. "string" === typeof props.rel
  23583. ? (describedProps++, (description += ' rel="' + props.rel + '"'))
  23584. : hasOwnProperty.call(props, "rel") &&
  23585. (describedProps++,
  23586. (description +=
  23587. ' rel="' +
  23588. (null === props.rel ? "null" : "invalid type " + typeof props.rel) +
  23589. '"'));
  23590. "string" === typeof props.href
  23591. ? (describedProps++, (description += ' href="' + props.href + '"'))
  23592. : hasOwnProperty.call(props, "href") &&
  23593. (describedProps++,
  23594. (description +=
  23595. ' href="' +
  23596. (null === props.href
  23597. ? "null"
  23598. : "invalid type " + typeof props.href) +
  23599. '"'));
  23600. "string" === typeof props.precedence
  23601. ? (describedProps++,
  23602. (description += ' precedence="' + props.precedence + '"'))
  23603. : hasOwnProperty.call(props, "precedence") &&
  23604. (describedProps++,
  23605. (description +=
  23606. " precedence={" +
  23607. (null === props.precedence
  23608. ? "null"
  23609. : "invalid type " + typeof props.precedence) +
  23610. "}"));
  23611. Object.getOwnPropertyNames(props).length > describedProps &&
  23612. (description += " ...");
  23613. return description + " />";
  23614. }
  23615. function getStyleKey(href) {
  23616. return (
  23617. 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"'
  23618. );
  23619. }
  23620. function getStylesheetSelectorFromKey(key) {
  23621. return 'link[rel="stylesheet"][' + key + "]";
  23622. }
  23623. function stylesheetPropsFromRawProps(rawProps) {
  23624. return assign({}, rawProps, {
  23625. "data-precedence": rawProps.precedence,
  23626. precedence: null
  23627. });
  23628. }
  23629. function preloadStylesheet(ownerDocument, key, preloadProps, state) {
  23630. ownerDocument.querySelector(
  23631. 'link[rel="preload"][as="style"][' + key + "]"
  23632. )
  23633. ? (state.loading = Loaded)
  23634. : ((key = ownerDocument.createElement("link")),
  23635. (state.preload = key),
  23636. key.addEventListener("load", function () {
  23637. return (state.loading |= Loaded);
  23638. }),
  23639. key.addEventListener("error", function () {
  23640. return (state.loading |= Errored);
  23641. }),
  23642. setInitialProperties(key, "link", preloadProps),
  23643. markNodeAsHoistable(key),
  23644. ownerDocument.head.appendChild(key));
  23645. }
  23646. function getScriptKey(src) {
  23647. return (
  23648. '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]'
  23649. );
  23650. }
  23651. function getScriptSelectorFromKey(key) {
  23652. return "script[async]" + key;
  23653. }
  23654. function acquireResource(hoistableRoot, resource, props) {
  23655. resource.count++;
  23656. if (null === resource.instance)
  23657. switch (resource.type) {
  23658. case "style":
  23659. var instance = hoistableRoot.querySelector(
  23660. 'style[data-href~="' +
  23661. escapeSelectorAttributeValueInsideDoubleQuotes(props.href) +
  23662. '"]'
  23663. );
  23664. if (instance)
  23665. return (
  23666. (resource.instance = instance),
  23667. markNodeAsHoistable(instance),
  23668. instance
  23669. );
  23670. var styleProps = assign({}, props, {
  23671. "data-href": props.href,
  23672. "data-precedence": props.precedence,
  23673. href: null,
  23674. precedence: null
  23675. });
  23676. instance = (
  23677. hoistableRoot.ownerDocument || hoistableRoot
  23678. ).createElement("style");
  23679. markNodeAsHoistable(instance);
  23680. setInitialProperties(instance, "style", styleProps);
  23681. insertStylesheet(instance, props.precedence, hoistableRoot);
  23682. return (resource.instance = instance);
  23683. case "stylesheet":
  23684. styleProps = getStyleKey(props.href);
  23685. var _instance = hoistableRoot.querySelector(
  23686. getStylesheetSelectorFromKey(styleProps)
  23687. );
  23688. if (_instance)
  23689. return (
  23690. (resource.state.loading |= Inserted),
  23691. (resource.instance = _instance),
  23692. markNodeAsHoistable(_instance),
  23693. _instance
  23694. );
  23695. instance = stylesheetPropsFromRawProps(props);
  23696. (styleProps = preloadPropsMap.get(styleProps)) &&
  23697. adoptPreloadPropsForStylesheet(instance, styleProps);
  23698. _instance = (
  23699. hoistableRoot.ownerDocument || hoistableRoot
  23700. ).createElement("link");
  23701. markNodeAsHoistable(_instance);
  23702. var linkInstance = _instance;
  23703. linkInstance._p = new Promise(function (resolve, reject) {
  23704. linkInstance.onload = resolve;
  23705. linkInstance.onerror = reject;
  23706. });
  23707. setInitialProperties(_instance, "link", instance);
  23708. resource.state.loading |= Inserted;
  23709. insertStylesheet(_instance, props.precedence, hoistableRoot);
  23710. return (resource.instance = _instance);
  23711. case "script":
  23712. _instance = getScriptKey(props.src);
  23713. if (
  23714. (styleProps = hoistableRoot.querySelector(
  23715. getScriptSelectorFromKey(_instance)
  23716. ))
  23717. )
  23718. return (
  23719. (resource.instance = styleProps),
  23720. markNodeAsHoistable(styleProps),
  23721. styleProps
  23722. );
  23723. instance = props;
  23724. if ((styleProps = preloadPropsMap.get(_instance)))
  23725. (instance = assign({}, props)),
  23726. adoptPreloadPropsForScript(instance, styleProps);
  23727. hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
  23728. styleProps = hoistableRoot.createElement("script");
  23729. markNodeAsHoistable(styleProps);
  23730. setInitialProperties(styleProps, "link", instance);
  23731. hoistableRoot.head.appendChild(styleProps);
  23732. return (resource.instance = styleProps);
  23733. case "void":
  23734. return null;
  23735. default:
  23736. throw Error(
  23737. 'acquireResource encountered a resource type it did not expect: "' +
  23738. resource.type +
  23739. '". this is a bug in React.'
  23740. );
  23741. }
  23742. else
  23743. "stylesheet" === resource.type &&
  23744. (resource.state.loading & Inserted) === NotLoaded &&
  23745. ((instance = resource.instance),
  23746. (resource.state.loading |= Inserted),
  23747. insertStylesheet(instance, props.precedence, hoistableRoot));
  23748. return resource.instance;
  23749. }
  23750. function insertStylesheet(instance, precedence, root) {
  23751. for (
  23752. var nodes = root.querySelectorAll(
  23753. 'link[rel="stylesheet"][data-precedence],style[data-precedence]'
  23754. ),
  23755. last = nodes.length ? nodes[nodes.length - 1] : null,
  23756. prior = last,
  23757. i = 0;
  23758. i < nodes.length;
  23759. i++
  23760. ) {
  23761. var node = nodes[i];
  23762. if (node.dataset.precedence === precedence) prior = node;
  23763. else if (prior !== last) break;
  23764. }
  23765. prior
  23766. ? prior.parentNode.insertBefore(instance, prior.nextSibling)
  23767. : ((precedence = 9 === root.nodeType ? root.head : root),
  23768. precedence.insertBefore(instance, precedence.firstChild));
  23769. }
  23770. function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
  23771. null == stylesheetProps.crossOrigin &&
  23772. (stylesheetProps.crossOrigin = preloadProps.crossOrigin);
  23773. null == stylesheetProps.referrerPolicy &&
  23774. (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);
  23775. null == stylesheetProps.title &&
  23776. (stylesheetProps.title = preloadProps.title);
  23777. }
  23778. function adoptPreloadPropsForScript(scriptProps, preloadProps) {
  23779. null == scriptProps.crossOrigin &&
  23780. (scriptProps.crossOrigin = preloadProps.crossOrigin);
  23781. null == scriptProps.referrerPolicy &&
  23782. (scriptProps.referrerPolicy = preloadProps.referrerPolicy);
  23783. null == scriptProps.integrity &&
  23784. (scriptProps.integrity = preloadProps.integrity);
  23785. }
  23786. function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
  23787. if (null === tagCaches) {
  23788. var cache = new Map();
  23789. var caches = (tagCaches = new Map());
  23790. caches.set(ownerDocument, cache);
  23791. } else
  23792. (caches = tagCaches),
  23793. (cache = caches.get(ownerDocument)),
  23794. cache || ((cache = new Map()), caches.set(ownerDocument, cache));
  23795. if (cache.has(type)) return cache;
  23796. cache.set(type, null);
  23797. ownerDocument = ownerDocument.getElementsByTagName(type);
  23798. for (caches = 0; caches < ownerDocument.length; caches++) {
  23799. var node = ownerDocument[caches];
  23800. if (
  23801. !(
  23802. node[internalHoistableMarker] ||
  23803. node[internalInstanceKey] ||
  23804. ("link" === type && "stylesheet" === node.getAttribute("rel"))
  23805. ) &&
  23806. node.namespaceURI !== SVG_NAMESPACE
  23807. ) {
  23808. var nodeKey = node.getAttribute(keyAttribute) || "";
  23809. nodeKey = type + nodeKey;
  23810. var existing = cache.get(nodeKey);
  23811. existing ? existing.push(node) : cache.set(nodeKey, [node]);
  23812. }
  23813. }
  23814. return cache;
  23815. }
  23816. function mountHoistable(hoistableRoot, type, instance) {
  23817. hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
  23818. hoistableRoot.head.insertBefore(
  23819. instance,
  23820. "title" === type ? hoistableRoot.querySelector("head > title") : null
  23821. );
  23822. }
  23823. function isHostHoistableType(type, props, hostContext) {
  23824. var outsideHostContainerContext =
  23825. !hostContext.ancestorInfo.containerTagInScope;
  23826. if (
  23827. hostContext.context === HostContextNamespaceSvg ||
  23828. null != props.itemProp
  23829. )
  23830. return (
  23831. !outsideHostContainerContext ||
  23832. null == props.itemProp ||
  23833. ("meta" !== type &&
  23834. "title" !== type &&
  23835. "style" !== type &&
  23836. "link" !== type &&
  23837. "script" !== type) ||
  23838. console.error(
  23839. "Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",
  23840. type,
  23841. type
  23842. ),
  23843. false
  23844. );
  23845. switch (type) {
  23846. case "meta":
  23847. case "title":
  23848. return true;
  23849. case "style":
  23850. if (
  23851. "string" !== typeof props.precedence ||
  23852. "string" !== typeof props.href ||
  23853. "" === props.href
  23854. ) {
  23855. outsideHostContainerContext &&
  23856. console.error(
  23857. 'Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.'
  23858. );
  23859. break;
  23860. }
  23861. return true;
  23862. case "link":
  23863. if (
  23864. "string" !== typeof props.rel ||
  23865. "string" !== typeof props.href ||
  23866. "" === props.href ||
  23867. props.onLoad ||
  23868. props.onError
  23869. ) {
  23870. if (
  23871. "stylesheet" === props.rel &&
  23872. "string" === typeof props.precedence
  23873. ) {
  23874. type = props.href;
  23875. var onError = props.onError,
  23876. disabled = props.disabled;
  23877. hostContext = [];
  23878. props.onLoad && hostContext.push("`onLoad`");
  23879. onError && hostContext.push("`onError`");
  23880. null != disabled && hostContext.push("`disabled`");
  23881. onError = propNamesListJoin(hostContext, "and");
  23882. onError += 1 === hostContext.length ? " prop" : " props";
  23883. disabled =
  23884. 1 === hostContext.length ? "an " + onError : "the " + onError;
  23885. hostContext.length &&
  23886. console.error(
  23887. 'React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',
  23888. type,
  23889. disabled,
  23890. onError
  23891. );
  23892. }
  23893. outsideHostContainerContext &&
  23894. ("string" !== typeof props.rel ||
  23895. "string" !== typeof props.href ||
  23896. "" === props.href
  23897. ? console.error(
  23898. "Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"
  23899. )
  23900. : (props.onError || props.onLoad) &&
  23901. console.error(
  23902. "Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."
  23903. ));
  23904. break;
  23905. }
  23906. switch (props.rel) {
  23907. case "stylesheet":
  23908. return (
  23909. (type = props.precedence),
  23910. (props = props.disabled),
  23911. "string" !== typeof type &&
  23912. outsideHostContainerContext &&
  23913. console.error(
  23914. 'Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'
  23915. ),
  23916. "string" === typeof type && null == props
  23917. );
  23918. default:
  23919. return true;
  23920. }
  23921. case "script":
  23922. type =
  23923. props.async &&
  23924. "function" !== typeof props.async &&
  23925. "symbol" !== typeof props.async;
  23926. if (
  23927. !type ||
  23928. props.onLoad ||
  23929. props.onError ||
  23930. !props.src ||
  23931. "string" !== typeof props.src
  23932. ) {
  23933. outsideHostContainerContext &&
  23934. (type
  23935. ? props.onLoad || props.onError
  23936. ? console.error(
  23937. "Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."
  23938. )
  23939. : console.error(
  23940. "Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."
  23941. )
  23942. : console.error(
  23943. 'Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'
  23944. ));
  23945. break;
  23946. }
  23947. return true;
  23948. case "noscript":
  23949. case "template":
  23950. outsideHostContainerContext &&
  23951. console.error(
  23952. "Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",
  23953. type
  23954. );
  23955. }
  23956. return false;
  23957. }
  23958. function preloadResource(resource) {
  23959. return "stylesheet" === resource.type &&
  23960. (resource.state.loading & Settled) === NotLoaded
  23961. ? false
  23962. : true;
  23963. }
  23964. function suspendResource(state, hoistableRoot, resource, props) {
  23965. if (
  23966. "stylesheet" === resource.type &&
  23967. ("string" !== typeof props.media ||
  23968. false !== matchMedia(props.media).matches) &&
  23969. (resource.state.loading & Inserted) === NotLoaded
  23970. ) {
  23971. if (null === resource.instance) {
  23972. var key = getStyleKey(props.href),
  23973. instance = hoistableRoot.querySelector(
  23974. getStylesheetSelectorFromKey(key)
  23975. );
  23976. if (instance) {
  23977. hoistableRoot = instance._p;
  23978. null !== hoistableRoot &&
  23979. "object" === typeof hoistableRoot &&
  23980. "function" === typeof hoistableRoot.then &&
  23981. (state.count++,
  23982. (state = onUnsuspend.bind(state)),
  23983. hoistableRoot.then(state, state));
  23984. resource.state.loading |= Inserted;
  23985. resource.instance = instance;
  23986. markNodeAsHoistable(instance);
  23987. return;
  23988. }
  23989. instance = hoistableRoot.ownerDocument || hoistableRoot;
  23990. props = stylesheetPropsFromRawProps(props);
  23991. (key = preloadPropsMap.get(key)) &&
  23992. adoptPreloadPropsForStylesheet(props, key);
  23993. instance = instance.createElement("link");
  23994. markNodeAsHoistable(instance);
  23995. var linkInstance = instance;
  23996. linkInstance._p = new Promise(function (resolve, reject) {
  23997. linkInstance.onload = resolve;
  23998. linkInstance.onerror = reject;
  23999. });
  24000. setInitialProperties(instance, "link", props);
  24001. resource.instance = instance;
  24002. }
  24003. null === state.stylesheets && (state.stylesheets = new Map());
  24004. state.stylesheets.set(resource, hoistableRoot);
  24005. (hoistableRoot = resource.state.preload) &&
  24006. (resource.state.loading & Settled) === NotLoaded &&
  24007. (state.count++,
  24008. (resource = onUnsuspend.bind(state)),
  24009. hoistableRoot.addEventListener("load", resource),
  24010. hoistableRoot.addEventListener("error", resource));
  24011. }
  24012. }
  24013. function waitForCommitToBeReady(state, timeoutOffset) {
  24014. state.stylesheets &&
  24015. 0 === state.count &&
  24016. insertSuspendedStylesheets(state, state.stylesheets);
  24017. return 0 < state.count || 0 < state.imgCount
  24018. ? function (commit) {
  24019. var stylesheetTimer = setTimeout(function () {
  24020. state.stylesheets &&
  24021. insertSuspendedStylesheets(state, state.stylesheets);
  24022. if (state.unsuspend) {
  24023. var unsuspend = state.unsuspend;
  24024. state.unsuspend = null;
  24025. unsuspend();
  24026. }
  24027. }, SUSPENSEY_STYLESHEET_TIMEOUT + timeoutOffset);
  24028. 0 < state.imgBytes &&
  24029. 0 === estimatedBytesWithinLimit &&
  24030. (estimatedBytesWithinLimit =
  24031. 125 * estimateBandwidth() * SUSPENSEY_IMAGE_TIME_ESTIMATE);
  24032. var imgTimer = setTimeout(
  24033. function () {
  24034. state.waitingForImages = false;
  24035. if (
  24036. 0 === state.count &&
  24037. (state.stylesheets &&
  24038. insertSuspendedStylesheets(state, state.stylesheets),
  24039. state.unsuspend)
  24040. ) {
  24041. var unsuspend = state.unsuspend;
  24042. state.unsuspend = null;
  24043. unsuspend();
  24044. }
  24045. },
  24046. (state.imgBytes > estimatedBytesWithinLimit
  24047. ? 50
  24048. : SUSPENSEY_IMAGE_TIMEOUT) + timeoutOffset
  24049. );
  24050. state.unsuspend = commit;
  24051. return function () {
  24052. state.unsuspend = null;
  24053. clearTimeout(stylesheetTimer);
  24054. clearTimeout(imgTimer);
  24055. };
  24056. }
  24057. : null;
  24058. }
  24059. function onUnsuspend() {
  24060. this.count--;
  24061. if (0 === this.count && (0 === this.imgCount || !this.waitingForImages))
  24062. if (this.stylesheets)
  24063. insertSuspendedStylesheets(this, this.stylesheets);
  24064. else if (this.unsuspend) {
  24065. var unsuspend = this.unsuspend;
  24066. this.unsuspend = null;
  24067. unsuspend();
  24068. }
  24069. }
  24070. function insertSuspendedStylesheets(state, resources) {
  24071. state.stylesheets = null;
  24072. null !== state.unsuspend &&
  24073. (state.count++,
  24074. (precedencesByRoot = new Map()),
  24075. resources.forEach(insertStylesheetIntoRoot, state),
  24076. (precedencesByRoot = null),
  24077. onUnsuspend.call(state));
  24078. }
  24079. function insertStylesheetIntoRoot(root, resource) {
  24080. if (!(resource.state.loading & Inserted)) {
  24081. var precedences = precedencesByRoot.get(root);
  24082. if (precedences) var last = precedences.get(LAST_PRECEDENCE);
  24083. else {
  24084. precedences = new Map();
  24085. precedencesByRoot.set(root, precedences);
  24086. for (
  24087. var nodes = root.querySelectorAll(
  24088. "link[data-precedence],style[data-precedence]"
  24089. ),
  24090. i = 0;
  24091. i < nodes.length;
  24092. i++
  24093. ) {
  24094. var node = nodes[i];
  24095. if (
  24096. "LINK" === node.nodeName ||
  24097. "not all" !== node.getAttribute("media")
  24098. )
  24099. precedences.set(node.dataset.precedence, node), (last = node);
  24100. }
  24101. last && precedences.set(LAST_PRECEDENCE, last);
  24102. }
  24103. nodes = resource.instance;
  24104. node = nodes.getAttribute("data-precedence");
  24105. i = precedences.get(node) || last;
  24106. i === last && precedences.set(LAST_PRECEDENCE, nodes);
  24107. precedences.set(node, nodes);
  24108. this.count++;
  24109. last = onUnsuspend.bind(this);
  24110. nodes.addEventListener("load", last);
  24111. nodes.addEventListener("error", last);
  24112. i
  24113. ? i.parentNode.insertBefore(nodes, i.nextSibling)
  24114. : ((root = 9 === root.nodeType ? root.head : root),
  24115. root.insertBefore(nodes, root.firstChild));
  24116. resource.state.loading |= Inserted;
  24117. }
  24118. }
  24119. function FiberRootNode(
  24120. containerInfo,
  24121. tag,
  24122. hydrate,
  24123. identifierPrefix,
  24124. onUncaughtError,
  24125. onCaughtError,
  24126. onRecoverableError,
  24127. onDefaultTransitionIndicator,
  24128. formState
  24129. ) {
  24130. this.tag = 1;
  24131. this.containerInfo = containerInfo;
  24132. this.pingCache = this.current = this.pendingChildren = null;
  24133. this.timeoutHandle = noTimeout;
  24134. this.callbackNode =
  24135. this.next =
  24136. this.pendingContext =
  24137. this.context =
  24138. this.cancelPendingCommit =
  24139. null;
  24140. this.callbackPriority = 0;
  24141. this.expirationTimes = createLaneMap(-1);
  24142. this.entangledLanes =
  24143. this.shellSuspendCounter =
  24144. this.errorRecoveryDisabledLanes =
  24145. this.expiredLanes =
  24146. this.warmLanes =
  24147. this.pingedLanes =
  24148. this.suspendedLanes =
  24149. this.pendingLanes =
  24150. 0;
  24151. this.entanglements = createLaneMap(0);
  24152. this.hiddenUpdates = createLaneMap(null);
  24153. this.identifierPrefix = identifierPrefix;
  24154. this.onUncaughtError = onUncaughtError;
  24155. this.onCaughtError = onCaughtError;
  24156. this.onRecoverableError = onRecoverableError;
  24157. this.pooledCache = null;
  24158. this.pooledCacheLanes = 0;
  24159. this.formState = formState;
  24160. this.incompleteTransitions = new Map();
  24161. this.passiveEffectDuration = this.effectDuration = -0;
  24162. this.memoizedUpdaters = new Set();
  24163. containerInfo = this.pendingUpdatersLaneMap = [];
  24164. for (tag = 0; 31 > tag; tag++) containerInfo.push(new Set());
  24165. this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()";
  24166. }
  24167. function createFiberRoot(
  24168. containerInfo,
  24169. tag,
  24170. hydrate,
  24171. initialChildren,
  24172. hydrationCallbacks,
  24173. isStrictMode,
  24174. identifierPrefix,
  24175. formState,
  24176. onUncaughtError,
  24177. onCaughtError,
  24178. onRecoverableError,
  24179. onDefaultTransitionIndicator
  24180. ) {
  24181. containerInfo = new FiberRootNode(
  24182. containerInfo,
  24183. tag,
  24184. hydrate,
  24185. identifierPrefix,
  24186. onUncaughtError,
  24187. onCaughtError,
  24188. onRecoverableError,
  24189. onDefaultTransitionIndicator,
  24190. formState
  24191. );
  24192. tag = ConcurrentMode;
  24193. true === isStrictMode && (tag |= StrictLegacyMode | StrictEffectsMode);
  24194. tag |= ProfileMode;
  24195. isStrictMode = createFiber(3, null, null, tag);
  24196. containerInfo.current = isStrictMode;
  24197. isStrictMode.stateNode = containerInfo;
  24198. tag = createCache();
  24199. retainCache(tag);
  24200. containerInfo.pooledCache = tag;
  24201. retainCache(tag);
  24202. isStrictMode.memoizedState = {
  24203. element: initialChildren,
  24204. isDehydrated: hydrate,
  24205. cache: tag
  24206. };
  24207. initializeUpdateQueue(isStrictMode);
  24208. return containerInfo;
  24209. }
  24210. function getContextForSubtree(parentComponent) {
  24211. if (!parentComponent) return emptyContextObject;
  24212. parentComponent = emptyContextObject;
  24213. return parentComponent;
  24214. }
  24215. function updateContainerImpl(
  24216. rootFiber,
  24217. lane,
  24218. element,
  24219. container,
  24220. parentComponent,
  24221. callback
  24222. ) {
  24223. if (
  24224. injectedHook &&
  24225. "function" === typeof injectedHook.onScheduleFiberRoot
  24226. )
  24227. try {
  24228. injectedHook.onScheduleFiberRoot(rendererID, container, element);
  24229. } catch (err) {
  24230. hasLoggedError ||
  24231. ((hasLoggedError = true),
  24232. console.error(
  24233. "React instrumentation encountered an error: %o",
  24234. err
  24235. ));
  24236. }
  24237. parentComponent = getContextForSubtree(parentComponent);
  24238. null === container.context
  24239. ? (container.context = parentComponent)
  24240. : (container.pendingContext = parentComponent);
  24241. isRendering &&
  24242. null !== current &&
  24243. !didWarnAboutNestedUpdates &&
  24244. ((didWarnAboutNestedUpdates = true),
  24245. console.error(
  24246. "Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",
  24247. getComponentNameFromFiber(current) || "Unknown"
  24248. ));
  24249. container = createUpdate(lane);
  24250. container.payload = { element: element };
  24251. callback = void 0 === callback ? null : callback;
  24252. null !== callback &&
  24253. ("function" !== typeof callback &&
  24254. console.error(
  24255. "Expected the last optional `callback` argument to be a function. Instead received: %s.",
  24256. callback
  24257. ),
  24258. (container.callback = callback));
  24259. element = enqueueUpdate(rootFiber, container, lane);
  24260. null !== element &&
  24261. (startUpdateTimerByLane(lane, "root.render()", null),
  24262. scheduleUpdateOnFiber(element, rootFiber, lane),
  24263. entangleTransitions(element, rootFiber, lane));
  24264. }
  24265. function markRetryLaneImpl(fiber, retryLane) {
  24266. fiber = fiber.memoizedState;
  24267. if (null !== fiber && null !== fiber.dehydrated) {
  24268. var a = fiber.retryLane;
  24269. fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
  24270. }
  24271. }
  24272. function markRetryLaneIfNotHydrated(fiber, retryLane) {
  24273. markRetryLaneImpl(fiber, retryLane);
  24274. (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
  24275. }
  24276. function attemptContinuousHydration(fiber) {
  24277. if (13 === fiber.tag || 31 === fiber.tag) {
  24278. var root = enqueueConcurrentRenderForLane(fiber, 67108864);
  24279. null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);
  24280. markRetryLaneIfNotHydrated(fiber, 67108864);
  24281. }
  24282. }
  24283. function attemptHydrationAtCurrentPriority(fiber) {
  24284. if (13 === fiber.tag || 31 === fiber.tag) {
  24285. var lane = requestUpdateLane(fiber);
  24286. lane = getBumpedLaneForHydrationByLane(lane);
  24287. var root = enqueueConcurrentRenderForLane(fiber, lane);
  24288. null !== root && scheduleUpdateOnFiber(root, fiber, lane);
  24289. markRetryLaneIfNotHydrated(fiber, lane);
  24290. }
  24291. }
  24292. function getCurrentFiberForDevTools() {
  24293. return current;
  24294. }
  24295. function dispatchDiscreteEvent(
  24296. domEventName,
  24297. eventSystemFlags,
  24298. container,
  24299. nativeEvent
  24300. ) {
  24301. var prevTransition = ReactSharedInternals.T;
  24302. ReactSharedInternals.T = null;
  24303. var previousPriority = ReactDOMSharedInternals.p;
  24304. try {
  24305. (ReactDOMSharedInternals.p = DiscreteEventPriority),
  24306. dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
  24307. } finally {
  24308. (ReactDOMSharedInternals.p = previousPriority),
  24309. (ReactSharedInternals.T = prevTransition);
  24310. }
  24311. }
  24312. function dispatchContinuousEvent(
  24313. domEventName,
  24314. eventSystemFlags,
  24315. container,
  24316. nativeEvent
  24317. ) {
  24318. var prevTransition = ReactSharedInternals.T;
  24319. ReactSharedInternals.T = null;
  24320. var previousPriority = ReactDOMSharedInternals.p;
  24321. try {
  24322. (ReactDOMSharedInternals.p = ContinuousEventPriority),
  24323. dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
  24324. } finally {
  24325. (ReactDOMSharedInternals.p = previousPriority),
  24326. (ReactSharedInternals.T = prevTransition);
  24327. }
  24328. }
  24329. function dispatchEvent(
  24330. domEventName,
  24331. eventSystemFlags,
  24332. targetContainer,
  24333. nativeEvent
  24334. ) {
  24335. if (_enabled) {
  24336. var blockedOn = findInstanceBlockingEvent(nativeEvent);
  24337. if (null === blockedOn)
  24338. dispatchEventForPluginEventSystem(
  24339. domEventName,
  24340. eventSystemFlags,
  24341. nativeEvent,
  24342. return_targetInst,
  24343. targetContainer
  24344. ),
  24345. clearIfContinuousEvent(domEventName, nativeEvent);
  24346. else if (
  24347. queueIfContinuousEvent(
  24348. blockedOn,
  24349. domEventName,
  24350. eventSystemFlags,
  24351. targetContainer,
  24352. nativeEvent
  24353. )
  24354. )
  24355. nativeEvent.stopPropagation();
  24356. else if (
  24357. (clearIfContinuousEvent(domEventName, nativeEvent),
  24358. eventSystemFlags & 4 &&
  24359. -1 < discreteReplayableEvents.indexOf(domEventName))
  24360. ) {
  24361. for (; null !== blockedOn; ) {
  24362. var fiber = getInstanceFromNode(blockedOn);
  24363. if (null !== fiber)
  24364. switch (fiber.tag) {
  24365. case 3:
  24366. fiber = fiber.stateNode;
  24367. if (fiber.current.memoizedState.isDehydrated) {
  24368. var lanes = getHighestPriorityLanes(fiber.pendingLanes);
  24369. if (0 !== lanes) {
  24370. var root = fiber;
  24371. root.pendingLanes |= 2;
  24372. for (root.entangledLanes |= 2; lanes; ) {
  24373. var lane = 1 << (31 - clz32(lanes));
  24374. root.entanglements[1] |= lane;
  24375. lanes &= ~lane;
  24376. }
  24377. ensureRootIsScheduled(fiber);
  24378. (executionContext & (RenderContext | CommitContext)) ===
  24379. NoContext &&
  24380. ((workInProgressRootRenderTargetTime =
  24381. now$1() + RENDER_TIMEOUT_MS),
  24382. flushSyncWorkAcrossRoots_impl(0));
  24383. }
  24384. }
  24385. break;
  24386. case 31:
  24387. case 13:
  24388. (root = enqueueConcurrentRenderForLane(fiber, 2)),
  24389. null !== root && scheduleUpdateOnFiber(root, fiber, 2),
  24390. flushSyncWork$1(),
  24391. markRetryLaneIfNotHydrated(fiber, 2);
  24392. }
  24393. fiber = findInstanceBlockingEvent(nativeEvent);
  24394. null === fiber &&
  24395. dispatchEventForPluginEventSystem(
  24396. domEventName,
  24397. eventSystemFlags,
  24398. nativeEvent,
  24399. return_targetInst,
  24400. targetContainer
  24401. );
  24402. if (fiber === blockedOn) break;
  24403. blockedOn = fiber;
  24404. }
  24405. null !== blockedOn && nativeEvent.stopPropagation();
  24406. } else
  24407. dispatchEventForPluginEventSystem(
  24408. domEventName,
  24409. eventSystemFlags,
  24410. nativeEvent,
  24411. null,
  24412. targetContainer
  24413. );
  24414. }
  24415. }
  24416. function findInstanceBlockingEvent(nativeEvent) {
  24417. nativeEvent = getEventTarget(nativeEvent);
  24418. return findInstanceBlockingTarget(nativeEvent);
  24419. }
  24420. function findInstanceBlockingTarget(targetNode) {
  24421. return_targetInst = null;
  24422. targetNode = getClosestInstanceFromNode(targetNode);
  24423. if (null !== targetNode) {
  24424. var nearestMounted = getNearestMountedFiber(targetNode);
  24425. if (null === nearestMounted) targetNode = null;
  24426. else {
  24427. var tag = nearestMounted.tag;
  24428. if (13 === tag) {
  24429. targetNode = getSuspenseInstanceFromFiber(nearestMounted);
  24430. if (null !== targetNode) return targetNode;
  24431. targetNode = null;
  24432. } else if (31 === tag) {
  24433. targetNode = getActivityInstanceFromFiber(nearestMounted);
  24434. if (null !== targetNode) return targetNode;
  24435. targetNode = null;
  24436. } else if (3 === tag) {
  24437. if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
  24438. return 3 === nearestMounted.tag
  24439. ? nearestMounted.stateNode.containerInfo
  24440. : null;
  24441. targetNode = null;
  24442. } else nearestMounted !== targetNode && (targetNode = null);
  24443. }
  24444. }
  24445. return_targetInst = targetNode;
  24446. return null;
  24447. }
  24448. function getEventPriority(domEventName) {
  24449. switch (domEventName) {
  24450. case "beforetoggle":
  24451. case "cancel":
  24452. case "click":
  24453. case "close":
  24454. case "contextmenu":
  24455. case "copy":
  24456. case "cut":
  24457. case "auxclick":
  24458. case "dblclick":
  24459. case "dragend":
  24460. case "dragstart":
  24461. case "drop":
  24462. case "focusin":
  24463. case "focusout":
  24464. case "input":
  24465. case "invalid":
  24466. case "keydown":
  24467. case "keypress":
  24468. case "keyup":
  24469. case "mousedown":
  24470. case "mouseup":
  24471. case "paste":
  24472. case "pause":
  24473. case "play":
  24474. case "pointercancel":
  24475. case "pointerdown":
  24476. case "pointerup":
  24477. case "ratechange":
  24478. case "reset":
  24479. case "resize":
  24480. case "seeked":
  24481. case "submit":
  24482. case "toggle":
  24483. case "touchcancel":
  24484. case "touchend":
  24485. case "touchstart":
  24486. case "volumechange":
  24487. case "change":
  24488. case "selectionchange":
  24489. case "textInput":
  24490. case "compositionstart":
  24491. case "compositionend":
  24492. case "compositionupdate":
  24493. case "beforeblur":
  24494. case "afterblur":
  24495. case "beforeinput":
  24496. case "blur":
  24497. case "fullscreenchange":
  24498. case "focus":
  24499. case "hashchange":
  24500. case "popstate":
  24501. case "select":
  24502. case "selectstart":
  24503. return DiscreteEventPriority;
  24504. case "drag":
  24505. case "dragenter":
  24506. case "dragexit":
  24507. case "dragleave":
  24508. case "dragover":
  24509. case "mousemove":
  24510. case "mouseout":
  24511. case "mouseover":
  24512. case "pointermove":
  24513. case "pointerout":
  24514. case "pointerover":
  24515. case "scroll":
  24516. case "touchmove":
  24517. case "wheel":
  24518. case "mouseenter":
  24519. case "mouseleave":
  24520. case "pointerenter":
  24521. case "pointerleave":
  24522. return ContinuousEventPriority;
  24523. case "message":
  24524. switch (getCurrentPriorityLevel()) {
  24525. case ImmediatePriority:
  24526. return DiscreteEventPriority;
  24527. case UserBlockingPriority:
  24528. return ContinuousEventPriority;
  24529. case NormalPriority$1:
  24530. case LowPriority:
  24531. return DefaultEventPriority;
  24532. case IdlePriority:
  24533. return IdleEventPriority;
  24534. default:
  24535. return DefaultEventPriority;
  24536. }
  24537. default:
  24538. return DefaultEventPriority;
  24539. }
  24540. }
  24541. function clearIfContinuousEvent(domEventName, nativeEvent) {
  24542. switch (domEventName) {
  24543. case "focusin":
  24544. case "focusout":
  24545. queuedFocus = null;
  24546. break;
  24547. case "dragenter":
  24548. case "dragleave":
  24549. queuedDrag = null;
  24550. break;
  24551. case "mouseover":
  24552. case "mouseout":
  24553. queuedMouse = null;
  24554. break;
  24555. case "pointerover":
  24556. case "pointerout":
  24557. queuedPointers.delete(nativeEvent.pointerId);
  24558. break;
  24559. case "gotpointercapture":
  24560. case "lostpointercapture":
  24561. queuedPointerCaptures.delete(nativeEvent.pointerId);
  24562. }
  24563. }
  24564. function accumulateOrCreateContinuousQueuedReplayableEvent(
  24565. existingQueuedEvent,
  24566. blockedOn,
  24567. domEventName,
  24568. eventSystemFlags,
  24569. targetContainer,
  24570. nativeEvent
  24571. ) {
  24572. if (
  24573. null === existingQueuedEvent ||
  24574. existingQueuedEvent.nativeEvent !== nativeEvent
  24575. )
  24576. return (
  24577. (existingQueuedEvent = {
  24578. blockedOn: blockedOn,
  24579. domEventName: domEventName,
  24580. eventSystemFlags: eventSystemFlags,
  24581. nativeEvent: nativeEvent,
  24582. targetContainers: [targetContainer]
  24583. }),
  24584. null !== blockedOn &&
  24585. ((blockedOn = getInstanceFromNode(blockedOn)),
  24586. null !== blockedOn && attemptContinuousHydration(blockedOn)),
  24587. existingQueuedEvent
  24588. );
  24589. existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
  24590. blockedOn = existingQueuedEvent.targetContainers;
  24591. null !== targetContainer &&
  24592. -1 === blockedOn.indexOf(targetContainer) &&
  24593. blockedOn.push(targetContainer);
  24594. return existingQueuedEvent;
  24595. }
  24596. function queueIfContinuousEvent(
  24597. blockedOn,
  24598. domEventName,
  24599. eventSystemFlags,
  24600. targetContainer,
  24601. nativeEvent
  24602. ) {
  24603. switch (domEventName) {
  24604. case "focusin":
  24605. return (
  24606. (queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
  24607. queuedFocus,
  24608. blockedOn,
  24609. domEventName,
  24610. eventSystemFlags,
  24611. targetContainer,
  24612. nativeEvent
  24613. )),
  24614. true
  24615. );
  24616. case "dragenter":
  24617. return (
  24618. (queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
  24619. queuedDrag,
  24620. blockedOn,
  24621. domEventName,
  24622. eventSystemFlags,
  24623. targetContainer,
  24624. nativeEvent
  24625. )),
  24626. true
  24627. );
  24628. case "mouseover":
  24629. return (
  24630. (queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
  24631. queuedMouse,
  24632. blockedOn,
  24633. domEventName,
  24634. eventSystemFlags,
  24635. targetContainer,
  24636. nativeEvent
  24637. )),
  24638. true
  24639. );
  24640. case "pointerover":
  24641. var pointerId = nativeEvent.pointerId;
  24642. queuedPointers.set(
  24643. pointerId,
  24644. accumulateOrCreateContinuousQueuedReplayableEvent(
  24645. queuedPointers.get(pointerId) || null,
  24646. blockedOn,
  24647. domEventName,
  24648. eventSystemFlags,
  24649. targetContainer,
  24650. nativeEvent
  24651. )
  24652. );
  24653. return true;
  24654. case "gotpointercapture":
  24655. return (
  24656. (pointerId = nativeEvent.pointerId),
  24657. queuedPointerCaptures.set(
  24658. pointerId,
  24659. accumulateOrCreateContinuousQueuedReplayableEvent(
  24660. queuedPointerCaptures.get(pointerId) || null,
  24661. blockedOn,
  24662. domEventName,
  24663. eventSystemFlags,
  24664. targetContainer,
  24665. nativeEvent
  24666. )
  24667. ),
  24668. true
  24669. );
  24670. }
  24671. return false;
  24672. }
  24673. function attemptExplicitHydrationTarget(queuedTarget) {
  24674. var targetInst = getClosestInstanceFromNode(queuedTarget.target);
  24675. if (null !== targetInst) {
  24676. var nearestMounted = getNearestMountedFiber(targetInst);
  24677. if (null !== nearestMounted)
  24678. if (((targetInst = nearestMounted.tag), 13 === targetInst)) {
  24679. if (
  24680. ((targetInst = getSuspenseInstanceFromFiber(nearestMounted)),
  24681. null !== targetInst)
  24682. ) {
  24683. queuedTarget.blockedOn = targetInst;
  24684. runWithPriority(queuedTarget.priority, function () {
  24685. attemptHydrationAtCurrentPriority(nearestMounted);
  24686. });
  24687. return;
  24688. }
  24689. } else if (31 === targetInst) {
  24690. if (
  24691. ((targetInst = getActivityInstanceFromFiber(nearestMounted)),
  24692. null !== targetInst)
  24693. ) {
  24694. queuedTarget.blockedOn = targetInst;
  24695. runWithPriority(queuedTarget.priority, function () {
  24696. attemptHydrationAtCurrentPriority(nearestMounted);
  24697. });
  24698. return;
  24699. }
  24700. } else if (
  24701. 3 === targetInst &&
  24702. nearestMounted.stateNode.current.memoizedState.isDehydrated
  24703. ) {
  24704. queuedTarget.blockedOn =
  24705. 3 === nearestMounted.tag
  24706. ? nearestMounted.stateNode.containerInfo
  24707. : null;
  24708. return;
  24709. }
  24710. }
  24711. queuedTarget.blockedOn = null;
  24712. }
  24713. function attemptReplayContinuousQueuedEvent(queuedEvent) {
  24714. if (null !== queuedEvent.blockedOn) return false;
  24715. for (
  24716. var targetContainers = queuedEvent.targetContainers;
  24717. 0 < targetContainers.length;
  24718. ) {
  24719. var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
  24720. if (null === nextBlockedOn) {
  24721. nextBlockedOn = queuedEvent.nativeEvent;
  24722. var nativeEventClone = new nextBlockedOn.constructor(
  24723. nextBlockedOn.type,
  24724. nextBlockedOn
  24725. ),
  24726. event = nativeEventClone;
  24727. null !== currentReplayingEvent &&
  24728. console.error(
  24729. "Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."
  24730. );
  24731. currentReplayingEvent = event;
  24732. nextBlockedOn.target.dispatchEvent(nativeEventClone);
  24733. null === currentReplayingEvent &&
  24734. console.error(
  24735. "Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."
  24736. );
  24737. currentReplayingEvent = null;
  24738. } else
  24739. return (
  24740. (targetContainers = getInstanceFromNode(nextBlockedOn)),
  24741. null !== targetContainers &&
  24742. attemptContinuousHydration(targetContainers),
  24743. (queuedEvent.blockedOn = nextBlockedOn),
  24744. false
  24745. );
  24746. targetContainers.shift();
  24747. }
  24748. return true;
  24749. }
  24750. function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
  24751. attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
  24752. }
  24753. function replayUnblockedEvents() {
  24754. hasScheduledReplayAttempt = false;
  24755. null !== queuedFocus &&
  24756. attemptReplayContinuousQueuedEvent(queuedFocus) &&
  24757. (queuedFocus = null);
  24758. null !== queuedDrag &&
  24759. attemptReplayContinuousQueuedEvent(queuedDrag) &&
  24760. (queuedDrag = null);
  24761. null !== queuedMouse &&
  24762. attemptReplayContinuousQueuedEvent(queuedMouse) &&
  24763. (queuedMouse = null);
  24764. queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
  24765. queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
  24766. }
  24767. function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
  24768. queuedEvent.blockedOn === unblocked &&
  24769. ((queuedEvent.blockedOn = null),
  24770. hasScheduledReplayAttempt ||
  24771. ((hasScheduledReplayAttempt = true),
  24772. Scheduler.unstable_scheduleCallback(
  24773. Scheduler.unstable_NormalPriority,
  24774. replayUnblockedEvents
  24775. )));
  24776. }
  24777. function scheduleReplayQueueIfNeeded(formReplayingQueue) {
  24778. lastScheduledReplayQueue !== formReplayingQueue &&
  24779. ((lastScheduledReplayQueue = formReplayingQueue),
  24780. Scheduler.unstable_scheduleCallback(
  24781. Scheduler.unstable_NormalPriority,
  24782. function () {
  24783. lastScheduledReplayQueue === formReplayingQueue &&
  24784. (lastScheduledReplayQueue = null);
  24785. for (var i = 0; i < formReplayingQueue.length; i += 3) {
  24786. var form = formReplayingQueue[i],
  24787. submitterOrAction = formReplayingQueue[i + 1],
  24788. formData = formReplayingQueue[i + 2];
  24789. if ("function" !== typeof submitterOrAction)
  24790. if (
  24791. null === findInstanceBlockingTarget(submitterOrAction || form)
  24792. )
  24793. continue;
  24794. else break;
  24795. var formInst = getInstanceFromNode(form);
  24796. null !== formInst &&
  24797. (formReplayingQueue.splice(i, 3),
  24798. (i -= 3),
  24799. (form = {
  24800. pending: true,
  24801. data: formData,
  24802. method: form.method,
  24803. action: submitterOrAction
  24804. }),
  24805. Object.freeze(form),
  24806. startHostTransition(
  24807. formInst,
  24808. form,
  24809. submitterOrAction,
  24810. formData
  24811. ));
  24812. }
  24813. }
  24814. ));
  24815. }
  24816. function retryIfBlockedOn(unblocked) {
  24817. function unblock(queuedEvent) {
  24818. return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
  24819. }
  24820. null !== queuedFocus &&
  24821. scheduleCallbackIfUnblocked(queuedFocus, unblocked);
  24822. null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);
  24823. null !== queuedMouse &&
  24824. scheduleCallbackIfUnblocked(queuedMouse, unblocked);
  24825. queuedPointers.forEach(unblock);
  24826. queuedPointerCaptures.forEach(unblock);
  24827. for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
  24828. var queuedTarget = queuedExplicitHydrationTargets[i];
  24829. queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
  24830. }
  24831. for (
  24832. ;
  24833. 0 < queuedExplicitHydrationTargets.length &&
  24834. ((i = queuedExplicitHydrationTargets[0]), null === i.blockedOn);
  24835. )
  24836. attemptExplicitHydrationTarget(i),
  24837. null === i.blockedOn && queuedExplicitHydrationTargets.shift();
  24838. i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;
  24839. if (null != i)
  24840. for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
  24841. var form = i[queuedTarget],
  24842. submitterOrAction = i[queuedTarget + 1],
  24843. formProps = form[internalPropsKey] || null;
  24844. if ("function" === typeof submitterOrAction)
  24845. formProps || scheduleReplayQueueIfNeeded(i);
  24846. else if (formProps) {
  24847. var action = null;
  24848. if (
  24849. submitterOrAction &&
  24850. submitterOrAction.hasAttribute("formAction")
  24851. )
  24852. if (
  24853. ((form = submitterOrAction),
  24854. (formProps = submitterOrAction[internalPropsKey] || null))
  24855. )
  24856. action = formProps.formAction;
  24857. else {
  24858. if (null !== findInstanceBlockingTarget(form)) continue;
  24859. }
  24860. else action = formProps.action;
  24861. "function" === typeof action
  24862. ? (i[queuedTarget + 1] = action)
  24863. : (i.splice(queuedTarget, 3), (queuedTarget -= 3));
  24864. scheduleReplayQueueIfNeeded(i);
  24865. }
  24866. }
  24867. }
  24868. function defaultOnDefaultTransitionIndicator() {
  24869. function handleNavigate(event) {
  24870. event.canIntercept &&
  24871. "react-transition" === event.info &&
  24872. event.intercept({
  24873. handler: function () {
  24874. return new Promise(function (resolve) {
  24875. return (pendingResolve = resolve);
  24876. });
  24877. },
  24878. focusReset: "manual",
  24879. scroll: "manual"
  24880. });
  24881. }
  24882. function handleNavigateComplete() {
  24883. null !== pendingResolve && (pendingResolve(), (pendingResolve = null));
  24884. isCancelled || setTimeout(startFakeNavigation, 20);
  24885. }
  24886. function startFakeNavigation() {
  24887. if (!isCancelled && !navigation.transition) {
  24888. var currentEntry = navigation.currentEntry;
  24889. currentEntry &&
  24890. null != currentEntry.url &&
  24891. navigation.navigate(currentEntry.url, {
  24892. state: currentEntry.getState(),
  24893. info: "react-transition",
  24894. history: "replace"
  24895. });
  24896. }
  24897. }
  24898. if ("object" === typeof navigation) {
  24899. var isCancelled = false,
  24900. pendingResolve = null;
  24901. navigation.addEventListener("navigate", handleNavigate);
  24902. navigation.addEventListener("navigatesuccess", handleNavigateComplete);
  24903. navigation.addEventListener("navigateerror", handleNavigateComplete);
  24904. setTimeout(startFakeNavigation, 100);
  24905. return function () {
  24906. isCancelled = true;
  24907. navigation.removeEventListener("navigate", handleNavigate);
  24908. navigation.removeEventListener(
  24909. "navigatesuccess",
  24910. handleNavigateComplete
  24911. );
  24912. navigation.removeEventListener(
  24913. "navigateerror",
  24914. handleNavigateComplete
  24915. );
  24916. null !== pendingResolve &&
  24917. (pendingResolve(), (pendingResolve = null));
  24918. };
  24919. }
  24920. }
  24921. function ReactDOMRoot(internalRoot) {
  24922. this._internalRoot = internalRoot;
  24923. }
  24924. function ReactDOMHydrationRoot(internalRoot) {
  24925. this._internalRoot = internalRoot;
  24926. }
  24927. function warnIfReactDOMContainerInDEV(container) {
  24928. container[internalContainerInstanceKey] &&
  24929. (container._reactRootContainer
  24930. ? console.error(
  24931. "You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."
  24932. )
  24933. : console.error(
  24934. "You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."
  24935. ));
  24936. }
  24937. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  24938. "function" ===
  24939. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
  24940. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
  24941. var Scheduler = requireScheduler(),
  24942. React = require$$0,
  24943. ReactDOM = requireReactDom(),
  24944. assign = Object.assign,
  24945. REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
  24946. REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
  24947. REACT_PORTAL_TYPE = Symbol.for("react.portal"),
  24948. REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
  24949. REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
  24950. REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
  24951. REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
  24952. REACT_CONTEXT_TYPE = Symbol.for("react.context"),
  24953. REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
  24954. REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
  24955. REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
  24956. REACT_MEMO_TYPE = Symbol.for("react.memo"),
  24957. REACT_LAZY_TYPE = Symbol.for("react.lazy");
  24958. var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
  24959. var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
  24960. var MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
  24961. REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
  24962. isArrayImpl = Array.isArray,
  24963. ReactSharedInternals =
  24964. React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  24965. ReactDOMSharedInternals =
  24966. ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  24967. NotPending = Object.freeze({
  24968. pending: false,
  24969. data: null,
  24970. method: null,
  24971. action: null
  24972. }),
  24973. valueStack = [];
  24974. var fiberStack = [];
  24975. var index$jscomp$0 = -1,
  24976. contextStackCursor = createCursor(null),
  24977. contextFiberStackCursor = createCursor(null),
  24978. rootInstanceStackCursor = createCursor(null),
  24979. hostTransitionProviderCursor = createCursor(null),
  24980. disabledDepth = 0,
  24981. prevLog,
  24982. prevInfo,
  24983. prevWarn,
  24984. prevError,
  24985. prevGroup,
  24986. prevGroupCollapsed,
  24987. prevGroupEnd;
  24988. disabledLog.__reactDisabledLog = true;
  24989. var prefix,
  24990. suffix,
  24991. reentry = false;
  24992. var componentFrameCache = new (
  24993. "function" === typeof WeakMap ? WeakMap : Map
  24994. )();
  24995. var current = null,
  24996. isRendering = false,
  24997. hasOwnProperty = Object.prototype.hasOwnProperty,
  24998. scheduleCallback$3 = Scheduler.unstable_scheduleCallback,
  24999. cancelCallback$1 = Scheduler.unstable_cancelCallback,
  25000. shouldYield = Scheduler.unstable_shouldYield,
  25001. requestPaint = Scheduler.unstable_requestPaint,
  25002. now$1 = Scheduler.unstable_now,
  25003. getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
  25004. ImmediatePriority = Scheduler.unstable_ImmediatePriority,
  25005. UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
  25006. NormalPriority$1 = Scheduler.unstable_NormalPriority,
  25007. LowPriority = Scheduler.unstable_LowPriority,
  25008. IdlePriority = Scheduler.unstable_IdlePriority,
  25009. log$1 = Scheduler.log,
  25010. unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,
  25011. rendererID = null,
  25012. injectedHook = null,
  25013. hasLoggedError = false,
  25014. isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__,
  25015. clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
  25016. log = Math.log,
  25017. LN2 = Math.LN2,
  25018. nextTransitionUpdateLane = 256,
  25019. nextTransitionDeferredLane = 262144,
  25020. nextRetryLane = 4194304,
  25021. DiscreteEventPriority = 2,
  25022. ContinuousEventPriority = 8,
  25023. DefaultEventPriority = 32,
  25024. IdleEventPriority = 268435456,
  25025. randomKey = Math.random().toString(36).slice(2),
  25026. internalInstanceKey = "__reactFiber$" + randomKey,
  25027. internalPropsKey = "__reactProps$" + randomKey,
  25028. internalContainerInstanceKey = "__reactContainer$" + randomKey,
  25029. internalEventHandlersKey = "__reactEvents$" + randomKey,
  25030. internalEventHandlerListenersKey = "__reactListeners$" + randomKey,
  25031. internalEventHandlesSetKey = "__reactHandles$" + randomKey,
  25032. internalRootNodeResourcesKey = "__reactResources$" + randomKey,
  25033. internalHoistableMarker = "__reactMarker$" + randomKey,
  25034. allNativeEvents = new Set(),
  25035. registrationNameDependencies = {},
  25036. possibleRegistrationNames = {},
  25037. hasReadOnlyValue = {
  25038. button: true,
  25039. checkbox: true,
  25040. image: true,
  25041. hidden: true,
  25042. radio: true,
  25043. reset: true,
  25044. submit: true
  25045. },
  25046. VALID_ATTRIBUTE_NAME_REGEX = RegExp(
  25047. "^[: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]*$"
  25048. ),
  25049. illegalAttributeNameCache = {},
  25050. validatedAttributeNameCache = {},
  25051. escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g,
  25052. didWarnValueDefaultValue$1 = false,
  25053. didWarnCheckedDefaultChecked = false,
  25054. didWarnSelectedSetOnOption = false,
  25055. didWarnInvalidChild = false,
  25056. didWarnInvalidInnerHTML = false;
  25057. var didWarnValueDefaultValue = false;
  25058. var valuePropNames = ["value", "defaultValue"],
  25059. didWarnValDefaultVal = false,
  25060. needsEscaping = /["'&<>\n\t]|^\s|\s$/,
  25061. specialTags =
  25062. "address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(
  25063. " "
  25064. ),
  25065. inScopeTags =
  25066. "applet caption html table td th marquee object template foreignObject desc title".split(
  25067. " "
  25068. ),
  25069. buttonScopeTags = inScopeTags.concat(["button"]),
  25070. impliedEndTags = "dd dt li option optgroup p rp rt".split(" "),
  25071. emptyAncestorInfoDev = {
  25072. current: null,
  25073. formTag: null,
  25074. aTagInScope: null,
  25075. buttonTagInScope: null,
  25076. nobrTagInScope: null,
  25077. pTagInButtonScope: null,
  25078. listItemTagAutoclosing: null,
  25079. dlItemTagAutoclosing: null,
  25080. containerTagInScope: null,
  25081. implicitRootScope: false
  25082. },
  25083. didWarn = {},
  25084. shorthandToLonghand = {
  25085. animation:
  25086. "animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(
  25087. " "
  25088. ),
  25089. background:
  25090. "backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(
  25091. " "
  25092. ),
  25093. backgroundPosition: ["backgroundPositionX", "backgroundPositionY"],
  25094. border:
  25095. "borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(
  25096. " "
  25097. ),
  25098. borderBlockEnd: [
  25099. "borderBlockEndColor",
  25100. "borderBlockEndStyle",
  25101. "borderBlockEndWidth"
  25102. ],
  25103. borderBlockStart: [
  25104. "borderBlockStartColor",
  25105. "borderBlockStartStyle",
  25106. "borderBlockStartWidth"
  25107. ],
  25108. borderBottom: [
  25109. "borderBottomColor",
  25110. "borderBottomStyle",
  25111. "borderBottomWidth"
  25112. ],
  25113. borderColor: [
  25114. "borderBottomColor",
  25115. "borderLeftColor",
  25116. "borderRightColor",
  25117. "borderTopColor"
  25118. ],
  25119. borderImage: [
  25120. "borderImageOutset",
  25121. "borderImageRepeat",
  25122. "borderImageSlice",
  25123. "borderImageSource",
  25124. "borderImageWidth"
  25125. ],
  25126. borderInlineEnd: [
  25127. "borderInlineEndColor",
  25128. "borderInlineEndStyle",
  25129. "borderInlineEndWidth"
  25130. ],
  25131. borderInlineStart: [
  25132. "borderInlineStartColor",
  25133. "borderInlineStartStyle",
  25134. "borderInlineStartWidth"
  25135. ],
  25136. borderLeft: ["borderLeftColor", "borderLeftStyle", "borderLeftWidth"],
  25137. borderRadius: [
  25138. "borderBottomLeftRadius",
  25139. "borderBottomRightRadius",
  25140. "borderTopLeftRadius",
  25141. "borderTopRightRadius"
  25142. ],
  25143. borderRight: [
  25144. "borderRightColor",
  25145. "borderRightStyle",
  25146. "borderRightWidth"
  25147. ],
  25148. borderStyle: [
  25149. "borderBottomStyle",
  25150. "borderLeftStyle",
  25151. "borderRightStyle",
  25152. "borderTopStyle"
  25153. ],
  25154. borderTop: ["borderTopColor", "borderTopStyle", "borderTopWidth"],
  25155. borderWidth: [
  25156. "borderBottomWidth",
  25157. "borderLeftWidth",
  25158. "borderRightWidth",
  25159. "borderTopWidth"
  25160. ],
  25161. columnRule: ["columnRuleColor", "columnRuleStyle", "columnRuleWidth"],
  25162. columns: ["columnCount", "columnWidth"],
  25163. flex: ["flexBasis", "flexGrow", "flexShrink"],
  25164. flexFlow: ["flexDirection", "flexWrap"],
  25165. font: "fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(
  25166. " "
  25167. ),
  25168. fontVariant:
  25169. "fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(
  25170. " "
  25171. ),
  25172. gap: ["columnGap", "rowGap"],
  25173. grid: "gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(
  25174. " "
  25175. ),
  25176. gridArea: [
  25177. "gridColumnEnd",
  25178. "gridColumnStart",
  25179. "gridRowEnd",
  25180. "gridRowStart"
  25181. ],
  25182. gridColumn: ["gridColumnEnd", "gridColumnStart"],
  25183. gridColumnGap: ["columnGap"],
  25184. gridGap: ["columnGap", "rowGap"],
  25185. gridRow: ["gridRowEnd", "gridRowStart"],
  25186. gridRowGap: ["rowGap"],
  25187. gridTemplate: [
  25188. "gridTemplateAreas",
  25189. "gridTemplateColumns",
  25190. "gridTemplateRows"
  25191. ],
  25192. listStyle: ["listStyleImage", "listStylePosition", "listStyleType"],
  25193. margin: ["marginBottom", "marginLeft", "marginRight", "marginTop"],
  25194. marker: ["markerEnd", "markerMid", "markerStart"],
  25195. mask: "maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(
  25196. " "
  25197. ),
  25198. maskPosition: ["maskPositionX", "maskPositionY"],
  25199. outline: ["outlineColor", "outlineStyle", "outlineWidth"],
  25200. overflow: ["overflowX", "overflowY"],
  25201. padding: ["paddingBottom", "paddingLeft", "paddingRight", "paddingTop"],
  25202. placeContent: ["alignContent", "justifyContent"],
  25203. placeItems: ["alignItems", "justifyItems"],
  25204. placeSelf: ["alignSelf", "justifySelf"],
  25205. textDecoration: [
  25206. "textDecorationColor",
  25207. "textDecorationLine",
  25208. "textDecorationStyle"
  25209. ],
  25210. textEmphasis: ["textEmphasisColor", "textEmphasisStyle"],
  25211. transition: [
  25212. "transitionDelay",
  25213. "transitionDuration",
  25214. "transitionProperty",
  25215. "transitionTimingFunction"
  25216. ],
  25217. wordWrap: ["overflowWrap"]
  25218. },
  25219. uppercasePattern = /([A-Z])/g,
  25220. msPattern$1 = /^ms-/,
  25221. badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/,
  25222. msPattern = /^-ms-/,
  25223. hyphenPattern = /-(.)/g,
  25224. badStyleValueWithSemicolonPattern = /;\s*$/,
  25225. warnedStyleNames = {},
  25226. warnedStyleValues = {},
  25227. warnedForNaNValue = false,
  25228. warnedForInfinityValue = false,
  25229. unitlessNumbers = new Set(
  25230. "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(
  25231. " "
  25232. )
  25233. ),
  25234. MATH_NAMESPACE = "http://www.w3.org/1998/Math/MathML",
  25235. SVG_NAMESPACE = "http://www.w3.org/2000/svg",
  25236. aliases = new Map([
  25237. ["acceptCharset", "accept-charset"],
  25238. ["htmlFor", "for"],
  25239. ["httpEquiv", "http-equiv"],
  25240. ["crossOrigin", "crossorigin"],
  25241. ["accentHeight", "accent-height"],
  25242. ["alignmentBaseline", "alignment-baseline"],
  25243. ["arabicForm", "arabic-form"],
  25244. ["baselineShift", "baseline-shift"],
  25245. ["capHeight", "cap-height"],
  25246. ["clipPath", "clip-path"],
  25247. ["clipRule", "clip-rule"],
  25248. ["colorInterpolation", "color-interpolation"],
  25249. ["colorInterpolationFilters", "color-interpolation-filters"],
  25250. ["colorProfile", "color-profile"],
  25251. ["colorRendering", "color-rendering"],
  25252. ["dominantBaseline", "dominant-baseline"],
  25253. ["enableBackground", "enable-background"],
  25254. ["fillOpacity", "fill-opacity"],
  25255. ["fillRule", "fill-rule"],
  25256. ["floodColor", "flood-color"],
  25257. ["floodOpacity", "flood-opacity"],
  25258. ["fontFamily", "font-family"],
  25259. ["fontSize", "font-size"],
  25260. ["fontSizeAdjust", "font-size-adjust"],
  25261. ["fontStretch", "font-stretch"],
  25262. ["fontStyle", "font-style"],
  25263. ["fontVariant", "font-variant"],
  25264. ["fontWeight", "font-weight"],
  25265. ["glyphName", "glyph-name"],
  25266. ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
  25267. ["glyphOrientationVertical", "glyph-orientation-vertical"],
  25268. ["horizAdvX", "horiz-adv-x"],
  25269. ["horizOriginX", "horiz-origin-x"],
  25270. ["imageRendering", "image-rendering"],
  25271. ["letterSpacing", "letter-spacing"],
  25272. ["lightingColor", "lighting-color"],
  25273. ["markerEnd", "marker-end"],
  25274. ["markerMid", "marker-mid"],
  25275. ["markerStart", "marker-start"],
  25276. ["overlinePosition", "overline-position"],
  25277. ["overlineThickness", "overline-thickness"],
  25278. ["paintOrder", "paint-order"],
  25279. ["panose-1", "panose-1"],
  25280. ["pointerEvents", "pointer-events"],
  25281. ["renderingIntent", "rendering-intent"],
  25282. ["shapeRendering", "shape-rendering"],
  25283. ["stopColor", "stop-color"],
  25284. ["stopOpacity", "stop-opacity"],
  25285. ["strikethroughPosition", "strikethrough-position"],
  25286. ["strikethroughThickness", "strikethrough-thickness"],
  25287. ["strokeDasharray", "stroke-dasharray"],
  25288. ["strokeDashoffset", "stroke-dashoffset"],
  25289. ["strokeLinecap", "stroke-linecap"],
  25290. ["strokeLinejoin", "stroke-linejoin"],
  25291. ["strokeMiterlimit", "stroke-miterlimit"],
  25292. ["strokeOpacity", "stroke-opacity"],
  25293. ["strokeWidth", "stroke-width"],
  25294. ["textAnchor", "text-anchor"],
  25295. ["textDecoration", "text-decoration"],
  25296. ["textRendering", "text-rendering"],
  25297. ["transformOrigin", "transform-origin"],
  25298. ["underlinePosition", "underline-position"],
  25299. ["underlineThickness", "underline-thickness"],
  25300. ["unicodeBidi", "unicode-bidi"],
  25301. ["unicodeRange", "unicode-range"],
  25302. ["unitsPerEm", "units-per-em"],
  25303. ["vAlphabetic", "v-alphabetic"],
  25304. ["vHanging", "v-hanging"],
  25305. ["vIdeographic", "v-ideographic"],
  25306. ["vMathematical", "v-mathematical"],
  25307. ["vectorEffect", "vector-effect"],
  25308. ["vertAdvY", "vert-adv-y"],
  25309. ["vertOriginX", "vert-origin-x"],
  25310. ["vertOriginY", "vert-origin-y"],
  25311. ["wordSpacing", "word-spacing"],
  25312. ["writingMode", "writing-mode"],
  25313. ["xmlnsXlink", "xmlns:xlink"],
  25314. ["xHeight", "x-height"]
  25315. ]),
  25316. possibleStandardNames = {
  25317. accept: "accept",
  25318. acceptcharset: "acceptCharset",
  25319. "accept-charset": "acceptCharset",
  25320. accesskey: "accessKey",
  25321. action: "action",
  25322. allowfullscreen: "allowFullScreen",
  25323. alt: "alt",
  25324. as: "as",
  25325. async: "async",
  25326. autocapitalize: "autoCapitalize",
  25327. autocomplete: "autoComplete",
  25328. autocorrect: "autoCorrect",
  25329. autofocus: "autoFocus",
  25330. autoplay: "autoPlay",
  25331. autosave: "autoSave",
  25332. capture: "capture",
  25333. cellpadding: "cellPadding",
  25334. cellspacing: "cellSpacing",
  25335. challenge: "challenge",
  25336. charset: "charSet",
  25337. checked: "checked",
  25338. children: "children",
  25339. cite: "cite",
  25340. class: "className",
  25341. classid: "classID",
  25342. classname: "className",
  25343. cols: "cols",
  25344. colspan: "colSpan",
  25345. content: "content",
  25346. contenteditable: "contentEditable",
  25347. contextmenu: "contextMenu",
  25348. controls: "controls",
  25349. controlslist: "controlsList",
  25350. coords: "coords",
  25351. crossorigin: "crossOrigin",
  25352. dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
  25353. data: "data",
  25354. datetime: "dateTime",
  25355. default: "default",
  25356. defaultchecked: "defaultChecked",
  25357. defaultvalue: "defaultValue",
  25358. defer: "defer",
  25359. dir: "dir",
  25360. disabled: "disabled",
  25361. disablepictureinpicture: "disablePictureInPicture",
  25362. disableremoteplayback: "disableRemotePlayback",
  25363. download: "download",
  25364. draggable: "draggable",
  25365. enctype: "encType",
  25366. enterkeyhint: "enterKeyHint",
  25367. fetchpriority: "fetchPriority",
  25368. for: "htmlFor",
  25369. form: "form",
  25370. formmethod: "formMethod",
  25371. formaction: "formAction",
  25372. formenctype: "formEncType",
  25373. formnovalidate: "formNoValidate",
  25374. formtarget: "formTarget",
  25375. frameborder: "frameBorder",
  25376. headers: "headers",
  25377. height: "height",
  25378. hidden: "hidden",
  25379. high: "high",
  25380. href: "href",
  25381. hreflang: "hrefLang",
  25382. htmlfor: "htmlFor",
  25383. httpequiv: "httpEquiv",
  25384. "http-equiv": "httpEquiv",
  25385. icon: "icon",
  25386. id: "id",
  25387. imagesizes: "imageSizes",
  25388. imagesrcset: "imageSrcSet",
  25389. inert: "inert",
  25390. innerhtml: "innerHTML",
  25391. inputmode: "inputMode",
  25392. integrity: "integrity",
  25393. is: "is",
  25394. itemid: "itemID",
  25395. itemprop: "itemProp",
  25396. itemref: "itemRef",
  25397. itemscope: "itemScope",
  25398. itemtype: "itemType",
  25399. keyparams: "keyParams",
  25400. keytype: "keyType",
  25401. kind: "kind",
  25402. label: "label",
  25403. lang: "lang",
  25404. list: "list",
  25405. loop: "loop",
  25406. low: "low",
  25407. manifest: "manifest",
  25408. marginwidth: "marginWidth",
  25409. marginheight: "marginHeight",
  25410. max: "max",
  25411. maxlength: "maxLength",
  25412. media: "media",
  25413. mediagroup: "mediaGroup",
  25414. method: "method",
  25415. min: "min",
  25416. minlength: "minLength",
  25417. multiple: "multiple",
  25418. muted: "muted",
  25419. name: "name",
  25420. nomodule: "noModule",
  25421. nonce: "nonce",
  25422. novalidate: "noValidate",
  25423. open: "open",
  25424. optimum: "optimum",
  25425. pattern: "pattern",
  25426. placeholder: "placeholder",
  25427. playsinline: "playsInline",
  25428. poster: "poster",
  25429. preload: "preload",
  25430. profile: "profile",
  25431. radiogroup: "radioGroup",
  25432. readonly: "readOnly",
  25433. referrerpolicy: "referrerPolicy",
  25434. rel: "rel",
  25435. required: "required",
  25436. reversed: "reversed",
  25437. role: "role",
  25438. rows: "rows",
  25439. rowspan: "rowSpan",
  25440. sandbox: "sandbox",
  25441. scope: "scope",
  25442. scoped: "scoped",
  25443. scrolling: "scrolling",
  25444. seamless: "seamless",
  25445. selected: "selected",
  25446. shape: "shape",
  25447. size: "size",
  25448. sizes: "sizes",
  25449. span: "span",
  25450. spellcheck: "spellCheck",
  25451. src: "src",
  25452. srcdoc: "srcDoc",
  25453. srclang: "srcLang",
  25454. srcset: "srcSet",
  25455. start: "start",
  25456. step: "step",
  25457. style: "style",
  25458. summary: "summary",
  25459. tabindex: "tabIndex",
  25460. target: "target",
  25461. title: "title",
  25462. type: "type",
  25463. usemap: "useMap",
  25464. value: "value",
  25465. width: "width",
  25466. wmode: "wmode",
  25467. wrap: "wrap",
  25468. about: "about",
  25469. accentheight: "accentHeight",
  25470. "accent-height": "accentHeight",
  25471. accumulate: "accumulate",
  25472. additive: "additive",
  25473. alignmentbaseline: "alignmentBaseline",
  25474. "alignment-baseline": "alignmentBaseline",
  25475. allowreorder: "allowReorder",
  25476. alphabetic: "alphabetic",
  25477. amplitude: "amplitude",
  25478. arabicform: "arabicForm",
  25479. "arabic-form": "arabicForm",
  25480. ascent: "ascent",
  25481. attributename: "attributeName",
  25482. attributetype: "attributeType",
  25483. autoreverse: "autoReverse",
  25484. azimuth: "azimuth",
  25485. basefrequency: "baseFrequency",
  25486. baselineshift: "baselineShift",
  25487. "baseline-shift": "baselineShift",
  25488. baseprofile: "baseProfile",
  25489. bbox: "bbox",
  25490. begin: "begin",
  25491. bias: "bias",
  25492. by: "by",
  25493. calcmode: "calcMode",
  25494. capheight: "capHeight",
  25495. "cap-height": "capHeight",
  25496. clip: "clip",
  25497. clippath: "clipPath",
  25498. "clip-path": "clipPath",
  25499. clippathunits: "clipPathUnits",
  25500. cliprule: "clipRule",
  25501. "clip-rule": "clipRule",
  25502. color: "color",
  25503. colorinterpolation: "colorInterpolation",
  25504. "color-interpolation": "colorInterpolation",
  25505. colorinterpolationfilters: "colorInterpolationFilters",
  25506. "color-interpolation-filters": "colorInterpolationFilters",
  25507. colorprofile: "colorProfile",
  25508. "color-profile": "colorProfile",
  25509. colorrendering: "colorRendering",
  25510. "color-rendering": "colorRendering",
  25511. contentscripttype: "contentScriptType",
  25512. contentstyletype: "contentStyleType",
  25513. cursor: "cursor",
  25514. cx: "cx",
  25515. cy: "cy",
  25516. d: "d",
  25517. datatype: "datatype",
  25518. decelerate: "decelerate",
  25519. descent: "descent",
  25520. diffuseconstant: "diffuseConstant",
  25521. direction: "direction",
  25522. display: "display",
  25523. divisor: "divisor",
  25524. dominantbaseline: "dominantBaseline",
  25525. "dominant-baseline": "dominantBaseline",
  25526. dur: "dur",
  25527. dx: "dx",
  25528. dy: "dy",
  25529. edgemode: "edgeMode",
  25530. elevation: "elevation",
  25531. enablebackground: "enableBackground",
  25532. "enable-background": "enableBackground",
  25533. end: "end",
  25534. exponent: "exponent",
  25535. externalresourcesrequired: "externalResourcesRequired",
  25536. fill: "fill",
  25537. fillopacity: "fillOpacity",
  25538. "fill-opacity": "fillOpacity",
  25539. fillrule: "fillRule",
  25540. "fill-rule": "fillRule",
  25541. filter: "filter",
  25542. filterres: "filterRes",
  25543. filterunits: "filterUnits",
  25544. floodopacity: "floodOpacity",
  25545. "flood-opacity": "floodOpacity",
  25546. floodcolor: "floodColor",
  25547. "flood-color": "floodColor",
  25548. focusable: "focusable",
  25549. fontfamily: "fontFamily",
  25550. "font-family": "fontFamily",
  25551. fontsize: "fontSize",
  25552. "font-size": "fontSize",
  25553. fontsizeadjust: "fontSizeAdjust",
  25554. "font-size-adjust": "fontSizeAdjust",
  25555. fontstretch: "fontStretch",
  25556. "font-stretch": "fontStretch",
  25557. fontstyle: "fontStyle",
  25558. "font-style": "fontStyle",
  25559. fontvariant: "fontVariant",
  25560. "font-variant": "fontVariant",
  25561. fontweight: "fontWeight",
  25562. "font-weight": "fontWeight",
  25563. format: "format",
  25564. from: "from",
  25565. fx: "fx",
  25566. fy: "fy",
  25567. g1: "g1",
  25568. g2: "g2",
  25569. glyphname: "glyphName",
  25570. "glyph-name": "glyphName",
  25571. glyphorientationhorizontal: "glyphOrientationHorizontal",
  25572. "glyph-orientation-horizontal": "glyphOrientationHorizontal",
  25573. glyphorientationvertical: "glyphOrientationVertical",
  25574. "glyph-orientation-vertical": "glyphOrientationVertical",
  25575. glyphref: "glyphRef",
  25576. gradienttransform: "gradientTransform",
  25577. gradientunits: "gradientUnits",
  25578. hanging: "hanging",
  25579. horizadvx: "horizAdvX",
  25580. "horiz-adv-x": "horizAdvX",
  25581. horizoriginx: "horizOriginX",
  25582. "horiz-origin-x": "horizOriginX",
  25583. ideographic: "ideographic",
  25584. imagerendering: "imageRendering",
  25585. "image-rendering": "imageRendering",
  25586. in2: "in2",
  25587. in: "in",
  25588. inlist: "inlist",
  25589. intercept: "intercept",
  25590. k1: "k1",
  25591. k2: "k2",
  25592. k3: "k3",
  25593. k4: "k4",
  25594. k: "k",
  25595. kernelmatrix: "kernelMatrix",
  25596. kernelunitlength: "kernelUnitLength",
  25597. kerning: "kerning",
  25598. keypoints: "keyPoints",
  25599. keysplines: "keySplines",
  25600. keytimes: "keyTimes",
  25601. lengthadjust: "lengthAdjust",
  25602. letterspacing: "letterSpacing",
  25603. "letter-spacing": "letterSpacing",
  25604. lightingcolor: "lightingColor",
  25605. "lighting-color": "lightingColor",
  25606. limitingconeangle: "limitingConeAngle",
  25607. local: "local",
  25608. markerend: "markerEnd",
  25609. "marker-end": "markerEnd",
  25610. markerheight: "markerHeight",
  25611. markermid: "markerMid",
  25612. "marker-mid": "markerMid",
  25613. markerstart: "markerStart",
  25614. "marker-start": "markerStart",
  25615. markerunits: "markerUnits",
  25616. markerwidth: "markerWidth",
  25617. mask: "mask",
  25618. maskcontentunits: "maskContentUnits",
  25619. maskunits: "maskUnits",
  25620. mathematical: "mathematical",
  25621. mode: "mode",
  25622. numoctaves: "numOctaves",
  25623. offset: "offset",
  25624. opacity: "opacity",
  25625. operator: "operator",
  25626. order: "order",
  25627. orient: "orient",
  25628. orientation: "orientation",
  25629. origin: "origin",
  25630. overflow: "overflow",
  25631. overlineposition: "overlinePosition",
  25632. "overline-position": "overlinePosition",
  25633. overlinethickness: "overlineThickness",
  25634. "overline-thickness": "overlineThickness",
  25635. paintorder: "paintOrder",
  25636. "paint-order": "paintOrder",
  25637. panose1: "panose1",
  25638. "panose-1": "panose1",
  25639. pathlength: "pathLength",
  25640. patterncontentunits: "patternContentUnits",
  25641. patterntransform: "patternTransform",
  25642. patternunits: "patternUnits",
  25643. pointerevents: "pointerEvents",
  25644. "pointer-events": "pointerEvents",
  25645. points: "points",
  25646. pointsatx: "pointsAtX",
  25647. pointsaty: "pointsAtY",
  25648. pointsatz: "pointsAtZ",
  25649. popover: "popover",
  25650. popovertarget: "popoverTarget",
  25651. popovertargetaction: "popoverTargetAction",
  25652. prefix: "prefix",
  25653. preservealpha: "preserveAlpha",
  25654. preserveaspectratio: "preserveAspectRatio",
  25655. primitiveunits: "primitiveUnits",
  25656. property: "property",
  25657. r: "r",
  25658. radius: "radius",
  25659. refx: "refX",
  25660. refy: "refY",
  25661. renderingintent: "renderingIntent",
  25662. "rendering-intent": "renderingIntent",
  25663. repeatcount: "repeatCount",
  25664. repeatdur: "repeatDur",
  25665. requiredextensions: "requiredExtensions",
  25666. requiredfeatures: "requiredFeatures",
  25667. resource: "resource",
  25668. restart: "restart",
  25669. result: "result",
  25670. results: "results",
  25671. rotate: "rotate",
  25672. rx: "rx",
  25673. ry: "ry",
  25674. scale: "scale",
  25675. security: "security",
  25676. seed: "seed",
  25677. shaperendering: "shapeRendering",
  25678. "shape-rendering": "shapeRendering",
  25679. slope: "slope",
  25680. spacing: "spacing",
  25681. specularconstant: "specularConstant",
  25682. specularexponent: "specularExponent",
  25683. speed: "speed",
  25684. spreadmethod: "spreadMethod",
  25685. startoffset: "startOffset",
  25686. stddeviation: "stdDeviation",
  25687. stemh: "stemh",
  25688. stemv: "stemv",
  25689. stitchtiles: "stitchTiles",
  25690. stopcolor: "stopColor",
  25691. "stop-color": "stopColor",
  25692. stopopacity: "stopOpacity",
  25693. "stop-opacity": "stopOpacity",
  25694. strikethroughposition: "strikethroughPosition",
  25695. "strikethrough-position": "strikethroughPosition",
  25696. strikethroughthickness: "strikethroughThickness",
  25697. "strikethrough-thickness": "strikethroughThickness",
  25698. string: "string",
  25699. stroke: "stroke",
  25700. strokedasharray: "strokeDasharray",
  25701. "stroke-dasharray": "strokeDasharray",
  25702. strokedashoffset: "strokeDashoffset",
  25703. "stroke-dashoffset": "strokeDashoffset",
  25704. strokelinecap: "strokeLinecap",
  25705. "stroke-linecap": "strokeLinecap",
  25706. strokelinejoin: "strokeLinejoin",
  25707. "stroke-linejoin": "strokeLinejoin",
  25708. strokemiterlimit: "strokeMiterlimit",
  25709. "stroke-miterlimit": "strokeMiterlimit",
  25710. strokewidth: "strokeWidth",
  25711. "stroke-width": "strokeWidth",
  25712. strokeopacity: "strokeOpacity",
  25713. "stroke-opacity": "strokeOpacity",
  25714. suppresscontenteditablewarning: "suppressContentEditableWarning",
  25715. suppresshydrationwarning: "suppressHydrationWarning",
  25716. surfacescale: "surfaceScale",
  25717. systemlanguage: "systemLanguage",
  25718. tablevalues: "tableValues",
  25719. targetx: "targetX",
  25720. targety: "targetY",
  25721. textanchor: "textAnchor",
  25722. "text-anchor": "textAnchor",
  25723. textdecoration: "textDecoration",
  25724. "text-decoration": "textDecoration",
  25725. textlength: "textLength",
  25726. textrendering: "textRendering",
  25727. "text-rendering": "textRendering",
  25728. to: "to",
  25729. transform: "transform",
  25730. transformorigin: "transformOrigin",
  25731. "transform-origin": "transformOrigin",
  25732. typeof: "typeof",
  25733. u1: "u1",
  25734. u2: "u2",
  25735. underlineposition: "underlinePosition",
  25736. "underline-position": "underlinePosition",
  25737. underlinethickness: "underlineThickness",
  25738. "underline-thickness": "underlineThickness",
  25739. unicode: "unicode",
  25740. unicodebidi: "unicodeBidi",
  25741. "unicode-bidi": "unicodeBidi",
  25742. unicoderange: "unicodeRange",
  25743. "unicode-range": "unicodeRange",
  25744. unitsperem: "unitsPerEm",
  25745. "units-per-em": "unitsPerEm",
  25746. unselectable: "unselectable",
  25747. valphabetic: "vAlphabetic",
  25748. "v-alphabetic": "vAlphabetic",
  25749. values: "values",
  25750. vectoreffect: "vectorEffect",
  25751. "vector-effect": "vectorEffect",
  25752. version: "version",
  25753. vertadvy: "vertAdvY",
  25754. "vert-adv-y": "vertAdvY",
  25755. vertoriginx: "vertOriginX",
  25756. "vert-origin-x": "vertOriginX",
  25757. vertoriginy: "vertOriginY",
  25758. "vert-origin-y": "vertOriginY",
  25759. vhanging: "vHanging",
  25760. "v-hanging": "vHanging",
  25761. videographic: "vIdeographic",
  25762. "v-ideographic": "vIdeographic",
  25763. viewbox: "viewBox",
  25764. viewtarget: "viewTarget",
  25765. visibility: "visibility",
  25766. vmathematical: "vMathematical",
  25767. "v-mathematical": "vMathematical",
  25768. vocab: "vocab",
  25769. widths: "widths",
  25770. wordspacing: "wordSpacing",
  25771. "word-spacing": "wordSpacing",
  25772. writingmode: "writingMode",
  25773. "writing-mode": "writingMode",
  25774. x1: "x1",
  25775. x2: "x2",
  25776. x: "x",
  25777. xchannelselector: "xChannelSelector",
  25778. xheight: "xHeight",
  25779. "x-height": "xHeight",
  25780. xlinkactuate: "xlinkActuate",
  25781. "xlink:actuate": "xlinkActuate",
  25782. xlinkarcrole: "xlinkArcrole",
  25783. "xlink:arcrole": "xlinkArcrole",
  25784. xlinkhref: "xlinkHref",
  25785. "xlink:href": "xlinkHref",
  25786. xlinkrole: "xlinkRole",
  25787. "xlink:role": "xlinkRole",
  25788. xlinkshow: "xlinkShow",
  25789. "xlink:show": "xlinkShow",
  25790. xlinktitle: "xlinkTitle",
  25791. "xlink:title": "xlinkTitle",
  25792. xlinktype: "xlinkType",
  25793. "xlink:type": "xlinkType",
  25794. xmlbase: "xmlBase",
  25795. "xml:base": "xmlBase",
  25796. xmllang: "xmlLang",
  25797. "xml:lang": "xmlLang",
  25798. xmlns: "xmlns",
  25799. "xml:space": "xmlSpace",
  25800. xmlnsxlink: "xmlnsXlink",
  25801. "xmlns:xlink": "xmlnsXlink",
  25802. xmlspace: "xmlSpace",
  25803. y1: "y1",
  25804. y2: "y2",
  25805. y: "y",
  25806. ychannelselector: "yChannelSelector",
  25807. z: "z",
  25808. zoomandpan: "zoomAndPan"
  25809. },
  25810. ariaProperties = {
  25811. "aria-current": 0,
  25812. "aria-description": 0,
  25813. "aria-details": 0,
  25814. "aria-disabled": 0,
  25815. "aria-hidden": 0,
  25816. "aria-invalid": 0,
  25817. "aria-keyshortcuts": 0,
  25818. "aria-label": 0,
  25819. "aria-roledescription": 0,
  25820. "aria-autocomplete": 0,
  25821. "aria-checked": 0,
  25822. "aria-expanded": 0,
  25823. "aria-haspopup": 0,
  25824. "aria-level": 0,
  25825. "aria-modal": 0,
  25826. "aria-multiline": 0,
  25827. "aria-multiselectable": 0,
  25828. "aria-orientation": 0,
  25829. "aria-placeholder": 0,
  25830. "aria-pressed": 0,
  25831. "aria-readonly": 0,
  25832. "aria-required": 0,
  25833. "aria-selected": 0,
  25834. "aria-sort": 0,
  25835. "aria-valuemax": 0,
  25836. "aria-valuemin": 0,
  25837. "aria-valuenow": 0,
  25838. "aria-valuetext": 0,
  25839. "aria-atomic": 0,
  25840. "aria-busy": 0,
  25841. "aria-live": 0,
  25842. "aria-relevant": 0,
  25843. "aria-dropeffect": 0,
  25844. "aria-grabbed": 0,
  25845. "aria-activedescendant": 0,
  25846. "aria-colcount": 0,
  25847. "aria-colindex": 0,
  25848. "aria-colspan": 0,
  25849. "aria-controls": 0,
  25850. "aria-describedby": 0,
  25851. "aria-errormessage": 0,
  25852. "aria-flowto": 0,
  25853. "aria-labelledby": 0,
  25854. "aria-owns": 0,
  25855. "aria-posinset": 0,
  25856. "aria-rowcount": 0,
  25857. "aria-rowindex": 0,
  25858. "aria-rowspan": 0,
  25859. "aria-setsize": 0,
  25860. "aria-braillelabel": 0,
  25861. "aria-brailleroledescription": 0,
  25862. "aria-colindextext": 0,
  25863. "aria-rowindextext": 0
  25864. },
  25865. warnedProperties$1 = {},
  25866. rARIA$1 = RegExp(
  25867. "^(aria)-[: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]*$"
  25868. ),
  25869. rARIACamel$1 = RegExp(
  25870. "^(aria)[A-Z][: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]*$"
  25871. ),
  25872. didWarnValueNull = false,
  25873. warnedProperties = {},
  25874. EVENT_NAME_REGEX = /^on./,
  25875. INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/,
  25876. rARIA = RegExp(
  25877. "^(aria)-[: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]*$"
  25878. ),
  25879. rARIACamel = RegExp(
  25880. "^(aria)[A-Z][: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]*$"
  25881. ),
  25882. isJavaScriptProtocol =
  25883. /^[\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,
  25884. currentReplayingEvent = null,
  25885. restoreTarget = null,
  25886. restoreQueue = null,
  25887. isInsideEventHandler = false,
  25888. canUseDOM = !(
  25889. "undefined" === typeof window ||
  25890. "undefined" === typeof window.document ||
  25891. "undefined" === typeof window.document.createElement
  25892. ),
  25893. passiveBrowserEventsSupported = false;
  25894. if (canUseDOM)
  25895. try {
  25896. var options$jscomp$0 = {};
  25897. Object.defineProperty(options$jscomp$0, "passive", {
  25898. get: function () {
  25899. passiveBrowserEventsSupported = !0;
  25900. }
  25901. });
  25902. window.addEventListener("test", options$jscomp$0, options$jscomp$0);
  25903. window.removeEventListener("test", options$jscomp$0, options$jscomp$0);
  25904. } catch (e) {
  25905. passiveBrowserEventsSupported = false;
  25906. }
  25907. var root = null,
  25908. startText = null,
  25909. fallbackText = null,
  25910. EventInterface = {
  25911. eventPhase: 0,
  25912. bubbles: 0,
  25913. cancelable: 0,
  25914. timeStamp: function (event) {
  25915. return event.timeStamp || Date.now();
  25916. },
  25917. defaultPrevented: 0,
  25918. isTrusted: 0
  25919. },
  25920. SyntheticEvent = createSyntheticEvent(EventInterface),
  25921. UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }),
  25922. SyntheticUIEvent = createSyntheticEvent(UIEventInterface),
  25923. lastMovementX,
  25924. lastMovementY,
  25925. lastMouseEvent,
  25926. MouseEventInterface = assign({}, UIEventInterface, {
  25927. screenX: 0,
  25928. screenY: 0,
  25929. clientX: 0,
  25930. clientY: 0,
  25931. pageX: 0,
  25932. pageY: 0,
  25933. ctrlKey: 0,
  25934. shiftKey: 0,
  25935. altKey: 0,
  25936. metaKey: 0,
  25937. getModifierState: getEventModifierState,
  25938. button: 0,
  25939. buttons: 0,
  25940. relatedTarget: function (event) {
  25941. return void 0 === event.relatedTarget
  25942. ? event.fromElement === event.srcElement
  25943. ? event.toElement
  25944. : event.fromElement
  25945. : event.relatedTarget;
  25946. },
  25947. movementX: function (event) {
  25948. if ("movementX" in event) return event.movementX;
  25949. event !== lastMouseEvent &&
  25950. (lastMouseEvent && "mousemove" === event.type
  25951. ? ((lastMovementX = event.screenX - lastMouseEvent.screenX),
  25952. (lastMovementY = event.screenY - lastMouseEvent.screenY))
  25953. : (lastMovementY = lastMovementX = 0),
  25954. (lastMouseEvent = event));
  25955. return lastMovementX;
  25956. },
  25957. movementY: function (event) {
  25958. return "movementY" in event ? event.movementY : lastMovementY;
  25959. }
  25960. }),
  25961. SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface),
  25962. DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }),
  25963. SyntheticDragEvent = createSyntheticEvent(DragEventInterface),
  25964. FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }),
  25965. SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface),
  25966. AnimationEventInterface = assign({}, EventInterface, {
  25967. animationName: 0,
  25968. elapsedTime: 0,
  25969. pseudoElement: 0
  25970. }),
  25971. SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface),
  25972. ClipboardEventInterface = assign({}, EventInterface, {
  25973. clipboardData: function (event) {
  25974. return "clipboardData" in event
  25975. ? event.clipboardData
  25976. : window.clipboardData;
  25977. }
  25978. }),
  25979. SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface),
  25980. CompositionEventInterface = assign({}, EventInterface, { data: 0 }),
  25981. SyntheticCompositionEvent = createSyntheticEvent(
  25982. CompositionEventInterface
  25983. ),
  25984. SyntheticInputEvent = SyntheticCompositionEvent,
  25985. normalizeKey = {
  25986. Esc: "Escape",
  25987. Spacebar: " ",
  25988. Left: "ArrowLeft",
  25989. Up: "ArrowUp",
  25990. Right: "ArrowRight",
  25991. Down: "ArrowDown",
  25992. Del: "Delete",
  25993. Win: "OS",
  25994. Menu: "ContextMenu",
  25995. Apps: "ContextMenu",
  25996. Scroll: "ScrollLock",
  25997. MozPrintableKey: "Unidentified"
  25998. },
  25999. translateToKey = {
  26000. 8: "Backspace",
  26001. 9: "Tab",
  26002. 12: "Clear",
  26003. 13: "Enter",
  26004. 16: "Shift",
  26005. 17: "Control",
  26006. 18: "Alt",
  26007. 19: "Pause",
  26008. 20: "CapsLock",
  26009. 27: "Escape",
  26010. 32: " ",
  26011. 33: "PageUp",
  26012. 34: "PageDown",
  26013. 35: "End",
  26014. 36: "Home",
  26015. 37: "ArrowLeft",
  26016. 38: "ArrowUp",
  26017. 39: "ArrowRight",
  26018. 40: "ArrowDown",
  26019. 45: "Insert",
  26020. 46: "Delete",
  26021. 112: "F1",
  26022. 113: "F2",
  26023. 114: "F3",
  26024. 115: "F4",
  26025. 116: "F5",
  26026. 117: "F6",
  26027. 118: "F7",
  26028. 119: "F8",
  26029. 120: "F9",
  26030. 121: "F10",
  26031. 122: "F11",
  26032. 123: "F12",
  26033. 144: "NumLock",
  26034. 145: "ScrollLock",
  26035. 224: "Meta"
  26036. },
  26037. modifierKeyToProp = {
  26038. Alt: "altKey",
  26039. Control: "ctrlKey",
  26040. Meta: "metaKey",
  26041. Shift: "shiftKey"
  26042. },
  26043. KeyboardEventInterface = assign({}, UIEventInterface, {
  26044. key: function (nativeEvent) {
  26045. if (nativeEvent.key) {
  26046. var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
  26047. if ("Unidentified" !== key) return key;
  26048. }
  26049. return "keypress" === nativeEvent.type
  26050. ? ((nativeEvent = getEventCharCode(nativeEvent)),
  26051. 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent))
  26052. : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type
  26053. ? translateToKey[nativeEvent.keyCode] || "Unidentified"
  26054. : "";
  26055. },
  26056. code: 0,
  26057. location: 0,
  26058. ctrlKey: 0,
  26059. shiftKey: 0,
  26060. altKey: 0,
  26061. metaKey: 0,
  26062. repeat: 0,
  26063. locale: 0,
  26064. getModifierState: getEventModifierState,
  26065. charCode: function (event) {
  26066. return "keypress" === event.type ? getEventCharCode(event) : 0;
  26067. },
  26068. keyCode: function (event) {
  26069. return "keydown" === event.type || "keyup" === event.type
  26070. ? event.keyCode
  26071. : 0;
  26072. },
  26073. which: function (event) {
  26074. return "keypress" === event.type
  26075. ? getEventCharCode(event)
  26076. : "keydown" === event.type || "keyup" === event.type
  26077. ? event.keyCode
  26078. : 0;
  26079. }
  26080. }),
  26081. SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface),
  26082. PointerEventInterface = assign({}, MouseEventInterface, {
  26083. pointerId: 0,
  26084. width: 0,
  26085. height: 0,
  26086. pressure: 0,
  26087. tangentialPressure: 0,
  26088. tiltX: 0,
  26089. tiltY: 0,
  26090. twist: 0,
  26091. pointerType: 0,
  26092. isPrimary: 0
  26093. }),
  26094. SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface),
  26095. TouchEventInterface = assign({}, UIEventInterface, {
  26096. touches: 0,
  26097. targetTouches: 0,
  26098. changedTouches: 0,
  26099. altKey: 0,
  26100. metaKey: 0,
  26101. ctrlKey: 0,
  26102. shiftKey: 0,
  26103. getModifierState: getEventModifierState
  26104. }),
  26105. SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface),
  26106. TransitionEventInterface = assign({}, EventInterface, {
  26107. propertyName: 0,
  26108. elapsedTime: 0,
  26109. pseudoElement: 0
  26110. }),
  26111. SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface),
  26112. WheelEventInterface = assign({}, MouseEventInterface, {
  26113. deltaX: function (event) {
  26114. return "deltaX" in event
  26115. ? event.deltaX
  26116. : "wheelDeltaX" in event
  26117. ? -event.wheelDeltaX
  26118. : 0;
  26119. },
  26120. deltaY: function (event) {
  26121. return "deltaY" in event
  26122. ? event.deltaY
  26123. : "wheelDeltaY" in event
  26124. ? -event.wheelDeltaY
  26125. : "wheelDelta" in event
  26126. ? -event.wheelDelta
  26127. : 0;
  26128. },
  26129. deltaZ: 0,
  26130. deltaMode: 0
  26131. }),
  26132. SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface),
  26133. ToggleEventInterface = assign({}, EventInterface, {
  26134. newState: 0,
  26135. oldState: 0
  26136. }),
  26137. SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface),
  26138. END_KEYCODES = [9, 13, 27, 32],
  26139. START_KEYCODE = 229,
  26140. canUseCompositionEvent = canUseDOM && "CompositionEvent" in window,
  26141. documentMode = null;
  26142. canUseDOM &&
  26143. "documentMode" in document &&
  26144. (documentMode = document.documentMode);
  26145. var canUseTextInputEvent =
  26146. canUseDOM && "TextEvent" in window && !documentMode,
  26147. useFallbackCompositionData =
  26148. canUseDOM &&
  26149. (!canUseCompositionEvent ||
  26150. (documentMode && 8 < documentMode && 11 >= documentMode)),
  26151. SPACEBAR_CODE = 32,
  26152. SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE),
  26153. hasSpaceKeypress = false,
  26154. isComposing = false,
  26155. supportedInputTypes = {
  26156. color: true,
  26157. date: true,
  26158. datetime: true,
  26159. "datetime-local": true,
  26160. email: true,
  26161. month: true,
  26162. number: true,
  26163. password: true,
  26164. range: true,
  26165. search: true,
  26166. tel: true,
  26167. text: true,
  26168. time: true,
  26169. url: true,
  26170. week: true
  26171. },
  26172. activeElement$1 = null,
  26173. activeElementInst$1 = null,
  26174. isInputEventSupported = false;
  26175. canUseDOM &&
  26176. (isInputEventSupported =
  26177. isEventSupported("input") &&
  26178. (!document.documentMode || 9 < document.documentMode));
  26179. var objectIs = "function" === typeof Object.is ? Object.is : is,
  26180. skipSelectionChangeEvent =
  26181. canUseDOM && "documentMode" in document && 11 >= document.documentMode,
  26182. activeElement = null,
  26183. activeElementInst = null,
  26184. lastSelection = null,
  26185. mouseDown = false,
  26186. vendorPrefixes = {
  26187. animationend: makePrefixMap("Animation", "AnimationEnd"),
  26188. animationiteration: makePrefixMap("Animation", "AnimationIteration"),
  26189. animationstart: makePrefixMap("Animation", "AnimationStart"),
  26190. transitionrun: makePrefixMap("Transition", "TransitionRun"),
  26191. transitionstart: makePrefixMap("Transition", "TransitionStart"),
  26192. transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
  26193. transitionend: makePrefixMap("Transition", "TransitionEnd")
  26194. },
  26195. prefixedEventNames = {},
  26196. style = {};
  26197. canUseDOM &&
  26198. ((style = document.createElement("div").style),
  26199. "AnimationEvent" in window ||
  26200. (delete vendorPrefixes.animationend.animation,
  26201. delete vendorPrefixes.animationiteration.animation,
  26202. delete vendorPrefixes.animationstart.animation),
  26203. "TransitionEvent" in window ||
  26204. delete vendorPrefixes.transitionend.transition);
  26205. var ANIMATION_END = getVendorPrefixedEventName("animationend"),
  26206. ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration"),
  26207. ANIMATION_START = getVendorPrefixedEventName("animationstart"),
  26208. TRANSITION_RUN = getVendorPrefixedEventName("transitionrun"),
  26209. TRANSITION_START = getVendorPrefixedEventName("transitionstart"),
  26210. TRANSITION_CANCEL = getVendorPrefixedEventName("transitioncancel"),
  26211. TRANSITION_END = getVendorPrefixedEventName("transitionend"),
  26212. topLevelEventsToReactNames = new Map(),
  26213. simpleEventPluginEvents =
  26214. "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(
  26215. " "
  26216. );
  26217. simpleEventPluginEvents.push("scrollEnd");
  26218. var lastResetTime = 0;
  26219. if (
  26220. "object" === typeof performance &&
  26221. "function" === typeof performance.now
  26222. ) {
  26223. var localPerformance = performance;
  26224. var getCurrentTime = function () {
  26225. return localPerformance.now();
  26226. };
  26227. } else {
  26228. var localDate = Date;
  26229. getCurrentTime = function () {
  26230. return localDate.now();
  26231. };
  26232. }
  26233. var reportGlobalError =
  26234. "function" === typeof reportError
  26235. ? reportError
  26236. : function (error) {
  26237. if (
  26238. "object" === typeof window &&
  26239. "function" === typeof window.ErrorEvent
  26240. ) {
  26241. var event = new window.ErrorEvent("error", {
  26242. bubbles: true,
  26243. cancelable: true,
  26244. message:
  26245. "object" === typeof error &&
  26246. null !== error &&
  26247. "string" === typeof error.message
  26248. ? String(error.message)
  26249. : String(error),
  26250. error: error
  26251. });
  26252. if (!window.dispatchEvent(event)) return;
  26253. } else if (
  26254. "object" === typeof process &&
  26255. "function" === typeof process.emit
  26256. ) {
  26257. process.emit("uncaughtException", error);
  26258. return;
  26259. }
  26260. console.error(error);
  26261. },
  26262. OMITTED_PROP_ERROR =
  26263. "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",
  26264. EMPTY_ARRAY = 0,
  26265. COMPLEX_ARRAY = 1,
  26266. PRIMITIVE_ARRAY = 2,
  26267. ENTRIES_ARRAY = 3,
  26268. REMOVED = "\u2013\u00a0",
  26269. ADDED = "+\u00a0",
  26270. UNCHANGED = "\u2007\u00a0",
  26271. supportsUserTiming =
  26272. "undefined" !== typeof console &&
  26273. "function" === typeof console.timeStamp &&
  26274. "undefined" !== typeof performance &&
  26275. "function" === typeof performance.measure,
  26276. COMPONENTS_TRACK = "Components \u269b",
  26277. LANES_TRACK_GROUP = "Scheduler \u269b",
  26278. currentTrack = "Blocking",
  26279. alreadyWarnedForDeepEquality = false,
  26280. reusableComponentDevToolDetails = {
  26281. color: "primary",
  26282. properties: null,
  26283. tooltipText: "",
  26284. track: COMPONENTS_TRACK
  26285. },
  26286. reusableComponentOptions = {
  26287. start: -0,
  26288. end: -0,
  26289. detail: { devtools: reusableComponentDevToolDetails }
  26290. },
  26291. resuableChangedPropsEntry = ["Changed Props", ""],
  26292. DEEP_EQUALITY_WARNING =
  26293. "This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",
  26294. reusableDeeplyEqualPropsEntry = ["Changed Props", DEEP_EQUALITY_WARNING],
  26295. OffscreenVisible = 1,
  26296. OffscreenPassiveEffectsConnected = 2,
  26297. concurrentQueues = [],
  26298. concurrentQueuesIndex = 0,
  26299. concurrentlyUpdatedLanes = 0,
  26300. emptyContextObject = {};
  26301. Object.freeze(emptyContextObject);
  26302. var resolveFamily = null,
  26303. failedBoundaries = null,
  26304. NoMode = 0,
  26305. ConcurrentMode = 1,
  26306. ProfileMode = 2,
  26307. StrictLegacyMode = 8,
  26308. StrictEffectsMode = 16,
  26309. SuspenseyImagesMode = 32;
  26310. var hasBadMapPolyfill = false;
  26311. try {
  26312. var nonExtensibleObject = Object.preventExtensions({});
  26313. new Map([[nonExtensibleObject, null]]);
  26314. new Set([nonExtensibleObject]);
  26315. } catch (e$3) {
  26316. hasBadMapPolyfill = true;
  26317. }
  26318. var CapturedStacks = new WeakMap(),
  26319. forkStack = [],
  26320. forkStackIndex = 0,
  26321. treeForkProvider = null,
  26322. treeForkCount = 0,
  26323. idStack = [],
  26324. idStackIndex = 0,
  26325. treeContextProvider = null,
  26326. treeContextId = 1,
  26327. treeContextOverflow = "",
  26328. hydrationParentFiber = null,
  26329. nextHydratableInstance = null,
  26330. isHydrating = false,
  26331. didSuspendOrErrorDEV = false,
  26332. hydrationDiffRootDEV = null,
  26333. hydrationErrors = null,
  26334. rootOrSingletonContext = false,
  26335. HydrationMismatchException = Error(
  26336. "Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."
  26337. ),
  26338. valueCursor = createCursor(null);
  26339. var rendererCursorDEV = createCursor(null);
  26340. var rendererSigil = {};
  26341. var currentlyRenderingFiber$1 = null,
  26342. lastContextDependency = null,
  26343. isDisallowedContextReadInDEV = false,
  26344. AbortControllerLocal =
  26345. "undefined" !== typeof AbortController
  26346. ? AbortController
  26347. : function () {
  26348. var listeners = [],
  26349. signal = (this.signal = {
  26350. aborted: false,
  26351. addEventListener: function (type, listener) {
  26352. listeners.push(listener);
  26353. }
  26354. });
  26355. this.abort = function () {
  26356. signal.aborted = true;
  26357. listeners.forEach(function (listener) {
  26358. return listener();
  26359. });
  26360. };
  26361. },
  26362. scheduleCallback$2 = Scheduler.unstable_scheduleCallback,
  26363. NormalPriority = Scheduler.unstable_NormalPriority,
  26364. CacheContext = {
  26365. $$typeof: REACT_CONTEXT_TYPE,
  26366. Consumer: null,
  26367. Provider: null,
  26368. _currentValue: null,
  26369. _currentValue2: null,
  26370. _threadCount: 0,
  26371. _currentRenderer: null,
  26372. _currentRenderer2: null
  26373. },
  26374. now = Scheduler.unstable_now,
  26375. createTask = console.createTask
  26376. ? console.createTask
  26377. : function () {
  26378. return null;
  26379. },
  26380. SPAWNED_UPDATE = 1,
  26381. PINGED_UPDATE = 2,
  26382. renderStartTime = -0,
  26383. commitStartTime = -0,
  26384. commitEndTime = -0,
  26385. commitErrors = null,
  26386. profilerStartTime = -1.1,
  26387. profilerEffectDuration = -0,
  26388. componentEffectDuration = -0,
  26389. componentEffectStartTime = -1.1,
  26390. componentEffectEndTime = -1.1,
  26391. componentEffectErrors = null,
  26392. componentEffectSpawnedUpdate = false,
  26393. blockingClampTime = -0,
  26394. blockingUpdateTime = -1.1,
  26395. blockingUpdateTask = null,
  26396. blockingUpdateType = 0,
  26397. blockingUpdateMethodName = null,
  26398. blockingUpdateComponentName = null,
  26399. blockingEventTime = -1.1,
  26400. blockingEventType = null,
  26401. blockingEventRepeatTime = -1.1,
  26402. blockingSuspendedTime = -1.1,
  26403. transitionClampTime = -0,
  26404. transitionStartTime = -1.1,
  26405. transitionUpdateTime = -1.1,
  26406. transitionUpdateType = 0,
  26407. transitionUpdateTask = null,
  26408. transitionUpdateMethodName = null,
  26409. transitionUpdateComponentName = null,
  26410. transitionEventTime = -1.1,
  26411. transitionEventType = null,
  26412. transitionEventRepeatTime = -1.1,
  26413. transitionSuspendedTime = -1.1,
  26414. retryClampTime = -0,
  26415. idleClampTime = -0,
  26416. animatingLanes = 0,
  26417. animatingTask = null,
  26418. yieldReason = 0,
  26419. yieldStartTime = -1.1,
  26420. currentUpdateIsNested = false,
  26421. nestedUpdateScheduled = false,
  26422. currentEntangledListeners = null,
  26423. currentEntangledPendingCount = 0,
  26424. currentEntangledLane = 0,
  26425. currentEntangledActionThenable = null,
  26426. prevOnStartTransitionFinish = ReactSharedInternals.S;
  26427. ReactSharedInternals.S = function (transition, returnValue) {
  26428. globalMostRecentTransitionTime = now$1();
  26429. if (
  26430. "object" === typeof returnValue &&
  26431. null !== returnValue &&
  26432. "function" === typeof returnValue.then
  26433. ) {
  26434. if (0 > transitionStartTime && 0 > transitionUpdateTime) {
  26435. transitionStartTime = now();
  26436. var newEventTime = resolveEventTimeStamp(),
  26437. newEventType = resolveEventType();
  26438. if (
  26439. newEventTime !== transitionEventRepeatTime ||
  26440. newEventType !== transitionEventType
  26441. )
  26442. transitionEventRepeatTime = -1.1;
  26443. transitionEventTime = newEventTime;
  26444. transitionEventType = newEventType;
  26445. }
  26446. entangleAsyncAction(transition, returnValue);
  26447. }
  26448. null !== prevOnStartTransitionFinish &&
  26449. prevOnStartTransitionFinish(transition, returnValue);
  26450. };
  26451. var resumedCache = createCursor(null),
  26452. ReactStrictModeWarnings = {
  26453. recordUnsafeLifecycleWarnings: function () {},
  26454. flushPendingUnsafeLifecycleWarnings: function () {},
  26455. recordLegacyContextWarning: function () {},
  26456. flushLegacyContextWarning: function () {},
  26457. discardPendingWarnings: function () {}
  26458. },
  26459. pendingComponentWillMountWarnings = [],
  26460. pendingUNSAFE_ComponentWillMountWarnings = [],
  26461. pendingComponentWillReceivePropsWarnings = [],
  26462. pendingUNSAFE_ComponentWillReceivePropsWarnings = [],
  26463. pendingComponentWillUpdateWarnings = [],
  26464. pendingUNSAFE_ComponentWillUpdateWarnings = [],
  26465. didWarnAboutUnsafeLifecycles = new Set();
  26466. ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (
  26467. fiber,
  26468. instance
  26469. ) {
  26470. didWarnAboutUnsafeLifecycles.has(fiber.type) ||
  26471. ("function" === typeof instance.componentWillMount &&
  26472. true !== instance.componentWillMount.__suppressDeprecationWarning &&
  26473. pendingComponentWillMountWarnings.push(fiber),
  26474. fiber.mode & StrictLegacyMode &&
  26475. "function" === typeof instance.UNSAFE_componentWillMount &&
  26476. pendingUNSAFE_ComponentWillMountWarnings.push(fiber),
  26477. "function" === typeof instance.componentWillReceiveProps &&
  26478. true !==
  26479. instance.componentWillReceiveProps.__suppressDeprecationWarning &&
  26480. pendingComponentWillReceivePropsWarnings.push(fiber),
  26481. fiber.mode & StrictLegacyMode &&
  26482. "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
  26483. pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber),
  26484. "function" === typeof instance.componentWillUpdate &&
  26485. true !== instance.componentWillUpdate.__suppressDeprecationWarning &&
  26486. pendingComponentWillUpdateWarnings.push(fiber),
  26487. fiber.mode & StrictLegacyMode &&
  26488. "function" === typeof instance.UNSAFE_componentWillUpdate &&
  26489. pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber));
  26490. };
  26491. ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
  26492. var componentWillMountUniqueNames = new Set();
  26493. 0 < pendingComponentWillMountWarnings.length &&
  26494. (pendingComponentWillMountWarnings.forEach(function (fiber) {
  26495. componentWillMountUniqueNames.add(
  26496. getComponentNameFromFiber(fiber) || "Component"
  26497. );
  26498. didWarnAboutUnsafeLifecycles.add(fiber.type);
  26499. }),
  26500. (pendingComponentWillMountWarnings = []));
  26501. var UNSAFE_componentWillMountUniqueNames = new Set();
  26502. 0 < pendingUNSAFE_ComponentWillMountWarnings.length &&
  26503. (pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
  26504. UNSAFE_componentWillMountUniqueNames.add(
  26505. getComponentNameFromFiber(fiber) || "Component"
  26506. );
  26507. didWarnAboutUnsafeLifecycles.add(fiber.type);
  26508. }),
  26509. (pendingUNSAFE_ComponentWillMountWarnings = []));
  26510. var componentWillReceivePropsUniqueNames = new Set();
  26511. 0 < pendingComponentWillReceivePropsWarnings.length &&
  26512. (pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
  26513. componentWillReceivePropsUniqueNames.add(
  26514. getComponentNameFromFiber(fiber) || "Component"
  26515. );
  26516. didWarnAboutUnsafeLifecycles.add(fiber.type);
  26517. }),
  26518. (pendingComponentWillReceivePropsWarnings = []));
  26519. var UNSAFE_componentWillReceivePropsUniqueNames = new Set();
  26520. 0 < pendingUNSAFE_ComponentWillReceivePropsWarnings.length &&
  26521. (pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(
  26522. function (fiber) {
  26523. UNSAFE_componentWillReceivePropsUniqueNames.add(
  26524. getComponentNameFromFiber(fiber) || "Component"
  26525. );
  26526. didWarnAboutUnsafeLifecycles.add(fiber.type);
  26527. }
  26528. ),
  26529. (pendingUNSAFE_ComponentWillReceivePropsWarnings = []));
  26530. var componentWillUpdateUniqueNames = new Set();
  26531. 0 < pendingComponentWillUpdateWarnings.length &&
  26532. (pendingComponentWillUpdateWarnings.forEach(function (fiber) {
  26533. componentWillUpdateUniqueNames.add(
  26534. getComponentNameFromFiber(fiber) || "Component"
  26535. );
  26536. didWarnAboutUnsafeLifecycles.add(fiber.type);
  26537. }),
  26538. (pendingComponentWillUpdateWarnings = []));
  26539. var UNSAFE_componentWillUpdateUniqueNames = new Set();
  26540. 0 < pendingUNSAFE_ComponentWillUpdateWarnings.length &&
  26541. (pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
  26542. UNSAFE_componentWillUpdateUniqueNames.add(
  26543. getComponentNameFromFiber(fiber) || "Component"
  26544. );
  26545. didWarnAboutUnsafeLifecycles.add(fiber.type);
  26546. }),
  26547. (pendingUNSAFE_ComponentWillUpdateWarnings = []));
  26548. if (0 < UNSAFE_componentWillMountUniqueNames.size) {
  26549. var sortedNames = setToSortedString(
  26550. UNSAFE_componentWillMountUniqueNames
  26551. );
  26552. console.error(
  26553. "Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s",
  26554. sortedNames
  26555. );
  26556. }
  26557. 0 < UNSAFE_componentWillReceivePropsUniqueNames.size &&
  26558. ((sortedNames = setToSortedString(
  26559. UNSAFE_componentWillReceivePropsUniqueNames
  26560. )),
  26561. console.error(
  26562. "Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n\nPlease update the following components: %s",
  26563. sortedNames
  26564. ));
  26565. 0 < UNSAFE_componentWillUpdateUniqueNames.size &&
  26566. ((sortedNames = setToSortedString(
  26567. UNSAFE_componentWillUpdateUniqueNames
  26568. )),
  26569. console.error(
  26570. "Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s",
  26571. sortedNames
  26572. ));
  26573. 0 < componentWillMountUniqueNames.size &&
  26574. ((sortedNames = setToSortedString(componentWillMountUniqueNames)),
  26575. console.warn(
  26576. "componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
  26577. sortedNames
  26578. ));
  26579. 0 < componentWillReceivePropsUniqueNames.size &&
  26580. ((sortedNames = setToSortedString(
  26581. componentWillReceivePropsUniqueNames
  26582. )),
  26583. console.warn(
  26584. "componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
  26585. sortedNames
  26586. ));
  26587. 0 < componentWillUpdateUniqueNames.size &&
  26588. ((sortedNames = setToSortedString(componentWillUpdateUniqueNames)),
  26589. console.warn(
  26590. "componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",
  26591. sortedNames
  26592. ));
  26593. };
  26594. var pendingLegacyContextWarning = new Map(),
  26595. didWarnAboutLegacyContext = new Set();
  26596. ReactStrictModeWarnings.recordLegacyContextWarning = function (
  26597. fiber,
  26598. instance
  26599. ) {
  26600. var strictRoot = null;
  26601. for (var node = fiber; null !== node; )
  26602. node.mode & StrictLegacyMode && (strictRoot = node),
  26603. (node = node.return);
  26604. null === strictRoot
  26605. ? console.error(
  26606. "Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."
  26607. )
  26608. : !didWarnAboutLegacyContext.has(fiber.type) &&
  26609. ((node = pendingLegacyContextWarning.get(strictRoot)),
  26610. null != fiber.type.contextTypes ||
  26611. null != fiber.type.childContextTypes ||
  26612. (null !== instance &&
  26613. "function" === typeof instance.getChildContext)) &&
  26614. (void 0 === node &&
  26615. ((node = []), pendingLegacyContextWarning.set(strictRoot, node)),
  26616. node.push(fiber));
  26617. };
  26618. ReactStrictModeWarnings.flushLegacyContextWarning = function () {
  26619. pendingLegacyContextWarning.forEach(function (fiberArray) {
  26620. if (0 !== fiberArray.length) {
  26621. var firstFiber = fiberArray[0],
  26622. uniqueNames = new Set();
  26623. fiberArray.forEach(function (fiber) {
  26624. uniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
  26625. didWarnAboutLegacyContext.add(fiber.type);
  26626. });
  26627. var sortedNames = setToSortedString(uniqueNames);
  26628. runWithFiberInDEV(firstFiber, function () {
  26629. console.error(
  26630. "Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://react.dev/link/legacy-context",
  26631. sortedNames
  26632. );
  26633. });
  26634. }
  26635. });
  26636. };
  26637. ReactStrictModeWarnings.discardPendingWarnings = function () {
  26638. pendingComponentWillMountWarnings = [];
  26639. pendingUNSAFE_ComponentWillMountWarnings = [];
  26640. pendingComponentWillReceivePropsWarnings = [];
  26641. pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
  26642. pendingComponentWillUpdateWarnings = [];
  26643. pendingUNSAFE_ComponentWillUpdateWarnings = [];
  26644. pendingLegacyContextWarning = new Map();
  26645. };
  26646. var callComponent = {
  26647. react_stack_bottom_frame: function (Component, props, secondArg) {
  26648. var wasRendering = isRendering;
  26649. isRendering = true;
  26650. try {
  26651. return Component(props, secondArg);
  26652. } finally {
  26653. isRendering = wasRendering;
  26654. }
  26655. }
  26656. },
  26657. callComponentInDEV =
  26658. callComponent.react_stack_bottom_frame.bind(callComponent),
  26659. callRender = {
  26660. react_stack_bottom_frame: function (instance) {
  26661. var wasRendering = isRendering;
  26662. isRendering = true;
  26663. try {
  26664. return instance.render();
  26665. } finally {
  26666. isRendering = wasRendering;
  26667. }
  26668. }
  26669. },
  26670. callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender),
  26671. callComponentDidMount = {
  26672. react_stack_bottom_frame: function (finishedWork, instance) {
  26673. try {
  26674. instance.componentDidMount();
  26675. } catch (error) {
  26676. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  26677. }
  26678. }
  26679. },
  26680. callComponentDidMountInDEV =
  26681. callComponentDidMount.react_stack_bottom_frame.bind(
  26682. callComponentDidMount
  26683. ),
  26684. callComponentDidUpdate = {
  26685. react_stack_bottom_frame: function (
  26686. finishedWork,
  26687. instance,
  26688. prevProps,
  26689. prevState,
  26690. snapshot
  26691. ) {
  26692. try {
  26693. instance.componentDidUpdate(prevProps, prevState, snapshot);
  26694. } catch (error) {
  26695. captureCommitPhaseError(finishedWork, finishedWork.return, error);
  26696. }
  26697. }
  26698. },
  26699. callComponentDidUpdateInDEV =
  26700. callComponentDidUpdate.react_stack_bottom_frame.bind(
  26701. callComponentDidUpdate
  26702. ),
  26703. callComponentDidCatch = {
  26704. react_stack_bottom_frame: function (instance, errorInfo) {
  26705. var stack = errorInfo.stack;
  26706. instance.componentDidCatch(errorInfo.value, {
  26707. componentStack: null !== stack ? stack : ""
  26708. });
  26709. }
  26710. },
  26711. callComponentDidCatchInDEV =
  26712. callComponentDidCatch.react_stack_bottom_frame.bind(
  26713. callComponentDidCatch
  26714. ),
  26715. callComponentWillUnmount = {
  26716. react_stack_bottom_frame: function (
  26717. current,
  26718. nearestMountedAncestor,
  26719. instance
  26720. ) {
  26721. try {
  26722. instance.componentWillUnmount();
  26723. } catch (error) {
  26724. captureCommitPhaseError(current, nearestMountedAncestor, error);
  26725. }
  26726. }
  26727. },
  26728. callComponentWillUnmountInDEV =
  26729. callComponentWillUnmount.react_stack_bottom_frame.bind(
  26730. callComponentWillUnmount
  26731. ),
  26732. callCreate = {
  26733. react_stack_bottom_frame: function (effect) {
  26734. var create = effect.create;
  26735. effect = effect.inst;
  26736. create = create();
  26737. return (effect.destroy = create);
  26738. }
  26739. },
  26740. callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate),
  26741. callDestroy = {
  26742. react_stack_bottom_frame: function (
  26743. current,
  26744. nearestMountedAncestor,
  26745. destroy
  26746. ) {
  26747. try {
  26748. destroy();
  26749. } catch (error) {
  26750. captureCommitPhaseError(current, nearestMountedAncestor, error);
  26751. }
  26752. }
  26753. },
  26754. callDestroyInDEV = callDestroy.react_stack_bottom_frame.bind(callDestroy),
  26755. callLazyInit = {
  26756. react_stack_bottom_frame: function (lazy) {
  26757. var init = lazy._init;
  26758. return init(lazy._payload);
  26759. }
  26760. },
  26761. callLazyInitInDEV =
  26762. callLazyInit.react_stack_bottom_frame.bind(callLazyInit),
  26763. SuspenseException = Error(
  26764. "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
  26765. ),
  26766. SuspenseyCommitException = Error(
  26767. "Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."
  26768. ),
  26769. SuspenseActionException = Error(
  26770. "Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."
  26771. ),
  26772. noopSuspenseyCommitThenable = {
  26773. then: function () {
  26774. console.error(
  26775. 'Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.'
  26776. );
  26777. }
  26778. },
  26779. suspendedThenable = null,
  26780. needsToResetSuspendedThenableDEV = false,
  26781. thenableState$1 = null,
  26782. thenableIndexCounter$1 = 0,
  26783. currentDebugInfo = null,
  26784. didWarnAboutMaps;
  26785. var didWarnAboutGenerators = (didWarnAboutMaps = false);
  26786. var ownerHasKeyUseWarning = {};
  26787. var ownerHasFunctionTypeWarning = {};
  26788. var ownerHasSymbolTypeWarning = {};
  26789. warnForMissingKey = function (returnFiber, workInProgress, child) {
  26790. if (
  26791. null !== child &&
  26792. "object" === typeof child &&
  26793. child._store &&
  26794. ((!child._store.validated && null == child.key) ||
  26795. 2 === child._store.validated)
  26796. ) {
  26797. if ("object" !== typeof child._store)
  26798. throw Error(
  26799. "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
  26800. );
  26801. child._store.validated = 1;
  26802. var componentName = getComponentNameFromFiber(returnFiber),
  26803. componentKey = componentName || "null";
  26804. if (!ownerHasKeyUseWarning[componentKey]) {
  26805. ownerHasKeyUseWarning[componentKey] = true;
  26806. child = child._owner;
  26807. returnFiber = returnFiber._debugOwner;
  26808. var currentComponentErrorInfo = "";
  26809. returnFiber &&
  26810. "number" === typeof returnFiber.tag &&
  26811. (componentKey = getComponentNameFromFiber(returnFiber)) &&
  26812. (currentComponentErrorInfo =
  26813. "\n\nCheck the render method of `" + componentKey + "`.");
  26814. currentComponentErrorInfo ||
  26815. (componentName &&
  26816. (currentComponentErrorInfo =
  26817. "\n\nCheck the top-level render call using <" +
  26818. componentName +
  26819. ">."));
  26820. var childOwnerAppendix = "";
  26821. null != child &&
  26822. returnFiber !== child &&
  26823. ((componentName = null),
  26824. "number" === typeof child.tag
  26825. ? (componentName = getComponentNameFromFiber(child))
  26826. : "string" === typeof child.name && (componentName = child.name),
  26827. componentName &&
  26828. (childOwnerAppendix =
  26829. " It was passed a child from " + componentName + "."));
  26830. runWithFiberInDEV(workInProgress, function () {
  26831. console.error(
  26832. 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
  26833. currentComponentErrorInfo,
  26834. childOwnerAppendix
  26835. );
  26836. });
  26837. }
  26838. }
  26839. };
  26840. var reconcileChildFibers = createChildReconciler(true),
  26841. mountChildFibers = createChildReconciler(false),
  26842. UpdateState = 0,
  26843. ReplaceState = 1,
  26844. ForceUpdate = 2,
  26845. CaptureUpdate = 3,
  26846. hasForceUpdate = false;
  26847. var didWarnUpdateInsideUpdate = false;
  26848. var currentlyProcessingQueue = null;
  26849. var didReadFromEntangledAsyncAction = false,
  26850. currentTreeHiddenStackCursor = createCursor(null),
  26851. prevEntangledRenderLanesCursor = createCursor(0),
  26852. suspenseHandlerStackCursor = createCursor(null),
  26853. shellBoundary = null,
  26854. SubtreeSuspenseContextMask = 1,
  26855. ForceSuspenseFallback = 2,
  26856. suspenseStackCursor = createCursor(0),
  26857. NoFlags = 0,
  26858. HasEffect = 1,
  26859. Insertion = 2,
  26860. Layout = 4,
  26861. Passive = 8,
  26862. didWarnUncachedGetSnapshot;
  26863. var didWarnAboutMismatchedHooksForComponent = new Set();
  26864. var didWarnAboutUseWrappedInTryCatch = new Set();
  26865. var didWarnAboutAsyncClientComponent = new Set();
  26866. var didWarnAboutUseFormState = new Set();
  26867. var renderLanes = 0,
  26868. currentlyRenderingFiber = null,
  26869. currentHook = null,
  26870. workInProgressHook = null,
  26871. didScheduleRenderPhaseUpdate = false,
  26872. didScheduleRenderPhaseUpdateDuringThisPass = false,
  26873. shouldDoubleInvokeUserFnsInHooksDEV = false,
  26874. localIdCounter = 0,
  26875. thenableIndexCounter = 0,
  26876. thenableState = null,
  26877. globalClientIdCounter = 0,
  26878. RE_RENDER_LIMIT = 25,
  26879. currentHookNameInDev = null,
  26880. hookTypesDev = null,
  26881. hookTypesUpdateIndexDev = -1,
  26882. ignorePreviousDependencies = false,
  26883. ContextOnlyDispatcher = {
  26884. readContext: readContext,
  26885. use: use,
  26886. useCallback: throwInvalidHookError,
  26887. useContext: throwInvalidHookError,
  26888. useEffect: throwInvalidHookError,
  26889. useImperativeHandle: throwInvalidHookError,
  26890. useLayoutEffect: throwInvalidHookError,
  26891. useInsertionEffect: throwInvalidHookError,
  26892. useMemo: throwInvalidHookError,
  26893. useReducer: throwInvalidHookError,
  26894. useRef: throwInvalidHookError,
  26895. useState: throwInvalidHookError,
  26896. useDebugValue: throwInvalidHookError,
  26897. useDeferredValue: throwInvalidHookError,
  26898. useTransition: throwInvalidHookError,
  26899. useSyncExternalStore: throwInvalidHookError,
  26900. useId: throwInvalidHookError,
  26901. useHostTransitionStatus: throwInvalidHookError,
  26902. useFormState: throwInvalidHookError,
  26903. useActionState: throwInvalidHookError,
  26904. useOptimistic: throwInvalidHookError,
  26905. useMemoCache: throwInvalidHookError,
  26906. useCacheRefresh: throwInvalidHookError
  26907. };
  26908. ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
  26909. var HooksDispatcherOnMountInDEV = null,
  26910. HooksDispatcherOnMountWithHookTypesInDEV = null,
  26911. HooksDispatcherOnUpdateInDEV = null,
  26912. HooksDispatcherOnRerenderInDEV = null,
  26913. InvalidNestedHooksDispatcherOnMountInDEV = null,
  26914. InvalidNestedHooksDispatcherOnUpdateInDEV = null,
  26915. InvalidNestedHooksDispatcherOnRerenderInDEV = null;
  26916. HooksDispatcherOnMountInDEV = {
  26917. readContext: function (context) {
  26918. return readContext(context);
  26919. },
  26920. use: use,
  26921. useCallback: function (callback, deps) {
  26922. currentHookNameInDev = "useCallback";
  26923. mountHookTypesDev();
  26924. checkDepsAreArrayDev(deps);
  26925. return mountCallback(callback, deps);
  26926. },
  26927. useContext: function (context) {
  26928. currentHookNameInDev = "useContext";
  26929. mountHookTypesDev();
  26930. return readContext(context);
  26931. },
  26932. useEffect: function (create, deps) {
  26933. currentHookNameInDev = "useEffect";
  26934. mountHookTypesDev();
  26935. checkDepsAreArrayDev(deps);
  26936. return mountEffect(create, deps);
  26937. },
  26938. useImperativeHandle: function (ref, create, deps) {
  26939. currentHookNameInDev = "useImperativeHandle";
  26940. mountHookTypesDev();
  26941. checkDepsAreArrayDev(deps);
  26942. return mountImperativeHandle(ref, create, deps);
  26943. },
  26944. useInsertionEffect: function (create, deps) {
  26945. currentHookNameInDev = "useInsertionEffect";
  26946. mountHookTypesDev();
  26947. checkDepsAreArrayDev(deps);
  26948. mountEffectImpl(4, Insertion, create, deps);
  26949. },
  26950. useLayoutEffect: function (create, deps) {
  26951. currentHookNameInDev = "useLayoutEffect";
  26952. mountHookTypesDev();
  26953. checkDepsAreArrayDev(deps);
  26954. return mountLayoutEffect(create, deps);
  26955. },
  26956. useMemo: function (create, deps) {
  26957. currentHookNameInDev = "useMemo";
  26958. mountHookTypesDev();
  26959. checkDepsAreArrayDev(deps);
  26960. var prevDispatcher = ReactSharedInternals.H;
  26961. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  26962. try {
  26963. return mountMemo(create, deps);
  26964. } finally {
  26965. ReactSharedInternals.H = prevDispatcher;
  26966. }
  26967. },
  26968. useReducer: function (reducer, initialArg, init) {
  26969. currentHookNameInDev = "useReducer";
  26970. mountHookTypesDev();
  26971. var prevDispatcher = ReactSharedInternals.H;
  26972. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  26973. try {
  26974. return mountReducer(reducer, initialArg, init);
  26975. } finally {
  26976. ReactSharedInternals.H = prevDispatcher;
  26977. }
  26978. },
  26979. useRef: function (initialValue) {
  26980. currentHookNameInDev = "useRef";
  26981. mountHookTypesDev();
  26982. return mountRef(initialValue);
  26983. },
  26984. useState: function (initialState) {
  26985. currentHookNameInDev = "useState";
  26986. mountHookTypesDev();
  26987. var prevDispatcher = ReactSharedInternals.H;
  26988. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  26989. try {
  26990. return mountState(initialState);
  26991. } finally {
  26992. ReactSharedInternals.H = prevDispatcher;
  26993. }
  26994. },
  26995. useDebugValue: function () {
  26996. currentHookNameInDev = "useDebugValue";
  26997. mountHookTypesDev();
  26998. },
  26999. useDeferredValue: function (value, initialValue) {
  27000. currentHookNameInDev = "useDeferredValue";
  27001. mountHookTypesDev();
  27002. return mountDeferredValue(value, initialValue);
  27003. },
  27004. useTransition: function () {
  27005. currentHookNameInDev = "useTransition";
  27006. mountHookTypesDev();
  27007. return mountTransition();
  27008. },
  27009. useSyncExternalStore: function (
  27010. subscribe,
  27011. getSnapshot,
  27012. getServerSnapshot
  27013. ) {
  27014. currentHookNameInDev = "useSyncExternalStore";
  27015. mountHookTypesDev();
  27016. return mountSyncExternalStore(
  27017. subscribe,
  27018. getSnapshot,
  27019. getServerSnapshot
  27020. );
  27021. },
  27022. useId: function () {
  27023. currentHookNameInDev = "useId";
  27024. mountHookTypesDev();
  27025. return mountId();
  27026. },
  27027. useFormState: function (action, initialState) {
  27028. currentHookNameInDev = "useFormState";
  27029. mountHookTypesDev();
  27030. warnOnUseFormStateInDev();
  27031. return mountActionState(action, initialState);
  27032. },
  27033. useActionState: function (action, initialState) {
  27034. currentHookNameInDev = "useActionState";
  27035. mountHookTypesDev();
  27036. return mountActionState(action, initialState);
  27037. },
  27038. useOptimistic: function (passthrough) {
  27039. currentHookNameInDev = "useOptimistic";
  27040. mountHookTypesDev();
  27041. return mountOptimistic(passthrough);
  27042. },
  27043. useHostTransitionStatus: useHostTransitionStatus,
  27044. useMemoCache: useMemoCache,
  27045. useCacheRefresh: function () {
  27046. currentHookNameInDev = "useCacheRefresh";
  27047. mountHookTypesDev();
  27048. return mountRefresh();
  27049. },
  27050. useEffectEvent: function (callback) {
  27051. currentHookNameInDev = "useEffectEvent";
  27052. mountHookTypesDev();
  27053. return mountEvent(callback);
  27054. }
  27055. };
  27056. HooksDispatcherOnMountWithHookTypesInDEV = {
  27057. readContext: function (context) {
  27058. return readContext(context);
  27059. },
  27060. use: use,
  27061. useCallback: function (callback, deps) {
  27062. currentHookNameInDev = "useCallback";
  27063. updateHookTypesDev();
  27064. return mountCallback(callback, deps);
  27065. },
  27066. useContext: function (context) {
  27067. currentHookNameInDev = "useContext";
  27068. updateHookTypesDev();
  27069. return readContext(context);
  27070. },
  27071. useEffect: function (create, deps) {
  27072. currentHookNameInDev = "useEffect";
  27073. updateHookTypesDev();
  27074. return mountEffect(create, deps);
  27075. },
  27076. useImperativeHandle: function (ref, create, deps) {
  27077. currentHookNameInDev = "useImperativeHandle";
  27078. updateHookTypesDev();
  27079. return mountImperativeHandle(ref, create, deps);
  27080. },
  27081. useInsertionEffect: function (create, deps) {
  27082. currentHookNameInDev = "useInsertionEffect";
  27083. updateHookTypesDev();
  27084. mountEffectImpl(4, Insertion, create, deps);
  27085. },
  27086. useLayoutEffect: function (create, deps) {
  27087. currentHookNameInDev = "useLayoutEffect";
  27088. updateHookTypesDev();
  27089. return mountLayoutEffect(create, deps);
  27090. },
  27091. useMemo: function (create, deps) {
  27092. currentHookNameInDev = "useMemo";
  27093. updateHookTypesDev();
  27094. var prevDispatcher = ReactSharedInternals.H;
  27095. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  27096. try {
  27097. return mountMemo(create, deps);
  27098. } finally {
  27099. ReactSharedInternals.H = prevDispatcher;
  27100. }
  27101. },
  27102. useReducer: function (reducer, initialArg, init) {
  27103. currentHookNameInDev = "useReducer";
  27104. updateHookTypesDev();
  27105. var prevDispatcher = ReactSharedInternals.H;
  27106. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  27107. try {
  27108. return mountReducer(reducer, initialArg, init);
  27109. } finally {
  27110. ReactSharedInternals.H = prevDispatcher;
  27111. }
  27112. },
  27113. useRef: function (initialValue) {
  27114. currentHookNameInDev = "useRef";
  27115. updateHookTypesDev();
  27116. return mountRef(initialValue);
  27117. },
  27118. useState: function (initialState) {
  27119. currentHookNameInDev = "useState";
  27120. updateHookTypesDev();
  27121. var prevDispatcher = ReactSharedInternals.H;
  27122. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  27123. try {
  27124. return mountState(initialState);
  27125. } finally {
  27126. ReactSharedInternals.H = prevDispatcher;
  27127. }
  27128. },
  27129. useDebugValue: function () {
  27130. currentHookNameInDev = "useDebugValue";
  27131. updateHookTypesDev();
  27132. },
  27133. useDeferredValue: function (value, initialValue) {
  27134. currentHookNameInDev = "useDeferredValue";
  27135. updateHookTypesDev();
  27136. return mountDeferredValue(value, initialValue);
  27137. },
  27138. useTransition: function () {
  27139. currentHookNameInDev = "useTransition";
  27140. updateHookTypesDev();
  27141. return mountTransition();
  27142. },
  27143. useSyncExternalStore: function (
  27144. subscribe,
  27145. getSnapshot,
  27146. getServerSnapshot
  27147. ) {
  27148. currentHookNameInDev = "useSyncExternalStore";
  27149. updateHookTypesDev();
  27150. return mountSyncExternalStore(
  27151. subscribe,
  27152. getSnapshot,
  27153. getServerSnapshot
  27154. );
  27155. },
  27156. useId: function () {
  27157. currentHookNameInDev = "useId";
  27158. updateHookTypesDev();
  27159. return mountId();
  27160. },
  27161. useActionState: function (action, initialState) {
  27162. currentHookNameInDev = "useActionState";
  27163. updateHookTypesDev();
  27164. return mountActionState(action, initialState);
  27165. },
  27166. useFormState: function (action, initialState) {
  27167. currentHookNameInDev = "useFormState";
  27168. updateHookTypesDev();
  27169. warnOnUseFormStateInDev();
  27170. return mountActionState(action, initialState);
  27171. },
  27172. useOptimistic: function (passthrough) {
  27173. currentHookNameInDev = "useOptimistic";
  27174. updateHookTypesDev();
  27175. return mountOptimistic(passthrough);
  27176. },
  27177. useHostTransitionStatus: useHostTransitionStatus,
  27178. useMemoCache: useMemoCache,
  27179. useCacheRefresh: function () {
  27180. currentHookNameInDev = "useCacheRefresh";
  27181. updateHookTypesDev();
  27182. return mountRefresh();
  27183. },
  27184. useEffectEvent: function (callback) {
  27185. currentHookNameInDev = "useEffectEvent";
  27186. updateHookTypesDev();
  27187. return mountEvent(callback);
  27188. }
  27189. };
  27190. HooksDispatcherOnUpdateInDEV = {
  27191. readContext: function (context) {
  27192. return readContext(context);
  27193. },
  27194. use: use,
  27195. useCallback: function (callback, deps) {
  27196. currentHookNameInDev = "useCallback";
  27197. updateHookTypesDev();
  27198. return updateCallback(callback, deps);
  27199. },
  27200. useContext: function (context) {
  27201. currentHookNameInDev = "useContext";
  27202. updateHookTypesDev();
  27203. return readContext(context);
  27204. },
  27205. useEffect: function (create, deps) {
  27206. currentHookNameInDev = "useEffect";
  27207. updateHookTypesDev();
  27208. updateEffectImpl(2048, Passive, create, deps);
  27209. },
  27210. useImperativeHandle: function (ref, create, deps) {
  27211. currentHookNameInDev = "useImperativeHandle";
  27212. updateHookTypesDev();
  27213. return updateImperativeHandle(ref, create, deps);
  27214. },
  27215. useInsertionEffect: function (create, deps) {
  27216. currentHookNameInDev = "useInsertionEffect";
  27217. updateHookTypesDev();
  27218. return updateEffectImpl(4, Insertion, create, deps);
  27219. },
  27220. useLayoutEffect: function (create, deps) {
  27221. currentHookNameInDev = "useLayoutEffect";
  27222. updateHookTypesDev();
  27223. return updateEffectImpl(4, Layout, create, deps);
  27224. },
  27225. useMemo: function (create, deps) {
  27226. currentHookNameInDev = "useMemo";
  27227. updateHookTypesDev();
  27228. var prevDispatcher = ReactSharedInternals.H;
  27229. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  27230. try {
  27231. return updateMemo(create, deps);
  27232. } finally {
  27233. ReactSharedInternals.H = prevDispatcher;
  27234. }
  27235. },
  27236. useReducer: function (reducer, initialArg, init) {
  27237. currentHookNameInDev = "useReducer";
  27238. updateHookTypesDev();
  27239. var prevDispatcher = ReactSharedInternals.H;
  27240. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  27241. try {
  27242. return updateReducer(reducer, initialArg, init);
  27243. } finally {
  27244. ReactSharedInternals.H = prevDispatcher;
  27245. }
  27246. },
  27247. useRef: function () {
  27248. currentHookNameInDev = "useRef";
  27249. updateHookTypesDev();
  27250. return updateWorkInProgressHook().memoizedState;
  27251. },
  27252. useState: function () {
  27253. currentHookNameInDev = "useState";
  27254. updateHookTypesDev();
  27255. var prevDispatcher = ReactSharedInternals.H;
  27256. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  27257. try {
  27258. return updateReducer(basicStateReducer);
  27259. } finally {
  27260. ReactSharedInternals.H = prevDispatcher;
  27261. }
  27262. },
  27263. useDebugValue: function () {
  27264. currentHookNameInDev = "useDebugValue";
  27265. updateHookTypesDev();
  27266. },
  27267. useDeferredValue: function (value, initialValue) {
  27268. currentHookNameInDev = "useDeferredValue";
  27269. updateHookTypesDev();
  27270. return updateDeferredValue(value, initialValue);
  27271. },
  27272. useTransition: function () {
  27273. currentHookNameInDev = "useTransition";
  27274. updateHookTypesDev();
  27275. return updateTransition();
  27276. },
  27277. useSyncExternalStore: function (
  27278. subscribe,
  27279. getSnapshot,
  27280. getServerSnapshot
  27281. ) {
  27282. currentHookNameInDev = "useSyncExternalStore";
  27283. updateHookTypesDev();
  27284. return updateSyncExternalStore(
  27285. subscribe,
  27286. getSnapshot,
  27287. getServerSnapshot
  27288. );
  27289. },
  27290. useId: function () {
  27291. currentHookNameInDev = "useId";
  27292. updateHookTypesDev();
  27293. return updateWorkInProgressHook().memoizedState;
  27294. },
  27295. useFormState: function (action) {
  27296. currentHookNameInDev = "useFormState";
  27297. updateHookTypesDev();
  27298. warnOnUseFormStateInDev();
  27299. return updateActionState(action);
  27300. },
  27301. useActionState: function (action) {
  27302. currentHookNameInDev = "useActionState";
  27303. updateHookTypesDev();
  27304. return updateActionState(action);
  27305. },
  27306. useOptimistic: function (passthrough, reducer) {
  27307. currentHookNameInDev = "useOptimistic";
  27308. updateHookTypesDev();
  27309. return updateOptimistic(passthrough, reducer);
  27310. },
  27311. useHostTransitionStatus: useHostTransitionStatus,
  27312. useMemoCache: useMemoCache,
  27313. useCacheRefresh: function () {
  27314. currentHookNameInDev = "useCacheRefresh";
  27315. updateHookTypesDev();
  27316. return updateWorkInProgressHook().memoizedState;
  27317. },
  27318. useEffectEvent: function (callback) {
  27319. currentHookNameInDev = "useEffectEvent";
  27320. updateHookTypesDev();
  27321. return updateEvent(callback);
  27322. }
  27323. };
  27324. HooksDispatcherOnRerenderInDEV = {
  27325. readContext: function (context) {
  27326. return readContext(context);
  27327. },
  27328. use: use,
  27329. useCallback: function (callback, deps) {
  27330. currentHookNameInDev = "useCallback";
  27331. updateHookTypesDev();
  27332. return updateCallback(callback, deps);
  27333. },
  27334. useContext: function (context) {
  27335. currentHookNameInDev = "useContext";
  27336. updateHookTypesDev();
  27337. return readContext(context);
  27338. },
  27339. useEffect: function (create, deps) {
  27340. currentHookNameInDev = "useEffect";
  27341. updateHookTypesDev();
  27342. updateEffectImpl(2048, Passive, create, deps);
  27343. },
  27344. useImperativeHandle: function (ref, create, deps) {
  27345. currentHookNameInDev = "useImperativeHandle";
  27346. updateHookTypesDev();
  27347. return updateImperativeHandle(ref, create, deps);
  27348. },
  27349. useInsertionEffect: function (create, deps) {
  27350. currentHookNameInDev = "useInsertionEffect";
  27351. updateHookTypesDev();
  27352. return updateEffectImpl(4, Insertion, create, deps);
  27353. },
  27354. useLayoutEffect: function (create, deps) {
  27355. currentHookNameInDev = "useLayoutEffect";
  27356. updateHookTypesDev();
  27357. return updateEffectImpl(4, Layout, create, deps);
  27358. },
  27359. useMemo: function (create, deps) {
  27360. currentHookNameInDev = "useMemo";
  27361. updateHookTypesDev();
  27362. var prevDispatcher = ReactSharedInternals.H;
  27363. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
  27364. try {
  27365. return updateMemo(create, deps);
  27366. } finally {
  27367. ReactSharedInternals.H = prevDispatcher;
  27368. }
  27369. },
  27370. useReducer: function (reducer, initialArg, init) {
  27371. currentHookNameInDev = "useReducer";
  27372. updateHookTypesDev();
  27373. var prevDispatcher = ReactSharedInternals.H;
  27374. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
  27375. try {
  27376. return rerenderReducer(reducer, initialArg, init);
  27377. } finally {
  27378. ReactSharedInternals.H = prevDispatcher;
  27379. }
  27380. },
  27381. useRef: function () {
  27382. currentHookNameInDev = "useRef";
  27383. updateHookTypesDev();
  27384. return updateWorkInProgressHook().memoizedState;
  27385. },
  27386. useState: function () {
  27387. currentHookNameInDev = "useState";
  27388. updateHookTypesDev();
  27389. var prevDispatcher = ReactSharedInternals.H;
  27390. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
  27391. try {
  27392. return rerenderReducer(basicStateReducer);
  27393. } finally {
  27394. ReactSharedInternals.H = prevDispatcher;
  27395. }
  27396. },
  27397. useDebugValue: function () {
  27398. currentHookNameInDev = "useDebugValue";
  27399. updateHookTypesDev();
  27400. },
  27401. useDeferredValue: function (value, initialValue) {
  27402. currentHookNameInDev = "useDeferredValue";
  27403. updateHookTypesDev();
  27404. return rerenderDeferredValue(value, initialValue);
  27405. },
  27406. useTransition: function () {
  27407. currentHookNameInDev = "useTransition";
  27408. updateHookTypesDev();
  27409. return rerenderTransition();
  27410. },
  27411. useSyncExternalStore: function (
  27412. subscribe,
  27413. getSnapshot,
  27414. getServerSnapshot
  27415. ) {
  27416. currentHookNameInDev = "useSyncExternalStore";
  27417. updateHookTypesDev();
  27418. return updateSyncExternalStore(
  27419. subscribe,
  27420. getSnapshot,
  27421. getServerSnapshot
  27422. );
  27423. },
  27424. useId: function () {
  27425. currentHookNameInDev = "useId";
  27426. updateHookTypesDev();
  27427. return updateWorkInProgressHook().memoizedState;
  27428. },
  27429. useFormState: function (action) {
  27430. currentHookNameInDev = "useFormState";
  27431. updateHookTypesDev();
  27432. warnOnUseFormStateInDev();
  27433. return rerenderActionState(action);
  27434. },
  27435. useActionState: function (action) {
  27436. currentHookNameInDev = "useActionState";
  27437. updateHookTypesDev();
  27438. return rerenderActionState(action);
  27439. },
  27440. useOptimistic: function (passthrough, reducer) {
  27441. currentHookNameInDev = "useOptimistic";
  27442. updateHookTypesDev();
  27443. return rerenderOptimistic(passthrough, reducer);
  27444. },
  27445. useHostTransitionStatus: useHostTransitionStatus,
  27446. useMemoCache: useMemoCache,
  27447. useCacheRefresh: function () {
  27448. currentHookNameInDev = "useCacheRefresh";
  27449. updateHookTypesDev();
  27450. return updateWorkInProgressHook().memoizedState;
  27451. },
  27452. useEffectEvent: function (callback) {
  27453. currentHookNameInDev = "useEffectEvent";
  27454. updateHookTypesDev();
  27455. return updateEvent(callback);
  27456. }
  27457. };
  27458. InvalidNestedHooksDispatcherOnMountInDEV = {
  27459. readContext: function (context) {
  27460. warnInvalidContextAccess();
  27461. return readContext(context);
  27462. },
  27463. use: function (usable) {
  27464. warnInvalidHookAccess();
  27465. return use(usable);
  27466. },
  27467. useCallback: function (callback, deps) {
  27468. currentHookNameInDev = "useCallback";
  27469. warnInvalidHookAccess();
  27470. mountHookTypesDev();
  27471. return mountCallback(callback, deps);
  27472. },
  27473. useContext: function (context) {
  27474. currentHookNameInDev = "useContext";
  27475. warnInvalidHookAccess();
  27476. mountHookTypesDev();
  27477. return readContext(context);
  27478. },
  27479. useEffect: function (create, deps) {
  27480. currentHookNameInDev = "useEffect";
  27481. warnInvalidHookAccess();
  27482. mountHookTypesDev();
  27483. return mountEffect(create, deps);
  27484. },
  27485. useImperativeHandle: function (ref, create, deps) {
  27486. currentHookNameInDev = "useImperativeHandle";
  27487. warnInvalidHookAccess();
  27488. mountHookTypesDev();
  27489. return mountImperativeHandle(ref, create, deps);
  27490. },
  27491. useInsertionEffect: function (create, deps) {
  27492. currentHookNameInDev = "useInsertionEffect";
  27493. warnInvalidHookAccess();
  27494. mountHookTypesDev();
  27495. mountEffectImpl(4, Insertion, create, deps);
  27496. },
  27497. useLayoutEffect: function (create, deps) {
  27498. currentHookNameInDev = "useLayoutEffect";
  27499. warnInvalidHookAccess();
  27500. mountHookTypesDev();
  27501. return mountLayoutEffect(create, deps);
  27502. },
  27503. useMemo: function (create, deps) {
  27504. currentHookNameInDev = "useMemo";
  27505. warnInvalidHookAccess();
  27506. mountHookTypesDev();
  27507. var prevDispatcher = ReactSharedInternals.H;
  27508. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  27509. try {
  27510. return mountMemo(create, deps);
  27511. } finally {
  27512. ReactSharedInternals.H = prevDispatcher;
  27513. }
  27514. },
  27515. useReducer: function (reducer, initialArg, init) {
  27516. currentHookNameInDev = "useReducer";
  27517. warnInvalidHookAccess();
  27518. mountHookTypesDev();
  27519. var prevDispatcher = ReactSharedInternals.H;
  27520. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  27521. try {
  27522. return mountReducer(reducer, initialArg, init);
  27523. } finally {
  27524. ReactSharedInternals.H = prevDispatcher;
  27525. }
  27526. },
  27527. useRef: function (initialValue) {
  27528. currentHookNameInDev = "useRef";
  27529. warnInvalidHookAccess();
  27530. mountHookTypesDev();
  27531. return mountRef(initialValue);
  27532. },
  27533. useState: function (initialState) {
  27534. currentHookNameInDev = "useState";
  27535. warnInvalidHookAccess();
  27536. mountHookTypesDev();
  27537. var prevDispatcher = ReactSharedInternals.H;
  27538. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
  27539. try {
  27540. return mountState(initialState);
  27541. } finally {
  27542. ReactSharedInternals.H = prevDispatcher;
  27543. }
  27544. },
  27545. useDebugValue: function () {
  27546. currentHookNameInDev = "useDebugValue";
  27547. warnInvalidHookAccess();
  27548. mountHookTypesDev();
  27549. },
  27550. useDeferredValue: function (value, initialValue) {
  27551. currentHookNameInDev = "useDeferredValue";
  27552. warnInvalidHookAccess();
  27553. mountHookTypesDev();
  27554. return mountDeferredValue(value, initialValue);
  27555. },
  27556. useTransition: function () {
  27557. currentHookNameInDev = "useTransition";
  27558. warnInvalidHookAccess();
  27559. mountHookTypesDev();
  27560. return mountTransition();
  27561. },
  27562. useSyncExternalStore: function (
  27563. subscribe,
  27564. getSnapshot,
  27565. getServerSnapshot
  27566. ) {
  27567. currentHookNameInDev = "useSyncExternalStore";
  27568. warnInvalidHookAccess();
  27569. mountHookTypesDev();
  27570. return mountSyncExternalStore(
  27571. subscribe,
  27572. getSnapshot,
  27573. getServerSnapshot
  27574. );
  27575. },
  27576. useId: function () {
  27577. currentHookNameInDev = "useId";
  27578. warnInvalidHookAccess();
  27579. mountHookTypesDev();
  27580. return mountId();
  27581. },
  27582. useFormState: function (action, initialState) {
  27583. currentHookNameInDev = "useFormState";
  27584. warnInvalidHookAccess();
  27585. mountHookTypesDev();
  27586. return mountActionState(action, initialState);
  27587. },
  27588. useActionState: function (action, initialState) {
  27589. currentHookNameInDev = "useActionState";
  27590. warnInvalidHookAccess();
  27591. mountHookTypesDev();
  27592. return mountActionState(action, initialState);
  27593. },
  27594. useOptimistic: function (passthrough) {
  27595. currentHookNameInDev = "useOptimistic";
  27596. warnInvalidHookAccess();
  27597. mountHookTypesDev();
  27598. return mountOptimistic(passthrough);
  27599. },
  27600. useMemoCache: function (size) {
  27601. warnInvalidHookAccess();
  27602. return useMemoCache(size);
  27603. },
  27604. useHostTransitionStatus: useHostTransitionStatus,
  27605. useCacheRefresh: function () {
  27606. currentHookNameInDev = "useCacheRefresh";
  27607. mountHookTypesDev();
  27608. return mountRefresh();
  27609. },
  27610. useEffectEvent: function (callback) {
  27611. currentHookNameInDev = "useEffectEvent";
  27612. warnInvalidHookAccess();
  27613. mountHookTypesDev();
  27614. return mountEvent(callback);
  27615. }
  27616. };
  27617. InvalidNestedHooksDispatcherOnUpdateInDEV = {
  27618. readContext: function (context) {
  27619. warnInvalidContextAccess();
  27620. return readContext(context);
  27621. },
  27622. use: function (usable) {
  27623. warnInvalidHookAccess();
  27624. return use(usable);
  27625. },
  27626. useCallback: function (callback, deps) {
  27627. currentHookNameInDev = "useCallback";
  27628. warnInvalidHookAccess();
  27629. updateHookTypesDev();
  27630. return updateCallback(callback, deps);
  27631. },
  27632. useContext: function (context) {
  27633. currentHookNameInDev = "useContext";
  27634. warnInvalidHookAccess();
  27635. updateHookTypesDev();
  27636. return readContext(context);
  27637. },
  27638. useEffect: function (create, deps) {
  27639. currentHookNameInDev = "useEffect";
  27640. warnInvalidHookAccess();
  27641. updateHookTypesDev();
  27642. updateEffectImpl(2048, Passive, create, deps);
  27643. },
  27644. useImperativeHandle: function (ref, create, deps) {
  27645. currentHookNameInDev = "useImperativeHandle";
  27646. warnInvalidHookAccess();
  27647. updateHookTypesDev();
  27648. return updateImperativeHandle(ref, create, deps);
  27649. },
  27650. useInsertionEffect: function (create, deps) {
  27651. currentHookNameInDev = "useInsertionEffect";
  27652. warnInvalidHookAccess();
  27653. updateHookTypesDev();
  27654. return updateEffectImpl(4, Insertion, create, deps);
  27655. },
  27656. useLayoutEffect: function (create, deps) {
  27657. currentHookNameInDev = "useLayoutEffect";
  27658. warnInvalidHookAccess();
  27659. updateHookTypesDev();
  27660. return updateEffectImpl(4, Layout, create, deps);
  27661. },
  27662. useMemo: function (create, deps) {
  27663. currentHookNameInDev = "useMemo";
  27664. warnInvalidHookAccess();
  27665. updateHookTypesDev();
  27666. var prevDispatcher = ReactSharedInternals.H;
  27667. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  27668. try {
  27669. return updateMemo(create, deps);
  27670. } finally {
  27671. ReactSharedInternals.H = prevDispatcher;
  27672. }
  27673. },
  27674. useReducer: function (reducer, initialArg, init) {
  27675. currentHookNameInDev = "useReducer";
  27676. warnInvalidHookAccess();
  27677. updateHookTypesDev();
  27678. var prevDispatcher = ReactSharedInternals.H;
  27679. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  27680. try {
  27681. return updateReducer(reducer, initialArg, init);
  27682. } finally {
  27683. ReactSharedInternals.H = prevDispatcher;
  27684. }
  27685. },
  27686. useRef: function () {
  27687. currentHookNameInDev = "useRef";
  27688. warnInvalidHookAccess();
  27689. updateHookTypesDev();
  27690. return updateWorkInProgressHook().memoizedState;
  27691. },
  27692. useState: function () {
  27693. currentHookNameInDev = "useState";
  27694. warnInvalidHookAccess();
  27695. updateHookTypesDev();
  27696. var prevDispatcher = ReactSharedInternals.H;
  27697. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  27698. try {
  27699. return updateReducer(basicStateReducer);
  27700. } finally {
  27701. ReactSharedInternals.H = prevDispatcher;
  27702. }
  27703. },
  27704. useDebugValue: function () {
  27705. currentHookNameInDev = "useDebugValue";
  27706. warnInvalidHookAccess();
  27707. updateHookTypesDev();
  27708. },
  27709. useDeferredValue: function (value, initialValue) {
  27710. currentHookNameInDev = "useDeferredValue";
  27711. warnInvalidHookAccess();
  27712. updateHookTypesDev();
  27713. return updateDeferredValue(value, initialValue);
  27714. },
  27715. useTransition: function () {
  27716. currentHookNameInDev = "useTransition";
  27717. warnInvalidHookAccess();
  27718. updateHookTypesDev();
  27719. return updateTransition();
  27720. },
  27721. useSyncExternalStore: function (
  27722. subscribe,
  27723. getSnapshot,
  27724. getServerSnapshot
  27725. ) {
  27726. currentHookNameInDev = "useSyncExternalStore";
  27727. warnInvalidHookAccess();
  27728. updateHookTypesDev();
  27729. return updateSyncExternalStore(
  27730. subscribe,
  27731. getSnapshot,
  27732. getServerSnapshot
  27733. );
  27734. },
  27735. useId: function () {
  27736. currentHookNameInDev = "useId";
  27737. warnInvalidHookAccess();
  27738. updateHookTypesDev();
  27739. return updateWorkInProgressHook().memoizedState;
  27740. },
  27741. useFormState: function (action) {
  27742. currentHookNameInDev = "useFormState";
  27743. warnInvalidHookAccess();
  27744. updateHookTypesDev();
  27745. return updateActionState(action);
  27746. },
  27747. useActionState: function (action) {
  27748. currentHookNameInDev = "useActionState";
  27749. warnInvalidHookAccess();
  27750. updateHookTypesDev();
  27751. return updateActionState(action);
  27752. },
  27753. useOptimistic: function (passthrough, reducer) {
  27754. currentHookNameInDev = "useOptimistic";
  27755. warnInvalidHookAccess();
  27756. updateHookTypesDev();
  27757. return updateOptimistic(passthrough, reducer);
  27758. },
  27759. useMemoCache: function (size) {
  27760. warnInvalidHookAccess();
  27761. return useMemoCache(size);
  27762. },
  27763. useHostTransitionStatus: useHostTransitionStatus,
  27764. useCacheRefresh: function () {
  27765. currentHookNameInDev = "useCacheRefresh";
  27766. updateHookTypesDev();
  27767. return updateWorkInProgressHook().memoizedState;
  27768. },
  27769. useEffectEvent: function (callback) {
  27770. currentHookNameInDev = "useEffectEvent";
  27771. warnInvalidHookAccess();
  27772. updateHookTypesDev();
  27773. return updateEvent(callback);
  27774. }
  27775. };
  27776. InvalidNestedHooksDispatcherOnRerenderInDEV = {
  27777. readContext: function (context) {
  27778. warnInvalidContextAccess();
  27779. return readContext(context);
  27780. },
  27781. use: function (usable) {
  27782. warnInvalidHookAccess();
  27783. return use(usable);
  27784. },
  27785. useCallback: function (callback, deps) {
  27786. currentHookNameInDev = "useCallback";
  27787. warnInvalidHookAccess();
  27788. updateHookTypesDev();
  27789. return updateCallback(callback, deps);
  27790. },
  27791. useContext: function (context) {
  27792. currentHookNameInDev = "useContext";
  27793. warnInvalidHookAccess();
  27794. updateHookTypesDev();
  27795. return readContext(context);
  27796. },
  27797. useEffect: function (create, deps) {
  27798. currentHookNameInDev = "useEffect";
  27799. warnInvalidHookAccess();
  27800. updateHookTypesDev();
  27801. updateEffectImpl(2048, Passive, create, deps);
  27802. },
  27803. useImperativeHandle: function (ref, create, deps) {
  27804. currentHookNameInDev = "useImperativeHandle";
  27805. warnInvalidHookAccess();
  27806. updateHookTypesDev();
  27807. return updateImperativeHandle(ref, create, deps);
  27808. },
  27809. useInsertionEffect: function (create, deps) {
  27810. currentHookNameInDev = "useInsertionEffect";
  27811. warnInvalidHookAccess();
  27812. updateHookTypesDev();
  27813. return updateEffectImpl(4, Insertion, create, deps);
  27814. },
  27815. useLayoutEffect: function (create, deps) {
  27816. currentHookNameInDev = "useLayoutEffect";
  27817. warnInvalidHookAccess();
  27818. updateHookTypesDev();
  27819. return updateEffectImpl(4, Layout, create, deps);
  27820. },
  27821. useMemo: function (create, deps) {
  27822. currentHookNameInDev = "useMemo";
  27823. warnInvalidHookAccess();
  27824. updateHookTypesDev();
  27825. var prevDispatcher = ReactSharedInternals.H;
  27826. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  27827. try {
  27828. return updateMemo(create, deps);
  27829. } finally {
  27830. ReactSharedInternals.H = prevDispatcher;
  27831. }
  27832. },
  27833. useReducer: function (reducer, initialArg, init) {
  27834. currentHookNameInDev = "useReducer";
  27835. warnInvalidHookAccess();
  27836. updateHookTypesDev();
  27837. var prevDispatcher = ReactSharedInternals.H;
  27838. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  27839. try {
  27840. return rerenderReducer(reducer, initialArg, init);
  27841. } finally {
  27842. ReactSharedInternals.H = prevDispatcher;
  27843. }
  27844. },
  27845. useRef: function () {
  27846. currentHookNameInDev = "useRef";
  27847. warnInvalidHookAccess();
  27848. updateHookTypesDev();
  27849. return updateWorkInProgressHook().memoizedState;
  27850. },
  27851. useState: function () {
  27852. currentHookNameInDev = "useState";
  27853. warnInvalidHookAccess();
  27854. updateHookTypesDev();
  27855. var prevDispatcher = ReactSharedInternals.H;
  27856. ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
  27857. try {
  27858. return rerenderReducer(basicStateReducer);
  27859. } finally {
  27860. ReactSharedInternals.H = prevDispatcher;
  27861. }
  27862. },
  27863. useDebugValue: function () {
  27864. currentHookNameInDev = "useDebugValue";
  27865. warnInvalidHookAccess();
  27866. updateHookTypesDev();
  27867. },
  27868. useDeferredValue: function (value, initialValue) {
  27869. currentHookNameInDev = "useDeferredValue";
  27870. warnInvalidHookAccess();
  27871. updateHookTypesDev();
  27872. return rerenderDeferredValue(value, initialValue);
  27873. },
  27874. useTransition: function () {
  27875. currentHookNameInDev = "useTransition";
  27876. warnInvalidHookAccess();
  27877. updateHookTypesDev();
  27878. return rerenderTransition();
  27879. },
  27880. useSyncExternalStore: function (
  27881. subscribe,
  27882. getSnapshot,
  27883. getServerSnapshot
  27884. ) {
  27885. currentHookNameInDev = "useSyncExternalStore";
  27886. warnInvalidHookAccess();
  27887. updateHookTypesDev();
  27888. return updateSyncExternalStore(
  27889. subscribe,
  27890. getSnapshot,
  27891. getServerSnapshot
  27892. );
  27893. },
  27894. useId: function () {
  27895. currentHookNameInDev = "useId";
  27896. warnInvalidHookAccess();
  27897. updateHookTypesDev();
  27898. return updateWorkInProgressHook().memoizedState;
  27899. },
  27900. useFormState: function (action) {
  27901. currentHookNameInDev = "useFormState";
  27902. warnInvalidHookAccess();
  27903. updateHookTypesDev();
  27904. return rerenderActionState(action);
  27905. },
  27906. useActionState: function (action) {
  27907. currentHookNameInDev = "useActionState";
  27908. warnInvalidHookAccess();
  27909. updateHookTypesDev();
  27910. return rerenderActionState(action);
  27911. },
  27912. useOptimistic: function (passthrough, reducer) {
  27913. currentHookNameInDev = "useOptimistic";
  27914. warnInvalidHookAccess();
  27915. updateHookTypesDev();
  27916. return rerenderOptimistic(passthrough, reducer);
  27917. },
  27918. useMemoCache: function (size) {
  27919. warnInvalidHookAccess();
  27920. return useMemoCache(size);
  27921. },
  27922. useHostTransitionStatus: useHostTransitionStatus,
  27923. useCacheRefresh: function () {
  27924. currentHookNameInDev = "useCacheRefresh";
  27925. updateHookTypesDev();
  27926. return updateWorkInProgressHook().memoizedState;
  27927. },
  27928. useEffectEvent: function (callback) {
  27929. currentHookNameInDev = "useEffectEvent";
  27930. warnInvalidHookAccess();
  27931. updateHookTypesDev();
  27932. return updateEvent(callback);
  27933. }
  27934. };
  27935. var fakeInternalInstance = {};
  27936. var didWarnAboutStateAssignmentForComponent = new Set();
  27937. var didWarnAboutUninitializedState = new Set();
  27938. var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
  27939. var didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
  27940. var didWarnAboutDirectlyAssigningPropsToState = new Set();
  27941. var didWarnAboutUndefinedDerivedState = new Set();
  27942. var didWarnAboutContextTypes$1 = new Set();
  27943. var didWarnAboutChildContextTypes = new Set();
  27944. var didWarnAboutInvalidateContextType = new Set();
  27945. var didWarnOnInvalidCallback = new Set();
  27946. Object.freeze(fakeInternalInstance);
  27947. var classComponentUpdater = {
  27948. enqueueSetState: function (inst, payload, callback) {
  27949. inst = inst._reactInternals;
  27950. var lane = requestUpdateLane(inst),
  27951. update = createUpdate(lane);
  27952. update.payload = payload;
  27953. void 0 !== callback &&
  27954. null !== callback &&
  27955. (warnOnInvalidCallback(callback), (update.callback = callback));
  27956. payload = enqueueUpdate(inst, update, lane);
  27957. null !== payload &&
  27958. (startUpdateTimerByLane(lane, "this.setState()", inst),
  27959. scheduleUpdateOnFiber(payload, inst, lane),
  27960. entangleTransitions(payload, inst, lane));
  27961. },
  27962. enqueueReplaceState: function (inst, payload, callback) {
  27963. inst = inst._reactInternals;
  27964. var lane = requestUpdateLane(inst),
  27965. update = createUpdate(lane);
  27966. update.tag = ReplaceState;
  27967. update.payload = payload;
  27968. void 0 !== callback &&
  27969. null !== callback &&
  27970. (warnOnInvalidCallback(callback), (update.callback = callback));
  27971. payload = enqueueUpdate(inst, update, lane);
  27972. null !== payload &&
  27973. (startUpdateTimerByLane(lane, "this.replaceState()", inst),
  27974. scheduleUpdateOnFiber(payload, inst, lane),
  27975. entangleTransitions(payload, inst, lane));
  27976. },
  27977. enqueueForceUpdate: function (inst, callback) {
  27978. inst = inst._reactInternals;
  27979. var lane = requestUpdateLane(inst),
  27980. update = createUpdate(lane);
  27981. update.tag = ForceUpdate;
  27982. void 0 !== callback &&
  27983. null !== callback &&
  27984. (warnOnInvalidCallback(callback), (update.callback = callback));
  27985. callback = enqueueUpdate(inst, update, lane);
  27986. null !== callback &&
  27987. (startUpdateTimerByLane(lane, "this.forceUpdate()", inst),
  27988. scheduleUpdateOnFiber(callback, inst, lane),
  27989. entangleTransitions(callback, inst, lane));
  27990. }
  27991. },
  27992. componentName = null,
  27993. errorBoundaryName = null,
  27994. SelectiveHydrationException = Error(
  27995. "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."
  27996. ),
  27997. didReceiveUpdate = false;
  27998. var didWarnAboutBadClass = {};
  27999. var didWarnAboutContextTypeOnFunctionComponent = {};
  28000. var didWarnAboutContextTypes = {};
  28001. var didWarnAboutGetDerivedStateOnFunctionComponent = {};
  28002. var didWarnAboutReassigningProps = false;
  28003. var didWarnAboutRevealOrder = {};
  28004. var didWarnAboutTailOptions = {};
  28005. var SUSPENDED_MARKER = {
  28006. dehydrated: null,
  28007. treeContext: null,
  28008. retryLane: 0,
  28009. hydrationErrors: null
  28010. },
  28011. hasWarnedAboutUsingNoValuePropOnContextProvider = false,
  28012. didWarnAboutUndefinedSnapshotBeforeUpdate = null;
  28013. didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
  28014. var offscreenSubtreeIsHidden = false,
  28015. offscreenSubtreeWasHidden = false,
  28016. needsFormReset = false,
  28017. PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set,
  28018. nextEffect = null,
  28019. inProgressLanes = null,
  28020. inProgressRoot = null,
  28021. hostParent = null,
  28022. hostParentIsContainer = false,
  28023. currentHoistableRoot = null,
  28024. inHydratedSubtree = false,
  28025. suspenseyCommitFlag = 8192,
  28026. DefaultAsyncDispatcher = {
  28027. getCacheForType: function (resourceType) {
  28028. var cache = readContext(CacheContext),
  28029. cacheForType = cache.data.get(resourceType);
  28030. void 0 === cacheForType &&
  28031. ((cacheForType = resourceType()),
  28032. cache.data.set(resourceType, cacheForType));
  28033. return cacheForType;
  28034. },
  28035. cacheSignal: function () {
  28036. return readContext(CacheContext).controller.signal;
  28037. },
  28038. getOwner: function () {
  28039. return current;
  28040. }
  28041. };
  28042. if ("function" === typeof Symbol && Symbol.for) {
  28043. var symbolFor = Symbol.for;
  28044. symbolFor("selector.component");
  28045. symbolFor("selector.has_pseudo_class");
  28046. symbolFor("selector.role");
  28047. symbolFor("selector.test_id");
  28048. symbolFor("selector.text");
  28049. }
  28050. var commitHooks = [],
  28051. PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map,
  28052. NoContext = 0,
  28053. RenderContext = 2,
  28054. CommitContext = 4,
  28055. RootInProgress = 0,
  28056. RootFatalErrored = 1,
  28057. RootErrored = 2,
  28058. RootSuspended = 3,
  28059. RootSuspendedWithDelay = 4,
  28060. RootSuspendedAtTheShell = 6,
  28061. RootCompleted = 5,
  28062. executionContext = NoContext,
  28063. workInProgressRoot = null,
  28064. workInProgress = null,
  28065. workInProgressRootRenderLanes = 0,
  28066. NotSuspended = 0,
  28067. SuspendedOnError = 1,
  28068. SuspendedOnData = 2,
  28069. SuspendedOnImmediate = 3,
  28070. SuspendedOnInstance = 4,
  28071. SuspendedOnInstanceAndReadyToContinue = 5,
  28072. SuspendedOnDeprecatedThrowPromise = 6,
  28073. SuspendedAndReadyToContinue = 7,
  28074. SuspendedOnHydration = 8,
  28075. SuspendedOnAction = 9,
  28076. workInProgressSuspendedReason = NotSuspended,
  28077. workInProgressThrownValue = null,
  28078. workInProgressRootDidSkipSuspendedSiblings = false,
  28079. workInProgressRootIsPrerendering = false,
  28080. workInProgressRootDidAttachPingListener = false,
  28081. entangledRenderLanes = 0,
  28082. workInProgressRootExitStatus = RootInProgress,
  28083. workInProgressRootSkippedLanes = 0,
  28084. workInProgressRootInterleavedUpdatedLanes = 0,
  28085. workInProgressRootPingedLanes = 0,
  28086. workInProgressDeferredLane = 0,
  28087. workInProgressSuspendedRetryLanes = 0,
  28088. workInProgressRootConcurrentErrors = null,
  28089. workInProgressRootRecoverableErrors = null,
  28090. workInProgressRootDidIncludeRecursiveRenderUpdate = false,
  28091. globalMostRecentFallbackTime = 0,
  28092. globalMostRecentTransitionTime = 0,
  28093. FALLBACK_THROTTLE_MS = 300,
  28094. workInProgressRootRenderTargetTime = Infinity,
  28095. RENDER_TIMEOUT_MS = 500,
  28096. workInProgressTransitions = null,
  28097. workInProgressUpdateTask = null,
  28098. legacyErrorBoundariesThatAlreadyFailed = null,
  28099. IMMEDIATE_COMMIT = 0,
  28100. ABORTED_VIEW_TRANSITION_COMMIT = 1,
  28101. DELAYED_PASSIVE_COMMIT = 2,
  28102. ANIMATION_STARTED_COMMIT = 3,
  28103. NO_PENDING_EFFECTS = 0,
  28104. PENDING_MUTATION_PHASE = 1,
  28105. PENDING_LAYOUT_PHASE = 2,
  28106. PENDING_AFTER_MUTATION_PHASE = 3,
  28107. PENDING_SPAWNED_WORK = 4,
  28108. PENDING_PASSIVE_PHASE = 5,
  28109. pendingEffectsStatus = 0,
  28110. pendingEffectsRoot = null,
  28111. pendingFinishedWork = null,
  28112. pendingEffectsLanes = 0,
  28113. pendingEffectsRemainingLanes = 0,
  28114. pendingEffectsRenderEndTime = -0,
  28115. pendingPassiveTransitions = null,
  28116. pendingRecoverableErrors = null,
  28117. pendingSuspendedCommitReason = null,
  28118. pendingDelayedCommitReason = IMMEDIATE_COMMIT,
  28119. pendingSuspendedViewTransitionReason = null,
  28120. NESTED_UPDATE_LIMIT = 50,
  28121. nestedUpdateCount = 0,
  28122. rootWithNestedUpdates = null,
  28123. isFlushingPassiveEffects = false,
  28124. didScheduleUpdateDuringPassiveEffects = false,
  28125. NESTED_PASSIVE_UPDATE_LIMIT = 50,
  28126. nestedPassiveUpdateCount = 0,
  28127. rootWithPassiveNestedUpdates = null,
  28128. isRunningInsertionEffect = false,
  28129. didWarnStateUpdateForNotYetMountedComponent = null,
  28130. didWarnAboutUpdateInRender = false;
  28131. var didWarnAboutUpdateInRenderForAnotherComponent = new Set();
  28132. var fakeActCallbackNode$1 = {},
  28133. firstScheduledRoot = null,
  28134. lastScheduledRoot = null,
  28135. didScheduleMicrotask = false,
  28136. didScheduleMicrotask_act = false,
  28137. mightHavePendingSyncWork = false,
  28138. isFlushingWork = false,
  28139. currentEventTransitionLane = 0,
  28140. fakeActCallbackNode = {};
  28141. (function () {
  28142. for (var i = 0; i < simpleEventPluginEvents.length; i++) {
  28143. var eventName = simpleEventPluginEvents[i],
  28144. domEventName = eventName.toLowerCase();
  28145. eventName = eventName[0].toUpperCase() + eventName.slice(1);
  28146. registerSimpleEvent(domEventName, "on" + eventName);
  28147. }
  28148. registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
  28149. registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
  28150. registerSimpleEvent(ANIMATION_START, "onAnimationStart");
  28151. registerSimpleEvent("dblclick", "onDoubleClick");
  28152. registerSimpleEvent("focusin", "onFocus");
  28153. registerSimpleEvent("focusout", "onBlur");
  28154. registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
  28155. registerSimpleEvent(TRANSITION_START, "onTransitionStart");
  28156. registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
  28157. registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
  28158. })();
  28159. registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
  28160. registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
  28161. registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
  28162. registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
  28163. registerTwoPhaseEvent(
  28164. "onChange",
  28165. "change click focusin focusout input keydown keyup selectionchange".split(
  28166. " "
  28167. )
  28168. );
  28169. registerTwoPhaseEvent(
  28170. "onSelect",
  28171. "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
  28172. " "
  28173. )
  28174. );
  28175. registerTwoPhaseEvent("onBeforeInput", [
  28176. "compositionend",
  28177. "keypress",
  28178. "textInput",
  28179. "paste"
  28180. ]);
  28181. registerTwoPhaseEvent(
  28182. "onCompositionEnd",
  28183. "compositionend focusout keydown keypress keyup mousedown".split(" ")
  28184. );
  28185. registerTwoPhaseEvent(
  28186. "onCompositionStart",
  28187. "compositionstart focusout keydown keypress keyup mousedown".split(" ")
  28188. );
  28189. registerTwoPhaseEvent(
  28190. "onCompositionUpdate",
  28191. "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
  28192. );
  28193. var mediaEventTypes =
  28194. "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(
  28195. " "
  28196. ),
  28197. nonDelegatedEvents = new Set(
  28198. "beforetoggle cancel close invalid load scroll scrollend toggle"
  28199. .split(" ")
  28200. .concat(mediaEventTypes)
  28201. ),
  28202. listeningMarker = "_reactListening" + Math.random().toString(36).slice(2),
  28203. didWarnControlledToUncontrolled = false,
  28204. didWarnUncontrolledToControlled = false,
  28205. didWarnFormActionType = false,
  28206. didWarnFormActionName = false,
  28207. didWarnFormActionTarget = false,
  28208. didWarnFormActionMethod = false,
  28209. didWarnPopoverTargetObject = false;
  28210. var didWarnForNewBooleanPropsWithEmptyValue = {};
  28211. var NORMALIZE_NEWLINES_REGEX = /\r\n?/g,
  28212. NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g,
  28213. xlinkNamespace = "http://www.w3.org/1999/xlink",
  28214. xmlNamespace = "http://www.w3.org/XML/1998/namespace",
  28215. EXPECTED_FORM_ACTION_URL =
  28216. "javascript:throw new Error('React form unexpectedly submitted.')",
  28217. SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning",
  28218. ACTIVITY_START_DATA = "&",
  28219. ACTIVITY_END_DATA = "/&",
  28220. SUSPENSE_START_DATA = "$",
  28221. SUSPENSE_END_DATA = "/$",
  28222. SUSPENSE_PENDING_START_DATA = "$?",
  28223. SUSPENSE_QUEUED_START_DATA = "$~",
  28224. SUSPENSE_FALLBACK_START_DATA = "$!",
  28225. PREAMBLE_CONTRIBUTION_HTML = "html",
  28226. PREAMBLE_CONTRIBUTION_BODY = "body",
  28227. PREAMBLE_CONTRIBUTION_HEAD = "head",
  28228. FORM_STATE_IS_MATCHING = "F!",
  28229. FORM_STATE_IS_NOT_MATCHING = "F",
  28230. DOCUMENT_READY_STATE_LOADING = "loading",
  28231. STYLE = "style",
  28232. HostContextNamespaceNone = 0,
  28233. HostContextNamespaceSvg = 1,
  28234. HostContextNamespaceMath = 2,
  28235. eventsEnabled = null,
  28236. selectionInformation = null,
  28237. warnedUnknownTags = { dialog: true, webview: true },
  28238. currentPopstateTransitionEvent = null,
  28239. schedulerEvent = void 0,
  28240. scheduleTimeout = "function" === typeof setTimeout ? setTimeout : void 0,
  28241. cancelTimeout =
  28242. "function" === typeof clearTimeout ? clearTimeout : void 0,
  28243. noTimeout = -1,
  28244. localPromise = "function" === typeof Promise ? Promise : void 0,
  28245. scheduleMicrotask =
  28246. "function" === typeof queueMicrotask
  28247. ? queueMicrotask
  28248. : "undefined" !== typeof localPromise
  28249. ? function (callback) {
  28250. return localPromise
  28251. .resolve(null)
  28252. .then(callback)
  28253. .catch(handleErrorInNextTick);
  28254. }
  28255. : scheduleTimeout,
  28256. previousHydratableOnEnteringScopedSingleton = null,
  28257. NotLoaded = 0,
  28258. Loaded = 1,
  28259. Errored = 2,
  28260. Settled = 3,
  28261. Inserted = 4,
  28262. preloadPropsMap = new Map(),
  28263. preconnectsSet = new Set(),
  28264. previousDispatcher = ReactDOMSharedInternals.d;
  28265. ReactDOMSharedInternals.d = {
  28266. f: function () {
  28267. var previousWasRendering = previousDispatcher.f(),
  28268. wasRendering = flushSyncWork$1();
  28269. return previousWasRendering || wasRendering;
  28270. },
  28271. r: function (form) {
  28272. var formInst = getInstanceFromNode(form);
  28273. null !== formInst && 5 === formInst.tag && "form" === formInst.type
  28274. ? requestFormReset$1(formInst)
  28275. : previousDispatcher.r(form);
  28276. },
  28277. D: function (href) {
  28278. previousDispatcher.D(href);
  28279. preconnectAs("dns-prefetch", href, null);
  28280. },
  28281. C: function (href, crossOrigin) {
  28282. previousDispatcher.C(href, crossOrigin);
  28283. preconnectAs("preconnect", href, crossOrigin);
  28284. },
  28285. L: function (href, as, options) {
  28286. previousDispatcher.L(href, as, options);
  28287. var ownerDocument = globalDocument;
  28288. if (ownerDocument && href && as) {
  28289. var preloadSelector =
  28290. 'link[rel="preload"][as="' +
  28291. escapeSelectorAttributeValueInsideDoubleQuotes(as) +
  28292. '"]';
  28293. "image" === as
  28294. ? options && options.imageSrcSet
  28295. ? ((preloadSelector +=
  28296. '[imagesrcset="' +
  28297. escapeSelectorAttributeValueInsideDoubleQuotes(
  28298. options.imageSrcSet
  28299. ) +
  28300. '"]'),
  28301. "string" === typeof options.imageSizes &&
  28302. (preloadSelector +=
  28303. '[imagesizes="' +
  28304. escapeSelectorAttributeValueInsideDoubleQuotes(
  28305. options.imageSizes
  28306. ) +
  28307. '"]'))
  28308. : (preloadSelector +=
  28309. '[href="' +
  28310. escapeSelectorAttributeValueInsideDoubleQuotes(href) +
  28311. '"]')
  28312. : (preloadSelector +=
  28313. '[href="' +
  28314. escapeSelectorAttributeValueInsideDoubleQuotes(href) +
  28315. '"]');
  28316. var key = preloadSelector;
  28317. switch (as) {
  28318. case "style":
  28319. key = getStyleKey(href);
  28320. break;
  28321. case "script":
  28322. key = getScriptKey(href);
  28323. }
  28324. preloadPropsMap.has(key) ||
  28325. ((href = assign(
  28326. {
  28327. rel: "preload",
  28328. href:
  28329. "image" === as && options && options.imageSrcSet
  28330. ? void 0
  28331. : href,
  28332. as: as
  28333. },
  28334. options
  28335. )),
  28336. preloadPropsMap.set(key, href),
  28337. null !== ownerDocument.querySelector(preloadSelector) ||
  28338. ("style" === as &&
  28339. ownerDocument.querySelector(
  28340. getStylesheetSelectorFromKey(key)
  28341. )) ||
  28342. ("script" === as &&
  28343. ownerDocument.querySelector(getScriptSelectorFromKey(key))) ||
  28344. ((as = ownerDocument.createElement("link")),
  28345. setInitialProperties(as, "link", href),
  28346. markNodeAsHoistable(as),
  28347. ownerDocument.head.appendChild(as)));
  28348. }
  28349. },
  28350. m: function (href, options) {
  28351. previousDispatcher.m(href, options);
  28352. var ownerDocument = globalDocument;
  28353. if (ownerDocument && href) {
  28354. var as =
  28355. options && "string" === typeof options.as ? options.as : "script",
  28356. preloadSelector =
  28357. 'link[rel="modulepreload"][as="' +
  28358. escapeSelectorAttributeValueInsideDoubleQuotes(as) +
  28359. '"][href="' +
  28360. escapeSelectorAttributeValueInsideDoubleQuotes(href) +
  28361. '"]',
  28362. key = preloadSelector;
  28363. switch (as) {
  28364. case "audioworklet":
  28365. case "paintworklet":
  28366. case "serviceworker":
  28367. case "sharedworker":
  28368. case "worker":
  28369. case "script":
  28370. key = getScriptKey(href);
  28371. }
  28372. if (
  28373. !preloadPropsMap.has(key) &&
  28374. ((href = assign({ rel: "modulepreload", href: href }, options)),
  28375. preloadPropsMap.set(key, href),
  28376. null === ownerDocument.querySelector(preloadSelector))
  28377. ) {
  28378. switch (as) {
  28379. case "audioworklet":
  28380. case "paintworklet":
  28381. case "serviceworker":
  28382. case "sharedworker":
  28383. case "worker":
  28384. case "script":
  28385. if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
  28386. return;
  28387. }
  28388. as = ownerDocument.createElement("link");
  28389. setInitialProperties(as, "link", href);
  28390. markNodeAsHoistable(as);
  28391. ownerDocument.head.appendChild(as);
  28392. }
  28393. }
  28394. },
  28395. X: function (src, options) {
  28396. previousDispatcher.X(src, options);
  28397. var ownerDocument = globalDocument;
  28398. if (ownerDocument && src) {
  28399. var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
  28400. key = getScriptKey(src),
  28401. resource = scripts.get(key);
  28402. resource ||
  28403. ((resource = ownerDocument.querySelector(
  28404. getScriptSelectorFromKey(key)
  28405. )),
  28406. resource ||
  28407. ((src = assign({ src: src, async: true }, options)),
  28408. (options = preloadPropsMap.get(key)) &&
  28409. adoptPreloadPropsForScript(src, options),
  28410. (resource = ownerDocument.createElement("script")),
  28411. markNodeAsHoistable(resource),
  28412. setInitialProperties(resource, "link", src),
  28413. ownerDocument.head.appendChild(resource)),
  28414. (resource = {
  28415. type: "script",
  28416. instance: resource,
  28417. count: 1,
  28418. state: null
  28419. }),
  28420. scripts.set(key, resource));
  28421. }
  28422. },
  28423. S: function (href, precedence, options) {
  28424. previousDispatcher.S(href, precedence, options);
  28425. var ownerDocument = globalDocument;
  28426. if (ownerDocument && href) {
  28427. var styles = getResourcesFromRoot(ownerDocument).hoistableStyles,
  28428. key = getStyleKey(href);
  28429. precedence = precedence || "default";
  28430. var resource = styles.get(key);
  28431. if (!resource) {
  28432. var state = { loading: NotLoaded, preload: null };
  28433. if (
  28434. (resource = ownerDocument.querySelector(
  28435. getStylesheetSelectorFromKey(key)
  28436. ))
  28437. )
  28438. state.loading = Loaded | Inserted;
  28439. else {
  28440. href = assign(
  28441. {
  28442. rel: "stylesheet",
  28443. href: href,
  28444. "data-precedence": precedence
  28445. },
  28446. options
  28447. );
  28448. (options = preloadPropsMap.get(key)) &&
  28449. adoptPreloadPropsForStylesheet(href, options);
  28450. var link = (resource = ownerDocument.createElement("link"));
  28451. markNodeAsHoistable(link);
  28452. setInitialProperties(link, "link", href);
  28453. link._p = new Promise(function (resolve, reject) {
  28454. link.onload = resolve;
  28455. link.onerror = reject;
  28456. });
  28457. link.addEventListener("load", function () {
  28458. state.loading |= Loaded;
  28459. });
  28460. link.addEventListener("error", function () {
  28461. state.loading |= Errored;
  28462. });
  28463. state.loading |= Inserted;
  28464. insertStylesheet(resource, precedence, ownerDocument);
  28465. }
  28466. resource = {
  28467. type: "stylesheet",
  28468. instance: resource,
  28469. count: 1,
  28470. state: state
  28471. };
  28472. styles.set(key, resource);
  28473. }
  28474. }
  28475. },
  28476. M: function (src, options) {
  28477. previousDispatcher.M(src, options);
  28478. var ownerDocument = globalDocument;
  28479. if (ownerDocument && src) {
  28480. var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
  28481. key = getScriptKey(src),
  28482. resource = scripts.get(key);
  28483. resource ||
  28484. ((resource = ownerDocument.querySelector(
  28485. getScriptSelectorFromKey(key)
  28486. )),
  28487. resource ||
  28488. ((src = assign({ src: src, async: true, type: "module" }, options)),
  28489. (options = preloadPropsMap.get(key)) &&
  28490. adoptPreloadPropsForScript(src, options),
  28491. (resource = ownerDocument.createElement("script")),
  28492. markNodeAsHoistable(resource),
  28493. setInitialProperties(resource, "link", src),
  28494. ownerDocument.head.appendChild(resource)),
  28495. (resource = {
  28496. type: "script",
  28497. instance: resource,
  28498. count: 1,
  28499. state: null
  28500. }),
  28501. scripts.set(key, resource));
  28502. }
  28503. }
  28504. };
  28505. var globalDocument = "undefined" === typeof document ? null : document,
  28506. tagCaches = null,
  28507. SUSPENSEY_STYLESHEET_TIMEOUT = 6e4,
  28508. SUSPENSEY_IMAGE_TIMEOUT = 800,
  28509. SUSPENSEY_IMAGE_TIME_ESTIMATE = 500,
  28510. estimatedBytesWithinLimit = 0,
  28511. LAST_PRECEDENCE = null,
  28512. precedencesByRoot = null,
  28513. NotPendingTransition = NotPending,
  28514. HostTransitionContext = {
  28515. $$typeof: REACT_CONTEXT_TYPE,
  28516. Provider: null,
  28517. Consumer: null,
  28518. _currentValue: NotPendingTransition,
  28519. _currentValue2: NotPendingTransition,
  28520. _threadCount: 0
  28521. },
  28522. badgeFormat = "%c%s%c",
  28523. badgeStyle =
  28524. "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
  28525. resetStyle = "",
  28526. pad = " ",
  28527. bind = Function.prototype.bind;
  28528. var didWarnAboutNestedUpdates = false;
  28529. var overrideHookState = null,
  28530. overrideHookStateDeletePath = null,
  28531. overrideHookStateRenamePath = null,
  28532. overrideProps = null,
  28533. overridePropsDeletePath = null,
  28534. overridePropsRenamePath = null,
  28535. scheduleUpdate = null,
  28536. scheduleRetry = null,
  28537. setErrorHandler = null,
  28538. setSuspenseHandler = null;
  28539. overrideHookState = function (fiber, id, path, value) {
  28540. id = findHook(fiber, id);
  28541. null !== id &&
  28542. ((path = copyWithSetImpl(id.memoizedState, path, 0, value)),
  28543. (id.memoizedState = path),
  28544. (id.baseState = path),
  28545. (fiber.memoizedProps = assign({}, fiber.memoizedProps)),
  28546. (path = enqueueConcurrentRenderForLane(fiber, 2)),
  28547. null !== path && scheduleUpdateOnFiber(path, fiber, 2));
  28548. };
  28549. overrideHookStateDeletePath = function (fiber, id, path) {
  28550. id = findHook(fiber, id);
  28551. null !== id &&
  28552. ((path = copyWithDeleteImpl(id.memoizedState, path, 0)),
  28553. (id.memoizedState = path),
  28554. (id.baseState = path),
  28555. (fiber.memoizedProps = assign({}, fiber.memoizedProps)),
  28556. (path = enqueueConcurrentRenderForLane(fiber, 2)),
  28557. null !== path && scheduleUpdateOnFiber(path, fiber, 2));
  28558. };
  28559. overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {
  28560. id = findHook(fiber, id);
  28561. null !== id &&
  28562. ((oldPath = copyWithRename(id.memoizedState, oldPath, newPath)),
  28563. (id.memoizedState = oldPath),
  28564. (id.baseState = oldPath),
  28565. (fiber.memoizedProps = assign({}, fiber.memoizedProps)),
  28566. (oldPath = enqueueConcurrentRenderForLane(fiber, 2)),
  28567. null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2));
  28568. };
  28569. overrideProps = function (fiber, path, value) {
  28570. fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path, 0, value);
  28571. fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
  28572. path = enqueueConcurrentRenderForLane(fiber, 2);
  28573. null !== path && scheduleUpdateOnFiber(path, fiber, 2);
  28574. };
  28575. overridePropsDeletePath = function (fiber, path) {
  28576. fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path, 0);
  28577. fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
  28578. path = enqueueConcurrentRenderForLane(fiber, 2);
  28579. null !== path && scheduleUpdateOnFiber(path, fiber, 2);
  28580. };
  28581. overridePropsRenamePath = function (fiber, oldPath, newPath) {
  28582. fiber.pendingProps = copyWithRename(
  28583. fiber.memoizedProps,
  28584. oldPath,
  28585. newPath
  28586. );
  28587. fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
  28588. oldPath = enqueueConcurrentRenderForLane(fiber, 2);
  28589. null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2);
  28590. };
  28591. scheduleUpdate = function (fiber) {
  28592. var root = enqueueConcurrentRenderForLane(fiber, 2);
  28593. null !== root && scheduleUpdateOnFiber(root, fiber, 2);
  28594. };
  28595. scheduleRetry = function (fiber) {
  28596. var lane = claimNextRetryLane(),
  28597. root = enqueueConcurrentRenderForLane(fiber, lane);
  28598. null !== root && scheduleUpdateOnFiber(root, fiber, lane);
  28599. };
  28600. setErrorHandler = function (newShouldErrorImpl) {
  28601. shouldErrorImpl = newShouldErrorImpl;
  28602. };
  28603. setSuspenseHandler = function (newShouldSuspendImpl) {
  28604. shouldSuspendImpl = newShouldSuspendImpl;
  28605. };
  28606. var _enabled = true,
  28607. return_targetInst = null,
  28608. hasScheduledReplayAttempt = false,
  28609. queuedFocus = null,
  28610. queuedDrag = null,
  28611. queuedMouse = null,
  28612. queuedPointers = new Map(),
  28613. queuedPointerCaptures = new Map(),
  28614. queuedExplicitHydrationTargets = [],
  28615. discreteReplayableEvents =
  28616. "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(
  28617. " "
  28618. ),
  28619. lastScheduledReplayQueue = null;
  28620. ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =
  28621. function (children) {
  28622. var root = this._internalRoot;
  28623. if (null === root) throw Error("Cannot update an unmounted root.");
  28624. var args = arguments;
  28625. "function" === typeof args[1]
  28626. ? console.error(
  28627. "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
  28628. )
  28629. : isValidContainer(args[1])
  28630. ? console.error(
  28631. "You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."
  28632. )
  28633. : "undefined" !== typeof args[1] &&
  28634. console.error(
  28635. "You passed a second argument to root.render(...) but it only accepts one argument."
  28636. );
  28637. args = children;
  28638. var current = root.current,
  28639. lane = requestUpdateLane(current);
  28640. updateContainerImpl(current, lane, args, root, null, null);
  28641. };
  28642. ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =
  28643. function () {
  28644. var args = arguments;
  28645. "function" === typeof args[0] &&
  28646. console.error(
  28647. "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
  28648. );
  28649. args = this._internalRoot;
  28650. if (null !== args) {
  28651. this._internalRoot = null;
  28652. var container = args.containerInfo;
  28653. (executionContext & (RenderContext | CommitContext)) !== NoContext &&
  28654. console.error(
  28655. "Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."
  28656. );
  28657. updateContainerImpl(args.current, 2, null, args, null, null);
  28658. flushSyncWork$1();
  28659. container[internalContainerInstanceKey] = null;
  28660. }
  28661. };
  28662. ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (
  28663. target
  28664. ) {
  28665. if (target) {
  28666. var updatePriority = resolveUpdatePriority();
  28667. target = { blockedOn: null, target: target, priority: updatePriority };
  28668. for (
  28669. var i = 0;
  28670. i < queuedExplicitHydrationTargets.length &&
  28671. 0 !== updatePriority &&
  28672. updatePriority < queuedExplicitHydrationTargets[i].priority;
  28673. i++
  28674. );
  28675. queuedExplicitHydrationTargets.splice(i, 0, target);
  28676. 0 === i && attemptExplicitHydrationTarget(target);
  28677. }
  28678. };
  28679. (function () {
  28680. var isomorphicReactPackageVersion = React.version;
  28681. if ("19.2.4" !== isomorphicReactPackageVersion)
  28682. throw Error(
  28683. 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
  28684. (isomorphicReactPackageVersion +
  28685. "\n - react-dom: 19.2.4\nLearn more: https://react.dev/warnings/version-mismatch")
  28686. );
  28687. })();
  28688. ("function" === typeof Map &&
  28689. null != Map.prototype &&
  28690. "function" === typeof Map.prototype.forEach &&
  28691. "function" === typeof Set &&
  28692. null != Set.prototype &&
  28693. "function" === typeof Set.prototype.clear &&
  28694. "function" === typeof Set.prototype.forEach) ||
  28695. console.error(
  28696. "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"
  28697. );
  28698. ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
  28699. var fiber = componentOrElement._reactInternals;
  28700. if (void 0 === fiber) {
  28701. if ("function" === typeof componentOrElement.render)
  28702. throw Error("Unable to find node on an unmounted component.");
  28703. componentOrElement = Object.keys(componentOrElement).join(",");
  28704. throw Error(
  28705. "Argument appears to not be a ReactComponent. Keys: " +
  28706. componentOrElement
  28707. );
  28708. }
  28709. componentOrElement = findCurrentFiberUsingSlowPath(fiber);
  28710. componentOrElement =
  28711. null !== componentOrElement
  28712. ? findCurrentHostFiberImpl(componentOrElement)
  28713. : null;
  28714. componentOrElement =
  28715. null === componentOrElement ? null : componentOrElement.stateNode;
  28716. return componentOrElement;
  28717. };
  28718. if (
  28719. !(function () {
  28720. var internals = {
  28721. bundleType: 1,
  28722. version: "19.2.4",
  28723. rendererPackageName: "react-dom",
  28724. currentDispatcherRef: ReactSharedInternals,
  28725. reconcilerVersion: "19.2.4"
  28726. };
  28727. internals.overrideHookState = overrideHookState;
  28728. internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
  28729. internals.overrideHookStateRenamePath = overrideHookStateRenamePath;
  28730. internals.overrideProps = overrideProps;
  28731. internals.overridePropsDeletePath = overridePropsDeletePath;
  28732. internals.overridePropsRenamePath = overridePropsRenamePath;
  28733. internals.scheduleUpdate = scheduleUpdate;
  28734. internals.scheduleRetry = scheduleRetry;
  28735. internals.setErrorHandler = setErrorHandler;
  28736. internals.setSuspenseHandler = setSuspenseHandler;
  28737. internals.scheduleRefresh = scheduleRefresh;
  28738. internals.scheduleRoot = scheduleRoot;
  28739. internals.setRefreshHandler = setRefreshHandler;
  28740. internals.getCurrentFiber = getCurrentFiberForDevTools;
  28741. return injectInternals(internals);
  28742. })() &&
  28743. canUseDOM &&
  28744. window.top === window.self &&
  28745. ((-1 < navigator.userAgent.indexOf("Chrome") &&
  28746. -1 === navigator.userAgent.indexOf("Edge")) ||
  28747. -1 < navigator.userAgent.indexOf("Firefox"))
  28748. ) {
  28749. var protocol = window.location.protocol;
  28750. /^(https?|file):$/.test(protocol) &&
  28751. console.info(
  28752. "%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools" +
  28753. ("file:" === protocol
  28754. ? "\nYou might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq"
  28755. : ""),
  28756. "font-weight:bold"
  28757. );
  28758. }
  28759. reactDomClient_development.createRoot = function (container, options) {
  28760. if (!isValidContainer(container))
  28761. throw Error("Target container is not a DOM element.");
  28762. warnIfReactDOMContainerInDEV(container);
  28763. var isStrictMode = false,
  28764. identifierPrefix = "",
  28765. onUncaughtError = defaultOnUncaughtError,
  28766. onCaughtError = defaultOnCaughtError,
  28767. onRecoverableError = defaultOnRecoverableError;
  28768. null !== options &&
  28769. void 0 !== options &&
  28770. (options.hydrate
  28771. ? console.warn(
  28772. "hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."
  28773. )
  28774. : "object" === typeof options &&
  28775. null !== options &&
  28776. options.$$typeof === REACT_ELEMENT_TYPE &&
  28777. console.error(
  28778. "You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\n\n let root = createRoot(domContainer);\n root.render(<App />);"
  28779. ),
  28780. true === options.unstable_strictMode && (isStrictMode = true),
  28781. void 0 !== options.identifierPrefix &&
  28782. (identifierPrefix = options.identifierPrefix),
  28783. void 0 !== options.onUncaughtError &&
  28784. (onUncaughtError = options.onUncaughtError),
  28785. void 0 !== options.onCaughtError &&
  28786. (onCaughtError = options.onCaughtError),
  28787. void 0 !== options.onRecoverableError &&
  28788. (onRecoverableError = options.onRecoverableError));
  28789. options = createFiberRoot(
  28790. container,
  28791. 1,
  28792. false,
  28793. null,
  28794. null,
  28795. isStrictMode,
  28796. identifierPrefix,
  28797. null,
  28798. onUncaughtError,
  28799. onCaughtError,
  28800. onRecoverableError,
  28801. defaultOnDefaultTransitionIndicator
  28802. );
  28803. container[internalContainerInstanceKey] = options.current;
  28804. listenToAllSupportedEvents(container);
  28805. return new ReactDOMRoot(options);
  28806. };
  28807. reactDomClient_development.hydrateRoot = function (container, initialChildren, options) {
  28808. if (!isValidContainer(container))
  28809. throw Error("Target container is not a DOM element.");
  28810. warnIfReactDOMContainerInDEV(container);
  28811. void 0 === initialChildren &&
  28812. console.error(
  28813. "Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)"
  28814. );
  28815. var isStrictMode = false,
  28816. identifierPrefix = "",
  28817. onUncaughtError = defaultOnUncaughtError,
  28818. onCaughtError = defaultOnCaughtError,
  28819. onRecoverableError = defaultOnRecoverableError,
  28820. formState = null;
  28821. null !== options &&
  28822. void 0 !== options &&
  28823. (true === options.unstable_strictMode && (isStrictMode = true),
  28824. void 0 !== options.identifierPrefix &&
  28825. (identifierPrefix = options.identifierPrefix),
  28826. void 0 !== options.onUncaughtError &&
  28827. (onUncaughtError = options.onUncaughtError),
  28828. void 0 !== options.onCaughtError &&
  28829. (onCaughtError = options.onCaughtError),
  28830. void 0 !== options.onRecoverableError &&
  28831. (onRecoverableError = options.onRecoverableError),
  28832. void 0 !== options.formState && (formState = options.formState));
  28833. initialChildren = createFiberRoot(
  28834. container,
  28835. 1,
  28836. true,
  28837. initialChildren,
  28838. null != options ? options : null,
  28839. isStrictMode,
  28840. identifierPrefix,
  28841. formState,
  28842. onUncaughtError,
  28843. onCaughtError,
  28844. onRecoverableError,
  28845. defaultOnDefaultTransitionIndicator
  28846. );
  28847. initialChildren.context = getContextForSubtree(null);
  28848. options = initialChildren.current;
  28849. isStrictMode = requestUpdateLane(options);
  28850. isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);
  28851. identifierPrefix = createUpdate(isStrictMode);
  28852. identifierPrefix.callback = null;
  28853. enqueueUpdate(options, identifierPrefix, isStrictMode);
  28854. startUpdateTimerByLane(isStrictMode, "hydrateRoot()", null);
  28855. options = isStrictMode;
  28856. initialChildren.current.lanes = options;
  28857. markRootUpdated$1(initialChildren, options);
  28858. ensureRootIsScheduled(initialChildren);
  28859. container[internalContainerInstanceKey] = initialChildren.current;
  28860. listenToAllSupportedEvents(container);
  28861. return new ReactDOMHydrationRoot(initialChildren);
  28862. };
  28863. reactDomClient_development.version = "19.2.4";
  28864. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  28865. "function" ===
  28866. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
  28867. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  28868. }))();
  28869. return reactDomClient_development;
  28870. }
  28871. var hasRequiredClient;
  28872. function requireClient () {
  28873. if (hasRequiredClient) return client.exports;
  28874. hasRequiredClient = 1;
  28875. {
  28876. client.exports = requireReactDomClient_development();
  28877. }
  28878. return client.exports;
  28879. }
  28880. var clientExports = requireClient();
  28881. var reactDomEntry = { ...ReactDOM, createRoot: clientExports.createRoot, hydrateRoot: clientExports.hydrateRoot };
  28882. return reactDomEntry;
  28883. }));