react-dom-server.edge.production.js 267 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512
  1. /**
  2. * @license React
  3. * react-dom-server.edge.production.js
  4. *
  5. * Copyright (c) Meta Platforms, Inc. and affiliates.
  6. *
  7. * This source code is licensed under the MIT license found in the
  8. * LICENSE file in the root directory of this source tree.
  9. */
  10. /*
  11. JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)
  12. Copyright (c) 2011 Gary Court
  13. Permission is hereby granted, free of charge, to any person obtaining a copy
  14. of this software and associated documentation files (the "Software"), to deal
  15. in the Software without restriction, including without limitation the rights
  16. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  17. copies of the Software, and to permit persons to whom the Software is
  18. furnished to do so, subject to the following conditions:
  19. The above copyright notice and this permission notice shall be included in
  20. all copies or substantial portions of the Software.
  21. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  22. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  23. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  24. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  25. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  26. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  27. SOFTWARE.
  28. */
  29. "use strict";
  30. var React = require("react"),
  31. ReactDOM = require("react-dom"),
  32. REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
  33. REACT_PORTAL_TYPE = Symbol.for("react.portal"),
  34. REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
  35. REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
  36. REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
  37. REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
  38. REACT_CONTEXT_TYPE = Symbol.for("react.context"),
  39. REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
  40. REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
  41. REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
  42. REACT_MEMO_TYPE = Symbol.for("react.memo"),
  43. REACT_LAZY_TYPE = Symbol.for("react.lazy"),
  44. REACT_SCOPE_TYPE = Symbol.for("react.scope"),
  45. REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
  46. REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
  47. REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
  48. REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
  49. MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
  50. function getIteratorFn(maybeIterable) {
  51. if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
  52. maybeIterable =
  53. (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
  54. maybeIterable["@@iterator"];
  55. return "function" === typeof maybeIterable ? maybeIterable : null;
  56. }
  57. var isArrayImpl = Array.isArray;
  58. function murmurhash3_32_gc(key, seed) {
  59. var remainder = key.length & 3;
  60. var bytes = key.length - remainder;
  61. var h1 = seed;
  62. for (seed = 0; seed < bytes; ) {
  63. var k1 =
  64. (key.charCodeAt(seed) & 255) |
  65. ((key.charCodeAt(++seed) & 255) << 8) |
  66. ((key.charCodeAt(++seed) & 255) << 16) |
  67. ((key.charCodeAt(++seed) & 255) << 24);
  68. ++seed;
  69. k1 =
  70. (3432918353 * (k1 & 65535) +
  71. (((3432918353 * (k1 >>> 16)) & 65535) << 16)) &
  72. 4294967295;
  73. k1 = (k1 << 15) | (k1 >>> 17);
  74. k1 =
  75. (461845907 * (k1 & 65535) + (((461845907 * (k1 >>> 16)) & 65535) << 16)) &
  76. 4294967295;
  77. h1 ^= k1;
  78. h1 = (h1 << 13) | (h1 >>> 19);
  79. h1 = (5 * (h1 & 65535) + (((5 * (h1 >>> 16)) & 65535) << 16)) & 4294967295;
  80. h1 = (h1 & 65535) + 27492 + ((((h1 >>> 16) + 58964) & 65535) << 16);
  81. }
  82. k1 = 0;
  83. switch (remainder) {
  84. case 3:
  85. k1 ^= (key.charCodeAt(seed + 2) & 255) << 16;
  86. case 2:
  87. k1 ^= (key.charCodeAt(seed + 1) & 255) << 8;
  88. case 1:
  89. (k1 ^= key.charCodeAt(seed) & 255),
  90. (k1 =
  91. (3432918353 * (k1 & 65535) +
  92. (((3432918353 * (k1 >>> 16)) & 65535) << 16)) &
  93. 4294967295),
  94. (k1 = (k1 << 15) | (k1 >>> 17)),
  95. (h1 ^=
  96. (461845907 * (k1 & 65535) +
  97. (((461845907 * (k1 >>> 16)) & 65535) << 16)) &
  98. 4294967295);
  99. }
  100. h1 ^= key.length;
  101. h1 ^= h1 >>> 16;
  102. h1 =
  103. (2246822507 * (h1 & 65535) + (((2246822507 * (h1 >>> 16)) & 65535) << 16)) &
  104. 4294967295;
  105. h1 ^= h1 >>> 13;
  106. h1 =
  107. (3266489909 * (h1 & 65535) + (((3266489909 * (h1 >>> 16)) & 65535) << 16)) &
  108. 4294967295;
  109. return (h1 ^ (h1 >>> 16)) >>> 0;
  110. }
  111. function handleErrorInNextTick(error) {
  112. setTimeout(function () {
  113. throw error;
  114. });
  115. }
  116. var LocalPromise = Promise,
  117. scheduleMicrotask =
  118. "function" === typeof queueMicrotask
  119. ? queueMicrotask
  120. : function (callback) {
  121. LocalPromise.resolve(null)
  122. .then(callback)
  123. .catch(handleErrorInNextTick);
  124. },
  125. currentView = null,
  126. writtenBytes = 0;
  127. function writeChunk(destination, chunk) {
  128. if (0 !== chunk.byteLength)
  129. if (2048 < chunk.byteLength)
  130. 0 < writtenBytes &&
  131. (destination.enqueue(
  132. new Uint8Array(currentView.buffer, 0, writtenBytes)
  133. ),
  134. (currentView = new Uint8Array(2048)),
  135. (writtenBytes = 0)),
  136. destination.enqueue(chunk);
  137. else {
  138. var allowableBytes = currentView.length - writtenBytes;
  139. allowableBytes < chunk.byteLength &&
  140. (0 === allowableBytes
  141. ? destination.enqueue(currentView)
  142. : (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes),
  143. destination.enqueue(currentView),
  144. (chunk = chunk.subarray(allowableBytes))),
  145. (currentView = new Uint8Array(2048)),
  146. (writtenBytes = 0));
  147. currentView.set(chunk, writtenBytes);
  148. writtenBytes += chunk.byteLength;
  149. }
  150. }
  151. function writeChunkAndReturn(destination, chunk) {
  152. writeChunk(destination, chunk);
  153. return !0;
  154. }
  155. function completeWriting(destination) {
  156. currentView &&
  157. 0 < writtenBytes &&
  158. (destination.enqueue(new Uint8Array(currentView.buffer, 0, writtenBytes)),
  159. (currentView = null),
  160. (writtenBytes = 0));
  161. }
  162. var textEncoder = new TextEncoder();
  163. function stringToChunk(content) {
  164. return textEncoder.encode(content);
  165. }
  166. function stringToPrecomputedChunk(content) {
  167. return textEncoder.encode(content);
  168. }
  169. function byteLengthOfChunk(chunk) {
  170. return chunk.byteLength;
  171. }
  172. function closeWithError(destination, error) {
  173. "function" === typeof destination.error
  174. ? destination.error(error)
  175. : destination.close();
  176. }
  177. var assign = Object.assign,
  178. hasOwnProperty = Object.prototype.hasOwnProperty,
  179. VALID_ATTRIBUTE_NAME_REGEX = RegExp(
  180. "^[: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]*$"
  181. ),
  182. illegalAttributeNameCache = {},
  183. validatedAttributeNameCache = {};
  184. function isAttributeNameSafe(attributeName) {
  185. if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
  186. return !0;
  187. if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;
  188. if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
  189. return (validatedAttributeNameCache[attributeName] = !0);
  190. illegalAttributeNameCache[attributeName] = !0;
  191. return !1;
  192. }
  193. var unitlessNumbers = new Set(
  194. "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(
  195. " "
  196. )
  197. ),
  198. aliases = new Map([
  199. ["acceptCharset", "accept-charset"],
  200. ["htmlFor", "for"],
  201. ["httpEquiv", "http-equiv"],
  202. ["crossOrigin", "crossorigin"],
  203. ["accentHeight", "accent-height"],
  204. ["alignmentBaseline", "alignment-baseline"],
  205. ["arabicForm", "arabic-form"],
  206. ["baselineShift", "baseline-shift"],
  207. ["capHeight", "cap-height"],
  208. ["clipPath", "clip-path"],
  209. ["clipRule", "clip-rule"],
  210. ["colorInterpolation", "color-interpolation"],
  211. ["colorInterpolationFilters", "color-interpolation-filters"],
  212. ["colorProfile", "color-profile"],
  213. ["colorRendering", "color-rendering"],
  214. ["dominantBaseline", "dominant-baseline"],
  215. ["enableBackground", "enable-background"],
  216. ["fillOpacity", "fill-opacity"],
  217. ["fillRule", "fill-rule"],
  218. ["floodColor", "flood-color"],
  219. ["floodOpacity", "flood-opacity"],
  220. ["fontFamily", "font-family"],
  221. ["fontSize", "font-size"],
  222. ["fontSizeAdjust", "font-size-adjust"],
  223. ["fontStretch", "font-stretch"],
  224. ["fontStyle", "font-style"],
  225. ["fontVariant", "font-variant"],
  226. ["fontWeight", "font-weight"],
  227. ["glyphName", "glyph-name"],
  228. ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
  229. ["glyphOrientationVertical", "glyph-orientation-vertical"],
  230. ["horizAdvX", "horiz-adv-x"],
  231. ["horizOriginX", "horiz-origin-x"],
  232. ["imageRendering", "image-rendering"],
  233. ["letterSpacing", "letter-spacing"],
  234. ["lightingColor", "lighting-color"],
  235. ["markerEnd", "marker-end"],
  236. ["markerMid", "marker-mid"],
  237. ["markerStart", "marker-start"],
  238. ["overlinePosition", "overline-position"],
  239. ["overlineThickness", "overline-thickness"],
  240. ["paintOrder", "paint-order"],
  241. ["panose-1", "panose-1"],
  242. ["pointerEvents", "pointer-events"],
  243. ["renderingIntent", "rendering-intent"],
  244. ["shapeRendering", "shape-rendering"],
  245. ["stopColor", "stop-color"],
  246. ["stopOpacity", "stop-opacity"],
  247. ["strikethroughPosition", "strikethrough-position"],
  248. ["strikethroughThickness", "strikethrough-thickness"],
  249. ["strokeDasharray", "stroke-dasharray"],
  250. ["strokeDashoffset", "stroke-dashoffset"],
  251. ["strokeLinecap", "stroke-linecap"],
  252. ["strokeLinejoin", "stroke-linejoin"],
  253. ["strokeMiterlimit", "stroke-miterlimit"],
  254. ["strokeOpacity", "stroke-opacity"],
  255. ["strokeWidth", "stroke-width"],
  256. ["textAnchor", "text-anchor"],
  257. ["textDecoration", "text-decoration"],
  258. ["textRendering", "text-rendering"],
  259. ["transformOrigin", "transform-origin"],
  260. ["underlinePosition", "underline-position"],
  261. ["underlineThickness", "underline-thickness"],
  262. ["unicodeBidi", "unicode-bidi"],
  263. ["unicodeRange", "unicode-range"],
  264. ["unitsPerEm", "units-per-em"],
  265. ["vAlphabetic", "v-alphabetic"],
  266. ["vHanging", "v-hanging"],
  267. ["vIdeographic", "v-ideographic"],
  268. ["vMathematical", "v-mathematical"],
  269. ["vectorEffect", "vector-effect"],
  270. ["vertAdvY", "vert-adv-y"],
  271. ["vertOriginX", "vert-origin-x"],
  272. ["vertOriginY", "vert-origin-y"],
  273. ["wordSpacing", "word-spacing"],
  274. ["writingMode", "writing-mode"],
  275. ["xmlnsXlink", "xmlns:xlink"],
  276. ["xHeight", "x-height"]
  277. ]),
  278. matchHtmlRegExp = /["'&<>]/;
  279. function escapeTextForBrowser(text) {
  280. if (
  281. "boolean" === typeof text ||
  282. "number" === typeof text ||
  283. "bigint" === typeof text
  284. )
  285. return "" + text;
  286. text = "" + text;
  287. var match = matchHtmlRegExp.exec(text);
  288. if (match) {
  289. var html = "",
  290. index,
  291. lastIndex = 0;
  292. for (index = match.index; index < text.length; index++) {
  293. switch (text.charCodeAt(index)) {
  294. case 34:
  295. match = "&quot;";
  296. break;
  297. case 38:
  298. match = "&amp;";
  299. break;
  300. case 39:
  301. match = "&#x27;";
  302. break;
  303. case 60:
  304. match = "&lt;";
  305. break;
  306. case 62:
  307. match = "&gt;";
  308. break;
  309. default:
  310. continue;
  311. }
  312. lastIndex !== index && (html += text.slice(lastIndex, index));
  313. lastIndex = index + 1;
  314. html += match;
  315. }
  316. text = lastIndex !== index ? html + text.slice(lastIndex, index) : html;
  317. }
  318. return text;
  319. }
  320. var uppercasePattern = /([A-Z])/g,
  321. msPattern = /^ms-/,
  322. isJavaScriptProtocol =
  323. /^[\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;
  324. function sanitizeURL(url) {
  325. return isJavaScriptProtocol.test("" + url)
  326. ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')"
  327. : url;
  328. }
  329. var ReactSharedInternals =
  330. React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  331. ReactDOMSharedInternals =
  332. ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
  333. sharedNotPendingObject = {
  334. pending: !1,
  335. data: null,
  336. method: null,
  337. action: null
  338. },
  339. previousDispatcher = ReactDOMSharedInternals.d;
  340. ReactDOMSharedInternals.d = {
  341. f: previousDispatcher.f,
  342. r: previousDispatcher.r,
  343. D: prefetchDNS,
  344. C: preconnect,
  345. L: preload,
  346. m: preloadModule,
  347. X: preinitScript,
  348. S: preinitStyle,
  349. M: preinitModuleScript
  350. };
  351. var PRELOAD_NO_CREDS = [],
  352. currentlyFlushingRenderState = null;
  353. stringToPrecomputedChunk('"></template>');
  354. var startInlineScript = stringToPrecomputedChunk("<script"),
  355. endInlineScript = stringToPrecomputedChunk("\x3c/script>"),
  356. startScriptSrc = stringToPrecomputedChunk('<script src="'),
  357. startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'),
  358. scriptNonce = stringToPrecomputedChunk(' nonce="'),
  359. scriptIntegirty = stringToPrecomputedChunk(' integrity="'),
  360. scriptCrossOrigin = stringToPrecomputedChunk(' crossorigin="'),
  361. endAsyncScript = stringToPrecomputedChunk(' async="">\x3c/script>'),
  362. startInlineStyle = stringToPrecomputedChunk("<style"),
  363. scriptRegex = /(<\/|<)(s)(cript)/gi;
  364. function scriptReplacer(match, prefix, s, suffix) {
  365. return "" + prefix + ("s" === s ? "\\u0073" : "\\u0053") + suffix;
  366. }
  367. var importMapScriptStart = stringToPrecomputedChunk(
  368. '<script type="importmap">'
  369. ),
  370. importMapScriptEnd = stringToPrecomputedChunk("\x3c/script>");
  371. function createRenderState(
  372. resumableState,
  373. nonce,
  374. externalRuntimeConfig,
  375. importMap,
  376. onHeaders,
  377. maxHeadersLength
  378. ) {
  379. externalRuntimeConfig =
  380. "string" === typeof nonce ? nonce : nonce && nonce.script;
  381. var inlineScriptWithNonce =
  382. void 0 === externalRuntimeConfig
  383. ? startInlineScript
  384. : stringToPrecomputedChunk(
  385. '<script nonce="' +
  386. escapeTextForBrowser(externalRuntimeConfig) +
  387. '"'
  388. ),
  389. nonceStyle = "string" === typeof nonce ? void 0 : nonce && nonce.style,
  390. inlineStyleWithNonce =
  391. void 0 === nonceStyle
  392. ? startInlineStyle
  393. : stringToPrecomputedChunk(
  394. '<style nonce="' + escapeTextForBrowser(nonceStyle) + '"'
  395. ),
  396. idPrefix = resumableState.idPrefix,
  397. bootstrapChunks = [],
  398. bootstrapScriptContent = resumableState.bootstrapScriptContent,
  399. bootstrapScripts = resumableState.bootstrapScripts,
  400. bootstrapModules = resumableState.bootstrapModules;
  401. void 0 !== bootstrapScriptContent &&
  402. (bootstrapChunks.push(inlineScriptWithNonce),
  403. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  404. bootstrapChunks.push(
  405. endOfStartTag,
  406. stringToChunk(
  407. ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer)
  408. ),
  409. endInlineScript
  410. ));
  411. bootstrapScriptContent = [];
  412. void 0 !== importMap &&
  413. (bootstrapScriptContent.push(importMapScriptStart),
  414. bootstrapScriptContent.push(
  415. stringToChunk(
  416. ("" + JSON.stringify(importMap)).replace(scriptRegex, scriptReplacer)
  417. )
  418. ),
  419. bootstrapScriptContent.push(importMapScriptEnd));
  420. importMap = onHeaders
  421. ? {
  422. preconnects: "",
  423. fontPreloads: "",
  424. highImagePreloads: "",
  425. remainingCapacity:
  426. 2 + ("number" === typeof maxHeadersLength ? maxHeadersLength : 2e3)
  427. }
  428. : null;
  429. onHeaders = {
  430. placeholderPrefix: stringToPrecomputedChunk(idPrefix + "P:"),
  431. segmentPrefix: stringToPrecomputedChunk(idPrefix + "S:"),
  432. boundaryPrefix: stringToPrecomputedChunk(idPrefix + "B:"),
  433. startInlineScript: inlineScriptWithNonce,
  434. startInlineStyle: inlineStyleWithNonce,
  435. preamble: createPreambleState(),
  436. externalRuntimeScript: null,
  437. bootstrapChunks: bootstrapChunks,
  438. importMapChunks: bootstrapScriptContent,
  439. onHeaders: onHeaders,
  440. headers: importMap,
  441. resets: {
  442. font: {},
  443. dns: {},
  444. connect: { default: {}, anonymous: {}, credentials: {} },
  445. image: {},
  446. style: {}
  447. },
  448. charsetChunks: [],
  449. viewportChunks: [],
  450. hoistableChunks: [],
  451. preconnects: new Set(),
  452. fontPreloads: new Set(),
  453. highImagePreloads: new Set(),
  454. styles: new Map(),
  455. bootstrapScripts: new Set(),
  456. scripts: new Set(),
  457. bulkPreloads: new Set(),
  458. preloads: {
  459. images: new Map(),
  460. stylesheets: new Map(),
  461. scripts: new Map(),
  462. moduleScripts: new Map()
  463. },
  464. nonce: { script: externalRuntimeConfig, style: nonceStyle },
  465. hoistableState: null,
  466. stylesToHoist: !1
  467. };
  468. if (void 0 !== bootstrapScripts)
  469. for (importMap = 0; importMap < bootstrapScripts.length; importMap++)
  470. (idPrefix = bootstrapScripts[importMap]),
  471. (nonceStyle = inlineScriptWithNonce = void 0),
  472. (inlineStyleWithNonce = {
  473. rel: "preload",
  474. as: "script",
  475. fetchPriority: "low",
  476. nonce: nonce
  477. }),
  478. "string" === typeof idPrefix
  479. ? (inlineStyleWithNonce.href = maxHeadersLength = idPrefix)
  480. : ((inlineStyleWithNonce.href = maxHeadersLength = idPrefix.src),
  481. (inlineStyleWithNonce.integrity = nonceStyle =
  482. "string" === typeof idPrefix.integrity
  483. ? idPrefix.integrity
  484. : void 0),
  485. (inlineStyleWithNonce.crossOrigin = inlineScriptWithNonce =
  486. "string" === typeof idPrefix || null == idPrefix.crossOrigin
  487. ? void 0
  488. : "use-credentials" === idPrefix.crossOrigin
  489. ? "use-credentials"
  490. : "")),
  491. (idPrefix = resumableState),
  492. (bootstrapScriptContent = maxHeadersLength),
  493. (idPrefix.scriptResources[bootstrapScriptContent] = null),
  494. (idPrefix.moduleScriptResources[bootstrapScriptContent] = null),
  495. (idPrefix = []),
  496. pushLinkImpl(idPrefix, inlineStyleWithNonce),
  497. onHeaders.bootstrapScripts.add(idPrefix),
  498. bootstrapChunks.push(
  499. startScriptSrc,
  500. stringToChunk(escapeTextForBrowser(maxHeadersLength)),
  501. attributeEnd
  502. ),
  503. externalRuntimeConfig &&
  504. bootstrapChunks.push(
  505. scriptNonce,
  506. stringToChunk(escapeTextForBrowser(externalRuntimeConfig)),
  507. attributeEnd
  508. ),
  509. "string" === typeof nonceStyle &&
  510. bootstrapChunks.push(
  511. scriptIntegirty,
  512. stringToChunk(escapeTextForBrowser(nonceStyle)),
  513. attributeEnd
  514. ),
  515. "string" === typeof inlineScriptWithNonce &&
  516. bootstrapChunks.push(
  517. scriptCrossOrigin,
  518. stringToChunk(escapeTextForBrowser(inlineScriptWithNonce)),
  519. attributeEnd
  520. ),
  521. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  522. bootstrapChunks.push(endAsyncScript);
  523. if (void 0 !== bootstrapModules)
  524. for (nonce = 0; nonce < bootstrapModules.length; nonce++)
  525. (nonceStyle = bootstrapModules[nonce]),
  526. (maxHeadersLength = importMap = void 0),
  527. (inlineScriptWithNonce = {
  528. rel: "modulepreload",
  529. fetchPriority: "low",
  530. nonce: externalRuntimeConfig
  531. }),
  532. "string" === typeof nonceStyle
  533. ? (inlineScriptWithNonce.href = bootstrapScripts = nonceStyle)
  534. : ((inlineScriptWithNonce.href = bootstrapScripts = nonceStyle.src),
  535. (inlineScriptWithNonce.integrity = maxHeadersLength =
  536. "string" === typeof nonceStyle.integrity
  537. ? nonceStyle.integrity
  538. : void 0),
  539. (inlineScriptWithNonce.crossOrigin = importMap =
  540. "string" === typeof nonceStyle || null == nonceStyle.crossOrigin
  541. ? void 0
  542. : "use-credentials" === nonceStyle.crossOrigin
  543. ? "use-credentials"
  544. : "")),
  545. (nonceStyle = resumableState),
  546. (inlineStyleWithNonce = bootstrapScripts),
  547. (nonceStyle.scriptResources[inlineStyleWithNonce] = null),
  548. (nonceStyle.moduleScriptResources[inlineStyleWithNonce] = null),
  549. (nonceStyle = []),
  550. pushLinkImpl(nonceStyle, inlineScriptWithNonce),
  551. onHeaders.bootstrapScripts.add(nonceStyle),
  552. bootstrapChunks.push(
  553. startModuleSrc,
  554. stringToChunk(escapeTextForBrowser(bootstrapScripts)),
  555. attributeEnd
  556. ),
  557. externalRuntimeConfig &&
  558. bootstrapChunks.push(
  559. scriptNonce,
  560. stringToChunk(escapeTextForBrowser(externalRuntimeConfig)),
  561. attributeEnd
  562. ),
  563. "string" === typeof maxHeadersLength &&
  564. bootstrapChunks.push(
  565. scriptIntegirty,
  566. stringToChunk(escapeTextForBrowser(maxHeadersLength)),
  567. attributeEnd
  568. ),
  569. "string" === typeof importMap &&
  570. bootstrapChunks.push(
  571. scriptCrossOrigin,
  572. stringToChunk(escapeTextForBrowser(importMap)),
  573. attributeEnd
  574. ),
  575. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  576. bootstrapChunks.push(endAsyncScript);
  577. return onHeaders;
  578. }
  579. function createResumableState(
  580. identifierPrefix,
  581. externalRuntimeConfig,
  582. bootstrapScriptContent,
  583. bootstrapScripts,
  584. bootstrapModules
  585. ) {
  586. return {
  587. idPrefix: void 0 === identifierPrefix ? "" : identifierPrefix,
  588. nextFormID: 0,
  589. streamingFormat: 0,
  590. bootstrapScriptContent: bootstrapScriptContent,
  591. bootstrapScripts: bootstrapScripts,
  592. bootstrapModules: bootstrapModules,
  593. instructions: 0,
  594. hasBody: !1,
  595. hasHtml: !1,
  596. unknownResources: {},
  597. dnsResources: {},
  598. connectResources: { default: {}, anonymous: {}, credentials: {} },
  599. imageResources: {},
  600. styleResources: {},
  601. scriptResources: {},
  602. moduleUnknownResources: {},
  603. moduleScriptResources: {}
  604. };
  605. }
  606. function createPreambleState() {
  607. return { htmlChunks: null, headChunks: null, bodyChunks: null };
  608. }
  609. function createFormatContext(
  610. insertionMode,
  611. selectedValue,
  612. tagScope,
  613. viewTransition
  614. ) {
  615. return {
  616. insertionMode: insertionMode,
  617. selectedValue: selectedValue,
  618. tagScope: tagScope,
  619. viewTransition: viewTransition
  620. };
  621. }
  622. function createRootFormatContext(namespaceURI) {
  623. return createFormatContext(
  624. "http://www.w3.org/2000/svg" === namespaceURI
  625. ? 4
  626. : "http://www.w3.org/1998/Math/MathML" === namespaceURI
  627. ? 5
  628. : 0,
  629. null,
  630. 0,
  631. null
  632. );
  633. }
  634. function getChildFormatContext(parentContext, type, props) {
  635. var subtreeScope = parentContext.tagScope & -25;
  636. switch (type) {
  637. case "noscript":
  638. return createFormatContext(2, null, subtreeScope | 1, null);
  639. case "select":
  640. return createFormatContext(
  641. 2,
  642. null != props.value ? props.value : props.defaultValue,
  643. subtreeScope,
  644. null
  645. );
  646. case "svg":
  647. return createFormatContext(4, null, subtreeScope, null);
  648. case "picture":
  649. return createFormatContext(2, null, subtreeScope | 2, null);
  650. case "math":
  651. return createFormatContext(5, null, subtreeScope, null);
  652. case "foreignObject":
  653. return createFormatContext(2, null, subtreeScope, null);
  654. case "table":
  655. return createFormatContext(6, null, subtreeScope, null);
  656. case "thead":
  657. case "tbody":
  658. case "tfoot":
  659. return createFormatContext(7, null, subtreeScope, null);
  660. case "colgroup":
  661. return createFormatContext(9, null, subtreeScope, null);
  662. case "tr":
  663. return createFormatContext(8, null, subtreeScope, null);
  664. case "head":
  665. if (2 > parentContext.insertionMode)
  666. return createFormatContext(3, null, subtreeScope, null);
  667. break;
  668. case "html":
  669. if (0 === parentContext.insertionMode)
  670. return createFormatContext(1, null, subtreeScope, null);
  671. }
  672. return 6 <= parentContext.insertionMode || 2 > parentContext.insertionMode
  673. ? createFormatContext(2, null, subtreeScope, null)
  674. : parentContext.tagScope !== subtreeScope
  675. ? createFormatContext(
  676. parentContext.insertionMode,
  677. parentContext.selectedValue,
  678. subtreeScope,
  679. null
  680. )
  681. : parentContext;
  682. }
  683. function getSuspenseViewTransition(parentViewTransition) {
  684. return null === parentViewTransition
  685. ? null
  686. : {
  687. update: parentViewTransition.update,
  688. enter: "none",
  689. exit: "none",
  690. share: parentViewTransition.update,
  691. name: parentViewTransition.autoName,
  692. autoName: parentViewTransition.autoName,
  693. nameIdx: 0
  694. };
  695. }
  696. function getSuspenseFallbackFormatContext(resumableState, parentContext) {
  697. parentContext.tagScope & 32 && (resumableState.instructions |= 128);
  698. return createFormatContext(
  699. parentContext.insertionMode,
  700. parentContext.selectedValue,
  701. parentContext.tagScope | 12,
  702. getSuspenseViewTransition(parentContext.viewTransition)
  703. );
  704. }
  705. function getSuspenseContentFormatContext(resumableState, parentContext) {
  706. resumableState = getSuspenseViewTransition(parentContext.viewTransition);
  707. var subtreeScope = parentContext.tagScope | 16;
  708. null !== resumableState &&
  709. "none" !== resumableState.share &&
  710. (subtreeScope |= 64);
  711. return createFormatContext(
  712. parentContext.insertionMode,
  713. parentContext.selectedValue,
  714. subtreeScope,
  715. resumableState
  716. );
  717. }
  718. var textSeparator = stringToPrecomputedChunk("\x3c!-- --\x3e");
  719. function pushTextInstance(target, text, renderState, textEmbedded) {
  720. if ("" === text) return textEmbedded;
  721. textEmbedded && target.push(textSeparator);
  722. target.push(stringToChunk(escapeTextForBrowser(text)));
  723. return !0;
  724. }
  725. var styleNameCache = new Map(),
  726. styleAttributeStart = stringToPrecomputedChunk(' style="'),
  727. styleAssign = stringToPrecomputedChunk(":"),
  728. styleSeparator = stringToPrecomputedChunk(";");
  729. function pushStyleAttribute(target, style) {
  730. if ("object" !== typeof style)
  731. throw Error(
  732. "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
  733. );
  734. var isFirst = !0,
  735. styleName;
  736. for (styleName in style)
  737. if (hasOwnProperty.call(style, styleName)) {
  738. var styleValue = style[styleName];
  739. if (
  740. null != styleValue &&
  741. "boolean" !== typeof styleValue &&
  742. "" !== styleValue
  743. ) {
  744. if (0 === styleName.indexOf("--")) {
  745. var nameChunk = stringToChunk(escapeTextForBrowser(styleName));
  746. styleValue = stringToChunk(
  747. escapeTextForBrowser(("" + styleValue).trim())
  748. );
  749. } else
  750. (nameChunk = styleNameCache.get(styleName)),
  751. void 0 === nameChunk &&
  752. ((nameChunk = stringToPrecomputedChunk(
  753. escapeTextForBrowser(
  754. styleName
  755. .replace(uppercasePattern, "-$1")
  756. .toLowerCase()
  757. .replace(msPattern, "-ms-")
  758. )
  759. )),
  760. styleNameCache.set(styleName, nameChunk)),
  761. (styleValue =
  762. "number" === typeof styleValue
  763. ? 0 === styleValue || unitlessNumbers.has(styleName)
  764. ? stringToChunk("" + styleValue)
  765. : stringToChunk(styleValue + "px")
  766. : stringToChunk(
  767. escapeTextForBrowser(("" + styleValue).trim())
  768. ));
  769. isFirst
  770. ? ((isFirst = !1),
  771. target.push(
  772. styleAttributeStart,
  773. nameChunk,
  774. styleAssign,
  775. styleValue
  776. ))
  777. : target.push(styleSeparator, nameChunk, styleAssign, styleValue);
  778. }
  779. }
  780. isFirst || target.push(attributeEnd);
  781. }
  782. var attributeSeparator = stringToPrecomputedChunk(" "),
  783. attributeAssign = stringToPrecomputedChunk('="'),
  784. attributeEnd = stringToPrecomputedChunk('"'),
  785. attributeEmptyString = stringToPrecomputedChunk('=""');
  786. function pushBooleanAttribute(target, name, value) {
  787. value &&
  788. "function" !== typeof value &&
  789. "symbol" !== typeof value &&
  790. target.push(attributeSeparator, stringToChunk(name), attributeEmptyString);
  791. }
  792. function pushStringAttribute(target, name, value) {
  793. "function" !== typeof value &&
  794. "symbol" !== typeof value &&
  795. "boolean" !== typeof value &&
  796. target.push(
  797. attributeSeparator,
  798. stringToChunk(name),
  799. attributeAssign,
  800. stringToChunk(escapeTextForBrowser(value)),
  801. attributeEnd
  802. );
  803. }
  804. var actionJavaScriptURL = stringToPrecomputedChunk(
  805. escapeTextForBrowser(
  806. "javascript:throw new Error('React form unexpectedly submitted.')"
  807. )
  808. ),
  809. startHiddenInputChunk = stringToPrecomputedChunk('<input type="hidden"');
  810. function pushAdditionalFormField(value, key) {
  811. this.push(startHiddenInputChunk);
  812. validateAdditionalFormField(value);
  813. pushStringAttribute(this, "name", key);
  814. pushStringAttribute(this, "value", value);
  815. this.push(endOfStartTagSelfClosing);
  816. }
  817. function validateAdditionalFormField(value) {
  818. if ("string" !== typeof value)
  819. throw Error(
  820. "File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration."
  821. );
  822. }
  823. function getCustomFormFields(resumableState, formAction) {
  824. if ("function" === typeof formAction.$$FORM_ACTION) {
  825. var id = resumableState.nextFormID++;
  826. resumableState = resumableState.idPrefix + id;
  827. try {
  828. var customFields = formAction.$$FORM_ACTION(resumableState);
  829. if (customFields) {
  830. var formData = customFields.data;
  831. null != formData && formData.forEach(validateAdditionalFormField);
  832. }
  833. return customFields;
  834. } catch (x) {
  835. if ("object" === typeof x && null !== x && "function" === typeof x.then)
  836. throw x;
  837. }
  838. }
  839. return null;
  840. }
  841. function pushFormActionAttribute(
  842. target,
  843. resumableState,
  844. renderState,
  845. formAction,
  846. formEncType,
  847. formMethod,
  848. formTarget,
  849. name
  850. ) {
  851. var formData = null;
  852. if ("function" === typeof formAction) {
  853. var customFields = getCustomFormFields(resumableState, formAction);
  854. null !== customFields
  855. ? ((name = customFields.name),
  856. (formAction = customFields.action || ""),
  857. (formEncType = customFields.encType),
  858. (formMethod = customFields.method),
  859. (formTarget = customFields.target),
  860. (formData = customFields.data))
  861. : (target.push(
  862. attributeSeparator,
  863. stringToChunk("formAction"),
  864. attributeAssign,
  865. actionJavaScriptURL,
  866. attributeEnd
  867. ),
  868. (formTarget = formMethod = formEncType = formAction = name = null),
  869. injectFormReplayingRuntime(resumableState, renderState));
  870. }
  871. null != name && pushAttribute(target, "name", name);
  872. null != formAction && pushAttribute(target, "formAction", formAction);
  873. null != formEncType && pushAttribute(target, "formEncType", formEncType);
  874. null != formMethod && pushAttribute(target, "formMethod", formMethod);
  875. null != formTarget && pushAttribute(target, "formTarget", formTarget);
  876. return formData;
  877. }
  878. function pushAttribute(target, name, value) {
  879. switch (name) {
  880. case "className":
  881. pushStringAttribute(target, "class", value);
  882. break;
  883. case "tabIndex":
  884. pushStringAttribute(target, "tabindex", value);
  885. break;
  886. case "dir":
  887. case "role":
  888. case "viewBox":
  889. case "width":
  890. case "height":
  891. pushStringAttribute(target, name, value);
  892. break;
  893. case "style":
  894. pushStyleAttribute(target, value);
  895. break;
  896. case "src":
  897. case "href":
  898. if ("" === value) break;
  899. case "action":
  900. case "formAction":
  901. if (
  902. null == value ||
  903. "function" === typeof value ||
  904. "symbol" === typeof value ||
  905. "boolean" === typeof value
  906. )
  907. break;
  908. value = sanitizeURL("" + value);
  909. target.push(
  910. attributeSeparator,
  911. stringToChunk(name),
  912. attributeAssign,
  913. stringToChunk(escapeTextForBrowser(value)),
  914. attributeEnd
  915. );
  916. break;
  917. case "defaultValue":
  918. case "defaultChecked":
  919. case "innerHTML":
  920. case "suppressContentEditableWarning":
  921. case "suppressHydrationWarning":
  922. case "ref":
  923. break;
  924. case "autoFocus":
  925. case "multiple":
  926. case "muted":
  927. pushBooleanAttribute(target, name.toLowerCase(), value);
  928. break;
  929. case "xlinkHref":
  930. if (
  931. "function" === typeof value ||
  932. "symbol" === typeof value ||
  933. "boolean" === typeof value
  934. )
  935. break;
  936. value = sanitizeURL("" + value);
  937. target.push(
  938. attributeSeparator,
  939. stringToChunk("xlink:href"),
  940. attributeAssign,
  941. stringToChunk(escapeTextForBrowser(value)),
  942. attributeEnd
  943. );
  944. break;
  945. case "contentEditable":
  946. case "spellCheck":
  947. case "draggable":
  948. case "value":
  949. case "autoReverse":
  950. case "externalResourcesRequired":
  951. case "focusable":
  952. case "preserveAlpha":
  953. "function" !== typeof value &&
  954. "symbol" !== typeof value &&
  955. target.push(
  956. attributeSeparator,
  957. stringToChunk(name),
  958. attributeAssign,
  959. stringToChunk(escapeTextForBrowser(value)),
  960. attributeEnd
  961. );
  962. break;
  963. case "inert":
  964. case "allowFullScreen":
  965. case "async":
  966. case "autoPlay":
  967. case "controls":
  968. case "default":
  969. case "defer":
  970. case "disabled":
  971. case "disablePictureInPicture":
  972. case "disableRemotePlayback":
  973. case "formNoValidate":
  974. case "hidden":
  975. case "loop":
  976. case "noModule":
  977. case "noValidate":
  978. case "open":
  979. case "playsInline":
  980. case "readOnly":
  981. case "required":
  982. case "reversed":
  983. case "scoped":
  984. case "seamless":
  985. case "itemScope":
  986. value &&
  987. "function" !== typeof value &&
  988. "symbol" !== typeof value &&
  989. target.push(
  990. attributeSeparator,
  991. stringToChunk(name),
  992. attributeEmptyString
  993. );
  994. break;
  995. case "capture":
  996. case "download":
  997. !0 === value
  998. ? target.push(
  999. attributeSeparator,
  1000. stringToChunk(name),
  1001. attributeEmptyString
  1002. )
  1003. : !1 !== value &&
  1004. "function" !== typeof value &&
  1005. "symbol" !== typeof value &&
  1006. target.push(
  1007. attributeSeparator,
  1008. stringToChunk(name),
  1009. attributeAssign,
  1010. stringToChunk(escapeTextForBrowser(value)),
  1011. attributeEnd
  1012. );
  1013. break;
  1014. case "cols":
  1015. case "rows":
  1016. case "size":
  1017. case "span":
  1018. "function" !== typeof value &&
  1019. "symbol" !== typeof value &&
  1020. !isNaN(value) &&
  1021. 1 <= value &&
  1022. target.push(
  1023. attributeSeparator,
  1024. stringToChunk(name),
  1025. attributeAssign,
  1026. stringToChunk(escapeTextForBrowser(value)),
  1027. attributeEnd
  1028. );
  1029. break;
  1030. case "rowSpan":
  1031. case "start":
  1032. "function" === typeof value ||
  1033. "symbol" === typeof value ||
  1034. isNaN(value) ||
  1035. target.push(
  1036. attributeSeparator,
  1037. stringToChunk(name),
  1038. attributeAssign,
  1039. stringToChunk(escapeTextForBrowser(value)),
  1040. attributeEnd
  1041. );
  1042. break;
  1043. case "xlinkActuate":
  1044. pushStringAttribute(target, "xlink:actuate", value);
  1045. break;
  1046. case "xlinkArcrole":
  1047. pushStringAttribute(target, "xlink:arcrole", value);
  1048. break;
  1049. case "xlinkRole":
  1050. pushStringAttribute(target, "xlink:role", value);
  1051. break;
  1052. case "xlinkShow":
  1053. pushStringAttribute(target, "xlink:show", value);
  1054. break;
  1055. case "xlinkTitle":
  1056. pushStringAttribute(target, "xlink:title", value);
  1057. break;
  1058. case "xlinkType":
  1059. pushStringAttribute(target, "xlink:type", value);
  1060. break;
  1061. case "xmlBase":
  1062. pushStringAttribute(target, "xml:base", value);
  1063. break;
  1064. case "xmlLang":
  1065. pushStringAttribute(target, "xml:lang", value);
  1066. break;
  1067. case "xmlSpace":
  1068. pushStringAttribute(target, "xml:space", value);
  1069. break;
  1070. default:
  1071. if (
  1072. !(2 < name.length) ||
  1073. ("o" !== name[0] && "O" !== name[0]) ||
  1074. ("n" !== name[1] && "N" !== name[1])
  1075. )
  1076. if (((name = aliases.get(name) || name), isAttributeNameSafe(name))) {
  1077. switch (typeof value) {
  1078. case "function":
  1079. case "symbol":
  1080. return;
  1081. case "boolean":
  1082. var prefix$8 = name.toLowerCase().slice(0, 5);
  1083. if ("data-" !== prefix$8 && "aria-" !== prefix$8) return;
  1084. }
  1085. target.push(
  1086. attributeSeparator,
  1087. stringToChunk(name),
  1088. attributeAssign,
  1089. stringToChunk(escapeTextForBrowser(value)),
  1090. attributeEnd
  1091. );
  1092. }
  1093. }
  1094. }
  1095. var endOfStartTag = stringToPrecomputedChunk(">"),
  1096. endOfStartTagSelfClosing = stringToPrecomputedChunk("/>");
  1097. function pushInnerHTML(target, innerHTML, children) {
  1098. if (null != innerHTML) {
  1099. if (null != children)
  1100. throw Error(
  1101. "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
  1102. );
  1103. if ("object" !== typeof innerHTML || !("__html" in innerHTML))
  1104. throw Error(
  1105. "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
  1106. );
  1107. innerHTML = innerHTML.__html;
  1108. null !== innerHTML &&
  1109. void 0 !== innerHTML &&
  1110. target.push(stringToChunk("" + innerHTML));
  1111. }
  1112. }
  1113. function flattenOptionChildren(children) {
  1114. var content = "";
  1115. React.Children.forEach(children, function (child) {
  1116. null != child && (content += child);
  1117. });
  1118. return content;
  1119. }
  1120. var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'),
  1121. formReplayingRuntimeScript = stringToPrecomputedChunk(
  1122. 'addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});'
  1123. );
  1124. function injectFormReplayingRuntime(resumableState, renderState) {
  1125. if (0 === (resumableState.instructions & 16)) {
  1126. resumableState.instructions |= 16;
  1127. var preamble = renderState.preamble,
  1128. bootstrapChunks = renderState.bootstrapChunks;
  1129. (preamble.htmlChunks || preamble.headChunks) && 0 === bootstrapChunks.length
  1130. ? (bootstrapChunks.push(renderState.startInlineScript),
  1131. pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
  1132. bootstrapChunks.push(
  1133. endOfStartTag,
  1134. formReplayingRuntimeScript,
  1135. endInlineScript
  1136. ))
  1137. : bootstrapChunks.unshift(
  1138. renderState.startInlineScript,
  1139. endOfStartTag,
  1140. formReplayingRuntimeScript,
  1141. endInlineScript
  1142. );
  1143. }
  1144. }
  1145. var formStateMarkerIsMatching = stringToPrecomputedChunk("\x3c!--F!--\x3e"),
  1146. formStateMarkerIsNotMatching = stringToPrecomputedChunk("\x3c!--F--\x3e");
  1147. function pushLinkImpl(target, props) {
  1148. target.push(startChunkForTag("link"));
  1149. for (var propKey in props)
  1150. if (hasOwnProperty.call(props, propKey)) {
  1151. var propValue = props[propKey];
  1152. if (null != propValue)
  1153. switch (propKey) {
  1154. case "children":
  1155. case "dangerouslySetInnerHTML":
  1156. throw Error(
  1157. "link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  1158. );
  1159. default:
  1160. pushAttribute(target, propKey, propValue);
  1161. }
  1162. }
  1163. target.push(endOfStartTagSelfClosing);
  1164. return null;
  1165. }
  1166. var styleRegex = /(<\/|<)(s)(tyle)/gi;
  1167. function styleReplacer(match, prefix, s, suffix) {
  1168. return "" + prefix + ("s" === s ? "\\73 " : "\\53 ") + suffix;
  1169. }
  1170. function pushSelfClosing(target, props, tag) {
  1171. target.push(startChunkForTag(tag));
  1172. for (var propKey in props)
  1173. if (hasOwnProperty.call(props, propKey)) {
  1174. var propValue = props[propKey];
  1175. if (null != propValue)
  1176. switch (propKey) {
  1177. case "children":
  1178. case "dangerouslySetInnerHTML":
  1179. throw Error(
  1180. tag +
  1181. " is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  1182. );
  1183. default:
  1184. pushAttribute(target, propKey, propValue);
  1185. }
  1186. }
  1187. target.push(endOfStartTagSelfClosing);
  1188. return null;
  1189. }
  1190. function pushTitleImpl(target, props) {
  1191. target.push(startChunkForTag("title"));
  1192. var children = null,
  1193. innerHTML = null,
  1194. propKey;
  1195. for (propKey in props)
  1196. if (hasOwnProperty.call(props, propKey)) {
  1197. var propValue = props[propKey];
  1198. if (null != propValue)
  1199. switch (propKey) {
  1200. case "children":
  1201. children = propValue;
  1202. break;
  1203. case "dangerouslySetInnerHTML":
  1204. innerHTML = propValue;
  1205. break;
  1206. default:
  1207. pushAttribute(target, propKey, propValue);
  1208. }
  1209. }
  1210. target.push(endOfStartTag);
  1211. props = Array.isArray(children)
  1212. ? 2 > children.length
  1213. ? children[0]
  1214. : null
  1215. : children;
  1216. "function" !== typeof props &&
  1217. "symbol" !== typeof props &&
  1218. null !== props &&
  1219. void 0 !== props &&
  1220. target.push(stringToChunk(escapeTextForBrowser("" + props)));
  1221. pushInnerHTML(target, innerHTML, children);
  1222. target.push(endChunkForTag("title"));
  1223. return null;
  1224. }
  1225. var headPreambleContributionChunk =
  1226. stringToPrecomputedChunk("\x3c!--head--\x3e"),
  1227. bodyPreambleContributionChunk = stringToPrecomputedChunk("\x3c!--body--\x3e"),
  1228. htmlPreambleContributionChunk = stringToPrecomputedChunk("\x3c!--html--\x3e");
  1229. function pushScriptImpl(target, props) {
  1230. target.push(startChunkForTag("script"));
  1231. var children = null,
  1232. innerHTML = null,
  1233. propKey;
  1234. for (propKey in props)
  1235. if (hasOwnProperty.call(props, propKey)) {
  1236. var propValue = props[propKey];
  1237. if (null != propValue)
  1238. switch (propKey) {
  1239. case "children":
  1240. children = propValue;
  1241. break;
  1242. case "dangerouslySetInnerHTML":
  1243. innerHTML = propValue;
  1244. break;
  1245. default:
  1246. pushAttribute(target, propKey, propValue);
  1247. }
  1248. }
  1249. target.push(endOfStartTag);
  1250. pushInnerHTML(target, innerHTML, children);
  1251. "string" === typeof children &&
  1252. target.push(
  1253. stringToChunk(("" + children).replace(scriptRegex, scriptReplacer))
  1254. );
  1255. target.push(endChunkForTag("script"));
  1256. return null;
  1257. }
  1258. function pushStartSingletonElement(target, props, tag) {
  1259. target.push(startChunkForTag(tag));
  1260. var innerHTML = (tag = null),
  1261. propKey;
  1262. for (propKey in props)
  1263. if (hasOwnProperty.call(props, propKey)) {
  1264. var propValue = props[propKey];
  1265. if (null != propValue)
  1266. switch (propKey) {
  1267. case "children":
  1268. tag = propValue;
  1269. break;
  1270. case "dangerouslySetInnerHTML":
  1271. innerHTML = propValue;
  1272. break;
  1273. default:
  1274. pushAttribute(target, propKey, propValue);
  1275. }
  1276. }
  1277. target.push(endOfStartTag);
  1278. pushInnerHTML(target, innerHTML, tag);
  1279. return tag;
  1280. }
  1281. function pushStartGenericElement(target, props, tag) {
  1282. target.push(startChunkForTag(tag));
  1283. var innerHTML = (tag = null),
  1284. propKey;
  1285. for (propKey in props)
  1286. if (hasOwnProperty.call(props, propKey)) {
  1287. var propValue = props[propKey];
  1288. if (null != propValue)
  1289. switch (propKey) {
  1290. case "children":
  1291. tag = propValue;
  1292. break;
  1293. case "dangerouslySetInnerHTML":
  1294. innerHTML = propValue;
  1295. break;
  1296. default:
  1297. pushAttribute(target, propKey, propValue);
  1298. }
  1299. }
  1300. target.push(endOfStartTag);
  1301. pushInnerHTML(target, innerHTML, tag);
  1302. return "string" === typeof tag
  1303. ? (target.push(stringToChunk(escapeTextForBrowser(tag))), null)
  1304. : tag;
  1305. }
  1306. var leadingNewline = stringToPrecomputedChunk("\n"),
  1307. VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,
  1308. validatedTagCache = new Map();
  1309. function startChunkForTag(tag) {
  1310. var tagStartChunk = validatedTagCache.get(tag);
  1311. if (void 0 === tagStartChunk) {
  1312. if (!VALID_TAG_REGEX.test(tag)) throw Error("Invalid tag: " + tag);
  1313. tagStartChunk = stringToPrecomputedChunk("<" + tag);
  1314. validatedTagCache.set(tag, tagStartChunk);
  1315. }
  1316. return tagStartChunk;
  1317. }
  1318. var doctypeChunk = stringToPrecomputedChunk("<!DOCTYPE html>");
  1319. function pushStartInstance(
  1320. target$jscomp$0,
  1321. type,
  1322. props,
  1323. resumableState,
  1324. renderState,
  1325. preambleState,
  1326. hoistableState,
  1327. formatContext,
  1328. textEmbedded
  1329. ) {
  1330. switch (type) {
  1331. case "div":
  1332. case "span":
  1333. case "svg":
  1334. case "path":
  1335. break;
  1336. case "a":
  1337. target$jscomp$0.push(startChunkForTag("a"));
  1338. var children = null,
  1339. innerHTML = null,
  1340. propKey;
  1341. for (propKey in props)
  1342. if (hasOwnProperty.call(props, propKey)) {
  1343. var propValue = props[propKey];
  1344. if (null != propValue)
  1345. switch (propKey) {
  1346. case "children":
  1347. children = propValue;
  1348. break;
  1349. case "dangerouslySetInnerHTML":
  1350. innerHTML = propValue;
  1351. break;
  1352. case "href":
  1353. "" === propValue
  1354. ? pushStringAttribute(target$jscomp$0, "href", "")
  1355. : pushAttribute(target$jscomp$0, propKey, propValue);
  1356. break;
  1357. default:
  1358. pushAttribute(target$jscomp$0, propKey, propValue);
  1359. }
  1360. }
  1361. target$jscomp$0.push(endOfStartTag);
  1362. pushInnerHTML(target$jscomp$0, innerHTML, children);
  1363. if ("string" === typeof children) {
  1364. target$jscomp$0.push(stringToChunk(escapeTextForBrowser(children)));
  1365. var JSCompiler_inline_result = null;
  1366. } else JSCompiler_inline_result = children;
  1367. return JSCompiler_inline_result;
  1368. case "g":
  1369. case "p":
  1370. case "li":
  1371. break;
  1372. case "select":
  1373. target$jscomp$0.push(startChunkForTag("select"));
  1374. var children$jscomp$0 = null,
  1375. innerHTML$jscomp$0 = null,
  1376. propKey$jscomp$0;
  1377. for (propKey$jscomp$0 in props)
  1378. if (hasOwnProperty.call(props, propKey$jscomp$0)) {
  1379. var propValue$jscomp$0 = props[propKey$jscomp$0];
  1380. if (null != propValue$jscomp$0)
  1381. switch (propKey$jscomp$0) {
  1382. case "children":
  1383. children$jscomp$0 = propValue$jscomp$0;
  1384. break;
  1385. case "dangerouslySetInnerHTML":
  1386. innerHTML$jscomp$0 = propValue$jscomp$0;
  1387. break;
  1388. case "defaultValue":
  1389. case "value":
  1390. break;
  1391. default:
  1392. pushAttribute(
  1393. target$jscomp$0,
  1394. propKey$jscomp$0,
  1395. propValue$jscomp$0
  1396. );
  1397. }
  1398. }
  1399. target$jscomp$0.push(endOfStartTag);
  1400. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);
  1401. return children$jscomp$0;
  1402. case "option":
  1403. var selectedValue = formatContext.selectedValue;
  1404. target$jscomp$0.push(startChunkForTag("option"));
  1405. var children$jscomp$1 = null,
  1406. value = null,
  1407. selected = null,
  1408. innerHTML$jscomp$1 = null,
  1409. propKey$jscomp$1;
  1410. for (propKey$jscomp$1 in props)
  1411. if (hasOwnProperty.call(props, propKey$jscomp$1)) {
  1412. var propValue$jscomp$1 = props[propKey$jscomp$1];
  1413. if (null != propValue$jscomp$1)
  1414. switch (propKey$jscomp$1) {
  1415. case "children":
  1416. children$jscomp$1 = propValue$jscomp$1;
  1417. break;
  1418. case "selected":
  1419. selected = propValue$jscomp$1;
  1420. break;
  1421. case "dangerouslySetInnerHTML":
  1422. innerHTML$jscomp$1 = propValue$jscomp$1;
  1423. break;
  1424. case "value":
  1425. value = propValue$jscomp$1;
  1426. default:
  1427. pushAttribute(
  1428. target$jscomp$0,
  1429. propKey$jscomp$1,
  1430. propValue$jscomp$1
  1431. );
  1432. }
  1433. }
  1434. if (null != selectedValue) {
  1435. var stringValue =
  1436. null !== value
  1437. ? "" + value
  1438. : flattenOptionChildren(children$jscomp$1);
  1439. if (isArrayImpl(selectedValue))
  1440. for (var i = 0; i < selectedValue.length; i++) {
  1441. if ("" + selectedValue[i] === stringValue) {
  1442. target$jscomp$0.push(selectedMarkerAttribute);
  1443. break;
  1444. }
  1445. }
  1446. else
  1447. "" + selectedValue === stringValue &&
  1448. target$jscomp$0.push(selectedMarkerAttribute);
  1449. } else selected && target$jscomp$0.push(selectedMarkerAttribute);
  1450. target$jscomp$0.push(endOfStartTag);
  1451. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);
  1452. return children$jscomp$1;
  1453. case "textarea":
  1454. target$jscomp$0.push(startChunkForTag("textarea"));
  1455. var value$jscomp$0 = null,
  1456. defaultValue = null,
  1457. children$jscomp$2 = null,
  1458. propKey$jscomp$2;
  1459. for (propKey$jscomp$2 in props)
  1460. if (hasOwnProperty.call(props, propKey$jscomp$2)) {
  1461. var propValue$jscomp$2 = props[propKey$jscomp$2];
  1462. if (null != propValue$jscomp$2)
  1463. switch (propKey$jscomp$2) {
  1464. case "children":
  1465. children$jscomp$2 = propValue$jscomp$2;
  1466. break;
  1467. case "value":
  1468. value$jscomp$0 = propValue$jscomp$2;
  1469. break;
  1470. case "defaultValue":
  1471. defaultValue = propValue$jscomp$2;
  1472. break;
  1473. case "dangerouslySetInnerHTML":
  1474. throw Error(
  1475. "`dangerouslySetInnerHTML` does not make sense on <textarea>."
  1476. );
  1477. default:
  1478. pushAttribute(
  1479. target$jscomp$0,
  1480. propKey$jscomp$2,
  1481. propValue$jscomp$2
  1482. );
  1483. }
  1484. }
  1485. null === value$jscomp$0 &&
  1486. null !== defaultValue &&
  1487. (value$jscomp$0 = defaultValue);
  1488. target$jscomp$0.push(endOfStartTag);
  1489. if (null != children$jscomp$2) {
  1490. if (null != value$jscomp$0)
  1491. throw Error(
  1492. "If you supply `defaultValue` on a <textarea>, do not pass children."
  1493. );
  1494. if (isArrayImpl(children$jscomp$2)) {
  1495. if (1 < children$jscomp$2.length)
  1496. throw Error("<textarea> can only have at most one child.");
  1497. value$jscomp$0 = "" + children$jscomp$2[0];
  1498. }
  1499. value$jscomp$0 = "" + children$jscomp$2;
  1500. }
  1501. "string" === typeof value$jscomp$0 &&
  1502. "\n" === value$jscomp$0[0] &&
  1503. target$jscomp$0.push(leadingNewline);
  1504. null !== value$jscomp$0 &&
  1505. target$jscomp$0.push(
  1506. stringToChunk(escapeTextForBrowser("" + value$jscomp$0))
  1507. );
  1508. return null;
  1509. case "input":
  1510. target$jscomp$0.push(startChunkForTag("input"));
  1511. var name = null,
  1512. formAction = null,
  1513. formEncType = null,
  1514. formMethod = null,
  1515. formTarget = null,
  1516. value$jscomp$1 = null,
  1517. defaultValue$jscomp$0 = null,
  1518. checked = null,
  1519. defaultChecked = null,
  1520. propKey$jscomp$3;
  1521. for (propKey$jscomp$3 in props)
  1522. if (hasOwnProperty.call(props, propKey$jscomp$3)) {
  1523. var propValue$jscomp$3 = props[propKey$jscomp$3];
  1524. if (null != propValue$jscomp$3)
  1525. switch (propKey$jscomp$3) {
  1526. case "children":
  1527. case "dangerouslySetInnerHTML":
  1528. throw Error(
  1529. "input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  1530. );
  1531. case "name":
  1532. name = propValue$jscomp$3;
  1533. break;
  1534. case "formAction":
  1535. formAction = propValue$jscomp$3;
  1536. break;
  1537. case "formEncType":
  1538. formEncType = propValue$jscomp$3;
  1539. break;
  1540. case "formMethod":
  1541. formMethod = propValue$jscomp$3;
  1542. break;
  1543. case "formTarget":
  1544. formTarget = propValue$jscomp$3;
  1545. break;
  1546. case "defaultChecked":
  1547. defaultChecked = propValue$jscomp$3;
  1548. break;
  1549. case "defaultValue":
  1550. defaultValue$jscomp$0 = propValue$jscomp$3;
  1551. break;
  1552. case "checked":
  1553. checked = propValue$jscomp$3;
  1554. break;
  1555. case "value":
  1556. value$jscomp$1 = propValue$jscomp$3;
  1557. break;
  1558. default:
  1559. pushAttribute(
  1560. target$jscomp$0,
  1561. propKey$jscomp$3,
  1562. propValue$jscomp$3
  1563. );
  1564. }
  1565. }
  1566. var formData = pushFormActionAttribute(
  1567. target$jscomp$0,
  1568. resumableState,
  1569. renderState,
  1570. formAction,
  1571. formEncType,
  1572. formMethod,
  1573. formTarget,
  1574. name
  1575. );
  1576. null !== checked
  1577. ? pushBooleanAttribute(target$jscomp$0, "checked", checked)
  1578. : null !== defaultChecked &&
  1579. pushBooleanAttribute(target$jscomp$0, "checked", defaultChecked);
  1580. null !== value$jscomp$1
  1581. ? pushAttribute(target$jscomp$0, "value", value$jscomp$1)
  1582. : null !== defaultValue$jscomp$0 &&
  1583. pushAttribute(target$jscomp$0, "value", defaultValue$jscomp$0);
  1584. target$jscomp$0.push(endOfStartTagSelfClosing);
  1585. null != formData &&
  1586. formData.forEach(pushAdditionalFormField, target$jscomp$0);
  1587. return null;
  1588. case "button":
  1589. target$jscomp$0.push(startChunkForTag("button"));
  1590. var children$jscomp$3 = null,
  1591. innerHTML$jscomp$2 = null,
  1592. name$jscomp$0 = null,
  1593. formAction$jscomp$0 = null,
  1594. formEncType$jscomp$0 = null,
  1595. formMethod$jscomp$0 = null,
  1596. formTarget$jscomp$0 = null,
  1597. propKey$jscomp$4;
  1598. for (propKey$jscomp$4 in props)
  1599. if (hasOwnProperty.call(props, propKey$jscomp$4)) {
  1600. var propValue$jscomp$4 = props[propKey$jscomp$4];
  1601. if (null != propValue$jscomp$4)
  1602. switch (propKey$jscomp$4) {
  1603. case "children":
  1604. children$jscomp$3 = propValue$jscomp$4;
  1605. break;
  1606. case "dangerouslySetInnerHTML":
  1607. innerHTML$jscomp$2 = propValue$jscomp$4;
  1608. break;
  1609. case "name":
  1610. name$jscomp$0 = propValue$jscomp$4;
  1611. break;
  1612. case "formAction":
  1613. formAction$jscomp$0 = propValue$jscomp$4;
  1614. break;
  1615. case "formEncType":
  1616. formEncType$jscomp$0 = propValue$jscomp$4;
  1617. break;
  1618. case "formMethod":
  1619. formMethod$jscomp$0 = propValue$jscomp$4;
  1620. break;
  1621. case "formTarget":
  1622. formTarget$jscomp$0 = propValue$jscomp$4;
  1623. break;
  1624. default:
  1625. pushAttribute(
  1626. target$jscomp$0,
  1627. propKey$jscomp$4,
  1628. propValue$jscomp$4
  1629. );
  1630. }
  1631. }
  1632. var formData$jscomp$0 = pushFormActionAttribute(
  1633. target$jscomp$0,
  1634. resumableState,
  1635. renderState,
  1636. formAction$jscomp$0,
  1637. formEncType$jscomp$0,
  1638. formMethod$jscomp$0,
  1639. formTarget$jscomp$0,
  1640. name$jscomp$0
  1641. );
  1642. target$jscomp$0.push(endOfStartTag);
  1643. null != formData$jscomp$0 &&
  1644. formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);
  1645. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);
  1646. if ("string" === typeof children$jscomp$3) {
  1647. target$jscomp$0.push(
  1648. stringToChunk(escapeTextForBrowser(children$jscomp$3))
  1649. );
  1650. var JSCompiler_inline_result$jscomp$0 = null;
  1651. } else JSCompiler_inline_result$jscomp$0 = children$jscomp$3;
  1652. return JSCompiler_inline_result$jscomp$0;
  1653. case "form":
  1654. target$jscomp$0.push(startChunkForTag("form"));
  1655. var children$jscomp$4 = null,
  1656. innerHTML$jscomp$3 = null,
  1657. formAction$jscomp$1 = null,
  1658. formEncType$jscomp$1 = null,
  1659. formMethod$jscomp$1 = null,
  1660. formTarget$jscomp$1 = null,
  1661. propKey$jscomp$5;
  1662. for (propKey$jscomp$5 in props)
  1663. if (hasOwnProperty.call(props, propKey$jscomp$5)) {
  1664. var propValue$jscomp$5 = props[propKey$jscomp$5];
  1665. if (null != propValue$jscomp$5)
  1666. switch (propKey$jscomp$5) {
  1667. case "children":
  1668. children$jscomp$4 = propValue$jscomp$5;
  1669. break;
  1670. case "dangerouslySetInnerHTML":
  1671. innerHTML$jscomp$3 = propValue$jscomp$5;
  1672. break;
  1673. case "action":
  1674. formAction$jscomp$1 = propValue$jscomp$5;
  1675. break;
  1676. case "encType":
  1677. formEncType$jscomp$1 = propValue$jscomp$5;
  1678. break;
  1679. case "method":
  1680. formMethod$jscomp$1 = propValue$jscomp$5;
  1681. break;
  1682. case "target":
  1683. formTarget$jscomp$1 = propValue$jscomp$5;
  1684. break;
  1685. default:
  1686. pushAttribute(
  1687. target$jscomp$0,
  1688. propKey$jscomp$5,
  1689. propValue$jscomp$5
  1690. );
  1691. }
  1692. }
  1693. var formData$jscomp$1 = null,
  1694. formActionName = null;
  1695. if ("function" === typeof formAction$jscomp$1) {
  1696. var customFields = getCustomFormFields(
  1697. resumableState,
  1698. formAction$jscomp$1
  1699. );
  1700. null !== customFields
  1701. ? ((formAction$jscomp$1 = customFields.action || ""),
  1702. (formEncType$jscomp$1 = customFields.encType),
  1703. (formMethod$jscomp$1 = customFields.method),
  1704. (formTarget$jscomp$1 = customFields.target),
  1705. (formData$jscomp$1 = customFields.data),
  1706. (formActionName = customFields.name))
  1707. : (target$jscomp$0.push(
  1708. attributeSeparator,
  1709. stringToChunk("action"),
  1710. attributeAssign,
  1711. actionJavaScriptURL,
  1712. attributeEnd
  1713. ),
  1714. (formTarget$jscomp$1 =
  1715. formMethod$jscomp$1 =
  1716. formEncType$jscomp$1 =
  1717. formAction$jscomp$1 =
  1718. null),
  1719. injectFormReplayingRuntime(resumableState, renderState));
  1720. }
  1721. null != formAction$jscomp$1 &&
  1722. pushAttribute(target$jscomp$0, "action", formAction$jscomp$1);
  1723. null != formEncType$jscomp$1 &&
  1724. pushAttribute(target$jscomp$0, "encType", formEncType$jscomp$1);
  1725. null != formMethod$jscomp$1 &&
  1726. pushAttribute(target$jscomp$0, "method", formMethod$jscomp$1);
  1727. null != formTarget$jscomp$1 &&
  1728. pushAttribute(target$jscomp$0, "target", formTarget$jscomp$1);
  1729. target$jscomp$0.push(endOfStartTag);
  1730. null !== formActionName &&
  1731. (target$jscomp$0.push(startHiddenInputChunk),
  1732. pushStringAttribute(target$jscomp$0, "name", formActionName),
  1733. target$jscomp$0.push(endOfStartTagSelfClosing),
  1734. null != formData$jscomp$1 &&
  1735. formData$jscomp$1.forEach(pushAdditionalFormField, target$jscomp$0));
  1736. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);
  1737. if ("string" === typeof children$jscomp$4) {
  1738. target$jscomp$0.push(
  1739. stringToChunk(escapeTextForBrowser(children$jscomp$4))
  1740. );
  1741. var JSCompiler_inline_result$jscomp$1 = null;
  1742. } else JSCompiler_inline_result$jscomp$1 = children$jscomp$4;
  1743. return JSCompiler_inline_result$jscomp$1;
  1744. case "menuitem":
  1745. target$jscomp$0.push(startChunkForTag("menuitem"));
  1746. for (var propKey$jscomp$6 in props)
  1747. if (hasOwnProperty.call(props, propKey$jscomp$6)) {
  1748. var propValue$jscomp$6 = props[propKey$jscomp$6];
  1749. if (null != propValue$jscomp$6)
  1750. switch (propKey$jscomp$6) {
  1751. case "children":
  1752. case "dangerouslySetInnerHTML":
  1753. throw Error(
  1754. "menuitems cannot have `children` nor `dangerouslySetInnerHTML`."
  1755. );
  1756. default:
  1757. pushAttribute(
  1758. target$jscomp$0,
  1759. propKey$jscomp$6,
  1760. propValue$jscomp$6
  1761. );
  1762. }
  1763. }
  1764. target$jscomp$0.push(endOfStartTag);
  1765. return null;
  1766. case "object":
  1767. target$jscomp$0.push(startChunkForTag("object"));
  1768. var children$jscomp$5 = null,
  1769. innerHTML$jscomp$4 = null,
  1770. propKey$jscomp$7;
  1771. for (propKey$jscomp$7 in props)
  1772. if (hasOwnProperty.call(props, propKey$jscomp$7)) {
  1773. var propValue$jscomp$7 = props[propKey$jscomp$7];
  1774. if (null != propValue$jscomp$7)
  1775. switch (propKey$jscomp$7) {
  1776. case "children":
  1777. children$jscomp$5 = propValue$jscomp$7;
  1778. break;
  1779. case "dangerouslySetInnerHTML":
  1780. innerHTML$jscomp$4 = propValue$jscomp$7;
  1781. break;
  1782. case "data":
  1783. var sanitizedValue = sanitizeURL("" + propValue$jscomp$7);
  1784. if ("" === sanitizedValue) break;
  1785. target$jscomp$0.push(
  1786. attributeSeparator,
  1787. stringToChunk("data"),
  1788. attributeAssign,
  1789. stringToChunk(escapeTextForBrowser(sanitizedValue)),
  1790. attributeEnd
  1791. );
  1792. break;
  1793. default:
  1794. pushAttribute(
  1795. target$jscomp$0,
  1796. propKey$jscomp$7,
  1797. propValue$jscomp$7
  1798. );
  1799. }
  1800. }
  1801. target$jscomp$0.push(endOfStartTag);
  1802. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);
  1803. if ("string" === typeof children$jscomp$5) {
  1804. target$jscomp$0.push(
  1805. stringToChunk(escapeTextForBrowser(children$jscomp$5))
  1806. );
  1807. var JSCompiler_inline_result$jscomp$2 = null;
  1808. } else JSCompiler_inline_result$jscomp$2 = children$jscomp$5;
  1809. return JSCompiler_inline_result$jscomp$2;
  1810. case "title":
  1811. var noscriptTagInScope = formatContext.tagScope & 1,
  1812. isFallback = formatContext.tagScope & 4;
  1813. if (
  1814. 4 === formatContext.insertionMode ||
  1815. noscriptTagInScope ||
  1816. null != props.itemProp
  1817. )
  1818. var JSCompiler_inline_result$jscomp$3 = pushTitleImpl(
  1819. target$jscomp$0,
  1820. props
  1821. );
  1822. else
  1823. isFallback
  1824. ? (JSCompiler_inline_result$jscomp$3 = null)
  1825. : (pushTitleImpl(renderState.hoistableChunks, props),
  1826. (JSCompiler_inline_result$jscomp$3 = void 0));
  1827. return JSCompiler_inline_result$jscomp$3;
  1828. case "link":
  1829. var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1,
  1830. isFallback$jscomp$0 = formatContext.tagScope & 4,
  1831. rel = props.rel,
  1832. href = props.href,
  1833. precedence = props.precedence;
  1834. if (
  1835. 4 === formatContext.insertionMode ||
  1836. noscriptTagInScope$jscomp$0 ||
  1837. null != props.itemProp ||
  1838. "string" !== typeof rel ||
  1839. "string" !== typeof href ||
  1840. "" === href
  1841. ) {
  1842. pushLinkImpl(target$jscomp$0, props);
  1843. var JSCompiler_inline_result$jscomp$4 = null;
  1844. } else if ("stylesheet" === props.rel)
  1845. if (
  1846. "string" !== typeof precedence ||
  1847. null != props.disabled ||
  1848. props.onLoad ||
  1849. props.onError
  1850. )
  1851. JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
  1852. target$jscomp$0,
  1853. props
  1854. );
  1855. else {
  1856. var styleQueue = renderState.styles.get(precedence),
  1857. resourceState = resumableState.styleResources.hasOwnProperty(href)
  1858. ? resumableState.styleResources[href]
  1859. : void 0;
  1860. if (null !== resourceState) {
  1861. resumableState.styleResources[href] = null;
  1862. styleQueue ||
  1863. ((styleQueue = {
  1864. precedence: stringToChunk(escapeTextForBrowser(precedence)),
  1865. rules: [],
  1866. hrefs: [],
  1867. sheets: new Map()
  1868. }),
  1869. renderState.styles.set(precedence, styleQueue));
  1870. var resource = {
  1871. state: 0,
  1872. props: assign({}, props, {
  1873. "data-precedence": props.precedence,
  1874. precedence: null
  1875. })
  1876. };
  1877. if (resourceState) {
  1878. 2 === resourceState.length &&
  1879. adoptPreloadCredentials(resource.props, resourceState);
  1880. var preloadResource = renderState.preloads.stylesheets.get(href);
  1881. preloadResource && 0 < preloadResource.length
  1882. ? (preloadResource.length = 0)
  1883. : (resource.state = 1);
  1884. }
  1885. styleQueue.sheets.set(href, resource);
  1886. hoistableState && hoistableState.stylesheets.add(resource);
  1887. } else if (styleQueue) {
  1888. var resource$9 = styleQueue.sheets.get(href);
  1889. resource$9 &&
  1890. hoistableState &&
  1891. hoistableState.stylesheets.add(resource$9);
  1892. }
  1893. textEmbedded && target$jscomp$0.push(textSeparator);
  1894. JSCompiler_inline_result$jscomp$4 = null;
  1895. }
  1896. else
  1897. props.onLoad || props.onError
  1898. ? (JSCompiler_inline_result$jscomp$4 = pushLinkImpl(
  1899. target$jscomp$0,
  1900. props
  1901. ))
  1902. : (textEmbedded && target$jscomp$0.push(textSeparator),
  1903. (JSCompiler_inline_result$jscomp$4 = isFallback$jscomp$0
  1904. ? null
  1905. : pushLinkImpl(renderState.hoistableChunks, props)));
  1906. return JSCompiler_inline_result$jscomp$4;
  1907. case "script":
  1908. var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1,
  1909. asyncProp = props.async;
  1910. if (
  1911. "string" !== typeof props.src ||
  1912. !props.src ||
  1913. !asyncProp ||
  1914. "function" === typeof asyncProp ||
  1915. "symbol" === typeof asyncProp ||
  1916. props.onLoad ||
  1917. props.onError ||
  1918. 4 === formatContext.insertionMode ||
  1919. noscriptTagInScope$jscomp$1 ||
  1920. null != props.itemProp
  1921. )
  1922. var JSCompiler_inline_result$jscomp$5 = pushScriptImpl(
  1923. target$jscomp$0,
  1924. props
  1925. );
  1926. else {
  1927. var key = props.src;
  1928. if ("module" === props.type) {
  1929. var resources = resumableState.moduleScriptResources;
  1930. var preloads = renderState.preloads.moduleScripts;
  1931. } else
  1932. (resources = resumableState.scriptResources),
  1933. (preloads = renderState.preloads.scripts);
  1934. var resourceState$jscomp$0 = resources.hasOwnProperty(key)
  1935. ? resources[key]
  1936. : void 0;
  1937. if (null !== resourceState$jscomp$0) {
  1938. resources[key] = null;
  1939. var scriptProps = props;
  1940. if (resourceState$jscomp$0) {
  1941. 2 === resourceState$jscomp$0.length &&
  1942. ((scriptProps = assign({}, props)),
  1943. adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));
  1944. var preloadResource$jscomp$0 = preloads.get(key);
  1945. preloadResource$jscomp$0 && (preloadResource$jscomp$0.length = 0);
  1946. }
  1947. var resource$jscomp$0 = [];
  1948. renderState.scripts.add(resource$jscomp$0);
  1949. pushScriptImpl(resource$jscomp$0, scriptProps);
  1950. }
  1951. textEmbedded && target$jscomp$0.push(textSeparator);
  1952. JSCompiler_inline_result$jscomp$5 = null;
  1953. }
  1954. return JSCompiler_inline_result$jscomp$5;
  1955. case "style":
  1956. var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1,
  1957. precedence$jscomp$0 = props.precedence,
  1958. href$jscomp$0 = props.href,
  1959. nonce = props.nonce;
  1960. if (
  1961. 4 === formatContext.insertionMode ||
  1962. noscriptTagInScope$jscomp$2 ||
  1963. null != props.itemProp ||
  1964. "string" !== typeof precedence$jscomp$0 ||
  1965. "string" !== typeof href$jscomp$0 ||
  1966. "" === href$jscomp$0
  1967. ) {
  1968. target$jscomp$0.push(startChunkForTag("style"));
  1969. var children$jscomp$6 = null,
  1970. innerHTML$jscomp$5 = null,
  1971. propKey$jscomp$8;
  1972. for (propKey$jscomp$8 in props)
  1973. if (hasOwnProperty.call(props, propKey$jscomp$8)) {
  1974. var propValue$jscomp$8 = props[propKey$jscomp$8];
  1975. if (null != propValue$jscomp$8)
  1976. switch (propKey$jscomp$8) {
  1977. case "children":
  1978. children$jscomp$6 = propValue$jscomp$8;
  1979. break;
  1980. case "dangerouslySetInnerHTML":
  1981. innerHTML$jscomp$5 = propValue$jscomp$8;
  1982. break;
  1983. default:
  1984. pushAttribute(
  1985. target$jscomp$0,
  1986. propKey$jscomp$8,
  1987. propValue$jscomp$8
  1988. );
  1989. }
  1990. }
  1991. target$jscomp$0.push(endOfStartTag);
  1992. var child = Array.isArray(children$jscomp$6)
  1993. ? 2 > children$jscomp$6.length
  1994. ? children$jscomp$6[0]
  1995. : null
  1996. : children$jscomp$6;
  1997. "function" !== typeof child &&
  1998. "symbol" !== typeof child &&
  1999. null !== child &&
  2000. void 0 !== child &&
  2001. target$jscomp$0.push(
  2002. stringToChunk(("" + child).replace(styleRegex, styleReplacer))
  2003. );
  2004. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$5, children$jscomp$6);
  2005. target$jscomp$0.push(endChunkForTag("style"));
  2006. var JSCompiler_inline_result$jscomp$6 = null;
  2007. } else {
  2008. var styleQueue$jscomp$0 = renderState.styles.get(precedence$jscomp$0);
  2009. if (
  2010. null !==
  2011. (resumableState.styleResources.hasOwnProperty(href$jscomp$0)
  2012. ? resumableState.styleResources[href$jscomp$0]
  2013. : void 0)
  2014. ) {
  2015. resumableState.styleResources[href$jscomp$0] = null;
  2016. styleQueue$jscomp$0 ||
  2017. ((styleQueue$jscomp$0 = {
  2018. precedence: stringToChunk(
  2019. escapeTextForBrowser(precedence$jscomp$0)
  2020. ),
  2021. rules: [],
  2022. hrefs: [],
  2023. sheets: new Map()
  2024. }),
  2025. renderState.styles.set(precedence$jscomp$0, styleQueue$jscomp$0));
  2026. var nonceStyle = renderState.nonce.style;
  2027. if (!nonceStyle || nonceStyle === nonce) {
  2028. styleQueue$jscomp$0.hrefs.push(
  2029. stringToChunk(escapeTextForBrowser(href$jscomp$0))
  2030. );
  2031. var target = styleQueue$jscomp$0.rules,
  2032. children$jscomp$7 = null,
  2033. innerHTML$jscomp$6 = null,
  2034. propKey$jscomp$9;
  2035. for (propKey$jscomp$9 in props)
  2036. if (hasOwnProperty.call(props, propKey$jscomp$9)) {
  2037. var propValue$jscomp$9 = props[propKey$jscomp$9];
  2038. if (null != propValue$jscomp$9)
  2039. switch (propKey$jscomp$9) {
  2040. case "children":
  2041. children$jscomp$7 = propValue$jscomp$9;
  2042. break;
  2043. case "dangerouslySetInnerHTML":
  2044. innerHTML$jscomp$6 = propValue$jscomp$9;
  2045. }
  2046. }
  2047. var child$jscomp$0 = Array.isArray(children$jscomp$7)
  2048. ? 2 > children$jscomp$7.length
  2049. ? children$jscomp$7[0]
  2050. : null
  2051. : children$jscomp$7;
  2052. "function" !== typeof child$jscomp$0 &&
  2053. "symbol" !== typeof child$jscomp$0 &&
  2054. null !== child$jscomp$0 &&
  2055. void 0 !== child$jscomp$0 &&
  2056. target.push(
  2057. stringToChunk(
  2058. ("" + child$jscomp$0).replace(styleRegex, styleReplacer)
  2059. )
  2060. );
  2061. pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$7);
  2062. }
  2063. }
  2064. styleQueue$jscomp$0 &&
  2065. hoistableState &&
  2066. hoistableState.styles.add(styleQueue$jscomp$0);
  2067. textEmbedded && target$jscomp$0.push(textSeparator);
  2068. JSCompiler_inline_result$jscomp$6 = void 0;
  2069. }
  2070. return JSCompiler_inline_result$jscomp$6;
  2071. case "meta":
  2072. var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1,
  2073. isFallback$jscomp$1 = formatContext.tagScope & 4;
  2074. if (
  2075. 4 === formatContext.insertionMode ||
  2076. noscriptTagInScope$jscomp$3 ||
  2077. null != props.itemProp
  2078. )
  2079. var JSCompiler_inline_result$jscomp$7 = pushSelfClosing(
  2080. target$jscomp$0,
  2081. props,
  2082. "meta"
  2083. );
  2084. else
  2085. textEmbedded && target$jscomp$0.push(textSeparator),
  2086. (JSCompiler_inline_result$jscomp$7 = isFallback$jscomp$1
  2087. ? null
  2088. : "string" === typeof props.charSet
  2089. ? pushSelfClosing(renderState.charsetChunks, props, "meta")
  2090. : "viewport" === props.name
  2091. ? pushSelfClosing(renderState.viewportChunks, props, "meta")
  2092. : pushSelfClosing(renderState.hoistableChunks, props, "meta"));
  2093. return JSCompiler_inline_result$jscomp$7;
  2094. case "listing":
  2095. case "pre":
  2096. target$jscomp$0.push(startChunkForTag(type));
  2097. var children$jscomp$8 = null,
  2098. innerHTML$jscomp$7 = null,
  2099. propKey$jscomp$10;
  2100. for (propKey$jscomp$10 in props)
  2101. if (hasOwnProperty.call(props, propKey$jscomp$10)) {
  2102. var propValue$jscomp$10 = props[propKey$jscomp$10];
  2103. if (null != propValue$jscomp$10)
  2104. switch (propKey$jscomp$10) {
  2105. case "children":
  2106. children$jscomp$8 = propValue$jscomp$10;
  2107. break;
  2108. case "dangerouslySetInnerHTML":
  2109. innerHTML$jscomp$7 = propValue$jscomp$10;
  2110. break;
  2111. default:
  2112. pushAttribute(
  2113. target$jscomp$0,
  2114. propKey$jscomp$10,
  2115. propValue$jscomp$10
  2116. );
  2117. }
  2118. }
  2119. target$jscomp$0.push(endOfStartTag);
  2120. if (null != innerHTML$jscomp$7) {
  2121. if (null != children$jscomp$8)
  2122. throw Error(
  2123. "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
  2124. );
  2125. if (
  2126. "object" !== typeof innerHTML$jscomp$7 ||
  2127. !("__html" in innerHTML$jscomp$7)
  2128. )
  2129. throw Error(
  2130. "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
  2131. );
  2132. var html = innerHTML$jscomp$7.__html;
  2133. null !== html &&
  2134. void 0 !== html &&
  2135. ("string" === typeof html && 0 < html.length && "\n" === html[0]
  2136. ? target$jscomp$0.push(leadingNewline, stringToChunk(html))
  2137. : target$jscomp$0.push(stringToChunk("" + html)));
  2138. }
  2139. "string" === typeof children$jscomp$8 &&
  2140. "\n" === children$jscomp$8[0] &&
  2141. target$jscomp$0.push(leadingNewline);
  2142. return children$jscomp$8;
  2143. case "img":
  2144. var pictureOrNoScriptTagInScope = formatContext.tagScope & 3,
  2145. src = props.src,
  2146. srcSet = props.srcSet;
  2147. if (
  2148. !(
  2149. "lazy" === props.loading ||
  2150. (!src && !srcSet) ||
  2151. ("string" !== typeof src && null != src) ||
  2152. ("string" !== typeof srcSet && null != srcSet) ||
  2153. "low" === props.fetchPriority ||
  2154. pictureOrNoScriptTagInScope
  2155. ) &&
  2156. ("string" !== typeof src ||
  2157. ":" !== src[4] ||
  2158. ("d" !== src[0] && "D" !== src[0]) ||
  2159. ("a" !== src[1] && "A" !== src[1]) ||
  2160. ("t" !== src[2] && "T" !== src[2]) ||
  2161. ("a" !== src[3] && "A" !== src[3])) &&
  2162. ("string" !== typeof srcSet ||
  2163. ":" !== srcSet[4] ||
  2164. ("d" !== srcSet[0] && "D" !== srcSet[0]) ||
  2165. ("a" !== srcSet[1] && "A" !== srcSet[1]) ||
  2166. ("t" !== srcSet[2] && "T" !== srcSet[2]) ||
  2167. ("a" !== srcSet[3] && "A" !== srcSet[3]))
  2168. ) {
  2169. null !== hoistableState &&
  2170. formatContext.tagScope & 64 &&
  2171. (hoistableState.suspenseyImages = !0);
  2172. var sizes = "string" === typeof props.sizes ? props.sizes : void 0,
  2173. key$jscomp$0 = srcSet ? srcSet + "\n" + (sizes || "") : src,
  2174. promotablePreloads = renderState.preloads.images,
  2175. resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);
  2176. if (resource$jscomp$1) {
  2177. if (
  2178. "high" === props.fetchPriority ||
  2179. 10 > renderState.highImagePreloads.size
  2180. )
  2181. promotablePreloads.delete(key$jscomp$0),
  2182. renderState.highImagePreloads.add(resource$jscomp$1);
  2183. } else if (
  2184. !resumableState.imageResources.hasOwnProperty(key$jscomp$0)
  2185. ) {
  2186. resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;
  2187. var input = props.crossOrigin;
  2188. var JSCompiler_inline_result$jscomp$8 =
  2189. "string" === typeof input
  2190. ? "use-credentials" === input
  2191. ? input
  2192. : ""
  2193. : void 0;
  2194. var headers = renderState.headers,
  2195. header;
  2196. headers &&
  2197. 0 < headers.remainingCapacity &&
  2198. "string" !== typeof props.srcSet &&
  2199. ("high" === props.fetchPriority ||
  2200. 500 > headers.highImagePreloads.length) &&
  2201. ((header = getPreloadAsHeader(src, "image", {
  2202. imageSrcSet: props.srcSet,
  2203. imageSizes: props.sizes,
  2204. crossOrigin: JSCompiler_inline_result$jscomp$8,
  2205. integrity: props.integrity,
  2206. nonce: props.nonce,
  2207. type: props.type,
  2208. fetchPriority: props.fetchPriority,
  2209. referrerPolicy: props.refererPolicy
  2210. })),
  2211. 0 <= (headers.remainingCapacity -= header.length + 2))
  2212. ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),
  2213. headers.highImagePreloads && (headers.highImagePreloads += ", "),
  2214. (headers.highImagePreloads += header))
  2215. : ((resource$jscomp$1 = []),
  2216. pushLinkImpl(resource$jscomp$1, {
  2217. rel: "preload",
  2218. as: "image",
  2219. href: srcSet ? void 0 : src,
  2220. imageSrcSet: srcSet,
  2221. imageSizes: sizes,
  2222. crossOrigin: JSCompiler_inline_result$jscomp$8,
  2223. integrity: props.integrity,
  2224. type: props.type,
  2225. fetchPriority: props.fetchPriority,
  2226. referrerPolicy: props.referrerPolicy
  2227. }),
  2228. "high" === props.fetchPriority ||
  2229. 10 > renderState.highImagePreloads.size
  2230. ? renderState.highImagePreloads.add(resource$jscomp$1)
  2231. : (renderState.bulkPreloads.add(resource$jscomp$1),
  2232. promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));
  2233. }
  2234. }
  2235. return pushSelfClosing(target$jscomp$0, props, "img");
  2236. case "base":
  2237. case "area":
  2238. case "br":
  2239. case "col":
  2240. case "embed":
  2241. case "hr":
  2242. case "keygen":
  2243. case "param":
  2244. case "source":
  2245. case "track":
  2246. case "wbr":
  2247. return pushSelfClosing(target$jscomp$0, props, type);
  2248. case "annotation-xml":
  2249. case "color-profile":
  2250. case "font-face":
  2251. case "font-face-src":
  2252. case "font-face-uri":
  2253. case "font-face-format":
  2254. case "font-face-name":
  2255. case "missing-glyph":
  2256. break;
  2257. case "head":
  2258. if (2 > formatContext.insertionMode) {
  2259. var preamble = preambleState || renderState.preamble;
  2260. if (preamble.headChunks)
  2261. throw Error("The `<head>` tag may only be rendered once.");
  2262. null !== preambleState &&
  2263. target$jscomp$0.push(headPreambleContributionChunk);
  2264. preamble.headChunks = [];
  2265. var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(
  2266. preamble.headChunks,
  2267. props,
  2268. "head"
  2269. );
  2270. } else
  2271. JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(
  2272. target$jscomp$0,
  2273. props,
  2274. "head"
  2275. );
  2276. return JSCompiler_inline_result$jscomp$9;
  2277. case "body":
  2278. if (2 > formatContext.insertionMode) {
  2279. var preamble$jscomp$0 = preambleState || renderState.preamble;
  2280. if (preamble$jscomp$0.bodyChunks)
  2281. throw Error("The `<body>` tag may only be rendered once.");
  2282. null !== preambleState &&
  2283. target$jscomp$0.push(bodyPreambleContributionChunk);
  2284. preamble$jscomp$0.bodyChunks = [];
  2285. var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(
  2286. preamble$jscomp$0.bodyChunks,
  2287. props,
  2288. "body"
  2289. );
  2290. } else
  2291. JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(
  2292. target$jscomp$0,
  2293. props,
  2294. "body"
  2295. );
  2296. return JSCompiler_inline_result$jscomp$10;
  2297. case "html":
  2298. if (0 === formatContext.insertionMode) {
  2299. var preamble$jscomp$1 = preambleState || renderState.preamble;
  2300. if (preamble$jscomp$1.htmlChunks)
  2301. throw Error("The `<html>` tag may only be rendered once.");
  2302. null !== preambleState &&
  2303. target$jscomp$0.push(htmlPreambleContributionChunk);
  2304. preamble$jscomp$1.htmlChunks = [doctypeChunk];
  2305. var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(
  2306. preamble$jscomp$1.htmlChunks,
  2307. props,
  2308. "html"
  2309. );
  2310. } else
  2311. JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(
  2312. target$jscomp$0,
  2313. props,
  2314. "html"
  2315. );
  2316. return JSCompiler_inline_result$jscomp$11;
  2317. default:
  2318. if (-1 !== type.indexOf("-")) {
  2319. target$jscomp$0.push(startChunkForTag(type));
  2320. var children$jscomp$9 = null,
  2321. innerHTML$jscomp$8 = null,
  2322. propKey$jscomp$11;
  2323. for (propKey$jscomp$11 in props)
  2324. if (hasOwnProperty.call(props, propKey$jscomp$11)) {
  2325. var propValue$jscomp$11 = props[propKey$jscomp$11];
  2326. if (null != propValue$jscomp$11) {
  2327. var attributeName = propKey$jscomp$11;
  2328. switch (propKey$jscomp$11) {
  2329. case "children":
  2330. children$jscomp$9 = propValue$jscomp$11;
  2331. break;
  2332. case "dangerouslySetInnerHTML":
  2333. innerHTML$jscomp$8 = propValue$jscomp$11;
  2334. break;
  2335. case "style":
  2336. pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);
  2337. break;
  2338. case "suppressContentEditableWarning":
  2339. case "suppressHydrationWarning":
  2340. case "ref":
  2341. break;
  2342. case "className":
  2343. attributeName = "class";
  2344. default:
  2345. if (
  2346. isAttributeNameSafe(propKey$jscomp$11) &&
  2347. "function" !== typeof propValue$jscomp$11 &&
  2348. "symbol" !== typeof propValue$jscomp$11 &&
  2349. !1 !== propValue$jscomp$11
  2350. ) {
  2351. if (!0 === propValue$jscomp$11) propValue$jscomp$11 = "";
  2352. else if ("object" === typeof propValue$jscomp$11) continue;
  2353. target$jscomp$0.push(
  2354. attributeSeparator,
  2355. stringToChunk(attributeName),
  2356. attributeAssign,
  2357. stringToChunk(escapeTextForBrowser(propValue$jscomp$11)),
  2358. attributeEnd
  2359. );
  2360. }
  2361. }
  2362. }
  2363. }
  2364. target$jscomp$0.push(endOfStartTag);
  2365. pushInnerHTML(target$jscomp$0, innerHTML$jscomp$8, children$jscomp$9);
  2366. return children$jscomp$9;
  2367. }
  2368. }
  2369. return pushStartGenericElement(target$jscomp$0, props, type);
  2370. }
  2371. var endTagCache = new Map();
  2372. function endChunkForTag(tag) {
  2373. var chunk = endTagCache.get(tag);
  2374. void 0 === chunk &&
  2375. ((chunk = stringToPrecomputedChunk("</" + tag + ">")),
  2376. endTagCache.set(tag, chunk));
  2377. return chunk;
  2378. }
  2379. function hoistPreambleState(renderState, preambleState) {
  2380. renderState = renderState.preamble;
  2381. null === renderState.htmlChunks &&
  2382. preambleState.htmlChunks &&
  2383. (renderState.htmlChunks = preambleState.htmlChunks);
  2384. null === renderState.headChunks &&
  2385. preambleState.headChunks &&
  2386. (renderState.headChunks = preambleState.headChunks);
  2387. null === renderState.bodyChunks &&
  2388. preambleState.bodyChunks &&
  2389. (renderState.bodyChunks = preambleState.bodyChunks);
  2390. }
  2391. function writeBootstrap(destination, renderState) {
  2392. renderState = renderState.bootstrapChunks;
  2393. for (var i = 0; i < renderState.length - 1; i++)
  2394. writeChunk(destination, renderState[i]);
  2395. return i < renderState.length
  2396. ? ((i = renderState[i]),
  2397. (renderState.length = 0),
  2398. writeChunkAndReturn(destination, i))
  2399. : !0;
  2400. }
  2401. var shellTimeRuntimeScript = stringToPrecomputedChunk(
  2402. "requestAnimationFrame(function(){$RT=performance.now()});"
  2403. ),
  2404. placeholder1 = stringToPrecomputedChunk('<template id="'),
  2405. placeholder2 = stringToPrecomputedChunk('"></template>'),
  2406. startActivityBoundary = stringToPrecomputedChunk("\x3c!--&--\x3e"),
  2407. endActivityBoundary = stringToPrecomputedChunk("\x3c!--/&--\x3e"),
  2408. startCompletedSuspenseBoundary = stringToPrecomputedChunk("\x3c!--$--\x3e"),
  2409. startPendingSuspenseBoundary1 = stringToPrecomputedChunk(
  2410. '\x3c!--$?--\x3e<template id="'
  2411. ),
  2412. startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>'),
  2413. startClientRenderedSuspenseBoundary =
  2414. stringToPrecomputedChunk("\x3c!--$!--\x3e"),
  2415. endSuspenseBoundary = stringToPrecomputedChunk("\x3c!--/$--\x3e"),
  2416. clientRenderedSuspenseBoundaryError1 = stringToPrecomputedChunk("<template"),
  2417. clientRenderedSuspenseBoundaryErrorAttrInterstitial =
  2418. stringToPrecomputedChunk('"'),
  2419. clientRenderedSuspenseBoundaryError1A =
  2420. stringToPrecomputedChunk(' data-dgst="');
  2421. stringToPrecomputedChunk(' data-msg="');
  2422. stringToPrecomputedChunk(' data-stck="');
  2423. stringToPrecomputedChunk(' data-cstck="');
  2424. var clientRenderedSuspenseBoundaryError2 =
  2425. stringToPrecomputedChunk("></template>");
  2426. function writeStartPendingSuspenseBoundary(destination, renderState, id) {
  2427. writeChunk(destination, startPendingSuspenseBoundary1);
  2428. if (null === id)
  2429. throw Error(
  2430. "An ID must have been assigned before we can complete the boundary."
  2431. );
  2432. writeChunk(destination, renderState.boundaryPrefix);
  2433. writeChunk(destination, stringToChunk(id.toString(16)));
  2434. return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);
  2435. }
  2436. var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="'),
  2437. startSegmentHTML2 = stringToPrecomputedChunk('">'),
  2438. endSegmentHTML = stringToPrecomputedChunk("</div>"),
  2439. startSegmentSVG = stringToPrecomputedChunk(
  2440. '<svg aria-hidden="true" style="display:none" id="'
  2441. ),
  2442. startSegmentSVG2 = stringToPrecomputedChunk('">'),
  2443. endSegmentSVG = stringToPrecomputedChunk("</svg>"),
  2444. startSegmentMathML = stringToPrecomputedChunk(
  2445. '<math aria-hidden="true" style="display:none" id="'
  2446. ),
  2447. startSegmentMathML2 = stringToPrecomputedChunk('">'),
  2448. endSegmentMathML = stringToPrecomputedChunk("</math>"),
  2449. startSegmentTable = stringToPrecomputedChunk('<table hidden id="'),
  2450. startSegmentTable2 = stringToPrecomputedChunk('">'),
  2451. endSegmentTable = stringToPrecomputedChunk("</table>"),
  2452. startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="'),
  2453. startSegmentTableBody2 = stringToPrecomputedChunk('">'),
  2454. endSegmentTableBody = stringToPrecomputedChunk("</tbody></table>"),
  2455. startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="'),
  2456. startSegmentTableRow2 = stringToPrecomputedChunk('">'),
  2457. endSegmentTableRow = stringToPrecomputedChunk("</tr></table>"),
  2458. startSegmentColGroup = stringToPrecomputedChunk(
  2459. '<table hidden><colgroup id="'
  2460. ),
  2461. startSegmentColGroup2 = stringToPrecomputedChunk('">'),
  2462. endSegmentColGroup = stringToPrecomputedChunk("</colgroup></table>");
  2463. function writeStartSegment(destination, renderState, formatContext, id) {
  2464. switch (formatContext.insertionMode) {
  2465. case 0:
  2466. case 1:
  2467. case 3:
  2468. case 2:
  2469. return (
  2470. writeChunk(destination, startSegmentHTML),
  2471. writeChunk(destination, renderState.segmentPrefix),
  2472. writeChunk(destination, stringToChunk(id.toString(16))),
  2473. writeChunkAndReturn(destination, startSegmentHTML2)
  2474. );
  2475. case 4:
  2476. return (
  2477. writeChunk(destination, startSegmentSVG),
  2478. writeChunk(destination, renderState.segmentPrefix),
  2479. writeChunk(destination, stringToChunk(id.toString(16))),
  2480. writeChunkAndReturn(destination, startSegmentSVG2)
  2481. );
  2482. case 5:
  2483. return (
  2484. writeChunk(destination, startSegmentMathML),
  2485. writeChunk(destination, renderState.segmentPrefix),
  2486. writeChunk(destination, stringToChunk(id.toString(16))),
  2487. writeChunkAndReturn(destination, startSegmentMathML2)
  2488. );
  2489. case 6:
  2490. return (
  2491. writeChunk(destination, startSegmentTable),
  2492. writeChunk(destination, renderState.segmentPrefix),
  2493. writeChunk(destination, stringToChunk(id.toString(16))),
  2494. writeChunkAndReturn(destination, startSegmentTable2)
  2495. );
  2496. case 7:
  2497. return (
  2498. writeChunk(destination, startSegmentTableBody),
  2499. writeChunk(destination, renderState.segmentPrefix),
  2500. writeChunk(destination, stringToChunk(id.toString(16))),
  2501. writeChunkAndReturn(destination, startSegmentTableBody2)
  2502. );
  2503. case 8:
  2504. return (
  2505. writeChunk(destination, startSegmentTableRow),
  2506. writeChunk(destination, renderState.segmentPrefix),
  2507. writeChunk(destination, stringToChunk(id.toString(16))),
  2508. writeChunkAndReturn(destination, startSegmentTableRow2)
  2509. );
  2510. case 9:
  2511. return (
  2512. writeChunk(destination, startSegmentColGroup),
  2513. writeChunk(destination, renderState.segmentPrefix),
  2514. writeChunk(destination, stringToChunk(id.toString(16))),
  2515. writeChunkAndReturn(destination, startSegmentColGroup2)
  2516. );
  2517. default:
  2518. throw Error("Unknown insertion mode. This is a bug in React.");
  2519. }
  2520. }
  2521. function writeEndSegment(destination, formatContext) {
  2522. switch (formatContext.insertionMode) {
  2523. case 0:
  2524. case 1:
  2525. case 3:
  2526. case 2:
  2527. return writeChunkAndReturn(destination, endSegmentHTML);
  2528. case 4:
  2529. return writeChunkAndReturn(destination, endSegmentSVG);
  2530. case 5:
  2531. return writeChunkAndReturn(destination, endSegmentMathML);
  2532. case 6:
  2533. return writeChunkAndReturn(destination, endSegmentTable);
  2534. case 7:
  2535. return writeChunkAndReturn(destination, endSegmentTableBody);
  2536. case 8:
  2537. return writeChunkAndReturn(destination, endSegmentTableRow);
  2538. case 9:
  2539. return writeChunkAndReturn(destination, endSegmentColGroup);
  2540. default:
  2541. throw Error("Unknown insertion mode. This is a bug in React.");
  2542. }
  2543. }
  2544. var completeSegmentScript1Full = stringToPrecomputedChunk(
  2545. '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'
  2546. ),
  2547. completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("'),
  2548. completeSegmentScript2 = stringToPrecomputedChunk('","'),
  2549. completeSegmentScriptEnd = stringToPrecomputedChunk('")\x3c/script>');
  2550. stringToPrecomputedChunk('<template data-rsi="" data-sid="');
  2551. stringToPrecomputedChunk('" data-pid="');
  2552. var completeBoundaryScriptFunctionOnly = stringToPrecomputedChunk(
  2553. '$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};'
  2554. );
  2555. stringToChunk(
  2556. '$RV=function(A,g){function k(a,b){var e=a.getAttribute(b);e&&(b=a.style,l.push(a,b.viewTransitionName,b.viewTransitionClass),"auto"!==e&&(b.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+K++ +"_"),b.viewTransitionName=a,B=!0)}var B=!1,K=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var h=g[f].querySelectorAll("[vt-share]"),d=0;d<h.length;d++){var c=h[d];m.set(c.getAttribute("vt-name"),c)}var u=[];for(h=0;h<g.length;h+=2){var C=g[h],x=C.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){c=C;for(f=0;c;){if(8===c.nodeType){var r=c.data;if("/$"===r)if(0===f)break;else f--;else"$"!==r&&"$?"!==r&&"$~"!==r&&"$!"!==r||f++}else if(1===c.nodeType){d=c;var D=d.getAttribute("vt-name"),y=m.get(D);k(d,y?"vt-share":"vt-exit");y&&(k(y,"vt-share"),m.set(D,null));var E=d.querySelectorAll("[vt-share]");for(d=0;d<E.length;d++){var F=E[d],G=F.getAttribute("vt-name"),\nH=m.get(G);H&&(k(F,"vt-share"),k(H,"vt-share"),m.set(G,null))}}c=c.nextSibling}for(var I=g[h+1],t=I.firstElementChild;t;)null!==m.get(t.getAttribute("vt-name"))&&k(t,"vt-enter"),t=t.nextElementSibling;c=x;do for(var n=c.firstElementChild;n;){var J=n.getAttribute("vt-update");J&&"none"!==J&&!l.includes(n)&&k(n,"vt-update");n=n.nextElementSibling}while((c=c.parentNode)&&1===c.nodeType&&"none"!==c.getAttribute("vt-update"));u.push.apply(u,I.querySelectorAll(\'img[src]:not([loading="lazy"])\'))}}}if(B){var z=\ndocument.__reactViewTransition=document.startViewTransition({update:function(){A(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],b={},e=0;e<u.length;b={g:b.g},e++)if(b.g=u[e],!b.g.complete){var p=b.g.getBoundingClientRect();0<p.bottom&&0<p.right&&p.top<window.innerHeight&&p.left<window.innerWidth&&(p=new Promise(function(w){return function(q){w.g.addEventListener("load",q);w.g.addEventListener("error",q)}}(b)),a.push(p))}return Promise.race([Promise.all(a),new Promise(function(w){var q=\nperformance.now();setTimeout(w,2300>q&&2E3<q?2300-q:500)})])},types:[]});z.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var b=l[a],e=b.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===b.getAttribute("style")&&b.removeAttribute("style")}});z.finished.finally(function(){document.__reactViewTransition===z&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}A(g)}.bind(null,$RV);'
  2557. );
  2558. var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'),
  2559. completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(
  2560. '$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=\n"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\n"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("'
  2561. ),
  2562. completeBoundaryWithStylesScript1Partial = stringToPrecomputedChunk('$RR("'),
  2563. completeBoundaryScript2 = stringToPrecomputedChunk('","'),
  2564. completeBoundaryScript3a = stringToPrecomputedChunk('",'),
  2565. completeBoundaryScript3b = stringToPrecomputedChunk('"'),
  2566. completeBoundaryScriptEnd = stringToPrecomputedChunk(")\x3c/script>");
  2567. stringToPrecomputedChunk('<template data-rci="" data-bid="');
  2568. stringToPrecomputedChunk('<template data-rri="" data-bid="');
  2569. stringToPrecomputedChunk('" data-sid="');
  2570. stringToPrecomputedChunk('" data-sty="');
  2571. var clientRenderScriptFunctionOnly = stringToPrecomputedChunk(
  2572. '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'
  2573. ),
  2574. clientRenderScript1Full = stringToPrecomputedChunk(
  2575. '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("'
  2576. ),
  2577. clientRenderScript1Partial = stringToPrecomputedChunk('$RX("'),
  2578. clientRenderScript1A = stringToPrecomputedChunk('"'),
  2579. clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(","),
  2580. clientRenderScriptEnd = stringToPrecomputedChunk(")\x3c/script>");
  2581. stringToPrecomputedChunk('<template data-rxi="" data-bid="');
  2582. stringToPrecomputedChunk('" data-dgst="');
  2583. stringToPrecomputedChunk('" data-msg="');
  2584. stringToPrecomputedChunk('" data-stck="');
  2585. stringToPrecomputedChunk('" data-cstck="');
  2586. var regexForJSStringsInInstructionScripts = /[<\u2028\u2029]/g;
  2587. function escapeJSStringsForInstructionScripts(input) {
  2588. return JSON.stringify(input).replace(
  2589. regexForJSStringsInInstructionScripts,
  2590. function (match) {
  2591. switch (match) {
  2592. case "<":
  2593. return "\\u003c";
  2594. case "\u2028":
  2595. return "\\u2028";
  2596. case "\u2029":
  2597. return "\\u2029";
  2598. default:
  2599. throw Error(
  2600. "escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
  2601. );
  2602. }
  2603. }
  2604. );
  2605. }
  2606. var regexForJSStringsInScripts = /[&><\u2028\u2029]/g;
  2607. function escapeJSObjectForInstructionScripts(input) {
  2608. return JSON.stringify(input).replace(
  2609. regexForJSStringsInScripts,
  2610. function (match) {
  2611. switch (match) {
  2612. case "&":
  2613. return "\\u0026";
  2614. case ">":
  2615. return "\\u003e";
  2616. case "<":
  2617. return "\\u003c";
  2618. case "\u2028":
  2619. return "\\u2028";
  2620. case "\u2029":
  2621. return "\\u2029";
  2622. default:
  2623. throw Error(
  2624. "escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
  2625. );
  2626. }
  2627. }
  2628. );
  2629. }
  2630. var lateStyleTagResourceOpen1 = stringToPrecomputedChunk(
  2631. ' media="not all" data-precedence="'
  2632. ),
  2633. lateStyleTagResourceOpen2 = stringToPrecomputedChunk('" data-href="'),
  2634. lateStyleTagResourceOpen3 = stringToPrecomputedChunk('">'),
  2635. lateStyleTagTemplateClose = stringToPrecomputedChunk("</style>"),
  2636. currentlyRenderingBoundaryHasStylesToHoist = !1,
  2637. destinationHasCapacity = !0;
  2638. function flushStyleTagsLateForBoundary(styleQueue) {
  2639. var rules = styleQueue.rules,
  2640. hrefs = styleQueue.hrefs,
  2641. i = 0;
  2642. if (hrefs.length) {
  2643. writeChunk(this, currentlyFlushingRenderState.startInlineStyle);
  2644. writeChunk(this, lateStyleTagResourceOpen1);
  2645. writeChunk(this, styleQueue.precedence);
  2646. for (writeChunk(this, lateStyleTagResourceOpen2); i < hrefs.length - 1; i++)
  2647. writeChunk(this, hrefs[i]), writeChunk(this, spaceSeparator);
  2648. writeChunk(this, hrefs[i]);
  2649. writeChunk(this, lateStyleTagResourceOpen3);
  2650. for (i = 0; i < rules.length; i++) writeChunk(this, rules[i]);
  2651. destinationHasCapacity = writeChunkAndReturn(
  2652. this,
  2653. lateStyleTagTemplateClose
  2654. );
  2655. currentlyRenderingBoundaryHasStylesToHoist = !0;
  2656. rules.length = 0;
  2657. hrefs.length = 0;
  2658. }
  2659. }
  2660. function hasStylesToHoist(stylesheet) {
  2661. return 2 !== stylesheet.state
  2662. ? (currentlyRenderingBoundaryHasStylesToHoist = !0)
  2663. : !1;
  2664. }
  2665. function writeHoistablesForBoundary(destination, hoistableState, renderState) {
  2666. currentlyRenderingBoundaryHasStylesToHoist = !1;
  2667. destinationHasCapacity = !0;
  2668. currentlyFlushingRenderState = renderState;
  2669. hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);
  2670. currentlyFlushingRenderState = null;
  2671. hoistableState.stylesheets.forEach(hasStylesToHoist);
  2672. currentlyRenderingBoundaryHasStylesToHoist &&
  2673. (renderState.stylesToHoist = !0);
  2674. return destinationHasCapacity;
  2675. }
  2676. function flushResource(resource) {
  2677. for (var i = 0; i < resource.length; i++) writeChunk(this, resource[i]);
  2678. resource.length = 0;
  2679. }
  2680. var stylesheetFlushingQueue = [];
  2681. function flushStyleInPreamble(stylesheet) {
  2682. pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);
  2683. for (var i = 0; i < stylesheetFlushingQueue.length; i++)
  2684. writeChunk(this, stylesheetFlushingQueue[i]);
  2685. stylesheetFlushingQueue.length = 0;
  2686. stylesheet.state = 2;
  2687. }
  2688. var styleTagResourceOpen1 = stringToPrecomputedChunk(' data-precedence="'),
  2689. styleTagResourceOpen2 = stringToPrecomputedChunk('" data-href="'),
  2690. spaceSeparator = stringToPrecomputedChunk(" "),
  2691. styleTagResourceOpen3 = stringToPrecomputedChunk('">'),
  2692. styleTagResourceClose = stringToPrecomputedChunk("</style>");
  2693. function flushStylesInPreamble(styleQueue) {
  2694. var hasStylesheets = 0 < styleQueue.sheets.size;
  2695. styleQueue.sheets.forEach(flushStyleInPreamble, this);
  2696. styleQueue.sheets.clear();
  2697. var rules = styleQueue.rules,
  2698. hrefs = styleQueue.hrefs;
  2699. if (!hasStylesheets || hrefs.length) {
  2700. writeChunk(this, currentlyFlushingRenderState.startInlineStyle);
  2701. writeChunk(this, styleTagResourceOpen1);
  2702. writeChunk(this, styleQueue.precedence);
  2703. styleQueue = 0;
  2704. if (hrefs.length) {
  2705. for (
  2706. writeChunk(this, styleTagResourceOpen2);
  2707. styleQueue < hrefs.length - 1;
  2708. styleQueue++
  2709. )
  2710. writeChunk(this, hrefs[styleQueue]), writeChunk(this, spaceSeparator);
  2711. writeChunk(this, hrefs[styleQueue]);
  2712. }
  2713. writeChunk(this, styleTagResourceOpen3);
  2714. for (styleQueue = 0; styleQueue < rules.length; styleQueue++)
  2715. writeChunk(this, rules[styleQueue]);
  2716. writeChunk(this, styleTagResourceClose);
  2717. rules.length = 0;
  2718. hrefs.length = 0;
  2719. }
  2720. }
  2721. function preloadLateStyle(stylesheet) {
  2722. if (0 === stylesheet.state) {
  2723. stylesheet.state = 1;
  2724. var props = stylesheet.props;
  2725. pushLinkImpl(stylesheetFlushingQueue, {
  2726. rel: "preload",
  2727. as: "style",
  2728. href: stylesheet.props.href,
  2729. crossOrigin: props.crossOrigin,
  2730. fetchPriority: props.fetchPriority,
  2731. integrity: props.integrity,
  2732. media: props.media,
  2733. hrefLang: props.hrefLang,
  2734. referrerPolicy: props.referrerPolicy
  2735. });
  2736. for (
  2737. stylesheet = 0;
  2738. stylesheet < stylesheetFlushingQueue.length;
  2739. stylesheet++
  2740. )
  2741. writeChunk(this, stylesheetFlushingQueue[stylesheet]);
  2742. stylesheetFlushingQueue.length = 0;
  2743. }
  2744. }
  2745. function preloadLateStyles(styleQueue) {
  2746. styleQueue.sheets.forEach(preloadLateStyle, this);
  2747. styleQueue.sheets.clear();
  2748. }
  2749. stringToPrecomputedChunk('<link rel="expect" href="#');
  2750. stringToPrecomputedChunk('" blocking="render"/>');
  2751. var completedShellIdAttributeStart = stringToPrecomputedChunk(' id="');
  2752. function pushCompletedShellIdAttribute(target, resumableState) {
  2753. 0 === (resumableState.instructions & 32) &&
  2754. ((resumableState.instructions |= 32),
  2755. target.push(
  2756. completedShellIdAttributeStart,
  2757. stringToChunk(escapeTextForBrowser("_" + resumableState.idPrefix + "R_")),
  2758. attributeEnd
  2759. ));
  2760. }
  2761. var arrayFirstOpenBracket = stringToPrecomputedChunk("["),
  2762. arraySubsequentOpenBracket = stringToPrecomputedChunk(",["),
  2763. arrayInterstitial = stringToPrecomputedChunk(","),
  2764. arrayCloseBracket = stringToPrecomputedChunk("]");
  2765. function writeStyleResourceDependenciesInJS(destination, hoistableState) {
  2766. writeChunk(destination, arrayFirstOpenBracket);
  2767. var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
  2768. hoistableState.stylesheets.forEach(function (resource) {
  2769. if (2 !== resource.state)
  2770. if (3 === resource.state)
  2771. writeChunk(destination, nextArrayOpenBrackChunk),
  2772. writeChunk(
  2773. destination,
  2774. stringToChunk(
  2775. escapeJSObjectForInstructionScripts("" + resource.props.href)
  2776. )
  2777. ),
  2778. writeChunk(destination, arrayCloseBracket),
  2779. (nextArrayOpenBrackChunk = arraySubsequentOpenBracket);
  2780. else {
  2781. writeChunk(destination, nextArrayOpenBrackChunk);
  2782. var precedence = resource.props["data-precedence"],
  2783. props = resource.props,
  2784. coercedHref = sanitizeURL("" + resource.props.href);
  2785. writeChunk(
  2786. destination,
  2787. stringToChunk(escapeJSObjectForInstructionScripts(coercedHref))
  2788. );
  2789. precedence = "" + precedence;
  2790. writeChunk(destination, arrayInterstitial);
  2791. writeChunk(
  2792. destination,
  2793. stringToChunk(escapeJSObjectForInstructionScripts(precedence))
  2794. );
  2795. for (var propKey in props)
  2796. if (
  2797. hasOwnProperty.call(props, propKey) &&
  2798. ((precedence = props[propKey]), null != precedence)
  2799. )
  2800. switch (propKey) {
  2801. case "href":
  2802. case "rel":
  2803. case "precedence":
  2804. case "data-precedence":
  2805. break;
  2806. case "children":
  2807. case "dangerouslySetInnerHTML":
  2808. throw Error(
  2809. "link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
  2810. );
  2811. default:
  2812. writeStyleResourceAttributeInJS(
  2813. destination,
  2814. propKey,
  2815. precedence
  2816. );
  2817. }
  2818. writeChunk(destination, arrayCloseBracket);
  2819. nextArrayOpenBrackChunk = arraySubsequentOpenBracket;
  2820. resource.state = 3;
  2821. }
  2822. });
  2823. writeChunk(destination, arrayCloseBracket);
  2824. }
  2825. function writeStyleResourceAttributeInJS(destination, name, value) {
  2826. var attributeName = name.toLowerCase();
  2827. switch (typeof value) {
  2828. case "function":
  2829. case "symbol":
  2830. return;
  2831. }
  2832. switch (name) {
  2833. case "innerHTML":
  2834. case "dangerouslySetInnerHTML":
  2835. case "suppressContentEditableWarning":
  2836. case "suppressHydrationWarning":
  2837. case "style":
  2838. case "ref":
  2839. return;
  2840. case "className":
  2841. attributeName = "class";
  2842. name = "" + value;
  2843. break;
  2844. case "hidden":
  2845. if (!1 === value) return;
  2846. name = "";
  2847. break;
  2848. case "src":
  2849. case "href":
  2850. value = sanitizeURL(value);
  2851. name = "" + value;
  2852. break;
  2853. default:
  2854. if (
  2855. (2 < name.length &&
  2856. ("o" === name[0] || "O" === name[0]) &&
  2857. ("n" === name[1] || "N" === name[1])) ||
  2858. !isAttributeNameSafe(name)
  2859. )
  2860. return;
  2861. name = "" + value;
  2862. }
  2863. writeChunk(destination, arrayInterstitial);
  2864. writeChunk(
  2865. destination,
  2866. stringToChunk(escapeJSObjectForInstructionScripts(attributeName))
  2867. );
  2868. writeChunk(destination, arrayInterstitial);
  2869. writeChunk(
  2870. destination,
  2871. stringToChunk(escapeJSObjectForInstructionScripts(name))
  2872. );
  2873. }
  2874. function createHoistableState() {
  2875. return { styles: new Set(), stylesheets: new Set(), suspenseyImages: !1 };
  2876. }
  2877. function prefetchDNS(href) {
  2878. var request = resolveRequest();
  2879. if (request) {
  2880. var resumableState = request.resumableState,
  2881. renderState = request.renderState;
  2882. if ("string" === typeof href && href) {
  2883. if (!resumableState.dnsResources.hasOwnProperty(href)) {
  2884. resumableState.dnsResources[href] = null;
  2885. resumableState = renderState.headers;
  2886. var header, JSCompiler_temp;
  2887. if (
  2888. (JSCompiler_temp =
  2889. resumableState && 0 < resumableState.remainingCapacity)
  2890. )
  2891. JSCompiler_temp =
  2892. ((header =
  2893. "<" +
  2894. ("" + href).replace(
  2895. regexForHrefInLinkHeaderURLContext,
  2896. escapeHrefForLinkHeaderURLContextReplacer
  2897. ) +
  2898. ">; rel=dns-prefetch"),
  2899. 0 <= (resumableState.remainingCapacity -= header.length + 2));
  2900. JSCompiler_temp
  2901. ? ((renderState.resets.dns[href] = null),
  2902. resumableState.preconnects && (resumableState.preconnects += ", "),
  2903. (resumableState.preconnects += header))
  2904. : ((header = []),
  2905. pushLinkImpl(header, { href: href, rel: "dns-prefetch" }),
  2906. renderState.preconnects.add(header));
  2907. }
  2908. enqueueFlush(request);
  2909. }
  2910. } else previousDispatcher.D(href);
  2911. }
  2912. function preconnect(href, crossOrigin) {
  2913. var request = resolveRequest();
  2914. if (request) {
  2915. var resumableState = request.resumableState,
  2916. renderState = request.renderState;
  2917. if ("string" === typeof href && href) {
  2918. var bucket =
  2919. "use-credentials" === crossOrigin
  2920. ? "credentials"
  2921. : "string" === typeof crossOrigin
  2922. ? "anonymous"
  2923. : "default";
  2924. if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {
  2925. resumableState.connectResources[bucket][href] = null;
  2926. resumableState = renderState.headers;
  2927. var header, JSCompiler_temp;
  2928. if (
  2929. (JSCompiler_temp =
  2930. resumableState && 0 < resumableState.remainingCapacity)
  2931. ) {
  2932. JSCompiler_temp =
  2933. "<" +
  2934. ("" + href).replace(
  2935. regexForHrefInLinkHeaderURLContext,
  2936. escapeHrefForLinkHeaderURLContextReplacer
  2937. ) +
  2938. ">; rel=preconnect";
  2939. if ("string" === typeof crossOrigin) {
  2940. var escapedCrossOrigin = ("" + crossOrigin).replace(
  2941. regexForLinkHeaderQuotedParamValueContext,
  2942. escapeStringForLinkHeaderQuotedParamValueContextReplacer
  2943. );
  2944. JSCompiler_temp += '; crossorigin="' + escapedCrossOrigin + '"';
  2945. }
  2946. JSCompiler_temp =
  2947. ((header = JSCompiler_temp),
  2948. 0 <= (resumableState.remainingCapacity -= header.length + 2));
  2949. }
  2950. JSCompiler_temp
  2951. ? ((renderState.resets.connect[bucket][href] = null),
  2952. resumableState.preconnects && (resumableState.preconnects += ", "),
  2953. (resumableState.preconnects += header))
  2954. : ((bucket = []),
  2955. pushLinkImpl(bucket, {
  2956. rel: "preconnect",
  2957. href: href,
  2958. crossOrigin: crossOrigin
  2959. }),
  2960. renderState.preconnects.add(bucket));
  2961. }
  2962. enqueueFlush(request);
  2963. }
  2964. } else previousDispatcher.C(href, crossOrigin);
  2965. }
  2966. function preload(href, as, options) {
  2967. var request = resolveRequest();
  2968. if (request) {
  2969. var resumableState = request.resumableState,
  2970. renderState = request.renderState;
  2971. if (as && href) {
  2972. switch (as) {
  2973. case "image":
  2974. if (options) {
  2975. var imageSrcSet = options.imageSrcSet;
  2976. var imageSizes = options.imageSizes;
  2977. var fetchPriority = options.fetchPriority;
  2978. }
  2979. var key = imageSrcSet
  2980. ? imageSrcSet + "\n" + (imageSizes || "")
  2981. : href;
  2982. if (resumableState.imageResources.hasOwnProperty(key)) return;
  2983. resumableState.imageResources[key] = PRELOAD_NO_CREDS;
  2984. resumableState = renderState.headers;
  2985. var header;
  2986. resumableState &&
  2987. 0 < resumableState.remainingCapacity &&
  2988. "string" !== typeof imageSrcSet &&
  2989. "high" === fetchPriority &&
  2990. ((header = getPreloadAsHeader(href, as, options)),
  2991. 0 <= (resumableState.remainingCapacity -= header.length + 2))
  2992. ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),
  2993. resumableState.highImagePreloads &&
  2994. (resumableState.highImagePreloads += ", "),
  2995. (resumableState.highImagePreloads += header))
  2996. : ((resumableState = []),
  2997. pushLinkImpl(
  2998. resumableState,
  2999. assign(
  3000. { rel: "preload", href: imageSrcSet ? void 0 : href, as: as },
  3001. options
  3002. )
  3003. ),
  3004. "high" === fetchPriority
  3005. ? renderState.highImagePreloads.add(resumableState)
  3006. : (renderState.bulkPreloads.add(resumableState),
  3007. renderState.preloads.images.set(key, resumableState)));
  3008. break;
  3009. case "style":
  3010. if (resumableState.styleResources.hasOwnProperty(href)) return;
  3011. imageSrcSet = [];
  3012. pushLinkImpl(
  3013. imageSrcSet,
  3014. assign({ rel: "preload", href: href, as: as }, options)
  3015. );
  3016. resumableState.styleResources[href] =
  3017. !options ||
  3018. ("string" !== typeof options.crossOrigin &&
  3019. "string" !== typeof options.integrity)
  3020. ? PRELOAD_NO_CREDS
  3021. : [options.crossOrigin, options.integrity];
  3022. renderState.preloads.stylesheets.set(href, imageSrcSet);
  3023. renderState.bulkPreloads.add(imageSrcSet);
  3024. break;
  3025. case "script":
  3026. if (resumableState.scriptResources.hasOwnProperty(href)) return;
  3027. imageSrcSet = [];
  3028. renderState.preloads.scripts.set(href, imageSrcSet);
  3029. renderState.bulkPreloads.add(imageSrcSet);
  3030. pushLinkImpl(
  3031. imageSrcSet,
  3032. assign({ rel: "preload", href: href, as: as }, options)
  3033. );
  3034. resumableState.scriptResources[href] =
  3035. !options ||
  3036. ("string" !== typeof options.crossOrigin &&
  3037. "string" !== typeof options.integrity)
  3038. ? PRELOAD_NO_CREDS
  3039. : [options.crossOrigin, options.integrity];
  3040. break;
  3041. default:
  3042. if (resumableState.unknownResources.hasOwnProperty(as)) {
  3043. if (
  3044. ((imageSrcSet = resumableState.unknownResources[as]),
  3045. imageSrcSet.hasOwnProperty(href))
  3046. )
  3047. return;
  3048. } else
  3049. (imageSrcSet = {}),
  3050. (resumableState.unknownResources[as] = imageSrcSet);
  3051. imageSrcSet[href] = PRELOAD_NO_CREDS;
  3052. if (
  3053. (resumableState = renderState.headers) &&
  3054. 0 < resumableState.remainingCapacity &&
  3055. "font" === as &&
  3056. ((key = getPreloadAsHeader(href, as, options)),
  3057. 0 <= (resumableState.remainingCapacity -= key.length + 2))
  3058. )
  3059. (renderState.resets.font[href] = PRELOAD_NO_CREDS),
  3060. resumableState.fontPreloads &&
  3061. (resumableState.fontPreloads += ", "),
  3062. (resumableState.fontPreloads += key);
  3063. else
  3064. switch (
  3065. ((resumableState = []),
  3066. (href = assign({ rel: "preload", href: href, as: as }, options)),
  3067. pushLinkImpl(resumableState, href),
  3068. as)
  3069. ) {
  3070. case "font":
  3071. renderState.fontPreloads.add(resumableState);
  3072. break;
  3073. default:
  3074. renderState.bulkPreloads.add(resumableState);
  3075. }
  3076. }
  3077. enqueueFlush(request);
  3078. }
  3079. } else previousDispatcher.L(href, as, options);
  3080. }
  3081. function preloadModule(href, options) {
  3082. var request = resolveRequest();
  3083. if (request) {
  3084. var resumableState = request.resumableState,
  3085. renderState = request.renderState;
  3086. if (href) {
  3087. var as =
  3088. options && "string" === typeof options.as ? options.as : "script";
  3089. switch (as) {
  3090. case "script":
  3091. if (resumableState.moduleScriptResources.hasOwnProperty(href)) return;
  3092. as = [];
  3093. resumableState.moduleScriptResources[href] =
  3094. !options ||
  3095. ("string" !== typeof options.crossOrigin &&
  3096. "string" !== typeof options.integrity)
  3097. ? PRELOAD_NO_CREDS
  3098. : [options.crossOrigin, options.integrity];
  3099. renderState.preloads.moduleScripts.set(href, as);
  3100. break;
  3101. default:
  3102. if (resumableState.moduleUnknownResources.hasOwnProperty(as)) {
  3103. var resources = resumableState.unknownResources[as];
  3104. if (resources.hasOwnProperty(href)) return;
  3105. } else
  3106. (resources = {}),
  3107. (resumableState.moduleUnknownResources[as] = resources);
  3108. as = [];
  3109. resources[href] = PRELOAD_NO_CREDS;
  3110. }
  3111. pushLinkImpl(as, assign({ rel: "modulepreload", href: href }, options));
  3112. renderState.bulkPreloads.add(as);
  3113. enqueueFlush(request);
  3114. }
  3115. } else previousDispatcher.m(href, options);
  3116. }
  3117. function preinitStyle(href, precedence, options) {
  3118. var request = resolveRequest();
  3119. if (request) {
  3120. var resumableState = request.resumableState,
  3121. renderState = request.renderState;
  3122. if (href) {
  3123. precedence = precedence || "default";
  3124. var styleQueue = renderState.styles.get(precedence),
  3125. resourceState = resumableState.styleResources.hasOwnProperty(href)
  3126. ? resumableState.styleResources[href]
  3127. : void 0;
  3128. null !== resourceState &&
  3129. ((resumableState.styleResources[href] = null),
  3130. styleQueue ||
  3131. ((styleQueue = {
  3132. precedence: stringToChunk(escapeTextForBrowser(precedence)),
  3133. rules: [],
  3134. hrefs: [],
  3135. sheets: new Map()
  3136. }),
  3137. renderState.styles.set(precedence, styleQueue)),
  3138. (precedence = {
  3139. state: 0,
  3140. props: assign(
  3141. { rel: "stylesheet", href: href, "data-precedence": precedence },
  3142. options
  3143. )
  3144. }),
  3145. resourceState &&
  3146. (2 === resourceState.length &&
  3147. adoptPreloadCredentials(precedence.props, resourceState),
  3148. (renderState = renderState.preloads.stylesheets.get(href)) &&
  3149. 0 < renderState.length
  3150. ? (renderState.length = 0)
  3151. : (precedence.state = 1)),
  3152. styleQueue.sheets.set(href, precedence),
  3153. enqueueFlush(request));
  3154. }
  3155. } else previousDispatcher.S(href, precedence, options);
  3156. }
  3157. function preinitScript(src, options) {
  3158. var request = resolveRequest();
  3159. if (request) {
  3160. var resumableState = request.resumableState,
  3161. renderState = request.renderState;
  3162. if (src) {
  3163. var resourceState = resumableState.scriptResources.hasOwnProperty(src)
  3164. ? resumableState.scriptResources[src]
  3165. : void 0;
  3166. null !== resourceState &&
  3167. ((resumableState.scriptResources[src] = null),
  3168. (options = assign({ src: src, async: !0 }, options)),
  3169. resourceState &&
  3170. (2 === resourceState.length &&
  3171. adoptPreloadCredentials(options, resourceState),
  3172. (src = renderState.preloads.scripts.get(src))) &&
  3173. (src.length = 0),
  3174. (src = []),
  3175. renderState.scripts.add(src),
  3176. pushScriptImpl(src, options),
  3177. enqueueFlush(request));
  3178. }
  3179. } else previousDispatcher.X(src, options);
  3180. }
  3181. function preinitModuleScript(src, options) {
  3182. var request = resolveRequest();
  3183. if (request) {
  3184. var resumableState = request.resumableState,
  3185. renderState = request.renderState;
  3186. if (src) {
  3187. var resourceState = resumableState.moduleScriptResources.hasOwnProperty(
  3188. src
  3189. )
  3190. ? resumableState.moduleScriptResources[src]
  3191. : void 0;
  3192. null !== resourceState &&
  3193. ((resumableState.moduleScriptResources[src] = null),
  3194. (options = assign({ src: src, type: "module", async: !0 }, options)),
  3195. resourceState &&
  3196. (2 === resourceState.length &&
  3197. adoptPreloadCredentials(options, resourceState),
  3198. (src = renderState.preloads.moduleScripts.get(src))) &&
  3199. (src.length = 0),
  3200. (src = []),
  3201. renderState.scripts.add(src),
  3202. pushScriptImpl(src, options),
  3203. enqueueFlush(request));
  3204. }
  3205. } else previousDispatcher.M(src, options);
  3206. }
  3207. function adoptPreloadCredentials(target, preloadState) {
  3208. null == target.crossOrigin && (target.crossOrigin = preloadState[0]);
  3209. null == target.integrity && (target.integrity = preloadState[1]);
  3210. }
  3211. function getPreloadAsHeader(href, as, params) {
  3212. href = ("" + href).replace(
  3213. regexForHrefInLinkHeaderURLContext,
  3214. escapeHrefForLinkHeaderURLContextReplacer
  3215. );
  3216. as = ("" + as).replace(
  3217. regexForLinkHeaderQuotedParamValueContext,
  3218. escapeStringForLinkHeaderQuotedParamValueContextReplacer
  3219. );
  3220. as = "<" + href + '>; rel=preload; as="' + as + '"';
  3221. for (var paramName in params)
  3222. hasOwnProperty.call(params, paramName) &&
  3223. ((href = params[paramName]),
  3224. "string" === typeof href &&
  3225. (as +=
  3226. "; " +
  3227. paramName.toLowerCase() +
  3228. '="' +
  3229. ("" + href).replace(
  3230. regexForLinkHeaderQuotedParamValueContext,
  3231. escapeStringForLinkHeaderQuotedParamValueContextReplacer
  3232. ) +
  3233. '"'));
  3234. return as;
  3235. }
  3236. var regexForHrefInLinkHeaderURLContext = /[<>\r\n]/g;
  3237. function escapeHrefForLinkHeaderURLContextReplacer(match) {
  3238. switch (match) {
  3239. case "<":
  3240. return "%3C";
  3241. case ">":
  3242. return "%3E";
  3243. case "\n":
  3244. return "%0A";
  3245. case "\r":
  3246. return "%0D";
  3247. default:
  3248. throw Error(
  3249. "escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
  3250. );
  3251. }
  3252. }
  3253. var regexForLinkHeaderQuotedParamValueContext = /["';,\r\n]/g;
  3254. function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {
  3255. switch (match) {
  3256. case '"':
  3257. return "%22";
  3258. case "'":
  3259. return "%27";
  3260. case ";":
  3261. return "%3B";
  3262. case ",":
  3263. return "%2C";
  3264. case "\n":
  3265. return "%0A";
  3266. case "\r":
  3267. return "%0D";
  3268. default:
  3269. throw Error(
  3270. "escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React"
  3271. );
  3272. }
  3273. }
  3274. function hoistStyleQueueDependency(styleQueue) {
  3275. this.styles.add(styleQueue);
  3276. }
  3277. function hoistStylesheetDependency(stylesheet) {
  3278. this.stylesheets.add(stylesheet);
  3279. }
  3280. function hoistHoistables(parentState, childState) {
  3281. childState.styles.forEach(hoistStyleQueueDependency, parentState);
  3282. childState.stylesheets.forEach(hoistStylesheetDependency, parentState);
  3283. childState.suspenseyImages && (parentState.suspenseyImages = !0);
  3284. }
  3285. function hasSuspenseyContent(hoistableState) {
  3286. return 0 < hoistableState.stylesheets.size || hoistableState.suspenseyImages;
  3287. }
  3288. var bind = Function.prototype.bind,
  3289. supportsRequestStorage = "function" === typeof AsyncLocalStorage,
  3290. requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null,
  3291. REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
  3292. function getComponentNameFromType(type) {
  3293. if (null == type) return null;
  3294. if ("function" === typeof type)
  3295. return type.$$typeof === REACT_CLIENT_REFERENCE
  3296. ? null
  3297. : type.displayName || type.name || null;
  3298. if ("string" === typeof type) return type;
  3299. switch (type) {
  3300. case REACT_FRAGMENT_TYPE:
  3301. return "Fragment";
  3302. case REACT_PROFILER_TYPE:
  3303. return "Profiler";
  3304. case REACT_STRICT_MODE_TYPE:
  3305. return "StrictMode";
  3306. case REACT_SUSPENSE_TYPE:
  3307. return "Suspense";
  3308. case REACT_SUSPENSE_LIST_TYPE:
  3309. return "SuspenseList";
  3310. case REACT_ACTIVITY_TYPE:
  3311. return "Activity";
  3312. }
  3313. if ("object" === typeof type)
  3314. switch (type.$$typeof) {
  3315. case REACT_PORTAL_TYPE:
  3316. return "Portal";
  3317. case REACT_CONTEXT_TYPE:
  3318. return type.displayName || "Context";
  3319. case REACT_CONSUMER_TYPE:
  3320. return (type._context.displayName || "Context") + ".Consumer";
  3321. case REACT_FORWARD_REF_TYPE:
  3322. var innerType = type.render;
  3323. type = type.displayName;
  3324. type ||
  3325. ((type = innerType.displayName || innerType.name || ""),
  3326. (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
  3327. return type;
  3328. case REACT_MEMO_TYPE:
  3329. return (
  3330. (innerType = type.displayName || null),
  3331. null !== innerType
  3332. ? innerType
  3333. : getComponentNameFromType(type.type) || "Memo"
  3334. );
  3335. case REACT_LAZY_TYPE:
  3336. innerType = type._payload;
  3337. type = type._init;
  3338. try {
  3339. return getComponentNameFromType(type(innerType));
  3340. } catch (x) {}
  3341. }
  3342. return null;
  3343. }
  3344. var emptyContextObject = {},
  3345. currentActiveSnapshot = null;
  3346. function popToNearestCommonAncestor(prev, next) {
  3347. if (prev !== next) {
  3348. prev.context._currentValue = prev.parentValue;
  3349. prev = prev.parent;
  3350. var parentNext = next.parent;
  3351. if (null === prev) {
  3352. if (null !== parentNext)
  3353. throw Error(
  3354. "The stacks must reach the root at the same time. This is a bug in React."
  3355. );
  3356. } else {
  3357. if (null === parentNext)
  3358. throw Error(
  3359. "The stacks must reach the root at the same time. This is a bug in React."
  3360. );
  3361. popToNearestCommonAncestor(prev, parentNext);
  3362. }
  3363. next.context._currentValue = next.value;
  3364. }
  3365. }
  3366. function popAllPrevious(prev) {
  3367. prev.context._currentValue = prev.parentValue;
  3368. prev = prev.parent;
  3369. null !== prev && popAllPrevious(prev);
  3370. }
  3371. function pushAllNext(next) {
  3372. var parentNext = next.parent;
  3373. null !== parentNext && pushAllNext(parentNext);
  3374. next.context._currentValue = next.value;
  3375. }
  3376. function popPreviousToCommonLevel(prev, next) {
  3377. prev.context._currentValue = prev.parentValue;
  3378. prev = prev.parent;
  3379. if (null === prev)
  3380. throw Error(
  3381. "The depth must equal at least at zero before reaching the root. This is a bug in React."
  3382. );
  3383. prev.depth === next.depth
  3384. ? popToNearestCommonAncestor(prev, next)
  3385. : popPreviousToCommonLevel(prev, next);
  3386. }
  3387. function popNextToCommonLevel(prev, next) {
  3388. var parentNext = next.parent;
  3389. if (null === parentNext)
  3390. throw Error(
  3391. "The depth must equal at least at zero before reaching the root. This is a bug in React."
  3392. );
  3393. prev.depth === parentNext.depth
  3394. ? popToNearestCommonAncestor(prev, parentNext)
  3395. : popNextToCommonLevel(prev, parentNext);
  3396. next.context._currentValue = next.value;
  3397. }
  3398. function switchContext(newSnapshot) {
  3399. var prev = currentActiveSnapshot;
  3400. prev !== newSnapshot &&
  3401. (null === prev
  3402. ? pushAllNext(newSnapshot)
  3403. : null === newSnapshot
  3404. ? popAllPrevious(prev)
  3405. : prev.depth === newSnapshot.depth
  3406. ? popToNearestCommonAncestor(prev, newSnapshot)
  3407. : prev.depth > newSnapshot.depth
  3408. ? popPreviousToCommonLevel(prev, newSnapshot)
  3409. : popNextToCommonLevel(prev, newSnapshot),
  3410. (currentActiveSnapshot = newSnapshot));
  3411. }
  3412. var classComponentUpdater = {
  3413. enqueueSetState: function (inst, payload) {
  3414. inst = inst._reactInternals;
  3415. null !== inst.queue && inst.queue.push(payload);
  3416. },
  3417. enqueueReplaceState: function (inst, payload) {
  3418. inst = inst._reactInternals;
  3419. inst.replace = !0;
  3420. inst.queue = [payload];
  3421. },
  3422. enqueueForceUpdate: function () {}
  3423. },
  3424. emptyTreeContext = { id: 1, overflow: "" };
  3425. function pushTreeContext(baseContext, totalChildren, index) {
  3426. var baseIdWithLeadingBit = baseContext.id;
  3427. baseContext = baseContext.overflow;
  3428. var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
  3429. baseIdWithLeadingBit &= ~(1 << baseLength);
  3430. index += 1;
  3431. var length = 32 - clz32(totalChildren) + baseLength;
  3432. if (30 < length) {
  3433. var numberOfOverflowBits = baseLength - (baseLength % 5);
  3434. length = (
  3435. baseIdWithLeadingBit &
  3436. ((1 << numberOfOverflowBits) - 1)
  3437. ).toString(32);
  3438. baseIdWithLeadingBit >>= numberOfOverflowBits;
  3439. baseLength -= numberOfOverflowBits;
  3440. return {
  3441. id:
  3442. (1 << (32 - clz32(totalChildren) + baseLength)) |
  3443. (index << baseLength) |
  3444. baseIdWithLeadingBit,
  3445. overflow: length + baseContext
  3446. };
  3447. }
  3448. return {
  3449. id: (1 << length) | (index << baseLength) | baseIdWithLeadingBit,
  3450. overflow: baseContext
  3451. };
  3452. }
  3453. var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,
  3454. log = Math.log,
  3455. LN2 = Math.LN2;
  3456. function clz32Fallback(x) {
  3457. x >>>= 0;
  3458. return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;
  3459. }
  3460. function noop() {}
  3461. var SuspenseException = Error(
  3462. "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`."
  3463. );
  3464. function trackUsedThenable(thenableState, thenable, index) {
  3465. index = thenableState[index];
  3466. void 0 === index
  3467. ? thenableState.push(thenable)
  3468. : index !== thenable && (thenable.then(noop, noop), (thenable = index));
  3469. switch (thenable.status) {
  3470. case "fulfilled":
  3471. return thenable.value;
  3472. case "rejected":
  3473. throw thenable.reason;
  3474. default:
  3475. "string" === typeof thenable.status
  3476. ? thenable.then(noop, noop)
  3477. : ((thenableState = thenable),
  3478. (thenableState.status = "pending"),
  3479. thenableState.then(
  3480. function (fulfilledValue) {
  3481. if ("pending" === thenable.status) {
  3482. var fulfilledThenable = thenable;
  3483. fulfilledThenable.status = "fulfilled";
  3484. fulfilledThenable.value = fulfilledValue;
  3485. }
  3486. },
  3487. function (error) {
  3488. if ("pending" === thenable.status) {
  3489. var rejectedThenable = thenable;
  3490. rejectedThenable.status = "rejected";
  3491. rejectedThenable.reason = error;
  3492. }
  3493. }
  3494. ));
  3495. switch (thenable.status) {
  3496. case "fulfilled":
  3497. return thenable.value;
  3498. case "rejected":
  3499. throw thenable.reason;
  3500. }
  3501. suspendedThenable = thenable;
  3502. throw SuspenseException;
  3503. }
  3504. }
  3505. var suspendedThenable = null;
  3506. function getSuspendedThenable() {
  3507. if (null === suspendedThenable)
  3508. throw Error(
  3509. "Expected a suspended thenable. This is a bug in React. Please file an issue."
  3510. );
  3511. var thenable = suspendedThenable;
  3512. suspendedThenable = null;
  3513. return thenable;
  3514. }
  3515. function is(x, y) {
  3516. return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
  3517. }
  3518. var objectIs = "function" === typeof Object.is ? Object.is : is,
  3519. currentlyRenderingComponent = null,
  3520. currentlyRenderingTask = null,
  3521. currentlyRenderingRequest = null,
  3522. currentlyRenderingKeyPath = null,
  3523. firstWorkInProgressHook = null,
  3524. workInProgressHook = null,
  3525. isReRender = !1,
  3526. didScheduleRenderPhaseUpdate = !1,
  3527. localIdCounter = 0,
  3528. actionStateCounter = 0,
  3529. actionStateMatchingIndex = -1,
  3530. thenableIndexCounter = 0,
  3531. thenableState = null,
  3532. renderPhaseUpdates = null,
  3533. numberOfReRenders = 0;
  3534. function resolveCurrentlyRenderingComponent() {
  3535. if (null === currentlyRenderingComponent)
  3536. throw Error(
  3537. "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."
  3538. );
  3539. return currentlyRenderingComponent;
  3540. }
  3541. function createHook() {
  3542. if (0 < numberOfReRenders)
  3543. throw Error("Rendered more hooks than during the previous render");
  3544. return { memoizedState: null, queue: null, next: null };
  3545. }
  3546. function createWorkInProgressHook() {
  3547. null === workInProgressHook
  3548. ? null === firstWorkInProgressHook
  3549. ? ((isReRender = !1),
  3550. (firstWorkInProgressHook = workInProgressHook = createHook()))
  3551. : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))
  3552. : null === workInProgressHook.next
  3553. ? ((isReRender = !1),
  3554. (workInProgressHook = workInProgressHook.next = createHook()))
  3555. : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));
  3556. return workInProgressHook;
  3557. }
  3558. function getThenableStateAfterSuspending() {
  3559. var state = thenableState;
  3560. thenableState = null;
  3561. return state;
  3562. }
  3563. function resetHooksState() {
  3564. currentlyRenderingKeyPath =
  3565. currentlyRenderingRequest =
  3566. currentlyRenderingTask =
  3567. currentlyRenderingComponent =
  3568. null;
  3569. didScheduleRenderPhaseUpdate = !1;
  3570. firstWorkInProgressHook = null;
  3571. numberOfReRenders = 0;
  3572. workInProgressHook = renderPhaseUpdates = null;
  3573. }
  3574. function basicStateReducer(state, action) {
  3575. return "function" === typeof action ? action(state) : action;
  3576. }
  3577. function useReducer(reducer, initialArg, init) {
  3578. currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
  3579. workInProgressHook = createWorkInProgressHook();
  3580. if (isReRender) {
  3581. var queue = workInProgressHook.queue;
  3582. initialArg = queue.dispatch;
  3583. if (
  3584. null !== renderPhaseUpdates &&
  3585. ((init = renderPhaseUpdates.get(queue)), void 0 !== init)
  3586. ) {
  3587. renderPhaseUpdates.delete(queue);
  3588. queue = workInProgressHook.memoizedState;
  3589. do (queue = reducer(queue, init.action)), (init = init.next);
  3590. while (null !== init);
  3591. workInProgressHook.memoizedState = queue;
  3592. return [queue, initialArg];
  3593. }
  3594. return [workInProgressHook.memoizedState, initialArg];
  3595. }
  3596. reducer =
  3597. reducer === basicStateReducer
  3598. ? "function" === typeof initialArg
  3599. ? initialArg()
  3600. : initialArg
  3601. : void 0 !== init
  3602. ? init(initialArg)
  3603. : initialArg;
  3604. workInProgressHook.memoizedState = reducer;
  3605. reducer = workInProgressHook.queue = { last: null, dispatch: null };
  3606. reducer = reducer.dispatch = dispatchAction.bind(
  3607. null,
  3608. currentlyRenderingComponent,
  3609. reducer
  3610. );
  3611. return [workInProgressHook.memoizedState, reducer];
  3612. }
  3613. function useMemo(nextCreate, deps) {
  3614. currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
  3615. workInProgressHook = createWorkInProgressHook();
  3616. deps = void 0 === deps ? null : deps;
  3617. if (null !== workInProgressHook) {
  3618. var prevState = workInProgressHook.memoizedState;
  3619. if (null !== prevState && null !== deps) {
  3620. var prevDeps = prevState[1];
  3621. a: if (null === prevDeps) prevDeps = !1;
  3622. else {
  3623. for (var i = 0; i < prevDeps.length && i < deps.length; i++)
  3624. if (!objectIs(deps[i], prevDeps[i])) {
  3625. prevDeps = !1;
  3626. break a;
  3627. }
  3628. prevDeps = !0;
  3629. }
  3630. if (prevDeps) return prevState[0];
  3631. }
  3632. }
  3633. nextCreate = nextCreate();
  3634. workInProgressHook.memoizedState = [nextCreate, deps];
  3635. return nextCreate;
  3636. }
  3637. function dispatchAction(componentIdentity, queue, action) {
  3638. if (25 <= numberOfReRenders)
  3639. throw Error(
  3640. "Too many re-renders. React limits the number of renders to prevent an infinite loop."
  3641. );
  3642. if (componentIdentity === currentlyRenderingComponent)
  3643. if (
  3644. ((didScheduleRenderPhaseUpdate = !0),
  3645. (componentIdentity = { action: action, next: null }),
  3646. null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),
  3647. (action = renderPhaseUpdates.get(queue)),
  3648. void 0 === action)
  3649. )
  3650. renderPhaseUpdates.set(queue, componentIdentity);
  3651. else {
  3652. for (queue = action; null !== queue.next; ) queue = queue.next;
  3653. queue.next = componentIdentity;
  3654. }
  3655. }
  3656. function throwOnUseEffectEventCall() {
  3657. throw Error(
  3658. "A function wrapped in useEffectEvent can't be called during rendering."
  3659. );
  3660. }
  3661. function unsupportedStartTransition() {
  3662. throw Error("startTransition cannot be called during server rendering.");
  3663. }
  3664. function unsupportedSetOptimisticState() {
  3665. throw Error("Cannot update optimistic state while rendering.");
  3666. }
  3667. function useActionState(action, initialState, permalink) {
  3668. resolveCurrentlyRenderingComponent();
  3669. var actionStateHookIndex = actionStateCounter++,
  3670. request = currentlyRenderingRequest;
  3671. if ("function" === typeof action.$$FORM_ACTION) {
  3672. var nextPostbackStateKey = null,
  3673. componentKeyPath = currentlyRenderingKeyPath;
  3674. request = request.formState;
  3675. var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;
  3676. if (null !== request && "function" === typeof isSignatureEqual) {
  3677. var postbackKey = request[1];
  3678. isSignatureEqual.call(action, request[2], request[3]) &&
  3679. ((nextPostbackStateKey =
  3680. void 0 !== permalink
  3681. ? "p" + permalink
  3682. : "k" +
  3683. murmurhash3_32_gc(
  3684. JSON.stringify([componentKeyPath, null, actionStateHookIndex]),
  3685. 0
  3686. )),
  3687. postbackKey === nextPostbackStateKey &&
  3688. ((actionStateMatchingIndex = actionStateHookIndex),
  3689. (initialState = request[0])));
  3690. }
  3691. var boundAction = action.bind(null, initialState);
  3692. action = function (payload) {
  3693. boundAction(payload);
  3694. };
  3695. "function" === typeof boundAction.$$FORM_ACTION &&
  3696. (action.$$FORM_ACTION = function (prefix) {
  3697. prefix = boundAction.$$FORM_ACTION(prefix);
  3698. void 0 !== permalink &&
  3699. ((permalink += ""), (prefix.action = permalink));
  3700. var formData = prefix.data;
  3701. formData &&
  3702. (null === nextPostbackStateKey &&
  3703. (nextPostbackStateKey =
  3704. void 0 !== permalink
  3705. ? "p" + permalink
  3706. : "k" +
  3707. murmurhash3_32_gc(
  3708. JSON.stringify([
  3709. componentKeyPath,
  3710. null,
  3711. actionStateHookIndex
  3712. ]),
  3713. 0
  3714. )),
  3715. formData.append("$ACTION_KEY", nextPostbackStateKey));
  3716. return prefix;
  3717. });
  3718. return [initialState, action, !1];
  3719. }
  3720. var boundAction$22 = action.bind(null, initialState);
  3721. return [
  3722. initialState,
  3723. function (payload) {
  3724. boundAction$22(payload);
  3725. },
  3726. !1
  3727. ];
  3728. }
  3729. function unwrapThenable(thenable) {
  3730. var index = thenableIndexCounter;
  3731. thenableIndexCounter += 1;
  3732. null === thenableState && (thenableState = []);
  3733. return trackUsedThenable(thenableState, thenable, index);
  3734. }
  3735. function unsupportedRefresh() {
  3736. throw Error("Cache cannot be refreshed during server rendering.");
  3737. }
  3738. var HooksDispatcher = {
  3739. readContext: function (context) {
  3740. return context._currentValue;
  3741. },
  3742. use: function (usable) {
  3743. if (null !== usable && "object" === typeof usable) {
  3744. if ("function" === typeof usable.then) return unwrapThenable(usable);
  3745. if (usable.$$typeof === REACT_CONTEXT_TYPE) return usable._currentValue;
  3746. }
  3747. throw Error("An unsupported type was passed to use(): " + String(usable));
  3748. },
  3749. useContext: function (context) {
  3750. resolveCurrentlyRenderingComponent();
  3751. return context._currentValue;
  3752. },
  3753. useMemo: useMemo,
  3754. useReducer: useReducer,
  3755. useRef: function (initialValue) {
  3756. currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
  3757. workInProgressHook = createWorkInProgressHook();
  3758. var previousRef = workInProgressHook.memoizedState;
  3759. return null === previousRef
  3760. ? ((initialValue = { current: initialValue }),
  3761. (workInProgressHook.memoizedState = initialValue))
  3762. : previousRef;
  3763. },
  3764. useState: function (initialState) {
  3765. return useReducer(basicStateReducer, initialState);
  3766. },
  3767. useInsertionEffect: noop,
  3768. useLayoutEffect: noop,
  3769. useCallback: function (callback, deps) {
  3770. return useMemo(function () {
  3771. return callback;
  3772. }, deps);
  3773. },
  3774. useImperativeHandle: noop,
  3775. useEffect: noop,
  3776. useDebugValue: noop,
  3777. useDeferredValue: function (value, initialValue) {
  3778. resolveCurrentlyRenderingComponent();
  3779. return void 0 !== initialValue ? initialValue : value;
  3780. },
  3781. useTransition: function () {
  3782. resolveCurrentlyRenderingComponent();
  3783. return [!1, unsupportedStartTransition];
  3784. },
  3785. useId: function () {
  3786. var JSCompiler_inline_result = currentlyRenderingTask.treeContext;
  3787. var overflow = JSCompiler_inline_result.overflow;
  3788. JSCompiler_inline_result = JSCompiler_inline_result.id;
  3789. JSCompiler_inline_result =
  3790. (
  3791. JSCompiler_inline_result &
  3792. ~(1 << (32 - clz32(JSCompiler_inline_result) - 1))
  3793. ).toString(32) + overflow;
  3794. var resumableState = currentResumableState;
  3795. if (null === resumableState)
  3796. throw Error(
  3797. "Invalid hook call. Hooks can only be called inside of the body of a function component."
  3798. );
  3799. overflow = localIdCounter++;
  3800. JSCompiler_inline_result =
  3801. "_" + resumableState.idPrefix + "R_" + JSCompiler_inline_result;
  3802. 0 < overflow && (JSCompiler_inline_result += "H" + overflow.toString(32));
  3803. return JSCompiler_inline_result + "_";
  3804. },
  3805. useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {
  3806. if (void 0 === getServerSnapshot)
  3807. throw Error(
  3808. "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
  3809. );
  3810. return getServerSnapshot();
  3811. },
  3812. useOptimistic: function (passthrough) {
  3813. resolveCurrentlyRenderingComponent();
  3814. return [passthrough, unsupportedSetOptimisticState];
  3815. },
  3816. useActionState: useActionState,
  3817. useFormState: useActionState,
  3818. useHostTransitionStatus: function () {
  3819. resolveCurrentlyRenderingComponent();
  3820. return sharedNotPendingObject;
  3821. },
  3822. useMemoCache: function (size) {
  3823. for (var data = Array(size), i = 0; i < size; i++)
  3824. data[i] = REACT_MEMO_CACHE_SENTINEL;
  3825. return data;
  3826. },
  3827. useCacheRefresh: function () {
  3828. return unsupportedRefresh;
  3829. },
  3830. useEffectEvent: function () {
  3831. return throwOnUseEffectEventCall;
  3832. }
  3833. },
  3834. currentResumableState = null,
  3835. DefaultAsyncDispatcher = {
  3836. getCacheForType: function () {
  3837. throw Error("Not implemented.");
  3838. },
  3839. cacheSignal: function () {
  3840. throw Error("Not implemented.");
  3841. }
  3842. };
  3843. function prepareStackTrace(error, structuredStackTrace) {
  3844. error = (error.name || "Error") + ": " + (error.message || "");
  3845. for (var i = 0; i < structuredStackTrace.length; i++)
  3846. error += "\n at " + structuredStackTrace[i].toString();
  3847. return error;
  3848. }
  3849. var prefix, suffix;
  3850. function describeBuiltInComponentFrame(name) {
  3851. if (void 0 === prefix)
  3852. try {
  3853. throw Error();
  3854. } catch (x) {
  3855. var match = x.stack.trim().match(/\n( *(at )?)/);
  3856. prefix = (match && match[1]) || "";
  3857. suffix =
  3858. -1 < x.stack.indexOf("\n at")
  3859. ? " (<anonymous>)"
  3860. : -1 < x.stack.indexOf("@")
  3861. ? "@unknown:0:0"
  3862. : "";
  3863. }
  3864. return "\n" + prefix + name + suffix;
  3865. }
  3866. var reentry = !1;
  3867. function describeNativeComponentFrame(fn, construct) {
  3868. if (!fn || reentry) return "";
  3869. reentry = !0;
  3870. var previousPrepareStackTrace = Error.prepareStackTrace;
  3871. Error.prepareStackTrace = prepareStackTrace;
  3872. try {
  3873. var RunInRootFrame = {
  3874. DetermineComponentFrameRoot: function () {
  3875. try {
  3876. if (construct) {
  3877. var Fake = function () {
  3878. throw Error();
  3879. };
  3880. Object.defineProperty(Fake.prototype, "props", {
  3881. set: function () {
  3882. throw Error();
  3883. }
  3884. });
  3885. if ("object" === typeof Reflect && Reflect.construct) {
  3886. try {
  3887. Reflect.construct(Fake, []);
  3888. } catch (x) {
  3889. var control = x;
  3890. }
  3891. Reflect.construct(fn, [], Fake);
  3892. } else {
  3893. try {
  3894. Fake.call();
  3895. } catch (x$24) {
  3896. control = x$24;
  3897. }
  3898. fn.call(Fake.prototype);
  3899. }
  3900. } else {
  3901. try {
  3902. throw Error();
  3903. } catch (x$25) {
  3904. control = x$25;
  3905. }
  3906. (Fake = fn()) &&
  3907. "function" === typeof Fake.catch &&
  3908. Fake.catch(function () {});
  3909. }
  3910. } catch (sample) {
  3911. if (sample && control && "string" === typeof sample.stack)
  3912. return [sample.stack, control.stack];
  3913. }
  3914. return [null, null];
  3915. }
  3916. };
  3917. RunInRootFrame.DetermineComponentFrameRoot.displayName =
  3918. "DetermineComponentFrameRoot";
  3919. var namePropDescriptor = Object.getOwnPropertyDescriptor(
  3920. RunInRootFrame.DetermineComponentFrameRoot,
  3921. "name"
  3922. );
  3923. namePropDescriptor &&
  3924. namePropDescriptor.configurable &&
  3925. Object.defineProperty(
  3926. RunInRootFrame.DetermineComponentFrameRoot,
  3927. "name",
  3928. { value: "DetermineComponentFrameRoot" }
  3929. );
  3930. var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
  3931. sampleStack = _RunInRootFrame$Deter[0],
  3932. controlStack = _RunInRootFrame$Deter[1];
  3933. if (sampleStack && controlStack) {
  3934. var sampleLines = sampleStack.split("\n"),
  3935. controlLines = controlStack.split("\n");
  3936. for (
  3937. namePropDescriptor = RunInRootFrame = 0;
  3938. RunInRootFrame < sampleLines.length &&
  3939. !sampleLines[RunInRootFrame].includes("DetermineComponentFrameRoot");
  3940. )
  3941. RunInRootFrame++;
  3942. for (
  3943. ;
  3944. namePropDescriptor < controlLines.length &&
  3945. !controlLines[namePropDescriptor].includes(
  3946. "DetermineComponentFrameRoot"
  3947. );
  3948. )
  3949. namePropDescriptor++;
  3950. if (
  3951. RunInRootFrame === sampleLines.length ||
  3952. namePropDescriptor === controlLines.length
  3953. )
  3954. for (
  3955. RunInRootFrame = sampleLines.length - 1,
  3956. namePropDescriptor = controlLines.length - 1;
  3957. 1 <= RunInRootFrame &&
  3958. 0 <= namePropDescriptor &&
  3959. sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];
  3960. )
  3961. namePropDescriptor--;
  3962. for (
  3963. ;
  3964. 1 <= RunInRootFrame && 0 <= namePropDescriptor;
  3965. RunInRootFrame--, namePropDescriptor--
  3966. )
  3967. if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {
  3968. if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {
  3969. do
  3970. if (
  3971. (RunInRootFrame--,
  3972. namePropDescriptor--,
  3973. 0 > namePropDescriptor ||
  3974. sampleLines[RunInRootFrame] !==
  3975. controlLines[namePropDescriptor])
  3976. ) {
  3977. var frame =
  3978. "\n" +
  3979. sampleLines[RunInRootFrame].replace(" at new ", " at ");
  3980. fn.displayName &&
  3981. frame.includes("<anonymous>") &&
  3982. (frame = frame.replace("<anonymous>", fn.displayName));
  3983. return frame;
  3984. }
  3985. while (1 <= RunInRootFrame && 0 <= namePropDescriptor);
  3986. }
  3987. break;
  3988. }
  3989. }
  3990. } finally {
  3991. (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);
  3992. }
  3993. return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : "")
  3994. ? describeBuiltInComponentFrame(previousPrepareStackTrace)
  3995. : "";
  3996. }
  3997. function describeComponentStackByType(type) {
  3998. if ("string" === typeof type) return describeBuiltInComponentFrame(type);
  3999. if ("function" === typeof type)
  4000. return type.prototype && type.prototype.isReactComponent
  4001. ? describeNativeComponentFrame(type, !0)
  4002. : describeNativeComponentFrame(type, !1);
  4003. if ("object" === typeof type && null !== type) {
  4004. switch (type.$$typeof) {
  4005. case REACT_FORWARD_REF_TYPE:
  4006. return describeNativeComponentFrame(type.render, !1);
  4007. case REACT_MEMO_TYPE:
  4008. return describeNativeComponentFrame(type.type, !1);
  4009. case REACT_LAZY_TYPE:
  4010. var lazyComponent = type,
  4011. payload = lazyComponent._payload;
  4012. lazyComponent = lazyComponent._init;
  4013. try {
  4014. type = lazyComponent(payload);
  4015. } catch (x) {
  4016. return describeBuiltInComponentFrame("Lazy");
  4017. }
  4018. return describeComponentStackByType(type);
  4019. }
  4020. if ("string" === typeof type.name) {
  4021. a: {
  4022. payload = type.name;
  4023. lazyComponent = type.env;
  4024. var location = type.debugLocation;
  4025. if (
  4026. null != location &&
  4027. ((type = Error.prepareStackTrace),
  4028. (Error.prepareStackTrace = prepareStackTrace),
  4029. (location = location.stack),
  4030. (Error.prepareStackTrace = type),
  4031. location.startsWith("Error: react-stack-top-frame\n") &&
  4032. (location = location.slice(29)),
  4033. (type = location.indexOf("\n")),
  4034. -1 !== type && (location = location.slice(type + 1)),
  4035. (type = location.indexOf("react_stack_bottom_frame")),
  4036. -1 !== type && (type = location.lastIndexOf("\n", type)),
  4037. (type = -1 !== type ? (location = location.slice(0, type)) : ""),
  4038. (location = type.lastIndexOf("\n")),
  4039. (type = -1 === location ? type : type.slice(location + 1)),
  4040. -1 !== type.indexOf(payload))
  4041. ) {
  4042. payload = "\n" + type;
  4043. break a;
  4044. }
  4045. payload = describeBuiltInComponentFrame(
  4046. payload + (lazyComponent ? " [" + lazyComponent + "]" : "")
  4047. );
  4048. }
  4049. return payload;
  4050. }
  4051. }
  4052. switch (type) {
  4053. case REACT_SUSPENSE_LIST_TYPE:
  4054. return describeBuiltInComponentFrame("SuspenseList");
  4055. case REACT_SUSPENSE_TYPE:
  4056. return describeBuiltInComponentFrame("Suspense");
  4057. }
  4058. return "";
  4059. }
  4060. function isEligibleForOutlining(request, boundary) {
  4061. return (
  4062. (500 < boundary.byteSize || hasSuspenseyContent(boundary.contentState)) &&
  4063. null === boundary.contentPreamble
  4064. );
  4065. }
  4066. function defaultErrorHandler(error) {
  4067. if (
  4068. "object" === typeof error &&
  4069. null !== error &&
  4070. "string" === typeof error.environmentName
  4071. ) {
  4072. var JSCompiler_inline_result = error.environmentName;
  4073. error = [error].slice(0);
  4074. "string" === typeof error[0]
  4075. ? error.splice(
  4076. 0,
  4077. 1,
  4078. "\u001b[0m\u001b[7m%c%s\u001b[0m%c " + error[0],
  4079. "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",
  4080. " " + JSCompiler_inline_result + " ",
  4081. ""
  4082. )
  4083. : error.splice(
  4084. 0,
  4085. 0,
  4086. "\u001b[0m\u001b[7m%c%s\u001b[0m%c",
  4087. "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",
  4088. " " + JSCompiler_inline_result + " ",
  4089. ""
  4090. );
  4091. error.unshift(console);
  4092. JSCompiler_inline_result = bind.apply(console.error, error);
  4093. JSCompiler_inline_result();
  4094. } else console.error(error);
  4095. return null;
  4096. }
  4097. function RequestInstance(
  4098. resumableState,
  4099. renderState,
  4100. rootFormatContext,
  4101. progressiveChunkSize,
  4102. onError,
  4103. onAllReady,
  4104. onShellReady,
  4105. onShellError,
  4106. onFatalError,
  4107. onPostpone,
  4108. formState
  4109. ) {
  4110. var abortSet = new Set();
  4111. this.destination = null;
  4112. this.flushScheduled = !1;
  4113. this.resumableState = resumableState;
  4114. this.renderState = renderState;
  4115. this.rootFormatContext = rootFormatContext;
  4116. this.progressiveChunkSize =
  4117. void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;
  4118. this.status = 10;
  4119. this.fatalError = null;
  4120. this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
  4121. this.completedPreambleSegments = this.completedRootSegment = null;
  4122. this.byteSize = 0;
  4123. this.abortableTasks = abortSet;
  4124. this.pingedTasks = [];
  4125. this.clientRenderedBoundaries = [];
  4126. this.completedBoundaries = [];
  4127. this.partialBoundaries = [];
  4128. this.trackedPostpones = null;
  4129. this.onError = void 0 === onError ? defaultErrorHandler : onError;
  4130. this.onPostpone = void 0 === onPostpone ? noop : onPostpone;
  4131. this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
  4132. this.onShellReady = void 0 === onShellReady ? noop : onShellReady;
  4133. this.onShellError = void 0 === onShellError ? noop : onShellError;
  4134. this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
  4135. this.formState = void 0 === formState ? null : formState;
  4136. }
  4137. function createRequest(
  4138. children,
  4139. resumableState,
  4140. renderState,
  4141. rootFormatContext,
  4142. progressiveChunkSize,
  4143. onError,
  4144. onAllReady,
  4145. onShellReady,
  4146. onShellError,
  4147. onFatalError,
  4148. onPostpone,
  4149. formState
  4150. ) {
  4151. resumableState = new RequestInstance(
  4152. resumableState,
  4153. renderState,
  4154. rootFormatContext,
  4155. progressiveChunkSize,
  4156. onError,
  4157. onAllReady,
  4158. onShellReady,
  4159. onShellError,
  4160. onFatalError,
  4161. onPostpone,
  4162. formState
  4163. );
  4164. renderState = createPendingSegment(
  4165. resumableState,
  4166. 0,
  4167. null,
  4168. rootFormatContext,
  4169. !1,
  4170. !1
  4171. );
  4172. renderState.parentFlushed = !0;
  4173. children = createRenderTask(
  4174. resumableState,
  4175. null,
  4176. children,
  4177. -1,
  4178. null,
  4179. renderState,
  4180. null,
  4181. null,
  4182. resumableState.abortableTasks,
  4183. null,
  4184. rootFormatContext,
  4185. null,
  4186. emptyTreeContext,
  4187. null,
  4188. null
  4189. );
  4190. pushComponentStack(children);
  4191. resumableState.pingedTasks.push(children);
  4192. return resumableState;
  4193. }
  4194. function createPrerenderRequest(
  4195. children,
  4196. resumableState,
  4197. renderState,
  4198. rootFormatContext,
  4199. progressiveChunkSize,
  4200. onError,
  4201. onAllReady,
  4202. onShellReady,
  4203. onShellError,
  4204. onFatalError,
  4205. onPostpone
  4206. ) {
  4207. children = createRequest(
  4208. children,
  4209. resumableState,
  4210. renderState,
  4211. rootFormatContext,
  4212. progressiveChunkSize,
  4213. onError,
  4214. onAllReady,
  4215. onShellReady,
  4216. onShellError,
  4217. onFatalError,
  4218. onPostpone,
  4219. void 0
  4220. );
  4221. children.trackedPostpones = {
  4222. workingMap: new Map(),
  4223. rootNodes: [],
  4224. rootSlots: null
  4225. };
  4226. return children;
  4227. }
  4228. function resumeRequest(
  4229. children,
  4230. postponedState,
  4231. renderState,
  4232. onError,
  4233. onAllReady,
  4234. onShellReady,
  4235. onShellError,
  4236. onFatalError,
  4237. onPostpone
  4238. ) {
  4239. renderState = new RequestInstance(
  4240. postponedState.resumableState,
  4241. renderState,
  4242. postponedState.rootFormatContext,
  4243. postponedState.progressiveChunkSize,
  4244. onError,
  4245. onAllReady,
  4246. onShellReady,
  4247. onShellError,
  4248. onFatalError,
  4249. onPostpone,
  4250. null
  4251. );
  4252. renderState.nextSegmentId = postponedState.nextSegmentId;
  4253. if ("number" === typeof postponedState.replaySlots)
  4254. return (
  4255. (onError = createPendingSegment(
  4256. renderState,
  4257. 0,
  4258. null,
  4259. postponedState.rootFormatContext,
  4260. !1,
  4261. !1
  4262. )),
  4263. (onError.parentFlushed = !0),
  4264. (children = createRenderTask(
  4265. renderState,
  4266. null,
  4267. children,
  4268. -1,
  4269. null,
  4270. onError,
  4271. null,
  4272. null,
  4273. renderState.abortableTasks,
  4274. null,
  4275. postponedState.rootFormatContext,
  4276. null,
  4277. emptyTreeContext,
  4278. null,
  4279. null
  4280. )),
  4281. pushComponentStack(children),
  4282. renderState.pingedTasks.push(children),
  4283. renderState
  4284. );
  4285. children = createReplayTask(
  4286. renderState,
  4287. null,
  4288. {
  4289. nodes: postponedState.replayNodes,
  4290. slots: postponedState.replaySlots,
  4291. pendingTasks: 0
  4292. },
  4293. children,
  4294. -1,
  4295. null,
  4296. null,
  4297. renderState.abortableTasks,
  4298. null,
  4299. postponedState.rootFormatContext,
  4300. null,
  4301. emptyTreeContext,
  4302. null,
  4303. null
  4304. );
  4305. pushComponentStack(children);
  4306. renderState.pingedTasks.push(children);
  4307. return renderState;
  4308. }
  4309. function resumeAndPrerenderRequest(
  4310. children,
  4311. postponedState,
  4312. renderState,
  4313. onError,
  4314. onAllReady,
  4315. onShellReady,
  4316. onShellError,
  4317. onFatalError,
  4318. onPostpone
  4319. ) {
  4320. children = resumeRequest(
  4321. children,
  4322. postponedState,
  4323. renderState,
  4324. onError,
  4325. onAllReady,
  4326. onShellReady,
  4327. onShellError,
  4328. onFatalError,
  4329. onPostpone
  4330. );
  4331. children.trackedPostpones = {
  4332. workingMap: new Map(),
  4333. rootNodes: [],
  4334. rootSlots: null
  4335. };
  4336. return children;
  4337. }
  4338. var currentRequest = null;
  4339. function resolveRequest() {
  4340. if (currentRequest) return currentRequest;
  4341. if (supportsRequestStorage) {
  4342. var store = requestStorage.getStore();
  4343. if (store) return store;
  4344. }
  4345. return null;
  4346. }
  4347. function pingTask(request, task) {
  4348. request.pingedTasks.push(task);
  4349. 1 === request.pingedTasks.length &&
  4350. ((request.flushScheduled = null !== request.destination),
  4351. null !== request.trackedPostpones || 10 === request.status
  4352. ? scheduleMicrotask(function () {
  4353. return performWork(request);
  4354. })
  4355. : setTimeout(function () {
  4356. return performWork(request);
  4357. }, 0));
  4358. }
  4359. function createSuspenseBoundary(
  4360. request,
  4361. row,
  4362. fallbackAbortableTasks,
  4363. contentPreamble,
  4364. fallbackPreamble
  4365. ) {
  4366. fallbackAbortableTasks = {
  4367. status: 0,
  4368. rootSegmentID: -1,
  4369. parentFlushed: !1,
  4370. pendingTasks: 0,
  4371. row: row,
  4372. completedSegments: [],
  4373. byteSize: 0,
  4374. fallbackAbortableTasks: fallbackAbortableTasks,
  4375. errorDigest: null,
  4376. contentState: createHoistableState(),
  4377. fallbackState: createHoistableState(),
  4378. contentPreamble: contentPreamble,
  4379. fallbackPreamble: fallbackPreamble,
  4380. trackedContentKeyPath: null,
  4381. trackedFallbackNode: null
  4382. };
  4383. null !== row &&
  4384. (row.pendingTasks++,
  4385. (contentPreamble = row.boundaries),
  4386. null !== contentPreamble &&
  4387. (request.allPendingTasks++,
  4388. fallbackAbortableTasks.pendingTasks++,
  4389. contentPreamble.push(fallbackAbortableTasks)),
  4390. (request = row.inheritedHoistables),
  4391. null !== request &&
  4392. hoistHoistables(fallbackAbortableTasks.contentState, request));
  4393. return fallbackAbortableTasks;
  4394. }
  4395. function createRenderTask(
  4396. request,
  4397. thenableState,
  4398. node,
  4399. childIndex,
  4400. blockedBoundary,
  4401. blockedSegment,
  4402. blockedPreamble,
  4403. hoistableState,
  4404. abortSet,
  4405. keyPath,
  4406. formatContext,
  4407. context,
  4408. treeContext,
  4409. row,
  4410. componentStack
  4411. ) {
  4412. request.allPendingTasks++;
  4413. null === blockedBoundary
  4414. ? request.pendingRootTasks++
  4415. : blockedBoundary.pendingTasks++;
  4416. null !== row && row.pendingTasks++;
  4417. var task = {
  4418. replay: null,
  4419. node: node,
  4420. childIndex: childIndex,
  4421. ping: function () {
  4422. return pingTask(request, task);
  4423. },
  4424. blockedBoundary: blockedBoundary,
  4425. blockedSegment: blockedSegment,
  4426. blockedPreamble: blockedPreamble,
  4427. hoistableState: hoistableState,
  4428. abortSet: abortSet,
  4429. keyPath: keyPath,
  4430. formatContext: formatContext,
  4431. context: context,
  4432. treeContext: treeContext,
  4433. row: row,
  4434. componentStack: componentStack,
  4435. thenableState: thenableState
  4436. };
  4437. abortSet.add(task);
  4438. return task;
  4439. }
  4440. function createReplayTask(
  4441. request,
  4442. thenableState,
  4443. replay,
  4444. node,
  4445. childIndex,
  4446. blockedBoundary,
  4447. hoistableState,
  4448. abortSet,
  4449. keyPath,
  4450. formatContext,
  4451. context,
  4452. treeContext,
  4453. row,
  4454. componentStack
  4455. ) {
  4456. request.allPendingTasks++;
  4457. null === blockedBoundary
  4458. ? request.pendingRootTasks++
  4459. : blockedBoundary.pendingTasks++;
  4460. null !== row && row.pendingTasks++;
  4461. replay.pendingTasks++;
  4462. var task = {
  4463. replay: replay,
  4464. node: node,
  4465. childIndex: childIndex,
  4466. ping: function () {
  4467. return pingTask(request, task);
  4468. },
  4469. blockedBoundary: blockedBoundary,
  4470. blockedSegment: null,
  4471. blockedPreamble: null,
  4472. hoistableState: hoistableState,
  4473. abortSet: abortSet,
  4474. keyPath: keyPath,
  4475. formatContext: formatContext,
  4476. context: context,
  4477. treeContext: treeContext,
  4478. row: row,
  4479. componentStack: componentStack,
  4480. thenableState: thenableState
  4481. };
  4482. abortSet.add(task);
  4483. return task;
  4484. }
  4485. function createPendingSegment(
  4486. request,
  4487. index,
  4488. boundary,
  4489. parentFormatContext,
  4490. lastPushedText,
  4491. textEmbedded
  4492. ) {
  4493. return {
  4494. status: 0,
  4495. parentFlushed: !1,
  4496. id: -1,
  4497. index: index,
  4498. chunks: [],
  4499. children: [],
  4500. preambleChildren: [],
  4501. parentFormatContext: parentFormatContext,
  4502. boundary: boundary,
  4503. lastPushedText: lastPushedText,
  4504. textEmbedded: textEmbedded
  4505. };
  4506. }
  4507. function pushComponentStack(task) {
  4508. var node = task.node;
  4509. if ("object" === typeof node && null !== node)
  4510. switch (node.$$typeof) {
  4511. case REACT_ELEMENT_TYPE:
  4512. task.componentStack = { parent: task.componentStack, type: node.type };
  4513. }
  4514. }
  4515. function replaceSuspenseComponentStackWithSuspenseFallbackStack(
  4516. componentStack
  4517. ) {
  4518. return null === componentStack
  4519. ? null
  4520. : { parent: componentStack.parent, type: "Suspense Fallback" };
  4521. }
  4522. function getThrownInfo(node$jscomp$0) {
  4523. var errorInfo = {};
  4524. node$jscomp$0 &&
  4525. Object.defineProperty(errorInfo, "componentStack", {
  4526. configurable: !0,
  4527. enumerable: !0,
  4528. get: function () {
  4529. try {
  4530. var info = "",
  4531. node = node$jscomp$0;
  4532. do
  4533. (info += describeComponentStackByType(node.type)),
  4534. (node = node.parent);
  4535. while (node);
  4536. var JSCompiler_inline_result = info;
  4537. } catch (x) {
  4538. JSCompiler_inline_result =
  4539. "\nError generating stack: " + x.message + "\n" + x.stack;
  4540. }
  4541. Object.defineProperty(errorInfo, "componentStack", {
  4542. value: JSCompiler_inline_result
  4543. });
  4544. return JSCompiler_inline_result;
  4545. }
  4546. });
  4547. return errorInfo;
  4548. }
  4549. function logRecoverableError(request, error, errorInfo) {
  4550. request = request.onError;
  4551. error = request(error, errorInfo);
  4552. if (null == error || "string" === typeof error) return error;
  4553. }
  4554. function fatalError(request, error) {
  4555. var onShellError = request.onShellError,
  4556. onFatalError = request.onFatalError;
  4557. onShellError(error);
  4558. onFatalError(error);
  4559. null !== request.destination
  4560. ? ((request.status = 14), closeWithError(request.destination, error))
  4561. : ((request.status = 13), (request.fatalError = error));
  4562. }
  4563. function finishSuspenseListRow(request, row) {
  4564. unblockSuspenseListRow(request, row.next, row.hoistables);
  4565. }
  4566. function unblockSuspenseListRow(request, unblockedRow, inheritedHoistables) {
  4567. for (; null !== unblockedRow; ) {
  4568. null !== inheritedHoistables &&
  4569. (hoistHoistables(unblockedRow.hoistables, inheritedHoistables),
  4570. (unblockedRow.inheritedHoistables = inheritedHoistables));
  4571. var unblockedBoundaries = unblockedRow.boundaries;
  4572. if (null !== unblockedBoundaries) {
  4573. unblockedRow.boundaries = null;
  4574. for (var i = 0; i < unblockedBoundaries.length; i++) {
  4575. var unblockedBoundary = unblockedBoundaries[i];
  4576. null !== inheritedHoistables &&
  4577. hoistHoistables(unblockedBoundary.contentState, inheritedHoistables);
  4578. finishedTask(request, unblockedBoundary, null, null);
  4579. }
  4580. }
  4581. unblockedRow.pendingTasks--;
  4582. if (0 < unblockedRow.pendingTasks) break;
  4583. inheritedHoistables = unblockedRow.hoistables;
  4584. unblockedRow = unblockedRow.next;
  4585. }
  4586. }
  4587. function tryToResolveTogetherRow(request, togetherRow) {
  4588. var boundaries = togetherRow.boundaries;
  4589. if (null !== boundaries && togetherRow.pendingTasks === boundaries.length) {
  4590. for (var allCompleteAndInlinable = !0, i = 0; i < boundaries.length; i++) {
  4591. var rowBoundary = boundaries[i];
  4592. if (
  4593. 1 !== rowBoundary.pendingTasks ||
  4594. rowBoundary.parentFlushed ||
  4595. isEligibleForOutlining(request, rowBoundary)
  4596. ) {
  4597. allCompleteAndInlinable = !1;
  4598. break;
  4599. }
  4600. }
  4601. allCompleteAndInlinable &&
  4602. unblockSuspenseListRow(request, togetherRow, togetherRow.hoistables);
  4603. }
  4604. }
  4605. function createSuspenseListRow(previousRow) {
  4606. var newRow = {
  4607. pendingTasks: 1,
  4608. boundaries: null,
  4609. hoistables: createHoistableState(),
  4610. inheritedHoistables: null,
  4611. together: !1,
  4612. next: null
  4613. };
  4614. null !== previousRow &&
  4615. 0 < previousRow.pendingTasks &&
  4616. (newRow.pendingTasks++,
  4617. (newRow.boundaries = []),
  4618. (previousRow.next = newRow));
  4619. return newRow;
  4620. }
  4621. function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
  4622. var prevKeyPath = task.keyPath,
  4623. prevTreeContext = task.treeContext,
  4624. prevRow = task.row;
  4625. task.keyPath = keyPath;
  4626. keyPath = rows.length;
  4627. var previousSuspenseListRow = null;
  4628. if (null !== task.replay) {
  4629. var resumeSlots = task.replay.slots;
  4630. if (null !== resumeSlots && "object" === typeof resumeSlots)
  4631. for (var n = 0; n < keyPath; n++) {
  4632. var i =
  4633. "backwards" !== revealOrder &&
  4634. "unstable_legacy-backwards" !== revealOrder
  4635. ? n
  4636. : keyPath - 1 - n,
  4637. node = rows[i];
  4638. task.row = previousSuspenseListRow = createSuspenseListRow(
  4639. previousSuspenseListRow
  4640. );
  4641. task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
  4642. var resumeSegmentID = resumeSlots[i];
  4643. "number" === typeof resumeSegmentID
  4644. ? (resumeNode(request, task, resumeSegmentID, node, i),
  4645. delete resumeSlots[i])
  4646. : renderNode(request, task, node, i);
  4647. 0 === --previousSuspenseListRow.pendingTasks &&
  4648. finishSuspenseListRow(request, previousSuspenseListRow);
  4649. }
  4650. else
  4651. for (resumeSlots = 0; resumeSlots < keyPath; resumeSlots++)
  4652. (n =
  4653. "backwards" !== revealOrder &&
  4654. "unstable_legacy-backwards" !== revealOrder
  4655. ? resumeSlots
  4656. : keyPath - 1 - resumeSlots),
  4657. (i = rows[n]),
  4658. (task.row = previousSuspenseListRow =
  4659. createSuspenseListRow(previousSuspenseListRow)),
  4660. (task.treeContext = pushTreeContext(prevTreeContext, keyPath, n)),
  4661. renderNode(request, task, i, n),
  4662. 0 === --previousSuspenseListRow.pendingTasks &&
  4663. finishSuspenseListRow(request, previousSuspenseListRow);
  4664. } else if (
  4665. "backwards" !== revealOrder &&
  4666. "unstable_legacy-backwards" !== revealOrder
  4667. )
  4668. for (revealOrder = 0; revealOrder < keyPath; revealOrder++)
  4669. (resumeSlots = rows[revealOrder]),
  4670. (task.row = previousSuspenseListRow =
  4671. createSuspenseListRow(previousSuspenseListRow)),
  4672. (task.treeContext = pushTreeContext(
  4673. prevTreeContext,
  4674. keyPath,
  4675. revealOrder
  4676. )),
  4677. renderNode(request, task, resumeSlots, revealOrder),
  4678. 0 === --previousSuspenseListRow.pendingTasks &&
  4679. finishSuspenseListRow(request, previousSuspenseListRow);
  4680. else {
  4681. revealOrder = task.blockedSegment;
  4682. resumeSlots = revealOrder.children.length;
  4683. n = revealOrder.chunks.length;
  4684. for (i = keyPath - 1; 0 <= i; i--) {
  4685. node = rows[i];
  4686. task.row = previousSuspenseListRow = createSuspenseListRow(
  4687. previousSuspenseListRow
  4688. );
  4689. task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);
  4690. resumeSegmentID = createPendingSegment(
  4691. request,
  4692. n,
  4693. null,
  4694. task.formatContext,
  4695. 0 === i ? revealOrder.lastPushedText : !0,
  4696. !0
  4697. );
  4698. revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
  4699. task.blockedSegment = resumeSegmentID;
  4700. try {
  4701. renderNode(request, task, node, i),
  4702. resumeSegmentID.lastPushedText &&
  4703. resumeSegmentID.textEmbedded &&
  4704. resumeSegmentID.chunks.push(textSeparator),
  4705. (resumeSegmentID.status = 1),
  4706. finishedSegment(request, task.blockedBoundary, resumeSegmentID),
  4707. 0 === --previousSuspenseListRow.pendingTasks &&
  4708. finishSuspenseListRow(request, previousSuspenseListRow);
  4709. } catch (thrownValue) {
  4710. throw (
  4711. ((resumeSegmentID.status = 12 === request.status ? 3 : 4),
  4712. thrownValue)
  4713. );
  4714. }
  4715. }
  4716. task.blockedSegment = revealOrder;
  4717. revealOrder.lastPushedText = !1;
  4718. }
  4719. null !== prevRow &&
  4720. null !== previousSuspenseListRow &&
  4721. 0 < previousSuspenseListRow.pendingTasks &&
  4722. (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));
  4723. task.treeContext = prevTreeContext;
  4724. task.row = prevRow;
  4725. task.keyPath = prevKeyPath;
  4726. }
  4727. function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
  4728. var prevThenableState = task.thenableState;
  4729. task.thenableState = null;
  4730. currentlyRenderingComponent = {};
  4731. currentlyRenderingTask = task;
  4732. currentlyRenderingRequest = request;
  4733. currentlyRenderingKeyPath = keyPath;
  4734. actionStateCounter = localIdCounter = 0;
  4735. actionStateMatchingIndex = -1;
  4736. thenableIndexCounter = 0;
  4737. thenableState = prevThenableState;
  4738. for (request = Component(props, secondArg); didScheduleRenderPhaseUpdate; )
  4739. (didScheduleRenderPhaseUpdate = !1),
  4740. (actionStateCounter = localIdCounter = 0),
  4741. (actionStateMatchingIndex = -1),
  4742. (thenableIndexCounter = 0),
  4743. (numberOfReRenders += 1),
  4744. (workInProgressHook = null),
  4745. (request = Component(props, secondArg));
  4746. resetHooksState();
  4747. return request;
  4748. }
  4749. function finishFunctionComponent(
  4750. request,
  4751. task,
  4752. keyPath,
  4753. children,
  4754. hasId,
  4755. actionStateCount,
  4756. actionStateMatchingIndex
  4757. ) {
  4758. var didEmitActionStateMarkers = !1;
  4759. if (0 !== actionStateCount && null !== request.formState) {
  4760. var segment = task.blockedSegment;
  4761. if (null !== segment) {
  4762. didEmitActionStateMarkers = !0;
  4763. segment = segment.chunks;
  4764. for (var i = 0; i < actionStateCount; i++)
  4765. i === actionStateMatchingIndex
  4766. ? segment.push(formStateMarkerIsMatching)
  4767. : segment.push(formStateMarkerIsNotMatching);
  4768. }
  4769. }
  4770. actionStateCount = task.keyPath;
  4771. task.keyPath = keyPath;
  4772. hasId
  4773. ? ((keyPath = task.treeContext),
  4774. (task.treeContext = pushTreeContext(keyPath, 1, 0)),
  4775. renderNode(request, task, children, -1),
  4776. (task.treeContext = keyPath))
  4777. : didEmitActionStateMarkers
  4778. ? renderNode(request, task, children, -1)
  4779. : renderNodeDestructive(request, task, children, -1);
  4780. task.keyPath = actionStateCount;
  4781. }
  4782. function renderElement(request, task, keyPath, type, props, ref) {
  4783. if ("function" === typeof type)
  4784. if (type.prototype && type.prototype.isReactComponent) {
  4785. var newProps = props;
  4786. if ("ref" in props) {
  4787. newProps = {};
  4788. for (var propName in props)
  4789. "ref" !== propName && (newProps[propName] = props[propName]);
  4790. }
  4791. var defaultProps = type.defaultProps;
  4792. if (defaultProps) {
  4793. newProps === props && (newProps = assign({}, newProps, props));
  4794. for (var propName$44 in defaultProps)
  4795. void 0 === newProps[propName$44] &&
  4796. (newProps[propName$44] = defaultProps[propName$44]);
  4797. }
  4798. props = newProps;
  4799. newProps = emptyContextObject;
  4800. defaultProps = type.contextType;
  4801. "object" === typeof defaultProps &&
  4802. null !== defaultProps &&
  4803. (newProps = defaultProps._currentValue);
  4804. newProps = new type(props, newProps);
  4805. var initialState = void 0 !== newProps.state ? newProps.state : null;
  4806. newProps.updater = classComponentUpdater;
  4807. newProps.props = props;
  4808. newProps.state = initialState;
  4809. defaultProps = { queue: [], replace: !1 };
  4810. newProps._reactInternals = defaultProps;
  4811. ref = type.contextType;
  4812. newProps.context =
  4813. "object" === typeof ref && null !== ref
  4814. ? ref._currentValue
  4815. : emptyContextObject;
  4816. ref = type.getDerivedStateFromProps;
  4817. "function" === typeof ref &&
  4818. ((ref = ref(props, initialState)),
  4819. (initialState =
  4820. null === ref || void 0 === ref
  4821. ? initialState
  4822. : assign({}, initialState, ref)),
  4823. (newProps.state = initialState));
  4824. if (
  4825. "function" !== typeof type.getDerivedStateFromProps &&
  4826. "function" !== typeof newProps.getSnapshotBeforeUpdate &&
  4827. ("function" === typeof newProps.UNSAFE_componentWillMount ||
  4828. "function" === typeof newProps.componentWillMount)
  4829. )
  4830. if (
  4831. ((type = newProps.state),
  4832. "function" === typeof newProps.componentWillMount &&
  4833. newProps.componentWillMount(),
  4834. "function" === typeof newProps.UNSAFE_componentWillMount &&
  4835. newProps.UNSAFE_componentWillMount(),
  4836. type !== newProps.state &&
  4837. classComponentUpdater.enqueueReplaceState(
  4838. newProps,
  4839. newProps.state,
  4840. null
  4841. ),
  4842. null !== defaultProps.queue && 0 < defaultProps.queue.length)
  4843. )
  4844. if (
  4845. ((type = defaultProps.queue),
  4846. (ref = defaultProps.replace),
  4847. (defaultProps.queue = null),
  4848. (defaultProps.replace = !1),
  4849. ref && 1 === type.length)
  4850. )
  4851. newProps.state = type[0];
  4852. else {
  4853. defaultProps = ref ? type[0] : newProps.state;
  4854. initialState = !0;
  4855. for (ref = ref ? 1 : 0; ref < type.length; ref++)
  4856. (propName$44 = type[ref]),
  4857. (propName$44 =
  4858. "function" === typeof propName$44
  4859. ? propName$44.call(newProps, defaultProps, props, void 0)
  4860. : propName$44),
  4861. null != propName$44 &&
  4862. (initialState
  4863. ? ((initialState = !1),
  4864. (defaultProps = assign({}, defaultProps, propName$44)))
  4865. : assign(defaultProps, propName$44));
  4866. newProps.state = defaultProps;
  4867. }
  4868. else defaultProps.queue = null;
  4869. type = newProps.render();
  4870. if (12 === request.status) throw null;
  4871. props = task.keyPath;
  4872. task.keyPath = keyPath;
  4873. renderNodeDestructive(request, task, type, -1);
  4874. task.keyPath = props;
  4875. } else {
  4876. type = renderWithHooks(request, task, keyPath, type, props, void 0);
  4877. if (12 === request.status) throw null;
  4878. finishFunctionComponent(
  4879. request,
  4880. task,
  4881. keyPath,
  4882. type,
  4883. 0 !== localIdCounter,
  4884. actionStateCounter,
  4885. actionStateMatchingIndex
  4886. );
  4887. }
  4888. else if ("string" === typeof type)
  4889. if (((newProps = task.blockedSegment), null === newProps))
  4890. (newProps = props.children),
  4891. (defaultProps = task.formatContext),
  4892. (initialState = task.keyPath),
  4893. (task.formatContext = getChildFormatContext(defaultProps, type, props)),
  4894. (task.keyPath = keyPath),
  4895. renderNode(request, task, newProps, -1),
  4896. (task.formatContext = defaultProps),
  4897. (task.keyPath = initialState);
  4898. else {
  4899. initialState = pushStartInstance(
  4900. newProps.chunks,
  4901. type,
  4902. props,
  4903. request.resumableState,
  4904. request.renderState,
  4905. task.blockedPreamble,
  4906. task.hoistableState,
  4907. task.formatContext,
  4908. newProps.lastPushedText
  4909. );
  4910. newProps.lastPushedText = !1;
  4911. defaultProps = task.formatContext;
  4912. ref = task.keyPath;
  4913. task.keyPath = keyPath;
  4914. if (
  4915. 3 ===
  4916. (task.formatContext = getChildFormatContext(defaultProps, type, props))
  4917. .insertionMode
  4918. ) {
  4919. keyPath = createPendingSegment(
  4920. request,
  4921. 0,
  4922. null,
  4923. task.formatContext,
  4924. !1,
  4925. !1
  4926. );
  4927. newProps.preambleChildren.push(keyPath);
  4928. task.blockedSegment = keyPath;
  4929. try {
  4930. (keyPath.status = 6),
  4931. renderNode(request, task, initialState, -1),
  4932. keyPath.lastPushedText &&
  4933. keyPath.textEmbedded &&
  4934. keyPath.chunks.push(textSeparator),
  4935. (keyPath.status = 1),
  4936. finishedSegment(request, task.blockedBoundary, keyPath);
  4937. } finally {
  4938. task.blockedSegment = newProps;
  4939. }
  4940. } else renderNode(request, task, initialState, -1);
  4941. task.formatContext = defaultProps;
  4942. task.keyPath = ref;
  4943. a: {
  4944. task = newProps.chunks;
  4945. request = request.resumableState;
  4946. switch (type) {
  4947. case "title":
  4948. case "style":
  4949. case "script":
  4950. case "area":
  4951. case "base":
  4952. case "br":
  4953. case "col":
  4954. case "embed":
  4955. case "hr":
  4956. case "img":
  4957. case "input":
  4958. case "keygen":
  4959. case "link":
  4960. case "meta":
  4961. case "param":
  4962. case "source":
  4963. case "track":
  4964. case "wbr":
  4965. break a;
  4966. case "body":
  4967. if (1 >= defaultProps.insertionMode) {
  4968. request.hasBody = !0;
  4969. break a;
  4970. }
  4971. break;
  4972. case "html":
  4973. if (0 === defaultProps.insertionMode) {
  4974. request.hasHtml = !0;
  4975. break a;
  4976. }
  4977. break;
  4978. case "head":
  4979. if (1 >= defaultProps.insertionMode) break a;
  4980. }
  4981. task.push(endChunkForTag(type));
  4982. }
  4983. newProps.lastPushedText = !1;
  4984. }
  4985. else {
  4986. switch (type) {
  4987. case REACT_LEGACY_HIDDEN_TYPE:
  4988. case REACT_STRICT_MODE_TYPE:
  4989. case REACT_PROFILER_TYPE:
  4990. case REACT_FRAGMENT_TYPE:
  4991. type = task.keyPath;
  4992. task.keyPath = keyPath;
  4993. renderNodeDestructive(request, task, props.children, -1);
  4994. task.keyPath = type;
  4995. return;
  4996. case REACT_ACTIVITY_TYPE:
  4997. type = task.blockedSegment;
  4998. null === type
  4999. ? "hidden" !== props.mode &&
  5000. ((type = task.keyPath),
  5001. (task.keyPath = keyPath),
  5002. renderNode(request, task, props.children, -1),
  5003. (task.keyPath = type))
  5004. : "hidden" !== props.mode &&
  5005. (type.chunks.push(startActivityBoundary),
  5006. (type.lastPushedText = !1),
  5007. (newProps = task.keyPath),
  5008. (task.keyPath = keyPath),
  5009. renderNode(request, task, props.children, -1),
  5010. (task.keyPath = newProps),
  5011. type.chunks.push(endActivityBoundary),
  5012. (type.lastPushedText = !1));
  5013. return;
  5014. case REACT_SUSPENSE_LIST_TYPE:
  5015. a: {
  5016. type = props.children;
  5017. props = props.revealOrder;
  5018. if (
  5019. "forwards" === props ||
  5020. "backwards" === props ||
  5021. "unstable_legacy-backwards" === props
  5022. ) {
  5023. if (isArrayImpl(type)) {
  5024. renderSuspenseListRows(request, task, keyPath, type, props);
  5025. break a;
  5026. }
  5027. if ((newProps = getIteratorFn(type)))
  5028. if ((newProps = newProps.call(type))) {
  5029. defaultProps = newProps.next();
  5030. if (!defaultProps.done) {
  5031. do defaultProps = newProps.next();
  5032. while (!defaultProps.done);
  5033. renderSuspenseListRows(request, task, keyPath, type, props);
  5034. }
  5035. break a;
  5036. }
  5037. }
  5038. "together" === props
  5039. ? ((props = task.keyPath),
  5040. (newProps = task.row),
  5041. (defaultProps = task.row = createSuspenseListRow(null)),
  5042. (defaultProps.boundaries = []),
  5043. (defaultProps.together = !0),
  5044. (task.keyPath = keyPath),
  5045. renderNodeDestructive(request, task, type, -1),
  5046. 0 === --defaultProps.pendingTasks &&
  5047. finishSuspenseListRow(request, defaultProps),
  5048. (task.keyPath = props),
  5049. (task.row = newProps),
  5050. null !== newProps &&
  5051. 0 < defaultProps.pendingTasks &&
  5052. (newProps.pendingTasks++, (defaultProps.next = newProps)))
  5053. : ((props = task.keyPath),
  5054. (task.keyPath = keyPath),
  5055. renderNodeDestructive(request, task, type, -1),
  5056. (task.keyPath = props));
  5057. }
  5058. return;
  5059. case REACT_VIEW_TRANSITION_TYPE:
  5060. case REACT_SCOPE_TYPE:
  5061. throw Error("ReactDOMServer does not yet support scope components.");
  5062. case REACT_SUSPENSE_TYPE:
  5063. a: if (null !== task.replay) {
  5064. type = task.keyPath;
  5065. newProps = task.formatContext;
  5066. defaultProps = task.row;
  5067. task.keyPath = keyPath;
  5068. task.formatContext = getSuspenseContentFormatContext(
  5069. request.resumableState,
  5070. newProps
  5071. );
  5072. task.row = null;
  5073. keyPath = props.children;
  5074. try {
  5075. renderNode(request, task, keyPath, -1);
  5076. } finally {
  5077. (task.keyPath = type),
  5078. (task.formatContext = newProps),
  5079. (task.row = defaultProps);
  5080. }
  5081. } else {
  5082. type = task.keyPath;
  5083. ref = task.formatContext;
  5084. var prevRow = task.row;
  5085. propName$44 = task.blockedBoundary;
  5086. propName = task.blockedPreamble;
  5087. var parentHoistableState = task.hoistableState,
  5088. parentSegment = task.blockedSegment,
  5089. fallback = props.fallback;
  5090. props = props.children;
  5091. var fallbackAbortSet = new Set();
  5092. var newBoundary =
  5093. 2 > task.formatContext.insertionMode
  5094. ? createSuspenseBoundary(
  5095. request,
  5096. task.row,
  5097. fallbackAbortSet,
  5098. createPreambleState(),
  5099. createPreambleState()
  5100. )
  5101. : createSuspenseBoundary(
  5102. request,
  5103. task.row,
  5104. fallbackAbortSet,
  5105. null,
  5106. null
  5107. );
  5108. null !== request.trackedPostpones &&
  5109. (newBoundary.trackedContentKeyPath = keyPath);
  5110. var boundarySegment = createPendingSegment(
  5111. request,
  5112. parentSegment.chunks.length,
  5113. newBoundary,
  5114. task.formatContext,
  5115. !1,
  5116. !1
  5117. );
  5118. parentSegment.children.push(boundarySegment);
  5119. parentSegment.lastPushedText = !1;
  5120. var contentRootSegment = createPendingSegment(
  5121. request,
  5122. 0,
  5123. null,
  5124. task.formatContext,
  5125. !1,
  5126. !1
  5127. );
  5128. contentRootSegment.parentFlushed = !0;
  5129. if (null !== request.trackedPostpones) {
  5130. newProps = task.componentStack;
  5131. defaultProps = [keyPath[0], "Suspense Fallback", keyPath[2]];
  5132. initialState = [defaultProps[1], defaultProps[2], [], null];
  5133. request.trackedPostpones.workingMap.set(defaultProps, initialState);
  5134. newBoundary.trackedFallbackNode = initialState;
  5135. task.blockedSegment = boundarySegment;
  5136. task.blockedPreamble = newBoundary.fallbackPreamble;
  5137. task.keyPath = defaultProps;
  5138. task.formatContext = getSuspenseFallbackFormatContext(
  5139. request.resumableState,
  5140. ref
  5141. );
  5142. task.componentStack =
  5143. replaceSuspenseComponentStackWithSuspenseFallbackStack(newProps);
  5144. boundarySegment.status = 6;
  5145. try {
  5146. renderNode(request, task, fallback, -1),
  5147. boundarySegment.lastPushedText &&
  5148. boundarySegment.textEmbedded &&
  5149. boundarySegment.chunks.push(textSeparator),
  5150. (boundarySegment.status = 1),
  5151. finishedSegment(request, propName$44, boundarySegment);
  5152. } catch (thrownValue) {
  5153. throw (
  5154. ((boundarySegment.status = 12 === request.status ? 3 : 4),
  5155. thrownValue)
  5156. );
  5157. } finally {
  5158. (task.blockedSegment = parentSegment),
  5159. (task.blockedPreamble = propName),
  5160. (task.keyPath = type),
  5161. (task.formatContext = ref);
  5162. }
  5163. task = createRenderTask(
  5164. request,
  5165. null,
  5166. props,
  5167. -1,
  5168. newBoundary,
  5169. contentRootSegment,
  5170. newBoundary.contentPreamble,
  5171. newBoundary.contentState,
  5172. task.abortSet,
  5173. keyPath,
  5174. getSuspenseContentFormatContext(
  5175. request.resumableState,
  5176. task.formatContext
  5177. ),
  5178. task.context,
  5179. task.treeContext,
  5180. null,
  5181. newProps
  5182. );
  5183. pushComponentStack(task);
  5184. request.pingedTasks.push(task);
  5185. } else {
  5186. task.blockedBoundary = newBoundary;
  5187. task.blockedPreamble = newBoundary.contentPreamble;
  5188. task.hoistableState = newBoundary.contentState;
  5189. task.blockedSegment = contentRootSegment;
  5190. task.keyPath = keyPath;
  5191. task.formatContext = getSuspenseContentFormatContext(
  5192. request.resumableState,
  5193. ref
  5194. );
  5195. task.row = null;
  5196. contentRootSegment.status = 6;
  5197. try {
  5198. if (
  5199. (renderNode(request, task, props, -1),
  5200. contentRootSegment.lastPushedText &&
  5201. contentRootSegment.textEmbedded &&
  5202. contentRootSegment.chunks.push(textSeparator),
  5203. (contentRootSegment.status = 1),
  5204. finishedSegment(request, newBoundary, contentRootSegment),
  5205. queueCompletedSegment(newBoundary, contentRootSegment),
  5206. 0 === newBoundary.pendingTasks && 0 === newBoundary.status)
  5207. ) {
  5208. if (
  5209. ((newBoundary.status = 1),
  5210. !isEligibleForOutlining(request, newBoundary))
  5211. ) {
  5212. null !== prevRow &&
  5213. 0 === --prevRow.pendingTasks &&
  5214. finishSuspenseListRow(request, prevRow);
  5215. 0 === request.pendingRootTasks &&
  5216. task.blockedPreamble &&
  5217. preparePreamble(request);
  5218. break a;
  5219. }
  5220. } else
  5221. null !== prevRow &&
  5222. prevRow.together &&
  5223. tryToResolveTogetherRow(request, prevRow);
  5224. } catch (thrownValue$31) {
  5225. (newBoundary.status = 4),
  5226. 12 === request.status
  5227. ? ((contentRootSegment.status = 3),
  5228. (newProps = request.fatalError))
  5229. : ((contentRootSegment.status = 4),
  5230. (newProps = thrownValue$31)),
  5231. (defaultProps = getThrownInfo(task.componentStack)),
  5232. (initialState = logRecoverableError(
  5233. request,
  5234. newProps,
  5235. defaultProps
  5236. )),
  5237. (newBoundary.errorDigest = initialState),
  5238. untrackBoundary(request, newBoundary);
  5239. } finally {
  5240. (task.blockedBoundary = propName$44),
  5241. (task.blockedPreamble = propName),
  5242. (task.hoistableState = parentHoistableState),
  5243. (task.blockedSegment = parentSegment),
  5244. (task.keyPath = type),
  5245. (task.formatContext = ref),
  5246. (task.row = prevRow);
  5247. }
  5248. task = createRenderTask(
  5249. request,
  5250. null,
  5251. fallback,
  5252. -1,
  5253. propName$44,
  5254. boundarySegment,
  5255. newBoundary.fallbackPreamble,
  5256. newBoundary.fallbackState,
  5257. fallbackAbortSet,
  5258. [keyPath[0], "Suspense Fallback", keyPath[2]],
  5259. getSuspenseFallbackFormatContext(
  5260. request.resumableState,
  5261. task.formatContext
  5262. ),
  5263. task.context,
  5264. task.treeContext,
  5265. task.row,
  5266. replaceSuspenseComponentStackWithSuspenseFallbackStack(
  5267. task.componentStack
  5268. )
  5269. );
  5270. pushComponentStack(task);
  5271. request.pingedTasks.push(task);
  5272. }
  5273. }
  5274. return;
  5275. }
  5276. if ("object" === typeof type && null !== type)
  5277. switch (type.$$typeof) {
  5278. case REACT_FORWARD_REF_TYPE:
  5279. if ("ref" in props)
  5280. for (parentSegment in ((newProps = {}), props))
  5281. "ref" !== parentSegment &&
  5282. (newProps[parentSegment] = props[parentSegment]);
  5283. else newProps = props;
  5284. type = renderWithHooks(
  5285. request,
  5286. task,
  5287. keyPath,
  5288. type.render,
  5289. newProps,
  5290. ref
  5291. );
  5292. finishFunctionComponent(
  5293. request,
  5294. task,
  5295. keyPath,
  5296. type,
  5297. 0 !== localIdCounter,
  5298. actionStateCounter,
  5299. actionStateMatchingIndex
  5300. );
  5301. return;
  5302. case REACT_MEMO_TYPE:
  5303. renderElement(request, task, keyPath, type.type, props, ref);
  5304. return;
  5305. case REACT_CONTEXT_TYPE:
  5306. defaultProps = props.children;
  5307. newProps = task.keyPath;
  5308. props = props.value;
  5309. initialState = type._currentValue;
  5310. type._currentValue = props;
  5311. ref = currentActiveSnapshot;
  5312. currentActiveSnapshot = type = {
  5313. parent: ref,
  5314. depth: null === ref ? 0 : ref.depth + 1,
  5315. context: type,
  5316. parentValue: initialState,
  5317. value: props
  5318. };
  5319. task.context = type;
  5320. task.keyPath = keyPath;
  5321. renderNodeDestructive(request, task, defaultProps, -1);
  5322. request = currentActiveSnapshot;
  5323. if (null === request)
  5324. throw Error(
  5325. "Tried to pop a Context at the root of the app. This is a bug in React."
  5326. );
  5327. request.context._currentValue = request.parentValue;
  5328. request = currentActiveSnapshot = request.parent;
  5329. task.context = request;
  5330. task.keyPath = newProps;
  5331. return;
  5332. case REACT_CONSUMER_TYPE:
  5333. props = props.children;
  5334. type = props(type._context._currentValue);
  5335. props = task.keyPath;
  5336. task.keyPath = keyPath;
  5337. renderNodeDestructive(request, task, type, -1);
  5338. task.keyPath = props;
  5339. return;
  5340. case REACT_LAZY_TYPE:
  5341. newProps = type._init;
  5342. type = newProps(type._payload);
  5343. if (12 === request.status) throw null;
  5344. renderElement(request, task, keyPath, type, props, ref);
  5345. return;
  5346. }
  5347. throw Error(
  5348. "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
  5349. ((null == type ? type : typeof type) + ".")
  5350. );
  5351. }
  5352. }
  5353. function resumeNode(request, task, segmentId, node, childIndex) {
  5354. var prevReplay = task.replay,
  5355. blockedBoundary = task.blockedBoundary,
  5356. resumedSegment = createPendingSegment(
  5357. request,
  5358. 0,
  5359. null,
  5360. task.formatContext,
  5361. !1,
  5362. !1
  5363. );
  5364. resumedSegment.id = segmentId;
  5365. resumedSegment.parentFlushed = !0;
  5366. try {
  5367. (task.replay = null),
  5368. (task.blockedSegment = resumedSegment),
  5369. renderNode(request, task, node, childIndex),
  5370. (resumedSegment.status = 1),
  5371. finishedSegment(request, blockedBoundary, resumedSegment),
  5372. null === blockedBoundary
  5373. ? (request.completedRootSegment = resumedSegment)
  5374. : (queueCompletedSegment(blockedBoundary, resumedSegment),
  5375. blockedBoundary.parentFlushed &&
  5376. request.partialBoundaries.push(blockedBoundary));
  5377. } finally {
  5378. (task.replay = prevReplay), (task.blockedSegment = null);
  5379. }
  5380. }
  5381. function renderNodeDestructive(request, task, node, childIndex) {
  5382. null !== task.replay && "number" === typeof task.replay.slots
  5383. ? resumeNode(request, task, task.replay.slots, node, childIndex)
  5384. : ((task.node = node),
  5385. (task.childIndex = childIndex),
  5386. (node = task.componentStack),
  5387. pushComponentStack(task),
  5388. retryNode(request, task),
  5389. (task.componentStack = node));
  5390. }
  5391. function retryNode(request, task) {
  5392. var node = task.node,
  5393. childIndex = task.childIndex;
  5394. if (null !== node) {
  5395. if ("object" === typeof node) {
  5396. switch (node.$$typeof) {
  5397. case REACT_ELEMENT_TYPE:
  5398. var type = node.type,
  5399. key = node.key,
  5400. props = node.props;
  5401. node = props.ref;
  5402. var ref = void 0 !== node ? node : null,
  5403. name = getComponentNameFromType(type),
  5404. keyOrIndex =
  5405. null == key ? (-1 === childIndex ? 0 : childIndex) : key;
  5406. key = [task.keyPath, name, keyOrIndex];
  5407. if (null !== task.replay)
  5408. a: {
  5409. var replay = task.replay;
  5410. childIndex = replay.nodes;
  5411. for (node = 0; node < childIndex.length; node++) {
  5412. var node$jscomp$0 = childIndex[node];
  5413. if (keyOrIndex === node$jscomp$0[1]) {
  5414. if (4 === node$jscomp$0.length) {
  5415. if (null !== name && name !== node$jscomp$0[0])
  5416. throw Error(
  5417. "Expected the resume to render <" +
  5418. node$jscomp$0[0] +
  5419. "> in this slot but instead it rendered <" +
  5420. name +
  5421. ">. The tree doesn't match so React will fallback to client rendering."
  5422. );
  5423. var childNodes = node$jscomp$0[2];
  5424. name = node$jscomp$0[3];
  5425. keyOrIndex = task.node;
  5426. task.replay = {
  5427. nodes: childNodes,
  5428. slots: name,
  5429. pendingTasks: 1
  5430. };
  5431. try {
  5432. renderElement(request, task, key, type, props, ref);
  5433. if (
  5434. 1 === task.replay.pendingTasks &&
  5435. 0 < task.replay.nodes.length
  5436. )
  5437. throw Error(
  5438. "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
  5439. );
  5440. task.replay.pendingTasks--;
  5441. } catch (x) {
  5442. if (
  5443. "object" === typeof x &&
  5444. null !== x &&
  5445. (x === SuspenseException ||
  5446. "function" === typeof x.then)
  5447. )
  5448. throw (
  5449. (task.node === keyOrIndex
  5450. ? (task.replay = replay)
  5451. : childIndex.splice(node, 1),
  5452. x)
  5453. );
  5454. task.replay.pendingTasks--;
  5455. props = getThrownInfo(task.componentStack);
  5456. key = request;
  5457. request = task.blockedBoundary;
  5458. type = x;
  5459. props = logRecoverableError(key, type, props);
  5460. abortRemainingReplayNodes(
  5461. key,
  5462. request,
  5463. childNodes,
  5464. name,
  5465. type,
  5466. props
  5467. );
  5468. }
  5469. task.replay = replay;
  5470. } else {
  5471. if (type !== REACT_SUSPENSE_TYPE)
  5472. throw Error(
  5473. "Expected the resume to render <Suspense> in this slot but instead it rendered <" +
  5474. (getComponentNameFromType(type) || "Unknown") +
  5475. ">. The tree doesn't match so React will fallback to client rendering."
  5476. );
  5477. b: {
  5478. replay = void 0;
  5479. type = node$jscomp$0[5];
  5480. ref = node$jscomp$0[2];
  5481. name = node$jscomp$0[3];
  5482. keyOrIndex =
  5483. null === node$jscomp$0[4] ? [] : node$jscomp$0[4][2];
  5484. node$jscomp$0 =
  5485. null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
  5486. var prevKeyPath = task.keyPath,
  5487. prevContext = task.formatContext,
  5488. prevRow = task.row,
  5489. previousReplaySet = task.replay,
  5490. parentBoundary = task.blockedBoundary,
  5491. parentHoistableState = task.hoistableState,
  5492. content = props.children,
  5493. fallback = props.fallback,
  5494. fallbackAbortSet = new Set();
  5495. props =
  5496. 2 > task.formatContext.insertionMode
  5497. ? createSuspenseBoundary(
  5498. request,
  5499. task.row,
  5500. fallbackAbortSet,
  5501. createPreambleState(),
  5502. createPreambleState()
  5503. )
  5504. : createSuspenseBoundary(
  5505. request,
  5506. task.row,
  5507. fallbackAbortSet,
  5508. null,
  5509. null
  5510. );
  5511. props.parentFlushed = !0;
  5512. props.rootSegmentID = type;
  5513. task.blockedBoundary = props;
  5514. task.hoistableState = props.contentState;
  5515. task.keyPath = key;
  5516. task.formatContext = getSuspenseContentFormatContext(
  5517. request.resumableState,
  5518. prevContext
  5519. );
  5520. task.row = null;
  5521. task.replay = {
  5522. nodes: ref,
  5523. slots: name,
  5524. pendingTasks: 1
  5525. };
  5526. try {
  5527. renderNode(request, task, content, -1);
  5528. if (
  5529. 1 === task.replay.pendingTasks &&
  5530. 0 < task.replay.nodes.length
  5531. )
  5532. throw Error(
  5533. "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
  5534. );
  5535. task.replay.pendingTasks--;
  5536. if (0 === props.pendingTasks && 0 === props.status) {
  5537. props.status = 1;
  5538. request.completedBoundaries.push(props);
  5539. break b;
  5540. }
  5541. } catch (error) {
  5542. (props.status = 4),
  5543. (childNodes = getThrownInfo(task.componentStack)),
  5544. (replay = logRecoverableError(
  5545. request,
  5546. error,
  5547. childNodes
  5548. )),
  5549. (props.errorDigest = replay),
  5550. task.replay.pendingTasks--,
  5551. request.clientRenderedBoundaries.push(props);
  5552. } finally {
  5553. (task.blockedBoundary = parentBoundary),
  5554. (task.hoistableState = parentHoistableState),
  5555. (task.replay = previousReplaySet),
  5556. (task.keyPath = prevKeyPath),
  5557. (task.formatContext = prevContext),
  5558. (task.row = prevRow);
  5559. }
  5560. childNodes = createReplayTask(
  5561. request,
  5562. null,
  5563. {
  5564. nodes: keyOrIndex,
  5565. slots: node$jscomp$0,
  5566. pendingTasks: 0
  5567. },
  5568. fallback,
  5569. -1,
  5570. parentBoundary,
  5571. props.fallbackState,
  5572. fallbackAbortSet,
  5573. [key[0], "Suspense Fallback", key[2]],
  5574. getSuspenseFallbackFormatContext(
  5575. request.resumableState,
  5576. task.formatContext
  5577. ),
  5578. task.context,
  5579. task.treeContext,
  5580. task.row,
  5581. replaceSuspenseComponentStackWithSuspenseFallbackStack(
  5582. task.componentStack
  5583. )
  5584. );
  5585. pushComponentStack(childNodes);
  5586. request.pingedTasks.push(childNodes);
  5587. }
  5588. }
  5589. childIndex.splice(node, 1);
  5590. break a;
  5591. }
  5592. }
  5593. }
  5594. else renderElement(request, task, key, type, props, ref);
  5595. return;
  5596. case REACT_PORTAL_TYPE:
  5597. throw Error(
  5598. "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
  5599. );
  5600. case REACT_LAZY_TYPE:
  5601. childNodes = node._init;
  5602. node = childNodes(node._payload);
  5603. if (12 === request.status) throw null;
  5604. renderNodeDestructive(request, task, node, childIndex);
  5605. return;
  5606. }
  5607. if (isArrayImpl(node)) {
  5608. renderChildrenArray(request, task, node, childIndex);
  5609. return;
  5610. }
  5611. if ((childNodes = getIteratorFn(node)))
  5612. if ((childNodes = childNodes.call(node))) {
  5613. node = childNodes.next();
  5614. if (!node.done) {
  5615. props = [];
  5616. do props.push(node.value), (node = childNodes.next());
  5617. while (!node.done);
  5618. renderChildrenArray(request, task, props, childIndex);
  5619. }
  5620. return;
  5621. }
  5622. if ("function" === typeof node.then)
  5623. return (
  5624. (task.thenableState = null),
  5625. renderNodeDestructive(request, task, unwrapThenable(node), childIndex)
  5626. );
  5627. if (node.$$typeof === REACT_CONTEXT_TYPE)
  5628. return renderNodeDestructive(
  5629. request,
  5630. task,
  5631. node._currentValue,
  5632. childIndex
  5633. );
  5634. childIndex = Object.prototype.toString.call(node);
  5635. throw Error(
  5636. "Objects are not valid as a React child (found: " +
  5637. ("[object Object]" === childIndex
  5638. ? "object with keys {" + Object.keys(node).join(", ") + "}"
  5639. : childIndex) +
  5640. "). If you meant to render a collection of children, use an array instead."
  5641. );
  5642. }
  5643. if ("string" === typeof node)
  5644. (childIndex = task.blockedSegment),
  5645. null !== childIndex &&
  5646. (childIndex.lastPushedText = pushTextInstance(
  5647. childIndex.chunks,
  5648. node,
  5649. request.renderState,
  5650. childIndex.lastPushedText
  5651. ));
  5652. else if ("number" === typeof node || "bigint" === typeof node)
  5653. (childIndex = task.blockedSegment),
  5654. null !== childIndex &&
  5655. (childIndex.lastPushedText = pushTextInstance(
  5656. childIndex.chunks,
  5657. "" + node,
  5658. request.renderState,
  5659. childIndex.lastPushedText
  5660. ));
  5661. }
  5662. }
  5663. function renderChildrenArray(request, task, children, childIndex) {
  5664. var prevKeyPath = task.keyPath;
  5665. if (
  5666. -1 !== childIndex &&
  5667. ((task.keyPath = [task.keyPath, "Fragment", childIndex]),
  5668. null !== task.replay)
  5669. ) {
  5670. for (
  5671. var replay = task.replay, replayNodes = replay.nodes, j = 0;
  5672. j < replayNodes.length;
  5673. j++
  5674. ) {
  5675. var node = replayNodes[j];
  5676. if (node[1] === childIndex) {
  5677. childIndex = node[2];
  5678. node = node[3];
  5679. task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };
  5680. try {
  5681. renderChildrenArray(request, task, children, -1);
  5682. if (1 === task.replay.pendingTasks && 0 < task.replay.nodes.length)
  5683. throw Error(
  5684. "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
  5685. );
  5686. task.replay.pendingTasks--;
  5687. } catch (x) {
  5688. if (
  5689. "object" === typeof x &&
  5690. null !== x &&
  5691. (x === SuspenseException || "function" === typeof x.then)
  5692. )
  5693. throw x;
  5694. task.replay.pendingTasks--;
  5695. children = getThrownInfo(task.componentStack);
  5696. var boundary = task.blockedBoundary,
  5697. error = x;
  5698. children = logRecoverableError(request, error, children);
  5699. abortRemainingReplayNodes(
  5700. request,
  5701. boundary,
  5702. childIndex,
  5703. node,
  5704. error,
  5705. children
  5706. );
  5707. }
  5708. task.replay = replay;
  5709. replayNodes.splice(j, 1);
  5710. break;
  5711. }
  5712. }
  5713. task.keyPath = prevKeyPath;
  5714. return;
  5715. }
  5716. replay = task.treeContext;
  5717. replayNodes = children.length;
  5718. if (
  5719. null !== task.replay &&
  5720. ((j = task.replay.slots), null !== j && "object" === typeof j)
  5721. ) {
  5722. for (childIndex = 0; childIndex < replayNodes; childIndex++)
  5723. (node = children[childIndex]),
  5724. (task.treeContext = pushTreeContext(replay, replayNodes, childIndex)),
  5725. (boundary = j[childIndex]),
  5726. "number" === typeof boundary
  5727. ? (resumeNode(request, task, boundary, node, childIndex),
  5728. delete j[childIndex])
  5729. : renderNode(request, task, node, childIndex);
  5730. task.treeContext = replay;
  5731. task.keyPath = prevKeyPath;
  5732. return;
  5733. }
  5734. for (j = 0; j < replayNodes; j++)
  5735. (childIndex = children[j]),
  5736. (task.treeContext = pushTreeContext(replay, replayNodes, j)),
  5737. renderNode(request, task, childIndex, j);
  5738. task.treeContext = replay;
  5739. task.keyPath = prevKeyPath;
  5740. }
  5741. function trackPostponedBoundary(request, trackedPostpones, boundary) {
  5742. boundary.status = 5;
  5743. boundary.rootSegmentID = request.nextSegmentId++;
  5744. request = boundary.trackedContentKeyPath;
  5745. if (null === request)
  5746. throw Error(
  5747. "It should not be possible to postpone at the root. This is a bug in React."
  5748. );
  5749. var fallbackReplayNode = boundary.trackedFallbackNode,
  5750. children = [],
  5751. boundaryNode = trackedPostpones.workingMap.get(request);
  5752. if (void 0 === boundaryNode)
  5753. return (
  5754. (boundary = [
  5755. request[1],
  5756. request[2],
  5757. children,
  5758. null,
  5759. fallbackReplayNode,
  5760. boundary.rootSegmentID
  5761. ]),
  5762. trackedPostpones.workingMap.set(request, boundary),
  5763. addToReplayParent(boundary, request[0], trackedPostpones),
  5764. boundary
  5765. );
  5766. boundaryNode[4] = fallbackReplayNode;
  5767. boundaryNode[5] = boundary.rootSegmentID;
  5768. return boundaryNode;
  5769. }
  5770. function trackPostpone(request, trackedPostpones, task, segment) {
  5771. segment.status = 5;
  5772. var keyPath = task.keyPath,
  5773. boundary = task.blockedBoundary;
  5774. if (null === boundary)
  5775. (segment.id = request.nextSegmentId++),
  5776. (trackedPostpones.rootSlots = segment.id),
  5777. null !== request.completedRootSegment &&
  5778. (request.completedRootSegment.status = 5);
  5779. else {
  5780. if (null !== boundary && 0 === boundary.status) {
  5781. var boundaryNode = trackPostponedBoundary(
  5782. request,
  5783. trackedPostpones,
  5784. boundary
  5785. );
  5786. if (
  5787. boundary.trackedContentKeyPath === keyPath &&
  5788. -1 === task.childIndex
  5789. ) {
  5790. -1 === segment.id &&
  5791. (segment.id = segment.parentFlushed
  5792. ? boundary.rootSegmentID
  5793. : request.nextSegmentId++);
  5794. boundaryNode[3] = segment.id;
  5795. return;
  5796. }
  5797. }
  5798. -1 === segment.id &&
  5799. (segment.id =
  5800. segment.parentFlushed && null !== boundary
  5801. ? boundary.rootSegmentID
  5802. : request.nextSegmentId++);
  5803. if (-1 === task.childIndex)
  5804. null === keyPath
  5805. ? (trackedPostpones.rootSlots = segment.id)
  5806. : ((task = trackedPostpones.workingMap.get(keyPath)),
  5807. void 0 === task
  5808. ? ((task = [keyPath[1], keyPath[2], [], segment.id]),
  5809. addToReplayParent(task, keyPath[0], trackedPostpones))
  5810. : (task[3] = segment.id));
  5811. else {
  5812. if (null === keyPath)
  5813. if (((request = trackedPostpones.rootSlots), null === request))
  5814. request = trackedPostpones.rootSlots = {};
  5815. else {
  5816. if ("number" === typeof request)
  5817. throw Error(
  5818. "It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React."
  5819. );
  5820. }
  5821. else if (
  5822. ((boundary = trackedPostpones.workingMap),
  5823. (boundaryNode = boundary.get(keyPath)),
  5824. void 0 === boundaryNode)
  5825. )
  5826. (request = {}),
  5827. (boundaryNode = [keyPath[1], keyPath[2], [], request]),
  5828. boundary.set(keyPath, boundaryNode),
  5829. addToReplayParent(boundaryNode, keyPath[0], trackedPostpones);
  5830. else if (((request = boundaryNode[3]), null === request))
  5831. request = boundaryNode[3] = {};
  5832. else if ("number" === typeof request)
  5833. throw Error(
  5834. "It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React."
  5835. );
  5836. request[task.childIndex] = segment.id;
  5837. }
  5838. }
  5839. }
  5840. function untrackBoundary(request, boundary) {
  5841. request = request.trackedPostpones;
  5842. null !== request &&
  5843. ((boundary = boundary.trackedContentKeyPath),
  5844. null !== boundary &&
  5845. ((boundary = request.workingMap.get(boundary)),
  5846. void 0 !== boundary &&
  5847. ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
  5848. }
  5849. function spawnNewSuspendedReplayTask(request, task, thenableState) {
  5850. return createReplayTask(
  5851. request,
  5852. thenableState,
  5853. task.replay,
  5854. task.node,
  5855. task.childIndex,
  5856. task.blockedBoundary,
  5857. task.hoistableState,
  5858. task.abortSet,
  5859. task.keyPath,
  5860. task.formatContext,
  5861. task.context,
  5862. task.treeContext,
  5863. task.row,
  5864. task.componentStack
  5865. );
  5866. }
  5867. function spawnNewSuspendedRenderTask(request, task, thenableState) {
  5868. var segment = task.blockedSegment,
  5869. newSegment = createPendingSegment(
  5870. request,
  5871. segment.chunks.length,
  5872. null,
  5873. task.formatContext,
  5874. segment.lastPushedText,
  5875. !0
  5876. );
  5877. segment.children.push(newSegment);
  5878. segment.lastPushedText = !1;
  5879. return createRenderTask(
  5880. request,
  5881. thenableState,
  5882. task.node,
  5883. task.childIndex,
  5884. task.blockedBoundary,
  5885. newSegment,
  5886. task.blockedPreamble,
  5887. task.hoistableState,
  5888. task.abortSet,
  5889. task.keyPath,
  5890. task.formatContext,
  5891. task.context,
  5892. task.treeContext,
  5893. task.row,
  5894. task.componentStack
  5895. );
  5896. }
  5897. function renderNode(request, task, node, childIndex) {
  5898. var previousFormatContext = task.formatContext,
  5899. previousContext = task.context,
  5900. previousKeyPath = task.keyPath,
  5901. previousTreeContext = task.treeContext,
  5902. previousComponentStack = task.componentStack,
  5903. segment = task.blockedSegment;
  5904. if (null === segment) {
  5905. segment = task.replay;
  5906. try {
  5907. return renderNodeDestructive(request, task, node, childIndex);
  5908. } catch (thrownValue) {
  5909. if (
  5910. (resetHooksState(),
  5911. (node =
  5912. thrownValue === SuspenseException
  5913. ? getSuspendedThenable()
  5914. : thrownValue),
  5915. 12 !== request.status && "object" === typeof node && null !== node)
  5916. ) {
  5917. if ("function" === typeof node.then) {
  5918. childIndex =
  5919. thrownValue === SuspenseException
  5920. ? getThenableStateAfterSuspending()
  5921. : null;
  5922. request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
  5923. node.then(request, request);
  5924. task.formatContext = previousFormatContext;
  5925. task.context = previousContext;
  5926. task.keyPath = previousKeyPath;
  5927. task.treeContext = previousTreeContext;
  5928. task.componentStack = previousComponentStack;
  5929. task.replay = segment;
  5930. switchContext(previousContext);
  5931. return;
  5932. }
  5933. if ("Maximum call stack size exceeded" === node.message) {
  5934. node =
  5935. thrownValue === SuspenseException
  5936. ? getThenableStateAfterSuspending()
  5937. : null;
  5938. node = spawnNewSuspendedReplayTask(request, task, node);
  5939. request.pingedTasks.push(node);
  5940. task.formatContext = previousFormatContext;
  5941. task.context = previousContext;
  5942. task.keyPath = previousKeyPath;
  5943. task.treeContext = previousTreeContext;
  5944. task.componentStack = previousComponentStack;
  5945. task.replay = segment;
  5946. switchContext(previousContext);
  5947. return;
  5948. }
  5949. }
  5950. }
  5951. } else {
  5952. var childrenLength = segment.children.length,
  5953. chunkLength = segment.chunks.length;
  5954. try {
  5955. return renderNodeDestructive(request, task, node, childIndex);
  5956. } catch (thrownValue$63) {
  5957. if (
  5958. (resetHooksState(),
  5959. (segment.children.length = childrenLength),
  5960. (segment.chunks.length = chunkLength),
  5961. (node =
  5962. thrownValue$63 === SuspenseException
  5963. ? getSuspendedThenable()
  5964. : thrownValue$63),
  5965. 12 !== request.status && "object" === typeof node && null !== node)
  5966. ) {
  5967. if ("function" === typeof node.then) {
  5968. segment = node;
  5969. node =
  5970. thrownValue$63 === SuspenseException
  5971. ? getThenableStateAfterSuspending()
  5972. : null;
  5973. request = spawnNewSuspendedRenderTask(request, task, node).ping;
  5974. segment.then(request, request);
  5975. task.formatContext = previousFormatContext;
  5976. task.context = previousContext;
  5977. task.keyPath = previousKeyPath;
  5978. task.treeContext = previousTreeContext;
  5979. task.componentStack = previousComponentStack;
  5980. switchContext(previousContext);
  5981. return;
  5982. }
  5983. if ("Maximum call stack size exceeded" === node.message) {
  5984. segment =
  5985. thrownValue$63 === SuspenseException
  5986. ? getThenableStateAfterSuspending()
  5987. : null;
  5988. segment = spawnNewSuspendedRenderTask(request, task, segment);
  5989. request.pingedTasks.push(segment);
  5990. task.formatContext = previousFormatContext;
  5991. task.context = previousContext;
  5992. task.keyPath = previousKeyPath;
  5993. task.treeContext = previousTreeContext;
  5994. task.componentStack = previousComponentStack;
  5995. switchContext(previousContext);
  5996. return;
  5997. }
  5998. }
  5999. }
  6000. }
  6001. task.formatContext = previousFormatContext;
  6002. task.context = previousContext;
  6003. task.keyPath = previousKeyPath;
  6004. task.treeContext = previousTreeContext;
  6005. switchContext(previousContext);
  6006. throw node;
  6007. }
  6008. function abortTaskSoft(task) {
  6009. var boundary = task.blockedBoundary,
  6010. segment = task.blockedSegment;
  6011. null !== segment &&
  6012. ((segment.status = 3), finishedTask(this, boundary, task.row, segment));
  6013. }
  6014. function abortRemainingReplayNodes(
  6015. request$jscomp$0,
  6016. boundary,
  6017. nodes,
  6018. slots,
  6019. error,
  6020. errorDigest$jscomp$0
  6021. ) {
  6022. for (var i = 0; i < nodes.length; i++) {
  6023. var node = nodes[i];
  6024. if (4 === node.length)
  6025. abortRemainingReplayNodes(
  6026. request$jscomp$0,
  6027. boundary,
  6028. node[2],
  6029. node[3],
  6030. error,
  6031. errorDigest$jscomp$0
  6032. );
  6033. else {
  6034. node = node[5];
  6035. var request = request$jscomp$0,
  6036. errorDigest = errorDigest$jscomp$0,
  6037. resumedBoundary = createSuspenseBoundary(
  6038. request,
  6039. null,
  6040. new Set(),
  6041. null,
  6042. null
  6043. );
  6044. resumedBoundary.parentFlushed = !0;
  6045. resumedBoundary.rootSegmentID = node;
  6046. resumedBoundary.status = 4;
  6047. resumedBoundary.errorDigest = errorDigest;
  6048. resumedBoundary.parentFlushed &&
  6049. request.clientRenderedBoundaries.push(resumedBoundary);
  6050. }
  6051. }
  6052. nodes.length = 0;
  6053. if (null !== slots) {
  6054. if (null === boundary)
  6055. throw Error(
  6056. "We should not have any resumable nodes in the shell. This is a bug in React."
  6057. );
  6058. 4 !== boundary.status &&
  6059. ((boundary.status = 4),
  6060. (boundary.errorDigest = errorDigest$jscomp$0),
  6061. boundary.parentFlushed &&
  6062. request$jscomp$0.clientRenderedBoundaries.push(boundary));
  6063. if ("object" === typeof slots) for (var index in slots) delete slots[index];
  6064. }
  6065. }
  6066. function abortTask(task, request, error) {
  6067. var boundary = task.blockedBoundary,
  6068. segment = task.blockedSegment;
  6069. if (null !== segment) {
  6070. if (6 === segment.status) return;
  6071. segment.status = 3;
  6072. }
  6073. var errorInfo = getThrownInfo(task.componentStack);
  6074. if (null === boundary) {
  6075. if (13 !== request.status && 14 !== request.status) {
  6076. boundary = task.replay;
  6077. if (null === boundary) {
  6078. null !== request.trackedPostpones && null !== segment
  6079. ? ((boundary = request.trackedPostpones),
  6080. logRecoverableError(request, error, errorInfo),
  6081. trackPostpone(request, boundary, task, segment),
  6082. finishedTask(request, null, task.row, segment))
  6083. : (logRecoverableError(request, error, errorInfo),
  6084. fatalError(request, error));
  6085. return;
  6086. }
  6087. boundary.pendingTasks--;
  6088. 0 === boundary.pendingTasks &&
  6089. 0 < boundary.nodes.length &&
  6090. ((segment = logRecoverableError(request, error, errorInfo)),
  6091. abortRemainingReplayNodes(
  6092. request,
  6093. null,
  6094. boundary.nodes,
  6095. boundary.slots,
  6096. error,
  6097. segment
  6098. ));
  6099. request.pendingRootTasks--;
  6100. 0 === request.pendingRootTasks && completeShell(request);
  6101. }
  6102. } else {
  6103. var trackedPostpones$64 = request.trackedPostpones;
  6104. if (4 !== boundary.status) {
  6105. if (null !== trackedPostpones$64 && null !== segment)
  6106. return (
  6107. logRecoverableError(request, error, errorInfo),
  6108. trackPostpone(request, trackedPostpones$64, task, segment),
  6109. boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
  6110. return abortTask(fallbackTask, request, error);
  6111. }),
  6112. boundary.fallbackAbortableTasks.clear(),
  6113. finishedTask(request, boundary, task.row, segment)
  6114. );
  6115. boundary.status = 4;
  6116. segment = logRecoverableError(request, error, errorInfo);
  6117. boundary.status = 4;
  6118. boundary.errorDigest = segment;
  6119. untrackBoundary(request, boundary);
  6120. boundary.parentFlushed && request.clientRenderedBoundaries.push(boundary);
  6121. }
  6122. boundary.pendingTasks--;
  6123. segment = boundary.row;
  6124. null !== segment &&
  6125. 0 === --segment.pendingTasks &&
  6126. finishSuspenseListRow(request, segment);
  6127. boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
  6128. return abortTask(fallbackTask, request, error);
  6129. });
  6130. boundary.fallbackAbortableTasks.clear();
  6131. }
  6132. task = task.row;
  6133. null !== task &&
  6134. 0 === --task.pendingTasks &&
  6135. finishSuspenseListRow(request, task);
  6136. request.allPendingTasks--;
  6137. 0 === request.allPendingTasks && completeAll(request);
  6138. }
  6139. function safelyEmitEarlyPreloads(request, shellComplete) {
  6140. try {
  6141. var renderState = request.renderState,
  6142. onHeaders = renderState.onHeaders;
  6143. if (onHeaders) {
  6144. var headers = renderState.headers;
  6145. if (headers) {
  6146. renderState.headers = null;
  6147. var linkHeader = headers.preconnects;
  6148. headers.fontPreloads &&
  6149. (linkHeader && (linkHeader += ", "),
  6150. (linkHeader += headers.fontPreloads));
  6151. headers.highImagePreloads &&
  6152. (linkHeader && (linkHeader += ", "),
  6153. (linkHeader += headers.highImagePreloads));
  6154. if (!shellComplete) {
  6155. var queueIter = renderState.styles.values(),
  6156. queueStep = queueIter.next();
  6157. b: for (
  6158. ;
  6159. 0 < headers.remainingCapacity && !queueStep.done;
  6160. queueStep = queueIter.next()
  6161. )
  6162. for (
  6163. var sheetIter = queueStep.value.sheets.values(),
  6164. sheetStep = sheetIter.next();
  6165. 0 < headers.remainingCapacity && !sheetStep.done;
  6166. sheetStep = sheetIter.next()
  6167. ) {
  6168. var sheet = sheetStep.value,
  6169. props = sheet.props,
  6170. key = props.href,
  6171. props$jscomp$0 = sheet.props,
  6172. header = getPreloadAsHeader(props$jscomp$0.href, "style", {
  6173. crossOrigin: props$jscomp$0.crossOrigin,
  6174. integrity: props$jscomp$0.integrity,
  6175. nonce: props$jscomp$0.nonce,
  6176. type: props$jscomp$0.type,
  6177. fetchPriority: props$jscomp$0.fetchPriority,
  6178. referrerPolicy: props$jscomp$0.referrerPolicy,
  6179. media: props$jscomp$0.media
  6180. });
  6181. if (0 <= (headers.remainingCapacity -= header.length + 2))
  6182. (renderState.resets.style[key] = PRELOAD_NO_CREDS),
  6183. linkHeader && (linkHeader += ", "),
  6184. (linkHeader += header),
  6185. (renderState.resets.style[key] =
  6186. "string" === typeof props.crossOrigin ||
  6187. "string" === typeof props.integrity
  6188. ? [props.crossOrigin, props.integrity]
  6189. : PRELOAD_NO_CREDS);
  6190. else break b;
  6191. }
  6192. }
  6193. linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});
  6194. }
  6195. }
  6196. } catch (error) {
  6197. logRecoverableError(request, error, {});
  6198. }
  6199. }
  6200. function completeShell(request) {
  6201. null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);
  6202. null === request.trackedPostpones && preparePreamble(request);
  6203. request.onShellError = noop;
  6204. request = request.onShellReady;
  6205. request();
  6206. }
  6207. function completeAll(request) {
  6208. safelyEmitEarlyPreloads(
  6209. request,
  6210. null === request.trackedPostpones
  6211. ? !0
  6212. : null === request.completedRootSegment ||
  6213. 5 !== request.completedRootSegment.status
  6214. );
  6215. preparePreamble(request);
  6216. request = request.onAllReady;
  6217. request();
  6218. }
  6219. function queueCompletedSegment(boundary, segment) {
  6220. if (
  6221. 0 === segment.chunks.length &&
  6222. 1 === segment.children.length &&
  6223. null === segment.children[0].boundary &&
  6224. -1 === segment.children[0].id
  6225. ) {
  6226. var childSegment = segment.children[0];
  6227. childSegment.id = segment.id;
  6228. childSegment.parentFlushed = !0;
  6229. (1 !== childSegment.status &&
  6230. 3 !== childSegment.status &&
  6231. 4 !== childSegment.status) ||
  6232. queueCompletedSegment(boundary, childSegment);
  6233. } else boundary.completedSegments.push(segment);
  6234. }
  6235. function finishedSegment(request, boundary, segment) {
  6236. if (null !== byteLengthOfChunk) {
  6237. segment = segment.chunks;
  6238. for (var segmentByteSize = 0, i = 0; i < segment.length; i++)
  6239. segmentByteSize += segment[i].byteLength;
  6240. null === boundary
  6241. ? (request.byteSize += segmentByteSize)
  6242. : (boundary.byteSize += segmentByteSize);
  6243. }
  6244. }
  6245. function finishedTask(request, boundary, row, segment) {
  6246. null !== row &&
  6247. (0 === --row.pendingTasks
  6248. ? finishSuspenseListRow(request, row)
  6249. : row.together && tryToResolveTogetherRow(request, row));
  6250. request.allPendingTasks--;
  6251. if (null === boundary) {
  6252. if (null !== segment && segment.parentFlushed) {
  6253. if (null !== request.completedRootSegment)
  6254. throw Error(
  6255. "There can only be one root segment. This is a bug in React."
  6256. );
  6257. request.completedRootSegment = segment;
  6258. }
  6259. request.pendingRootTasks--;
  6260. 0 === request.pendingRootTasks && completeShell(request);
  6261. } else if ((boundary.pendingTasks--, 4 !== boundary.status))
  6262. if (0 === boundary.pendingTasks)
  6263. if (
  6264. (0 === boundary.status && (boundary.status = 1),
  6265. null !== segment &&
  6266. segment.parentFlushed &&
  6267. (1 === segment.status || 3 === segment.status) &&
  6268. queueCompletedSegment(boundary, segment),
  6269. boundary.parentFlushed && request.completedBoundaries.push(boundary),
  6270. 1 === boundary.status)
  6271. )
  6272. (row = boundary.row),
  6273. null !== row &&
  6274. hoistHoistables(row.hoistables, boundary.contentState),
  6275. isEligibleForOutlining(request, boundary) ||
  6276. (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
  6277. boundary.fallbackAbortableTasks.clear(),
  6278. null !== row &&
  6279. 0 === --row.pendingTasks &&
  6280. finishSuspenseListRow(request, row)),
  6281. 0 === request.pendingRootTasks &&
  6282. null === request.trackedPostpones &&
  6283. null !== boundary.contentPreamble &&
  6284. preparePreamble(request);
  6285. else {
  6286. if (
  6287. 5 === boundary.status &&
  6288. ((boundary = boundary.row), null !== boundary)
  6289. ) {
  6290. if (null !== request.trackedPostpones) {
  6291. row = request.trackedPostpones;
  6292. var postponedRow = boundary.next;
  6293. if (
  6294. null !== postponedRow &&
  6295. ((segment = postponedRow.boundaries), null !== segment)
  6296. )
  6297. for (
  6298. postponedRow.boundaries = null, postponedRow = 0;
  6299. postponedRow < segment.length;
  6300. postponedRow++
  6301. ) {
  6302. var postponedBoundary = segment[postponedRow];
  6303. trackPostponedBoundary(request, row, postponedBoundary);
  6304. finishedTask(request, postponedBoundary, null, null);
  6305. }
  6306. }
  6307. 0 === --boundary.pendingTasks &&
  6308. finishSuspenseListRow(request, boundary);
  6309. }
  6310. }
  6311. else
  6312. null === segment ||
  6313. !segment.parentFlushed ||
  6314. (1 !== segment.status && 3 !== segment.status) ||
  6315. (queueCompletedSegment(boundary, segment),
  6316. 1 === boundary.completedSegments.length &&
  6317. boundary.parentFlushed &&
  6318. request.partialBoundaries.push(boundary)),
  6319. (boundary = boundary.row),
  6320. null !== boundary &&
  6321. boundary.together &&
  6322. tryToResolveTogetherRow(request, boundary);
  6323. 0 === request.allPendingTasks && completeAll(request);
  6324. }
  6325. function performWork(request$jscomp$2) {
  6326. if (14 !== request$jscomp$2.status && 13 !== request$jscomp$2.status) {
  6327. var prevContext = currentActiveSnapshot,
  6328. prevDispatcher = ReactSharedInternals.H;
  6329. ReactSharedInternals.H = HooksDispatcher;
  6330. var prevAsyncDispatcher = ReactSharedInternals.A;
  6331. ReactSharedInternals.A = DefaultAsyncDispatcher;
  6332. var prevRequest = currentRequest;
  6333. currentRequest = request$jscomp$2;
  6334. var prevResumableState = currentResumableState;
  6335. currentResumableState = request$jscomp$2.resumableState;
  6336. try {
  6337. var pingedTasks = request$jscomp$2.pingedTasks,
  6338. i;
  6339. for (i = 0; i < pingedTasks.length; i++) {
  6340. var task = pingedTasks[i],
  6341. request = request$jscomp$2,
  6342. segment = task.blockedSegment;
  6343. if (null === segment) {
  6344. var request$jscomp$0 = request;
  6345. if (0 !== task.replay.pendingTasks) {
  6346. switchContext(task.context);
  6347. try {
  6348. "number" === typeof task.replay.slots
  6349. ? resumeNode(
  6350. request$jscomp$0,
  6351. task,
  6352. task.replay.slots,
  6353. task.node,
  6354. task.childIndex
  6355. )
  6356. : retryNode(request$jscomp$0, task);
  6357. if (
  6358. 1 === task.replay.pendingTasks &&
  6359. 0 < task.replay.nodes.length
  6360. )
  6361. throw Error(
  6362. "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
  6363. );
  6364. task.replay.pendingTasks--;
  6365. task.abortSet.delete(task);
  6366. finishedTask(
  6367. request$jscomp$0,
  6368. task.blockedBoundary,
  6369. task.row,
  6370. null
  6371. );
  6372. } catch (thrownValue) {
  6373. resetHooksState();
  6374. var x =
  6375. thrownValue === SuspenseException
  6376. ? getSuspendedThenable()
  6377. : thrownValue;
  6378. if (
  6379. "object" === typeof x &&
  6380. null !== x &&
  6381. "function" === typeof x.then
  6382. ) {
  6383. var ping = task.ping;
  6384. x.then(ping, ping);
  6385. task.thenableState =
  6386. thrownValue === SuspenseException
  6387. ? getThenableStateAfterSuspending()
  6388. : null;
  6389. } else {
  6390. task.replay.pendingTasks--;
  6391. task.abortSet.delete(task);
  6392. var errorInfo = getThrownInfo(task.componentStack);
  6393. request = void 0;
  6394. var request$jscomp$1 = request$jscomp$0,
  6395. boundary = task.blockedBoundary,
  6396. error$jscomp$0 =
  6397. 12 === request$jscomp$0.status
  6398. ? request$jscomp$0.fatalError
  6399. : x,
  6400. replayNodes = task.replay.nodes,
  6401. resumeSlots = task.replay.slots;
  6402. request = logRecoverableError(
  6403. request$jscomp$1,
  6404. error$jscomp$0,
  6405. errorInfo
  6406. );
  6407. abortRemainingReplayNodes(
  6408. request$jscomp$1,
  6409. boundary,
  6410. replayNodes,
  6411. resumeSlots,
  6412. error$jscomp$0,
  6413. request
  6414. );
  6415. request$jscomp$0.pendingRootTasks--;
  6416. 0 === request$jscomp$0.pendingRootTasks &&
  6417. completeShell(request$jscomp$0);
  6418. request$jscomp$0.allPendingTasks--;
  6419. 0 === request$jscomp$0.allPendingTasks &&
  6420. completeAll(request$jscomp$0);
  6421. }
  6422. } finally {
  6423. }
  6424. }
  6425. } else if (
  6426. ((request$jscomp$0 = void 0),
  6427. (request$jscomp$1 = segment),
  6428. 0 === request$jscomp$1.status)
  6429. ) {
  6430. request$jscomp$1.status = 6;
  6431. switchContext(task.context);
  6432. var childrenLength = request$jscomp$1.children.length,
  6433. chunkLength = request$jscomp$1.chunks.length;
  6434. try {
  6435. retryNode(request, task),
  6436. request$jscomp$1.lastPushedText &&
  6437. request$jscomp$1.textEmbedded &&
  6438. request$jscomp$1.chunks.push(textSeparator),
  6439. task.abortSet.delete(task),
  6440. (request$jscomp$1.status = 1),
  6441. finishedSegment(request, task.blockedBoundary, request$jscomp$1),
  6442. finishedTask(
  6443. request,
  6444. task.blockedBoundary,
  6445. task.row,
  6446. request$jscomp$1
  6447. );
  6448. } catch (thrownValue) {
  6449. resetHooksState();
  6450. request$jscomp$1.children.length = childrenLength;
  6451. request$jscomp$1.chunks.length = chunkLength;
  6452. var x$jscomp$0 =
  6453. thrownValue === SuspenseException
  6454. ? getSuspendedThenable()
  6455. : 12 === request.status
  6456. ? request.fatalError
  6457. : thrownValue;
  6458. if (12 === request.status && null !== request.trackedPostpones) {
  6459. var trackedPostpones = request.trackedPostpones,
  6460. thrownInfo = getThrownInfo(task.componentStack);
  6461. task.abortSet.delete(task);
  6462. logRecoverableError(request, x$jscomp$0, thrownInfo);
  6463. trackPostpone(request, trackedPostpones, task, request$jscomp$1);
  6464. finishedTask(
  6465. request,
  6466. task.blockedBoundary,
  6467. task.row,
  6468. request$jscomp$1
  6469. );
  6470. } else if (
  6471. "object" === typeof x$jscomp$0 &&
  6472. null !== x$jscomp$0 &&
  6473. "function" === typeof x$jscomp$0.then
  6474. ) {
  6475. request$jscomp$1.status = 0;
  6476. task.thenableState =
  6477. thrownValue === SuspenseException
  6478. ? getThenableStateAfterSuspending()
  6479. : null;
  6480. var ping$jscomp$0 = task.ping;
  6481. x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
  6482. } else {
  6483. var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
  6484. task.abortSet.delete(task);
  6485. request$jscomp$1.status = 4;
  6486. var boundary$jscomp$0 = task.blockedBoundary,
  6487. row = task.row;
  6488. null !== row &&
  6489. 0 === --row.pendingTasks &&
  6490. finishSuspenseListRow(request, row);
  6491. request.allPendingTasks--;
  6492. request$jscomp$0 = logRecoverableError(
  6493. request,
  6494. x$jscomp$0,
  6495. errorInfo$jscomp$0
  6496. );
  6497. if (null === boundary$jscomp$0) fatalError(request, x$jscomp$0);
  6498. else if (
  6499. (boundary$jscomp$0.pendingTasks--,
  6500. 4 !== boundary$jscomp$0.status)
  6501. ) {
  6502. boundary$jscomp$0.status = 4;
  6503. boundary$jscomp$0.errorDigest = request$jscomp$0;
  6504. untrackBoundary(request, boundary$jscomp$0);
  6505. var boundaryRow = boundary$jscomp$0.row;
  6506. null !== boundaryRow &&
  6507. 0 === --boundaryRow.pendingTasks &&
  6508. finishSuspenseListRow(request, boundaryRow);
  6509. boundary$jscomp$0.parentFlushed &&
  6510. request.clientRenderedBoundaries.push(boundary$jscomp$0);
  6511. 0 === request.pendingRootTasks &&
  6512. null === request.trackedPostpones &&
  6513. null !== boundary$jscomp$0.contentPreamble &&
  6514. preparePreamble(request);
  6515. }
  6516. 0 === request.allPendingTasks && completeAll(request);
  6517. }
  6518. } finally {
  6519. }
  6520. }
  6521. }
  6522. pingedTasks.splice(0, i);
  6523. null !== request$jscomp$2.destination &&
  6524. flushCompletedQueues(request$jscomp$2, request$jscomp$2.destination);
  6525. } catch (error) {
  6526. logRecoverableError(request$jscomp$2, error, {}),
  6527. fatalError(request$jscomp$2, error);
  6528. } finally {
  6529. (currentResumableState = prevResumableState),
  6530. (ReactSharedInternals.H = prevDispatcher),
  6531. (ReactSharedInternals.A = prevAsyncDispatcher),
  6532. prevDispatcher === HooksDispatcher && switchContext(prevContext),
  6533. (currentRequest = prevRequest);
  6534. }
  6535. }
  6536. }
  6537. function preparePreambleFromSubtree(
  6538. request,
  6539. segment,
  6540. collectedPreambleSegments
  6541. ) {
  6542. segment.preambleChildren.length &&
  6543. collectedPreambleSegments.push(segment.preambleChildren);
  6544. for (var pendingPreambles = !1, i = 0; i < segment.children.length; i++)
  6545. pendingPreambles =
  6546. preparePreambleFromSegment(
  6547. request,
  6548. segment.children[i],
  6549. collectedPreambleSegments
  6550. ) || pendingPreambles;
  6551. return pendingPreambles;
  6552. }
  6553. function preparePreambleFromSegment(
  6554. request,
  6555. segment,
  6556. collectedPreambleSegments
  6557. ) {
  6558. var boundary = segment.boundary;
  6559. if (null === boundary)
  6560. return preparePreambleFromSubtree(
  6561. request,
  6562. segment,
  6563. collectedPreambleSegments
  6564. );
  6565. var preamble = boundary.contentPreamble,
  6566. fallbackPreamble = boundary.fallbackPreamble;
  6567. if (null === preamble || null === fallbackPreamble) return !1;
  6568. switch (boundary.status) {
  6569. case 1:
  6570. hoistPreambleState(request.renderState, preamble);
  6571. request.byteSize += boundary.byteSize;
  6572. segment = boundary.completedSegments[0];
  6573. if (!segment)
  6574. throw Error(
  6575. "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
  6576. );
  6577. return preparePreambleFromSubtree(
  6578. request,
  6579. segment,
  6580. collectedPreambleSegments
  6581. );
  6582. case 5:
  6583. if (null !== request.trackedPostpones) return !0;
  6584. case 4:
  6585. if (1 === segment.status)
  6586. return (
  6587. hoistPreambleState(request.renderState, fallbackPreamble),
  6588. preparePreambleFromSubtree(
  6589. request,
  6590. segment,
  6591. collectedPreambleSegments
  6592. )
  6593. );
  6594. default:
  6595. return !0;
  6596. }
  6597. }
  6598. function preparePreamble(request) {
  6599. if (
  6600. request.completedRootSegment &&
  6601. null === request.completedPreambleSegments
  6602. ) {
  6603. var collectedPreambleSegments = [],
  6604. originalRequestByteSize = request.byteSize,
  6605. hasPendingPreambles = preparePreambleFromSegment(
  6606. request,
  6607. request.completedRootSegment,
  6608. collectedPreambleSegments
  6609. ),
  6610. preamble = request.renderState.preamble;
  6611. !1 === hasPendingPreambles || (preamble.headChunks && preamble.bodyChunks)
  6612. ? (request.completedPreambleSegments = collectedPreambleSegments)
  6613. : (request.byteSize = originalRequestByteSize);
  6614. }
  6615. }
  6616. function flushSubtree(request, destination, segment, hoistableState) {
  6617. segment.parentFlushed = !0;
  6618. switch (segment.status) {
  6619. case 0:
  6620. segment.id = request.nextSegmentId++;
  6621. case 5:
  6622. return (
  6623. (hoistableState = segment.id),
  6624. (segment.lastPushedText = !1),
  6625. (segment.textEmbedded = !1),
  6626. (request = request.renderState),
  6627. writeChunk(destination, placeholder1),
  6628. writeChunk(destination, request.placeholderPrefix),
  6629. (request = stringToChunk(hoistableState.toString(16))),
  6630. writeChunk(destination, request),
  6631. writeChunkAndReturn(destination, placeholder2)
  6632. );
  6633. case 1:
  6634. segment.status = 2;
  6635. var r = !0,
  6636. chunks = segment.chunks,
  6637. chunkIdx = 0;
  6638. segment = segment.children;
  6639. for (var childIdx = 0; childIdx < segment.length; childIdx++) {
  6640. for (r = segment[childIdx]; chunkIdx < r.index; chunkIdx++)
  6641. writeChunk(destination, chunks[chunkIdx]);
  6642. r = flushSegment(request, destination, r, hoistableState);
  6643. }
  6644. for (; chunkIdx < chunks.length - 1; chunkIdx++)
  6645. writeChunk(destination, chunks[chunkIdx]);
  6646. chunkIdx < chunks.length &&
  6647. (r = writeChunkAndReturn(destination, chunks[chunkIdx]));
  6648. return r;
  6649. case 3:
  6650. return !0;
  6651. default:
  6652. throw Error(
  6653. "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
  6654. );
  6655. }
  6656. }
  6657. var flushedByteSize = 0;
  6658. function flushSegment(request, destination, segment, hoistableState) {
  6659. var boundary = segment.boundary;
  6660. if (null === boundary)
  6661. return flushSubtree(request, destination, segment, hoistableState);
  6662. boundary.parentFlushed = !0;
  6663. if (4 === boundary.status) {
  6664. var row = boundary.row;
  6665. null !== row &&
  6666. 0 === --row.pendingTasks &&
  6667. finishSuspenseListRow(request, row);
  6668. boundary = boundary.errorDigest;
  6669. writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);
  6670. writeChunk(destination, clientRenderedSuspenseBoundaryError1);
  6671. boundary &&
  6672. (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
  6673. writeChunk(destination, stringToChunk(escapeTextForBrowser(boundary))),
  6674. writeChunk(
  6675. destination,
  6676. clientRenderedSuspenseBoundaryErrorAttrInterstitial
  6677. ));
  6678. writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);
  6679. flushSubtree(request, destination, segment, hoistableState);
  6680. } else if (1 !== boundary.status)
  6681. 0 === boundary.status && (boundary.rootSegmentID = request.nextSegmentId++),
  6682. 0 < boundary.completedSegments.length &&
  6683. request.partialBoundaries.push(boundary),
  6684. writeStartPendingSuspenseBoundary(
  6685. destination,
  6686. request.renderState,
  6687. boundary.rootSegmentID
  6688. ),
  6689. hoistableState && hoistHoistables(hoistableState, boundary.fallbackState),
  6690. flushSubtree(request, destination, segment, hoistableState);
  6691. else if (
  6692. !flushingPartialBoundaries &&
  6693. isEligibleForOutlining(request, boundary) &&
  6694. (flushedByteSize + boundary.byteSize > request.progressiveChunkSize ||
  6695. hasSuspenseyContent(boundary.contentState))
  6696. )
  6697. (boundary.rootSegmentID = request.nextSegmentId++),
  6698. request.completedBoundaries.push(boundary),
  6699. writeStartPendingSuspenseBoundary(
  6700. destination,
  6701. request.renderState,
  6702. boundary.rootSegmentID
  6703. ),
  6704. flushSubtree(request, destination, segment, hoistableState);
  6705. else {
  6706. flushedByteSize += boundary.byteSize;
  6707. hoistableState && hoistHoistables(hoistableState, boundary.contentState);
  6708. segment = boundary.row;
  6709. null !== segment &&
  6710. isEligibleForOutlining(request, boundary) &&
  6711. 0 === --segment.pendingTasks &&
  6712. finishSuspenseListRow(request, segment);
  6713. writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
  6714. segment = boundary.completedSegments;
  6715. if (1 !== segment.length)
  6716. throw Error(
  6717. "A previously unvisited boundary must have exactly one root segment. This is a bug in React."
  6718. );
  6719. flushSegment(request, destination, segment[0], hoistableState);
  6720. }
  6721. return writeChunkAndReturn(destination, endSuspenseBoundary);
  6722. }
  6723. function flushSegmentContainer(request, destination, segment, hoistableState) {
  6724. writeStartSegment(
  6725. destination,
  6726. request.renderState,
  6727. segment.parentFormatContext,
  6728. segment.id
  6729. );
  6730. flushSegment(request, destination, segment, hoistableState);
  6731. return writeEndSegment(destination, segment.parentFormatContext);
  6732. }
  6733. function flushCompletedBoundary(request, destination, boundary) {
  6734. flushedByteSize = boundary.byteSize;
  6735. for (
  6736. var completedSegments = boundary.completedSegments, i = 0;
  6737. i < completedSegments.length;
  6738. i++
  6739. )
  6740. flushPartiallyCompletedSegment(
  6741. request,
  6742. destination,
  6743. boundary,
  6744. completedSegments[i]
  6745. );
  6746. completedSegments.length = 0;
  6747. completedSegments = boundary.row;
  6748. null !== completedSegments &&
  6749. isEligibleForOutlining(request, boundary) &&
  6750. 0 === --completedSegments.pendingTasks &&
  6751. finishSuspenseListRow(request, completedSegments);
  6752. writeHoistablesForBoundary(
  6753. destination,
  6754. boundary.contentState,
  6755. request.renderState
  6756. );
  6757. completedSegments = request.resumableState;
  6758. request = request.renderState;
  6759. i = boundary.rootSegmentID;
  6760. boundary = boundary.contentState;
  6761. var requiresStyleInsertion = request.stylesToHoist;
  6762. request.stylesToHoist = !1;
  6763. writeChunk(destination, request.startInlineScript);
  6764. writeChunk(destination, endOfStartTag);
  6765. requiresStyleInsertion
  6766. ? (0 === (completedSegments.instructions & 4) &&
  6767. ((completedSegments.instructions |= 4),
  6768. writeChunk(destination, clientRenderScriptFunctionOnly)),
  6769. 0 === (completedSegments.instructions & 2) &&
  6770. ((completedSegments.instructions |= 2),
  6771. writeChunk(destination, completeBoundaryScriptFunctionOnly)),
  6772. 0 === (completedSegments.instructions & 8)
  6773. ? ((completedSegments.instructions |= 8),
  6774. writeChunk(destination, completeBoundaryWithStylesScript1FullPartial))
  6775. : writeChunk(destination, completeBoundaryWithStylesScript1Partial))
  6776. : (0 === (completedSegments.instructions & 2) &&
  6777. ((completedSegments.instructions |= 2),
  6778. writeChunk(destination, completeBoundaryScriptFunctionOnly)),
  6779. writeChunk(destination, completeBoundaryScript1Partial));
  6780. completedSegments = stringToChunk(i.toString(16));
  6781. writeChunk(destination, request.boundaryPrefix);
  6782. writeChunk(destination, completedSegments);
  6783. writeChunk(destination, completeBoundaryScript2);
  6784. writeChunk(destination, request.segmentPrefix);
  6785. writeChunk(destination, completedSegments);
  6786. requiresStyleInsertion
  6787. ? (writeChunk(destination, completeBoundaryScript3a),
  6788. writeStyleResourceDependenciesInJS(destination, boundary))
  6789. : writeChunk(destination, completeBoundaryScript3b);
  6790. boundary = writeChunkAndReturn(destination, completeBoundaryScriptEnd);
  6791. return writeBootstrap(destination, request) && boundary;
  6792. }
  6793. function flushPartiallyCompletedSegment(
  6794. request,
  6795. destination,
  6796. boundary,
  6797. segment
  6798. ) {
  6799. if (2 === segment.status) return !0;
  6800. var hoistableState = boundary.contentState,
  6801. segmentID = segment.id;
  6802. if (-1 === segmentID) {
  6803. if (-1 === (segment.id = boundary.rootSegmentID))
  6804. throw Error(
  6805. "A root segment ID must have been assigned by now. This is a bug in React."
  6806. );
  6807. return flushSegmentContainer(request, destination, segment, hoistableState);
  6808. }
  6809. if (segmentID === boundary.rootSegmentID)
  6810. return flushSegmentContainer(request, destination, segment, hoistableState);
  6811. flushSegmentContainer(request, destination, segment, hoistableState);
  6812. boundary = request.resumableState;
  6813. request = request.renderState;
  6814. writeChunk(destination, request.startInlineScript);
  6815. writeChunk(destination, endOfStartTag);
  6816. 0 === (boundary.instructions & 1)
  6817. ? ((boundary.instructions |= 1),
  6818. writeChunk(destination, completeSegmentScript1Full))
  6819. : writeChunk(destination, completeSegmentScript1Partial);
  6820. writeChunk(destination, request.segmentPrefix);
  6821. segmentID = stringToChunk(segmentID.toString(16));
  6822. writeChunk(destination, segmentID);
  6823. writeChunk(destination, completeSegmentScript2);
  6824. writeChunk(destination, request.placeholderPrefix);
  6825. writeChunk(destination, segmentID);
  6826. destination = writeChunkAndReturn(destination, completeSegmentScriptEnd);
  6827. return destination;
  6828. }
  6829. var flushingPartialBoundaries = !1;
  6830. function flushCompletedQueues(request, destination) {
  6831. currentView = new Uint8Array(2048);
  6832. writtenBytes = 0;
  6833. try {
  6834. if (!(0 < request.pendingRootTasks)) {
  6835. var i,
  6836. completedRootSegment = request.completedRootSegment;
  6837. if (null !== completedRootSegment) {
  6838. if (5 === completedRootSegment.status) return;
  6839. var completedPreambleSegments = request.completedPreambleSegments;
  6840. if (null === completedPreambleSegments) return;
  6841. flushedByteSize = request.byteSize;
  6842. var resumableState = request.resumableState,
  6843. renderState = request.renderState,
  6844. preamble = renderState.preamble,
  6845. htmlChunks = preamble.htmlChunks,
  6846. headChunks = preamble.headChunks,
  6847. i$jscomp$0;
  6848. if (htmlChunks) {
  6849. for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)
  6850. writeChunk(destination, htmlChunks[i$jscomp$0]);
  6851. if (headChunks)
  6852. for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)
  6853. writeChunk(destination, headChunks[i$jscomp$0]);
  6854. else
  6855. writeChunk(destination, startChunkForTag("head")),
  6856. writeChunk(destination, endOfStartTag);
  6857. } else if (headChunks)
  6858. for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)
  6859. writeChunk(destination, headChunks[i$jscomp$0]);
  6860. var charsetChunks = renderState.charsetChunks;
  6861. for (i$jscomp$0 = 0; i$jscomp$0 < charsetChunks.length; i$jscomp$0++)
  6862. writeChunk(destination, charsetChunks[i$jscomp$0]);
  6863. charsetChunks.length = 0;
  6864. renderState.preconnects.forEach(flushResource, destination);
  6865. renderState.preconnects.clear();
  6866. var viewportChunks = renderState.viewportChunks;
  6867. for (i$jscomp$0 = 0; i$jscomp$0 < viewportChunks.length; i$jscomp$0++)
  6868. writeChunk(destination, viewportChunks[i$jscomp$0]);
  6869. viewportChunks.length = 0;
  6870. renderState.fontPreloads.forEach(flushResource, destination);
  6871. renderState.fontPreloads.clear();
  6872. renderState.highImagePreloads.forEach(flushResource, destination);
  6873. renderState.highImagePreloads.clear();
  6874. currentlyFlushingRenderState = renderState;
  6875. renderState.styles.forEach(flushStylesInPreamble, destination);
  6876. currentlyFlushingRenderState = null;
  6877. var importMapChunks = renderState.importMapChunks;
  6878. for (i$jscomp$0 = 0; i$jscomp$0 < importMapChunks.length; i$jscomp$0++)
  6879. writeChunk(destination, importMapChunks[i$jscomp$0]);
  6880. importMapChunks.length = 0;
  6881. renderState.bootstrapScripts.forEach(flushResource, destination);
  6882. renderState.scripts.forEach(flushResource, destination);
  6883. renderState.scripts.clear();
  6884. renderState.bulkPreloads.forEach(flushResource, destination);
  6885. renderState.bulkPreloads.clear();
  6886. htmlChunks || headChunks || (resumableState.instructions |= 32);
  6887. var hoistableChunks = renderState.hoistableChunks;
  6888. for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
  6889. writeChunk(destination, hoistableChunks[i$jscomp$0]);
  6890. for (
  6891. resumableState = hoistableChunks.length = 0;
  6892. resumableState < completedPreambleSegments.length;
  6893. resumableState++
  6894. ) {
  6895. var segments = completedPreambleSegments[resumableState];
  6896. for (renderState = 0; renderState < segments.length; renderState++)
  6897. flushSegment(request, destination, segments[renderState], null);
  6898. }
  6899. var preamble$jscomp$0 = request.renderState.preamble,
  6900. headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
  6901. (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) &&
  6902. writeChunk(destination, endChunkForTag("head"));
  6903. var bodyChunks = preamble$jscomp$0.bodyChunks;
  6904. if (bodyChunks)
  6905. for (
  6906. completedPreambleSegments = 0;
  6907. completedPreambleSegments < bodyChunks.length;
  6908. completedPreambleSegments++
  6909. )
  6910. writeChunk(destination, bodyChunks[completedPreambleSegments]);
  6911. flushSegment(request, destination, completedRootSegment, null);
  6912. request.completedRootSegment = null;
  6913. var renderState$jscomp$0 = request.renderState;
  6914. if (
  6915. 0 !== request.allPendingTasks ||
  6916. 0 !== request.clientRenderedBoundaries.length ||
  6917. 0 !== request.completedBoundaries.length ||
  6918. (null !== request.trackedPostpones &&
  6919. (0 !== request.trackedPostpones.rootNodes.length ||
  6920. null !== request.trackedPostpones.rootSlots))
  6921. ) {
  6922. var resumableState$jscomp$0 = request.resumableState;
  6923. if (0 === (resumableState$jscomp$0.instructions & 64)) {
  6924. resumableState$jscomp$0.instructions |= 64;
  6925. writeChunk(destination, renderState$jscomp$0.startInlineScript);
  6926. if (0 === (resumableState$jscomp$0.instructions & 32)) {
  6927. resumableState$jscomp$0.instructions |= 32;
  6928. var shellId = "_" + resumableState$jscomp$0.idPrefix + "R_";
  6929. writeChunk(destination, completedShellIdAttributeStart);
  6930. writeChunk(
  6931. destination,
  6932. stringToChunk(escapeTextForBrowser(shellId))
  6933. );
  6934. writeChunk(destination, attributeEnd);
  6935. }
  6936. writeChunk(destination, endOfStartTag);
  6937. writeChunk(destination, shellTimeRuntimeScript);
  6938. writeChunkAndReturn(destination, endInlineScript);
  6939. }
  6940. }
  6941. writeBootstrap(destination, renderState$jscomp$0);
  6942. }
  6943. var renderState$jscomp$1 = request.renderState;
  6944. completedRootSegment = 0;
  6945. var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
  6946. for (
  6947. completedRootSegment = 0;
  6948. completedRootSegment < viewportChunks$jscomp$0.length;
  6949. completedRootSegment++
  6950. )
  6951. writeChunk(destination, viewportChunks$jscomp$0[completedRootSegment]);
  6952. viewportChunks$jscomp$0.length = 0;
  6953. renderState$jscomp$1.preconnects.forEach(flushResource, destination);
  6954. renderState$jscomp$1.preconnects.clear();
  6955. renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
  6956. renderState$jscomp$1.fontPreloads.clear();
  6957. renderState$jscomp$1.highImagePreloads.forEach(
  6958. flushResource,
  6959. destination
  6960. );
  6961. renderState$jscomp$1.highImagePreloads.clear();
  6962. renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
  6963. renderState$jscomp$1.scripts.forEach(flushResource, destination);
  6964. renderState$jscomp$1.scripts.clear();
  6965. renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
  6966. renderState$jscomp$1.bulkPreloads.clear();
  6967. var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
  6968. for (
  6969. completedRootSegment = 0;
  6970. completedRootSegment < hoistableChunks$jscomp$0.length;
  6971. completedRootSegment++
  6972. )
  6973. writeChunk(destination, hoistableChunks$jscomp$0[completedRootSegment]);
  6974. hoistableChunks$jscomp$0.length = 0;
  6975. var clientRenderedBoundaries = request.clientRenderedBoundaries;
  6976. for (i = 0; i < clientRenderedBoundaries.length; i++) {
  6977. var boundary = clientRenderedBoundaries[i];
  6978. renderState$jscomp$1 = destination;
  6979. var resumableState$jscomp$1 = request.resumableState,
  6980. renderState$jscomp$2 = request.renderState,
  6981. id = boundary.rootSegmentID,
  6982. errorDigest = boundary.errorDigest;
  6983. writeChunk(
  6984. renderState$jscomp$1,
  6985. renderState$jscomp$2.startInlineScript
  6986. );
  6987. writeChunk(renderState$jscomp$1, endOfStartTag);
  6988. 0 === (resumableState$jscomp$1.instructions & 4)
  6989. ? ((resumableState$jscomp$1.instructions |= 4),
  6990. writeChunk(renderState$jscomp$1, clientRenderScript1Full))
  6991. : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);
  6992. writeChunk(renderState$jscomp$1, renderState$jscomp$2.boundaryPrefix);
  6993. writeChunk(renderState$jscomp$1, stringToChunk(id.toString(16)));
  6994. writeChunk(renderState$jscomp$1, clientRenderScript1A);
  6995. errorDigest &&
  6996. (writeChunk(
  6997. renderState$jscomp$1,
  6998. clientRenderErrorScriptArgInterstitial
  6999. ),
  7000. writeChunk(
  7001. renderState$jscomp$1,
  7002. stringToChunk(
  7003. escapeJSStringsForInstructionScripts(errorDigest || "")
  7004. )
  7005. ));
  7006. var JSCompiler_inline_result = writeChunkAndReturn(
  7007. renderState$jscomp$1,
  7008. clientRenderScriptEnd
  7009. );
  7010. if (!JSCompiler_inline_result) {
  7011. request.destination = null;
  7012. i++;
  7013. clientRenderedBoundaries.splice(0, i);
  7014. return;
  7015. }
  7016. }
  7017. clientRenderedBoundaries.splice(0, i);
  7018. var completedBoundaries = request.completedBoundaries;
  7019. for (i = 0; i < completedBoundaries.length; i++)
  7020. if (
  7021. !flushCompletedBoundary(request, destination, completedBoundaries[i])
  7022. ) {
  7023. request.destination = null;
  7024. i++;
  7025. completedBoundaries.splice(0, i);
  7026. return;
  7027. }
  7028. completedBoundaries.splice(0, i);
  7029. completeWriting(destination);
  7030. currentView = new Uint8Array(2048);
  7031. writtenBytes = 0;
  7032. flushingPartialBoundaries = !0;
  7033. var partialBoundaries = request.partialBoundaries;
  7034. for (i = 0; i < partialBoundaries.length; i++) {
  7035. var boundary$70 = partialBoundaries[i];
  7036. a: {
  7037. clientRenderedBoundaries = request;
  7038. boundary = destination;
  7039. flushedByteSize = boundary$70.byteSize;
  7040. var completedSegments = boundary$70.completedSegments;
  7041. for (
  7042. JSCompiler_inline_result = 0;
  7043. JSCompiler_inline_result < completedSegments.length;
  7044. JSCompiler_inline_result++
  7045. )
  7046. if (
  7047. !flushPartiallyCompletedSegment(
  7048. clientRenderedBoundaries,
  7049. boundary,
  7050. boundary$70,
  7051. completedSegments[JSCompiler_inline_result]
  7052. )
  7053. ) {
  7054. JSCompiler_inline_result++;
  7055. completedSegments.splice(0, JSCompiler_inline_result);
  7056. var JSCompiler_inline_result$jscomp$0 = !1;
  7057. break a;
  7058. }
  7059. completedSegments.splice(0, JSCompiler_inline_result);
  7060. var row = boundary$70.row;
  7061. null !== row &&
  7062. row.together &&
  7063. 1 === boundary$70.pendingTasks &&
  7064. (1 === row.pendingTasks
  7065. ? unblockSuspenseListRow(
  7066. clientRenderedBoundaries,
  7067. row,
  7068. row.hoistables
  7069. )
  7070. : row.pendingTasks--);
  7071. JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
  7072. boundary,
  7073. boundary$70.contentState,
  7074. clientRenderedBoundaries.renderState
  7075. );
  7076. }
  7077. if (!JSCompiler_inline_result$jscomp$0) {
  7078. request.destination = null;
  7079. i++;
  7080. partialBoundaries.splice(0, i);
  7081. return;
  7082. }
  7083. }
  7084. partialBoundaries.splice(0, i);
  7085. flushingPartialBoundaries = !1;
  7086. var largeBoundaries = request.completedBoundaries;
  7087. for (i = 0; i < largeBoundaries.length; i++)
  7088. if (!flushCompletedBoundary(request, destination, largeBoundaries[i])) {
  7089. request.destination = null;
  7090. i++;
  7091. largeBoundaries.splice(0, i);
  7092. return;
  7093. }
  7094. largeBoundaries.splice(0, i);
  7095. }
  7096. } finally {
  7097. (flushingPartialBoundaries = !1),
  7098. 0 === request.allPendingTasks &&
  7099. 0 === request.clientRenderedBoundaries.length &&
  7100. 0 === request.completedBoundaries.length
  7101. ? ((request.flushScheduled = !1),
  7102. (i = request.resumableState),
  7103. i.hasBody && writeChunk(destination, endChunkForTag("body")),
  7104. i.hasHtml && writeChunk(destination, endChunkForTag("html")),
  7105. completeWriting(destination),
  7106. (request.status = 14),
  7107. destination.close(),
  7108. (request.destination = null))
  7109. : completeWriting(destination);
  7110. }
  7111. }
  7112. function startWork(request) {
  7113. request.flushScheduled = null !== request.destination;
  7114. supportsRequestStorage
  7115. ? scheduleMicrotask(function () {
  7116. return requestStorage.run(request, performWork, request);
  7117. })
  7118. : scheduleMicrotask(function () {
  7119. return performWork(request);
  7120. });
  7121. setTimeout(function () {
  7122. 10 === request.status && (request.status = 11);
  7123. null === request.trackedPostpones &&
  7124. (supportsRequestStorage
  7125. ? requestStorage.run(
  7126. request,
  7127. enqueueEarlyPreloadsAfterInitialWork,
  7128. request
  7129. )
  7130. : enqueueEarlyPreloadsAfterInitialWork(request));
  7131. }, 0);
  7132. }
  7133. function enqueueEarlyPreloadsAfterInitialWork(request) {
  7134. safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
  7135. }
  7136. function enqueueFlush(request) {
  7137. !1 === request.flushScheduled &&
  7138. 0 === request.pingedTasks.length &&
  7139. null !== request.destination &&
  7140. ((request.flushScheduled = !0),
  7141. setTimeout(function () {
  7142. var destination = request.destination;
  7143. destination
  7144. ? flushCompletedQueues(request, destination)
  7145. : (request.flushScheduled = !1);
  7146. }, 0));
  7147. }
  7148. function startFlowing(request, destination) {
  7149. if (13 === request.status)
  7150. (request.status = 14), closeWithError(destination, request.fatalError);
  7151. else if (14 !== request.status && null === request.destination) {
  7152. request.destination = destination;
  7153. try {
  7154. flushCompletedQueues(request, destination);
  7155. } catch (error) {
  7156. logRecoverableError(request, error, {}), fatalError(request, error);
  7157. }
  7158. }
  7159. }
  7160. function abort(request, reason) {
  7161. if (11 === request.status || 10 === request.status) request.status = 12;
  7162. try {
  7163. var abortableTasks = request.abortableTasks;
  7164. if (0 < abortableTasks.size) {
  7165. var error =
  7166. void 0 === reason
  7167. ? Error("The render was aborted by the server without a reason.")
  7168. : "object" === typeof reason &&
  7169. null !== reason &&
  7170. "function" === typeof reason.then
  7171. ? Error("The render was aborted by the server with a promise.")
  7172. : reason;
  7173. request.fatalError = error;
  7174. abortableTasks.forEach(function (task) {
  7175. return abortTask(task, request, error);
  7176. });
  7177. abortableTasks.clear();
  7178. }
  7179. null !== request.destination &&
  7180. flushCompletedQueues(request, request.destination);
  7181. } catch (error$72) {
  7182. logRecoverableError(request, error$72, {}), fatalError(request, error$72);
  7183. }
  7184. }
  7185. function addToReplayParent(node, parentKeyPath, trackedPostpones) {
  7186. if (null === parentKeyPath) trackedPostpones.rootNodes.push(node);
  7187. else {
  7188. var workingMap = trackedPostpones.workingMap,
  7189. parentNode = workingMap.get(parentKeyPath);
  7190. void 0 === parentNode &&
  7191. ((parentNode = [parentKeyPath[1], parentKeyPath[2], [], null]),
  7192. workingMap.set(parentKeyPath, parentNode),
  7193. addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));
  7194. parentNode[2].push(node);
  7195. }
  7196. }
  7197. function getPostponedState(request) {
  7198. var trackedPostpones = request.trackedPostpones;
  7199. if (
  7200. null === trackedPostpones ||
  7201. (0 === trackedPostpones.rootNodes.length &&
  7202. null === trackedPostpones.rootSlots)
  7203. )
  7204. return (request.trackedPostpones = null);
  7205. if (
  7206. null === request.completedRootSegment ||
  7207. (5 !== request.completedRootSegment.status &&
  7208. null !== request.completedPreambleSegments)
  7209. ) {
  7210. var nextSegmentId = request.nextSegmentId;
  7211. var replaySlots = trackedPostpones.rootSlots;
  7212. var resumableState = request.resumableState;
  7213. resumableState.bootstrapScriptContent = void 0;
  7214. resumableState.bootstrapScripts = void 0;
  7215. resumableState.bootstrapModules = void 0;
  7216. } else {
  7217. nextSegmentId = 0;
  7218. replaySlots = -1;
  7219. resumableState = request.resumableState;
  7220. var renderState = request.renderState;
  7221. resumableState.nextFormID = 0;
  7222. resumableState.hasBody = !1;
  7223. resumableState.hasHtml = !1;
  7224. resumableState.unknownResources = { font: renderState.resets.font };
  7225. resumableState.dnsResources = renderState.resets.dns;
  7226. resumableState.connectResources = renderState.resets.connect;
  7227. resumableState.imageResources = renderState.resets.image;
  7228. resumableState.styleResources = renderState.resets.style;
  7229. resumableState.scriptResources = {};
  7230. resumableState.moduleUnknownResources = {};
  7231. resumableState.moduleScriptResources = {};
  7232. resumableState.instructions = 0;
  7233. }
  7234. return {
  7235. nextSegmentId: nextSegmentId,
  7236. rootFormatContext: request.rootFormatContext,
  7237. progressiveChunkSize: request.progressiveChunkSize,
  7238. resumableState: request.resumableState,
  7239. replayNodes: trackedPostpones.rootNodes,
  7240. replaySlots: replaySlots
  7241. };
  7242. }
  7243. function ensureCorrectIsomorphicReactVersion() {
  7244. var isomorphicReactPackageVersion = React.version;
  7245. if ("19.2.4" !== isomorphicReactPackageVersion)
  7246. throw Error(
  7247. 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
  7248. (isomorphicReactPackageVersion +
  7249. "\n - react-dom: 19.2.4\nLearn more: https://react.dev/warnings/version-mismatch")
  7250. );
  7251. }
  7252. ensureCorrectIsomorphicReactVersion();
  7253. ensureCorrectIsomorphicReactVersion();
  7254. exports.prerender = function (children, options) {
  7255. return new Promise(function (resolve, reject) {
  7256. var onHeaders = options ? options.onHeaders : void 0,
  7257. onHeadersImpl;
  7258. onHeaders &&
  7259. (onHeadersImpl = function (headersDescriptor) {
  7260. onHeaders(new Headers(headersDescriptor));
  7261. });
  7262. var resources = createResumableState(
  7263. options ? options.identifierPrefix : void 0,
  7264. options ? options.unstable_externalRuntimeSrc : void 0,
  7265. options ? options.bootstrapScriptContent : void 0,
  7266. options ? options.bootstrapScripts : void 0,
  7267. options ? options.bootstrapModules : void 0
  7268. ),
  7269. request = createPrerenderRequest(
  7270. children,
  7271. resources,
  7272. createRenderState(
  7273. resources,
  7274. void 0,
  7275. options ? options.unstable_externalRuntimeSrc : void 0,
  7276. options ? options.importMap : void 0,
  7277. onHeadersImpl,
  7278. options ? options.maxHeadersLength : void 0
  7279. ),
  7280. createRootFormatContext(options ? options.namespaceURI : void 0),
  7281. options ? options.progressiveChunkSize : void 0,
  7282. options ? options.onError : void 0,
  7283. function () {
  7284. var stream = new ReadableStream(
  7285. {
  7286. type: "bytes",
  7287. pull: function (controller) {
  7288. startFlowing(request, controller);
  7289. },
  7290. cancel: function (reason) {
  7291. request.destination = null;
  7292. abort(request, reason);
  7293. }
  7294. },
  7295. { highWaterMark: 0 }
  7296. );
  7297. stream = { postponed: getPostponedState(request), prelude: stream };
  7298. resolve(stream);
  7299. },
  7300. void 0,
  7301. void 0,
  7302. reject,
  7303. options ? options.onPostpone : void 0
  7304. );
  7305. if (options && options.signal) {
  7306. var signal = options.signal;
  7307. if (signal.aborted) abort(request, signal.reason);
  7308. else {
  7309. var listener = function () {
  7310. abort(request, signal.reason);
  7311. signal.removeEventListener("abort", listener);
  7312. };
  7313. signal.addEventListener("abort", listener);
  7314. }
  7315. }
  7316. startWork(request);
  7317. });
  7318. };
  7319. exports.renderToReadableStream = function (children, options) {
  7320. return new Promise(function (resolve, reject) {
  7321. var onFatalError,
  7322. onAllReady,
  7323. allReady = new Promise(function (res, rej) {
  7324. onAllReady = res;
  7325. onFatalError = rej;
  7326. }),
  7327. onHeaders = options ? options.onHeaders : void 0,
  7328. onHeadersImpl;
  7329. onHeaders &&
  7330. (onHeadersImpl = function (headersDescriptor) {
  7331. onHeaders(new Headers(headersDescriptor));
  7332. });
  7333. var resumableState = createResumableState(
  7334. options ? options.identifierPrefix : void 0,
  7335. options ? options.unstable_externalRuntimeSrc : void 0,
  7336. options ? options.bootstrapScriptContent : void 0,
  7337. options ? options.bootstrapScripts : void 0,
  7338. options ? options.bootstrapModules : void 0
  7339. ),
  7340. request = createRequest(
  7341. children,
  7342. resumableState,
  7343. createRenderState(
  7344. resumableState,
  7345. options ? options.nonce : void 0,
  7346. options ? options.unstable_externalRuntimeSrc : void 0,
  7347. options ? options.importMap : void 0,
  7348. onHeadersImpl,
  7349. options ? options.maxHeadersLength : void 0
  7350. ),
  7351. createRootFormatContext(options ? options.namespaceURI : void 0),
  7352. options ? options.progressiveChunkSize : void 0,
  7353. options ? options.onError : void 0,
  7354. onAllReady,
  7355. function () {
  7356. var stream = new ReadableStream(
  7357. {
  7358. type: "bytes",
  7359. pull: function (controller) {
  7360. startFlowing(request, controller);
  7361. },
  7362. cancel: function (reason) {
  7363. request.destination = null;
  7364. abort(request, reason);
  7365. }
  7366. },
  7367. { highWaterMark: 0 }
  7368. );
  7369. stream.allReady = allReady;
  7370. resolve(stream);
  7371. },
  7372. function (error) {
  7373. allReady.catch(function () {});
  7374. reject(error);
  7375. },
  7376. onFatalError,
  7377. options ? options.onPostpone : void 0,
  7378. options ? options.formState : void 0
  7379. );
  7380. if (options && options.signal) {
  7381. var signal = options.signal;
  7382. if (signal.aborted) abort(request, signal.reason);
  7383. else {
  7384. var listener = function () {
  7385. abort(request, signal.reason);
  7386. signal.removeEventListener("abort", listener);
  7387. };
  7388. signal.addEventListener("abort", listener);
  7389. }
  7390. }
  7391. startWork(request);
  7392. });
  7393. };
  7394. exports.resume = function (children, postponedState, options) {
  7395. return new Promise(function (resolve, reject) {
  7396. var onFatalError,
  7397. onAllReady,
  7398. allReady = new Promise(function (res, rej) {
  7399. onAllReady = res;
  7400. onFatalError = rej;
  7401. }),
  7402. request = resumeRequest(
  7403. children,
  7404. postponedState,
  7405. createRenderState(
  7406. postponedState.resumableState,
  7407. options ? options.nonce : void 0,
  7408. void 0,
  7409. void 0,
  7410. void 0,
  7411. void 0
  7412. ),
  7413. options ? options.onError : void 0,
  7414. onAllReady,
  7415. function () {
  7416. var stream = new ReadableStream(
  7417. {
  7418. type: "bytes",
  7419. pull: function (controller) {
  7420. startFlowing(request, controller);
  7421. },
  7422. cancel: function (reason) {
  7423. request.destination = null;
  7424. abort(request, reason);
  7425. }
  7426. },
  7427. { highWaterMark: 0 }
  7428. );
  7429. stream.allReady = allReady;
  7430. resolve(stream);
  7431. },
  7432. function (error) {
  7433. allReady.catch(function () {});
  7434. reject(error);
  7435. },
  7436. onFatalError,
  7437. options ? options.onPostpone : void 0
  7438. );
  7439. if (options && options.signal) {
  7440. var signal = options.signal;
  7441. if (signal.aborted) abort(request, signal.reason);
  7442. else {
  7443. var listener = function () {
  7444. abort(request, signal.reason);
  7445. signal.removeEventListener("abort", listener);
  7446. };
  7447. signal.addEventListener("abort", listener);
  7448. }
  7449. }
  7450. startWork(request);
  7451. });
  7452. };
  7453. exports.resumeAndPrerender = function (children, postponedState, options) {
  7454. return new Promise(function (resolve, reject) {
  7455. var request = resumeAndPrerenderRequest(
  7456. children,
  7457. postponedState,
  7458. createRenderState(
  7459. postponedState.resumableState,
  7460. void 0,
  7461. void 0,
  7462. void 0,
  7463. void 0,
  7464. void 0
  7465. ),
  7466. options ? options.onError : void 0,
  7467. function () {
  7468. var stream = new ReadableStream(
  7469. {
  7470. type: "bytes",
  7471. pull: function (controller) {
  7472. startFlowing(request, controller);
  7473. },
  7474. cancel: function (reason) {
  7475. request.destination = null;
  7476. abort(request, reason);
  7477. }
  7478. },
  7479. { highWaterMark: 0 }
  7480. );
  7481. stream = { postponed: getPostponedState(request), prelude: stream };
  7482. resolve(stream);
  7483. },
  7484. void 0,
  7485. void 0,
  7486. reject,
  7487. options ? options.onPostpone : void 0
  7488. );
  7489. if (options && options.signal) {
  7490. var signal = options.signal;
  7491. if (signal.aborted) abort(request, signal.reason);
  7492. else {
  7493. var listener = function () {
  7494. abort(request, signal.reason);
  7495. signal.removeEventListener("abort", listener);
  7496. };
  7497. signal.addEventListener("abort", listener);
  7498. }
  7499. }
  7500. startWork(request);
  7501. });
  7502. };
  7503. exports.version = "19.2.4";