chunk-GFV24RRW.js 366 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682
  1. var __create = Object.create;
  2. var __defProp = Object.defineProperty;
  3. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  4. var __getOwnPropNames = Object.getOwnPropertyNames;
  5. var __getProtoOf = Object.getPrototypeOf;
  6. var __hasOwnProp = Object.prototype.hasOwnProperty;
  7. var __commonJS = (cb, mod) => function __require() {
  8. return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  9. };
  10. var __copyProps = (to, from, except, desc) => {
  11. if (from && typeof from === "object" || typeof from === "function") {
  12. for (let key of __getOwnPropNames(from))
  13. if (!__hasOwnProp.call(to, key) && key !== except)
  14. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  15. }
  16. return to;
  17. };
  18. var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  19. // If the importer is in node compatibility mode or this is not an ESM
  20. // file that has been converted to a CommonJS file using a Babel-
  21. // compatible transform (i.e. "__esModule" has not been set), then set
  22. // "default" to the CommonJS "module.exports" for node compatibility.
  23. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  24. mod
  25. ));
  26. // node_modules/@vue/shared/dist/shared.esm-bundler.js
  27. function makeMap(str) {
  28. const map2 = /* @__PURE__ */ Object.create(null);
  29. for (const key of str.split(",")) map2[key] = 1;
  30. return (val) => val in map2;
  31. }
  32. var EMPTY_OBJ = true ? Object.freeze({}) : {};
  33. var EMPTY_ARR = true ? Object.freeze([]) : [];
  34. var NOOP = () => {
  35. };
  36. var NO = () => false;
  37. var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
  38. (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
  39. var isModelListener = (key) => key.startsWith("onUpdate:");
  40. var extend = Object.assign;
  41. var remove = (arr, el) => {
  42. const i = arr.indexOf(el);
  43. if (i > -1) {
  44. arr.splice(i, 1);
  45. }
  46. };
  47. var hasOwnProperty = Object.prototype.hasOwnProperty;
  48. var hasOwn = (val, key) => hasOwnProperty.call(val, key);
  49. var isArray = Array.isArray;
  50. var isMap = (val) => toTypeString(val) === "[object Map]";
  51. var isSet = (val) => toTypeString(val) === "[object Set]";
  52. var isDate = (val) => toTypeString(val) === "[object Date]";
  53. var isRegExp = (val) => toTypeString(val) === "[object RegExp]";
  54. var isFunction = (val) => typeof val === "function";
  55. var isString = (val) => typeof val === "string";
  56. var isSymbol = (val) => typeof val === "symbol";
  57. var isObject = (val) => val !== null && typeof val === "object";
  58. var isPromise = (val) => {
  59. return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
  60. };
  61. var objectToString = Object.prototype.toString;
  62. var toTypeString = (value) => objectToString.call(value);
  63. var toRawType = (value) => {
  64. return toTypeString(value).slice(8, -1);
  65. };
  66. var isPlainObject = (val) => toTypeString(val) === "[object Object]";
  67. var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
  68. var isReservedProp = makeMap(
  69. // the leading comma is intentional so empty string "" is also included
  70. ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
  71. );
  72. var isBuiltInDirective = makeMap(
  73. "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
  74. );
  75. var cacheStringFunction = (fn) => {
  76. const cache = /* @__PURE__ */ Object.create(null);
  77. return (str) => {
  78. const hit = cache[str];
  79. return hit || (cache[str] = fn(str));
  80. };
  81. };
  82. var camelizeRE = /-(\w)/g;
  83. var camelize = cacheStringFunction(
  84. (str) => {
  85. return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
  86. }
  87. );
  88. var hyphenateRE = /\B([A-Z])/g;
  89. var hyphenate = cacheStringFunction(
  90. (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
  91. );
  92. var capitalize = cacheStringFunction((str) => {
  93. return str.charAt(0).toUpperCase() + str.slice(1);
  94. });
  95. var toHandlerKey = cacheStringFunction(
  96. (str) => {
  97. const s = str ? `on${capitalize(str)}` : ``;
  98. return s;
  99. }
  100. );
  101. var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  102. var invokeArrayFns = (fns, ...arg) => {
  103. for (let i = 0; i < fns.length; i++) {
  104. fns[i](...arg);
  105. }
  106. };
  107. var def = (obj, key, value, writable = false) => {
  108. Object.defineProperty(obj, key, {
  109. configurable: true,
  110. enumerable: false,
  111. writable,
  112. value
  113. });
  114. };
  115. var looseToNumber = (val) => {
  116. const n = parseFloat(val);
  117. return isNaN(n) ? val : n;
  118. };
  119. var toNumber = (val) => {
  120. const n = isString(val) ? Number(val) : NaN;
  121. return isNaN(n) ? val : n;
  122. };
  123. var _globalThis;
  124. var getGlobalThis = () => {
  125. return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
  126. };
  127. var GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol";
  128. var isGloballyAllowed = makeMap(GLOBALS_ALLOWED);
  129. function normalizeStyle(value) {
  130. if (isArray(value)) {
  131. const res = {};
  132. for (let i = 0; i < value.length; i++) {
  133. const item = value[i];
  134. const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
  135. if (normalized) {
  136. for (const key in normalized) {
  137. res[key] = normalized[key];
  138. }
  139. }
  140. }
  141. return res;
  142. } else if (isString(value) || isObject(value)) {
  143. return value;
  144. }
  145. }
  146. var listDelimiterRE = /;(?![^(]*\))/g;
  147. var propertyDelimiterRE = /:([^]+)/;
  148. var styleCommentRE = /\/\*[^]*?\*\//g;
  149. function parseStringStyle(cssText) {
  150. const ret = {};
  151. cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
  152. if (item) {
  153. const tmp = item.split(propertyDelimiterRE);
  154. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  155. }
  156. });
  157. return ret;
  158. }
  159. function stringifyStyle(styles) {
  160. if (!styles) return "";
  161. if (isString(styles)) return styles;
  162. let ret = "";
  163. for (const key in styles) {
  164. const value = styles[key];
  165. if (isString(value) || typeof value === "number") {
  166. const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
  167. ret += `${normalizedKey}:${value};`;
  168. }
  169. }
  170. return ret;
  171. }
  172. function normalizeClass(value) {
  173. let res = "";
  174. if (isString(value)) {
  175. res = value;
  176. } else if (isArray(value)) {
  177. for (let i = 0; i < value.length; i++) {
  178. const normalized = normalizeClass(value[i]);
  179. if (normalized) {
  180. res += normalized + " ";
  181. }
  182. }
  183. } else if (isObject(value)) {
  184. for (const name in value) {
  185. if (value[name]) {
  186. res += name + " ";
  187. }
  188. }
  189. }
  190. return res.trim();
  191. }
  192. function normalizeProps(props) {
  193. if (!props) return null;
  194. let { class: klass, style } = props;
  195. if (klass && !isString(klass)) {
  196. props.class = normalizeClass(klass);
  197. }
  198. if (style) {
  199. props.style = normalizeStyle(style);
  200. }
  201. return props;
  202. }
  203. var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
  204. var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
  205. var MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
  206. var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
  207. var isHTMLTag = makeMap(HTML_TAGS);
  208. var isSVGTag = makeMap(SVG_TAGS);
  209. var isMathMLTag = makeMap(MATH_TAGS);
  210. var isVoidTag = makeMap(VOID_TAGS);
  211. var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
  212. var isSpecialBooleanAttr = makeMap(specialBooleanAttrs);
  213. var isBooleanAttr = makeMap(
  214. specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
  215. );
  216. function includeBooleanAttr(value) {
  217. return !!value || value === "";
  218. }
  219. var isKnownHtmlAttr = makeMap(
  220. `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`
  221. );
  222. var isKnownSvgAttr = makeMap(
  223. `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
  224. );
  225. var isKnownMathMLAttr = makeMap(
  226. `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`
  227. );
  228. function isRenderableAttrValue(value) {
  229. if (value == null) {
  230. return false;
  231. }
  232. const type = typeof value;
  233. return type === "string" || type === "number" || type === "boolean";
  234. }
  235. var cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
  236. function getEscapedCssVarName(key, doubleEscape) {
  237. return key.replace(
  238. cssVarNameEscapeSymbolsRE,
  239. (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}`
  240. );
  241. }
  242. function looseCompareArrays(a, b) {
  243. if (a.length !== b.length) return false;
  244. let equal = true;
  245. for (let i = 0; equal && i < a.length; i++) {
  246. equal = looseEqual(a[i], b[i]);
  247. }
  248. return equal;
  249. }
  250. function looseEqual(a, b) {
  251. if (a === b) return true;
  252. let aValidType = isDate(a);
  253. let bValidType = isDate(b);
  254. if (aValidType || bValidType) {
  255. return aValidType && bValidType ? a.getTime() === b.getTime() : false;
  256. }
  257. aValidType = isSymbol(a);
  258. bValidType = isSymbol(b);
  259. if (aValidType || bValidType) {
  260. return a === b;
  261. }
  262. aValidType = isArray(a);
  263. bValidType = isArray(b);
  264. if (aValidType || bValidType) {
  265. return aValidType && bValidType ? looseCompareArrays(a, b) : false;
  266. }
  267. aValidType = isObject(a);
  268. bValidType = isObject(b);
  269. if (aValidType || bValidType) {
  270. if (!aValidType || !bValidType) {
  271. return false;
  272. }
  273. const aKeysCount = Object.keys(a).length;
  274. const bKeysCount = Object.keys(b).length;
  275. if (aKeysCount !== bKeysCount) {
  276. return false;
  277. }
  278. for (const key in a) {
  279. const aHasKey = a.hasOwnProperty(key);
  280. const bHasKey = b.hasOwnProperty(key);
  281. if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
  282. return false;
  283. }
  284. }
  285. }
  286. return String(a) === String(b);
  287. }
  288. function looseIndexOf(arr, val) {
  289. return arr.findIndex((item) => looseEqual(item, val));
  290. }
  291. var isRef = (val) => {
  292. return !!(val && val["__v_isRef"] === true);
  293. };
  294. var toDisplayString = (val) => {
  295. return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
  296. };
  297. var replacer = (_key, val) => {
  298. if (isRef(val)) {
  299. return replacer(_key, val.value);
  300. } else if (isMap(val)) {
  301. return {
  302. [`Map(${val.size})`]: [...val.entries()].reduce(
  303. (entries, [key, val2], i) => {
  304. entries[stringifySymbol(key, i) + " =>"] = val2;
  305. return entries;
  306. },
  307. {}
  308. )
  309. };
  310. } else if (isSet(val)) {
  311. return {
  312. [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
  313. };
  314. } else if (isSymbol(val)) {
  315. return stringifySymbol(val);
  316. } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
  317. return String(val);
  318. }
  319. return val;
  320. };
  321. var stringifySymbol = (v, i = "") => {
  322. var _a;
  323. return (
  324. // Symbol.description in es2019+ so we need to cast here to pass
  325. // the lib: es2016 check
  326. isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
  327. );
  328. };
  329. function normalizeCssVarValue(value) {
  330. if (value == null) {
  331. return "initial";
  332. }
  333. if (typeof value === "string") {
  334. return value === "" ? " " : value;
  335. }
  336. if (typeof value !== "number" || !Number.isFinite(value)) {
  337. if (true) {
  338. console.warn(
  339. "[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
  340. value
  341. );
  342. }
  343. }
  344. return String(value);
  345. }
  346. // node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
  347. function warn(msg, ...args) {
  348. console.warn(`[Vue warn] ${msg}`, ...args);
  349. }
  350. var activeEffectScope;
  351. var EffectScope = class {
  352. constructor(detached = false) {
  353. this.detached = detached;
  354. this._active = true;
  355. this._on = 0;
  356. this.effects = [];
  357. this.cleanups = [];
  358. this._isPaused = false;
  359. this.parent = activeEffectScope;
  360. if (!detached && activeEffectScope) {
  361. this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
  362. this
  363. ) - 1;
  364. }
  365. }
  366. get active() {
  367. return this._active;
  368. }
  369. pause() {
  370. if (this._active) {
  371. this._isPaused = true;
  372. let i, l;
  373. if (this.scopes) {
  374. for (i = 0, l = this.scopes.length; i < l; i++) {
  375. this.scopes[i].pause();
  376. }
  377. }
  378. for (i = 0, l = this.effects.length; i < l; i++) {
  379. this.effects[i].pause();
  380. }
  381. }
  382. }
  383. /**
  384. * Resumes the effect scope, including all child scopes and effects.
  385. */
  386. resume() {
  387. if (this._active) {
  388. if (this._isPaused) {
  389. this._isPaused = false;
  390. let i, l;
  391. if (this.scopes) {
  392. for (i = 0, l = this.scopes.length; i < l; i++) {
  393. this.scopes[i].resume();
  394. }
  395. }
  396. for (i = 0, l = this.effects.length; i < l; i++) {
  397. this.effects[i].resume();
  398. }
  399. }
  400. }
  401. }
  402. run(fn) {
  403. if (this._active) {
  404. const currentEffectScope = activeEffectScope;
  405. try {
  406. activeEffectScope = this;
  407. return fn();
  408. } finally {
  409. activeEffectScope = currentEffectScope;
  410. }
  411. } else if (true) {
  412. warn(`cannot run an inactive effect scope.`);
  413. }
  414. }
  415. /**
  416. * This should only be called on non-detached scopes
  417. * @internal
  418. */
  419. on() {
  420. if (++this._on === 1) {
  421. this.prevScope = activeEffectScope;
  422. activeEffectScope = this;
  423. }
  424. }
  425. /**
  426. * This should only be called on non-detached scopes
  427. * @internal
  428. */
  429. off() {
  430. if (this._on > 0 && --this._on === 0) {
  431. activeEffectScope = this.prevScope;
  432. this.prevScope = void 0;
  433. }
  434. }
  435. stop(fromParent) {
  436. if (this._active) {
  437. this._active = false;
  438. let i, l;
  439. for (i = 0, l = this.effects.length; i < l; i++) {
  440. this.effects[i].stop();
  441. }
  442. this.effects.length = 0;
  443. for (i = 0, l = this.cleanups.length; i < l; i++) {
  444. this.cleanups[i]();
  445. }
  446. this.cleanups.length = 0;
  447. if (this.scopes) {
  448. for (i = 0, l = this.scopes.length; i < l; i++) {
  449. this.scopes[i].stop(true);
  450. }
  451. this.scopes.length = 0;
  452. }
  453. if (!this.detached && this.parent && !fromParent) {
  454. const last = this.parent.scopes.pop();
  455. if (last && last !== this) {
  456. this.parent.scopes[this.index] = last;
  457. last.index = this.index;
  458. }
  459. }
  460. this.parent = void 0;
  461. }
  462. }
  463. };
  464. function effectScope(detached) {
  465. return new EffectScope(detached);
  466. }
  467. function getCurrentScope() {
  468. return activeEffectScope;
  469. }
  470. function onScopeDispose(fn, failSilently = false) {
  471. if (activeEffectScope) {
  472. activeEffectScope.cleanups.push(fn);
  473. } else if (!failSilently) {
  474. warn(
  475. `onScopeDispose() is called when there is no active effect scope to be associated with.`
  476. );
  477. }
  478. }
  479. var activeSub;
  480. var pausedQueueEffects = /* @__PURE__ */ new WeakSet();
  481. var ReactiveEffect = class {
  482. constructor(fn) {
  483. this.fn = fn;
  484. this.deps = void 0;
  485. this.depsTail = void 0;
  486. this.flags = 1 | 4;
  487. this.next = void 0;
  488. this.cleanup = void 0;
  489. this.scheduler = void 0;
  490. if (activeEffectScope && activeEffectScope.active) {
  491. activeEffectScope.effects.push(this);
  492. }
  493. }
  494. pause() {
  495. this.flags |= 64;
  496. }
  497. resume() {
  498. if (this.flags & 64) {
  499. this.flags &= -65;
  500. if (pausedQueueEffects.has(this)) {
  501. pausedQueueEffects.delete(this);
  502. this.trigger();
  503. }
  504. }
  505. }
  506. /**
  507. * @internal
  508. */
  509. notify() {
  510. if (this.flags & 2 && !(this.flags & 32)) {
  511. return;
  512. }
  513. if (!(this.flags & 8)) {
  514. batch(this);
  515. }
  516. }
  517. run() {
  518. if (!(this.flags & 1)) {
  519. return this.fn();
  520. }
  521. this.flags |= 2;
  522. cleanupEffect(this);
  523. prepareDeps(this);
  524. const prevEffect = activeSub;
  525. const prevShouldTrack = shouldTrack;
  526. activeSub = this;
  527. shouldTrack = true;
  528. try {
  529. return this.fn();
  530. } finally {
  531. if (activeSub !== this) {
  532. warn(
  533. "Active effect was not restored correctly - this is likely a Vue internal bug."
  534. );
  535. }
  536. cleanupDeps(this);
  537. activeSub = prevEffect;
  538. shouldTrack = prevShouldTrack;
  539. this.flags &= -3;
  540. }
  541. }
  542. stop() {
  543. if (this.flags & 1) {
  544. for (let link = this.deps; link; link = link.nextDep) {
  545. removeSub(link);
  546. }
  547. this.deps = this.depsTail = void 0;
  548. cleanupEffect(this);
  549. this.onStop && this.onStop();
  550. this.flags &= -2;
  551. }
  552. }
  553. trigger() {
  554. if (this.flags & 64) {
  555. pausedQueueEffects.add(this);
  556. } else if (this.scheduler) {
  557. this.scheduler();
  558. } else {
  559. this.runIfDirty();
  560. }
  561. }
  562. /**
  563. * @internal
  564. */
  565. runIfDirty() {
  566. if (isDirty(this)) {
  567. this.run();
  568. }
  569. }
  570. get dirty() {
  571. return isDirty(this);
  572. }
  573. };
  574. var batchDepth = 0;
  575. var batchedSub;
  576. var batchedComputed;
  577. function batch(sub, isComputed = false) {
  578. sub.flags |= 8;
  579. if (isComputed) {
  580. sub.next = batchedComputed;
  581. batchedComputed = sub;
  582. return;
  583. }
  584. sub.next = batchedSub;
  585. batchedSub = sub;
  586. }
  587. function startBatch() {
  588. batchDepth++;
  589. }
  590. function endBatch() {
  591. if (--batchDepth > 0) {
  592. return;
  593. }
  594. if (batchedComputed) {
  595. let e = batchedComputed;
  596. batchedComputed = void 0;
  597. while (e) {
  598. const next = e.next;
  599. e.next = void 0;
  600. e.flags &= -9;
  601. e = next;
  602. }
  603. }
  604. let error;
  605. while (batchedSub) {
  606. let e = batchedSub;
  607. batchedSub = void 0;
  608. while (e) {
  609. const next = e.next;
  610. e.next = void 0;
  611. e.flags &= -9;
  612. if (e.flags & 1) {
  613. try {
  614. ;
  615. e.trigger();
  616. } catch (err) {
  617. if (!error) error = err;
  618. }
  619. }
  620. e = next;
  621. }
  622. }
  623. if (error) throw error;
  624. }
  625. function prepareDeps(sub) {
  626. for (let link = sub.deps; link; link = link.nextDep) {
  627. link.version = -1;
  628. link.prevActiveLink = link.dep.activeLink;
  629. link.dep.activeLink = link;
  630. }
  631. }
  632. function cleanupDeps(sub) {
  633. let head;
  634. let tail = sub.depsTail;
  635. let link = tail;
  636. while (link) {
  637. const prev = link.prevDep;
  638. if (link.version === -1) {
  639. if (link === tail) tail = prev;
  640. removeSub(link);
  641. removeDep(link);
  642. } else {
  643. head = link;
  644. }
  645. link.dep.activeLink = link.prevActiveLink;
  646. link.prevActiveLink = void 0;
  647. link = prev;
  648. }
  649. sub.deps = head;
  650. sub.depsTail = tail;
  651. }
  652. function isDirty(sub) {
  653. for (let link = sub.deps; link; link = link.nextDep) {
  654. if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
  655. return true;
  656. }
  657. }
  658. if (sub._dirty) {
  659. return true;
  660. }
  661. return false;
  662. }
  663. function refreshComputed(computed3) {
  664. if (computed3.flags & 4 && !(computed3.flags & 16)) {
  665. return;
  666. }
  667. computed3.flags &= -17;
  668. if (computed3.globalVersion === globalVersion) {
  669. return;
  670. }
  671. computed3.globalVersion = globalVersion;
  672. if (!computed3.isSSR && computed3.flags & 128 && (!computed3.deps && !computed3._dirty || !isDirty(computed3))) {
  673. return;
  674. }
  675. computed3.flags |= 2;
  676. const dep = computed3.dep;
  677. const prevSub = activeSub;
  678. const prevShouldTrack = shouldTrack;
  679. activeSub = computed3;
  680. shouldTrack = true;
  681. try {
  682. prepareDeps(computed3);
  683. const value = computed3.fn(computed3._value);
  684. if (dep.version === 0 || hasChanged(value, computed3._value)) {
  685. computed3.flags |= 128;
  686. computed3._value = value;
  687. dep.version++;
  688. }
  689. } catch (err) {
  690. dep.version++;
  691. throw err;
  692. } finally {
  693. activeSub = prevSub;
  694. shouldTrack = prevShouldTrack;
  695. cleanupDeps(computed3);
  696. computed3.flags &= -3;
  697. }
  698. }
  699. function removeSub(link, soft = false) {
  700. const { dep, prevSub, nextSub } = link;
  701. if (prevSub) {
  702. prevSub.nextSub = nextSub;
  703. link.prevSub = void 0;
  704. }
  705. if (nextSub) {
  706. nextSub.prevSub = prevSub;
  707. link.nextSub = void 0;
  708. }
  709. if (dep.subsHead === link) {
  710. dep.subsHead = nextSub;
  711. }
  712. if (dep.subs === link) {
  713. dep.subs = prevSub;
  714. if (!prevSub && dep.computed) {
  715. dep.computed.flags &= -5;
  716. for (let l = dep.computed.deps; l; l = l.nextDep) {
  717. removeSub(l, true);
  718. }
  719. }
  720. }
  721. if (!soft && !--dep.sc && dep.map) {
  722. dep.map.delete(dep.key);
  723. }
  724. }
  725. function removeDep(link) {
  726. const { prevDep, nextDep } = link;
  727. if (prevDep) {
  728. prevDep.nextDep = nextDep;
  729. link.prevDep = void 0;
  730. }
  731. if (nextDep) {
  732. nextDep.prevDep = prevDep;
  733. link.nextDep = void 0;
  734. }
  735. }
  736. function effect(fn, options) {
  737. if (fn.effect instanceof ReactiveEffect) {
  738. fn = fn.effect.fn;
  739. }
  740. const e = new ReactiveEffect(fn);
  741. if (options) {
  742. extend(e, options);
  743. }
  744. try {
  745. e.run();
  746. } catch (err) {
  747. e.stop();
  748. throw err;
  749. }
  750. const runner = e.run.bind(e);
  751. runner.effect = e;
  752. return runner;
  753. }
  754. function stop(runner) {
  755. runner.effect.stop();
  756. }
  757. var shouldTrack = true;
  758. var trackStack = [];
  759. function pauseTracking() {
  760. trackStack.push(shouldTrack);
  761. shouldTrack = false;
  762. }
  763. function resetTracking() {
  764. const last = trackStack.pop();
  765. shouldTrack = last === void 0 ? true : last;
  766. }
  767. function cleanupEffect(e) {
  768. const { cleanup } = e;
  769. e.cleanup = void 0;
  770. if (cleanup) {
  771. const prevSub = activeSub;
  772. activeSub = void 0;
  773. try {
  774. cleanup();
  775. } finally {
  776. activeSub = prevSub;
  777. }
  778. }
  779. }
  780. var globalVersion = 0;
  781. var Link = class {
  782. constructor(sub, dep) {
  783. this.sub = sub;
  784. this.dep = dep;
  785. this.version = dep.version;
  786. this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
  787. }
  788. };
  789. var Dep = class {
  790. // TODO isolatedDeclarations "__v_skip"
  791. constructor(computed3) {
  792. this.computed = computed3;
  793. this.version = 0;
  794. this.activeLink = void 0;
  795. this.subs = void 0;
  796. this.map = void 0;
  797. this.key = void 0;
  798. this.sc = 0;
  799. this.__v_skip = true;
  800. if (true) {
  801. this.subsHead = void 0;
  802. }
  803. }
  804. track(debugInfo) {
  805. if (!activeSub || !shouldTrack || activeSub === this.computed) {
  806. return;
  807. }
  808. let link = this.activeLink;
  809. if (link === void 0 || link.sub !== activeSub) {
  810. link = this.activeLink = new Link(activeSub, this);
  811. if (!activeSub.deps) {
  812. activeSub.deps = activeSub.depsTail = link;
  813. } else {
  814. link.prevDep = activeSub.depsTail;
  815. activeSub.depsTail.nextDep = link;
  816. activeSub.depsTail = link;
  817. }
  818. addSub(link);
  819. } else if (link.version === -1) {
  820. link.version = this.version;
  821. if (link.nextDep) {
  822. const next = link.nextDep;
  823. next.prevDep = link.prevDep;
  824. if (link.prevDep) {
  825. link.prevDep.nextDep = next;
  826. }
  827. link.prevDep = activeSub.depsTail;
  828. link.nextDep = void 0;
  829. activeSub.depsTail.nextDep = link;
  830. activeSub.depsTail = link;
  831. if (activeSub.deps === link) {
  832. activeSub.deps = next;
  833. }
  834. }
  835. }
  836. if (activeSub.onTrack) {
  837. activeSub.onTrack(
  838. extend(
  839. {
  840. effect: activeSub
  841. },
  842. debugInfo
  843. )
  844. );
  845. }
  846. return link;
  847. }
  848. trigger(debugInfo) {
  849. this.version++;
  850. globalVersion++;
  851. this.notify(debugInfo);
  852. }
  853. notify(debugInfo) {
  854. startBatch();
  855. try {
  856. if (true) {
  857. for (let head = this.subsHead; head; head = head.nextSub) {
  858. if (head.sub.onTrigger && !(head.sub.flags & 8)) {
  859. head.sub.onTrigger(
  860. extend(
  861. {
  862. effect: head.sub
  863. },
  864. debugInfo
  865. )
  866. );
  867. }
  868. }
  869. }
  870. for (let link = this.subs; link; link = link.prevSub) {
  871. if (link.sub.notify()) {
  872. ;
  873. link.sub.dep.notify();
  874. }
  875. }
  876. } finally {
  877. endBatch();
  878. }
  879. }
  880. };
  881. function addSub(link) {
  882. link.dep.sc++;
  883. if (link.sub.flags & 4) {
  884. const computed3 = link.dep.computed;
  885. if (computed3 && !link.dep.subs) {
  886. computed3.flags |= 4 | 16;
  887. for (let l = computed3.deps; l; l = l.nextDep) {
  888. addSub(l);
  889. }
  890. }
  891. const currentTail = link.dep.subs;
  892. if (currentTail !== link) {
  893. link.prevSub = currentTail;
  894. if (currentTail) currentTail.nextSub = link;
  895. }
  896. if (link.dep.subsHead === void 0) {
  897. link.dep.subsHead = link;
  898. }
  899. link.dep.subs = link;
  900. }
  901. }
  902. var targetMap = /* @__PURE__ */ new WeakMap();
  903. var ITERATE_KEY = Symbol(
  904. true ? "Object iterate" : ""
  905. );
  906. var MAP_KEY_ITERATE_KEY = Symbol(
  907. true ? "Map keys iterate" : ""
  908. );
  909. var ARRAY_ITERATE_KEY = Symbol(
  910. true ? "Array iterate" : ""
  911. );
  912. function track(target, type, key) {
  913. if (shouldTrack && activeSub) {
  914. let depsMap = targetMap.get(target);
  915. if (!depsMap) {
  916. targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
  917. }
  918. let dep = depsMap.get(key);
  919. if (!dep) {
  920. depsMap.set(key, dep = new Dep());
  921. dep.map = depsMap;
  922. dep.key = key;
  923. }
  924. if (true) {
  925. dep.track({
  926. target,
  927. type,
  928. key
  929. });
  930. } else {
  931. dep.track();
  932. }
  933. }
  934. }
  935. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  936. const depsMap = targetMap.get(target);
  937. if (!depsMap) {
  938. globalVersion++;
  939. return;
  940. }
  941. const run = (dep) => {
  942. if (dep) {
  943. if (true) {
  944. dep.trigger({
  945. target,
  946. type,
  947. key,
  948. newValue,
  949. oldValue,
  950. oldTarget
  951. });
  952. } else {
  953. dep.trigger();
  954. }
  955. }
  956. };
  957. startBatch();
  958. if (type === "clear") {
  959. depsMap.forEach(run);
  960. } else {
  961. const targetIsArray = isArray(target);
  962. const isArrayIndex = targetIsArray && isIntegerKey(key);
  963. if (targetIsArray && key === "length") {
  964. const newLength = Number(newValue);
  965. depsMap.forEach((dep, key2) => {
  966. if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
  967. run(dep);
  968. }
  969. });
  970. } else {
  971. if (key !== void 0 || depsMap.has(void 0)) {
  972. run(depsMap.get(key));
  973. }
  974. if (isArrayIndex) {
  975. run(depsMap.get(ARRAY_ITERATE_KEY));
  976. }
  977. switch (type) {
  978. case "add":
  979. if (!targetIsArray) {
  980. run(depsMap.get(ITERATE_KEY));
  981. if (isMap(target)) {
  982. run(depsMap.get(MAP_KEY_ITERATE_KEY));
  983. }
  984. } else if (isArrayIndex) {
  985. run(depsMap.get("length"));
  986. }
  987. break;
  988. case "delete":
  989. if (!targetIsArray) {
  990. run(depsMap.get(ITERATE_KEY));
  991. if (isMap(target)) {
  992. run(depsMap.get(MAP_KEY_ITERATE_KEY));
  993. }
  994. }
  995. break;
  996. case "set":
  997. if (isMap(target)) {
  998. run(depsMap.get(ITERATE_KEY));
  999. }
  1000. break;
  1001. }
  1002. }
  1003. }
  1004. endBatch();
  1005. }
  1006. function getDepFromReactive(object, key) {
  1007. const depMap = targetMap.get(object);
  1008. return depMap && depMap.get(key);
  1009. }
  1010. function reactiveReadArray(array) {
  1011. const raw = toRaw(array);
  1012. if (raw === array) return raw;
  1013. track(raw, "iterate", ARRAY_ITERATE_KEY);
  1014. return isShallow(array) ? raw : raw.map(toReactive);
  1015. }
  1016. function shallowReadArray(arr) {
  1017. track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
  1018. return arr;
  1019. }
  1020. var arrayInstrumentations = {
  1021. __proto__: null,
  1022. [Symbol.iterator]() {
  1023. return iterator(this, Symbol.iterator, toReactive);
  1024. },
  1025. concat(...args) {
  1026. return reactiveReadArray(this).concat(
  1027. ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
  1028. );
  1029. },
  1030. entries() {
  1031. return iterator(this, "entries", (value) => {
  1032. value[1] = toReactive(value[1]);
  1033. return value;
  1034. });
  1035. },
  1036. every(fn, thisArg) {
  1037. return apply(this, "every", fn, thisArg, void 0, arguments);
  1038. },
  1039. filter(fn, thisArg) {
  1040. return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
  1041. },
  1042. find(fn, thisArg) {
  1043. return apply(this, "find", fn, thisArg, toReactive, arguments);
  1044. },
  1045. findIndex(fn, thisArg) {
  1046. return apply(this, "findIndex", fn, thisArg, void 0, arguments);
  1047. },
  1048. findLast(fn, thisArg) {
  1049. return apply(this, "findLast", fn, thisArg, toReactive, arguments);
  1050. },
  1051. findLastIndex(fn, thisArg) {
  1052. return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
  1053. },
  1054. // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
  1055. forEach(fn, thisArg) {
  1056. return apply(this, "forEach", fn, thisArg, void 0, arguments);
  1057. },
  1058. includes(...args) {
  1059. return searchProxy(this, "includes", args);
  1060. },
  1061. indexOf(...args) {
  1062. return searchProxy(this, "indexOf", args);
  1063. },
  1064. join(separator) {
  1065. return reactiveReadArray(this).join(separator);
  1066. },
  1067. // keys() iterator only reads `length`, no optimisation required
  1068. lastIndexOf(...args) {
  1069. return searchProxy(this, "lastIndexOf", args);
  1070. },
  1071. map(fn, thisArg) {
  1072. return apply(this, "map", fn, thisArg, void 0, arguments);
  1073. },
  1074. pop() {
  1075. return noTracking(this, "pop");
  1076. },
  1077. push(...args) {
  1078. return noTracking(this, "push", args);
  1079. },
  1080. reduce(fn, ...args) {
  1081. return reduce(this, "reduce", fn, args);
  1082. },
  1083. reduceRight(fn, ...args) {
  1084. return reduce(this, "reduceRight", fn, args);
  1085. },
  1086. shift() {
  1087. return noTracking(this, "shift");
  1088. },
  1089. // slice could use ARRAY_ITERATE but also seems to beg for range tracking
  1090. some(fn, thisArg) {
  1091. return apply(this, "some", fn, thisArg, void 0, arguments);
  1092. },
  1093. splice(...args) {
  1094. return noTracking(this, "splice", args);
  1095. },
  1096. toReversed() {
  1097. return reactiveReadArray(this).toReversed();
  1098. },
  1099. toSorted(comparer) {
  1100. return reactiveReadArray(this).toSorted(comparer);
  1101. },
  1102. toSpliced(...args) {
  1103. return reactiveReadArray(this).toSpliced(...args);
  1104. },
  1105. unshift(...args) {
  1106. return noTracking(this, "unshift", args);
  1107. },
  1108. values() {
  1109. return iterator(this, "values", toReactive);
  1110. }
  1111. };
  1112. function iterator(self2, method, wrapValue) {
  1113. const arr = shallowReadArray(self2);
  1114. const iter = arr[method]();
  1115. if (arr !== self2 && !isShallow(self2)) {
  1116. iter._next = iter.next;
  1117. iter.next = () => {
  1118. const result = iter._next();
  1119. if (result.value) {
  1120. result.value = wrapValue(result.value);
  1121. }
  1122. return result;
  1123. };
  1124. }
  1125. return iter;
  1126. }
  1127. var arrayProto = Array.prototype;
  1128. function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
  1129. const arr = shallowReadArray(self2);
  1130. const needsWrap = arr !== self2 && !isShallow(self2);
  1131. const methodFn = arr[method];
  1132. if (methodFn !== arrayProto[method]) {
  1133. const result2 = methodFn.apply(self2, args);
  1134. return needsWrap ? toReactive(result2) : result2;
  1135. }
  1136. let wrappedFn = fn;
  1137. if (arr !== self2) {
  1138. if (needsWrap) {
  1139. wrappedFn = function(item, index) {
  1140. return fn.call(this, toReactive(item), index, self2);
  1141. };
  1142. } else if (fn.length > 2) {
  1143. wrappedFn = function(item, index) {
  1144. return fn.call(this, item, index, self2);
  1145. };
  1146. }
  1147. }
  1148. const result = methodFn.call(arr, wrappedFn, thisArg);
  1149. return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
  1150. }
  1151. function reduce(self2, method, fn, args) {
  1152. const arr = shallowReadArray(self2);
  1153. let wrappedFn = fn;
  1154. if (arr !== self2) {
  1155. if (!isShallow(self2)) {
  1156. wrappedFn = function(acc, item, index) {
  1157. return fn.call(this, acc, toReactive(item), index, self2);
  1158. };
  1159. } else if (fn.length > 3) {
  1160. wrappedFn = function(acc, item, index) {
  1161. return fn.call(this, acc, item, index, self2);
  1162. };
  1163. }
  1164. }
  1165. return arr[method](wrappedFn, ...args);
  1166. }
  1167. function searchProxy(self2, method, args) {
  1168. const arr = toRaw(self2);
  1169. track(arr, "iterate", ARRAY_ITERATE_KEY);
  1170. const res = arr[method](...args);
  1171. if ((res === -1 || res === false) && isProxy(args[0])) {
  1172. args[0] = toRaw(args[0]);
  1173. return arr[method](...args);
  1174. }
  1175. return res;
  1176. }
  1177. function noTracking(self2, method, args = []) {
  1178. pauseTracking();
  1179. startBatch();
  1180. const res = toRaw(self2)[method].apply(self2, args);
  1181. endBatch();
  1182. resetTracking();
  1183. return res;
  1184. }
  1185. var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`);
  1186. var builtInSymbols = new Set(
  1187. Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
  1188. );
  1189. function hasOwnProperty2(key) {
  1190. if (!isSymbol(key)) key = String(key);
  1191. const obj = toRaw(this);
  1192. track(obj, "has", key);
  1193. return obj.hasOwnProperty(key);
  1194. }
  1195. var BaseReactiveHandler = class {
  1196. constructor(_isReadonly = false, _isShallow = false) {
  1197. this._isReadonly = _isReadonly;
  1198. this._isShallow = _isShallow;
  1199. }
  1200. get(target, key, receiver) {
  1201. if (key === "__v_skip") return target["__v_skip"];
  1202. const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
  1203. if (key === "__v_isReactive") {
  1204. return !isReadonly2;
  1205. } else if (key === "__v_isReadonly") {
  1206. return isReadonly2;
  1207. } else if (key === "__v_isShallow") {
  1208. return isShallow2;
  1209. } else if (key === "__v_raw") {
  1210. if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
  1211. // this means the receiver is a user proxy of the reactive proxy
  1212. Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
  1213. return target;
  1214. }
  1215. return;
  1216. }
  1217. const targetIsArray = isArray(target);
  1218. if (!isReadonly2) {
  1219. let fn;
  1220. if (targetIsArray && (fn = arrayInstrumentations[key])) {
  1221. return fn;
  1222. }
  1223. if (key === "hasOwnProperty") {
  1224. return hasOwnProperty2;
  1225. }
  1226. }
  1227. const res = Reflect.get(
  1228. target,
  1229. key,
  1230. // if this is a proxy wrapping a ref, return methods using the raw ref
  1231. // as receiver so that we don't have to call `toRaw` on the ref in all
  1232. // its class methods
  1233. isRef2(target) ? target : receiver
  1234. );
  1235. if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  1236. return res;
  1237. }
  1238. if (!isReadonly2) {
  1239. track(target, "get", key);
  1240. }
  1241. if (isShallow2) {
  1242. return res;
  1243. }
  1244. if (isRef2(res)) {
  1245. return targetIsArray && isIntegerKey(key) ? res : res.value;
  1246. }
  1247. if (isObject(res)) {
  1248. return isReadonly2 ? readonly(res) : reactive(res);
  1249. }
  1250. return res;
  1251. }
  1252. };
  1253. var MutableReactiveHandler = class extends BaseReactiveHandler {
  1254. constructor(isShallow2 = false) {
  1255. super(false, isShallow2);
  1256. }
  1257. set(target, key, value, receiver) {
  1258. let oldValue = target[key];
  1259. if (!this._isShallow) {
  1260. const isOldValueReadonly = isReadonly(oldValue);
  1261. if (!isShallow(value) && !isReadonly(value)) {
  1262. oldValue = toRaw(oldValue);
  1263. value = toRaw(value);
  1264. }
  1265. if (!isArray(target) && isRef2(oldValue) && !isRef2(value)) {
  1266. if (isOldValueReadonly) {
  1267. return false;
  1268. } else {
  1269. oldValue.value = value;
  1270. return true;
  1271. }
  1272. }
  1273. }
  1274. const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
  1275. const result = Reflect.set(
  1276. target,
  1277. key,
  1278. value,
  1279. isRef2(target) ? target : receiver
  1280. );
  1281. if (target === toRaw(receiver)) {
  1282. if (!hadKey) {
  1283. trigger(target, "add", key, value);
  1284. } else if (hasChanged(value, oldValue)) {
  1285. trigger(target, "set", key, value, oldValue);
  1286. }
  1287. }
  1288. return result;
  1289. }
  1290. deleteProperty(target, key) {
  1291. const hadKey = hasOwn(target, key);
  1292. const oldValue = target[key];
  1293. const result = Reflect.deleteProperty(target, key);
  1294. if (result && hadKey) {
  1295. trigger(target, "delete", key, void 0, oldValue);
  1296. }
  1297. return result;
  1298. }
  1299. has(target, key) {
  1300. const result = Reflect.has(target, key);
  1301. if (!isSymbol(key) || !builtInSymbols.has(key)) {
  1302. track(target, "has", key);
  1303. }
  1304. return result;
  1305. }
  1306. ownKeys(target) {
  1307. track(
  1308. target,
  1309. "iterate",
  1310. isArray(target) ? "length" : ITERATE_KEY
  1311. );
  1312. return Reflect.ownKeys(target);
  1313. }
  1314. };
  1315. var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
  1316. constructor(isShallow2 = false) {
  1317. super(true, isShallow2);
  1318. }
  1319. set(target, key) {
  1320. if (true) {
  1321. warn(
  1322. `Set operation on key "${String(key)}" failed: target is readonly.`,
  1323. target
  1324. );
  1325. }
  1326. return true;
  1327. }
  1328. deleteProperty(target, key) {
  1329. if (true) {
  1330. warn(
  1331. `Delete operation on key "${String(key)}" failed: target is readonly.`,
  1332. target
  1333. );
  1334. }
  1335. return true;
  1336. }
  1337. };
  1338. var mutableHandlers = new MutableReactiveHandler();
  1339. var readonlyHandlers = new ReadonlyReactiveHandler();
  1340. var shallowReactiveHandlers = new MutableReactiveHandler(true);
  1341. var shallowReadonlyHandlers = new ReadonlyReactiveHandler(true);
  1342. var toShallow = (value) => value;
  1343. var getProto = (v) => Reflect.getPrototypeOf(v);
  1344. function createIterableMethod(method, isReadonly2, isShallow2) {
  1345. return function(...args) {
  1346. const target = this["__v_raw"];
  1347. const rawTarget = toRaw(target);
  1348. const targetIsMap = isMap(rawTarget);
  1349. const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
  1350. const isKeyOnly = method === "keys" && targetIsMap;
  1351. const innerIterator = target[method](...args);
  1352. const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
  1353. !isReadonly2 && track(
  1354. rawTarget,
  1355. "iterate",
  1356. isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
  1357. );
  1358. return {
  1359. // iterator protocol
  1360. next() {
  1361. const { value, done } = innerIterator.next();
  1362. return done ? { value, done } : {
  1363. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  1364. done
  1365. };
  1366. },
  1367. // iterable protocol
  1368. [Symbol.iterator]() {
  1369. return this;
  1370. }
  1371. };
  1372. };
  1373. }
  1374. function createReadonlyMethod(type) {
  1375. return function(...args) {
  1376. if (true) {
  1377. const key = args[0] ? `on key "${args[0]}" ` : ``;
  1378. warn(
  1379. `${capitalize(type)} operation ${key}failed: target is readonly.`,
  1380. toRaw(this)
  1381. );
  1382. }
  1383. return type === "delete" ? false : type === "clear" ? void 0 : this;
  1384. };
  1385. }
  1386. function createInstrumentations(readonly2, shallow) {
  1387. const instrumentations = {
  1388. get(key) {
  1389. const target = this["__v_raw"];
  1390. const rawTarget = toRaw(target);
  1391. const rawKey = toRaw(key);
  1392. if (!readonly2) {
  1393. if (hasChanged(key, rawKey)) {
  1394. track(rawTarget, "get", key);
  1395. }
  1396. track(rawTarget, "get", rawKey);
  1397. }
  1398. const { has } = getProto(rawTarget);
  1399. const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
  1400. if (has.call(rawTarget, key)) {
  1401. return wrap(target.get(key));
  1402. } else if (has.call(rawTarget, rawKey)) {
  1403. return wrap(target.get(rawKey));
  1404. } else if (target !== rawTarget) {
  1405. target.get(key);
  1406. }
  1407. },
  1408. get size() {
  1409. const target = this["__v_raw"];
  1410. !readonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
  1411. return Reflect.get(target, "size", target);
  1412. },
  1413. has(key) {
  1414. const target = this["__v_raw"];
  1415. const rawTarget = toRaw(target);
  1416. const rawKey = toRaw(key);
  1417. if (!readonly2) {
  1418. if (hasChanged(key, rawKey)) {
  1419. track(rawTarget, "has", key);
  1420. }
  1421. track(rawTarget, "has", rawKey);
  1422. }
  1423. return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
  1424. },
  1425. forEach(callback, thisArg) {
  1426. const observed = this;
  1427. const target = observed["__v_raw"];
  1428. const rawTarget = toRaw(target);
  1429. const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
  1430. !readonly2 && track(rawTarget, "iterate", ITERATE_KEY);
  1431. return target.forEach((value, key) => {
  1432. return callback.call(thisArg, wrap(value), wrap(key), observed);
  1433. });
  1434. }
  1435. };
  1436. extend(
  1437. instrumentations,
  1438. readonly2 ? {
  1439. add: createReadonlyMethod("add"),
  1440. set: createReadonlyMethod("set"),
  1441. delete: createReadonlyMethod("delete"),
  1442. clear: createReadonlyMethod("clear")
  1443. } : {
  1444. add(value) {
  1445. if (!shallow && !isShallow(value) && !isReadonly(value)) {
  1446. value = toRaw(value);
  1447. }
  1448. const target = toRaw(this);
  1449. const proto = getProto(target);
  1450. const hadKey = proto.has.call(target, value);
  1451. if (!hadKey) {
  1452. target.add(value);
  1453. trigger(target, "add", value, value);
  1454. }
  1455. return this;
  1456. },
  1457. set(key, value) {
  1458. if (!shallow && !isShallow(value) && !isReadonly(value)) {
  1459. value = toRaw(value);
  1460. }
  1461. const target = toRaw(this);
  1462. const { has, get } = getProto(target);
  1463. let hadKey = has.call(target, key);
  1464. if (!hadKey) {
  1465. key = toRaw(key);
  1466. hadKey = has.call(target, key);
  1467. } else if (true) {
  1468. checkIdentityKeys(target, has, key);
  1469. }
  1470. const oldValue = get.call(target, key);
  1471. target.set(key, value);
  1472. if (!hadKey) {
  1473. trigger(target, "add", key, value);
  1474. } else if (hasChanged(value, oldValue)) {
  1475. trigger(target, "set", key, value, oldValue);
  1476. }
  1477. return this;
  1478. },
  1479. delete(key) {
  1480. const target = toRaw(this);
  1481. const { has, get } = getProto(target);
  1482. let hadKey = has.call(target, key);
  1483. if (!hadKey) {
  1484. key = toRaw(key);
  1485. hadKey = has.call(target, key);
  1486. } else if (true) {
  1487. checkIdentityKeys(target, has, key);
  1488. }
  1489. const oldValue = get ? get.call(target, key) : void 0;
  1490. const result = target.delete(key);
  1491. if (hadKey) {
  1492. trigger(target, "delete", key, void 0, oldValue);
  1493. }
  1494. return result;
  1495. },
  1496. clear() {
  1497. const target = toRaw(this);
  1498. const hadItems = target.size !== 0;
  1499. const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0;
  1500. const result = target.clear();
  1501. if (hadItems) {
  1502. trigger(
  1503. target,
  1504. "clear",
  1505. void 0,
  1506. void 0,
  1507. oldTarget
  1508. );
  1509. }
  1510. return result;
  1511. }
  1512. }
  1513. );
  1514. const iteratorMethods = [
  1515. "keys",
  1516. "values",
  1517. "entries",
  1518. Symbol.iterator
  1519. ];
  1520. iteratorMethods.forEach((method) => {
  1521. instrumentations[method] = createIterableMethod(method, readonly2, shallow);
  1522. });
  1523. return instrumentations;
  1524. }
  1525. function createInstrumentationGetter(isReadonly2, shallow) {
  1526. const instrumentations = createInstrumentations(isReadonly2, shallow);
  1527. return (target, key, receiver) => {
  1528. if (key === "__v_isReactive") {
  1529. return !isReadonly2;
  1530. } else if (key === "__v_isReadonly") {
  1531. return isReadonly2;
  1532. } else if (key === "__v_raw") {
  1533. return target;
  1534. }
  1535. return Reflect.get(
  1536. hasOwn(instrumentations, key) && key in target ? instrumentations : target,
  1537. key,
  1538. receiver
  1539. );
  1540. };
  1541. }
  1542. var mutableCollectionHandlers = {
  1543. get: createInstrumentationGetter(false, false)
  1544. };
  1545. var shallowCollectionHandlers = {
  1546. get: createInstrumentationGetter(false, true)
  1547. };
  1548. var readonlyCollectionHandlers = {
  1549. get: createInstrumentationGetter(true, false)
  1550. };
  1551. var shallowReadonlyCollectionHandlers = {
  1552. get: createInstrumentationGetter(true, true)
  1553. };
  1554. function checkIdentityKeys(target, has, key) {
  1555. const rawKey = toRaw(key);
  1556. if (rawKey !== key && has.call(target, rawKey)) {
  1557. const type = toRawType(target);
  1558. warn(
  1559. `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
  1560. );
  1561. }
  1562. }
  1563. var reactiveMap = /* @__PURE__ */ new WeakMap();
  1564. var shallowReactiveMap = /* @__PURE__ */ new WeakMap();
  1565. var readonlyMap = /* @__PURE__ */ new WeakMap();
  1566. var shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
  1567. function targetTypeMap(rawType) {
  1568. switch (rawType) {
  1569. case "Object":
  1570. case "Array":
  1571. return 1;
  1572. case "Map":
  1573. case "Set":
  1574. case "WeakMap":
  1575. case "WeakSet":
  1576. return 2;
  1577. default:
  1578. return 0;
  1579. }
  1580. }
  1581. function getTargetType(value) {
  1582. return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
  1583. }
  1584. function reactive(target) {
  1585. if (isReadonly(target)) {
  1586. return target;
  1587. }
  1588. return createReactiveObject(
  1589. target,
  1590. false,
  1591. mutableHandlers,
  1592. mutableCollectionHandlers,
  1593. reactiveMap
  1594. );
  1595. }
  1596. function shallowReactive(target) {
  1597. return createReactiveObject(
  1598. target,
  1599. false,
  1600. shallowReactiveHandlers,
  1601. shallowCollectionHandlers,
  1602. shallowReactiveMap
  1603. );
  1604. }
  1605. function readonly(target) {
  1606. return createReactiveObject(
  1607. target,
  1608. true,
  1609. readonlyHandlers,
  1610. readonlyCollectionHandlers,
  1611. readonlyMap
  1612. );
  1613. }
  1614. function shallowReadonly(target) {
  1615. return createReactiveObject(
  1616. target,
  1617. true,
  1618. shallowReadonlyHandlers,
  1619. shallowReadonlyCollectionHandlers,
  1620. shallowReadonlyMap
  1621. );
  1622. }
  1623. function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
  1624. if (!isObject(target)) {
  1625. if (true) {
  1626. warn(
  1627. `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(
  1628. target
  1629. )}`
  1630. );
  1631. }
  1632. return target;
  1633. }
  1634. if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
  1635. return target;
  1636. }
  1637. const targetType = getTargetType(target);
  1638. if (targetType === 0) {
  1639. return target;
  1640. }
  1641. const existingProxy = proxyMap.get(target);
  1642. if (existingProxy) {
  1643. return existingProxy;
  1644. }
  1645. const proxy = new Proxy(
  1646. target,
  1647. targetType === 2 ? collectionHandlers : baseHandlers
  1648. );
  1649. proxyMap.set(target, proxy);
  1650. return proxy;
  1651. }
  1652. function isReactive(value) {
  1653. if (isReadonly(value)) {
  1654. return isReactive(value["__v_raw"]);
  1655. }
  1656. return !!(value && value["__v_isReactive"]);
  1657. }
  1658. function isReadonly(value) {
  1659. return !!(value && value["__v_isReadonly"]);
  1660. }
  1661. function isShallow(value) {
  1662. return !!(value && value["__v_isShallow"]);
  1663. }
  1664. function isProxy(value) {
  1665. return value ? !!value["__v_raw"] : false;
  1666. }
  1667. function toRaw(observed) {
  1668. const raw = observed && observed["__v_raw"];
  1669. return raw ? toRaw(raw) : observed;
  1670. }
  1671. function markRaw(value) {
  1672. if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
  1673. def(value, "__v_skip", true);
  1674. }
  1675. return value;
  1676. }
  1677. var toReactive = (value) => isObject(value) ? reactive(value) : value;
  1678. var toReadonly = (value) => isObject(value) ? readonly(value) : value;
  1679. function isRef2(r) {
  1680. return r ? r["__v_isRef"] === true : false;
  1681. }
  1682. function ref(value) {
  1683. return createRef(value, false);
  1684. }
  1685. function shallowRef(value) {
  1686. return createRef(value, true);
  1687. }
  1688. function createRef(rawValue, shallow) {
  1689. if (isRef2(rawValue)) {
  1690. return rawValue;
  1691. }
  1692. return new RefImpl(rawValue, shallow);
  1693. }
  1694. var RefImpl = class {
  1695. constructor(value, isShallow2) {
  1696. this.dep = new Dep();
  1697. this["__v_isRef"] = true;
  1698. this["__v_isShallow"] = false;
  1699. this._rawValue = isShallow2 ? value : toRaw(value);
  1700. this._value = isShallow2 ? value : toReactive(value);
  1701. this["__v_isShallow"] = isShallow2;
  1702. }
  1703. get value() {
  1704. if (true) {
  1705. this.dep.track({
  1706. target: this,
  1707. type: "get",
  1708. key: "value"
  1709. });
  1710. } else {
  1711. this.dep.track();
  1712. }
  1713. return this._value;
  1714. }
  1715. set value(newValue) {
  1716. const oldValue = this._rawValue;
  1717. const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
  1718. newValue = useDirectValue ? newValue : toRaw(newValue);
  1719. if (hasChanged(newValue, oldValue)) {
  1720. this._rawValue = newValue;
  1721. this._value = useDirectValue ? newValue : toReactive(newValue);
  1722. if (true) {
  1723. this.dep.trigger({
  1724. target: this,
  1725. type: "set",
  1726. key: "value",
  1727. newValue,
  1728. oldValue
  1729. });
  1730. } else {
  1731. this.dep.trigger();
  1732. }
  1733. }
  1734. }
  1735. };
  1736. function triggerRef(ref2) {
  1737. if (ref2.dep) {
  1738. if (true) {
  1739. ref2.dep.trigger({
  1740. target: ref2,
  1741. type: "set",
  1742. key: "value",
  1743. newValue: ref2._value
  1744. });
  1745. } else {
  1746. ref2.dep.trigger();
  1747. }
  1748. }
  1749. }
  1750. function unref(ref2) {
  1751. return isRef2(ref2) ? ref2.value : ref2;
  1752. }
  1753. function toValue(source) {
  1754. return isFunction(source) ? source() : unref(source);
  1755. }
  1756. var shallowUnwrapHandlers = {
  1757. get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
  1758. set: (target, key, value, receiver) => {
  1759. const oldValue = target[key];
  1760. if (isRef2(oldValue) && !isRef2(value)) {
  1761. oldValue.value = value;
  1762. return true;
  1763. } else {
  1764. return Reflect.set(target, key, value, receiver);
  1765. }
  1766. }
  1767. };
  1768. function proxyRefs(objectWithRefs) {
  1769. return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  1770. }
  1771. var CustomRefImpl = class {
  1772. constructor(factory) {
  1773. this["__v_isRef"] = true;
  1774. this._value = void 0;
  1775. const dep = this.dep = new Dep();
  1776. const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
  1777. this._get = get;
  1778. this._set = set;
  1779. }
  1780. get value() {
  1781. return this._value = this._get();
  1782. }
  1783. set value(newVal) {
  1784. this._set(newVal);
  1785. }
  1786. };
  1787. function customRef(factory) {
  1788. return new CustomRefImpl(factory);
  1789. }
  1790. function toRefs(object) {
  1791. if (!isProxy(object)) {
  1792. warn(`toRefs() expects a reactive object but received a plain one.`);
  1793. }
  1794. const ret = isArray(object) ? new Array(object.length) : {};
  1795. for (const key in object) {
  1796. ret[key] = propertyToRef(object, key);
  1797. }
  1798. return ret;
  1799. }
  1800. var ObjectRefImpl = class {
  1801. constructor(_object, _key, _defaultValue) {
  1802. this._object = _object;
  1803. this._key = _key;
  1804. this._defaultValue = _defaultValue;
  1805. this["__v_isRef"] = true;
  1806. this._value = void 0;
  1807. }
  1808. get value() {
  1809. const val = this._object[this._key];
  1810. return this._value = val === void 0 ? this._defaultValue : val;
  1811. }
  1812. set value(newVal) {
  1813. this._object[this._key] = newVal;
  1814. }
  1815. get dep() {
  1816. return getDepFromReactive(toRaw(this._object), this._key);
  1817. }
  1818. };
  1819. var GetterRefImpl = class {
  1820. constructor(_getter) {
  1821. this._getter = _getter;
  1822. this["__v_isRef"] = true;
  1823. this["__v_isReadonly"] = true;
  1824. this._value = void 0;
  1825. }
  1826. get value() {
  1827. return this._value = this._getter();
  1828. }
  1829. };
  1830. function toRef(source, key, defaultValue) {
  1831. if (isRef2(source)) {
  1832. return source;
  1833. } else if (isFunction(source)) {
  1834. return new GetterRefImpl(source);
  1835. } else if (isObject(source) && arguments.length > 1) {
  1836. return propertyToRef(source, key, defaultValue);
  1837. } else {
  1838. return ref(source);
  1839. }
  1840. }
  1841. function propertyToRef(source, key, defaultValue) {
  1842. const val = source[key];
  1843. return isRef2(val) ? val : new ObjectRefImpl(source, key, defaultValue);
  1844. }
  1845. var ComputedRefImpl = class {
  1846. constructor(fn, setter, isSSR) {
  1847. this.fn = fn;
  1848. this.setter = setter;
  1849. this._value = void 0;
  1850. this.dep = new Dep(this);
  1851. this.__v_isRef = true;
  1852. this.deps = void 0;
  1853. this.depsTail = void 0;
  1854. this.flags = 16;
  1855. this.globalVersion = globalVersion - 1;
  1856. this.next = void 0;
  1857. this.effect = this;
  1858. this["__v_isReadonly"] = !setter;
  1859. this.isSSR = isSSR;
  1860. }
  1861. /**
  1862. * @internal
  1863. */
  1864. notify() {
  1865. this.flags |= 16;
  1866. if (!(this.flags & 8) && // avoid infinite self recursion
  1867. activeSub !== this) {
  1868. batch(this, true);
  1869. return true;
  1870. } else if (true) ;
  1871. }
  1872. get value() {
  1873. const link = true ? this.dep.track({
  1874. target: this,
  1875. type: "get",
  1876. key: "value"
  1877. }) : this.dep.track();
  1878. refreshComputed(this);
  1879. if (link) {
  1880. link.version = this.dep.version;
  1881. }
  1882. return this._value;
  1883. }
  1884. set value(newValue) {
  1885. if (this.setter) {
  1886. this.setter(newValue);
  1887. } else if (true) {
  1888. warn("Write operation failed: computed value is readonly");
  1889. }
  1890. }
  1891. };
  1892. function computed(getterOrOptions, debugOptions, isSSR = false) {
  1893. let getter;
  1894. let setter;
  1895. if (isFunction(getterOrOptions)) {
  1896. getter = getterOrOptions;
  1897. } else {
  1898. getter = getterOrOptions.get;
  1899. setter = getterOrOptions.set;
  1900. }
  1901. const cRef = new ComputedRefImpl(getter, setter, isSSR);
  1902. if (debugOptions && !isSSR) {
  1903. cRef.onTrack = debugOptions.onTrack;
  1904. cRef.onTrigger = debugOptions.onTrigger;
  1905. }
  1906. return cRef;
  1907. }
  1908. var TrackOpTypes = {
  1909. "GET": "get",
  1910. "HAS": "has",
  1911. "ITERATE": "iterate"
  1912. };
  1913. var TriggerOpTypes = {
  1914. "SET": "set",
  1915. "ADD": "add",
  1916. "DELETE": "delete",
  1917. "CLEAR": "clear"
  1918. };
  1919. var INITIAL_WATCHER_VALUE = {};
  1920. var cleanupMap = /* @__PURE__ */ new WeakMap();
  1921. var activeWatcher = void 0;
  1922. function getCurrentWatcher() {
  1923. return activeWatcher;
  1924. }
  1925. function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
  1926. if (owner) {
  1927. let cleanups = cleanupMap.get(owner);
  1928. if (!cleanups) cleanupMap.set(owner, cleanups = []);
  1929. cleanups.push(cleanupFn);
  1930. } else if (!failSilently) {
  1931. warn(
  1932. `onWatcherCleanup() was called when there was no active watcher to associate with.`
  1933. );
  1934. }
  1935. }
  1936. function watch(source, cb, options = EMPTY_OBJ) {
  1937. const { immediate, deep, once, scheduler, augmentJob, call } = options;
  1938. const warnInvalidSource = (s) => {
  1939. (options.onWarn || warn)(
  1940. `Invalid watch source: `,
  1941. s,
  1942. `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
  1943. );
  1944. };
  1945. const reactiveGetter = (source2) => {
  1946. if (deep) return source2;
  1947. if (isShallow(source2) || deep === false || deep === 0)
  1948. return traverse(source2, 1);
  1949. return traverse(source2);
  1950. };
  1951. let effect2;
  1952. let getter;
  1953. let cleanup;
  1954. let boundCleanup;
  1955. let forceTrigger = false;
  1956. let isMultiSource = false;
  1957. if (isRef2(source)) {
  1958. getter = () => source.value;
  1959. forceTrigger = isShallow(source);
  1960. } else if (isReactive(source)) {
  1961. getter = () => reactiveGetter(source);
  1962. forceTrigger = true;
  1963. } else if (isArray(source)) {
  1964. isMultiSource = true;
  1965. forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
  1966. getter = () => source.map((s) => {
  1967. if (isRef2(s)) {
  1968. return s.value;
  1969. } else if (isReactive(s)) {
  1970. return reactiveGetter(s);
  1971. } else if (isFunction(s)) {
  1972. return call ? call(s, 2) : s();
  1973. } else {
  1974. warnInvalidSource(s);
  1975. }
  1976. });
  1977. } else if (isFunction(source)) {
  1978. if (cb) {
  1979. getter = call ? () => call(source, 2) : source;
  1980. } else {
  1981. getter = () => {
  1982. if (cleanup) {
  1983. pauseTracking();
  1984. try {
  1985. cleanup();
  1986. } finally {
  1987. resetTracking();
  1988. }
  1989. }
  1990. const currentEffect = activeWatcher;
  1991. activeWatcher = effect2;
  1992. try {
  1993. return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
  1994. } finally {
  1995. activeWatcher = currentEffect;
  1996. }
  1997. };
  1998. }
  1999. } else {
  2000. getter = NOOP;
  2001. warnInvalidSource(source);
  2002. }
  2003. if (cb && deep) {
  2004. const baseGetter = getter;
  2005. const depth = deep === true ? Infinity : deep;
  2006. getter = () => traverse(baseGetter(), depth);
  2007. }
  2008. const scope = getCurrentScope();
  2009. const watchHandle = () => {
  2010. effect2.stop();
  2011. if (scope && scope.active) {
  2012. remove(scope.effects, effect2);
  2013. }
  2014. };
  2015. if (once && cb) {
  2016. const _cb = cb;
  2017. cb = (...args) => {
  2018. _cb(...args);
  2019. watchHandle();
  2020. };
  2021. }
  2022. let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
  2023. const job = (immediateFirstRun) => {
  2024. if (!(effect2.flags & 1) || !effect2.dirty && !immediateFirstRun) {
  2025. return;
  2026. }
  2027. if (cb) {
  2028. const newValue = effect2.run();
  2029. if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
  2030. if (cleanup) {
  2031. cleanup();
  2032. }
  2033. const currentWatcher = activeWatcher;
  2034. activeWatcher = effect2;
  2035. try {
  2036. const args = [
  2037. newValue,
  2038. // pass undefined as the old value when it's changed for the first time
  2039. oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
  2040. boundCleanup
  2041. ];
  2042. oldValue = newValue;
  2043. call ? call(cb, 3, args) : (
  2044. // @ts-expect-error
  2045. cb(...args)
  2046. );
  2047. } finally {
  2048. activeWatcher = currentWatcher;
  2049. }
  2050. }
  2051. } else {
  2052. effect2.run();
  2053. }
  2054. };
  2055. if (augmentJob) {
  2056. augmentJob(job);
  2057. }
  2058. effect2 = new ReactiveEffect(getter);
  2059. effect2.scheduler = scheduler ? () => scheduler(job, false) : job;
  2060. boundCleanup = (fn) => onWatcherCleanup(fn, false, effect2);
  2061. cleanup = effect2.onStop = () => {
  2062. const cleanups = cleanupMap.get(effect2);
  2063. if (cleanups) {
  2064. if (call) {
  2065. call(cleanups, 4);
  2066. } else {
  2067. for (const cleanup2 of cleanups) cleanup2();
  2068. }
  2069. cleanupMap.delete(effect2);
  2070. }
  2071. };
  2072. if (true) {
  2073. effect2.onTrack = options.onTrack;
  2074. effect2.onTrigger = options.onTrigger;
  2075. }
  2076. if (cb) {
  2077. if (immediate) {
  2078. job(true);
  2079. } else {
  2080. oldValue = effect2.run();
  2081. }
  2082. } else if (scheduler) {
  2083. scheduler(job.bind(null, true), true);
  2084. } else {
  2085. effect2.run();
  2086. }
  2087. watchHandle.pause = effect2.pause.bind(effect2);
  2088. watchHandle.resume = effect2.resume.bind(effect2);
  2089. watchHandle.stop = watchHandle;
  2090. return watchHandle;
  2091. }
  2092. function traverse(value, depth = Infinity, seen) {
  2093. if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
  2094. return value;
  2095. }
  2096. seen = seen || /* @__PURE__ */ new Set();
  2097. if (seen.has(value)) {
  2098. return value;
  2099. }
  2100. seen.add(value);
  2101. depth--;
  2102. if (isRef2(value)) {
  2103. traverse(value.value, depth, seen);
  2104. } else if (isArray(value)) {
  2105. for (let i = 0; i < value.length; i++) {
  2106. traverse(value[i], depth, seen);
  2107. }
  2108. } else if (isSet(value) || isMap(value)) {
  2109. value.forEach((v) => {
  2110. traverse(v, depth, seen);
  2111. });
  2112. } else if (isPlainObject(value)) {
  2113. for (const key in value) {
  2114. traverse(value[key], depth, seen);
  2115. }
  2116. for (const key of Object.getOwnPropertySymbols(value)) {
  2117. if (Object.prototype.propertyIsEnumerable.call(value, key)) {
  2118. traverse(value[key], depth, seen);
  2119. }
  2120. }
  2121. }
  2122. return value;
  2123. }
  2124. // node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
  2125. var stack = [];
  2126. function pushWarningContext(vnode) {
  2127. stack.push(vnode);
  2128. }
  2129. function popWarningContext() {
  2130. stack.pop();
  2131. }
  2132. var isWarning = false;
  2133. function warn$1(msg, ...args) {
  2134. if (isWarning) return;
  2135. isWarning = true;
  2136. pauseTracking();
  2137. const instance = stack.length ? stack[stack.length - 1].component : null;
  2138. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  2139. const trace = getComponentTrace();
  2140. if (appWarnHandler) {
  2141. callWithErrorHandling(
  2142. appWarnHandler,
  2143. instance,
  2144. 11,
  2145. [
  2146. // eslint-disable-next-line no-restricted-syntax
  2147. msg + args.map((a) => {
  2148. var _a, _b;
  2149. return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
  2150. }).join(""),
  2151. instance && instance.proxy,
  2152. trace.map(
  2153. ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
  2154. ).join("\n"),
  2155. trace
  2156. ]
  2157. );
  2158. } else {
  2159. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  2160. if (trace.length && // avoid spamming console during tests
  2161. true) {
  2162. warnArgs.push(`
  2163. `, ...formatTrace(trace));
  2164. }
  2165. console.warn(...warnArgs);
  2166. }
  2167. resetTracking();
  2168. isWarning = false;
  2169. }
  2170. function getComponentTrace() {
  2171. let currentVNode = stack[stack.length - 1];
  2172. if (!currentVNode) {
  2173. return [];
  2174. }
  2175. const normalizedStack = [];
  2176. while (currentVNode) {
  2177. const last = normalizedStack[0];
  2178. if (last && last.vnode === currentVNode) {
  2179. last.recurseCount++;
  2180. } else {
  2181. normalizedStack.push({
  2182. vnode: currentVNode,
  2183. recurseCount: 0
  2184. });
  2185. }
  2186. const parentInstance = currentVNode.component && currentVNode.component.parent;
  2187. currentVNode = parentInstance && parentInstance.vnode;
  2188. }
  2189. return normalizedStack;
  2190. }
  2191. function formatTrace(trace) {
  2192. const logs = [];
  2193. trace.forEach((entry, i) => {
  2194. logs.push(...i === 0 ? [] : [`
  2195. `], ...formatTraceEntry(entry));
  2196. });
  2197. return logs;
  2198. }
  2199. function formatTraceEntry({ vnode, recurseCount }) {
  2200. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  2201. const isRoot = vnode.component ? vnode.component.parent == null : false;
  2202. const open = ` at <${formatComponentName(
  2203. vnode.component,
  2204. vnode.type,
  2205. isRoot
  2206. )}`;
  2207. const close = `>` + postfix;
  2208. return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
  2209. }
  2210. function formatProps(props) {
  2211. const res = [];
  2212. const keys = Object.keys(props);
  2213. keys.slice(0, 3).forEach((key) => {
  2214. res.push(...formatProp(key, props[key]));
  2215. });
  2216. if (keys.length > 3) {
  2217. res.push(` ...`);
  2218. }
  2219. return res;
  2220. }
  2221. function formatProp(key, value, raw) {
  2222. if (isString(value)) {
  2223. value = JSON.stringify(value);
  2224. return raw ? value : [`${key}=${value}`];
  2225. } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
  2226. return raw ? value : [`${key}=${value}`];
  2227. } else if (isRef2(value)) {
  2228. value = formatProp(key, toRaw(value.value), true);
  2229. return raw ? value : [`${key}=Ref<`, value, `>`];
  2230. } else if (isFunction(value)) {
  2231. return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  2232. } else {
  2233. value = toRaw(value);
  2234. return raw ? value : [`${key}=`, value];
  2235. }
  2236. }
  2237. function assertNumber(val, type) {
  2238. if (false) return;
  2239. if (val === void 0) {
  2240. return;
  2241. } else if (typeof val !== "number") {
  2242. warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
  2243. } else if (isNaN(val)) {
  2244. warn$1(`${type} is NaN - the duration expression might be incorrect.`);
  2245. }
  2246. }
  2247. var ErrorCodes = {
  2248. "SETUP_FUNCTION": 0,
  2249. "0": "SETUP_FUNCTION",
  2250. "RENDER_FUNCTION": 1,
  2251. "1": "RENDER_FUNCTION",
  2252. "NATIVE_EVENT_HANDLER": 5,
  2253. "5": "NATIVE_EVENT_HANDLER",
  2254. "COMPONENT_EVENT_HANDLER": 6,
  2255. "6": "COMPONENT_EVENT_HANDLER",
  2256. "VNODE_HOOK": 7,
  2257. "7": "VNODE_HOOK",
  2258. "DIRECTIVE_HOOK": 8,
  2259. "8": "DIRECTIVE_HOOK",
  2260. "TRANSITION_HOOK": 9,
  2261. "9": "TRANSITION_HOOK",
  2262. "APP_ERROR_HANDLER": 10,
  2263. "10": "APP_ERROR_HANDLER",
  2264. "APP_WARN_HANDLER": 11,
  2265. "11": "APP_WARN_HANDLER",
  2266. "FUNCTION_REF": 12,
  2267. "12": "FUNCTION_REF",
  2268. "ASYNC_COMPONENT_LOADER": 13,
  2269. "13": "ASYNC_COMPONENT_LOADER",
  2270. "SCHEDULER": 14,
  2271. "14": "SCHEDULER",
  2272. "COMPONENT_UPDATE": 15,
  2273. "15": "COMPONENT_UPDATE",
  2274. "APP_UNMOUNT_CLEANUP": 16,
  2275. "16": "APP_UNMOUNT_CLEANUP"
  2276. };
  2277. var ErrorTypeStrings$1 = {
  2278. ["sp"]: "serverPrefetch hook",
  2279. ["bc"]: "beforeCreate hook",
  2280. ["c"]: "created hook",
  2281. ["bm"]: "beforeMount hook",
  2282. ["m"]: "mounted hook",
  2283. ["bu"]: "beforeUpdate hook",
  2284. ["u"]: "updated",
  2285. ["bum"]: "beforeUnmount hook",
  2286. ["um"]: "unmounted hook",
  2287. ["a"]: "activated hook",
  2288. ["da"]: "deactivated hook",
  2289. ["ec"]: "errorCaptured hook",
  2290. ["rtc"]: "renderTracked hook",
  2291. ["rtg"]: "renderTriggered hook",
  2292. [0]: "setup function",
  2293. [1]: "render function",
  2294. [2]: "watcher getter",
  2295. [3]: "watcher callback",
  2296. [4]: "watcher cleanup function",
  2297. [5]: "native event handler",
  2298. [6]: "component event handler",
  2299. [7]: "vnode hook",
  2300. [8]: "directive hook",
  2301. [9]: "transition hook",
  2302. [10]: "app errorHandler",
  2303. [11]: "app warnHandler",
  2304. [12]: "ref function",
  2305. [13]: "async component loader",
  2306. [14]: "scheduler flush",
  2307. [15]: "component update",
  2308. [16]: "app unmount cleanup function"
  2309. };
  2310. function callWithErrorHandling(fn, instance, type, args) {
  2311. try {
  2312. return args ? fn(...args) : fn();
  2313. } catch (err) {
  2314. handleError(err, instance, type);
  2315. }
  2316. }
  2317. function callWithAsyncErrorHandling(fn, instance, type, args) {
  2318. if (isFunction(fn)) {
  2319. const res = callWithErrorHandling(fn, instance, type, args);
  2320. if (res && isPromise(res)) {
  2321. res.catch((err) => {
  2322. handleError(err, instance, type);
  2323. });
  2324. }
  2325. return res;
  2326. }
  2327. if (isArray(fn)) {
  2328. const values = [];
  2329. for (let i = 0; i < fn.length; i++) {
  2330. values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
  2331. }
  2332. return values;
  2333. } else if (true) {
  2334. warn$1(
  2335. `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
  2336. );
  2337. }
  2338. }
  2339. function handleError(err, instance, type, throwInDev = true) {
  2340. const contextVNode = instance ? instance.vnode : null;
  2341. const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
  2342. if (instance) {
  2343. let cur = instance.parent;
  2344. const exposedInstance = instance.proxy;
  2345. const errorInfo = true ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
  2346. while (cur) {
  2347. const errorCapturedHooks = cur.ec;
  2348. if (errorCapturedHooks) {
  2349. for (let i = 0; i < errorCapturedHooks.length; i++) {
  2350. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  2351. return;
  2352. }
  2353. }
  2354. }
  2355. cur = cur.parent;
  2356. }
  2357. if (errorHandler) {
  2358. pauseTracking();
  2359. callWithErrorHandling(errorHandler, null, 10, [
  2360. err,
  2361. exposedInstance,
  2362. errorInfo
  2363. ]);
  2364. resetTracking();
  2365. return;
  2366. }
  2367. }
  2368. logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
  2369. }
  2370. function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
  2371. if (true) {
  2372. const info = ErrorTypeStrings$1[type];
  2373. if (contextVNode) {
  2374. pushWarningContext(contextVNode);
  2375. }
  2376. warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  2377. if (contextVNode) {
  2378. popWarningContext();
  2379. }
  2380. if (throwInDev) {
  2381. throw err;
  2382. } else {
  2383. console.error(err);
  2384. }
  2385. } else if (throwInProd) {
  2386. throw err;
  2387. } else {
  2388. console.error(err);
  2389. }
  2390. }
  2391. var queue = [];
  2392. var flushIndex = -1;
  2393. var pendingPostFlushCbs = [];
  2394. var activePostFlushCbs = null;
  2395. var postFlushIndex = 0;
  2396. var resolvedPromise = Promise.resolve();
  2397. var currentFlushPromise = null;
  2398. var RECURSION_LIMIT = 100;
  2399. function nextTick(fn) {
  2400. const p2 = currentFlushPromise || resolvedPromise;
  2401. return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
  2402. }
  2403. function findInsertionIndex(id) {
  2404. let start = flushIndex + 1;
  2405. let end = queue.length;
  2406. while (start < end) {
  2407. const middle = start + end >>> 1;
  2408. const middleJob = queue[middle];
  2409. const middleJobId = getId(middleJob);
  2410. if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
  2411. start = middle + 1;
  2412. } else {
  2413. end = middle;
  2414. }
  2415. }
  2416. return start;
  2417. }
  2418. function queueJob(job) {
  2419. if (!(job.flags & 1)) {
  2420. const jobId = getId(job);
  2421. const lastJob = queue[queue.length - 1];
  2422. if (!lastJob || // fast path when the job id is larger than the tail
  2423. !(job.flags & 2) && jobId >= getId(lastJob)) {
  2424. queue.push(job);
  2425. } else {
  2426. queue.splice(findInsertionIndex(jobId), 0, job);
  2427. }
  2428. job.flags |= 1;
  2429. queueFlush();
  2430. }
  2431. }
  2432. function queueFlush() {
  2433. if (!currentFlushPromise) {
  2434. currentFlushPromise = resolvedPromise.then(flushJobs);
  2435. }
  2436. }
  2437. function queuePostFlushCb(cb) {
  2438. if (!isArray(cb)) {
  2439. if (activePostFlushCbs && cb.id === -1) {
  2440. activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
  2441. } else if (!(cb.flags & 1)) {
  2442. pendingPostFlushCbs.push(cb);
  2443. cb.flags |= 1;
  2444. }
  2445. } else {
  2446. pendingPostFlushCbs.push(...cb);
  2447. }
  2448. queueFlush();
  2449. }
  2450. function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
  2451. if (true) {
  2452. seen = seen || /* @__PURE__ */ new Map();
  2453. }
  2454. for (; i < queue.length; i++) {
  2455. const cb = queue[i];
  2456. if (cb && cb.flags & 2) {
  2457. if (instance && cb.id !== instance.uid) {
  2458. continue;
  2459. }
  2460. if (checkRecursiveUpdates(seen, cb)) {
  2461. continue;
  2462. }
  2463. queue.splice(i, 1);
  2464. i--;
  2465. if (cb.flags & 4) {
  2466. cb.flags &= -2;
  2467. }
  2468. cb();
  2469. if (!(cb.flags & 4)) {
  2470. cb.flags &= -2;
  2471. }
  2472. }
  2473. }
  2474. }
  2475. function flushPostFlushCbs(seen) {
  2476. if (pendingPostFlushCbs.length) {
  2477. const deduped = [...new Set(pendingPostFlushCbs)].sort(
  2478. (a, b) => getId(a) - getId(b)
  2479. );
  2480. pendingPostFlushCbs.length = 0;
  2481. if (activePostFlushCbs) {
  2482. activePostFlushCbs.push(...deduped);
  2483. return;
  2484. }
  2485. activePostFlushCbs = deduped;
  2486. if (true) {
  2487. seen = seen || /* @__PURE__ */ new Map();
  2488. }
  2489. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  2490. const cb = activePostFlushCbs[postFlushIndex];
  2491. if (checkRecursiveUpdates(seen, cb)) {
  2492. continue;
  2493. }
  2494. if (cb.flags & 4) {
  2495. cb.flags &= -2;
  2496. }
  2497. if (!(cb.flags & 8)) cb();
  2498. cb.flags &= -2;
  2499. }
  2500. activePostFlushCbs = null;
  2501. postFlushIndex = 0;
  2502. }
  2503. }
  2504. var getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
  2505. function flushJobs(seen) {
  2506. if (true) {
  2507. seen = seen || /* @__PURE__ */ new Map();
  2508. }
  2509. const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
  2510. try {
  2511. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  2512. const job = queue[flushIndex];
  2513. if (job && !(job.flags & 8)) {
  2514. if (check(job)) {
  2515. continue;
  2516. }
  2517. if (job.flags & 4) {
  2518. job.flags &= ~1;
  2519. }
  2520. callWithErrorHandling(
  2521. job,
  2522. job.i,
  2523. job.i ? 15 : 14
  2524. );
  2525. if (!(job.flags & 4)) {
  2526. job.flags &= ~1;
  2527. }
  2528. }
  2529. }
  2530. } finally {
  2531. for (; flushIndex < queue.length; flushIndex++) {
  2532. const job = queue[flushIndex];
  2533. if (job) {
  2534. job.flags &= -2;
  2535. }
  2536. }
  2537. flushIndex = -1;
  2538. queue.length = 0;
  2539. flushPostFlushCbs(seen);
  2540. currentFlushPromise = null;
  2541. if (queue.length || pendingPostFlushCbs.length) {
  2542. flushJobs(seen);
  2543. }
  2544. }
  2545. }
  2546. function checkRecursiveUpdates(seen, fn) {
  2547. const count = seen.get(fn) || 0;
  2548. if (count > RECURSION_LIMIT) {
  2549. const instance = fn.i;
  2550. const componentName = instance && getComponentName(instance.type);
  2551. handleError(
  2552. `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
  2553. null,
  2554. 10
  2555. );
  2556. return true;
  2557. }
  2558. seen.set(fn, count + 1);
  2559. return false;
  2560. }
  2561. var isHmrUpdating = false;
  2562. var hmrDirtyComponents = /* @__PURE__ */ new Map();
  2563. if (true) {
  2564. getGlobalThis().__VUE_HMR_RUNTIME__ = {
  2565. createRecord: tryWrap(createRecord),
  2566. rerender: tryWrap(rerender),
  2567. reload: tryWrap(reload)
  2568. };
  2569. }
  2570. var map = /* @__PURE__ */ new Map();
  2571. function registerHMR(instance) {
  2572. const id = instance.type.__hmrId;
  2573. let record = map.get(id);
  2574. if (!record) {
  2575. createRecord(id, instance.type);
  2576. record = map.get(id);
  2577. }
  2578. record.instances.add(instance);
  2579. }
  2580. function unregisterHMR(instance) {
  2581. map.get(instance.type.__hmrId).instances.delete(instance);
  2582. }
  2583. function createRecord(id, initialDef) {
  2584. if (map.has(id)) {
  2585. return false;
  2586. }
  2587. map.set(id, {
  2588. initialDef: normalizeClassComponent(initialDef),
  2589. instances: /* @__PURE__ */ new Set()
  2590. });
  2591. return true;
  2592. }
  2593. function normalizeClassComponent(component) {
  2594. return isClassComponent(component) ? component.__vccOpts : component;
  2595. }
  2596. function rerender(id, newRender) {
  2597. const record = map.get(id);
  2598. if (!record) {
  2599. return;
  2600. }
  2601. record.initialDef.render = newRender;
  2602. [...record.instances].forEach((instance) => {
  2603. if (newRender) {
  2604. instance.render = newRender;
  2605. normalizeClassComponent(instance.type).render = newRender;
  2606. }
  2607. instance.renderCache = [];
  2608. isHmrUpdating = true;
  2609. instance.update();
  2610. isHmrUpdating = false;
  2611. });
  2612. }
  2613. function reload(id, newComp) {
  2614. const record = map.get(id);
  2615. if (!record) return;
  2616. newComp = normalizeClassComponent(newComp);
  2617. updateComponentDef(record.initialDef, newComp);
  2618. const instances = [...record.instances];
  2619. for (let i = 0; i < instances.length; i++) {
  2620. const instance = instances[i];
  2621. const oldComp = normalizeClassComponent(instance.type);
  2622. let dirtyInstances = hmrDirtyComponents.get(oldComp);
  2623. if (!dirtyInstances) {
  2624. if (oldComp !== record.initialDef) {
  2625. updateComponentDef(oldComp, newComp);
  2626. }
  2627. hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
  2628. }
  2629. dirtyInstances.add(instance);
  2630. instance.appContext.propsCache.delete(instance.type);
  2631. instance.appContext.emitsCache.delete(instance.type);
  2632. instance.appContext.optionsCache.delete(instance.type);
  2633. if (instance.ceReload) {
  2634. dirtyInstances.add(instance);
  2635. instance.ceReload(newComp.styles);
  2636. dirtyInstances.delete(instance);
  2637. } else if (instance.parent) {
  2638. queueJob(() => {
  2639. isHmrUpdating = true;
  2640. instance.parent.update();
  2641. isHmrUpdating = false;
  2642. dirtyInstances.delete(instance);
  2643. });
  2644. } else if (instance.appContext.reload) {
  2645. instance.appContext.reload();
  2646. } else if (typeof window !== "undefined") {
  2647. window.location.reload();
  2648. } else {
  2649. console.warn(
  2650. "[HMR] Root or manually mounted instance modified. Full reload required."
  2651. );
  2652. }
  2653. if (instance.root.ce && instance !== instance.root) {
  2654. instance.root.ce._removeChildStyle(oldComp);
  2655. }
  2656. }
  2657. queuePostFlushCb(() => {
  2658. hmrDirtyComponents.clear();
  2659. });
  2660. }
  2661. function updateComponentDef(oldComp, newComp) {
  2662. extend(oldComp, newComp);
  2663. for (const key in oldComp) {
  2664. if (key !== "__file" && !(key in newComp)) {
  2665. delete oldComp[key];
  2666. }
  2667. }
  2668. }
  2669. function tryWrap(fn) {
  2670. return (id, arg) => {
  2671. try {
  2672. return fn(id, arg);
  2673. } catch (e) {
  2674. console.error(e);
  2675. console.warn(
  2676. `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
  2677. );
  2678. }
  2679. };
  2680. }
  2681. var devtools$1;
  2682. var buffer = [];
  2683. var devtoolsNotInstalled = false;
  2684. function emit$1(event, ...args) {
  2685. if (devtools$1) {
  2686. devtools$1.emit(event, ...args);
  2687. } else if (!devtoolsNotInstalled) {
  2688. buffer.push({ event, args });
  2689. }
  2690. }
  2691. function setDevtoolsHook$1(hook, target) {
  2692. var _a, _b;
  2693. devtools$1 = hook;
  2694. if (devtools$1) {
  2695. devtools$1.enabled = true;
  2696. buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
  2697. buffer = [];
  2698. } else if (
  2699. // handle late devtools injection - only do this if we are in an actual
  2700. // browser environment to avoid the timer handle stalling test runner exit
  2701. // (#4815)
  2702. typeof window !== "undefined" && // some envs mock window but not fully
  2703. window.HTMLElement && // also exclude jsdom
  2704. // eslint-disable-next-line no-restricted-syntax
  2705. !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
  2706. ) {
  2707. const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
  2708. replay.push((newHook) => {
  2709. setDevtoolsHook$1(newHook, target);
  2710. });
  2711. setTimeout(() => {
  2712. if (!devtools$1) {
  2713. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  2714. devtoolsNotInstalled = true;
  2715. buffer = [];
  2716. }
  2717. }, 3e3);
  2718. } else {
  2719. devtoolsNotInstalled = true;
  2720. buffer = [];
  2721. }
  2722. }
  2723. function devtoolsInitApp(app, version2) {
  2724. emit$1("app:init", app, version2, {
  2725. Fragment,
  2726. Text,
  2727. Comment,
  2728. Static
  2729. });
  2730. }
  2731. function devtoolsUnmountApp(app) {
  2732. emit$1("app:unmount", app);
  2733. }
  2734. var devtoolsComponentAdded = createDevtoolsComponentHook(
  2735. "component:added"
  2736. /* COMPONENT_ADDED */
  2737. );
  2738. var devtoolsComponentUpdated = createDevtoolsComponentHook(
  2739. "component:updated"
  2740. /* COMPONENT_UPDATED */
  2741. );
  2742. var _devtoolsComponentRemoved = createDevtoolsComponentHook(
  2743. "component:removed"
  2744. /* COMPONENT_REMOVED */
  2745. );
  2746. var devtoolsComponentRemoved = (component) => {
  2747. if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
  2748. !devtools$1.cleanupBuffer(component)) {
  2749. _devtoolsComponentRemoved(component);
  2750. }
  2751. };
  2752. function createDevtoolsComponentHook(hook) {
  2753. return (component) => {
  2754. emit$1(
  2755. hook,
  2756. component.appContext.app,
  2757. component.uid,
  2758. component.parent ? component.parent.uid : void 0,
  2759. component
  2760. );
  2761. };
  2762. }
  2763. var devtoolsPerfStart = createDevtoolsPerformanceHook(
  2764. "perf:start"
  2765. /* PERFORMANCE_START */
  2766. );
  2767. var devtoolsPerfEnd = createDevtoolsPerformanceHook(
  2768. "perf:end"
  2769. /* PERFORMANCE_END */
  2770. );
  2771. function createDevtoolsPerformanceHook(hook) {
  2772. return (component, type, time) => {
  2773. emit$1(hook, component.appContext.app, component.uid, component, type, time);
  2774. };
  2775. }
  2776. function devtoolsComponentEmit(component, event, params) {
  2777. emit$1(
  2778. "component:emit",
  2779. component.appContext.app,
  2780. component,
  2781. event,
  2782. params
  2783. );
  2784. }
  2785. var currentRenderingInstance = null;
  2786. var currentScopeId = null;
  2787. function setCurrentRenderingInstance(instance) {
  2788. const prev = currentRenderingInstance;
  2789. currentRenderingInstance = instance;
  2790. currentScopeId = instance && instance.type.__scopeId || null;
  2791. return prev;
  2792. }
  2793. function pushScopeId(id) {
  2794. currentScopeId = id;
  2795. }
  2796. function popScopeId() {
  2797. currentScopeId = null;
  2798. }
  2799. var withScopeId = (_id) => withCtx;
  2800. function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
  2801. if (!ctx) return fn;
  2802. if (fn._n) {
  2803. return fn;
  2804. }
  2805. const renderFnWithContext = (...args) => {
  2806. if (renderFnWithContext._d) {
  2807. setBlockTracking(-1);
  2808. }
  2809. const prevInstance = setCurrentRenderingInstance(ctx);
  2810. let res;
  2811. try {
  2812. res = fn(...args);
  2813. } finally {
  2814. setCurrentRenderingInstance(prevInstance);
  2815. if (renderFnWithContext._d) {
  2816. setBlockTracking(1);
  2817. }
  2818. }
  2819. if (true) {
  2820. devtoolsComponentUpdated(ctx);
  2821. }
  2822. return res;
  2823. };
  2824. renderFnWithContext._n = true;
  2825. renderFnWithContext._c = true;
  2826. renderFnWithContext._d = true;
  2827. return renderFnWithContext;
  2828. }
  2829. function validateDirectiveName(name) {
  2830. if (isBuiltInDirective(name)) {
  2831. warn$1("Do not use built-in directive ids as custom directive id: " + name);
  2832. }
  2833. }
  2834. function withDirectives(vnode, directives) {
  2835. if (currentRenderingInstance === null) {
  2836. warn$1(`withDirectives can only be used inside render functions.`);
  2837. return vnode;
  2838. }
  2839. const instance = getComponentPublicInstance(currentRenderingInstance);
  2840. const bindings = vnode.dirs || (vnode.dirs = []);
  2841. for (let i = 0; i < directives.length; i++) {
  2842. let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
  2843. if (dir) {
  2844. if (isFunction(dir)) {
  2845. dir = {
  2846. mounted: dir,
  2847. updated: dir
  2848. };
  2849. }
  2850. if (dir.deep) {
  2851. traverse(value);
  2852. }
  2853. bindings.push({
  2854. dir,
  2855. instance,
  2856. value,
  2857. oldValue: void 0,
  2858. arg,
  2859. modifiers
  2860. });
  2861. }
  2862. }
  2863. return vnode;
  2864. }
  2865. function invokeDirectiveHook(vnode, prevVNode, instance, name) {
  2866. const bindings = vnode.dirs;
  2867. const oldBindings = prevVNode && prevVNode.dirs;
  2868. for (let i = 0; i < bindings.length; i++) {
  2869. const binding = bindings[i];
  2870. if (oldBindings) {
  2871. binding.oldValue = oldBindings[i].value;
  2872. }
  2873. let hook = binding.dir[name];
  2874. if (hook) {
  2875. pauseTracking();
  2876. callWithAsyncErrorHandling(hook, instance, 8, [
  2877. vnode.el,
  2878. binding,
  2879. vnode,
  2880. prevVNode
  2881. ]);
  2882. resetTracking();
  2883. }
  2884. }
  2885. }
  2886. var TeleportEndKey = Symbol("_vte");
  2887. var isTeleport = (type) => type.__isTeleport;
  2888. var isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
  2889. var isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
  2890. var isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
  2891. var isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
  2892. var resolveTarget = (props, select) => {
  2893. const targetSelector = props && props.to;
  2894. if (isString(targetSelector)) {
  2895. if (!select) {
  2896. warn$1(
  2897. `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
  2898. );
  2899. return null;
  2900. } else {
  2901. const target = select(targetSelector);
  2902. if (!target && !isTeleportDisabled(props)) {
  2903. warn$1(
  2904. `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`
  2905. );
  2906. }
  2907. return target;
  2908. }
  2909. } else {
  2910. if (!targetSelector && !isTeleportDisabled(props)) {
  2911. warn$1(`Invalid Teleport target: ${targetSelector}`);
  2912. }
  2913. return targetSelector;
  2914. }
  2915. };
  2916. var TeleportImpl = {
  2917. name: "Teleport",
  2918. __isTeleport: true,
  2919. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
  2920. const {
  2921. mc: mountChildren,
  2922. pc: patchChildren,
  2923. pbc: patchBlockChildren,
  2924. o: { insert, querySelector, createText, createComment }
  2925. } = internals;
  2926. const disabled = isTeleportDisabled(n2.props);
  2927. let { shapeFlag, children, dynamicChildren } = n2;
  2928. if (isHmrUpdating) {
  2929. optimized = false;
  2930. dynamicChildren = null;
  2931. }
  2932. if (n1 == null) {
  2933. const placeholder = n2.el = true ? createComment("teleport start") : createText("");
  2934. const mainAnchor = n2.anchor = true ? createComment("teleport end") : createText("");
  2935. insert(placeholder, container, anchor);
  2936. insert(mainAnchor, container, anchor);
  2937. const mount = (container2, anchor2) => {
  2938. if (shapeFlag & 16) {
  2939. if (parentComponent && parentComponent.isCE) {
  2940. parentComponent.ce._teleportTarget = container2;
  2941. }
  2942. mountChildren(
  2943. children,
  2944. container2,
  2945. anchor2,
  2946. parentComponent,
  2947. parentSuspense,
  2948. namespace,
  2949. slotScopeIds,
  2950. optimized
  2951. );
  2952. }
  2953. };
  2954. const mountToTarget = () => {
  2955. const target = n2.target = resolveTarget(n2.props, querySelector);
  2956. const targetAnchor = prepareAnchor(target, n2, createText, insert);
  2957. if (target) {
  2958. if (namespace !== "svg" && isTargetSVG(target)) {
  2959. namespace = "svg";
  2960. } else if (namespace !== "mathml" && isTargetMathML(target)) {
  2961. namespace = "mathml";
  2962. }
  2963. if (!disabled) {
  2964. mount(target, targetAnchor);
  2965. updateCssVars(n2, false);
  2966. }
  2967. } else if (!disabled) {
  2968. warn$1(
  2969. "Invalid Teleport target on mount:",
  2970. target,
  2971. `(${typeof target})`
  2972. );
  2973. }
  2974. };
  2975. if (disabled) {
  2976. mount(container, mainAnchor);
  2977. updateCssVars(n2, true);
  2978. }
  2979. if (isTeleportDeferred(n2.props)) {
  2980. n2.el.__isMounted = false;
  2981. queuePostRenderEffect(() => {
  2982. mountToTarget();
  2983. delete n2.el.__isMounted;
  2984. }, parentSuspense);
  2985. } else {
  2986. mountToTarget();
  2987. }
  2988. } else {
  2989. if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
  2990. queuePostRenderEffect(() => {
  2991. TeleportImpl.process(
  2992. n1,
  2993. n2,
  2994. container,
  2995. anchor,
  2996. parentComponent,
  2997. parentSuspense,
  2998. namespace,
  2999. slotScopeIds,
  3000. optimized,
  3001. internals
  3002. );
  3003. }, parentSuspense);
  3004. return;
  3005. }
  3006. n2.el = n1.el;
  3007. n2.targetStart = n1.targetStart;
  3008. const mainAnchor = n2.anchor = n1.anchor;
  3009. const target = n2.target = n1.target;
  3010. const targetAnchor = n2.targetAnchor = n1.targetAnchor;
  3011. const wasDisabled = isTeleportDisabled(n1.props);
  3012. const currentContainer = wasDisabled ? container : target;
  3013. const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
  3014. if (namespace === "svg" || isTargetSVG(target)) {
  3015. namespace = "svg";
  3016. } else if (namespace === "mathml" || isTargetMathML(target)) {
  3017. namespace = "mathml";
  3018. }
  3019. if (dynamicChildren) {
  3020. patchBlockChildren(
  3021. n1.dynamicChildren,
  3022. dynamicChildren,
  3023. currentContainer,
  3024. parentComponent,
  3025. parentSuspense,
  3026. namespace,
  3027. slotScopeIds
  3028. );
  3029. traverseStaticChildren(n1, n2, false);
  3030. } else if (!optimized) {
  3031. patchChildren(
  3032. n1,
  3033. n2,
  3034. currentContainer,
  3035. currentAnchor,
  3036. parentComponent,
  3037. parentSuspense,
  3038. namespace,
  3039. slotScopeIds,
  3040. false
  3041. );
  3042. }
  3043. if (disabled) {
  3044. if (!wasDisabled) {
  3045. moveTeleport(
  3046. n2,
  3047. container,
  3048. mainAnchor,
  3049. internals,
  3050. 1
  3051. );
  3052. } else {
  3053. if (n2.props && n1.props && n2.props.to !== n1.props.to) {
  3054. n2.props.to = n1.props.to;
  3055. }
  3056. }
  3057. } else {
  3058. if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
  3059. const nextTarget = n2.target = resolveTarget(
  3060. n2.props,
  3061. querySelector
  3062. );
  3063. if (nextTarget) {
  3064. moveTeleport(
  3065. n2,
  3066. nextTarget,
  3067. null,
  3068. internals,
  3069. 0
  3070. );
  3071. } else if (true) {
  3072. warn$1(
  3073. "Invalid Teleport target on update:",
  3074. target,
  3075. `(${typeof target})`
  3076. );
  3077. }
  3078. } else if (wasDisabled) {
  3079. moveTeleport(
  3080. n2,
  3081. target,
  3082. targetAnchor,
  3083. internals,
  3084. 1
  3085. );
  3086. }
  3087. }
  3088. updateCssVars(n2, disabled);
  3089. }
  3090. },
  3091. remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
  3092. const {
  3093. shapeFlag,
  3094. children,
  3095. anchor,
  3096. targetStart,
  3097. targetAnchor,
  3098. target,
  3099. props
  3100. } = vnode;
  3101. if (target) {
  3102. hostRemove(targetStart);
  3103. hostRemove(targetAnchor);
  3104. }
  3105. doRemove && hostRemove(anchor);
  3106. if (shapeFlag & 16) {
  3107. const shouldRemove = doRemove || !isTeleportDisabled(props);
  3108. for (let i = 0; i < children.length; i++) {
  3109. const child = children[i];
  3110. unmount(
  3111. child,
  3112. parentComponent,
  3113. parentSuspense,
  3114. shouldRemove,
  3115. !!child.dynamicChildren
  3116. );
  3117. }
  3118. }
  3119. },
  3120. move: moveTeleport,
  3121. hydrate: hydrateTeleport
  3122. };
  3123. function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
  3124. if (moveType === 0) {
  3125. insert(vnode.targetAnchor, container, parentAnchor);
  3126. }
  3127. const { el, anchor, shapeFlag, children, props } = vnode;
  3128. const isReorder = moveType === 2;
  3129. if (isReorder) {
  3130. insert(el, container, parentAnchor);
  3131. }
  3132. if (!isReorder || isTeleportDisabled(props)) {
  3133. if (shapeFlag & 16) {
  3134. for (let i = 0; i < children.length; i++) {
  3135. move(
  3136. children[i],
  3137. container,
  3138. parentAnchor,
  3139. 2
  3140. );
  3141. }
  3142. }
  3143. }
  3144. if (isReorder) {
  3145. insert(anchor, container, parentAnchor);
  3146. }
  3147. }
  3148. function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
  3149. o: { nextSibling, parentNode, querySelector, insert, createText }
  3150. }, hydrateChildren) {
  3151. const target = vnode.target = resolveTarget(
  3152. vnode.props,
  3153. querySelector
  3154. );
  3155. if (target) {
  3156. const disabled = isTeleportDisabled(vnode.props);
  3157. const targetNode = target._lpa || target.firstChild;
  3158. if (vnode.shapeFlag & 16) {
  3159. if (disabled) {
  3160. vnode.anchor = hydrateChildren(
  3161. nextSibling(node),
  3162. vnode,
  3163. parentNode(node),
  3164. parentComponent,
  3165. parentSuspense,
  3166. slotScopeIds,
  3167. optimized
  3168. );
  3169. vnode.targetStart = targetNode;
  3170. vnode.targetAnchor = targetNode && nextSibling(targetNode);
  3171. } else {
  3172. vnode.anchor = nextSibling(node);
  3173. let targetAnchor = targetNode;
  3174. while (targetAnchor) {
  3175. if (targetAnchor && targetAnchor.nodeType === 8) {
  3176. if (targetAnchor.data === "teleport start anchor") {
  3177. vnode.targetStart = targetAnchor;
  3178. } else if (targetAnchor.data === "teleport anchor") {
  3179. vnode.targetAnchor = targetAnchor;
  3180. target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
  3181. break;
  3182. }
  3183. }
  3184. targetAnchor = nextSibling(targetAnchor);
  3185. }
  3186. if (!vnode.targetAnchor) {
  3187. prepareAnchor(target, vnode, createText, insert);
  3188. }
  3189. hydrateChildren(
  3190. targetNode && nextSibling(targetNode),
  3191. vnode,
  3192. target,
  3193. parentComponent,
  3194. parentSuspense,
  3195. slotScopeIds,
  3196. optimized
  3197. );
  3198. }
  3199. }
  3200. updateCssVars(vnode, disabled);
  3201. }
  3202. return vnode.anchor && nextSibling(vnode.anchor);
  3203. }
  3204. var Teleport = TeleportImpl;
  3205. function updateCssVars(vnode, isDisabled) {
  3206. const ctx = vnode.ctx;
  3207. if (ctx && ctx.ut) {
  3208. let node, anchor;
  3209. if (isDisabled) {
  3210. node = vnode.el;
  3211. anchor = vnode.anchor;
  3212. } else {
  3213. node = vnode.targetStart;
  3214. anchor = vnode.targetAnchor;
  3215. }
  3216. while (node && node !== anchor) {
  3217. if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
  3218. node = node.nextSibling;
  3219. }
  3220. ctx.ut();
  3221. }
  3222. }
  3223. function prepareAnchor(target, vnode, createText, insert) {
  3224. const targetStart = vnode.targetStart = createText("");
  3225. const targetAnchor = vnode.targetAnchor = createText("");
  3226. targetStart[TeleportEndKey] = targetAnchor;
  3227. if (target) {
  3228. insert(targetStart, target);
  3229. insert(targetAnchor, target);
  3230. }
  3231. return targetAnchor;
  3232. }
  3233. var leaveCbKey = Symbol("_leaveCb");
  3234. var enterCbKey = Symbol("_enterCb");
  3235. function useTransitionState() {
  3236. const state = {
  3237. isMounted: false,
  3238. isLeaving: false,
  3239. isUnmounting: false,
  3240. leavingVNodes: /* @__PURE__ */ new Map()
  3241. };
  3242. onMounted(() => {
  3243. state.isMounted = true;
  3244. });
  3245. onBeforeUnmount(() => {
  3246. state.isUnmounting = true;
  3247. });
  3248. return state;
  3249. }
  3250. var TransitionHookValidator = [Function, Array];
  3251. var BaseTransitionPropsValidators = {
  3252. mode: String,
  3253. appear: Boolean,
  3254. persisted: Boolean,
  3255. // enter
  3256. onBeforeEnter: TransitionHookValidator,
  3257. onEnter: TransitionHookValidator,
  3258. onAfterEnter: TransitionHookValidator,
  3259. onEnterCancelled: TransitionHookValidator,
  3260. // leave
  3261. onBeforeLeave: TransitionHookValidator,
  3262. onLeave: TransitionHookValidator,
  3263. onAfterLeave: TransitionHookValidator,
  3264. onLeaveCancelled: TransitionHookValidator,
  3265. // appear
  3266. onBeforeAppear: TransitionHookValidator,
  3267. onAppear: TransitionHookValidator,
  3268. onAfterAppear: TransitionHookValidator,
  3269. onAppearCancelled: TransitionHookValidator
  3270. };
  3271. var recursiveGetSubtree = (instance) => {
  3272. const subTree = instance.subTree;
  3273. return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
  3274. };
  3275. var BaseTransitionImpl = {
  3276. name: `BaseTransition`,
  3277. props: BaseTransitionPropsValidators,
  3278. setup(props, { slots }) {
  3279. const instance = getCurrentInstance();
  3280. const state = useTransitionState();
  3281. return () => {
  3282. const children = slots.default && getTransitionRawChildren(slots.default(), true);
  3283. if (!children || !children.length) {
  3284. return;
  3285. }
  3286. const child = findNonCommentChild(children);
  3287. const rawProps = toRaw(props);
  3288. const { mode } = rawProps;
  3289. if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
  3290. warn$1(`invalid <transition> mode: ${mode}`);
  3291. }
  3292. if (state.isLeaving) {
  3293. return emptyPlaceholder(child);
  3294. }
  3295. const innerChild = getInnerChild$1(child);
  3296. if (!innerChild) {
  3297. return emptyPlaceholder(child);
  3298. }
  3299. let enterHooks = resolveTransitionHooks(
  3300. innerChild,
  3301. rawProps,
  3302. state,
  3303. instance,
  3304. // #11061, ensure enterHooks is fresh after clone
  3305. (hooks) => enterHooks = hooks
  3306. );
  3307. if (innerChild.type !== Comment) {
  3308. setTransitionHooks(innerChild, enterHooks);
  3309. }
  3310. let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
  3311. if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
  3312. let leavingHooks = resolveTransitionHooks(
  3313. oldInnerChild,
  3314. rawProps,
  3315. state,
  3316. instance
  3317. );
  3318. setTransitionHooks(oldInnerChild, leavingHooks);
  3319. if (mode === "out-in" && innerChild.type !== Comment) {
  3320. state.isLeaving = true;
  3321. leavingHooks.afterLeave = () => {
  3322. state.isLeaving = false;
  3323. if (!(instance.job.flags & 8)) {
  3324. instance.update();
  3325. }
  3326. delete leavingHooks.afterLeave;
  3327. oldInnerChild = void 0;
  3328. };
  3329. return emptyPlaceholder(child);
  3330. } else if (mode === "in-out" && innerChild.type !== Comment) {
  3331. leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
  3332. const leavingVNodesCache = getLeavingNodesForType(
  3333. state,
  3334. oldInnerChild
  3335. );
  3336. leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
  3337. el[leaveCbKey] = () => {
  3338. earlyRemove();
  3339. el[leaveCbKey] = void 0;
  3340. delete enterHooks.delayedLeave;
  3341. oldInnerChild = void 0;
  3342. };
  3343. enterHooks.delayedLeave = () => {
  3344. delayedLeave();
  3345. delete enterHooks.delayedLeave;
  3346. oldInnerChild = void 0;
  3347. };
  3348. };
  3349. } else {
  3350. oldInnerChild = void 0;
  3351. }
  3352. } else if (oldInnerChild) {
  3353. oldInnerChild = void 0;
  3354. }
  3355. return child;
  3356. };
  3357. }
  3358. };
  3359. function findNonCommentChild(children) {
  3360. let child = children[0];
  3361. if (children.length > 1) {
  3362. let hasFound = false;
  3363. for (const c of children) {
  3364. if (c.type !== Comment) {
  3365. if (hasFound) {
  3366. warn$1(
  3367. "<transition> can only be used on a single element or component. Use <transition-group> for lists."
  3368. );
  3369. break;
  3370. }
  3371. child = c;
  3372. hasFound = true;
  3373. if (false) break;
  3374. }
  3375. }
  3376. }
  3377. return child;
  3378. }
  3379. var BaseTransition = BaseTransitionImpl;
  3380. function getLeavingNodesForType(state, vnode) {
  3381. const { leavingVNodes } = state;
  3382. let leavingVNodesCache = leavingVNodes.get(vnode.type);
  3383. if (!leavingVNodesCache) {
  3384. leavingVNodesCache = /* @__PURE__ */ Object.create(null);
  3385. leavingVNodes.set(vnode.type, leavingVNodesCache);
  3386. }
  3387. return leavingVNodesCache;
  3388. }
  3389. function resolveTransitionHooks(vnode, props, state, instance, postClone) {
  3390. const {
  3391. appear,
  3392. mode,
  3393. persisted = false,
  3394. onBeforeEnter,
  3395. onEnter,
  3396. onAfterEnter,
  3397. onEnterCancelled,
  3398. onBeforeLeave,
  3399. onLeave,
  3400. onAfterLeave,
  3401. onLeaveCancelled,
  3402. onBeforeAppear,
  3403. onAppear,
  3404. onAfterAppear,
  3405. onAppearCancelled
  3406. } = props;
  3407. const key = String(vnode.key);
  3408. const leavingVNodesCache = getLeavingNodesForType(state, vnode);
  3409. const callHook3 = (hook, args) => {
  3410. hook && callWithAsyncErrorHandling(
  3411. hook,
  3412. instance,
  3413. 9,
  3414. args
  3415. );
  3416. };
  3417. const callAsyncHook = (hook, args) => {
  3418. const done = args[1];
  3419. callHook3(hook, args);
  3420. if (isArray(hook)) {
  3421. if (hook.every((hook2) => hook2.length <= 1)) done();
  3422. } else if (hook.length <= 1) {
  3423. done();
  3424. }
  3425. };
  3426. const hooks = {
  3427. mode,
  3428. persisted,
  3429. beforeEnter(el) {
  3430. let hook = onBeforeEnter;
  3431. if (!state.isMounted) {
  3432. if (appear) {
  3433. hook = onBeforeAppear || onBeforeEnter;
  3434. } else {
  3435. return;
  3436. }
  3437. }
  3438. if (el[leaveCbKey]) {
  3439. el[leaveCbKey](
  3440. true
  3441. /* cancelled */
  3442. );
  3443. }
  3444. const leavingVNode = leavingVNodesCache[key];
  3445. if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
  3446. leavingVNode.el[leaveCbKey]();
  3447. }
  3448. callHook3(hook, [el]);
  3449. },
  3450. enter(el) {
  3451. let hook = onEnter;
  3452. let afterHook = onAfterEnter;
  3453. let cancelHook = onEnterCancelled;
  3454. if (!state.isMounted) {
  3455. if (appear) {
  3456. hook = onAppear || onEnter;
  3457. afterHook = onAfterAppear || onAfterEnter;
  3458. cancelHook = onAppearCancelled || onEnterCancelled;
  3459. } else {
  3460. return;
  3461. }
  3462. }
  3463. let called = false;
  3464. const done = el[enterCbKey] = (cancelled) => {
  3465. if (called) return;
  3466. called = true;
  3467. if (cancelled) {
  3468. callHook3(cancelHook, [el]);
  3469. } else {
  3470. callHook3(afterHook, [el]);
  3471. }
  3472. if (hooks.delayedLeave) {
  3473. hooks.delayedLeave();
  3474. }
  3475. el[enterCbKey] = void 0;
  3476. };
  3477. if (hook) {
  3478. callAsyncHook(hook, [el, done]);
  3479. } else {
  3480. done();
  3481. }
  3482. },
  3483. leave(el, remove2) {
  3484. const key2 = String(vnode.key);
  3485. if (el[enterCbKey]) {
  3486. el[enterCbKey](
  3487. true
  3488. /* cancelled */
  3489. );
  3490. }
  3491. if (state.isUnmounting) {
  3492. return remove2();
  3493. }
  3494. callHook3(onBeforeLeave, [el]);
  3495. let called = false;
  3496. const done = el[leaveCbKey] = (cancelled) => {
  3497. if (called) return;
  3498. called = true;
  3499. remove2();
  3500. if (cancelled) {
  3501. callHook3(onLeaveCancelled, [el]);
  3502. } else {
  3503. callHook3(onAfterLeave, [el]);
  3504. }
  3505. el[leaveCbKey] = void 0;
  3506. if (leavingVNodesCache[key2] === vnode) {
  3507. delete leavingVNodesCache[key2];
  3508. }
  3509. };
  3510. leavingVNodesCache[key2] = vnode;
  3511. if (onLeave) {
  3512. callAsyncHook(onLeave, [el, done]);
  3513. } else {
  3514. done();
  3515. }
  3516. },
  3517. clone(vnode2) {
  3518. const hooks2 = resolveTransitionHooks(
  3519. vnode2,
  3520. props,
  3521. state,
  3522. instance,
  3523. postClone
  3524. );
  3525. if (postClone) postClone(hooks2);
  3526. return hooks2;
  3527. }
  3528. };
  3529. return hooks;
  3530. }
  3531. function emptyPlaceholder(vnode) {
  3532. if (isKeepAlive(vnode)) {
  3533. vnode = cloneVNode(vnode);
  3534. vnode.children = null;
  3535. return vnode;
  3536. }
  3537. }
  3538. function getInnerChild$1(vnode) {
  3539. if (!isKeepAlive(vnode)) {
  3540. if (isTeleport(vnode.type) && vnode.children) {
  3541. return findNonCommentChild(vnode.children);
  3542. }
  3543. return vnode;
  3544. }
  3545. if (vnode.component) {
  3546. return vnode.component.subTree;
  3547. }
  3548. const { shapeFlag, children } = vnode;
  3549. if (children) {
  3550. if (shapeFlag & 16) {
  3551. return children[0];
  3552. }
  3553. if (shapeFlag & 32 && isFunction(children.default)) {
  3554. return children.default();
  3555. }
  3556. }
  3557. }
  3558. function setTransitionHooks(vnode, hooks) {
  3559. if (vnode.shapeFlag & 6 && vnode.component) {
  3560. vnode.transition = hooks;
  3561. setTransitionHooks(vnode.component.subTree, hooks);
  3562. } else if (vnode.shapeFlag & 128) {
  3563. vnode.ssContent.transition = hooks.clone(vnode.ssContent);
  3564. vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
  3565. } else {
  3566. vnode.transition = hooks;
  3567. }
  3568. }
  3569. function getTransitionRawChildren(children, keepComment = false, parentKey) {
  3570. let ret = [];
  3571. let keyedFragmentCount = 0;
  3572. for (let i = 0; i < children.length; i++) {
  3573. let child = children[i];
  3574. const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
  3575. if (child.type === Fragment) {
  3576. if (child.patchFlag & 128) keyedFragmentCount++;
  3577. ret = ret.concat(
  3578. getTransitionRawChildren(child.children, keepComment, key)
  3579. );
  3580. } else if (keepComment || child.type !== Comment) {
  3581. ret.push(key != null ? cloneVNode(child, { key }) : child);
  3582. }
  3583. }
  3584. if (keyedFragmentCount > 1) {
  3585. for (let i = 0; i < ret.length; i++) {
  3586. ret[i].patchFlag = -2;
  3587. }
  3588. }
  3589. return ret;
  3590. }
  3591. function defineComponent(options, extraOptions) {
  3592. return isFunction(options) ? (
  3593. // #8236: extend call and options.name access are considered side-effects
  3594. // by Rollup, so we have to wrap it in a pure-annotated IIFE.
  3595. (() => extend({ name: options.name }, extraOptions, { setup: options }))()
  3596. ) : options;
  3597. }
  3598. function useId() {
  3599. const i = getCurrentInstance();
  3600. if (i) {
  3601. return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
  3602. } else if (true) {
  3603. warn$1(
  3604. `useId() is called when there is no active component instance to be associated with.`
  3605. );
  3606. }
  3607. return "";
  3608. }
  3609. function markAsyncBoundary(instance) {
  3610. instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
  3611. }
  3612. var knownTemplateRefs = /* @__PURE__ */ new WeakSet();
  3613. function useTemplateRef(key) {
  3614. const i = getCurrentInstance();
  3615. const r = shallowRef(null);
  3616. if (i) {
  3617. const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
  3618. let desc;
  3619. if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
  3620. warn$1(`useTemplateRef('${key}') already exists.`);
  3621. } else {
  3622. Object.defineProperty(refs, key, {
  3623. enumerable: true,
  3624. get: () => r.value,
  3625. set: (val) => r.value = val
  3626. });
  3627. }
  3628. } else if (true) {
  3629. warn$1(
  3630. `useTemplateRef() is called when there is no active component instance to be associated with.`
  3631. );
  3632. }
  3633. const ret = true ? readonly(r) : r;
  3634. if (true) {
  3635. knownTemplateRefs.add(ret);
  3636. }
  3637. return ret;
  3638. }
  3639. function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
  3640. if (isArray(rawRef)) {
  3641. rawRef.forEach(
  3642. (r, i) => setRef(
  3643. r,
  3644. oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),
  3645. parentSuspense,
  3646. vnode,
  3647. isUnmount
  3648. )
  3649. );
  3650. return;
  3651. }
  3652. if (isAsyncWrapper(vnode) && !isUnmount) {
  3653. if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
  3654. setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
  3655. }
  3656. return;
  3657. }
  3658. const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
  3659. const value = isUnmount ? null : refValue;
  3660. const { i: owner, r: ref2 } = rawRef;
  3661. if (!owner) {
  3662. warn$1(
  3663. `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
  3664. );
  3665. return;
  3666. }
  3667. const oldRef = oldRawRef && oldRawRef.r;
  3668. const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
  3669. const setupState = owner.setupState;
  3670. const rawSetupState = toRaw(setupState);
  3671. const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
  3672. if (true) {
  3673. if (hasOwn(rawSetupState, key) && !isRef2(rawSetupState[key])) {
  3674. warn$1(
  3675. `Template ref "${key}" used on a non-ref value. It will not work in the production build.`
  3676. );
  3677. }
  3678. if (knownTemplateRefs.has(rawSetupState[key])) {
  3679. return false;
  3680. }
  3681. }
  3682. return hasOwn(rawSetupState, key);
  3683. };
  3684. if (oldRef != null && oldRef !== ref2) {
  3685. if (isString(oldRef)) {
  3686. refs[oldRef] = null;
  3687. if (canSetSetupRef(oldRef)) {
  3688. setupState[oldRef] = null;
  3689. }
  3690. } else if (isRef2(oldRef)) {
  3691. oldRef.value = null;
  3692. }
  3693. }
  3694. if (isFunction(ref2)) {
  3695. callWithErrorHandling(ref2, owner, 12, [value, refs]);
  3696. } else {
  3697. const _isString = isString(ref2);
  3698. const _isRef = isRef2(ref2);
  3699. if (_isString || _isRef) {
  3700. const doSet = () => {
  3701. if (rawRef.f) {
  3702. const existing = _isString ? canSetSetupRef(ref2) ? setupState[ref2] : refs[ref2] : ref2.value;
  3703. if (isUnmount) {
  3704. isArray(existing) && remove(existing, refValue);
  3705. } else {
  3706. if (!isArray(existing)) {
  3707. if (_isString) {
  3708. refs[ref2] = [refValue];
  3709. if (canSetSetupRef(ref2)) {
  3710. setupState[ref2] = refs[ref2];
  3711. }
  3712. } else {
  3713. ref2.value = [refValue];
  3714. if (rawRef.k) refs[rawRef.k] = ref2.value;
  3715. }
  3716. } else if (!existing.includes(refValue)) {
  3717. existing.push(refValue);
  3718. }
  3719. }
  3720. } else if (_isString) {
  3721. refs[ref2] = value;
  3722. if (canSetSetupRef(ref2)) {
  3723. setupState[ref2] = value;
  3724. }
  3725. } else if (_isRef) {
  3726. ref2.value = value;
  3727. if (rawRef.k) refs[rawRef.k] = value;
  3728. } else if (true) {
  3729. warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
  3730. }
  3731. };
  3732. if (value) {
  3733. doSet.id = -1;
  3734. queuePostRenderEffect(doSet, parentSuspense);
  3735. } else {
  3736. doSet();
  3737. }
  3738. } else if (true) {
  3739. warn$1("Invalid template ref type:", ref2, `(${typeof ref2})`);
  3740. }
  3741. }
  3742. }
  3743. var hasLoggedMismatchError = false;
  3744. var logMismatchError = () => {
  3745. if (hasLoggedMismatchError) {
  3746. return;
  3747. }
  3748. console.error("Hydration completed but contains mismatches.");
  3749. hasLoggedMismatchError = true;
  3750. };
  3751. var isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
  3752. var isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
  3753. var getContainerType = (container) => {
  3754. if (container.nodeType !== 1) return void 0;
  3755. if (isSVGContainer(container)) return "svg";
  3756. if (isMathMLContainer(container)) return "mathml";
  3757. return void 0;
  3758. };
  3759. var isComment = (node) => node.nodeType === 8;
  3760. function createHydrationFunctions(rendererInternals) {
  3761. const {
  3762. mt: mountComponent,
  3763. p: patch,
  3764. o: {
  3765. patchProp: patchProp2,
  3766. createText,
  3767. nextSibling,
  3768. parentNode,
  3769. remove: remove2,
  3770. insert,
  3771. createComment
  3772. }
  3773. } = rendererInternals;
  3774. const hydrate2 = (vnode, container) => {
  3775. if (!container.hasChildNodes()) {
  3776. warn$1(
  3777. `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
  3778. );
  3779. patch(null, vnode, container);
  3780. flushPostFlushCbs();
  3781. container._vnode = vnode;
  3782. return;
  3783. }
  3784. hydrateNode(container.firstChild, vnode, null, null, null);
  3785. flushPostFlushCbs();
  3786. container._vnode = vnode;
  3787. };
  3788. const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
  3789. optimized = optimized || !!vnode.dynamicChildren;
  3790. const isFragmentStart = isComment(node) && node.data === "[";
  3791. const onMismatch = () => handleMismatch(
  3792. node,
  3793. vnode,
  3794. parentComponent,
  3795. parentSuspense,
  3796. slotScopeIds,
  3797. isFragmentStart
  3798. );
  3799. const { type, ref: ref2, shapeFlag, patchFlag } = vnode;
  3800. let domType = node.nodeType;
  3801. vnode.el = node;
  3802. if (true) {
  3803. def(node, "__vnode", vnode, true);
  3804. def(node, "__vueParentComponent", parentComponent, true);
  3805. }
  3806. if (patchFlag === -2) {
  3807. optimized = false;
  3808. vnode.dynamicChildren = null;
  3809. }
  3810. let nextNode = null;
  3811. switch (type) {
  3812. case Text:
  3813. if (domType !== 3) {
  3814. if (vnode.children === "") {
  3815. insert(vnode.el = createText(""), parentNode(node), node);
  3816. nextNode = node;
  3817. } else {
  3818. nextNode = onMismatch();
  3819. }
  3820. } else {
  3821. if (node.data !== vnode.children) {
  3822. warn$1(
  3823. `Hydration text mismatch in`,
  3824. node.parentNode,
  3825. `
  3826. - rendered on server: ${JSON.stringify(
  3827. node.data
  3828. )}
  3829. - expected on client: ${JSON.stringify(vnode.children)}`
  3830. );
  3831. logMismatchError();
  3832. node.data = vnode.children;
  3833. }
  3834. nextNode = nextSibling(node);
  3835. }
  3836. break;
  3837. case Comment:
  3838. if (isTemplateNode(node)) {
  3839. nextNode = nextSibling(node);
  3840. replaceNode(
  3841. vnode.el = node.content.firstChild,
  3842. node,
  3843. parentComponent
  3844. );
  3845. } else if (domType !== 8 || isFragmentStart) {
  3846. nextNode = onMismatch();
  3847. } else {
  3848. nextNode = nextSibling(node);
  3849. }
  3850. break;
  3851. case Static:
  3852. if (isFragmentStart) {
  3853. node = nextSibling(node);
  3854. domType = node.nodeType;
  3855. }
  3856. if (domType === 1 || domType === 3) {
  3857. nextNode = node;
  3858. const needToAdoptContent = !vnode.children.length;
  3859. for (let i = 0; i < vnode.staticCount; i++) {
  3860. if (needToAdoptContent)
  3861. vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;
  3862. if (i === vnode.staticCount - 1) {
  3863. vnode.anchor = nextNode;
  3864. }
  3865. nextNode = nextSibling(nextNode);
  3866. }
  3867. return isFragmentStart ? nextSibling(nextNode) : nextNode;
  3868. } else {
  3869. onMismatch();
  3870. }
  3871. break;
  3872. case Fragment:
  3873. if (!isFragmentStart) {
  3874. nextNode = onMismatch();
  3875. } else {
  3876. nextNode = hydrateFragment(
  3877. node,
  3878. vnode,
  3879. parentComponent,
  3880. parentSuspense,
  3881. slotScopeIds,
  3882. optimized
  3883. );
  3884. }
  3885. break;
  3886. default:
  3887. if (shapeFlag & 1) {
  3888. if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {
  3889. nextNode = onMismatch();
  3890. } else {
  3891. nextNode = hydrateElement(
  3892. node,
  3893. vnode,
  3894. parentComponent,
  3895. parentSuspense,
  3896. slotScopeIds,
  3897. optimized
  3898. );
  3899. }
  3900. } else if (shapeFlag & 6) {
  3901. vnode.slotScopeIds = slotScopeIds;
  3902. const container = parentNode(node);
  3903. if (isFragmentStart) {
  3904. nextNode = locateClosingAnchor(node);
  3905. } else if (isComment(node) && node.data === "teleport start") {
  3906. nextNode = locateClosingAnchor(node, node.data, "teleport end");
  3907. } else {
  3908. nextNode = nextSibling(node);
  3909. }
  3910. mountComponent(
  3911. vnode,
  3912. container,
  3913. null,
  3914. parentComponent,
  3915. parentSuspense,
  3916. getContainerType(container),
  3917. optimized
  3918. );
  3919. if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
  3920. let subTree;
  3921. if (isFragmentStart) {
  3922. subTree = createVNode(Fragment);
  3923. subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
  3924. } else {
  3925. subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
  3926. }
  3927. subTree.el = node;
  3928. vnode.component.subTree = subTree;
  3929. }
  3930. } else if (shapeFlag & 64) {
  3931. if (domType !== 8) {
  3932. nextNode = onMismatch();
  3933. } else {
  3934. nextNode = vnode.type.hydrate(
  3935. node,
  3936. vnode,
  3937. parentComponent,
  3938. parentSuspense,
  3939. slotScopeIds,
  3940. optimized,
  3941. rendererInternals,
  3942. hydrateChildren
  3943. );
  3944. }
  3945. } else if (shapeFlag & 128) {
  3946. nextNode = vnode.type.hydrate(
  3947. node,
  3948. vnode,
  3949. parentComponent,
  3950. parentSuspense,
  3951. getContainerType(parentNode(node)),
  3952. slotScopeIds,
  3953. optimized,
  3954. rendererInternals,
  3955. hydrateNode
  3956. );
  3957. } else if (true) {
  3958. warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
  3959. }
  3960. }
  3961. if (ref2 != null) {
  3962. setRef(ref2, null, parentSuspense, vnode);
  3963. }
  3964. return nextNode;
  3965. };
  3966. const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  3967. optimized = optimized || !!vnode.dynamicChildren;
  3968. const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
  3969. const forcePatch = type === "input" || type === "option";
  3970. if (true) {
  3971. if (dirs) {
  3972. invokeDirectiveHook(vnode, null, parentComponent, "created");
  3973. }
  3974. let needCallTransitionHooks = false;
  3975. if (isTemplateNode(el)) {
  3976. needCallTransitionHooks = needTransition(
  3977. null,
  3978. // no need check parentSuspense in hydration
  3979. transition
  3980. ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
  3981. const content = el.content.firstChild;
  3982. if (needCallTransitionHooks) {
  3983. const cls = content.getAttribute("class");
  3984. if (cls) content.$cls = cls;
  3985. transition.beforeEnter(content);
  3986. }
  3987. replaceNode(content, el, parentComponent);
  3988. vnode.el = el = content;
  3989. }
  3990. if (shapeFlag & 16 && // skip if element has innerHTML / textContent
  3991. !(props && (props.innerHTML || props.textContent))) {
  3992. let next = hydrateChildren(
  3993. el.firstChild,
  3994. vnode,
  3995. el,
  3996. parentComponent,
  3997. parentSuspense,
  3998. slotScopeIds,
  3999. optimized
  4000. );
  4001. let hasWarned2 = false;
  4002. while (next) {
  4003. if (!isMismatchAllowed(
  4004. el,
  4005. 1
  4006. /* CHILDREN */
  4007. )) {
  4008. if (!hasWarned2) {
  4009. warn$1(
  4010. `Hydration children mismatch on`,
  4011. el,
  4012. `
  4013. Server rendered element contains more child nodes than client vdom.`
  4014. );
  4015. hasWarned2 = true;
  4016. }
  4017. logMismatchError();
  4018. }
  4019. const cur = next;
  4020. next = next.nextSibling;
  4021. remove2(cur);
  4022. }
  4023. } else if (shapeFlag & 8) {
  4024. let clientText = vnode.children;
  4025. if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
  4026. clientText = clientText.slice(1);
  4027. }
  4028. if (el.textContent !== clientText) {
  4029. if (!isMismatchAllowed(
  4030. el,
  4031. 0
  4032. /* TEXT */
  4033. )) {
  4034. warn$1(
  4035. `Hydration text content mismatch on`,
  4036. el,
  4037. `
  4038. - rendered on server: ${el.textContent}
  4039. - expected on client: ${vnode.children}`
  4040. );
  4041. logMismatchError();
  4042. }
  4043. el.textContent = vnode.children;
  4044. }
  4045. }
  4046. if (props) {
  4047. if (true) {
  4048. const isCustomElement = el.tagName.includes("-");
  4049. for (const key in props) {
  4050. if (// #11189 skip if this node has directives that have created hooks
  4051. // as it could have mutated the DOM in any possible way
  4052. !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
  4053. logMismatchError();
  4054. }
  4055. if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
  4056. key[0] === "." || isCustomElement) {
  4057. patchProp2(el, key, null, props[key], void 0, parentComponent);
  4058. }
  4059. }
  4060. } else if (props.onClick) {
  4061. patchProp2(
  4062. el,
  4063. "onClick",
  4064. null,
  4065. props.onClick,
  4066. void 0,
  4067. parentComponent
  4068. );
  4069. } else if (patchFlag & 4 && isReactive(props.style)) {
  4070. for (const key in props.style) props.style[key];
  4071. }
  4072. }
  4073. let vnodeHooks;
  4074. if (vnodeHooks = props && props.onVnodeBeforeMount) {
  4075. invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  4076. }
  4077. if (dirs) {
  4078. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  4079. }
  4080. if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
  4081. queueEffectWithSuspense(() => {
  4082. vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  4083. needCallTransitionHooks && transition.enter(el);
  4084. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  4085. }, parentSuspense);
  4086. }
  4087. }
  4088. return el.nextSibling;
  4089. };
  4090. const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  4091. optimized = optimized || !!parentVNode.dynamicChildren;
  4092. const children = parentVNode.children;
  4093. const l = children.length;
  4094. let hasWarned2 = false;
  4095. for (let i = 0; i < l; i++) {
  4096. const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
  4097. const isText = vnode.type === Text;
  4098. if (node) {
  4099. if (isText && !optimized) {
  4100. if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {
  4101. insert(
  4102. createText(
  4103. node.data.slice(vnode.children.length)
  4104. ),
  4105. container,
  4106. nextSibling(node)
  4107. );
  4108. node.data = vnode.children;
  4109. }
  4110. }
  4111. node = hydrateNode(
  4112. node,
  4113. vnode,
  4114. parentComponent,
  4115. parentSuspense,
  4116. slotScopeIds,
  4117. optimized
  4118. );
  4119. } else if (isText && !vnode.children) {
  4120. insert(vnode.el = createText(""), container);
  4121. } else {
  4122. if (!isMismatchAllowed(
  4123. container,
  4124. 1
  4125. /* CHILDREN */
  4126. )) {
  4127. if (!hasWarned2) {
  4128. warn$1(
  4129. `Hydration children mismatch on`,
  4130. container,
  4131. `
  4132. Server rendered element contains fewer child nodes than client vdom.`
  4133. );
  4134. hasWarned2 = true;
  4135. }
  4136. logMismatchError();
  4137. }
  4138. patch(
  4139. null,
  4140. vnode,
  4141. container,
  4142. null,
  4143. parentComponent,
  4144. parentSuspense,
  4145. getContainerType(container),
  4146. slotScopeIds
  4147. );
  4148. }
  4149. }
  4150. return node;
  4151. };
  4152. const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  4153. const { slotScopeIds: fragmentSlotScopeIds } = vnode;
  4154. if (fragmentSlotScopeIds) {
  4155. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  4156. }
  4157. const container = parentNode(node);
  4158. const next = hydrateChildren(
  4159. nextSibling(node),
  4160. vnode,
  4161. container,
  4162. parentComponent,
  4163. parentSuspense,
  4164. slotScopeIds,
  4165. optimized
  4166. );
  4167. if (next && isComment(next) && next.data === "]") {
  4168. return nextSibling(vnode.anchor = next);
  4169. } else {
  4170. logMismatchError();
  4171. insert(vnode.anchor = createComment(`]`), container, next);
  4172. return next;
  4173. }
  4174. };
  4175. const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
  4176. if (!isMismatchAllowed(
  4177. node.parentElement,
  4178. 1
  4179. /* CHILDREN */
  4180. )) {
  4181. warn$1(
  4182. `Hydration node mismatch:
  4183. - rendered on server:`,
  4184. node,
  4185. node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``,
  4186. `
  4187. - expected on client:`,
  4188. vnode.type
  4189. );
  4190. logMismatchError();
  4191. }
  4192. vnode.el = null;
  4193. if (isFragment) {
  4194. const end = locateClosingAnchor(node);
  4195. while (true) {
  4196. const next2 = nextSibling(node);
  4197. if (next2 && next2 !== end) {
  4198. remove2(next2);
  4199. } else {
  4200. break;
  4201. }
  4202. }
  4203. }
  4204. const next = nextSibling(node);
  4205. const container = parentNode(node);
  4206. remove2(node);
  4207. patch(
  4208. null,
  4209. vnode,
  4210. container,
  4211. next,
  4212. parentComponent,
  4213. parentSuspense,
  4214. getContainerType(container),
  4215. slotScopeIds
  4216. );
  4217. if (parentComponent) {
  4218. parentComponent.vnode.el = vnode.el;
  4219. updateHOCHostEl(parentComponent, vnode.el);
  4220. }
  4221. return next;
  4222. };
  4223. const locateClosingAnchor = (node, open = "[", close = "]") => {
  4224. let match = 0;
  4225. while (node) {
  4226. node = nextSibling(node);
  4227. if (node && isComment(node)) {
  4228. if (node.data === open) match++;
  4229. if (node.data === close) {
  4230. if (match === 0) {
  4231. return nextSibling(node);
  4232. } else {
  4233. match--;
  4234. }
  4235. }
  4236. }
  4237. }
  4238. return node;
  4239. };
  4240. const replaceNode = (newNode, oldNode, parentComponent) => {
  4241. const parentNode2 = oldNode.parentNode;
  4242. if (parentNode2) {
  4243. parentNode2.replaceChild(newNode, oldNode);
  4244. }
  4245. let parent = parentComponent;
  4246. while (parent) {
  4247. if (parent.vnode.el === oldNode) {
  4248. parent.vnode.el = parent.subTree.el = newNode;
  4249. }
  4250. parent = parent.parent;
  4251. }
  4252. };
  4253. const isTemplateNode = (node) => {
  4254. return node.nodeType === 1 && node.tagName === "TEMPLATE";
  4255. };
  4256. return [hydrate2, hydrateNode];
  4257. }
  4258. function propHasMismatch(el, key, clientValue, vnode, instance) {
  4259. let mismatchType;
  4260. let mismatchKey;
  4261. let actual;
  4262. let expected;
  4263. if (key === "class") {
  4264. if (el.$cls) {
  4265. actual = el.$cls;
  4266. delete el.$cls;
  4267. } else {
  4268. actual = el.getAttribute("class");
  4269. }
  4270. expected = normalizeClass(clientValue);
  4271. if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
  4272. mismatchType = 2;
  4273. mismatchKey = `class`;
  4274. }
  4275. } else if (key === "style") {
  4276. actual = el.getAttribute("style") || "";
  4277. expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
  4278. const actualMap = toStyleMap(actual);
  4279. const expectedMap = toStyleMap(expected);
  4280. if (vnode.dirs) {
  4281. for (const { dir, value } of vnode.dirs) {
  4282. if (dir.name === "show" && !value) {
  4283. expectedMap.set("display", "none");
  4284. }
  4285. }
  4286. }
  4287. if (instance) {
  4288. resolveCssVars(instance, vnode, expectedMap);
  4289. }
  4290. if (!isMapEqual(actualMap, expectedMap)) {
  4291. mismatchType = 3;
  4292. mismatchKey = "style";
  4293. }
  4294. } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
  4295. if (isBooleanAttr(key)) {
  4296. actual = el.hasAttribute(key);
  4297. expected = includeBooleanAttr(clientValue);
  4298. } else if (clientValue == null) {
  4299. actual = el.hasAttribute(key);
  4300. expected = false;
  4301. } else {
  4302. if (el.hasAttribute(key)) {
  4303. actual = el.getAttribute(key);
  4304. } else if (key === "value" && el.tagName === "TEXTAREA") {
  4305. actual = el.value;
  4306. } else {
  4307. actual = false;
  4308. }
  4309. expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
  4310. }
  4311. if (actual !== expected) {
  4312. mismatchType = 4;
  4313. mismatchKey = key;
  4314. }
  4315. }
  4316. if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {
  4317. const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
  4318. const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`;
  4319. const postSegment = `
  4320. - rendered on server: ${format(actual)}
  4321. - expected on client: ${format(expected)}
  4322. Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  4323. You should fix the source of the mismatch.`;
  4324. {
  4325. warn$1(preSegment, el, postSegment);
  4326. }
  4327. return true;
  4328. }
  4329. return false;
  4330. }
  4331. function toClassSet(str) {
  4332. return new Set(str.trim().split(/\s+/));
  4333. }
  4334. function isSetEqual(a, b) {
  4335. if (a.size !== b.size) {
  4336. return false;
  4337. }
  4338. for (const s of a) {
  4339. if (!b.has(s)) {
  4340. return false;
  4341. }
  4342. }
  4343. return true;
  4344. }
  4345. function toStyleMap(str) {
  4346. const styleMap = /* @__PURE__ */ new Map();
  4347. for (const item of str.split(";")) {
  4348. let [key, value] = item.split(":");
  4349. key = key.trim();
  4350. value = value && value.trim();
  4351. if (key && value) {
  4352. styleMap.set(key, value);
  4353. }
  4354. }
  4355. return styleMap;
  4356. }
  4357. function isMapEqual(a, b) {
  4358. if (a.size !== b.size) {
  4359. return false;
  4360. }
  4361. for (const [key, value] of a) {
  4362. if (value !== b.get(key)) {
  4363. return false;
  4364. }
  4365. }
  4366. return true;
  4367. }
  4368. function resolveCssVars(instance, vnode, expectedMap) {
  4369. const root = instance.subTree;
  4370. if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
  4371. const cssVars = instance.getCssVars();
  4372. for (const key in cssVars) {
  4373. const value = normalizeCssVarValue(cssVars[key]);
  4374. expectedMap.set(`--${getEscapedCssVarName(key, false)}`, value);
  4375. }
  4376. }
  4377. if (vnode === root && instance.parent) {
  4378. resolveCssVars(instance.parent, instance.vnode, expectedMap);
  4379. }
  4380. }
  4381. var allowMismatchAttr = "data-allow-mismatch";
  4382. var MismatchTypeString = {
  4383. [
  4384. 0
  4385. /* TEXT */
  4386. ]: "text",
  4387. [
  4388. 1
  4389. /* CHILDREN */
  4390. ]: "children",
  4391. [
  4392. 2
  4393. /* CLASS */
  4394. ]: "class",
  4395. [
  4396. 3
  4397. /* STYLE */
  4398. ]: "style",
  4399. [
  4400. 4
  4401. /* ATTRIBUTE */
  4402. ]: "attribute"
  4403. };
  4404. function isMismatchAllowed(el, allowedType) {
  4405. if (allowedType === 0 || allowedType === 1) {
  4406. while (el && !el.hasAttribute(allowMismatchAttr)) {
  4407. el = el.parentElement;
  4408. }
  4409. }
  4410. const allowedAttr = el && el.getAttribute(allowMismatchAttr);
  4411. if (allowedAttr == null) {
  4412. return false;
  4413. } else if (allowedAttr === "") {
  4414. return true;
  4415. } else {
  4416. const list = allowedAttr.split(",");
  4417. if (allowedType === 0 && list.includes("children")) {
  4418. return true;
  4419. }
  4420. return list.includes(MismatchTypeString[allowedType]);
  4421. }
  4422. }
  4423. var requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
  4424. var cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
  4425. var hydrateOnIdle = (timeout = 1e4) => (hydrate2) => {
  4426. const id = requestIdleCallback(hydrate2, { timeout });
  4427. return () => cancelIdleCallback(id);
  4428. };
  4429. function elementIsVisibleInViewport(el) {
  4430. const { top, left, bottom, right } = el.getBoundingClientRect();
  4431. const { innerHeight, innerWidth } = window;
  4432. return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);
  4433. }
  4434. var hydrateOnVisible = (opts) => (hydrate2, forEach) => {
  4435. const ob = new IntersectionObserver((entries) => {
  4436. for (const e of entries) {
  4437. if (!e.isIntersecting) continue;
  4438. ob.disconnect();
  4439. hydrate2();
  4440. break;
  4441. }
  4442. }, opts);
  4443. forEach((el) => {
  4444. if (!(el instanceof Element)) return;
  4445. if (elementIsVisibleInViewport(el)) {
  4446. hydrate2();
  4447. ob.disconnect();
  4448. return false;
  4449. }
  4450. ob.observe(el);
  4451. });
  4452. return () => ob.disconnect();
  4453. };
  4454. var hydrateOnMediaQuery = (query) => (hydrate2) => {
  4455. if (query) {
  4456. const mql = matchMedia(query);
  4457. if (mql.matches) {
  4458. hydrate2();
  4459. } else {
  4460. mql.addEventListener("change", hydrate2, { once: true });
  4461. return () => mql.removeEventListener("change", hydrate2);
  4462. }
  4463. }
  4464. };
  4465. var hydrateOnInteraction = (interactions = []) => (hydrate2, forEach) => {
  4466. if (isString(interactions)) interactions = [interactions];
  4467. let hasHydrated = false;
  4468. const doHydrate = (e) => {
  4469. if (!hasHydrated) {
  4470. hasHydrated = true;
  4471. teardown();
  4472. hydrate2();
  4473. e.target.dispatchEvent(new e.constructor(e.type, e));
  4474. }
  4475. };
  4476. const teardown = () => {
  4477. forEach((el) => {
  4478. for (const i of interactions) {
  4479. el.removeEventListener(i, doHydrate);
  4480. }
  4481. });
  4482. };
  4483. forEach((el) => {
  4484. for (const i of interactions) {
  4485. el.addEventListener(i, doHydrate, { once: true });
  4486. }
  4487. });
  4488. return teardown;
  4489. };
  4490. function forEachElement(node, cb) {
  4491. if (isComment(node) && node.data === "[") {
  4492. let depth = 1;
  4493. let next = node.nextSibling;
  4494. while (next) {
  4495. if (next.nodeType === 1) {
  4496. const result = cb(next);
  4497. if (result === false) {
  4498. break;
  4499. }
  4500. } else if (isComment(next)) {
  4501. if (next.data === "]") {
  4502. if (--depth === 0) break;
  4503. } else if (next.data === "[") {
  4504. depth++;
  4505. }
  4506. }
  4507. next = next.nextSibling;
  4508. }
  4509. } else {
  4510. cb(node);
  4511. }
  4512. }
  4513. var isAsyncWrapper = (i) => !!i.type.__asyncLoader;
  4514. function defineAsyncComponent(source) {
  4515. if (isFunction(source)) {
  4516. source = { loader: source };
  4517. }
  4518. const {
  4519. loader,
  4520. loadingComponent,
  4521. errorComponent,
  4522. delay = 200,
  4523. hydrate: hydrateStrategy,
  4524. timeout,
  4525. // undefined = never times out
  4526. suspensible = true,
  4527. onError: userOnError
  4528. } = source;
  4529. let pendingRequest = null;
  4530. let resolvedComp;
  4531. let retries = 0;
  4532. const retry = () => {
  4533. retries++;
  4534. pendingRequest = null;
  4535. return load();
  4536. };
  4537. const load = () => {
  4538. let thisRequest;
  4539. return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
  4540. err = err instanceof Error ? err : new Error(String(err));
  4541. if (userOnError) {
  4542. return new Promise((resolve2, reject) => {
  4543. const userRetry = () => resolve2(retry());
  4544. const userFail = () => reject(err);
  4545. userOnError(err, userRetry, userFail, retries + 1);
  4546. });
  4547. } else {
  4548. throw err;
  4549. }
  4550. }).then((comp) => {
  4551. if (thisRequest !== pendingRequest && pendingRequest) {
  4552. return pendingRequest;
  4553. }
  4554. if (!comp) {
  4555. warn$1(
  4556. `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
  4557. );
  4558. }
  4559. if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
  4560. comp = comp.default;
  4561. }
  4562. if (comp && !isObject(comp) && !isFunction(comp)) {
  4563. throw new Error(`Invalid async component load result: ${comp}`);
  4564. }
  4565. resolvedComp = comp;
  4566. return comp;
  4567. }));
  4568. };
  4569. return defineComponent({
  4570. name: "AsyncComponentWrapper",
  4571. __asyncLoader: load,
  4572. __asyncHydrate(el, instance, hydrate2) {
  4573. let patched = false;
  4574. (instance.bu || (instance.bu = [])).push(() => patched = true);
  4575. const performHydrate = () => {
  4576. if (patched) {
  4577. if (true) {
  4578. warn$1(
  4579. `Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
  4580. );
  4581. }
  4582. return;
  4583. }
  4584. hydrate2();
  4585. };
  4586. const doHydrate = hydrateStrategy ? () => {
  4587. const teardown = hydrateStrategy(
  4588. performHydrate,
  4589. (cb) => forEachElement(el, cb)
  4590. );
  4591. if (teardown) {
  4592. (instance.bum || (instance.bum = [])).push(teardown);
  4593. }
  4594. } : performHydrate;
  4595. if (resolvedComp) {
  4596. doHydrate();
  4597. } else {
  4598. load().then(() => !instance.isUnmounted && doHydrate());
  4599. }
  4600. },
  4601. get __asyncResolved() {
  4602. return resolvedComp;
  4603. },
  4604. setup() {
  4605. const instance = currentInstance;
  4606. markAsyncBoundary(instance);
  4607. if (resolvedComp) {
  4608. return () => createInnerComp(resolvedComp, instance);
  4609. }
  4610. const onError = (err) => {
  4611. pendingRequest = null;
  4612. handleError(
  4613. err,
  4614. instance,
  4615. 13,
  4616. !errorComponent
  4617. );
  4618. };
  4619. if (suspensible && instance.suspense || isInSSRComponentSetup) {
  4620. return load().then((comp) => {
  4621. return () => createInnerComp(comp, instance);
  4622. }).catch((err) => {
  4623. onError(err);
  4624. return () => errorComponent ? createVNode(errorComponent, {
  4625. error: err
  4626. }) : null;
  4627. });
  4628. }
  4629. const loaded = ref(false);
  4630. const error = ref();
  4631. const delayed = ref(!!delay);
  4632. if (delay) {
  4633. setTimeout(() => {
  4634. delayed.value = false;
  4635. }, delay);
  4636. }
  4637. if (timeout != null) {
  4638. setTimeout(() => {
  4639. if (!loaded.value && !error.value) {
  4640. const err = new Error(
  4641. `Async component timed out after ${timeout}ms.`
  4642. );
  4643. onError(err);
  4644. error.value = err;
  4645. }
  4646. }, timeout);
  4647. }
  4648. load().then(() => {
  4649. loaded.value = true;
  4650. if (instance.parent && isKeepAlive(instance.parent.vnode)) {
  4651. instance.parent.update();
  4652. }
  4653. }).catch((err) => {
  4654. onError(err);
  4655. error.value = err;
  4656. });
  4657. return () => {
  4658. if (loaded.value && resolvedComp) {
  4659. return createInnerComp(resolvedComp, instance);
  4660. } else if (error.value && errorComponent) {
  4661. return createVNode(errorComponent, {
  4662. error: error.value
  4663. });
  4664. } else if (loadingComponent && !delayed.value) {
  4665. return createVNode(loadingComponent);
  4666. }
  4667. };
  4668. }
  4669. });
  4670. }
  4671. function createInnerComp(comp, parent) {
  4672. const { ref: ref2, props, children, ce } = parent.vnode;
  4673. const vnode = createVNode(comp, props, children);
  4674. vnode.ref = ref2;
  4675. vnode.ce = ce;
  4676. delete parent.vnode.ce;
  4677. return vnode;
  4678. }
  4679. var isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  4680. var KeepAliveImpl = {
  4681. name: `KeepAlive`,
  4682. // Marker for special handling inside the renderer. We are not using a ===
  4683. // check directly on KeepAlive in the renderer, because importing it directly
  4684. // would prevent it from being tree-shaken.
  4685. __isKeepAlive: true,
  4686. props: {
  4687. include: [String, RegExp, Array],
  4688. exclude: [String, RegExp, Array],
  4689. max: [String, Number]
  4690. },
  4691. setup(props, { slots }) {
  4692. const instance = getCurrentInstance();
  4693. const sharedContext = instance.ctx;
  4694. if (!sharedContext.renderer) {
  4695. return () => {
  4696. const children = slots.default && slots.default();
  4697. return children && children.length === 1 ? children[0] : children;
  4698. };
  4699. }
  4700. const cache = /* @__PURE__ */ new Map();
  4701. const keys = /* @__PURE__ */ new Set();
  4702. let current = null;
  4703. if (true) {
  4704. instance.__v_cache = cache;
  4705. }
  4706. const parentSuspense = instance.suspense;
  4707. const {
  4708. renderer: {
  4709. p: patch,
  4710. m: move,
  4711. um: _unmount,
  4712. o: { createElement }
  4713. }
  4714. } = sharedContext;
  4715. const storageContainer = createElement("div");
  4716. sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
  4717. const instance2 = vnode.component;
  4718. move(vnode, container, anchor, 0, parentSuspense);
  4719. patch(
  4720. instance2.vnode,
  4721. vnode,
  4722. container,
  4723. anchor,
  4724. instance2,
  4725. parentSuspense,
  4726. namespace,
  4727. vnode.slotScopeIds,
  4728. optimized
  4729. );
  4730. queuePostRenderEffect(() => {
  4731. instance2.isDeactivated = false;
  4732. if (instance2.a) {
  4733. invokeArrayFns(instance2.a);
  4734. }
  4735. const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
  4736. if (vnodeHook) {
  4737. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  4738. }
  4739. }, parentSuspense);
  4740. if (true) {
  4741. devtoolsComponentAdded(instance2);
  4742. }
  4743. };
  4744. sharedContext.deactivate = (vnode) => {
  4745. const instance2 = vnode.component;
  4746. invalidateMount(instance2.m);
  4747. invalidateMount(instance2.a);
  4748. move(vnode, storageContainer, null, 1, parentSuspense);
  4749. queuePostRenderEffect(() => {
  4750. if (instance2.da) {
  4751. invokeArrayFns(instance2.da);
  4752. }
  4753. const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
  4754. if (vnodeHook) {
  4755. invokeVNodeHook(vnodeHook, instance2.parent, vnode);
  4756. }
  4757. instance2.isDeactivated = true;
  4758. }, parentSuspense);
  4759. if (true) {
  4760. devtoolsComponentAdded(instance2);
  4761. }
  4762. if (true) {
  4763. instance2.__keepAliveStorageContainer = storageContainer;
  4764. }
  4765. };
  4766. function unmount(vnode) {
  4767. resetShapeFlag(vnode);
  4768. _unmount(vnode, instance, parentSuspense, true);
  4769. }
  4770. function pruneCache(filter) {
  4771. cache.forEach((vnode, key) => {
  4772. const name = getComponentName(vnode.type);
  4773. if (name && !filter(name)) {
  4774. pruneCacheEntry(key);
  4775. }
  4776. });
  4777. }
  4778. function pruneCacheEntry(key) {
  4779. const cached = cache.get(key);
  4780. if (cached && (!current || !isSameVNodeType(cached, current))) {
  4781. unmount(cached);
  4782. } else if (current) {
  4783. resetShapeFlag(current);
  4784. }
  4785. cache.delete(key);
  4786. keys.delete(key);
  4787. }
  4788. watch2(
  4789. () => [props.include, props.exclude],
  4790. ([include, exclude]) => {
  4791. include && pruneCache((name) => matches(include, name));
  4792. exclude && pruneCache((name) => !matches(exclude, name));
  4793. },
  4794. // prune post-render after `current` has been updated
  4795. { flush: "post", deep: true }
  4796. );
  4797. let pendingCacheKey = null;
  4798. const cacheSubtree = () => {
  4799. if (pendingCacheKey != null) {
  4800. if (isSuspense(instance.subTree.type)) {
  4801. queuePostRenderEffect(() => {
  4802. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  4803. }, instance.subTree.suspense);
  4804. } else {
  4805. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  4806. }
  4807. }
  4808. };
  4809. onMounted(cacheSubtree);
  4810. onUpdated(cacheSubtree);
  4811. onBeforeUnmount(() => {
  4812. cache.forEach((cached) => {
  4813. const { subTree, suspense } = instance;
  4814. const vnode = getInnerChild(subTree);
  4815. if (cached.type === vnode.type && cached.key === vnode.key) {
  4816. resetShapeFlag(vnode);
  4817. const da = vnode.component.da;
  4818. da && queuePostRenderEffect(da, suspense);
  4819. return;
  4820. }
  4821. unmount(cached);
  4822. });
  4823. });
  4824. return () => {
  4825. pendingCacheKey = null;
  4826. if (!slots.default) {
  4827. return current = null;
  4828. }
  4829. const children = slots.default();
  4830. const rawVNode = children[0];
  4831. if (children.length > 1) {
  4832. if (true) {
  4833. warn$1(`KeepAlive should contain exactly one component child.`);
  4834. }
  4835. current = null;
  4836. return children;
  4837. } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
  4838. current = null;
  4839. return rawVNode;
  4840. }
  4841. let vnode = getInnerChild(rawVNode);
  4842. if (vnode.type === Comment) {
  4843. current = null;
  4844. return vnode;
  4845. }
  4846. const comp = vnode.type;
  4847. const name = getComponentName(
  4848. isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
  4849. );
  4850. const { include, exclude, max } = props;
  4851. if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
  4852. vnode.shapeFlag &= -257;
  4853. current = vnode;
  4854. return rawVNode;
  4855. }
  4856. const key = vnode.key == null ? comp : vnode.key;
  4857. const cachedVNode = cache.get(key);
  4858. if (vnode.el) {
  4859. vnode = cloneVNode(vnode);
  4860. if (rawVNode.shapeFlag & 128) {
  4861. rawVNode.ssContent = vnode;
  4862. }
  4863. }
  4864. pendingCacheKey = key;
  4865. if (cachedVNode) {
  4866. vnode.el = cachedVNode.el;
  4867. vnode.component = cachedVNode.component;
  4868. if (vnode.transition) {
  4869. setTransitionHooks(vnode, vnode.transition);
  4870. }
  4871. vnode.shapeFlag |= 512;
  4872. keys.delete(key);
  4873. keys.add(key);
  4874. } else {
  4875. keys.add(key);
  4876. if (max && keys.size > parseInt(max, 10)) {
  4877. pruneCacheEntry(keys.values().next().value);
  4878. }
  4879. }
  4880. vnode.shapeFlag |= 256;
  4881. current = vnode;
  4882. return isSuspense(rawVNode.type) ? rawVNode : vnode;
  4883. };
  4884. }
  4885. };
  4886. var KeepAlive = KeepAliveImpl;
  4887. function matches(pattern, name) {
  4888. if (isArray(pattern)) {
  4889. return pattern.some((p2) => matches(p2, name));
  4890. } else if (isString(pattern)) {
  4891. return pattern.split(",").includes(name);
  4892. } else if (isRegExp(pattern)) {
  4893. pattern.lastIndex = 0;
  4894. return pattern.test(name);
  4895. }
  4896. return false;
  4897. }
  4898. function onActivated(hook, target) {
  4899. registerKeepAliveHook(hook, "a", target);
  4900. }
  4901. function onDeactivated(hook, target) {
  4902. registerKeepAliveHook(hook, "da", target);
  4903. }
  4904. function registerKeepAliveHook(hook, type, target = currentInstance) {
  4905. const wrappedHook = hook.__wdc || (hook.__wdc = () => {
  4906. let current = target;
  4907. while (current) {
  4908. if (current.isDeactivated) {
  4909. return;
  4910. }
  4911. current = current.parent;
  4912. }
  4913. return hook();
  4914. });
  4915. injectHook(type, wrappedHook, target);
  4916. if (target) {
  4917. let current = target.parent;
  4918. while (current && current.parent) {
  4919. if (isKeepAlive(current.parent.vnode)) {
  4920. injectToKeepAliveRoot(wrappedHook, type, target, current);
  4921. }
  4922. current = current.parent;
  4923. }
  4924. }
  4925. }
  4926. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  4927. const injected = injectHook(
  4928. type,
  4929. hook,
  4930. keepAliveRoot,
  4931. true
  4932. /* prepend */
  4933. );
  4934. onUnmounted(() => {
  4935. remove(keepAliveRoot[type], injected);
  4936. }, target);
  4937. }
  4938. function resetShapeFlag(vnode) {
  4939. vnode.shapeFlag &= -257;
  4940. vnode.shapeFlag &= -513;
  4941. }
  4942. function getInnerChild(vnode) {
  4943. return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
  4944. }
  4945. function injectHook(type, hook, target = currentInstance, prepend = false) {
  4946. if (target) {
  4947. const hooks = target[type] || (target[type] = []);
  4948. const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
  4949. pauseTracking();
  4950. const reset = setCurrentInstance(target);
  4951. const res = callWithAsyncErrorHandling(hook, target, type, args);
  4952. reset();
  4953. resetTracking();
  4954. return res;
  4955. });
  4956. if (prepend) {
  4957. hooks.unshift(wrappedHook);
  4958. } else {
  4959. hooks.push(wrappedHook);
  4960. }
  4961. return wrappedHook;
  4962. } else if (true) {
  4963. const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
  4964. warn$1(
  4965. `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`
  4966. );
  4967. }
  4968. }
  4969. var createHook = (lifecycle) => (hook, target = currentInstance) => {
  4970. if (!isInSSRComponentSetup || lifecycle === "sp") {
  4971. injectHook(lifecycle, (...args) => hook(...args), target);
  4972. }
  4973. };
  4974. var onBeforeMount = createHook("bm");
  4975. var onMounted = createHook("m");
  4976. var onBeforeUpdate = createHook(
  4977. "bu"
  4978. );
  4979. var onUpdated = createHook("u");
  4980. var onBeforeUnmount = createHook(
  4981. "bum"
  4982. );
  4983. var onUnmounted = createHook("um");
  4984. var onServerPrefetch = createHook(
  4985. "sp"
  4986. );
  4987. var onRenderTriggered = createHook("rtg");
  4988. var onRenderTracked = createHook("rtc");
  4989. function onErrorCaptured(hook, target = currentInstance) {
  4990. injectHook("ec", hook, target);
  4991. }
  4992. var COMPONENTS = "components";
  4993. var DIRECTIVES = "directives";
  4994. function resolveComponent(name, maybeSelfReference) {
  4995. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  4996. }
  4997. var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
  4998. function resolveDynamicComponent(component) {
  4999. if (isString(component)) {
  5000. return resolveAsset(COMPONENTS, component, false) || component;
  5001. } else {
  5002. return component || NULL_DYNAMIC_COMPONENT;
  5003. }
  5004. }
  5005. function resolveDirective(name) {
  5006. return resolveAsset(DIRECTIVES, name);
  5007. }
  5008. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  5009. const instance = currentRenderingInstance || currentInstance;
  5010. if (instance) {
  5011. const Component = instance.type;
  5012. if (type === COMPONENTS) {
  5013. const selfName = getComponentName(
  5014. Component,
  5015. false
  5016. );
  5017. if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
  5018. return Component;
  5019. }
  5020. }
  5021. const res = (
  5022. // local registration
  5023. // check instance[type] first which is resolved for options API
  5024. resolve(instance[type] || Component[type], name) || // global registration
  5025. resolve(instance.appContext[type], name)
  5026. );
  5027. if (!res && maybeSelfReference) {
  5028. return Component;
  5029. }
  5030. if (warnMissing && !res) {
  5031. const extra = type === COMPONENTS ? `
  5032. If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
  5033. warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
  5034. }
  5035. return res;
  5036. } else if (true) {
  5037. warn$1(
  5038. `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
  5039. );
  5040. }
  5041. }
  5042. function resolve(registry, name) {
  5043. return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
  5044. }
  5045. function renderList(source, renderItem, cache, index) {
  5046. let ret;
  5047. const cached = cache && cache[index];
  5048. const sourceIsArray = isArray(source);
  5049. if (sourceIsArray || isString(source)) {
  5050. const sourceIsReactiveArray = sourceIsArray && isReactive(source);
  5051. let needsWrap = false;
  5052. let isReadonlySource = false;
  5053. if (sourceIsReactiveArray) {
  5054. needsWrap = !isShallow(source);
  5055. isReadonlySource = isReadonly(source);
  5056. source = shallowReadArray(source);
  5057. }
  5058. ret = new Array(source.length);
  5059. for (let i = 0, l = source.length; i < l; i++) {
  5060. ret[i] = renderItem(
  5061. needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
  5062. i,
  5063. void 0,
  5064. cached && cached[i]
  5065. );
  5066. }
  5067. } else if (typeof source === "number") {
  5068. if (!Number.isInteger(source)) {
  5069. warn$1(`The v-for range expect an integer value but got ${source}.`);
  5070. }
  5071. ret = new Array(source);
  5072. for (let i = 0; i < source; i++) {
  5073. ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
  5074. }
  5075. } else if (isObject(source)) {
  5076. if (source[Symbol.iterator]) {
  5077. ret = Array.from(
  5078. source,
  5079. (item, i) => renderItem(item, i, void 0, cached && cached[i])
  5080. );
  5081. } else {
  5082. const keys = Object.keys(source);
  5083. ret = new Array(keys.length);
  5084. for (let i = 0, l = keys.length; i < l; i++) {
  5085. const key = keys[i];
  5086. ret[i] = renderItem(source[key], key, i, cached && cached[i]);
  5087. }
  5088. }
  5089. } else {
  5090. ret = [];
  5091. }
  5092. if (cache) {
  5093. cache[index] = ret;
  5094. }
  5095. return ret;
  5096. }
  5097. function createSlots(slots, dynamicSlots) {
  5098. for (let i = 0; i < dynamicSlots.length; i++) {
  5099. const slot = dynamicSlots[i];
  5100. if (isArray(slot)) {
  5101. for (let j = 0; j < slot.length; j++) {
  5102. slots[slot[j].name] = slot[j].fn;
  5103. }
  5104. } else if (slot) {
  5105. slots[slot.name] = slot.key ? (...args) => {
  5106. const res = slot.fn(...args);
  5107. if (res) res.key = slot.key;
  5108. return res;
  5109. } : slot.fn;
  5110. }
  5111. }
  5112. return slots;
  5113. }
  5114. function renderSlot(slots, name, props = {}, fallback, noSlotted) {
  5115. if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
  5116. if (name !== "default") props.name = name;
  5117. return openBlock(), createBlock(
  5118. Fragment,
  5119. null,
  5120. [createVNode("slot", props, fallback && fallback())],
  5121. 64
  5122. );
  5123. }
  5124. let slot = slots[name];
  5125. if (slot && slot.length > 1) {
  5126. warn$1(
  5127. `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`
  5128. );
  5129. slot = () => [];
  5130. }
  5131. if (slot && slot._c) {
  5132. slot._d = false;
  5133. }
  5134. openBlock();
  5135. const validSlotContent = slot && ensureValidVNode(slot(props));
  5136. const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
  5137. // key attached in the `createSlots` helper, respect that
  5138. validSlotContent && validSlotContent.key;
  5139. const rendered = createBlock(
  5140. Fragment,
  5141. {
  5142. key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
  5143. (!validSlotContent && fallback ? "_fb" : "")
  5144. },
  5145. validSlotContent || (fallback ? fallback() : []),
  5146. validSlotContent && slots._ === 1 ? 64 : -2
  5147. );
  5148. if (!noSlotted && rendered.scopeId) {
  5149. rendered.slotScopeIds = [rendered.scopeId + "-s"];
  5150. }
  5151. if (slot && slot._c) {
  5152. slot._d = true;
  5153. }
  5154. return rendered;
  5155. }
  5156. function ensureValidVNode(vnodes) {
  5157. return vnodes.some((child) => {
  5158. if (!isVNode(child)) return true;
  5159. if (child.type === Comment) return false;
  5160. if (child.type === Fragment && !ensureValidVNode(child.children))
  5161. return false;
  5162. return true;
  5163. }) ? vnodes : null;
  5164. }
  5165. function toHandlers(obj, preserveCaseIfNecessary) {
  5166. const ret = {};
  5167. if (!isObject(obj)) {
  5168. warn$1(`v-on with no argument expects an object value.`);
  5169. return ret;
  5170. }
  5171. for (const key in obj) {
  5172. ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
  5173. }
  5174. return ret;
  5175. }
  5176. var getPublicInstance = (i) => {
  5177. if (!i) return null;
  5178. if (isStatefulComponent(i)) return getComponentPublicInstance(i);
  5179. return getPublicInstance(i.parent);
  5180. };
  5181. var publicPropertiesMap = (
  5182. // Move PURE marker to new line to workaround compiler discarding it
  5183. // due to type annotation
  5184. extend(/* @__PURE__ */ Object.create(null), {
  5185. $: (i) => i,
  5186. $el: (i) => i.vnode.el,
  5187. $data: (i) => i.data,
  5188. $props: (i) => true ? shallowReadonly(i.props) : i.props,
  5189. $attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs,
  5190. $slots: (i) => true ? shallowReadonly(i.slots) : i.slots,
  5191. $refs: (i) => true ? shallowReadonly(i.refs) : i.refs,
  5192. $parent: (i) => getPublicInstance(i.parent),
  5193. $root: (i) => getPublicInstance(i.root),
  5194. $host: (i) => i.ce,
  5195. $emit: (i) => i.emit,
  5196. $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
  5197. $forceUpdate: (i) => i.f || (i.f = () => {
  5198. queueJob(i.update);
  5199. }),
  5200. $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
  5201. $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
  5202. })
  5203. );
  5204. var isReservedPrefix = (key) => key === "_" || key === "$";
  5205. var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
  5206. var PublicInstanceProxyHandlers = {
  5207. get({ _: instance }, key) {
  5208. if (key === "__v_skip") {
  5209. return true;
  5210. }
  5211. const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
  5212. if (key === "__isVue") {
  5213. return true;
  5214. }
  5215. let normalizedProps;
  5216. if (key[0] !== "$") {
  5217. const n = accessCache[key];
  5218. if (n !== void 0) {
  5219. switch (n) {
  5220. case 1:
  5221. return setupState[key];
  5222. case 2:
  5223. return data[key];
  5224. case 4:
  5225. return ctx[key];
  5226. case 3:
  5227. return props[key];
  5228. }
  5229. } else if (hasSetupBinding(setupState, key)) {
  5230. accessCache[key] = 1;
  5231. return setupState[key];
  5232. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  5233. accessCache[key] = 2;
  5234. return data[key];
  5235. } else if (
  5236. // only cache other properties when instance has declared (thus stable)
  5237. // props
  5238. (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
  5239. ) {
  5240. accessCache[key] = 3;
  5241. return props[key];
  5242. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  5243. accessCache[key] = 4;
  5244. return ctx[key];
  5245. } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
  5246. accessCache[key] = 0;
  5247. }
  5248. }
  5249. const publicGetter = publicPropertiesMap[key];
  5250. let cssModule, globalProperties;
  5251. if (publicGetter) {
  5252. if (key === "$attrs") {
  5253. track(instance.attrs, "get", "");
  5254. markAttrsAccessed();
  5255. } else if (key === "$slots") {
  5256. track(instance, "get", key);
  5257. }
  5258. return publicGetter(instance);
  5259. } else if (
  5260. // css module (injected by vue-loader)
  5261. (cssModule = type.__cssModules) && (cssModule = cssModule[key])
  5262. ) {
  5263. return cssModule;
  5264. } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
  5265. accessCache[key] = 4;
  5266. return ctx[key];
  5267. } else if (
  5268. // global properties
  5269. globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
  5270. ) {
  5271. {
  5272. return globalProperties[key];
  5273. }
  5274. } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
  5275. // to infinite warning loop
  5276. key.indexOf("__v") !== 0)) {
  5277. if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
  5278. warn$1(
  5279. `Property ${JSON.stringify(
  5280. key
  5281. )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
  5282. );
  5283. } else if (instance === currentRenderingInstance) {
  5284. warn$1(
  5285. `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
  5286. );
  5287. }
  5288. }
  5289. },
  5290. set({ _: instance }, key, value) {
  5291. const { data, setupState, ctx } = instance;
  5292. if (hasSetupBinding(setupState, key)) {
  5293. setupState[key] = value;
  5294. return true;
  5295. } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
  5296. warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
  5297. return false;
  5298. } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
  5299. data[key] = value;
  5300. return true;
  5301. } else if (hasOwn(instance.props, key)) {
  5302. warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
  5303. return false;
  5304. }
  5305. if (key[0] === "$" && key.slice(1) in instance) {
  5306. warn$1(
  5307. `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
  5308. );
  5309. return false;
  5310. } else {
  5311. if (key in instance.appContext.config.globalProperties) {
  5312. Object.defineProperty(ctx, key, {
  5313. enumerable: true,
  5314. configurable: true,
  5315. value
  5316. });
  5317. } else {
  5318. ctx[key] = value;
  5319. }
  5320. }
  5321. return true;
  5322. },
  5323. has({
  5324. _: { data, setupState, accessCache, ctx, appContext, propsOptions }
  5325. }, key) {
  5326. let normalizedProps;
  5327. return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
  5328. },
  5329. defineProperty(target, key, descriptor) {
  5330. if (descriptor.get != null) {
  5331. target._.accessCache[key] = 0;
  5332. } else if (hasOwn(descriptor, "value")) {
  5333. this.set(target, key, descriptor.value, null);
  5334. }
  5335. return Reflect.defineProperty(target, key, descriptor);
  5336. }
  5337. };
  5338. if (true) {
  5339. PublicInstanceProxyHandlers.ownKeys = (target) => {
  5340. warn$1(
  5341. `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
  5342. );
  5343. return Reflect.ownKeys(target);
  5344. };
  5345. }
  5346. var RuntimeCompiledPublicInstanceProxyHandlers = extend({}, PublicInstanceProxyHandlers, {
  5347. get(target, key) {
  5348. if (key === Symbol.unscopables) {
  5349. return;
  5350. }
  5351. return PublicInstanceProxyHandlers.get(target, key, target);
  5352. },
  5353. has(_, key) {
  5354. const has = key[0] !== "_" && !isGloballyAllowed(key);
  5355. if (!has && PublicInstanceProxyHandlers.has(_, key)) {
  5356. warn$1(
  5357. `Property ${JSON.stringify(
  5358. key
  5359. )} should not start with _ which is a reserved prefix for Vue internals.`
  5360. );
  5361. }
  5362. return has;
  5363. }
  5364. });
  5365. function createDevRenderContext(instance) {
  5366. const target = {};
  5367. Object.defineProperty(target, `_`, {
  5368. configurable: true,
  5369. enumerable: false,
  5370. get: () => instance
  5371. });
  5372. Object.keys(publicPropertiesMap).forEach((key) => {
  5373. Object.defineProperty(target, key, {
  5374. configurable: true,
  5375. enumerable: false,
  5376. get: () => publicPropertiesMap[key](instance),
  5377. // intercepted by the proxy so no need for implementation,
  5378. // but needed to prevent set errors
  5379. set: NOOP
  5380. });
  5381. });
  5382. return target;
  5383. }
  5384. function exposePropsOnRenderContext(instance) {
  5385. const {
  5386. ctx,
  5387. propsOptions: [propsOptions]
  5388. } = instance;
  5389. if (propsOptions) {
  5390. Object.keys(propsOptions).forEach((key) => {
  5391. Object.defineProperty(ctx, key, {
  5392. enumerable: true,
  5393. configurable: true,
  5394. get: () => instance.props[key],
  5395. set: NOOP
  5396. });
  5397. });
  5398. }
  5399. }
  5400. function exposeSetupStateOnRenderContext(instance) {
  5401. const { ctx, setupState } = instance;
  5402. Object.keys(toRaw(setupState)).forEach((key) => {
  5403. if (!setupState.__isScriptSetup) {
  5404. if (isReservedPrefix(key[0])) {
  5405. warn$1(
  5406. `setup() return property ${JSON.stringify(
  5407. key
  5408. )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
  5409. );
  5410. return;
  5411. }
  5412. Object.defineProperty(ctx, key, {
  5413. enumerable: true,
  5414. configurable: true,
  5415. get: () => setupState[key],
  5416. set: NOOP
  5417. });
  5418. }
  5419. });
  5420. }
  5421. var warnRuntimeUsage = (method) => warn$1(
  5422. `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
  5423. );
  5424. function defineProps() {
  5425. if (true) {
  5426. warnRuntimeUsage(`defineProps`);
  5427. }
  5428. return null;
  5429. }
  5430. function defineEmits() {
  5431. if (true) {
  5432. warnRuntimeUsage(`defineEmits`);
  5433. }
  5434. return null;
  5435. }
  5436. function defineExpose(exposed) {
  5437. if (true) {
  5438. warnRuntimeUsage(`defineExpose`);
  5439. }
  5440. }
  5441. function defineOptions(options) {
  5442. if (true) {
  5443. warnRuntimeUsage(`defineOptions`);
  5444. }
  5445. }
  5446. function defineSlots() {
  5447. if (true) {
  5448. warnRuntimeUsage(`defineSlots`);
  5449. }
  5450. return null;
  5451. }
  5452. function defineModel() {
  5453. if (true) {
  5454. warnRuntimeUsage("defineModel");
  5455. }
  5456. }
  5457. function withDefaults(props, defaults) {
  5458. if (true) {
  5459. warnRuntimeUsage(`withDefaults`);
  5460. }
  5461. return null;
  5462. }
  5463. function useSlots() {
  5464. return getContext("useSlots").slots;
  5465. }
  5466. function useAttrs() {
  5467. return getContext("useAttrs").attrs;
  5468. }
  5469. function getContext(calledFunctionName) {
  5470. const i = getCurrentInstance();
  5471. if (!i) {
  5472. warn$1(`${calledFunctionName}() called without active instance.`);
  5473. }
  5474. return i.setupContext || (i.setupContext = createSetupContext(i));
  5475. }
  5476. function normalizePropsOrEmits(props) {
  5477. return isArray(props) ? props.reduce(
  5478. (normalized, p2) => (normalized[p2] = null, normalized),
  5479. {}
  5480. ) : props;
  5481. }
  5482. function mergeDefaults(raw, defaults) {
  5483. const props = normalizePropsOrEmits(raw);
  5484. for (const key in defaults) {
  5485. if (key.startsWith("__skip")) continue;
  5486. let opt = props[key];
  5487. if (opt) {
  5488. if (isArray(opt) || isFunction(opt)) {
  5489. opt = props[key] = { type: opt, default: defaults[key] };
  5490. } else {
  5491. opt.default = defaults[key];
  5492. }
  5493. } else if (opt === null) {
  5494. opt = props[key] = { default: defaults[key] };
  5495. } else if (true) {
  5496. warn$1(`props default key "${key}" has no corresponding declaration.`);
  5497. }
  5498. if (opt && defaults[`__skip_${key}`]) {
  5499. opt.skipFactory = true;
  5500. }
  5501. }
  5502. return props;
  5503. }
  5504. function mergeModels(a, b) {
  5505. if (!a || !b) return a || b;
  5506. if (isArray(a) && isArray(b)) return a.concat(b);
  5507. return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
  5508. }
  5509. function createPropsRestProxy(props, excludedKeys) {
  5510. const ret = {};
  5511. for (const key in props) {
  5512. if (!excludedKeys.includes(key)) {
  5513. Object.defineProperty(ret, key, {
  5514. enumerable: true,
  5515. get: () => props[key]
  5516. });
  5517. }
  5518. }
  5519. return ret;
  5520. }
  5521. function withAsyncContext(getAwaitable) {
  5522. const ctx = getCurrentInstance();
  5523. if (!ctx) {
  5524. warn$1(
  5525. `withAsyncContext called without active current instance. This is likely a bug.`
  5526. );
  5527. }
  5528. let awaitable = getAwaitable();
  5529. unsetCurrentInstance();
  5530. if (isPromise(awaitable)) {
  5531. awaitable = awaitable.catch((e) => {
  5532. setCurrentInstance(ctx);
  5533. throw e;
  5534. });
  5535. }
  5536. return [awaitable, () => setCurrentInstance(ctx)];
  5537. }
  5538. function createDuplicateChecker() {
  5539. const cache = /* @__PURE__ */ Object.create(null);
  5540. return (type, key) => {
  5541. if (cache[key]) {
  5542. warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
  5543. } else {
  5544. cache[key] = type;
  5545. }
  5546. };
  5547. }
  5548. var shouldCacheAccess = true;
  5549. function applyOptions(instance) {
  5550. const options = resolveMergedOptions(instance);
  5551. const publicThis = instance.proxy;
  5552. const ctx = instance.ctx;
  5553. shouldCacheAccess = false;
  5554. if (options.beforeCreate) {
  5555. callHook(options.beforeCreate, instance, "bc");
  5556. }
  5557. const {
  5558. // state
  5559. data: dataOptions,
  5560. computed: computedOptions,
  5561. methods,
  5562. watch: watchOptions,
  5563. provide: provideOptions,
  5564. inject: injectOptions,
  5565. // lifecycle
  5566. created,
  5567. beforeMount,
  5568. mounted,
  5569. beforeUpdate,
  5570. updated,
  5571. activated,
  5572. deactivated,
  5573. beforeDestroy,
  5574. beforeUnmount,
  5575. destroyed,
  5576. unmounted,
  5577. render: render2,
  5578. renderTracked,
  5579. renderTriggered,
  5580. errorCaptured,
  5581. serverPrefetch,
  5582. // public API
  5583. expose,
  5584. inheritAttrs,
  5585. // assets
  5586. components,
  5587. directives,
  5588. filters
  5589. } = options;
  5590. const checkDuplicateProperties = true ? createDuplicateChecker() : null;
  5591. if (true) {
  5592. const [propsOptions] = instance.propsOptions;
  5593. if (propsOptions) {
  5594. for (const key in propsOptions) {
  5595. checkDuplicateProperties("Props", key);
  5596. }
  5597. }
  5598. }
  5599. if (injectOptions) {
  5600. resolveInjections(injectOptions, ctx, checkDuplicateProperties);
  5601. }
  5602. if (methods) {
  5603. for (const key in methods) {
  5604. const methodHandler = methods[key];
  5605. if (isFunction(methodHandler)) {
  5606. if (true) {
  5607. Object.defineProperty(ctx, key, {
  5608. value: methodHandler.bind(publicThis),
  5609. configurable: true,
  5610. enumerable: true,
  5611. writable: true
  5612. });
  5613. } else {
  5614. ctx[key] = methodHandler.bind(publicThis);
  5615. }
  5616. if (true) {
  5617. checkDuplicateProperties("Methods", key);
  5618. }
  5619. } else if (true) {
  5620. warn$1(
  5621. `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
  5622. );
  5623. }
  5624. }
  5625. }
  5626. if (dataOptions) {
  5627. if (!isFunction(dataOptions)) {
  5628. warn$1(
  5629. `The data option must be a function. Plain object usage is no longer supported.`
  5630. );
  5631. }
  5632. const data = dataOptions.call(publicThis, publicThis);
  5633. if (isPromise(data)) {
  5634. warn$1(
  5635. `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
  5636. );
  5637. }
  5638. if (!isObject(data)) {
  5639. warn$1(`data() should return an object.`);
  5640. } else {
  5641. instance.data = reactive(data);
  5642. if (true) {
  5643. for (const key in data) {
  5644. checkDuplicateProperties("Data", key);
  5645. if (!isReservedPrefix(key[0])) {
  5646. Object.defineProperty(ctx, key, {
  5647. configurable: true,
  5648. enumerable: true,
  5649. get: () => data[key],
  5650. set: NOOP
  5651. });
  5652. }
  5653. }
  5654. }
  5655. }
  5656. }
  5657. shouldCacheAccess = true;
  5658. if (computedOptions) {
  5659. for (const key in computedOptions) {
  5660. const opt = computedOptions[key];
  5661. const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
  5662. if (get === NOOP) {
  5663. warn$1(`Computed property "${key}" has no getter.`);
  5664. }
  5665. const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : true ? () => {
  5666. warn$1(
  5667. `Write operation failed: computed property "${key}" is readonly.`
  5668. );
  5669. } : NOOP;
  5670. const c = computed2({
  5671. get,
  5672. set
  5673. });
  5674. Object.defineProperty(ctx, key, {
  5675. enumerable: true,
  5676. configurable: true,
  5677. get: () => c.value,
  5678. set: (v) => c.value = v
  5679. });
  5680. if (true) {
  5681. checkDuplicateProperties("Computed", key);
  5682. }
  5683. }
  5684. }
  5685. if (watchOptions) {
  5686. for (const key in watchOptions) {
  5687. createWatcher(watchOptions[key], ctx, publicThis, key);
  5688. }
  5689. }
  5690. if (provideOptions) {
  5691. const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
  5692. Reflect.ownKeys(provides).forEach((key) => {
  5693. provide(key, provides[key]);
  5694. });
  5695. }
  5696. if (created) {
  5697. callHook(created, instance, "c");
  5698. }
  5699. function registerLifecycleHook(register, hook) {
  5700. if (isArray(hook)) {
  5701. hook.forEach((_hook) => register(_hook.bind(publicThis)));
  5702. } else if (hook) {
  5703. register(hook.bind(publicThis));
  5704. }
  5705. }
  5706. registerLifecycleHook(onBeforeMount, beforeMount);
  5707. registerLifecycleHook(onMounted, mounted);
  5708. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  5709. registerLifecycleHook(onUpdated, updated);
  5710. registerLifecycleHook(onActivated, activated);
  5711. registerLifecycleHook(onDeactivated, deactivated);
  5712. registerLifecycleHook(onErrorCaptured, errorCaptured);
  5713. registerLifecycleHook(onRenderTracked, renderTracked);
  5714. registerLifecycleHook(onRenderTriggered, renderTriggered);
  5715. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  5716. registerLifecycleHook(onUnmounted, unmounted);
  5717. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  5718. if (isArray(expose)) {
  5719. if (expose.length) {
  5720. const exposed = instance.exposed || (instance.exposed = {});
  5721. expose.forEach((key) => {
  5722. Object.defineProperty(exposed, key, {
  5723. get: () => publicThis[key],
  5724. set: (val) => publicThis[key] = val,
  5725. enumerable: true
  5726. });
  5727. });
  5728. } else if (!instance.exposed) {
  5729. instance.exposed = {};
  5730. }
  5731. }
  5732. if (render2 && instance.render === NOOP) {
  5733. instance.render = render2;
  5734. }
  5735. if (inheritAttrs != null) {
  5736. instance.inheritAttrs = inheritAttrs;
  5737. }
  5738. if (components) instance.components = components;
  5739. if (directives) instance.directives = directives;
  5740. if (serverPrefetch) {
  5741. markAsyncBoundary(instance);
  5742. }
  5743. }
  5744. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
  5745. if (isArray(injectOptions)) {
  5746. injectOptions = normalizeInject(injectOptions);
  5747. }
  5748. for (const key in injectOptions) {
  5749. const opt = injectOptions[key];
  5750. let injected;
  5751. if (isObject(opt)) {
  5752. if ("default" in opt) {
  5753. injected = inject(
  5754. opt.from || key,
  5755. opt.default,
  5756. true
  5757. );
  5758. } else {
  5759. injected = inject(opt.from || key);
  5760. }
  5761. } else {
  5762. injected = inject(opt);
  5763. }
  5764. if (isRef2(injected)) {
  5765. Object.defineProperty(ctx, key, {
  5766. enumerable: true,
  5767. configurable: true,
  5768. get: () => injected.value,
  5769. set: (v) => injected.value = v
  5770. });
  5771. } else {
  5772. ctx[key] = injected;
  5773. }
  5774. if (true) {
  5775. checkDuplicateProperties("Inject", key);
  5776. }
  5777. }
  5778. }
  5779. function callHook(hook, instance, type) {
  5780. callWithAsyncErrorHandling(
  5781. isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
  5782. instance,
  5783. type
  5784. );
  5785. }
  5786. function createWatcher(raw, ctx, publicThis, key) {
  5787. let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
  5788. if (isString(raw)) {
  5789. const handler = ctx[raw];
  5790. if (isFunction(handler)) {
  5791. {
  5792. watch2(getter, handler);
  5793. }
  5794. } else if (true) {
  5795. warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
  5796. }
  5797. } else if (isFunction(raw)) {
  5798. {
  5799. watch2(getter, raw.bind(publicThis));
  5800. }
  5801. } else if (isObject(raw)) {
  5802. if (isArray(raw)) {
  5803. raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
  5804. } else {
  5805. const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
  5806. if (isFunction(handler)) {
  5807. watch2(getter, handler, raw);
  5808. } else if (true) {
  5809. warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  5810. }
  5811. }
  5812. } else if (true) {
  5813. warn$1(`Invalid watch option: "${key}"`, raw);
  5814. }
  5815. }
  5816. function resolveMergedOptions(instance) {
  5817. const base = instance.type;
  5818. const { mixins, extends: extendsOptions } = base;
  5819. const {
  5820. mixins: globalMixins,
  5821. optionsCache: cache,
  5822. config: { optionMergeStrategies }
  5823. } = instance.appContext;
  5824. const cached = cache.get(base);
  5825. let resolved;
  5826. if (cached) {
  5827. resolved = cached;
  5828. } else if (!globalMixins.length && !mixins && !extendsOptions) {
  5829. {
  5830. resolved = base;
  5831. }
  5832. } else {
  5833. resolved = {};
  5834. if (globalMixins.length) {
  5835. globalMixins.forEach(
  5836. (m) => mergeOptions(resolved, m, optionMergeStrategies, true)
  5837. );
  5838. }
  5839. mergeOptions(resolved, base, optionMergeStrategies);
  5840. }
  5841. if (isObject(base)) {
  5842. cache.set(base, resolved);
  5843. }
  5844. return resolved;
  5845. }
  5846. function mergeOptions(to, from, strats, asMixin = false) {
  5847. const { mixins, extends: extendsOptions } = from;
  5848. if (extendsOptions) {
  5849. mergeOptions(to, extendsOptions, strats, true);
  5850. }
  5851. if (mixins) {
  5852. mixins.forEach(
  5853. (m) => mergeOptions(to, m, strats, true)
  5854. );
  5855. }
  5856. for (const key in from) {
  5857. if (asMixin && key === "expose") {
  5858. warn$1(
  5859. `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
  5860. );
  5861. } else {
  5862. const strat = internalOptionMergeStrats[key] || strats && strats[key];
  5863. to[key] = strat ? strat(to[key], from[key]) : from[key];
  5864. }
  5865. }
  5866. return to;
  5867. }
  5868. var internalOptionMergeStrats = {
  5869. data: mergeDataFn,
  5870. props: mergeEmitsOrPropsOptions,
  5871. emits: mergeEmitsOrPropsOptions,
  5872. // objects
  5873. methods: mergeObjectOptions,
  5874. computed: mergeObjectOptions,
  5875. // lifecycle
  5876. beforeCreate: mergeAsArray,
  5877. created: mergeAsArray,
  5878. beforeMount: mergeAsArray,
  5879. mounted: mergeAsArray,
  5880. beforeUpdate: mergeAsArray,
  5881. updated: mergeAsArray,
  5882. beforeDestroy: mergeAsArray,
  5883. beforeUnmount: mergeAsArray,
  5884. destroyed: mergeAsArray,
  5885. unmounted: mergeAsArray,
  5886. activated: mergeAsArray,
  5887. deactivated: mergeAsArray,
  5888. errorCaptured: mergeAsArray,
  5889. serverPrefetch: mergeAsArray,
  5890. // assets
  5891. components: mergeObjectOptions,
  5892. directives: mergeObjectOptions,
  5893. // watch
  5894. watch: mergeWatchOptions,
  5895. // provide / inject
  5896. provide: mergeDataFn,
  5897. inject: mergeInject
  5898. };
  5899. function mergeDataFn(to, from) {
  5900. if (!from) {
  5901. return to;
  5902. }
  5903. if (!to) {
  5904. return from;
  5905. }
  5906. return function mergedDataFn() {
  5907. return extend(
  5908. isFunction(to) ? to.call(this, this) : to,
  5909. isFunction(from) ? from.call(this, this) : from
  5910. );
  5911. };
  5912. }
  5913. function mergeInject(to, from) {
  5914. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  5915. }
  5916. function normalizeInject(raw) {
  5917. if (isArray(raw)) {
  5918. const res = {};
  5919. for (let i = 0; i < raw.length; i++) {
  5920. res[raw[i]] = raw[i];
  5921. }
  5922. return res;
  5923. }
  5924. return raw;
  5925. }
  5926. function mergeAsArray(to, from) {
  5927. return to ? [...new Set([].concat(to, from))] : from;
  5928. }
  5929. function mergeObjectOptions(to, from) {
  5930. return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
  5931. }
  5932. function mergeEmitsOrPropsOptions(to, from) {
  5933. if (to) {
  5934. if (isArray(to) && isArray(from)) {
  5935. return [.../* @__PURE__ */ new Set([...to, ...from])];
  5936. }
  5937. return extend(
  5938. /* @__PURE__ */ Object.create(null),
  5939. normalizePropsOrEmits(to),
  5940. normalizePropsOrEmits(from != null ? from : {})
  5941. );
  5942. } else {
  5943. return from;
  5944. }
  5945. }
  5946. function mergeWatchOptions(to, from) {
  5947. if (!to) return from;
  5948. if (!from) return to;
  5949. const merged = extend(/* @__PURE__ */ Object.create(null), to);
  5950. for (const key in from) {
  5951. merged[key] = mergeAsArray(to[key], from[key]);
  5952. }
  5953. return merged;
  5954. }
  5955. function createAppContext() {
  5956. return {
  5957. app: null,
  5958. config: {
  5959. isNativeTag: NO,
  5960. performance: false,
  5961. globalProperties: {},
  5962. optionMergeStrategies: {},
  5963. errorHandler: void 0,
  5964. warnHandler: void 0,
  5965. compilerOptions: {}
  5966. },
  5967. mixins: [],
  5968. components: {},
  5969. directives: {},
  5970. provides: /* @__PURE__ */ Object.create(null),
  5971. optionsCache: /* @__PURE__ */ new WeakMap(),
  5972. propsCache: /* @__PURE__ */ new WeakMap(),
  5973. emitsCache: /* @__PURE__ */ new WeakMap()
  5974. };
  5975. }
  5976. var uid$1 = 0;
  5977. function createAppAPI(render2, hydrate2) {
  5978. return function createApp2(rootComponent, rootProps = null) {
  5979. if (!isFunction(rootComponent)) {
  5980. rootComponent = extend({}, rootComponent);
  5981. }
  5982. if (rootProps != null && !isObject(rootProps)) {
  5983. warn$1(`root props passed to app.mount() must be an object.`);
  5984. rootProps = null;
  5985. }
  5986. const context = createAppContext();
  5987. const installedPlugins = /* @__PURE__ */ new WeakSet();
  5988. const pluginCleanupFns = [];
  5989. let isMounted = false;
  5990. const app = context.app = {
  5991. _uid: uid$1++,
  5992. _component: rootComponent,
  5993. _props: rootProps,
  5994. _container: null,
  5995. _context: context,
  5996. _instance: null,
  5997. version,
  5998. get config() {
  5999. return context.config;
  6000. },
  6001. set config(v) {
  6002. if (true) {
  6003. warn$1(
  6004. `app.config cannot be replaced. Modify individual options instead.`
  6005. );
  6006. }
  6007. },
  6008. use(plugin, ...options) {
  6009. if (installedPlugins.has(plugin)) {
  6010. warn$1(`Plugin has already been applied to target app.`);
  6011. } else if (plugin && isFunction(plugin.install)) {
  6012. installedPlugins.add(plugin);
  6013. plugin.install(app, ...options);
  6014. } else if (isFunction(plugin)) {
  6015. installedPlugins.add(plugin);
  6016. plugin(app, ...options);
  6017. } else if (true) {
  6018. warn$1(
  6019. `A plugin must either be a function or an object with an "install" function.`
  6020. );
  6021. }
  6022. return app;
  6023. },
  6024. mixin(mixin) {
  6025. if (__VUE_OPTIONS_API__) {
  6026. if (!context.mixins.includes(mixin)) {
  6027. context.mixins.push(mixin);
  6028. } else if (true) {
  6029. warn$1(
  6030. "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
  6031. );
  6032. }
  6033. } else if (true) {
  6034. warn$1("Mixins are only available in builds supporting Options API");
  6035. }
  6036. return app;
  6037. },
  6038. component(name, component) {
  6039. if (true) {
  6040. validateComponentName(name, context.config);
  6041. }
  6042. if (!component) {
  6043. return context.components[name];
  6044. }
  6045. if (context.components[name]) {
  6046. warn$1(`Component "${name}" has already been registered in target app.`);
  6047. }
  6048. context.components[name] = component;
  6049. return app;
  6050. },
  6051. directive(name, directive) {
  6052. if (true) {
  6053. validateDirectiveName(name);
  6054. }
  6055. if (!directive) {
  6056. return context.directives[name];
  6057. }
  6058. if (context.directives[name]) {
  6059. warn$1(`Directive "${name}" has already been registered in target app.`);
  6060. }
  6061. context.directives[name] = directive;
  6062. return app;
  6063. },
  6064. mount(rootContainer, isHydrate, namespace) {
  6065. if (!isMounted) {
  6066. if (rootContainer.__vue_app__) {
  6067. warn$1(
  6068. `There is already an app instance mounted on the host container.
  6069. If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
  6070. );
  6071. }
  6072. const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
  6073. vnode.appContext = context;
  6074. if (namespace === true) {
  6075. namespace = "svg";
  6076. } else if (namespace === false) {
  6077. namespace = void 0;
  6078. }
  6079. if (true) {
  6080. context.reload = () => {
  6081. const cloned = cloneVNode(vnode);
  6082. cloned.el = null;
  6083. render2(cloned, rootContainer, namespace);
  6084. };
  6085. }
  6086. if (isHydrate && hydrate2) {
  6087. hydrate2(vnode, rootContainer);
  6088. } else {
  6089. render2(vnode, rootContainer, namespace);
  6090. }
  6091. isMounted = true;
  6092. app._container = rootContainer;
  6093. rootContainer.__vue_app__ = app;
  6094. if (true) {
  6095. app._instance = vnode.component;
  6096. devtoolsInitApp(app, version);
  6097. }
  6098. return getComponentPublicInstance(vnode.component);
  6099. } else if (true) {
  6100. warn$1(
  6101. `App has already been mounted.
  6102. If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
  6103. );
  6104. }
  6105. },
  6106. onUnmount(cleanupFn) {
  6107. if (typeof cleanupFn !== "function") {
  6108. warn$1(
  6109. `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
  6110. );
  6111. }
  6112. pluginCleanupFns.push(cleanupFn);
  6113. },
  6114. unmount() {
  6115. if (isMounted) {
  6116. callWithAsyncErrorHandling(
  6117. pluginCleanupFns,
  6118. app._instance,
  6119. 16
  6120. );
  6121. render2(null, app._container);
  6122. if (true) {
  6123. app._instance = null;
  6124. devtoolsUnmountApp(app);
  6125. }
  6126. delete app._container.__vue_app__;
  6127. } else if (true) {
  6128. warn$1(`Cannot unmount an app that is not mounted.`);
  6129. }
  6130. },
  6131. provide(key, value) {
  6132. if (key in context.provides) {
  6133. if (hasOwn(context.provides, key)) {
  6134. warn$1(
  6135. `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
  6136. );
  6137. } else {
  6138. warn$1(
  6139. `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
  6140. );
  6141. }
  6142. }
  6143. context.provides[key] = value;
  6144. return app;
  6145. },
  6146. runWithContext(fn) {
  6147. const lastApp = currentApp;
  6148. currentApp = app;
  6149. try {
  6150. return fn();
  6151. } finally {
  6152. currentApp = lastApp;
  6153. }
  6154. }
  6155. };
  6156. return app;
  6157. };
  6158. }
  6159. var currentApp = null;
  6160. function provide(key, value) {
  6161. if (!currentInstance) {
  6162. if (true) {
  6163. warn$1(`provide() can only be used inside setup().`);
  6164. }
  6165. } else {
  6166. let provides = currentInstance.provides;
  6167. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  6168. if (parentProvides === provides) {
  6169. provides = currentInstance.provides = Object.create(parentProvides);
  6170. }
  6171. provides[key] = value;
  6172. }
  6173. }
  6174. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  6175. const instance = getCurrentInstance();
  6176. if (instance || currentApp) {
  6177. let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
  6178. if (provides && key in provides) {
  6179. return provides[key];
  6180. } else if (arguments.length > 1) {
  6181. return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
  6182. } else if (true) {
  6183. warn$1(`injection "${String(key)}" not found.`);
  6184. }
  6185. } else if (true) {
  6186. warn$1(`inject() can only be used inside setup() or functional components.`);
  6187. }
  6188. }
  6189. function hasInjectionContext() {
  6190. return !!(getCurrentInstance() || currentApp);
  6191. }
  6192. var internalObjectProto = {};
  6193. var createInternalObject = () => Object.create(internalObjectProto);
  6194. var isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
  6195. function initProps(instance, rawProps, isStateful, isSSR = false) {
  6196. const props = {};
  6197. const attrs = createInternalObject();
  6198. instance.propsDefaults = /* @__PURE__ */ Object.create(null);
  6199. setFullProps(instance, rawProps, props, attrs);
  6200. for (const key in instance.propsOptions[0]) {
  6201. if (!(key in props)) {
  6202. props[key] = void 0;
  6203. }
  6204. }
  6205. if (true) {
  6206. validateProps(rawProps || {}, props, instance);
  6207. }
  6208. if (isStateful) {
  6209. instance.props = isSSR ? props : shallowReactive(props);
  6210. } else {
  6211. if (!instance.type.props) {
  6212. instance.props = attrs;
  6213. } else {
  6214. instance.props = props;
  6215. }
  6216. }
  6217. instance.attrs = attrs;
  6218. }
  6219. function isInHmrContext(instance) {
  6220. while (instance) {
  6221. if (instance.type.__hmrId) return true;
  6222. instance = instance.parent;
  6223. }
  6224. }
  6225. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  6226. const {
  6227. props,
  6228. attrs,
  6229. vnode: { patchFlag }
  6230. } = instance;
  6231. const rawCurrentProps = toRaw(props);
  6232. const [options] = instance.propsOptions;
  6233. let hasAttrsChanged = false;
  6234. if (
  6235. // always force full diff in dev
  6236. // - #1942 if hmr is enabled with sfc component
  6237. // - vite#872 non-sfc component used by sfc component
  6238. !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
  6239. ) {
  6240. if (patchFlag & 8) {
  6241. const propsToUpdate = instance.vnode.dynamicProps;
  6242. for (let i = 0; i < propsToUpdate.length; i++) {
  6243. let key = propsToUpdate[i];
  6244. if (isEmitListener(instance.emitsOptions, key)) {
  6245. continue;
  6246. }
  6247. const value = rawProps[key];
  6248. if (options) {
  6249. if (hasOwn(attrs, key)) {
  6250. if (value !== attrs[key]) {
  6251. attrs[key] = value;
  6252. hasAttrsChanged = true;
  6253. }
  6254. } else {
  6255. const camelizedKey = camelize(key);
  6256. props[camelizedKey] = resolvePropValue(
  6257. options,
  6258. rawCurrentProps,
  6259. camelizedKey,
  6260. value,
  6261. instance,
  6262. false
  6263. );
  6264. }
  6265. } else {
  6266. if (value !== attrs[key]) {
  6267. attrs[key] = value;
  6268. hasAttrsChanged = true;
  6269. }
  6270. }
  6271. }
  6272. }
  6273. } else {
  6274. if (setFullProps(instance, rawProps, props, attrs)) {
  6275. hasAttrsChanged = true;
  6276. }
  6277. let kebabKey;
  6278. for (const key in rawCurrentProps) {
  6279. if (!rawProps || // for camelCase
  6280. !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
  6281. // and converted to camelCase (#955)
  6282. ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
  6283. if (options) {
  6284. if (rawPrevProps && // for camelCase
  6285. (rawPrevProps[key] !== void 0 || // for kebab-case
  6286. rawPrevProps[kebabKey] !== void 0)) {
  6287. props[key] = resolvePropValue(
  6288. options,
  6289. rawCurrentProps,
  6290. key,
  6291. void 0,
  6292. instance,
  6293. true
  6294. );
  6295. }
  6296. } else {
  6297. delete props[key];
  6298. }
  6299. }
  6300. }
  6301. if (attrs !== rawCurrentProps) {
  6302. for (const key in attrs) {
  6303. if (!rawProps || !hasOwn(rawProps, key) && true) {
  6304. delete attrs[key];
  6305. hasAttrsChanged = true;
  6306. }
  6307. }
  6308. }
  6309. }
  6310. if (hasAttrsChanged) {
  6311. trigger(instance.attrs, "set", "");
  6312. }
  6313. if (true) {
  6314. validateProps(rawProps || {}, props, instance);
  6315. }
  6316. }
  6317. function setFullProps(instance, rawProps, props, attrs) {
  6318. const [options, needCastKeys] = instance.propsOptions;
  6319. let hasAttrsChanged = false;
  6320. let rawCastValues;
  6321. if (rawProps) {
  6322. for (let key in rawProps) {
  6323. if (isReservedProp(key)) {
  6324. continue;
  6325. }
  6326. const value = rawProps[key];
  6327. let camelKey;
  6328. if (options && hasOwn(options, camelKey = camelize(key))) {
  6329. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  6330. props[camelKey] = value;
  6331. } else {
  6332. (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  6333. }
  6334. } else if (!isEmitListener(instance.emitsOptions, key)) {
  6335. if (!(key in attrs) || value !== attrs[key]) {
  6336. attrs[key] = value;
  6337. hasAttrsChanged = true;
  6338. }
  6339. }
  6340. }
  6341. }
  6342. if (needCastKeys) {
  6343. const rawCurrentProps = toRaw(props);
  6344. const castValues = rawCastValues || EMPTY_OBJ;
  6345. for (let i = 0; i < needCastKeys.length; i++) {
  6346. const key = needCastKeys[i];
  6347. props[key] = resolvePropValue(
  6348. options,
  6349. rawCurrentProps,
  6350. key,
  6351. castValues[key],
  6352. instance,
  6353. !hasOwn(castValues, key)
  6354. );
  6355. }
  6356. }
  6357. return hasAttrsChanged;
  6358. }
  6359. function resolvePropValue(options, props, key, value, instance, isAbsent) {
  6360. const opt = options[key];
  6361. if (opt != null) {
  6362. const hasDefault = hasOwn(opt, "default");
  6363. if (hasDefault && value === void 0) {
  6364. const defaultValue = opt.default;
  6365. if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
  6366. const { propsDefaults } = instance;
  6367. if (key in propsDefaults) {
  6368. value = propsDefaults[key];
  6369. } else {
  6370. const reset = setCurrentInstance(instance);
  6371. value = propsDefaults[key] = defaultValue.call(
  6372. null,
  6373. props
  6374. );
  6375. reset();
  6376. }
  6377. } else {
  6378. value = defaultValue;
  6379. }
  6380. if (instance.ce) {
  6381. instance.ce._setProp(key, value);
  6382. }
  6383. }
  6384. if (opt[
  6385. 0
  6386. /* shouldCast */
  6387. ]) {
  6388. if (isAbsent && !hasDefault) {
  6389. value = false;
  6390. } else if (opt[
  6391. 1
  6392. /* shouldCastTrue */
  6393. ] && (value === "" || value === hyphenate(key))) {
  6394. value = true;
  6395. }
  6396. }
  6397. }
  6398. return value;
  6399. }
  6400. var mixinPropsCache = /* @__PURE__ */ new WeakMap();
  6401. function normalizePropsOptions(comp, appContext, asMixin = false) {
  6402. const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache;
  6403. const cached = cache.get(comp);
  6404. if (cached) {
  6405. return cached;
  6406. }
  6407. const raw = comp.props;
  6408. const normalized = {};
  6409. const needCastKeys = [];
  6410. let hasExtends = false;
  6411. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  6412. const extendProps = (raw2) => {
  6413. hasExtends = true;
  6414. const [props, keys] = normalizePropsOptions(raw2, appContext, true);
  6415. extend(normalized, props);
  6416. if (keys) needCastKeys.push(...keys);
  6417. };
  6418. if (!asMixin && appContext.mixins.length) {
  6419. appContext.mixins.forEach(extendProps);
  6420. }
  6421. if (comp.extends) {
  6422. extendProps(comp.extends);
  6423. }
  6424. if (comp.mixins) {
  6425. comp.mixins.forEach(extendProps);
  6426. }
  6427. }
  6428. if (!raw && !hasExtends) {
  6429. if (isObject(comp)) {
  6430. cache.set(comp, EMPTY_ARR);
  6431. }
  6432. return EMPTY_ARR;
  6433. }
  6434. if (isArray(raw)) {
  6435. for (let i = 0; i < raw.length; i++) {
  6436. if (!isString(raw[i])) {
  6437. warn$1(`props must be strings when using array syntax.`, raw[i]);
  6438. }
  6439. const normalizedKey = camelize(raw[i]);
  6440. if (validatePropName(normalizedKey)) {
  6441. normalized[normalizedKey] = EMPTY_OBJ;
  6442. }
  6443. }
  6444. } else if (raw) {
  6445. if (!isObject(raw)) {
  6446. warn$1(`invalid props options`, raw);
  6447. }
  6448. for (const key in raw) {
  6449. const normalizedKey = camelize(key);
  6450. if (validatePropName(normalizedKey)) {
  6451. const opt = raw[key];
  6452. const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
  6453. const propType = prop.type;
  6454. let shouldCast = false;
  6455. let shouldCastTrue = true;
  6456. if (isArray(propType)) {
  6457. for (let index = 0; index < propType.length; ++index) {
  6458. const type = propType[index];
  6459. const typeName = isFunction(type) && type.name;
  6460. if (typeName === "Boolean") {
  6461. shouldCast = true;
  6462. break;
  6463. } else if (typeName === "String") {
  6464. shouldCastTrue = false;
  6465. }
  6466. }
  6467. } else {
  6468. shouldCast = isFunction(propType) && propType.name === "Boolean";
  6469. }
  6470. prop[
  6471. 0
  6472. /* shouldCast */
  6473. ] = shouldCast;
  6474. prop[
  6475. 1
  6476. /* shouldCastTrue */
  6477. ] = shouldCastTrue;
  6478. if (shouldCast || hasOwn(prop, "default")) {
  6479. needCastKeys.push(normalizedKey);
  6480. }
  6481. }
  6482. }
  6483. }
  6484. const res = [normalized, needCastKeys];
  6485. if (isObject(comp)) {
  6486. cache.set(comp, res);
  6487. }
  6488. return res;
  6489. }
  6490. function validatePropName(key) {
  6491. if (key[0] !== "$" && !isReservedProp(key)) {
  6492. return true;
  6493. } else if (true) {
  6494. warn$1(`Invalid prop name: "${key}" is a reserved property.`);
  6495. }
  6496. return false;
  6497. }
  6498. function getType(ctor) {
  6499. if (ctor === null) {
  6500. return "null";
  6501. }
  6502. if (typeof ctor === "function") {
  6503. return ctor.name || "";
  6504. } else if (typeof ctor === "object") {
  6505. const name = ctor.constructor && ctor.constructor.name;
  6506. return name || "";
  6507. }
  6508. return "";
  6509. }
  6510. function validateProps(rawProps, props, instance) {
  6511. const resolvedValues = toRaw(props);
  6512. const options = instance.propsOptions[0];
  6513. const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
  6514. for (const key in options) {
  6515. let opt = options[key];
  6516. if (opt == null) continue;
  6517. validateProp(
  6518. key,
  6519. resolvedValues[key],
  6520. opt,
  6521. true ? shallowReadonly(resolvedValues) : resolvedValues,
  6522. !camelizePropsKey.includes(key)
  6523. );
  6524. }
  6525. }
  6526. function validateProp(name, value, prop, props, isAbsent) {
  6527. const { type, required, validator, skipCheck } = prop;
  6528. if (required && isAbsent) {
  6529. warn$1('Missing required prop: "' + name + '"');
  6530. return;
  6531. }
  6532. if (value == null && !required) {
  6533. return;
  6534. }
  6535. if (type != null && type !== true && !skipCheck) {
  6536. let isValid = false;
  6537. const types = isArray(type) ? type : [type];
  6538. const expectedTypes = [];
  6539. for (let i = 0; i < types.length && !isValid; i++) {
  6540. const { valid, expectedType } = assertType(value, types[i]);
  6541. expectedTypes.push(expectedType || "");
  6542. isValid = valid;
  6543. }
  6544. if (!isValid) {
  6545. warn$1(getInvalidTypeMessage(name, value, expectedTypes));
  6546. return;
  6547. }
  6548. }
  6549. if (validator && !validator(value, props)) {
  6550. warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
  6551. }
  6552. }
  6553. var isSimpleType = makeMap(
  6554. "String,Number,Boolean,Function,Symbol,BigInt"
  6555. );
  6556. function assertType(value, type) {
  6557. let valid;
  6558. const expectedType = getType(type);
  6559. if (expectedType === "null") {
  6560. valid = value === null;
  6561. } else if (isSimpleType(expectedType)) {
  6562. const t = typeof value;
  6563. valid = t === expectedType.toLowerCase();
  6564. if (!valid && t === "object") {
  6565. valid = value instanceof type;
  6566. }
  6567. } else if (expectedType === "Object") {
  6568. valid = isObject(value);
  6569. } else if (expectedType === "Array") {
  6570. valid = isArray(value);
  6571. } else {
  6572. valid = value instanceof type;
  6573. }
  6574. return {
  6575. valid,
  6576. expectedType
  6577. };
  6578. }
  6579. function getInvalidTypeMessage(name, value, expectedTypes) {
  6580. if (expectedTypes.length === 0) {
  6581. return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
  6582. }
  6583. let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
  6584. const expectedType = expectedTypes[0];
  6585. const receivedType = toRawType(value);
  6586. const expectedValue = styleValue(value, expectedType);
  6587. const receivedValue = styleValue(value, receivedType);
  6588. if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
  6589. message += ` with value ${expectedValue}`;
  6590. }
  6591. message += `, got ${receivedType} `;
  6592. if (isExplicable(receivedType)) {
  6593. message += `with value ${receivedValue}.`;
  6594. }
  6595. return message;
  6596. }
  6597. function styleValue(value, type) {
  6598. if (type === "String") {
  6599. return `"${value}"`;
  6600. } else if (type === "Number") {
  6601. return `${Number(value)}`;
  6602. } else {
  6603. return `${value}`;
  6604. }
  6605. }
  6606. function isExplicable(type) {
  6607. const explicitTypes = ["string", "number", "boolean"];
  6608. return explicitTypes.some((elem) => type.toLowerCase() === elem);
  6609. }
  6610. function isBoolean(...args) {
  6611. return args.some((elem) => elem.toLowerCase() === "boolean");
  6612. }
  6613. var isInternalKey = (key) => key === "_" || key === "__" || key === "_ctx" || key === "$stable";
  6614. var normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
  6615. var normalizeSlot = (key, rawSlot, ctx) => {
  6616. if (rawSlot._n) {
  6617. return rawSlot;
  6618. }
  6619. const normalized = withCtx((...args) => {
  6620. if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
  6621. warn$1(
  6622. `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
  6623. );
  6624. }
  6625. return normalizeSlotValue(rawSlot(...args));
  6626. }, ctx);
  6627. normalized._c = false;
  6628. return normalized;
  6629. };
  6630. var normalizeObjectSlots = (rawSlots, slots, instance) => {
  6631. const ctx = rawSlots._ctx;
  6632. for (const key in rawSlots) {
  6633. if (isInternalKey(key)) continue;
  6634. const value = rawSlots[key];
  6635. if (isFunction(value)) {
  6636. slots[key] = normalizeSlot(key, value, ctx);
  6637. } else if (value != null) {
  6638. if (true) {
  6639. warn$1(
  6640. `Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
  6641. );
  6642. }
  6643. const normalized = normalizeSlotValue(value);
  6644. slots[key] = () => normalized;
  6645. }
  6646. }
  6647. };
  6648. var normalizeVNodeSlots = (instance, children) => {
  6649. if (!isKeepAlive(instance.vnode) && true) {
  6650. warn$1(
  6651. `Non-function value encountered for default slot. Prefer function slots for better performance.`
  6652. );
  6653. }
  6654. const normalized = normalizeSlotValue(children);
  6655. instance.slots.default = () => normalized;
  6656. };
  6657. var assignSlots = (slots, children, optimized) => {
  6658. for (const key in children) {
  6659. if (optimized || !isInternalKey(key)) {
  6660. slots[key] = children[key];
  6661. }
  6662. }
  6663. };
  6664. var initSlots = (instance, children, optimized) => {
  6665. const slots = instance.slots = createInternalObject();
  6666. if (instance.vnode.shapeFlag & 32) {
  6667. const cacheIndexes = children.__;
  6668. if (cacheIndexes) def(slots, "__", cacheIndexes, true);
  6669. const type = children._;
  6670. if (type) {
  6671. assignSlots(slots, children, optimized);
  6672. if (optimized) {
  6673. def(slots, "_", type, true);
  6674. }
  6675. } else {
  6676. normalizeObjectSlots(children, slots);
  6677. }
  6678. } else if (children) {
  6679. normalizeVNodeSlots(instance, children);
  6680. }
  6681. };
  6682. var updateSlots = (instance, children, optimized) => {
  6683. const { vnode, slots } = instance;
  6684. let needDeletionCheck = true;
  6685. let deletionComparisonTarget = EMPTY_OBJ;
  6686. if (vnode.shapeFlag & 32) {
  6687. const type = children._;
  6688. if (type) {
  6689. if (isHmrUpdating) {
  6690. assignSlots(slots, children, optimized);
  6691. trigger(instance, "set", "$slots");
  6692. } else if (optimized && type === 1) {
  6693. needDeletionCheck = false;
  6694. } else {
  6695. assignSlots(slots, children, optimized);
  6696. }
  6697. } else {
  6698. needDeletionCheck = !children.$stable;
  6699. normalizeObjectSlots(children, slots);
  6700. }
  6701. deletionComparisonTarget = children;
  6702. } else if (children) {
  6703. normalizeVNodeSlots(instance, children);
  6704. deletionComparisonTarget = { default: 1 };
  6705. }
  6706. if (needDeletionCheck) {
  6707. for (const key in slots) {
  6708. if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
  6709. delete slots[key];
  6710. }
  6711. }
  6712. }
  6713. };
  6714. var supported;
  6715. var perf;
  6716. function startMeasure(instance, type) {
  6717. if (instance.appContext.config.performance && isSupported()) {
  6718. perf.mark(`vue-${type}-${instance.uid}`);
  6719. }
  6720. if (true) {
  6721. devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
  6722. }
  6723. }
  6724. function endMeasure(instance, type) {
  6725. if (instance.appContext.config.performance && isSupported()) {
  6726. const startTag = `vue-${type}-${instance.uid}`;
  6727. const endTag = startTag + `:end`;
  6728. perf.mark(endTag);
  6729. perf.measure(
  6730. `<${formatComponentName(instance, instance.type)}> ${type}`,
  6731. startTag,
  6732. endTag
  6733. );
  6734. perf.clearMarks(startTag);
  6735. perf.clearMarks(endTag);
  6736. }
  6737. if (true) {
  6738. devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
  6739. }
  6740. }
  6741. function isSupported() {
  6742. if (supported !== void 0) {
  6743. return supported;
  6744. }
  6745. if (typeof window !== "undefined" && window.performance) {
  6746. supported = true;
  6747. perf = window.performance;
  6748. } else {
  6749. supported = false;
  6750. }
  6751. return supported;
  6752. }
  6753. function initFeatureFlags() {
  6754. const needWarn = [];
  6755. if (typeof __VUE_OPTIONS_API__ !== "boolean") {
  6756. needWarn.push(`__VUE_OPTIONS_API__`);
  6757. getGlobalThis().__VUE_OPTIONS_API__ = true;
  6758. }
  6759. if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") {
  6760. needWarn.push(`__VUE_PROD_DEVTOOLS__`);
  6761. getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;
  6762. }
  6763. if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") {
  6764. needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);
  6765. getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
  6766. }
  6767. if (needWarn.length) {
  6768. const multi = needWarn.length > 1;
  6769. console.warn(
  6770. `Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
  6771. For more details, see https://link.vuejs.org/feature-flags.`
  6772. );
  6773. }
  6774. }
  6775. var queuePostRenderEffect = queueEffectWithSuspense;
  6776. function createRenderer(options) {
  6777. return baseCreateRenderer(options);
  6778. }
  6779. function createHydrationRenderer(options) {
  6780. return baseCreateRenderer(options, createHydrationFunctions);
  6781. }
  6782. function baseCreateRenderer(options, createHydrationFns) {
  6783. {
  6784. initFeatureFlags();
  6785. }
  6786. const target = getGlobalThis();
  6787. target.__VUE__ = true;
  6788. if (true) {
  6789. setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  6790. }
  6791. const {
  6792. insert: hostInsert,
  6793. remove: hostRemove,
  6794. patchProp: hostPatchProp,
  6795. createElement: hostCreateElement,
  6796. createText: hostCreateText,
  6797. createComment: hostCreateComment,
  6798. setText: hostSetText,
  6799. setElementText: hostSetElementText,
  6800. parentNode: hostParentNode,
  6801. nextSibling: hostNextSibling,
  6802. setScopeId: hostSetScopeId = NOOP,
  6803. insertStaticContent: hostInsertStaticContent
  6804. } = options;
  6805. const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
  6806. if (n1 === n2) {
  6807. return;
  6808. }
  6809. if (n1 && !isSameVNodeType(n1, n2)) {
  6810. anchor = getNextHostNode(n1);
  6811. unmount(n1, parentComponent, parentSuspense, true);
  6812. n1 = null;
  6813. }
  6814. if (n2.patchFlag === -2) {
  6815. optimized = false;
  6816. n2.dynamicChildren = null;
  6817. }
  6818. const { type, ref: ref2, shapeFlag } = n2;
  6819. switch (type) {
  6820. case Text:
  6821. processText(n1, n2, container, anchor);
  6822. break;
  6823. case Comment:
  6824. processCommentNode(n1, n2, container, anchor);
  6825. break;
  6826. case Static:
  6827. if (n1 == null) {
  6828. mountStaticNode(n2, container, anchor, namespace);
  6829. } else if (true) {
  6830. patchStaticNode(n1, n2, container, namespace);
  6831. }
  6832. break;
  6833. case Fragment:
  6834. processFragment(
  6835. n1,
  6836. n2,
  6837. container,
  6838. anchor,
  6839. parentComponent,
  6840. parentSuspense,
  6841. namespace,
  6842. slotScopeIds,
  6843. optimized
  6844. );
  6845. break;
  6846. default:
  6847. if (shapeFlag & 1) {
  6848. processElement(
  6849. n1,
  6850. n2,
  6851. container,
  6852. anchor,
  6853. parentComponent,
  6854. parentSuspense,
  6855. namespace,
  6856. slotScopeIds,
  6857. optimized
  6858. );
  6859. } else if (shapeFlag & 6) {
  6860. processComponent(
  6861. n1,
  6862. n2,
  6863. container,
  6864. anchor,
  6865. parentComponent,
  6866. parentSuspense,
  6867. namespace,
  6868. slotScopeIds,
  6869. optimized
  6870. );
  6871. } else if (shapeFlag & 64) {
  6872. type.process(
  6873. n1,
  6874. n2,
  6875. container,
  6876. anchor,
  6877. parentComponent,
  6878. parentSuspense,
  6879. namespace,
  6880. slotScopeIds,
  6881. optimized,
  6882. internals
  6883. );
  6884. } else if (shapeFlag & 128) {
  6885. type.process(
  6886. n1,
  6887. n2,
  6888. container,
  6889. anchor,
  6890. parentComponent,
  6891. parentSuspense,
  6892. namespace,
  6893. slotScopeIds,
  6894. optimized,
  6895. internals
  6896. );
  6897. } else if (true) {
  6898. warn$1("Invalid VNode type:", type, `(${typeof type})`);
  6899. }
  6900. }
  6901. if (ref2 != null && parentComponent) {
  6902. setRef(ref2, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
  6903. } else if (ref2 == null && n1 && n1.ref != null) {
  6904. setRef(n1.ref, null, parentSuspense, n1, true);
  6905. }
  6906. };
  6907. const processText = (n1, n2, container, anchor) => {
  6908. if (n1 == null) {
  6909. hostInsert(
  6910. n2.el = hostCreateText(n2.children),
  6911. container,
  6912. anchor
  6913. );
  6914. } else {
  6915. const el = n2.el = n1.el;
  6916. if (n2.children !== n1.children) {
  6917. hostSetText(el, n2.children);
  6918. }
  6919. }
  6920. };
  6921. const processCommentNode = (n1, n2, container, anchor) => {
  6922. if (n1 == null) {
  6923. hostInsert(
  6924. n2.el = hostCreateComment(n2.children || ""),
  6925. container,
  6926. anchor
  6927. );
  6928. } else {
  6929. n2.el = n1.el;
  6930. }
  6931. };
  6932. const mountStaticNode = (n2, container, anchor, namespace) => {
  6933. [n2.el, n2.anchor] = hostInsertStaticContent(
  6934. n2.children,
  6935. container,
  6936. anchor,
  6937. namespace,
  6938. n2.el,
  6939. n2.anchor
  6940. );
  6941. };
  6942. const patchStaticNode = (n1, n2, container, namespace) => {
  6943. if (n2.children !== n1.children) {
  6944. const anchor = hostNextSibling(n1.anchor);
  6945. removeStaticNode(n1);
  6946. [n2.el, n2.anchor] = hostInsertStaticContent(
  6947. n2.children,
  6948. container,
  6949. anchor,
  6950. namespace
  6951. );
  6952. } else {
  6953. n2.el = n1.el;
  6954. n2.anchor = n1.anchor;
  6955. }
  6956. };
  6957. const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
  6958. let next;
  6959. while (el && el !== anchor) {
  6960. next = hostNextSibling(el);
  6961. hostInsert(el, container, nextSibling);
  6962. el = next;
  6963. }
  6964. hostInsert(anchor, container, nextSibling);
  6965. };
  6966. const removeStaticNode = ({ el, anchor }) => {
  6967. let next;
  6968. while (el && el !== anchor) {
  6969. next = hostNextSibling(el);
  6970. hostRemove(el);
  6971. el = next;
  6972. }
  6973. hostRemove(anchor);
  6974. };
  6975. const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  6976. if (n2.type === "svg") {
  6977. namespace = "svg";
  6978. } else if (n2.type === "math") {
  6979. namespace = "mathml";
  6980. }
  6981. if (n1 == null) {
  6982. mountElement(
  6983. n2,
  6984. container,
  6985. anchor,
  6986. parentComponent,
  6987. parentSuspense,
  6988. namespace,
  6989. slotScopeIds,
  6990. optimized
  6991. );
  6992. } else {
  6993. patchElement(
  6994. n1,
  6995. n2,
  6996. parentComponent,
  6997. parentSuspense,
  6998. namespace,
  6999. slotScopeIds,
  7000. optimized
  7001. );
  7002. }
  7003. };
  7004. const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7005. let el;
  7006. let vnodeHook;
  7007. const { props, shapeFlag, transition, dirs } = vnode;
  7008. el = vnode.el = hostCreateElement(
  7009. vnode.type,
  7010. namespace,
  7011. props && props.is,
  7012. props
  7013. );
  7014. if (shapeFlag & 8) {
  7015. hostSetElementText(el, vnode.children);
  7016. } else if (shapeFlag & 16) {
  7017. mountChildren(
  7018. vnode.children,
  7019. el,
  7020. null,
  7021. parentComponent,
  7022. parentSuspense,
  7023. resolveChildrenNamespace(vnode, namespace),
  7024. slotScopeIds,
  7025. optimized
  7026. );
  7027. }
  7028. if (dirs) {
  7029. invokeDirectiveHook(vnode, null, parentComponent, "created");
  7030. }
  7031. setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
  7032. if (props) {
  7033. for (const key in props) {
  7034. if (key !== "value" && !isReservedProp(key)) {
  7035. hostPatchProp(el, key, null, props[key], namespace, parentComponent);
  7036. }
  7037. }
  7038. if ("value" in props) {
  7039. hostPatchProp(el, "value", null, props.value, namespace);
  7040. }
  7041. if (vnodeHook = props.onVnodeBeforeMount) {
  7042. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  7043. }
  7044. }
  7045. if (true) {
  7046. def(el, "__vnode", vnode, true);
  7047. def(el, "__vueParentComponent", parentComponent, true);
  7048. }
  7049. if (dirs) {
  7050. invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
  7051. }
  7052. const needCallTransitionHooks = needTransition(parentSuspense, transition);
  7053. if (needCallTransitionHooks) {
  7054. transition.beforeEnter(el);
  7055. }
  7056. hostInsert(el, container, anchor);
  7057. if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
  7058. queuePostRenderEffect(() => {
  7059. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  7060. needCallTransitionHooks && transition.enter(el);
  7061. dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
  7062. }, parentSuspense);
  7063. }
  7064. };
  7065. const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
  7066. if (scopeId) {
  7067. hostSetScopeId(el, scopeId);
  7068. }
  7069. if (slotScopeIds) {
  7070. for (let i = 0; i < slotScopeIds.length; i++) {
  7071. hostSetScopeId(el, slotScopeIds[i]);
  7072. }
  7073. }
  7074. if (parentComponent) {
  7075. let subTree = parentComponent.subTree;
  7076. if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
  7077. subTree = filterSingleRoot(subTree.children) || subTree;
  7078. }
  7079. if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
  7080. const parentVNode = parentComponent.vnode;
  7081. setScopeId(
  7082. el,
  7083. parentVNode,
  7084. parentVNode.scopeId,
  7085. parentVNode.slotScopeIds,
  7086. parentComponent.parent
  7087. );
  7088. }
  7089. }
  7090. };
  7091. const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
  7092. for (let i = start; i < children.length; i++) {
  7093. const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
  7094. patch(
  7095. null,
  7096. child,
  7097. container,
  7098. anchor,
  7099. parentComponent,
  7100. parentSuspense,
  7101. namespace,
  7102. slotScopeIds,
  7103. optimized
  7104. );
  7105. }
  7106. };
  7107. const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7108. const el = n2.el = n1.el;
  7109. if (true) {
  7110. el.__vnode = n2;
  7111. }
  7112. let { patchFlag, dynamicChildren, dirs } = n2;
  7113. patchFlag |= n1.patchFlag & 16;
  7114. const oldProps = n1.props || EMPTY_OBJ;
  7115. const newProps = n2.props || EMPTY_OBJ;
  7116. let vnodeHook;
  7117. parentComponent && toggleRecurse(parentComponent, false);
  7118. if (vnodeHook = newProps.onVnodeBeforeUpdate) {
  7119. invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  7120. }
  7121. if (dirs) {
  7122. invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
  7123. }
  7124. parentComponent && toggleRecurse(parentComponent, true);
  7125. if (isHmrUpdating) {
  7126. patchFlag = 0;
  7127. optimized = false;
  7128. dynamicChildren = null;
  7129. }
  7130. if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
  7131. hostSetElementText(el, "");
  7132. }
  7133. if (dynamicChildren) {
  7134. patchBlockChildren(
  7135. n1.dynamicChildren,
  7136. dynamicChildren,
  7137. el,
  7138. parentComponent,
  7139. parentSuspense,
  7140. resolveChildrenNamespace(n2, namespace),
  7141. slotScopeIds
  7142. );
  7143. if (true) {
  7144. traverseStaticChildren(n1, n2);
  7145. }
  7146. } else if (!optimized) {
  7147. patchChildren(
  7148. n1,
  7149. n2,
  7150. el,
  7151. null,
  7152. parentComponent,
  7153. parentSuspense,
  7154. resolveChildrenNamespace(n2, namespace),
  7155. slotScopeIds,
  7156. false
  7157. );
  7158. }
  7159. if (patchFlag > 0) {
  7160. if (patchFlag & 16) {
  7161. patchProps(el, oldProps, newProps, parentComponent, namespace);
  7162. } else {
  7163. if (patchFlag & 2) {
  7164. if (oldProps.class !== newProps.class) {
  7165. hostPatchProp(el, "class", null, newProps.class, namespace);
  7166. }
  7167. }
  7168. if (patchFlag & 4) {
  7169. hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
  7170. }
  7171. if (patchFlag & 8) {
  7172. const propsToUpdate = n2.dynamicProps;
  7173. for (let i = 0; i < propsToUpdate.length; i++) {
  7174. const key = propsToUpdate[i];
  7175. const prev = oldProps[key];
  7176. const next = newProps[key];
  7177. if (next !== prev || key === "value") {
  7178. hostPatchProp(el, key, prev, next, namespace, parentComponent);
  7179. }
  7180. }
  7181. }
  7182. }
  7183. if (patchFlag & 1) {
  7184. if (n1.children !== n2.children) {
  7185. hostSetElementText(el, n2.children);
  7186. }
  7187. }
  7188. } else if (!optimized && dynamicChildren == null) {
  7189. patchProps(el, oldProps, newProps, parentComponent, namespace);
  7190. }
  7191. if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
  7192. queuePostRenderEffect(() => {
  7193. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  7194. dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
  7195. }, parentSuspense);
  7196. }
  7197. };
  7198. const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
  7199. for (let i = 0; i < newChildren.length; i++) {
  7200. const oldVNode = oldChildren[i];
  7201. const newVNode = newChildren[i];
  7202. const container = (
  7203. // oldVNode may be an errored async setup() component inside Suspense
  7204. // which will not have a mounted element
  7205. oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
  7206. // of the Fragment itself so it can move its children.
  7207. (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
  7208. // which also requires the correct parent container
  7209. !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
  7210. oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
  7211. // In other cases, the parent container is not actually used so we
  7212. // just pass the block element here to avoid a DOM parentNode call.
  7213. fallbackContainer
  7214. )
  7215. );
  7216. patch(
  7217. oldVNode,
  7218. newVNode,
  7219. container,
  7220. null,
  7221. parentComponent,
  7222. parentSuspense,
  7223. namespace,
  7224. slotScopeIds,
  7225. true
  7226. );
  7227. }
  7228. };
  7229. const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
  7230. if (oldProps !== newProps) {
  7231. if (oldProps !== EMPTY_OBJ) {
  7232. for (const key in oldProps) {
  7233. if (!isReservedProp(key) && !(key in newProps)) {
  7234. hostPatchProp(
  7235. el,
  7236. key,
  7237. oldProps[key],
  7238. null,
  7239. namespace,
  7240. parentComponent
  7241. );
  7242. }
  7243. }
  7244. }
  7245. for (const key in newProps) {
  7246. if (isReservedProp(key)) continue;
  7247. const next = newProps[key];
  7248. const prev = oldProps[key];
  7249. if (next !== prev && key !== "value") {
  7250. hostPatchProp(el, key, prev, next, namespace, parentComponent);
  7251. }
  7252. }
  7253. if ("value" in newProps) {
  7254. hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
  7255. }
  7256. }
  7257. };
  7258. const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7259. const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
  7260. const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
  7261. let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
  7262. if (
  7263. // #5523 dev root fragment may inherit directives
  7264. isHmrUpdating || patchFlag & 2048
  7265. ) {
  7266. patchFlag = 0;
  7267. optimized = false;
  7268. dynamicChildren = null;
  7269. }
  7270. if (fragmentSlotScopeIds) {
  7271. slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
  7272. }
  7273. if (n1 == null) {
  7274. hostInsert(fragmentStartAnchor, container, anchor);
  7275. hostInsert(fragmentEndAnchor, container, anchor);
  7276. mountChildren(
  7277. // #10007
  7278. // such fragment like `<></>` will be compiled into
  7279. // a fragment which doesn't have a children.
  7280. // In this case fallback to an empty array
  7281. n2.children || [],
  7282. container,
  7283. fragmentEndAnchor,
  7284. parentComponent,
  7285. parentSuspense,
  7286. namespace,
  7287. slotScopeIds,
  7288. optimized
  7289. );
  7290. } else {
  7291. if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
  7292. // of renderSlot() with no valid children
  7293. n1.dynamicChildren) {
  7294. patchBlockChildren(
  7295. n1.dynamicChildren,
  7296. dynamicChildren,
  7297. container,
  7298. parentComponent,
  7299. parentSuspense,
  7300. namespace,
  7301. slotScopeIds
  7302. );
  7303. if (true) {
  7304. traverseStaticChildren(n1, n2);
  7305. } else if (
  7306. // #2080 if the stable fragment has a key, it's a <template v-for> that may
  7307. // get moved around. Make sure all root level vnodes inherit el.
  7308. // #2134 or if it's a component root, it may also get moved around
  7309. // as the component is being moved.
  7310. n2.key != null || parentComponent && n2 === parentComponent.subTree
  7311. ) {
  7312. traverseStaticChildren(
  7313. n1,
  7314. n2,
  7315. true
  7316. /* shallow */
  7317. );
  7318. }
  7319. } else {
  7320. patchChildren(
  7321. n1,
  7322. n2,
  7323. container,
  7324. fragmentEndAnchor,
  7325. parentComponent,
  7326. parentSuspense,
  7327. namespace,
  7328. slotScopeIds,
  7329. optimized
  7330. );
  7331. }
  7332. }
  7333. };
  7334. const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7335. n2.slotScopeIds = slotScopeIds;
  7336. if (n1 == null) {
  7337. if (n2.shapeFlag & 512) {
  7338. parentComponent.ctx.activate(
  7339. n2,
  7340. container,
  7341. anchor,
  7342. namespace,
  7343. optimized
  7344. );
  7345. } else {
  7346. mountComponent(
  7347. n2,
  7348. container,
  7349. anchor,
  7350. parentComponent,
  7351. parentSuspense,
  7352. namespace,
  7353. optimized
  7354. );
  7355. }
  7356. } else {
  7357. updateComponent(n1, n2, optimized);
  7358. }
  7359. };
  7360. const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
  7361. const instance = initialVNode.component = createComponentInstance(
  7362. initialVNode,
  7363. parentComponent,
  7364. parentSuspense
  7365. );
  7366. if (instance.type.__hmrId) {
  7367. registerHMR(instance);
  7368. }
  7369. if (true) {
  7370. pushWarningContext(initialVNode);
  7371. startMeasure(instance, `mount`);
  7372. }
  7373. if (isKeepAlive(initialVNode)) {
  7374. instance.ctx.renderer = internals;
  7375. }
  7376. {
  7377. if (true) {
  7378. startMeasure(instance, `init`);
  7379. }
  7380. setupComponent(instance, false, optimized);
  7381. if (true) {
  7382. endMeasure(instance, `init`);
  7383. }
  7384. }
  7385. if (isHmrUpdating) initialVNode.el = null;
  7386. if (instance.asyncDep) {
  7387. parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
  7388. if (!initialVNode.el) {
  7389. const placeholder = instance.subTree = createVNode(Comment);
  7390. processCommentNode(null, placeholder, container, anchor);
  7391. initialVNode.placeholder = placeholder.el;
  7392. }
  7393. } else {
  7394. setupRenderEffect(
  7395. instance,
  7396. initialVNode,
  7397. container,
  7398. anchor,
  7399. parentSuspense,
  7400. namespace,
  7401. optimized
  7402. );
  7403. }
  7404. if (true) {
  7405. popWarningContext();
  7406. endMeasure(instance, `mount`);
  7407. }
  7408. };
  7409. const updateComponent = (n1, n2, optimized) => {
  7410. const instance = n2.component = n1.component;
  7411. if (shouldUpdateComponent(n1, n2, optimized)) {
  7412. if (instance.asyncDep && !instance.asyncResolved) {
  7413. if (true) {
  7414. pushWarningContext(n2);
  7415. }
  7416. updateComponentPreRender(instance, n2, optimized);
  7417. if (true) {
  7418. popWarningContext();
  7419. }
  7420. return;
  7421. } else {
  7422. instance.next = n2;
  7423. instance.update();
  7424. }
  7425. } else {
  7426. n2.el = n1.el;
  7427. instance.vnode = n2;
  7428. }
  7429. };
  7430. const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
  7431. const componentUpdateFn = () => {
  7432. if (!instance.isMounted) {
  7433. let vnodeHook;
  7434. const { el, props } = initialVNode;
  7435. const { bm, m, parent, root, type } = instance;
  7436. const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
  7437. toggleRecurse(instance, false);
  7438. if (bm) {
  7439. invokeArrayFns(bm);
  7440. }
  7441. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {
  7442. invokeVNodeHook(vnodeHook, parent, initialVNode);
  7443. }
  7444. toggleRecurse(instance, true);
  7445. if (el && hydrateNode) {
  7446. const hydrateSubTree = () => {
  7447. if (true) {
  7448. startMeasure(instance, `render`);
  7449. }
  7450. instance.subTree = renderComponentRoot(instance);
  7451. if (true) {
  7452. endMeasure(instance, `render`);
  7453. }
  7454. if (true) {
  7455. startMeasure(instance, `hydrate`);
  7456. }
  7457. hydrateNode(
  7458. el,
  7459. instance.subTree,
  7460. instance,
  7461. parentSuspense,
  7462. null
  7463. );
  7464. if (true) {
  7465. endMeasure(instance, `hydrate`);
  7466. }
  7467. };
  7468. if (isAsyncWrapperVNode && type.__asyncHydrate) {
  7469. type.__asyncHydrate(
  7470. el,
  7471. instance,
  7472. hydrateSubTree
  7473. );
  7474. } else {
  7475. hydrateSubTree();
  7476. }
  7477. } else {
  7478. if (root.ce && // @ts-expect-error _def is private
  7479. root.ce._def.shadowRoot !== false) {
  7480. root.ce._injectChildStyle(type);
  7481. }
  7482. if (true) {
  7483. startMeasure(instance, `render`);
  7484. }
  7485. const subTree = instance.subTree = renderComponentRoot(instance);
  7486. if (true) {
  7487. endMeasure(instance, `render`);
  7488. }
  7489. if (true) {
  7490. startMeasure(instance, `patch`);
  7491. }
  7492. patch(
  7493. null,
  7494. subTree,
  7495. container,
  7496. anchor,
  7497. instance,
  7498. parentSuspense,
  7499. namespace
  7500. );
  7501. if (true) {
  7502. endMeasure(instance, `patch`);
  7503. }
  7504. initialVNode.el = subTree.el;
  7505. }
  7506. if (m) {
  7507. queuePostRenderEffect(m, parentSuspense);
  7508. }
  7509. if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {
  7510. const scopedInitialVNode = initialVNode;
  7511. queuePostRenderEffect(
  7512. () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),
  7513. parentSuspense
  7514. );
  7515. }
  7516. if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {
  7517. instance.a && queuePostRenderEffect(instance.a, parentSuspense);
  7518. }
  7519. instance.isMounted = true;
  7520. if (true) {
  7521. devtoolsComponentAdded(instance);
  7522. }
  7523. initialVNode = container = anchor = null;
  7524. } else {
  7525. let { next, bu, u, parent, vnode } = instance;
  7526. {
  7527. const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
  7528. if (nonHydratedAsyncRoot) {
  7529. if (next) {
  7530. next.el = vnode.el;
  7531. updateComponentPreRender(instance, next, optimized);
  7532. }
  7533. nonHydratedAsyncRoot.asyncDep.then(() => {
  7534. if (!instance.isUnmounted) {
  7535. componentUpdateFn();
  7536. }
  7537. });
  7538. return;
  7539. }
  7540. }
  7541. let originNext = next;
  7542. let vnodeHook;
  7543. if (true) {
  7544. pushWarningContext(next || instance.vnode);
  7545. }
  7546. toggleRecurse(instance, false);
  7547. if (next) {
  7548. next.el = vnode.el;
  7549. updateComponentPreRender(instance, next, optimized);
  7550. } else {
  7551. next = vnode;
  7552. }
  7553. if (bu) {
  7554. invokeArrayFns(bu);
  7555. }
  7556. if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {
  7557. invokeVNodeHook(vnodeHook, parent, next, vnode);
  7558. }
  7559. toggleRecurse(instance, true);
  7560. if (true) {
  7561. startMeasure(instance, `render`);
  7562. }
  7563. const nextTree = renderComponentRoot(instance);
  7564. if (true) {
  7565. endMeasure(instance, `render`);
  7566. }
  7567. const prevTree = instance.subTree;
  7568. instance.subTree = nextTree;
  7569. if (true) {
  7570. startMeasure(instance, `patch`);
  7571. }
  7572. patch(
  7573. prevTree,
  7574. nextTree,
  7575. // parent may have changed if it's in a teleport
  7576. hostParentNode(prevTree.el),
  7577. // anchor may have changed if it's in a fragment
  7578. getNextHostNode(prevTree),
  7579. instance,
  7580. parentSuspense,
  7581. namespace
  7582. );
  7583. if (true) {
  7584. endMeasure(instance, `patch`);
  7585. }
  7586. next.el = nextTree.el;
  7587. if (originNext === null) {
  7588. updateHOCHostEl(instance, nextTree.el);
  7589. }
  7590. if (u) {
  7591. queuePostRenderEffect(u, parentSuspense);
  7592. }
  7593. if (vnodeHook = next.props && next.props.onVnodeUpdated) {
  7594. queuePostRenderEffect(
  7595. () => invokeVNodeHook(vnodeHook, parent, next, vnode),
  7596. parentSuspense
  7597. );
  7598. }
  7599. if (true) {
  7600. devtoolsComponentUpdated(instance);
  7601. }
  7602. if (true) {
  7603. popWarningContext();
  7604. }
  7605. }
  7606. };
  7607. instance.scope.on();
  7608. const effect2 = instance.effect = new ReactiveEffect(componentUpdateFn);
  7609. instance.scope.off();
  7610. const update = instance.update = effect2.run.bind(effect2);
  7611. const job = instance.job = effect2.runIfDirty.bind(effect2);
  7612. job.i = instance;
  7613. job.id = instance.uid;
  7614. effect2.scheduler = () => queueJob(job);
  7615. toggleRecurse(instance, true);
  7616. if (true) {
  7617. effect2.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;
  7618. effect2.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;
  7619. }
  7620. update();
  7621. };
  7622. const updateComponentPreRender = (instance, nextVNode, optimized) => {
  7623. nextVNode.component = instance;
  7624. const prevProps = instance.vnode.props;
  7625. instance.vnode = nextVNode;
  7626. instance.next = null;
  7627. updateProps(instance, nextVNode.props, prevProps, optimized);
  7628. updateSlots(instance, nextVNode.children, optimized);
  7629. pauseTracking();
  7630. flushPreFlushCbs(instance);
  7631. resetTracking();
  7632. };
  7633. const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
  7634. const c1 = n1 && n1.children;
  7635. const prevShapeFlag = n1 ? n1.shapeFlag : 0;
  7636. const c2 = n2.children;
  7637. const { patchFlag, shapeFlag } = n2;
  7638. if (patchFlag > 0) {
  7639. if (patchFlag & 128) {
  7640. patchKeyedChildren(
  7641. c1,
  7642. c2,
  7643. container,
  7644. anchor,
  7645. parentComponent,
  7646. parentSuspense,
  7647. namespace,
  7648. slotScopeIds,
  7649. optimized
  7650. );
  7651. return;
  7652. } else if (patchFlag & 256) {
  7653. patchUnkeyedChildren(
  7654. c1,
  7655. c2,
  7656. container,
  7657. anchor,
  7658. parentComponent,
  7659. parentSuspense,
  7660. namespace,
  7661. slotScopeIds,
  7662. optimized
  7663. );
  7664. return;
  7665. }
  7666. }
  7667. if (shapeFlag & 8) {
  7668. if (prevShapeFlag & 16) {
  7669. unmountChildren(c1, parentComponent, parentSuspense);
  7670. }
  7671. if (c2 !== c1) {
  7672. hostSetElementText(container, c2);
  7673. }
  7674. } else {
  7675. if (prevShapeFlag & 16) {
  7676. if (shapeFlag & 16) {
  7677. patchKeyedChildren(
  7678. c1,
  7679. c2,
  7680. container,
  7681. anchor,
  7682. parentComponent,
  7683. parentSuspense,
  7684. namespace,
  7685. slotScopeIds,
  7686. optimized
  7687. );
  7688. } else {
  7689. unmountChildren(c1, parentComponent, parentSuspense, true);
  7690. }
  7691. } else {
  7692. if (prevShapeFlag & 8) {
  7693. hostSetElementText(container, "");
  7694. }
  7695. if (shapeFlag & 16) {
  7696. mountChildren(
  7697. c2,
  7698. container,
  7699. anchor,
  7700. parentComponent,
  7701. parentSuspense,
  7702. namespace,
  7703. slotScopeIds,
  7704. optimized
  7705. );
  7706. }
  7707. }
  7708. }
  7709. };
  7710. const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7711. c1 = c1 || EMPTY_ARR;
  7712. c2 = c2 || EMPTY_ARR;
  7713. const oldLength = c1.length;
  7714. const newLength = c2.length;
  7715. const commonLength = Math.min(oldLength, newLength);
  7716. let i;
  7717. for (i = 0; i < commonLength; i++) {
  7718. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7719. patch(
  7720. c1[i],
  7721. nextChild,
  7722. container,
  7723. null,
  7724. parentComponent,
  7725. parentSuspense,
  7726. namespace,
  7727. slotScopeIds,
  7728. optimized
  7729. );
  7730. }
  7731. if (oldLength > newLength) {
  7732. unmountChildren(
  7733. c1,
  7734. parentComponent,
  7735. parentSuspense,
  7736. true,
  7737. false,
  7738. commonLength
  7739. );
  7740. } else {
  7741. mountChildren(
  7742. c2,
  7743. container,
  7744. anchor,
  7745. parentComponent,
  7746. parentSuspense,
  7747. namespace,
  7748. slotScopeIds,
  7749. optimized,
  7750. commonLength
  7751. );
  7752. }
  7753. };
  7754. const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
  7755. let i = 0;
  7756. const l2 = c2.length;
  7757. let e1 = c1.length - 1;
  7758. let e2 = l2 - 1;
  7759. while (i <= e1 && i <= e2) {
  7760. const n1 = c1[i];
  7761. const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7762. if (isSameVNodeType(n1, n2)) {
  7763. patch(
  7764. n1,
  7765. n2,
  7766. container,
  7767. null,
  7768. parentComponent,
  7769. parentSuspense,
  7770. namespace,
  7771. slotScopeIds,
  7772. optimized
  7773. );
  7774. } else {
  7775. break;
  7776. }
  7777. i++;
  7778. }
  7779. while (i <= e1 && i <= e2) {
  7780. const n1 = c1[e1];
  7781. const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
  7782. if (isSameVNodeType(n1, n2)) {
  7783. patch(
  7784. n1,
  7785. n2,
  7786. container,
  7787. null,
  7788. parentComponent,
  7789. parentSuspense,
  7790. namespace,
  7791. slotScopeIds,
  7792. optimized
  7793. );
  7794. } else {
  7795. break;
  7796. }
  7797. e1--;
  7798. e2--;
  7799. }
  7800. if (i > e1) {
  7801. if (i <= e2) {
  7802. const nextPos = e2 + 1;
  7803. const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
  7804. while (i <= e2) {
  7805. patch(
  7806. null,
  7807. c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),
  7808. container,
  7809. anchor,
  7810. parentComponent,
  7811. parentSuspense,
  7812. namespace,
  7813. slotScopeIds,
  7814. optimized
  7815. );
  7816. i++;
  7817. }
  7818. }
  7819. } else if (i > e2) {
  7820. while (i <= e1) {
  7821. unmount(c1[i], parentComponent, parentSuspense, true);
  7822. i++;
  7823. }
  7824. } else {
  7825. const s1 = i;
  7826. const s2 = i;
  7827. const keyToNewIndexMap = /* @__PURE__ */ new Map();
  7828. for (i = s2; i <= e2; i++) {
  7829. const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
  7830. if (nextChild.key != null) {
  7831. if (keyToNewIndexMap.has(nextChild.key)) {
  7832. warn$1(
  7833. `Duplicate keys found during update:`,
  7834. JSON.stringify(nextChild.key),
  7835. `Make sure keys are unique.`
  7836. );
  7837. }
  7838. keyToNewIndexMap.set(nextChild.key, i);
  7839. }
  7840. }
  7841. let j;
  7842. let patched = 0;
  7843. const toBePatched = e2 - s2 + 1;
  7844. let moved = false;
  7845. let maxNewIndexSoFar = 0;
  7846. const newIndexToOldIndexMap = new Array(toBePatched);
  7847. for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
  7848. for (i = s1; i <= e1; i++) {
  7849. const prevChild = c1[i];
  7850. if (patched >= toBePatched) {
  7851. unmount(prevChild, parentComponent, parentSuspense, true);
  7852. continue;
  7853. }
  7854. let newIndex;
  7855. if (prevChild.key != null) {
  7856. newIndex = keyToNewIndexMap.get(prevChild.key);
  7857. } else {
  7858. for (j = s2; j <= e2; j++) {
  7859. if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
  7860. newIndex = j;
  7861. break;
  7862. }
  7863. }
  7864. }
  7865. if (newIndex === void 0) {
  7866. unmount(prevChild, parentComponent, parentSuspense, true);
  7867. } else {
  7868. newIndexToOldIndexMap[newIndex - s2] = i + 1;
  7869. if (newIndex >= maxNewIndexSoFar) {
  7870. maxNewIndexSoFar = newIndex;
  7871. } else {
  7872. moved = true;
  7873. }
  7874. patch(
  7875. prevChild,
  7876. c2[newIndex],
  7877. container,
  7878. null,
  7879. parentComponent,
  7880. parentSuspense,
  7881. namespace,
  7882. slotScopeIds,
  7883. optimized
  7884. );
  7885. patched++;
  7886. }
  7887. }
  7888. const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
  7889. j = increasingNewIndexSequence.length - 1;
  7890. for (i = toBePatched - 1; i >= 0; i--) {
  7891. const nextIndex = s2 + i;
  7892. const nextChild = c2[nextIndex];
  7893. const anchorVNode = c2[nextIndex + 1];
  7894. const anchor = nextIndex + 1 < l2 ? (
  7895. // #13559, fallback to el placeholder for unresolved async component
  7896. anchorVNode.el || anchorVNode.placeholder
  7897. ) : parentAnchor;
  7898. if (newIndexToOldIndexMap[i] === 0) {
  7899. patch(
  7900. null,
  7901. nextChild,
  7902. container,
  7903. anchor,
  7904. parentComponent,
  7905. parentSuspense,
  7906. namespace,
  7907. slotScopeIds,
  7908. optimized
  7909. );
  7910. } else if (moved) {
  7911. if (j < 0 || i !== increasingNewIndexSequence[j]) {
  7912. move(nextChild, container, anchor, 2);
  7913. } else {
  7914. j--;
  7915. }
  7916. }
  7917. }
  7918. }
  7919. };
  7920. const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
  7921. const { el, type, transition, children, shapeFlag } = vnode;
  7922. if (shapeFlag & 6) {
  7923. move(vnode.component.subTree, container, anchor, moveType);
  7924. return;
  7925. }
  7926. if (shapeFlag & 128) {
  7927. vnode.suspense.move(container, anchor, moveType);
  7928. return;
  7929. }
  7930. if (shapeFlag & 64) {
  7931. type.move(vnode, container, anchor, internals);
  7932. return;
  7933. }
  7934. if (type === Fragment) {
  7935. hostInsert(el, container, anchor);
  7936. for (let i = 0; i < children.length; i++) {
  7937. move(children[i], container, anchor, moveType);
  7938. }
  7939. hostInsert(vnode.anchor, container, anchor);
  7940. return;
  7941. }
  7942. if (type === Static) {
  7943. moveStaticNode(vnode, container, anchor);
  7944. return;
  7945. }
  7946. const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
  7947. if (needTransition2) {
  7948. if (moveType === 0) {
  7949. transition.beforeEnter(el);
  7950. hostInsert(el, container, anchor);
  7951. queuePostRenderEffect(() => transition.enter(el), parentSuspense);
  7952. } else {
  7953. const { leave, delayLeave, afterLeave } = transition;
  7954. const remove22 = () => {
  7955. if (vnode.ctx.isUnmounted) {
  7956. hostRemove(el);
  7957. } else {
  7958. hostInsert(el, container, anchor);
  7959. }
  7960. };
  7961. const performLeave = () => {
  7962. leave(el, () => {
  7963. remove22();
  7964. afterLeave && afterLeave();
  7965. });
  7966. };
  7967. if (delayLeave) {
  7968. delayLeave(el, remove22, performLeave);
  7969. } else {
  7970. performLeave();
  7971. }
  7972. }
  7973. } else {
  7974. hostInsert(el, container, anchor);
  7975. }
  7976. };
  7977. const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
  7978. const {
  7979. type,
  7980. props,
  7981. ref: ref2,
  7982. children,
  7983. dynamicChildren,
  7984. shapeFlag,
  7985. patchFlag,
  7986. dirs,
  7987. cacheIndex
  7988. } = vnode;
  7989. if (patchFlag === -2) {
  7990. optimized = false;
  7991. }
  7992. if (ref2 != null) {
  7993. pauseTracking();
  7994. setRef(ref2, null, parentSuspense, vnode, true);
  7995. resetTracking();
  7996. }
  7997. if (cacheIndex != null) {
  7998. parentComponent.renderCache[cacheIndex] = void 0;
  7999. }
  8000. if (shapeFlag & 256) {
  8001. parentComponent.ctx.deactivate(vnode);
  8002. return;
  8003. }
  8004. const shouldInvokeDirs = shapeFlag & 1 && dirs;
  8005. const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
  8006. let vnodeHook;
  8007. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
  8008. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  8009. }
  8010. if (shapeFlag & 6) {
  8011. unmountComponent(vnode.component, parentSuspense, doRemove);
  8012. } else {
  8013. if (shapeFlag & 128) {
  8014. vnode.suspense.unmount(parentSuspense, doRemove);
  8015. return;
  8016. }
  8017. if (shouldInvokeDirs) {
  8018. invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
  8019. }
  8020. if (shapeFlag & 64) {
  8021. vnode.type.remove(
  8022. vnode,
  8023. parentComponent,
  8024. parentSuspense,
  8025. internals,
  8026. doRemove
  8027. );
  8028. } else if (dynamicChildren && // #5154
  8029. // when v-once is used inside a block, setBlockTracking(-1) marks the
  8030. // parent block with hasOnce: true
  8031. // so that it doesn't take the fast path during unmount - otherwise
  8032. // components nested in v-once are never unmounted.
  8033. !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
  8034. (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
  8035. unmountChildren(
  8036. dynamicChildren,
  8037. parentComponent,
  8038. parentSuspense,
  8039. false,
  8040. true
  8041. );
  8042. } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
  8043. unmountChildren(children, parentComponent, parentSuspense);
  8044. }
  8045. if (doRemove) {
  8046. remove2(vnode);
  8047. }
  8048. }
  8049. if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
  8050. queuePostRenderEffect(() => {
  8051. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  8052. shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
  8053. }, parentSuspense);
  8054. }
  8055. };
  8056. const remove2 = (vnode) => {
  8057. const { type, el, anchor, transition } = vnode;
  8058. if (type === Fragment) {
  8059. if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
  8060. vnode.children.forEach((child) => {
  8061. if (child.type === Comment) {
  8062. hostRemove(child.el);
  8063. } else {
  8064. remove2(child);
  8065. }
  8066. });
  8067. } else {
  8068. removeFragment(el, anchor);
  8069. }
  8070. return;
  8071. }
  8072. if (type === Static) {
  8073. removeStaticNode(vnode);
  8074. return;
  8075. }
  8076. const performRemove = () => {
  8077. hostRemove(el);
  8078. if (transition && !transition.persisted && transition.afterLeave) {
  8079. transition.afterLeave();
  8080. }
  8081. };
  8082. if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
  8083. const { leave, delayLeave } = transition;
  8084. const performLeave = () => leave(el, performRemove);
  8085. if (delayLeave) {
  8086. delayLeave(vnode.el, performRemove, performLeave);
  8087. } else {
  8088. performLeave();
  8089. }
  8090. } else {
  8091. performRemove();
  8092. }
  8093. };
  8094. const removeFragment = (cur, end) => {
  8095. let next;
  8096. while (cur !== end) {
  8097. next = hostNextSibling(cur);
  8098. hostRemove(cur);
  8099. cur = next;
  8100. }
  8101. hostRemove(end);
  8102. };
  8103. const unmountComponent = (instance, parentSuspense, doRemove) => {
  8104. if (instance.type.__hmrId) {
  8105. unregisterHMR(instance);
  8106. }
  8107. const {
  8108. bum,
  8109. scope,
  8110. job,
  8111. subTree,
  8112. um,
  8113. m,
  8114. a,
  8115. parent,
  8116. slots: { __: slotCacheKeys }
  8117. } = instance;
  8118. invalidateMount(m);
  8119. invalidateMount(a);
  8120. if (bum) {
  8121. invokeArrayFns(bum);
  8122. }
  8123. if (parent && isArray(slotCacheKeys)) {
  8124. slotCacheKeys.forEach((v) => {
  8125. parent.renderCache[v] = void 0;
  8126. });
  8127. }
  8128. scope.stop();
  8129. if (job) {
  8130. job.flags |= 8;
  8131. unmount(subTree, instance, parentSuspense, doRemove);
  8132. }
  8133. if (um) {
  8134. queuePostRenderEffect(um, parentSuspense);
  8135. }
  8136. queuePostRenderEffect(() => {
  8137. instance.isUnmounted = true;
  8138. }, parentSuspense);
  8139. if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
  8140. parentSuspense.deps--;
  8141. if (parentSuspense.deps === 0) {
  8142. parentSuspense.resolve();
  8143. }
  8144. }
  8145. if (true) {
  8146. devtoolsComponentRemoved(instance);
  8147. }
  8148. };
  8149. const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
  8150. for (let i = start; i < children.length; i++) {
  8151. unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
  8152. }
  8153. };
  8154. const getNextHostNode = (vnode) => {
  8155. if (vnode.shapeFlag & 6) {
  8156. return getNextHostNode(vnode.component.subTree);
  8157. }
  8158. if (vnode.shapeFlag & 128) {
  8159. return vnode.suspense.next();
  8160. }
  8161. const el = hostNextSibling(vnode.anchor || vnode.el);
  8162. const teleportEnd = el && el[TeleportEndKey];
  8163. return teleportEnd ? hostNextSibling(teleportEnd) : el;
  8164. };
  8165. let isFlushing = false;
  8166. const render2 = (vnode, container, namespace) => {
  8167. if (vnode == null) {
  8168. if (container._vnode) {
  8169. unmount(container._vnode, null, null, true);
  8170. }
  8171. } else {
  8172. patch(
  8173. container._vnode || null,
  8174. vnode,
  8175. container,
  8176. null,
  8177. null,
  8178. null,
  8179. namespace
  8180. );
  8181. }
  8182. container._vnode = vnode;
  8183. if (!isFlushing) {
  8184. isFlushing = true;
  8185. flushPreFlushCbs();
  8186. flushPostFlushCbs();
  8187. isFlushing = false;
  8188. }
  8189. };
  8190. const internals = {
  8191. p: patch,
  8192. um: unmount,
  8193. m: move,
  8194. r: remove2,
  8195. mt: mountComponent,
  8196. mc: mountChildren,
  8197. pc: patchChildren,
  8198. pbc: patchBlockChildren,
  8199. n: getNextHostNode,
  8200. o: options
  8201. };
  8202. let hydrate2;
  8203. let hydrateNode;
  8204. if (createHydrationFns) {
  8205. [hydrate2, hydrateNode] = createHydrationFns(
  8206. internals
  8207. );
  8208. }
  8209. return {
  8210. render: render2,
  8211. hydrate: hydrate2,
  8212. createApp: createAppAPI(render2, hydrate2)
  8213. };
  8214. }
  8215. function resolveChildrenNamespace({ type, props }, currentNamespace) {
  8216. return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
  8217. }
  8218. function toggleRecurse({ effect: effect2, job }, allowed) {
  8219. if (allowed) {
  8220. effect2.flags |= 32;
  8221. job.flags |= 4;
  8222. } else {
  8223. effect2.flags &= -33;
  8224. job.flags &= -5;
  8225. }
  8226. }
  8227. function needTransition(parentSuspense, transition) {
  8228. return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
  8229. }
  8230. function traverseStaticChildren(n1, n2, shallow = false) {
  8231. const ch1 = n1.children;
  8232. const ch2 = n2.children;
  8233. if (isArray(ch1) && isArray(ch2)) {
  8234. for (let i = 0; i < ch1.length; i++) {
  8235. const c1 = ch1[i];
  8236. let c2 = ch2[i];
  8237. if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
  8238. if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
  8239. c2 = ch2[i] = cloneIfMounted(ch2[i]);
  8240. c2.el = c1.el;
  8241. }
  8242. if (!shallow && c2.patchFlag !== -2)
  8243. traverseStaticChildren(c1, c2);
  8244. }
  8245. if (c2.type === Text) {
  8246. c2.el = c1.el;
  8247. }
  8248. if (c2.type === Comment && !c2.el) {
  8249. c2.el = c1.el;
  8250. }
  8251. if (true) {
  8252. c2.el && (c2.el.__vnode = c2);
  8253. }
  8254. }
  8255. }
  8256. }
  8257. function getSequence(arr) {
  8258. const p2 = arr.slice();
  8259. const result = [0];
  8260. let i, j, u, v, c;
  8261. const len = arr.length;
  8262. for (i = 0; i < len; i++) {
  8263. const arrI = arr[i];
  8264. if (arrI !== 0) {
  8265. j = result[result.length - 1];
  8266. if (arr[j] < arrI) {
  8267. p2[i] = j;
  8268. result.push(i);
  8269. continue;
  8270. }
  8271. u = 0;
  8272. v = result.length - 1;
  8273. while (u < v) {
  8274. c = u + v >> 1;
  8275. if (arr[result[c]] < arrI) {
  8276. u = c + 1;
  8277. } else {
  8278. v = c;
  8279. }
  8280. }
  8281. if (arrI < arr[result[u]]) {
  8282. if (u > 0) {
  8283. p2[i] = result[u - 1];
  8284. }
  8285. result[u] = i;
  8286. }
  8287. }
  8288. }
  8289. u = result.length;
  8290. v = result[u - 1];
  8291. while (u-- > 0) {
  8292. result[u] = v;
  8293. v = p2[v];
  8294. }
  8295. return result;
  8296. }
  8297. function locateNonHydratedAsyncRoot(instance) {
  8298. const subComponent = instance.subTree.component;
  8299. if (subComponent) {
  8300. if (subComponent.asyncDep && !subComponent.asyncResolved) {
  8301. return subComponent;
  8302. } else {
  8303. return locateNonHydratedAsyncRoot(subComponent);
  8304. }
  8305. }
  8306. }
  8307. function invalidateMount(hooks) {
  8308. if (hooks) {
  8309. for (let i = 0; i < hooks.length; i++)
  8310. hooks[i].flags |= 8;
  8311. }
  8312. }
  8313. var ssrContextKey = Symbol.for("v-scx");
  8314. var useSSRContext = () => {
  8315. {
  8316. const ctx = inject(ssrContextKey);
  8317. if (!ctx) {
  8318. warn$1(
  8319. `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
  8320. );
  8321. }
  8322. return ctx;
  8323. }
  8324. };
  8325. function watchEffect(effect2, options) {
  8326. return doWatch(effect2, null, options);
  8327. }
  8328. function watchPostEffect(effect2, options) {
  8329. return doWatch(
  8330. effect2,
  8331. null,
  8332. true ? extend({}, options, { flush: "post" }) : { flush: "post" }
  8333. );
  8334. }
  8335. function watchSyncEffect(effect2, options) {
  8336. return doWatch(
  8337. effect2,
  8338. null,
  8339. true ? extend({}, options, { flush: "sync" }) : { flush: "sync" }
  8340. );
  8341. }
  8342. function watch2(source, cb, options) {
  8343. if (!isFunction(cb)) {
  8344. warn$1(
  8345. `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
  8346. );
  8347. }
  8348. return doWatch(source, cb, options);
  8349. }
  8350. function doWatch(source, cb, options = EMPTY_OBJ) {
  8351. const { immediate, deep, flush, once } = options;
  8352. if (!cb) {
  8353. if (immediate !== void 0) {
  8354. warn$1(
  8355. `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
  8356. );
  8357. }
  8358. if (deep !== void 0) {
  8359. warn$1(
  8360. `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
  8361. );
  8362. }
  8363. if (once !== void 0) {
  8364. warn$1(
  8365. `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
  8366. );
  8367. }
  8368. }
  8369. const baseWatchOptions = extend({}, options);
  8370. if (true) baseWatchOptions.onWarn = warn$1;
  8371. const runsImmediately = cb && immediate || !cb && flush !== "post";
  8372. let ssrCleanup;
  8373. if (isInSSRComponentSetup) {
  8374. if (flush === "sync") {
  8375. const ctx = useSSRContext();
  8376. ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
  8377. } else if (!runsImmediately) {
  8378. const watchStopHandle = () => {
  8379. };
  8380. watchStopHandle.stop = NOOP;
  8381. watchStopHandle.resume = NOOP;
  8382. watchStopHandle.pause = NOOP;
  8383. return watchStopHandle;
  8384. }
  8385. }
  8386. const instance = currentInstance;
  8387. baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
  8388. let isPre = false;
  8389. if (flush === "post") {
  8390. baseWatchOptions.scheduler = (job) => {
  8391. queuePostRenderEffect(job, instance && instance.suspense);
  8392. };
  8393. } else if (flush !== "sync") {
  8394. isPre = true;
  8395. baseWatchOptions.scheduler = (job, isFirstRun) => {
  8396. if (isFirstRun) {
  8397. job();
  8398. } else {
  8399. queueJob(job);
  8400. }
  8401. };
  8402. }
  8403. baseWatchOptions.augmentJob = (job) => {
  8404. if (cb) {
  8405. job.flags |= 4;
  8406. }
  8407. if (isPre) {
  8408. job.flags |= 2;
  8409. if (instance) {
  8410. job.id = instance.uid;
  8411. job.i = instance;
  8412. }
  8413. }
  8414. };
  8415. const watchHandle = watch(source, cb, baseWatchOptions);
  8416. if (isInSSRComponentSetup) {
  8417. if (ssrCleanup) {
  8418. ssrCleanup.push(watchHandle);
  8419. } else if (runsImmediately) {
  8420. watchHandle();
  8421. }
  8422. }
  8423. return watchHandle;
  8424. }
  8425. function instanceWatch(source, value, options) {
  8426. const publicThis = this.proxy;
  8427. const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
  8428. let cb;
  8429. if (isFunction(value)) {
  8430. cb = value;
  8431. } else {
  8432. cb = value.handler;
  8433. options = value;
  8434. }
  8435. const reset = setCurrentInstance(this);
  8436. const res = doWatch(getter, cb.bind(publicThis), options);
  8437. reset();
  8438. return res;
  8439. }
  8440. function createPathGetter(ctx, path) {
  8441. const segments = path.split(".");
  8442. return () => {
  8443. let cur = ctx;
  8444. for (let i = 0; i < segments.length && cur; i++) {
  8445. cur = cur[segments[i]];
  8446. }
  8447. return cur;
  8448. };
  8449. }
  8450. function useModel(props, name, options = EMPTY_OBJ) {
  8451. const i = getCurrentInstance();
  8452. if (!i) {
  8453. warn$1(`useModel() called without active instance.`);
  8454. return ref();
  8455. }
  8456. const camelizedName = camelize(name);
  8457. if (!i.propsOptions[0][camelizedName]) {
  8458. warn$1(`useModel() called with prop "${name}" which is not declared.`);
  8459. return ref();
  8460. }
  8461. const hyphenatedName = hyphenate(name);
  8462. const modifiers = getModelModifiers(props, camelizedName);
  8463. const res = customRef((track2, trigger2) => {
  8464. let localValue;
  8465. let prevSetValue = EMPTY_OBJ;
  8466. let prevEmittedValue;
  8467. watchSyncEffect(() => {
  8468. const propValue = props[camelizedName];
  8469. if (hasChanged(localValue, propValue)) {
  8470. localValue = propValue;
  8471. trigger2();
  8472. }
  8473. });
  8474. return {
  8475. get() {
  8476. track2();
  8477. return options.get ? options.get(localValue) : localValue;
  8478. },
  8479. set(value) {
  8480. const emittedValue = options.set ? options.set(value) : value;
  8481. if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
  8482. return;
  8483. }
  8484. const rawProps = i.vnode.props;
  8485. if (!(rawProps && // check if parent has passed v-model
  8486. (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
  8487. localValue = value;
  8488. trigger2();
  8489. }
  8490. i.emit(`update:${name}`, emittedValue);
  8491. if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
  8492. trigger2();
  8493. }
  8494. prevSetValue = value;
  8495. prevEmittedValue = emittedValue;
  8496. }
  8497. };
  8498. });
  8499. res[Symbol.iterator] = () => {
  8500. let i2 = 0;
  8501. return {
  8502. next() {
  8503. if (i2 < 2) {
  8504. return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false };
  8505. } else {
  8506. return { done: true };
  8507. }
  8508. }
  8509. };
  8510. };
  8511. return res;
  8512. }
  8513. var getModelModifiers = (props, modelName) => {
  8514. return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
  8515. };
  8516. function emit(instance, event, ...rawArgs) {
  8517. if (instance.isUnmounted) return;
  8518. const props = instance.vnode.props || EMPTY_OBJ;
  8519. if (true) {
  8520. const {
  8521. emitsOptions,
  8522. propsOptions: [propsOptions]
  8523. } = instance;
  8524. if (emitsOptions) {
  8525. if (!(event in emitsOptions) && true) {
  8526. if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
  8527. warn$1(
  8528. `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
  8529. );
  8530. }
  8531. } else {
  8532. const validator = emitsOptions[event];
  8533. if (isFunction(validator)) {
  8534. const isValid = validator(...rawArgs);
  8535. if (!isValid) {
  8536. warn$1(
  8537. `Invalid event arguments: event validation failed for event "${event}".`
  8538. );
  8539. }
  8540. }
  8541. }
  8542. }
  8543. }
  8544. let args = rawArgs;
  8545. const isModelListener2 = event.startsWith("update:");
  8546. const modifiers = isModelListener2 && getModelModifiers(props, event.slice(7));
  8547. if (modifiers) {
  8548. if (modifiers.trim) {
  8549. args = rawArgs.map((a) => isString(a) ? a.trim() : a);
  8550. }
  8551. if (modifiers.number) {
  8552. args = rawArgs.map(looseToNumber);
  8553. }
  8554. }
  8555. if (true) {
  8556. devtoolsComponentEmit(instance, event, args);
  8557. }
  8558. if (true) {
  8559. const lowerCaseEvent = event.toLowerCase();
  8560. if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
  8561. warn$1(
  8562. `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
  8563. instance,
  8564. instance.type
  8565. )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(
  8566. event
  8567. )}" instead of "${event}".`
  8568. );
  8569. }
  8570. }
  8571. let handlerName;
  8572. let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
  8573. props[handlerName = toHandlerKey(camelize(event))];
  8574. if (!handler && isModelListener2) {
  8575. handler = props[handlerName = toHandlerKey(hyphenate(event))];
  8576. }
  8577. if (handler) {
  8578. callWithAsyncErrorHandling(
  8579. handler,
  8580. instance,
  8581. 6,
  8582. args
  8583. );
  8584. }
  8585. const onceHandler = props[handlerName + `Once`];
  8586. if (onceHandler) {
  8587. if (!instance.emitted) {
  8588. instance.emitted = {};
  8589. } else if (instance.emitted[handlerName]) {
  8590. return;
  8591. }
  8592. instance.emitted[handlerName] = true;
  8593. callWithAsyncErrorHandling(
  8594. onceHandler,
  8595. instance,
  8596. 6,
  8597. args
  8598. );
  8599. }
  8600. }
  8601. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  8602. const cache = appContext.emitsCache;
  8603. const cached = cache.get(comp);
  8604. if (cached !== void 0) {
  8605. return cached;
  8606. }
  8607. const raw = comp.emits;
  8608. let normalized = {};
  8609. let hasExtends = false;
  8610. if (__VUE_OPTIONS_API__ && !isFunction(comp)) {
  8611. const extendEmits = (raw2) => {
  8612. const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
  8613. if (normalizedFromExtend) {
  8614. hasExtends = true;
  8615. extend(normalized, normalizedFromExtend);
  8616. }
  8617. };
  8618. if (!asMixin && appContext.mixins.length) {
  8619. appContext.mixins.forEach(extendEmits);
  8620. }
  8621. if (comp.extends) {
  8622. extendEmits(comp.extends);
  8623. }
  8624. if (comp.mixins) {
  8625. comp.mixins.forEach(extendEmits);
  8626. }
  8627. }
  8628. if (!raw && !hasExtends) {
  8629. if (isObject(comp)) {
  8630. cache.set(comp, null);
  8631. }
  8632. return null;
  8633. }
  8634. if (isArray(raw)) {
  8635. raw.forEach((key) => normalized[key] = null);
  8636. } else {
  8637. extend(normalized, raw);
  8638. }
  8639. if (isObject(comp)) {
  8640. cache.set(comp, normalized);
  8641. }
  8642. return normalized;
  8643. }
  8644. function isEmitListener(options, key) {
  8645. if (!options || !isOn(key)) {
  8646. return false;
  8647. }
  8648. key = key.slice(2).replace(/Once$/, "");
  8649. return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
  8650. }
  8651. var accessedAttrs = false;
  8652. function markAttrsAccessed() {
  8653. accessedAttrs = true;
  8654. }
  8655. function renderComponentRoot(instance) {
  8656. const {
  8657. type: Component,
  8658. vnode,
  8659. proxy,
  8660. withProxy,
  8661. propsOptions: [propsOptions],
  8662. slots,
  8663. attrs,
  8664. emit: emit2,
  8665. render: render2,
  8666. renderCache,
  8667. props,
  8668. data,
  8669. setupState,
  8670. ctx,
  8671. inheritAttrs
  8672. } = instance;
  8673. const prev = setCurrentRenderingInstance(instance);
  8674. let result;
  8675. let fallthroughAttrs;
  8676. if (true) {
  8677. accessedAttrs = false;
  8678. }
  8679. try {
  8680. if (vnode.shapeFlag & 4) {
  8681. const proxyToUse = withProxy || proxy;
  8682. const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
  8683. get(target, key, receiver) {
  8684. warn$1(
  8685. `Property '${String(
  8686. key
  8687. )}' was accessed via 'this'. Avoid using 'this' in templates.`
  8688. );
  8689. return Reflect.get(target, key, receiver);
  8690. }
  8691. }) : proxyToUse;
  8692. result = normalizeVNode(
  8693. render2.call(
  8694. thisProxy,
  8695. proxyToUse,
  8696. renderCache,
  8697. true ? shallowReadonly(props) : props,
  8698. setupState,
  8699. data,
  8700. ctx
  8701. )
  8702. );
  8703. fallthroughAttrs = attrs;
  8704. } else {
  8705. const render22 = Component;
  8706. if (attrs === props) {
  8707. markAttrsAccessed();
  8708. }
  8709. result = normalizeVNode(
  8710. render22.length > 1 ? render22(
  8711. true ? shallowReadonly(props) : props,
  8712. true ? {
  8713. get attrs() {
  8714. markAttrsAccessed();
  8715. return shallowReadonly(attrs);
  8716. },
  8717. slots,
  8718. emit: emit2
  8719. } : { attrs, slots, emit: emit2 }
  8720. ) : render22(
  8721. true ? shallowReadonly(props) : props,
  8722. null
  8723. )
  8724. );
  8725. fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
  8726. }
  8727. } catch (err) {
  8728. blockStack.length = 0;
  8729. handleError(err, instance, 1);
  8730. result = createVNode(Comment);
  8731. }
  8732. let root = result;
  8733. let setRoot = void 0;
  8734. if (result.patchFlag > 0 && result.patchFlag & 2048) {
  8735. [root, setRoot] = getChildRoot(result);
  8736. }
  8737. if (fallthroughAttrs && inheritAttrs !== false) {
  8738. const keys = Object.keys(fallthroughAttrs);
  8739. const { shapeFlag } = root;
  8740. if (keys.length) {
  8741. if (shapeFlag & (1 | 6)) {
  8742. if (propsOptions && keys.some(isModelListener)) {
  8743. fallthroughAttrs = filterModelListeners(
  8744. fallthroughAttrs,
  8745. propsOptions
  8746. );
  8747. }
  8748. root = cloneVNode(root, fallthroughAttrs, false, true);
  8749. } else if (!accessedAttrs && root.type !== Comment) {
  8750. const allAttrs = Object.keys(attrs);
  8751. const eventAttrs = [];
  8752. const extraAttrs = [];
  8753. for (let i = 0, l = allAttrs.length; i < l; i++) {
  8754. const key = allAttrs[i];
  8755. if (isOn(key)) {
  8756. if (!isModelListener(key)) {
  8757. eventAttrs.push(key[2].toLowerCase() + key.slice(3));
  8758. }
  8759. } else {
  8760. extraAttrs.push(key);
  8761. }
  8762. }
  8763. if (extraAttrs.length) {
  8764. warn$1(
  8765. `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
  8766. );
  8767. }
  8768. if (eventAttrs.length) {
  8769. warn$1(
  8770. `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
  8771. );
  8772. }
  8773. }
  8774. }
  8775. }
  8776. if (vnode.dirs) {
  8777. if (!isElementRoot(root)) {
  8778. warn$1(
  8779. `Runtime directive used on component with non-element root node. The directives will not function as intended.`
  8780. );
  8781. }
  8782. root = cloneVNode(root, null, false, true);
  8783. root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
  8784. }
  8785. if (vnode.transition) {
  8786. if (!isElementRoot(root)) {
  8787. warn$1(
  8788. `Component inside <Transition> renders non-element root node that cannot be animated.`
  8789. );
  8790. }
  8791. setTransitionHooks(root, vnode.transition);
  8792. }
  8793. if (setRoot) {
  8794. setRoot(root);
  8795. } else {
  8796. result = root;
  8797. }
  8798. setCurrentRenderingInstance(prev);
  8799. return result;
  8800. }
  8801. var getChildRoot = (vnode) => {
  8802. const rawChildren = vnode.children;
  8803. const dynamicChildren = vnode.dynamicChildren;
  8804. const childRoot = filterSingleRoot(rawChildren, false);
  8805. if (!childRoot) {
  8806. return [vnode, void 0];
  8807. } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
  8808. return getChildRoot(childRoot);
  8809. }
  8810. const index = rawChildren.indexOf(childRoot);
  8811. const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
  8812. const setRoot = (updatedRoot) => {
  8813. rawChildren[index] = updatedRoot;
  8814. if (dynamicChildren) {
  8815. if (dynamicIndex > -1) {
  8816. dynamicChildren[dynamicIndex] = updatedRoot;
  8817. } else if (updatedRoot.patchFlag > 0) {
  8818. vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
  8819. }
  8820. }
  8821. };
  8822. return [normalizeVNode(childRoot), setRoot];
  8823. };
  8824. function filterSingleRoot(children, recurse = true) {
  8825. let singleRoot;
  8826. for (let i = 0; i < children.length; i++) {
  8827. const child = children[i];
  8828. if (isVNode(child)) {
  8829. if (child.type !== Comment || child.children === "v-if") {
  8830. if (singleRoot) {
  8831. return;
  8832. } else {
  8833. singleRoot = child;
  8834. if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
  8835. return filterSingleRoot(singleRoot.children);
  8836. }
  8837. }
  8838. }
  8839. } else {
  8840. return;
  8841. }
  8842. }
  8843. return singleRoot;
  8844. }
  8845. var getFunctionalFallthrough = (attrs) => {
  8846. let res;
  8847. for (const key in attrs) {
  8848. if (key === "class" || key === "style" || isOn(key)) {
  8849. (res || (res = {}))[key] = attrs[key];
  8850. }
  8851. }
  8852. return res;
  8853. };
  8854. var filterModelListeners = (attrs, props) => {
  8855. const res = {};
  8856. for (const key in attrs) {
  8857. if (!isModelListener(key) || !(key.slice(9) in props)) {
  8858. res[key] = attrs[key];
  8859. }
  8860. }
  8861. return res;
  8862. };
  8863. var isElementRoot = (vnode) => {
  8864. return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
  8865. };
  8866. function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
  8867. const { props: prevProps, children: prevChildren, component } = prevVNode;
  8868. const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
  8869. const emits = component.emitsOptions;
  8870. if ((prevChildren || nextChildren) && isHmrUpdating) {
  8871. return true;
  8872. }
  8873. if (nextVNode.dirs || nextVNode.transition) {
  8874. return true;
  8875. }
  8876. if (optimized && patchFlag >= 0) {
  8877. if (patchFlag & 1024) {
  8878. return true;
  8879. }
  8880. if (patchFlag & 16) {
  8881. if (!prevProps) {
  8882. return !!nextProps;
  8883. }
  8884. return hasPropsChanged(prevProps, nextProps, emits);
  8885. } else if (patchFlag & 8) {
  8886. const dynamicProps = nextVNode.dynamicProps;
  8887. for (let i = 0; i < dynamicProps.length; i++) {
  8888. const key = dynamicProps[i];
  8889. if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
  8890. return true;
  8891. }
  8892. }
  8893. }
  8894. } else {
  8895. if (prevChildren || nextChildren) {
  8896. if (!nextChildren || !nextChildren.$stable) {
  8897. return true;
  8898. }
  8899. }
  8900. if (prevProps === nextProps) {
  8901. return false;
  8902. }
  8903. if (!prevProps) {
  8904. return !!nextProps;
  8905. }
  8906. if (!nextProps) {
  8907. return true;
  8908. }
  8909. return hasPropsChanged(prevProps, nextProps, emits);
  8910. }
  8911. return false;
  8912. }
  8913. function hasPropsChanged(prevProps, nextProps, emitsOptions) {
  8914. const nextKeys = Object.keys(nextProps);
  8915. if (nextKeys.length !== Object.keys(prevProps).length) {
  8916. return true;
  8917. }
  8918. for (let i = 0; i < nextKeys.length; i++) {
  8919. const key = nextKeys[i];
  8920. if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
  8921. return true;
  8922. }
  8923. }
  8924. return false;
  8925. }
  8926. function updateHOCHostEl({ vnode, parent }, el) {
  8927. while (parent) {
  8928. const root = parent.subTree;
  8929. if (root.suspense && root.suspense.activeBranch === vnode) {
  8930. root.el = vnode.el;
  8931. }
  8932. if (root === vnode) {
  8933. (vnode = parent.vnode).el = el;
  8934. parent = parent.parent;
  8935. } else {
  8936. break;
  8937. }
  8938. }
  8939. }
  8940. var isSuspense = (type) => type.__isSuspense;
  8941. var suspenseId = 0;
  8942. var SuspenseImpl = {
  8943. name: "Suspense",
  8944. // In order to make Suspense tree-shakable, we need to avoid importing it
  8945. // directly in the renderer. The renderer checks for the __isSuspense flag
  8946. // on a vnode's type and calls the `process` method, passing in renderer
  8947. // internals.
  8948. __isSuspense: true,
  8949. process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  8950. if (n1 == null) {
  8951. mountSuspense(
  8952. n2,
  8953. container,
  8954. anchor,
  8955. parentComponent,
  8956. parentSuspense,
  8957. namespace,
  8958. slotScopeIds,
  8959. optimized,
  8960. rendererInternals
  8961. );
  8962. } else {
  8963. if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
  8964. n2.suspense = n1.suspense;
  8965. n2.suspense.vnode = n2;
  8966. n2.el = n1.el;
  8967. return;
  8968. }
  8969. patchSuspense(
  8970. n1,
  8971. n2,
  8972. container,
  8973. anchor,
  8974. parentComponent,
  8975. namespace,
  8976. slotScopeIds,
  8977. optimized,
  8978. rendererInternals
  8979. );
  8980. }
  8981. },
  8982. hydrate: hydrateSuspense,
  8983. normalize: normalizeSuspenseChildren
  8984. };
  8985. var Suspense = SuspenseImpl;
  8986. function triggerEvent(vnode, name) {
  8987. const eventListener = vnode.props && vnode.props[name];
  8988. if (isFunction(eventListener)) {
  8989. eventListener();
  8990. }
  8991. }
  8992. function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
  8993. const {
  8994. p: patch,
  8995. o: { createElement }
  8996. } = rendererInternals;
  8997. const hiddenContainer = createElement("div");
  8998. const suspense = vnode.suspense = createSuspenseBoundary(
  8999. vnode,
  9000. parentSuspense,
  9001. parentComponent,
  9002. container,
  9003. hiddenContainer,
  9004. anchor,
  9005. namespace,
  9006. slotScopeIds,
  9007. optimized,
  9008. rendererInternals
  9009. );
  9010. patch(
  9011. null,
  9012. suspense.pendingBranch = vnode.ssContent,
  9013. hiddenContainer,
  9014. null,
  9015. parentComponent,
  9016. suspense,
  9017. namespace,
  9018. slotScopeIds
  9019. );
  9020. if (suspense.deps > 0) {
  9021. triggerEvent(vnode, "onPending");
  9022. triggerEvent(vnode, "onFallback");
  9023. patch(
  9024. null,
  9025. vnode.ssFallback,
  9026. container,
  9027. anchor,
  9028. parentComponent,
  9029. null,
  9030. // fallback tree will not have suspense context
  9031. namespace,
  9032. slotScopeIds
  9033. );
  9034. setActiveBranch(suspense, vnode.ssFallback);
  9035. } else {
  9036. suspense.resolve(false, true);
  9037. }
  9038. }
  9039. function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
  9040. const suspense = n2.suspense = n1.suspense;
  9041. suspense.vnode = n2;
  9042. n2.el = n1.el;
  9043. const newBranch = n2.ssContent;
  9044. const newFallback = n2.ssFallback;
  9045. const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
  9046. if (pendingBranch) {
  9047. suspense.pendingBranch = newBranch;
  9048. if (isSameVNodeType(newBranch, pendingBranch)) {
  9049. patch(
  9050. pendingBranch,
  9051. newBranch,
  9052. suspense.hiddenContainer,
  9053. null,
  9054. parentComponent,
  9055. suspense,
  9056. namespace,
  9057. slotScopeIds,
  9058. optimized
  9059. );
  9060. if (suspense.deps <= 0) {
  9061. suspense.resolve();
  9062. } else if (isInFallback) {
  9063. if (!isHydrating) {
  9064. patch(
  9065. activeBranch,
  9066. newFallback,
  9067. container,
  9068. anchor,
  9069. parentComponent,
  9070. null,
  9071. // fallback tree will not have suspense context
  9072. namespace,
  9073. slotScopeIds,
  9074. optimized
  9075. );
  9076. setActiveBranch(suspense, newFallback);
  9077. }
  9078. }
  9079. } else {
  9080. suspense.pendingId = suspenseId++;
  9081. if (isHydrating) {
  9082. suspense.isHydrating = false;
  9083. suspense.activeBranch = pendingBranch;
  9084. } else {
  9085. unmount(pendingBranch, parentComponent, suspense);
  9086. }
  9087. suspense.deps = 0;
  9088. suspense.effects.length = 0;
  9089. suspense.hiddenContainer = createElement("div");
  9090. if (isInFallback) {
  9091. patch(
  9092. null,
  9093. newBranch,
  9094. suspense.hiddenContainer,
  9095. null,
  9096. parentComponent,
  9097. suspense,
  9098. namespace,
  9099. slotScopeIds,
  9100. optimized
  9101. );
  9102. if (suspense.deps <= 0) {
  9103. suspense.resolve();
  9104. } else {
  9105. patch(
  9106. activeBranch,
  9107. newFallback,
  9108. container,
  9109. anchor,
  9110. parentComponent,
  9111. null,
  9112. // fallback tree will not have suspense context
  9113. namespace,
  9114. slotScopeIds,
  9115. optimized
  9116. );
  9117. setActiveBranch(suspense, newFallback);
  9118. }
  9119. } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  9120. patch(
  9121. activeBranch,
  9122. newBranch,
  9123. container,
  9124. anchor,
  9125. parentComponent,
  9126. suspense,
  9127. namespace,
  9128. slotScopeIds,
  9129. optimized
  9130. );
  9131. suspense.resolve(true);
  9132. } else {
  9133. patch(
  9134. null,
  9135. newBranch,
  9136. suspense.hiddenContainer,
  9137. null,
  9138. parentComponent,
  9139. suspense,
  9140. namespace,
  9141. slotScopeIds,
  9142. optimized
  9143. );
  9144. if (suspense.deps <= 0) {
  9145. suspense.resolve();
  9146. }
  9147. }
  9148. }
  9149. } else {
  9150. if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  9151. patch(
  9152. activeBranch,
  9153. newBranch,
  9154. container,
  9155. anchor,
  9156. parentComponent,
  9157. suspense,
  9158. namespace,
  9159. slotScopeIds,
  9160. optimized
  9161. );
  9162. setActiveBranch(suspense, newBranch);
  9163. } else {
  9164. triggerEvent(n2, "onPending");
  9165. suspense.pendingBranch = newBranch;
  9166. if (newBranch.shapeFlag & 512) {
  9167. suspense.pendingId = newBranch.component.suspenseId;
  9168. } else {
  9169. suspense.pendingId = suspenseId++;
  9170. }
  9171. patch(
  9172. null,
  9173. newBranch,
  9174. suspense.hiddenContainer,
  9175. null,
  9176. parentComponent,
  9177. suspense,
  9178. namespace,
  9179. slotScopeIds,
  9180. optimized
  9181. );
  9182. if (suspense.deps <= 0) {
  9183. suspense.resolve();
  9184. } else {
  9185. const { timeout, pendingId } = suspense;
  9186. if (timeout > 0) {
  9187. setTimeout(() => {
  9188. if (suspense.pendingId === pendingId) {
  9189. suspense.fallback(newFallback);
  9190. }
  9191. }, timeout);
  9192. } else if (timeout === 0) {
  9193. suspense.fallback(newFallback);
  9194. }
  9195. }
  9196. }
  9197. }
  9198. }
  9199. var hasWarned = false;
  9200. function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
  9201. if (!hasWarned) {
  9202. hasWarned = true;
  9203. console[console.info ? "info" : "log"](
  9204. `<Suspense> is an experimental feature and its API will likely change.`
  9205. );
  9206. }
  9207. const {
  9208. p: patch,
  9209. m: move,
  9210. um: unmount,
  9211. n: next,
  9212. o: { parentNode, remove: remove2 }
  9213. } = rendererInternals;
  9214. let parentSuspenseId;
  9215. const isSuspensible = isVNodeSuspensible(vnode);
  9216. if (isSuspensible) {
  9217. if (parentSuspense && parentSuspense.pendingBranch) {
  9218. parentSuspenseId = parentSuspense.pendingId;
  9219. parentSuspense.deps++;
  9220. }
  9221. }
  9222. const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
  9223. if (true) {
  9224. assertNumber(timeout, `Suspense timeout`);
  9225. }
  9226. const initialAnchor = anchor;
  9227. const suspense = {
  9228. vnode,
  9229. parent: parentSuspense,
  9230. parentComponent,
  9231. namespace,
  9232. container,
  9233. hiddenContainer,
  9234. deps: 0,
  9235. pendingId: suspenseId++,
  9236. timeout: typeof timeout === "number" ? timeout : -1,
  9237. activeBranch: null,
  9238. pendingBranch: null,
  9239. isInFallback: !isHydrating,
  9240. isHydrating,
  9241. isUnmounted: false,
  9242. effects: [],
  9243. resolve(resume = false, sync = false) {
  9244. if (true) {
  9245. if (!resume && !suspense.pendingBranch) {
  9246. throw new Error(
  9247. `suspense.resolve() is called without a pending branch.`
  9248. );
  9249. }
  9250. if (suspense.isUnmounted) {
  9251. throw new Error(
  9252. `suspense.resolve() is called on an already unmounted suspense boundary.`
  9253. );
  9254. }
  9255. }
  9256. const {
  9257. vnode: vnode2,
  9258. activeBranch,
  9259. pendingBranch,
  9260. pendingId,
  9261. effects,
  9262. parentComponent: parentComponent2,
  9263. container: container2
  9264. } = suspense;
  9265. let delayEnter = false;
  9266. if (suspense.isHydrating) {
  9267. suspense.isHydrating = false;
  9268. } else if (!resume) {
  9269. delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
  9270. if (delayEnter) {
  9271. activeBranch.transition.afterLeave = () => {
  9272. if (pendingId === suspense.pendingId) {
  9273. move(
  9274. pendingBranch,
  9275. container2,
  9276. anchor === initialAnchor ? next(activeBranch) : anchor,
  9277. 0
  9278. );
  9279. queuePostFlushCb(effects);
  9280. }
  9281. };
  9282. }
  9283. if (activeBranch) {
  9284. if (parentNode(activeBranch.el) === container2) {
  9285. anchor = next(activeBranch);
  9286. }
  9287. unmount(activeBranch, parentComponent2, suspense, true);
  9288. }
  9289. if (!delayEnter) {
  9290. move(pendingBranch, container2, anchor, 0);
  9291. }
  9292. }
  9293. setActiveBranch(suspense, pendingBranch);
  9294. suspense.pendingBranch = null;
  9295. suspense.isInFallback = false;
  9296. let parent = suspense.parent;
  9297. let hasUnresolvedAncestor = false;
  9298. while (parent) {
  9299. if (parent.pendingBranch) {
  9300. parent.effects.push(...effects);
  9301. hasUnresolvedAncestor = true;
  9302. break;
  9303. }
  9304. parent = parent.parent;
  9305. }
  9306. if (!hasUnresolvedAncestor && !delayEnter) {
  9307. queuePostFlushCb(effects);
  9308. }
  9309. suspense.effects = [];
  9310. if (isSuspensible) {
  9311. if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
  9312. parentSuspense.deps--;
  9313. if (parentSuspense.deps === 0 && !sync) {
  9314. parentSuspense.resolve();
  9315. }
  9316. }
  9317. }
  9318. triggerEvent(vnode2, "onResolve");
  9319. },
  9320. fallback(fallbackVNode) {
  9321. if (!suspense.pendingBranch) {
  9322. return;
  9323. }
  9324. const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
  9325. triggerEvent(vnode2, "onFallback");
  9326. const anchor2 = next(activeBranch);
  9327. const mountFallback = () => {
  9328. if (!suspense.isInFallback) {
  9329. return;
  9330. }
  9331. patch(
  9332. null,
  9333. fallbackVNode,
  9334. container2,
  9335. anchor2,
  9336. parentComponent2,
  9337. null,
  9338. // fallback tree will not have suspense context
  9339. namespace2,
  9340. slotScopeIds,
  9341. optimized
  9342. );
  9343. setActiveBranch(suspense, fallbackVNode);
  9344. };
  9345. const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
  9346. if (delayEnter) {
  9347. activeBranch.transition.afterLeave = mountFallback;
  9348. }
  9349. suspense.isInFallback = true;
  9350. unmount(
  9351. activeBranch,
  9352. parentComponent2,
  9353. null,
  9354. // no suspense so unmount hooks fire now
  9355. true
  9356. // shouldRemove
  9357. );
  9358. if (!delayEnter) {
  9359. mountFallback();
  9360. }
  9361. },
  9362. move(container2, anchor2, type) {
  9363. suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
  9364. suspense.container = container2;
  9365. },
  9366. next() {
  9367. return suspense.activeBranch && next(suspense.activeBranch);
  9368. },
  9369. registerDep(instance, setupRenderEffect, optimized2) {
  9370. const isInPendingSuspense = !!suspense.pendingBranch;
  9371. if (isInPendingSuspense) {
  9372. suspense.deps++;
  9373. }
  9374. const hydratedEl = instance.vnode.el;
  9375. instance.asyncDep.catch((err) => {
  9376. handleError(err, instance, 0);
  9377. }).then((asyncSetupResult) => {
  9378. if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
  9379. return;
  9380. }
  9381. instance.asyncResolved = true;
  9382. const { vnode: vnode2 } = instance;
  9383. if (true) {
  9384. pushWarningContext(vnode2);
  9385. }
  9386. handleSetupResult(instance, asyncSetupResult, false);
  9387. if (hydratedEl) {
  9388. vnode2.el = hydratedEl;
  9389. }
  9390. const placeholder = !hydratedEl && instance.subTree.el;
  9391. setupRenderEffect(
  9392. instance,
  9393. vnode2,
  9394. // component may have been moved before resolve.
  9395. // if this is not a hydration, instance.subTree will be the comment
  9396. // placeholder.
  9397. parentNode(hydratedEl || instance.subTree.el),
  9398. // anchor will not be used if this is hydration, so only need to
  9399. // consider the comment placeholder case.
  9400. hydratedEl ? null : next(instance.subTree),
  9401. suspense,
  9402. namespace,
  9403. optimized2
  9404. );
  9405. if (placeholder) {
  9406. remove2(placeholder);
  9407. }
  9408. updateHOCHostEl(instance, vnode2.el);
  9409. if (true) {
  9410. popWarningContext();
  9411. }
  9412. if (isInPendingSuspense && --suspense.deps === 0) {
  9413. suspense.resolve();
  9414. }
  9415. });
  9416. },
  9417. unmount(parentSuspense2, doRemove) {
  9418. suspense.isUnmounted = true;
  9419. if (suspense.activeBranch) {
  9420. unmount(
  9421. suspense.activeBranch,
  9422. parentComponent,
  9423. parentSuspense2,
  9424. doRemove
  9425. );
  9426. }
  9427. if (suspense.pendingBranch) {
  9428. unmount(
  9429. suspense.pendingBranch,
  9430. parentComponent,
  9431. parentSuspense2,
  9432. doRemove
  9433. );
  9434. }
  9435. }
  9436. };
  9437. return suspense;
  9438. }
  9439. function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
  9440. const suspense = vnode.suspense = createSuspenseBoundary(
  9441. vnode,
  9442. parentSuspense,
  9443. parentComponent,
  9444. node.parentNode,
  9445. // eslint-disable-next-line no-restricted-globals
  9446. document.createElement("div"),
  9447. null,
  9448. namespace,
  9449. slotScopeIds,
  9450. optimized,
  9451. rendererInternals,
  9452. true
  9453. );
  9454. const result = hydrateNode(
  9455. node,
  9456. suspense.pendingBranch = vnode.ssContent,
  9457. parentComponent,
  9458. suspense,
  9459. slotScopeIds,
  9460. optimized
  9461. );
  9462. if (suspense.deps === 0) {
  9463. suspense.resolve(false, true);
  9464. }
  9465. return result;
  9466. }
  9467. function normalizeSuspenseChildren(vnode) {
  9468. const { shapeFlag, children } = vnode;
  9469. const isSlotChildren = shapeFlag & 32;
  9470. vnode.ssContent = normalizeSuspenseSlot(
  9471. isSlotChildren ? children.default : children
  9472. );
  9473. vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
  9474. }
  9475. function normalizeSuspenseSlot(s) {
  9476. let block;
  9477. if (isFunction(s)) {
  9478. const trackBlock = isBlockTreeEnabled && s._c;
  9479. if (trackBlock) {
  9480. s._d = false;
  9481. openBlock();
  9482. }
  9483. s = s();
  9484. if (trackBlock) {
  9485. s._d = true;
  9486. block = currentBlock;
  9487. closeBlock();
  9488. }
  9489. }
  9490. if (isArray(s)) {
  9491. const singleChild = filterSingleRoot(s);
  9492. if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
  9493. warn$1(`<Suspense> slots expect a single root node.`);
  9494. }
  9495. s = singleChild;
  9496. }
  9497. s = normalizeVNode(s);
  9498. if (block && !s.dynamicChildren) {
  9499. s.dynamicChildren = block.filter((c) => c !== s);
  9500. }
  9501. return s;
  9502. }
  9503. function queueEffectWithSuspense(fn, suspense) {
  9504. if (suspense && suspense.pendingBranch) {
  9505. if (isArray(fn)) {
  9506. suspense.effects.push(...fn);
  9507. } else {
  9508. suspense.effects.push(fn);
  9509. }
  9510. } else {
  9511. queuePostFlushCb(fn);
  9512. }
  9513. }
  9514. function setActiveBranch(suspense, branch) {
  9515. suspense.activeBranch = branch;
  9516. const { vnode, parentComponent } = suspense;
  9517. let el = branch.el;
  9518. while (!el && branch.component) {
  9519. branch = branch.component.subTree;
  9520. el = branch.el;
  9521. }
  9522. vnode.el = el;
  9523. if (parentComponent && parentComponent.subTree === vnode) {
  9524. parentComponent.vnode.el = el;
  9525. updateHOCHostEl(parentComponent, el);
  9526. }
  9527. }
  9528. function isVNodeSuspensible(vnode) {
  9529. const suspensible = vnode.props && vnode.props.suspensible;
  9530. return suspensible != null && suspensible !== false;
  9531. }
  9532. var Fragment = Symbol.for("v-fgt");
  9533. var Text = Symbol.for("v-txt");
  9534. var Comment = Symbol.for("v-cmt");
  9535. var Static = Symbol.for("v-stc");
  9536. var blockStack = [];
  9537. var currentBlock = null;
  9538. function openBlock(disableTracking = false) {
  9539. blockStack.push(currentBlock = disableTracking ? null : []);
  9540. }
  9541. function closeBlock() {
  9542. blockStack.pop();
  9543. currentBlock = blockStack[blockStack.length - 1] || null;
  9544. }
  9545. var isBlockTreeEnabled = 1;
  9546. function setBlockTracking(value, inVOnce = false) {
  9547. isBlockTreeEnabled += value;
  9548. if (value < 0 && currentBlock && inVOnce) {
  9549. currentBlock.hasOnce = true;
  9550. }
  9551. }
  9552. function setupBlock(vnode) {
  9553. vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
  9554. closeBlock();
  9555. if (isBlockTreeEnabled > 0 && currentBlock) {
  9556. currentBlock.push(vnode);
  9557. }
  9558. return vnode;
  9559. }
  9560. function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
  9561. return setupBlock(
  9562. createBaseVNode(
  9563. type,
  9564. props,
  9565. children,
  9566. patchFlag,
  9567. dynamicProps,
  9568. shapeFlag,
  9569. true
  9570. )
  9571. );
  9572. }
  9573. function createBlock(type, props, children, patchFlag, dynamicProps) {
  9574. return setupBlock(
  9575. createVNode(
  9576. type,
  9577. props,
  9578. children,
  9579. patchFlag,
  9580. dynamicProps,
  9581. true
  9582. )
  9583. );
  9584. }
  9585. function isVNode(value) {
  9586. return value ? value.__v_isVNode === true : false;
  9587. }
  9588. function isSameVNodeType(n1, n2) {
  9589. if (n2.shapeFlag & 6 && n1.component) {
  9590. const dirtyInstances = hmrDirtyComponents.get(n2.type);
  9591. if (dirtyInstances && dirtyInstances.has(n1.component)) {
  9592. n1.shapeFlag &= -257;
  9593. n2.shapeFlag &= -513;
  9594. return false;
  9595. }
  9596. }
  9597. return n1.type === n2.type && n1.key === n2.key;
  9598. }
  9599. var vnodeArgsTransformer;
  9600. function transformVNodeArgs(transformer) {
  9601. vnodeArgsTransformer = transformer;
  9602. }
  9603. var createVNodeWithArgsTransform = (...args) => {
  9604. return _createVNode(
  9605. ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
  9606. );
  9607. };
  9608. var normalizeKey = ({ key }) => key != null ? key : null;
  9609. var normalizeRef = ({
  9610. ref: ref2,
  9611. ref_key,
  9612. ref_for
  9613. }) => {
  9614. if (typeof ref2 === "number") {
  9615. ref2 = "" + ref2;
  9616. }
  9617. return ref2 != null ? isString(ref2) || isRef2(ref2) || isFunction(ref2) ? { i: currentRenderingInstance, r: ref2, k: ref_key, f: !!ref_for } : ref2 : null;
  9618. };
  9619. function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
  9620. const vnode = {
  9621. __v_isVNode: true,
  9622. __v_skip: true,
  9623. type,
  9624. props,
  9625. key: props && normalizeKey(props),
  9626. ref: props && normalizeRef(props),
  9627. scopeId: currentScopeId,
  9628. slotScopeIds: null,
  9629. children,
  9630. component: null,
  9631. suspense: null,
  9632. ssContent: null,
  9633. ssFallback: null,
  9634. dirs: null,
  9635. transition: null,
  9636. el: null,
  9637. anchor: null,
  9638. target: null,
  9639. targetStart: null,
  9640. targetAnchor: null,
  9641. staticCount: 0,
  9642. shapeFlag,
  9643. patchFlag,
  9644. dynamicProps,
  9645. dynamicChildren: null,
  9646. appContext: null,
  9647. ctx: currentRenderingInstance
  9648. };
  9649. if (needFullChildrenNormalization) {
  9650. normalizeChildren(vnode, children);
  9651. if (shapeFlag & 128) {
  9652. type.normalize(vnode);
  9653. }
  9654. } else if (children) {
  9655. vnode.shapeFlag |= isString(children) ? 8 : 16;
  9656. }
  9657. if (vnode.key !== vnode.key) {
  9658. warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
  9659. }
  9660. if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
  9661. !isBlockNode && // has current parent block
  9662. currentBlock && // presence of a patch flag indicates this node needs patching on updates.
  9663. // component nodes also should always be patched, because even if the
  9664. // component doesn't need to update, it needs to persist the instance on to
  9665. // the next vnode so that it can be properly unmounted later.
  9666. (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
  9667. // vnode should not be considered dynamic due to handler caching.
  9668. vnode.patchFlag !== 32) {
  9669. currentBlock.push(vnode);
  9670. }
  9671. return vnode;
  9672. }
  9673. var createVNode = true ? createVNodeWithArgsTransform : _createVNode;
  9674. function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
  9675. if (!type || type === NULL_DYNAMIC_COMPONENT) {
  9676. if (!type) {
  9677. warn$1(`Invalid vnode type when creating vnode: ${type}.`);
  9678. }
  9679. type = Comment;
  9680. }
  9681. if (isVNode(type)) {
  9682. const cloned = cloneVNode(
  9683. type,
  9684. props,
  9685. true
  9686. /* mergeRef: true */
  9687. );
  9688. if (children) {
  9689. normalizeChildren(cloned, children);
  9690. }
  9691. if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
  9692. if (cloned.shapeFlag & 6) {
  9693. currentBlock[currentBlock.indexOf(type)] = cloned;
  9694. } else {
  9695. currentBlock.push(cloned);
  9696. }
  9697. }
  9698. cloned.patchFlag = -2;
  9699. return cloned;
  9700. }
  9701. if (isClassComponent(type)) {
  9702. type = type.__vccOpts;
  9703. }
  9704. if (props) {
  9705. props = guardReactiveProps(props);
  9706. let { class: klass, style } = props;
  9707. if (klass && !isString(klass)) {
  9708. props.class = normalizeClass(klass);
  9709. }
  9710. if (isObject(style)) {
  9711. if (isProxy(style) && !isArray(style)) {
  9712. style = extend({}, style);
  9713. }
  9714. props.style = normalizeStyle(style);
  9715. }
  9716. }
  9717. const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
  9718. if (shapeFlag & 4 && isProxy(type)) {
  9719. type = toRaw(type);
  9720. warn$1(
  9721. `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
  9722. `
  9723. Component that was made reactive: `,
  9724. type
  9725. );
  9726. }
  9727. return createBaseVNode(
  9728. type,
  9729. props,
  9730. children,
  9731. patchFlag,
  9732. dynamicProps,
  9733. shapeFlag,
  9734. isBlockNode,
  9735. true
  9736. );
  9737. }
  9738. function guardReactiveProps(props) {
  9739. if (!props) return null;
  9740. return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
  9741. }
  9742. function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
  9743. const { props, ref: ref2, patchFlag, children, transition } = vnode;
  9744. const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
  9745. const cloned = {
  9746. __v_isVNode: true,
  9747. __v_skip: true,
  9748. type: vnode.type,
  9749. props: mergedProps,
  9750. key: mergedProps && normalizeKey(mergedProps),
  9751. ref: extraProps && extraProps.ref ? (
  9752. // #2078 in the case of <component :is="vnode" ref="extra"/>
  9753. // if the vnode itself already has a ref, cloneVNode will need to merge
  9754. // the refs so the single vnode can be set on multiple refs
  9755. mergeRef && ref2 ? isArray(ref2) ? ref2.concat(normalizeRef(extraProps)) : [ref2, normalizeRef(extraProps)] : normalizeRef(extraProps)
  9756. ) : ref2,
  9757. scopeId: vnode.scopeId,
  9758. slotScopeIds: vnode.slotScopeIds,
  9759. children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
  9760. target: vnode.target,
  9761. targetStart: vnode.targetStart,
  9762. targetAnchor: vnode.targetAnchor,
  9763. staticCount: vnode.staticCount,
  9764. shapeFlag: vnode.shapeFlag,
  9765. // if the vnode is cloned with extra props, we can no longer assume its
  9766. // existing patch flag to be reliable and need to add the FULL_PROPS flag.
  9767. // note: preserve flag for fragments since they use the flag for children
  9768. // fast paths only.
  9769. patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
  9770. dynamicProps: vnode.dynamicProps,
  9771. dynamicChildren: vnode.dynamicChildren,
  9772. appContext: vnode.appContext,
  9773. dirs: vnode.dirs,
  9774. transition,
  9775. // These should technically only be non-null on mounted VNodes. However,
  9776. // they *should* be copied for kept-alive vnodes. So we just always copy
  9777. // them since them being non-null during a mount doesn't affect the logic as
  9778. // they will simply be overwritten.
  9779. component: vnode.component,
  9780. suspense: vnode.suspense,
  9781. ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
  9782. ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
  9783. placeholder: vnode.placeholder,
  9784. el: vnode.el,
  9785. anchor: vnode.anchor,
  9786. ctx: vnode.ctx,
  9787. ce: vnode.ce
  9788. };
  9789. if (transition && cloneTransition) {
  9790. setTransitionHooks(
  9791. cloned,
  9792. transition.clone(cloned)
  9793. );
  9794. }
  9795. return cloned;
  9796. }
  9797. function deepCloneVNode(vnode) {
  9798. const cloned = cloneVNode(vnode);
  9799. if (isArray(vnode.children)) {
  9800. cloned.children = vnode.children.map(deepCloneVNode);
  9801. }
  9802. return cloned;
  9803. }
  9804. function createTextVNode(text = " ", flag = 0) {
  9805. return createVNode(Text, null, text, flag);
  9806. }
  9807. function createStaticVNode(content, numberOfNodes) {
  9808. const vnode = createVNode(Static, null, content);
  9809. vnode.staticCount = numberOfNodes;
  9810. return vnode;
  9811. }
  9812. function createCommentVNode(text = "", asBlock = false) {
  9813. return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
  9814. }
  9815. function normalizeVNode(child) {
  9816. if (child == null || typeof child === "boolean") {
  9817. return createVNode(Comment);
  9818. } else if (isArray(child)) {
  9819. return createVNode(
  9820. Fragment,
  9821. null,
  9822. // #3666, avoid reference pollution when reusing vnode
  9823. child.slice()
  9824. );
  9825. } else if (isVNode(child)) {
  9826. return cloneIfMounted(child);
  9827. } else {
  9828. return createVNode(Text, null, String(child));
  9829. }
  9830. }
  9831. function cloneIfMounted(child) {
  9832. return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
  9833. }
  9834. function normalizeChildren(vnode, children) {
  9835. let type = 0;
  9836. const { shapeFlag } = vnode;
  9837. if (children == null) {
  9838. children = null;
  9839. } else if (isArray(children)) {
  9840. type = 16;
  9841. } else if (typeof children === "object") {
  9842. if (shapeFlag & (1 | 64)) {
  9843. const slot = children.default;
  9844. if (slot) {
  9845. slot._c && (slot._d = false);
  9846. normalizeChildren(vnode, slot());
  9847. slot._c && (slot._d = true);
  9848. }
  9849. return;
  9850. } else {
  9851. type = 32;
  9852. const slotFlag = children._;
  9853. if (!slotFlag && !isInternalObject(children)) {
  9854. children._ctx = currentRenderingInstance;
  9855. } else if (slotFlag === 3 && currentRenderingInstance) {
  9856. if (currentRenderingInstance.slots._ === 1) {
  9857. children._ = 1;
  9858. } else {
  9859. children._ = 2;
  9860. vnode.patchFlag |= 1024;
  9861. }
  9862. }
  9863. }
  9864. } else if (isFunction(children)) {
  9865. children = { default: children, _ctx: currentRenderingInstance };
  9866. type = 32;
  9867. } else {
  9868. children = String(children);
  9869. if (shapeFlag & 64) {
  9870. type = 16;
  9871. children = [createTextVNode(children)];
  9872. } else {
  9873. type = 8;
  9874. }
  9875. }
  9876. vnode.children = children;
  9877. vnode.shapeFlag |= type;
  9878. }
  9879. function mergeProps(...args) {
  9880. const ret = {};
  9881. for (let i = 0; i < args.length; i++) {
  9882. const toMerge = args[i];
  9883. for (const key in toMerge) {
  9884. if (key === "class") {
  9885. if (ret.class !== toMerge.class) {
  9886. ret.class = normalizeClass([ret.class, toMerge.class]);
  9887. }
  9888. } else if (key === "style") {
  9889. ret.style = normalizeStyle([ret.style, toMerge.style]);
  9890. } else if (isOn(key)) {
  9891. const existing = ret[key];
  9892. const incoming = toMerge[key];
  9893. if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
  9894. ret[key] = existing ? [].concat(existing, incoming) : incoming;
  9895. }
  9896. } else if (key !== "") {
  9897. ret[key] = toMerge[key];
  9898. }
  9899. }
  9900. }
  9901. return ret;
  9902. }
  9903. function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
  9904. callWithAsyncErrorHandling(hook, instance, 7, [
  9905. vnode,
  9906. prevVNode
  9907. ]);
  9908. }
  9909. var emptyAppContext = createAppContext();
  9910. var uid = 0;
  9911. function createComponentInstance(vnode, parent, suspense) {
  9912. const type = vnode.type;
  9913. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  9914. const instance = {
  9915. uid: uid++,
  9916. vnode,
  9917. type,
  9918. parent,
  9919. appContext,
  9920. root: null,
  9921. // to be immediately set
  9922. next: null,
  9923. subTree: null,
  9924. // will be set synchronously right after creation
  9925. effect: null,
  9926. update: null,
  9927. // will be set synchronously right after creation
  9928. job: null,
  9929. scope: new EffectScope(
  9930. true
  9931. /* detached */
  9932. ),
  9933. render: null,
  9934. proxy: null,
  9935. exposed: null,
  9936. exposeProxy: null,
  9937. withProxy: null,
  9938. provides: parent ? parent.provides : Object.create(appContext.provides),
  9939. ids: parent ? parent.ids : ["", 0, 0],
  9940. accessCache: null,
  9941. renderCache: [],
  9942. // local resolved assets
  9943. components: null,
  9944. directives: null,
  9945. // resolved props and emits options
  9946. propsOptions: normalizePropsOptions(type, appContext),
  9947. emitsOptions: normalizeEmitsOptions(type, appContext),
  9948. // emit
  9949. emit: null,
  9950. // to be set immediately
  9951. emitted: null,
  9952. // props default value
  9953. propsDefaults: EMPTY_OBJ,
  9954. // inheritAttrs
  9955. inheritAttrs: type.inheritAttrs,
  9956. // state
  9957. ctx: EMPTY_OBJ,
  9958. data: EMPTY_OBJ,
  9959. props: EMPTY_OBJ,
  9960. attrs: EMPTY_OBJ,
  9961. slots: EMPTY_OBJ,
  9962. refs: EMPTY_OBJ,
  9963. setupState: EMPTY_OBJ,
  9964. setupContext: null,
  9965. // suspense related
  9966. suspense,
  9967. suspenseId: suspense ? suspense.pendingId : 0,
  9968. asyncDep: null,
  9969. asyncResolved: false,
  9970. // lifecycle hooks
  9971. // not using enums here because it results in computed properties
  9972. isMounted: false,
  9973. isUnmounted: false,
  9974. isDeactivated: false,
  9975. bc: null,
  9976. c: null,
  9977. bm: null,
  9978. m: null,
  9979. bu: null,
  9980. u: null,
  9981. um: null,
  9982. bum: null,
  9983. da: null,
  9984. a: null,
  9985. rtg: null,
  9986. rtc: null,
  9987. ec: null,
  9988. sp: null
  9989. };
  9990. if (true) {
  9991. instance.ctx = createDevRenderContext(instance);
  9992. } else {
  9993. instance.ctx = { _: instance };
  9994. }
  9995. instance.root = parent ? parent.root : instance;
  9996. instance.emit = emit.bind(null, instance);
  9997. if (vnode.ce) {
  9998. vnode.ce(instance);
  9999. }
  10000. return instance;
  10001. }
  10002. var currentInstance = null;
  10003. var getCurrentInstance = () => currentInstance || currentRenderingInstance;
  10004. var internalSetCurrentInstance;
  10005. var setInSSRSetupState;
  10006. {
  10007. const g = getGlobalThis();
  10008. const registerGlobalSetter = (key, setter) => {
  10009. let setters;
  10010. if (!(setters = g[key])) setters = g[key] = [];
  10011. setters.push(setter);
  10012. return (v) => {
  10013. if (setters.length > 1) setters.forEach((set) => set(v));
  10014. else setters[0](v);
  10015. };
  10016. };
  10017. internalSetCurrentInstance = registerGlobalSetter(
  10018. `__VUE_INSTANCE_SETTERS__`,
  10019. (v) => currentInstance = v
  10020. );
  10021. setInSSRSetupState = registerGlobalSetter(
  10022. `__VUE_SSR_SETTERS__`,
  10023. (v) => isInSSRComponentSetup = v
  10024. );
  10025. }
  10026. var setCurrentInstance = (instance) => {
  10027. const prev = currentInstance;
  10028. internalSetCurrentInstance(instance);
  10029. instance.scope.on();
  10030. return () => {
  10031. instance.scope.off();
  10032. internalSetCurrentInstance(prev);
  10033. };
  10034. };
  10035. var unsetCurrentInstance = () => {
  10036. currentInstance && currentInstance.scope.off();
  10037. internalSetCurrentInstance(null);
  10038. };
  10039. var isBuiltInTag = makeMap("slot,component");
  10040. function validateComponentName(name, { isNativeTag }) {
  10041. if (isBuiltInTag(name) || isNativeTag(name)) {
  10042. warn$1(
  10043. "Do not use built-in or reserved HTML elements as component id: " + name
  10044. );
  10045. }
  10046. }
  10047. function isStatefulComponent(instance) {
  10048. return instance.vnode.shapeFlag & 4;
  10049. }
  10050. var isInSSRComponentSetup = false;
  10051. function setupComponent(instance, isSSR = false, optimized = false) {
  10052. isSSR && setInSSRSetupState(isSSR);
  10053. const { props, children } = instance.vnode;
  10054. const isStateful = isStatefulComponent(instance);
  10055. initProps(instance, props, isStateful, isSSR);
  10056. initSlots(instance, children, optimized || isSSR);
  10057. const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
  10058. isSSR && setInSSRSetupState(false);
  10059. return setupResult;
  10060. }
  10061. function setupStatefulComponent(instance, isSSR) {
  10062. var _a;
  10063. const Component = instance.type;
  10064. if (true) {
  10065. if (Component.name) {
  10066. validateComponentName(Component.name, instance.appContext.config);
  10067. }
  10068. if (Component.components) {
  10069. const names = Object.keys(Component.components);
  10070. for (let i = 0; i < names.length; i++) {
  10071. validateComponentName(names[i], instance.appContext.config);
  10072. }
  10073. }
  10074. if (Component.directives) {
  10075. const names = Object.keys(Component.directives);
  10076. for (let i = 0; i < names.length; i++) {
  10077. validateDirectiveName(names[i]);
  10078. }
  10079. }
  10080. if (Component.compilerOptions && isRuntimeOnly()) {
  10081. warn$1(
  10082. `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`
  10083. );
  10084. }
  10085. }
  10086. instance.accessCache = /* @__PURE__ */ Object.create(null);
  10087. instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
  10088. if (true) {
  10089. exposePropsOnRenderContext(instance);
  10090. }
  10091. const { setup } = Component;
  10092. if (setup) {
  10093. pauseTracking();
  10094. const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
  10095. const reset = setCurrentInstance(instance);
  10096. const setupResult = callWithErrorHandling(
  10097. setup,
  10098. instance,
  10099. 0,
  10100. [
  10101. true ? shallowReadonly(instance.props) : instance.props,
  10102. setupContext
  10103. ]
  10104. );
  10105. const isAsyncSetup = isPromise(setupResult);
  10106. resetTracking();
  10107. reset();
  10108. if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
  10109. markAsyncBoundary(instance);
  10110. }
  10111. if (isAsyncSetup) {
  10112. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  10113. if (isSSR) {
  10114. return setupResult.then((resolvedResult) => {
  10115. handleSetupResult(instance, resolvedResult, isSSR);
  10116. }).catch((e) => {
  10117. handleError(e, instance, 0);
  10118. });
  10119. } else {
  10120. instance.asyncDep = setupResult;
  10121. if (!instance.suspense) {
  10122. const name = (_a = Component.name) != null ? _a : "Anonymous";
  10123. warn$1(
  10124. `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
  10125. );
  10126. }
  10127. }
  10128. } else {
  10129. handleSetupResult(instance, setupResult, isSSR);
  10130. }
  10131. } else {
  10132. finishComponentSetup(instance, isSSR);
  10133. }
  10134. }
  10135. function handleSetupResult(instance, setupResult, isSSR) {
  10136. if (isFunction(setupResult)) {
  10137. if (instance.type.__ssrInlineRender) {
  10138. instance.ssrRender = setupResult;
  10139. } else {
  10140. instance.render = setupResult;
  10141. }
  10142. } else if (isObject(setupResult)) {
  10143. if (isVNode(setupResult)) {
  10144. warn$1(
  10145. `setup() should not return VNodes directly - return a render function instead.`
  10146. );
  10147. }
  10148. if (true) {
  10149. instance.devtoolsRawSetupState = setupResult;
  10150. }
  10151. instance.setupState = proxyRefs(setupResult);
  10152. if (true) {
  10153. exposeSetupStateOnRenderContext(instance);
  10154. }
  10155. } else if (setupResult !== void 0) {
  10156. warn$1(
  10157. `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
  10158. );
  10159. }
  10160. finishComponentSetup(instance, isSSR);
  10161. }
  10162. var compile;
  10163. var installWithProxy;
  10164. function registerRuntimeCompiler(_compile) {
  10165. compile = _compile;
  10166. installWithProxy = (i) => {
  10167. if (i.render._rc) {
  10168. i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
  10169. }
  10170. };
  10171. }
  10172. var isRuntimeOnly = () => !compile;
  10173. function finishComponentSetup(instance, isSSR, skipOptions) {
  10174. const Component = instance.type;
  10175. if (!instance.render) {
  10176. if (!isSSR && compile && !Component.render) {
  10177. const template = Component.template || __VUE_OPTIONS_API__ && resolveMergedOptions(instance).template;
  10178. if (template) {
  10179. if (true) {
  10180. startMeasure(instance, `compile`);
  10181. }
  10182. const { isCustomElement, compilerOptions } = instance.appContext.config;
  10183. const { delimiters, compilerOptions: componentCompilerOptions } = Component;
  10184. const finalCompilerOptions = extend(
  10185. extend(
  10186. {
  10187. isCustomElement,
  10188. delimiters
  10189. },
  10190. compilerOptions
  10191. ),
  10192. componentCompilerOptions
  10193. );
  10194. Component.render = compile(template, finalCompilerOptions);
  10195. if (true) {
  10196. endMeasure(instance, `compile`);
  10197. }
  10198. }
  10199. }
  10200. instance.render = Component.render || NOOP;
  10201. if (installWithProxy) {
  10202. installWithProxy(instance);
  10203. }
  10204. }
  10205. if (__VUE_OPTIONS_API__ && true) {
  10206. const reset = setCurrentInstance(instance);
  10207. pauseTracking();
  10208. try {
  10209. applyOptions(instance);
  10210. } finally {
  10211. resetTracking();
  10212. reset();
  10213. }
  10214. }
  10215. if (!Component.render && instance.render === NOOP && !isSSR) {
  10216. if (!compile && Component.template) {
  10217. warn$1(
  10218. `Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  10219. );
  10220. } else {
  10221. warn$1(`Component is missing template or render function: `, Component);
  10222. }
  10223. }
  10224. }
  10225. var attrsProxyHandlers = true ? {
  10226. get(target, key) {
  10227. markAttrsAccessed();
  10228. track(target, "get", "");
  10229. return target[key];
  10230. },
  10231. set() {
  10232. warn$1(`setupContext.attrs is readonly.`);
  10233. return false;
  10234. },
  10235. deleteProperty() {
  10236. warn$1(`setupContext.attrs is readonly.`);
  10237. return false;
  10238. }
  10239. } : {
  10240. get(target, key) {
  10241. track(target, "get", "");
  10242. return target[key];
  10243. }
  10244. };
  10245. function getSlotsProxy(instance) {
  10246. return new Proxy(instance.slots, {
  10247. get(target, key) {
  10248. track(instance, "get", "$slots");
  10249. return target[key];
  10250. }
  10251. });
  10252. }
  10253. function createSetupContext(instance) {
  10254. const expose = (exposed) => {
  10255. if (true) {
  10256. if (instance.exposed) {
  10257. warn$1(`expose() should be called only once per setup().`);
  10258. }
  10259. if (exposed != null) {
  10260. let exposedType = typeof exposed;
  10261. if (exposedType === "object") {
  10262. if (isArray(exposed)) {
  10263. exposedType = "array";
  10264. } else if (isRef2(exposed)) {
  10265. exposedType = "ref";
  10266. }
  10267. }
  10268. if (exposedType !== "object") {
  10269. warn$1(
  10270. `expose() should be passed a plain object, received ${exposedType}.`
  10271. );
  10272. }
  10273. }
  10274. }
  10275. instance.exposed = exposed || {};
  10276. };
  10277. if (true) {
  10278. let attrsProxy;
  10279. let slotsProxy;
  10280. return Object.freeze({
  10281. get attrs() {
  10282. return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
  10283. },
  10284. get slots() {
  10285. return slotsProxy || (slotsProxy = getSlotsProxy(instance));
  10286. },
  10287. get emit() {
  10288. return (event, ...args) => instance.emit(event, ...args);
  10289. },
  10290. expose
  10291. });
  10292. } else {
  10293. return {
  10294. attrs: new Proxy(instance.attrs, attrsProxyHandlers),
  10295. slots: instance.slots,
  10296. emit: instance.emit,
  10297. expose
  10298. };
  10299. }
  10300. }
  10301. function getComponentPublicInstance(instance) {
  10302. if (instance.exposed) {
  10303. return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
  10304. get(target, key) {
  10305. if (key in target) {
  10306. return target[key];
  10307. } else if (key in publicPropertiesMap) {
  10308. return publicPropertiesMap[key](instance);
  10309. }
  10310. },
  10311. has(target, key) {
  10312. return key in target || key in publicPropertiesMap;
  10313. }
  10314. }));
  10315. } else {
  10316. return instance.proxy;
  10317. }
  10318. }
  10319. var classifyRE = /(?:^|[-_])(\w)/g;
  10320. var classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
  10321. function getComponentName(Component, includeInferred = true) {
  10322. return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
  10323. }
  10324. function formatComponentName(instance, Component, isRoot = false) {
  10325. let name = getComponentName(Component);
  10326. if (!name && Component.__file) {
  10327. const match = Component.__file.match(/([^/\\]+)\.\w+$/);
  10328. if (match) {
  10329. name = match[1];
  10330. }
  10331. }
  10332. if (!name && instance && instance.parent) {
  10333. const inferFromRegistry = (registry) => {
  10334. for (const key in registry) {
  10335. if (registry[key] === Component) {
  10336. return key;
  10337. }
  10338. }
  10339. };
  10340. name = inferFromRegistry(
  10341. instance.components || instance.parent.type.components
  10342. ) || inferFromRegistry(instance.appContext.components);
  10343. }
  10344. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  10345. }
  10346. function isClassComponent(value) {
  10347. return isFunction(value) && "__vccOpts" in value;
  10348. }
  10349. var computed2 = (getterOrOptions, debugOptions) => {
  10350. const c = computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
  10351. if (true) {
  10352. const i = getCurrentInstance();
  10353. if (i && i.appContext.config.warnRecursiveComputed) {
  10354. c._warnRecursive = true;
  10355. }
  10356. }
  10357. return c;
  10358. };
  10359. function h(type, propsOrChildren, children) {
  10360. const l = arguments.length;
  10361. if (l === 2) {
  10362. if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
  10363. if (isVNode(propsOrChildren)) {
  10364. return createVNode(type, null, [propsOrChildren]);
  10365. }
  10366. return createVNode(type, propsOrChildren);
  10367. } else {
  10368. return createVNode(type, null, propsOrChildren);
  10369. }
  10370. } else {
  10371. if (l > 3) {
  10372. children = Array.prototype.slice.call(arguments, 2);
  10373. } else if (l === 3 && isVNode(children)) {
  10374. children = [children];
  10375. }
  10376. return createVNode(type, propsOrChildren, children);
  10377. }
  10378. }
  10379. function initCustomFormatter() {
  10380. if (typeof window === "undefined") {
  10381. return;
  10382. }
  10383. const vueStyle = { style: "color:#3ba776" };
  10384. const numberStyle = { style: "color:#1677ff" };
  10385. const stringStyle = { style: "color:#f5222d" };
  10386. const keywordStyle = { style: "color:#eb2f96" };
  10387. const formatter = {
  10388. __vue_custom_formatter: true,
  10389. header(obj) {
  10390. if (!isObject(obj)) {
  10391. return null;
  10392. }
  10393. if (obj.__isVue) {
  10394. return ["div", vueStyle, `VueInstance`];
  10395. } else if (isRef2(obj)) {
  10396. pauseTracking();
  10397. const value = obj.value;
  10398. resetTracking();
  10399. return [
  10400. "div",
  10401. {},
  10402. ["span", vueStyle, genRefFlag(obj)],
  10403. "<",
  10404. formatValue(value),
  10405. `>`
  10406. ];
  10407. } else if (isReactive(obj)) {
  10408. return [
  10409. "div",
  10410. {},
  10411. ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
  10412. "<",
  10413. formatValue(obj),
  10414. `>${isReadonly(obj) ? ` (readonly)` : ``}`
  10415. ];
  10416. } else if (isReadonly(obj)) {
  10417. return [
  10418. "div",
  10419. {},
  10420. ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
  10421. "<",
  10422. formatValue(obj),
  10423. ">"
  10424. ];
  10425. }
  10426. return null;
  10427. },
  10428. hasBody(obj) {
  10429. return obj && obj.__isVue;
  10430. },
  10431. body(obj) {
  10432. if (obj && obj.__isVue) {
  10433. return [
  10434. "div",
  10435. {},
  10436. ...formatInstance(obj.$)
  10437. ];
  10438. }
  10439. }
  10440. };
  10441. function formatInstance(instance) {
  10442. const blocks = [];
  10443. if (instance.type.props && instance.props) {
  10444. blocks.push(createInstanceBlock("props", toRaw(instance.props)));
  10445. }
  10446. if (instance.setupState !== EMPTY_OBJ) {
  10447. blocks.push(createInstanceBlock("setup", instance.setupState));
  10448. }
  10449. if (instance.data !== EMPTY_OBJ) {
  10450. blocks.push(createInstanceBlock("data", toRaw(instance.data)));
  10451. }
  10452. const computed3 = extractKeys(instance, "computed");
  10453. if (computed3) {
  10454. blocks.push(createInstanceBlock("computed", computed3));
  10455. }
  10456. const injected = extractKeys(instance, "inject");
  10457. if (injected) {
  10458. blocks.push(createInstanceBlock("injected", injected));
  10459. }
  10460. blocks.push([
  10461. "div",
  10462. {},
  10463. [
  10464. "span",
  10465. {
  10466. style: keywordStyle.style + ";opacity:0.66"
  10467. },
  10468. "$ (internal): "
  10469. ],
  10470. ["object", { object: instance }]
  10471. ]);
  10472. return blocks;
  10473. }
  10474. function createInstanceBlock(type, target) {
  10475. target = extend({}, target);
  10476. if (!Object.keys(target).length) {
  10477. return ["span", {}];
  10478. }
  10479. return [
  10480. "div",
  10481. { style: "line-height:1.25em;margin-bottom:0.6em" },
  10482. [
  10483. "div",
  10484. {
  10485. style: "color:#476582"
  10486. },
  10487. type
  10488. ],
  10489. [
  10490. "div",
  10491. {
  10492. style: "padding-left:1.25em"
  10493. },
  10494. ...Object.keys(target).map((key) => {
  10495. return [
  10496. "div",
  10497. {},
  10498. ["span", keywordStyle, key + ": "],
  10499. formatValue(target[key], false)
  10500. ];
  10501. })
  10502. ]
  10503. ];
  10504. }
  10505. function formatValue(v, asRaw = true) {
  10506. if (typeof v === "number") {
  10507. return ["span", numberStyle, v];
  10508. } else if (typeof v === "string") {
  10509. return ["span", stringStyle, JSON.stringify(v)];
  10510. } else if (typeof v === "boolean") {
  10511. return ["span", keywordStyle, v];
  10512. } else if (isObject(v)) {
  10513. return ["object", { object: asRaw ? toRaw(v) : v }];
  10514. } else {
  10515. return ["span", stringStyle, String(v)];
  10516. }
  10517. }
  10518. function extractKeys(instance, type) {
  10519. const Comp = instance.type;
  10520. if (isFunction(Comp)) {
  10521. return;
  10522. }
  10523. const extracted = {};
  10524. for (const key in instance.ctx) {
  10525. if (isKeyOfType(Comp, key, type)) {
  10526. extracted[key] = instance.ctx[key];
  10527. }
  10528. }
  10529. return extracted;
  10530. }
  10531. function isKeyOfType(Comp, key, type) {
  10532. const opts = Comp[type];
  10533. if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
  10534. return true;
  10535. }
  10536. if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
  10537. return true;
  10538. }
  10539. if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
  10540. return true;
  10541. }
  10542. }
  10543. function genRefFlag(v) {
  10544. if (isShallow(v)) {
  10545. return `ShallowRef`;
  10546. }
  10547. if (v.effect) {
  10548. return `ComputedRef`;
  10549. }
  10550. return `Ref`;
  10551. }
  10552. if (window.devtoolsFormatters) {
  10553. window.devtoolsFormatters.push(formatter);
  10554. } else {
  10555. window.devtoolsFormatters = [formatter];
  10556. }
  10557. }
  10558. function withMemo(memo, render2, cache, index) {
  10559. const cached = cache[index];
  10560. if (cached && isMemoSame(cached, memo)) {
  10561. return cached;
  10562. }
  10563. const ret = render2();
  10564. ret.memo = memo.slice();
  10565. ret.cacheIndex = index;
  10566. return cache[index] = ret;
  10567. }
  10568. function isMemoSame(cached, memo) {
  10569. const prev = cached.memo;
  10570. if (prev.length != memo.length) {
  10571. return false;
  10572. }
  10573. for (let i = 0; i < prev.length; i++) {
  10574. if (hasChanged(prev[i], memo[i])) {
  10575. return false;
  10576. }
  10577. }
  10578. if (isBlockTreeEnabled > 0 && currentBlock) {
  10579. currentBlock.push(cached);
  10580. }
  10581. return true;
  10582. }
  10583. var version = "3.5.18";
  10584. var warn2 = true ? warn$1 : NOOP;
  10585. var ErrorTypeStrings = ErrorTypeStrings$1;
  10586. var devtools = true ? devtools$1 : void 0;
  10587. var setDevtoolsHook = true ? setDevtoolsHook$1 : NOOP;
  10588. var _ssrUtils = {
  10589. createComponentInstance,
  10590. setupComponent,
  10591. renderComponentRoot,
  10592. setCurrentRenderingInstance,
  10593. isVNode,
  10594. normalizeVNode,
  10595. getComponentPublicInstance,
  10596. ensureValidVNode,
  10597. pushWarningContext,
  10598. popWarningContext
  10599. };
  10600. var ssrUtils = _ssrUtils;
  10601. var resolveFilter = null;
  10602. var compatUtils = null;
  10603. var DeprecationTypes = null;
  10604. // node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
  10605. var policy = void 0;
  10606. var tt = typeof window !== "undefined" && window.trustedTypes;
  10607. if (tt) {
  10608. try {
  10609. policy = tt.createPolicy("vue", {
  10610. createHTML: (val) => val
  10611. });
  10612. } catch (e) {
  10613. warn2(`Error creating trusted types policy: ${e}`);
  10614. }
  10615. }
  10616. var unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
  10617. var svgNS = "http://www.w3.org/2000/svg";
  10618. var mathmlNS = "http://www.w3.org/1998/Math/MathML";
  10619. var doc = typeof document !== "undefined" ? document : null;
  10620. var templateContainer = doc && doc.createElement("template");
  10621. var nodeOps = {
  10622. insert: (child, parent, anchor) => {
  10623. parent.insertBefore(child, anchor || null);
  10624. },
  10625. remove: (child) => {
  10626. const parent = child.parentNode;
  10627. if (parent) {
  10628. parent.removeChild(child);
  10629. }
  10630. },
  10631. createElement: (tag, namespace, is, props) => {
  10632. const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
  10633. if (tag === "select" && props && props.multiple != null) {
  10634. el.setAttribute("multiple", props.multiple);
  10635. }
  10636. return el;
  10637. },
  10638. createText: (text) => doc.createTextNode(text),
  10639. createComment: (text) => doc.createComment(text),
  10640. setText: (node, text) => {
  10641. node.nodeValue = text;
  10642. },
  10643. setElementText: (el, text) => {
  10644. el.textContent = text;
  10645. },
  10646. parentNode: (node) => node.parentNode,
  10647. nextSibling: (node) => node.nextSibling,
  10648. querySelector: (selector) => doc.querySelector(selector),
  10649. setScopeId(el, id) {
  10650. el.setAttribute(id, "");
  10651. },
  10652. // __UNSAFE__
  10653. // Reason: innerHTML.
  10654. // Static content here can only come from compiled templates.
  10655. // As long as the user only uses trusted templates, this is safe.
  10656. insertStaticContent(content, parent, anchor, namespace, start, end) {
  10657. const before = anchor ? anchor.previousSibling : parent.lastChild;
  10658. if (start && (start === end || start.nextSibling)) {
  10659. while (true) {
  10660. parent.insertBefore(start.cloneNode(true), anchor);
  10661. if (start === end || !(start = start.nextSibling)) break;
  10662. }
  10663. } else {
  10664. templateContainer.innerHTML = unsafeToTrustedHTML(
  10665. namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
  10666. );
  10667. const template = templateContainer.content;
  10668. if (namespace === "svg" || namespace === "mathml") {
  10669. const wrapper = template.firstChild;
  10670. while (wrapper.firstChild) {
  10671. template.appendChild(wrapper.firstChild);
  10672. }
  10673. template.removeChild(wrapper);
  10674. }
  10675. parent.insertBefore(template, anchor);
  10676. }
  10677. return [
  10678. // first
  10679. before ? before.nextSibling : parent.firstChild,
  10680. // last
  10681. anchor ? anchor.previousSibling : parent.lastChild
  10682. ];
  10683. }
  10684. };
  10685. var TRANSITION = "transition";
  10686. var ANIMATION = "animation";
  10687. var vtcKey = Symbol("_vtc");
  10688. var DOMTransitionPropsValidators = {
  10689. name: String,
  10690. type: String,
  10691. css: {
  10692. type: Boolean,
  10693. default: true
  10694. },
  10695. duration: [String, Number, Object],
  10696. enterFromClass: String,
  10697. enterActiveClass: String,
  10698. enterToClass: String,
  10699. appearFromClass: String,
  10700. appearActiveClass: String,
  10701. appearToClass: String,
  10702. leaveFromClass: String,
  10703. leaveActiveClass: String,
  10704. leaveToClass: String
  10705. };
  10706. var TransitionPropsValidators = extend(
  10707. {},
  10708. BaseTransitionPropsValidators,
  10709. DOMTransitionPropsValidators
  10710. );
  10711. var decorate$1 = (t) => {
  10712. t.displayName = "Transition";
  10713. t.props = TransitionPropsValidators;
  10714. return t;
  10715. };
  10716. var Transition = decorate$1(
  10717. (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
  10718. );
  10719. var callHook2 = (hook, args = []) => {
  10720. if (isArray(hook)) {
  10721. hook.forEach((h2) => h2(...args));
  10722. } else if (hook) {
  10723. hook(...args);
  10724. }
  10725. };
  10726. var hasExplicitCallback = (hook) => {
  10727. return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
  10728. };
  10729. function resolveTransitionProps(rawProps) {
  10730. const baseProps = {};
  10731. for (const key in rawProps) {
  10732. if (!(key in DOMTransitionPropsValidators)) {
  10733. baseProps[key] = rawProps[key];
  10734. }
  10735. }
  10736. if (rawProps.css === false) {
  10737. return baseProps;
  10738. }
  10739. const {
  10740. name = "v",
  10741. type,
  10742. duration,
  10743. enterFromClass = `${name}-enter-from`,
  10744. enterActiveClass = `${name}-enter-active`,
  10745. enterToClass = `${name}-enter-to`,
  10746. appearFromClass = enterFromClass,
  10747. appearActiveClass = enterActiveClass,
  10748. appearToClass = enterToClass,
  10749. leaveFromClass = `${name}-leave-from`,
  10750. leaveActiveClass = `${name}-leave-active`,
  10751. leaveToClass = `${name}-leave-to`
  10752. } = rawProps;
  10753. const durations = normalizeDuration(duration);
  10754. const enterDuration = durations && durations[0];
  10755. const leaveDuration = durations && durations[1];
  10756. const {
  10757. onBeforeEnter,
  10758. onEnter,
  10759. onEnterCancelled,
  10760. onLeave,
  10761. onLeaveCancelled,
  10762. onBeforeAppear = onBeforeEnter,
  10763. onAppear = onEnter,
  10764. onAppearCancelled = onEnterCancelled
  10765. } = baseProps;
  10766. const finishEnter = (el, isAppear, done, isCancelled) => {
  10767. el._enterCancelled = isCancelled;
  10768. removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
  10769. removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
  10770. done && done();
  10771. };
  10772. const finishLeave = (el, done) => {
  10773. el._isLeaving = false;
  10774. removeTransitionClass(el, leaveFromClass);
  10775. removeTransitionClass(el, leaveToClass);
  10776. removeTransitionClass(el, leaveActiveClass);
  10777. done && done();
  10778. };
  10779. const makeEnterHook = (isAppear) => {
  10780. return (el, done) => {
  10781. const hook = isAppear ? onAppear : onEnter;
  10782. const resolve2 = () => finishEnter(el, isAppear, done);
  10783. callHook2(hook, [el, resolve2]);
  10784. nextFrame(() => {
  10785. removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
  10786. addTransitionClass(el, isAppear ? appearToClass : enterToClass);
  10787. if (!hasExplicitCallback(hook)) {
  10788. whenTransitionEnds(el, type, enterDuration, resolve2);
  10789. }
  10790. });
  10791. };
  10792. };
  10793. return extend(baseProps, {
  10794. onBeforeEnter(el) {
  10795. callHook2(onBeforeEnter, [el]);
  10796. addTransitionClass(el, enterFromClass);
  10797. addTransitionClass(el, enterActiveClass);
  10798. },
  10799. onBeforeAppear(el) {
  10800. callHook2(onBeforeAppear, [el]);
  10801. addTransitionClass(el, appearFromClass);
  10802. addTransitionClass(el, appearActiveClass);
  10803. },
  10804. onEnter: makeEnterHook(false),
  10805. onAppear: makeEnterHook(true),
  10806. onLeave(el, done) {
  10807. el._isLeaving = true;
  10808. const resolve2 = () => finishLeave(el, done);
  10809. addTransitionClass(el, leaveFromClass);
  10810. if (!el._enterCancelled) {
  10811. forceReflow();
  10812. addTransitionClass(el, leaveActiveClass);
  10813. } else {
  10814. addTransitionClass(el, leaveActiveClass);
  10815. forceReflow();
  10816. }
  10817. nextFrame(() => {
  10818. if (!el._isLeaving) {
  10819. return;
  10820. }
  10821. removeTransitionClass(el, leaveFromClass);
  10822. addTransitionClass(el, leaveToClass);
  10823. if (!hasExplicitCallback(onLeave)) {
  10824. whenTransitionEnds(el, type, leaveDuration, resolve2);
  10825. }
  10826. });
  10827. callHook2(onLeave, [el, resolve2]);
  10828. },
  10829. onEnterCancelled(el) {
  10830. finishEnter(el, false, void 0, true);
  10831. callHook2(onEnterCancelled, [el]);
  10832. },
  10833. onAppearCancelled(el) {
  10834. finishEnter(el, true, void 0, true);
  10835. callHook2(onAppearCancelled, [el]);
  10836. },
  10837. onLeaveCancelled(el) {
  10838. finishLeave(el);
  10839. callHook2(onLeaveCancelled, [el]);
  10840. }
  10841. });
  10842. }
  10843. function normalizeDuration(duration) {
  10844. if (duration == null) {
  10845. return null;
  10846. } else if (isObject(duration)) {
  10847. return [NumberOf(duration.enter), NumberOf(duration.leave)];
  10848. } else {
  10849. const n = NumberOf(duration);
  10850. return [n, n];
  10851. }
  10852. }
  10853. function NumberOf(val) {
  10854. const res = toNumber(val);
  10855. if (true) {
  10856. assertNumber(res, "<transition> explicit duration");
  10857. }
  10858. return res;
  10859. }
  10860. function addTransitionClass(el, cls) {
  10861. cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
  10862. (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
  10863. }
  10864. function removeTransitionClass(el, cls) {
  10865. cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
  10866. const _vtc = el[vtcKey];
  10867. if (_vtc) {
  10868. _vtc.delete(cls);
  10869. if (!_vtc.size) {
  10870. el[vtcKey] = void 0;
  10871. }
  10872. }
  10873. }
  10874. function nextFrame(cb) {
  10875. requestAnimationFrame(() => {
  10876. requestAnimationFrame(cb);
  10877. });
  10878. }
  10879. var endId = 0;
  10880. function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
  10881. const id = el._endId = ++endId;
  10882. const resolveIfNotStale = () => {
  10883. if (id === el._endId) {
  10884. resolve2();
  10885. }
  10886. };
  10887. if (explicitTimeout != null) {
  10888. return setTimeout(resolveIfNotStale, explicitTimeout);
  10889. }
  10890. const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
  10891. if (!type) {
  10892. return resolve2();
  10893. }
  10894. const endEvent = type + "end";
  10895. let ended = 0;
  10896. const end = () => {
  10897. el.removeEventListener(endEvent, onEnd);
  10898. resolveIfNotStale();
  10899. };
  10900. const onEnd = (e) => {
  10901. if (e.target === el && ++ended >= propCount) {
  10902. end();
  10903. }
  10904. };
  10905. setTimeout(() => {
  10906. if (ended < propCount) {
  10907. end();
  10908. }
  10909. }, timeout + 1);
  10910. el.addEventListener(endEvent, onEnd);
  10911. }
  10912. function getTransitionInfo(el, expectedType) {
  10913. const styles = window.getComputedStyle(el);
  10914. const getStyleProperties = (key) => (styles[key] || "").split(", ");
  10915. const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
  10916. const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
  10917. const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  10918. const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
  10919. const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
  10920. const animationTimeout = getTimeout(animationDelays, animationDurations);
  10921. let type = null;
  10922. let timeout = 0;
  10923. let propCount = 0;
  10924. if (expectedType === TRANSITION) {
  10925. if (transitionTimeout > 0) {
  10926. type = TRANSITION;
  10927. timeout = transitionTimeout;
  10928. propCount = transitionDurations.length;
  10929. }
  10930. } else if (expectedType === ANIMATION) {
  10931. if (animationTimeout > 0) {
  10932. type = ANIMATION;
  10933. timeout = animationTimeout;
  10934. propCount = animationDurations.length;
  10935. }
  10936. } else {
  10937. timeout = Math.max(transitionTimeout, animationTimeout);
  10938. type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
  10939. propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
  10940. }
  10941. const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
  10942. getStyleProperties(`${TRANSITION}Property`).toString()
  10943. );
  10944. return {
  10945. type,
  10946. timeout,
  10947. propCount,
  10948. hasTransform
  10949. };
  10950. }
  10951. function getTimeout(delays, durations) {
  10952. while (delays.length < durations.length) {
  10953. delays = delays.concat(delays);
  10954. }
  10955. return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
  10956. }
  10957. function toMs(s) {
  10958. if (s === "auto") return 0;
  10959. return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
  10960. }
  10961. function forceReflow() {
  10962. return document.body.offsetHeight;
  10963. }
  10964. function patchClass(el, value, isSVG) {
  10965. const transitionClasses = el[vtcKey];
  10966. if (transitionClasses) {
  10967. value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
  10968. }
  10969. if (value == null) {
  10970. el.removeAttribute("class");
  10971. } else if (isSVG) {
  10972. el.setAttribute("class", value);
  10973. } else {
  10974. el.className = value;
  10975. }
  10976. }
  10977. var vShowOriginalDisplay = Symbol("_vod");
  10978. var vShowHidden = Symbol("_vsh");
  10979. var vShow = {
  10980. beforeMount(el, { value }, { transition }) {
  10981. el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
  10982. if (transition && value) {
  10983. transition.beforeEnter(el);
  10984. } else {
  10985. setDisplay(el, value);
  10986. }
  10987. },
  10988. mounted(el, { value }, { transition }) {
  10989. if (transition && value) {
  10990. transition.enter(el);
  10991. }
  10992. },
  10993. updated(el, { value, oldValue }, { transition }) {
  10994. if (!value === !oldValue) return;
  10995. if (transition) {
  10996. if (value) {
  10997. transition.beforeEnter(el);
  10998. setDisplay(el, true);
  10999. transition.enter(el);
  11000. } else {
  11001. transition.leave(el, () => {
  11002. setDisplay(el, false);
  11003. });
  11004. }
  11005. } else {
  11006. setDisplay(el, value);
  11007. }
  11008. },
  11009. beforeUnmount(el, { value }) {
  11010. setDisplay(el, value);
  11011. }
  11012. };
  11013. if (true) {
  11014. vShow.name = "show";
  11015. }
  11016. function setDisplay(el, value) {
  11017. el.style.display = value ? el[vShowOriginalDisplay] : "none";
  11018. el[vShowHidden] = !value;
  11019. }
  11020. function initVShowForSSR() {
  11021. vShow.getSSRProps = ({ value }) => {
  11022. if (!value) {
  11023. return { style: { display: "none" } };
  11024. }
  11025. };
  11026. }
  11027. var CSS_VAR_TEXT = Symbol(true ? "CSS_VAR_TEXT" : "");
  11028. function useCssVars(getter) {
  11029. const instance = getCurrentInstance();
  11030. if (!instance) {
  11031. warn2(`useCssVars is called without current active component instance.`);
  11032. return;
  11033. }
  11034. const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
  11035. Array.from(
  11036. document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
  11037. ).forEach((node) => setVarsOnNode(node, vars));
  11038. };
  11039. if (true) {
  11040. instance.getCssVars = () => getter(instance.proxy);
  11041. }
  11042. const setVars = () => {
  11043. const vars = getter(instance.proxy);
  11044. if (instance.ce) {
  11045. setVarsOnNode(instance.ce, vars);
  11046. } else {
  11047. setVarsOnVNode(instance.subTree, vars);
  11048. }
  11049. updateTeleports(vars);
  11050. };
  11051. onBeforeUpdate(() => {
  11052. queuePostFlushCb(setVars);
  11053. });
  11054. onMounted(() => {
  11055. watch2(setVars, NOOP, { flush: "post" });
  11056. const ob = new MutationObserver(setVars);
  11057. ob.observe(instance.subTree.el.parentNode, { childList: true });
  11058. onUnmounted(() => ob.disconnect());
  11059. });
  11060. }
  11061. function setVarsOnVNode(vnode, vars) {
  11062. if (vnode.shapeFlag & 128) {
  11063. const suspense = vnode.suspense;
  11064. vnode = suspense.activeBranch;
  11065. if (suspense.pendingBranch && !suspense.isHydrating) {
  11066. suspense.effects.push(() => {
  11067. setVarsOnVNode(suspense.activeBranch, vars);
  11068. });
  11069. }
  11070. }
  11071. while (vnode.component) {
  11072. vnode = vnode.component.subTree;
  11073. }
  11074. if (vnode.shapeFlag & 1 && vnode.el) {
  11075. setVarsOnNode(vnode.el, vars);
  11076. } else if (vnode.type === Fragment) {
  11077. vnode.children.forEach((c) => setVarsOnVNode(c, vars));
  11078. } else if (vnode.type === Static) {
  11079. let { el, anchor } = vnode;
  11080. while (el) {
  11081. setVarsOnNode(el, vars);
  11082. if (el === anchor) break;
  11083. el = el.nextSibling;
  11084. }
  11085. }
  11086. }
  11087. function setVarsOnNode(el, vars) {
  11088. if (el.nodeType === 1) {
  11089. const style = el.style;
  11090. let cssText = "";
  11091. for (const key in vars) {
  11092. const value = normalizeCssVarValue(vars[key]);
  11093. style.setProperty(`--${key}`, value);
  11094. cssText += `--${key}: ${value};`;
  11095. }
  11096. style[CSS_VAR_TEXT] = cssText;
  11097. }
  11098. }
  11099. var displayRE = /(^|;)\s*display\s*:/;
  11100. function patchStyle(el, prev, next) {
  11101. const style = el.style;
  11102. const isCssString = isString(next);
  11103. let hasControlledDisplay = false;
  11104. if (next && !isCssString) {
  11105. if (prev) {
  11106. if (!isString(prev)) {
  11107. for (const key in prev) {
  11108. if (next[key] == null) {
  11109. setStyle(style, key, "");
  11110. }
  11111. }
  11112. } else {
  11113. for (const prevStyle of prev.split(";")) {
  11114. const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
  11115. if (next[key] == null) {
  11116. setStyle(style, key, "");
  11117. }
  11118. }
  11119. }
  11120. }
  11121. for (const key in next) {
  11122. if (key === "display") {
  11123. hasControlledDisplay = true;
  11124. }
  11125. setStyle(style, key, next[key]);
  11126. }
  11127. } else {
  11128. if (isCssString) {
  11129. if (prev !== next) {
  11130. const cssVarText = style[CSS_VAR_TEXT];
  11131. if (cssVarText) {
  11132. next += ";" + cssVarText;
  11133. }
  11134. style.cssText = next;
  11135. hasControlledDisplay = displayRE.test(next);
  11136. }
  11137. } else if (prev) {
  11138. el.removeAttribute("style");
  11139. }
  11140. }
  11141. if (vShowOriginalDisplay in el) {
  11142. el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
  11143. if (el[vShowHidden]) {
  11144. style.display = "none";
  11145. }
  11146. }
  11147. }
  11148. var semicolonRE = /[^\\];\s*$/;
  11149. var importantRE = /\s*!important$/;
  11150. function setStyle(style, name, val) {
  11151. if (isArray(val)) {
  11152. val.forEach((v) => setStyle(style, name, v));
  11153. } else {
  11154. if (val == null) val = "";
  11155. if (true) {
  11156. if (semicolonRE.test(val)) {
  11157. warn2(
  11158. `Unexpected semicolon at the end of '${name}' style value: '${val}'`
  11159. );
  11160. }
  11161. }
  11162. if (name.startsWith("--")) {
  11163. style.setProperty(name, val);
  11164. } else {
  11165. const prefixed = autoPrefix(style, name);
  11166. if (importantRE.test(val)) {
  11167. style.setProperty(
  11168. hyphenate(prefixed),
  11169. val.replace(importantRE, ""),
  11170. "important"
  11171. );
  11172. } else {
  11173. style[prefixed] = val;
  11174. }
  11175. }
  11176. }
  11177. }
  11178. var prefixes = ["Webkit", "Moz", "ms"];
  11179. var prefixCache = {};
  11180. function autoPrefix(style, rawName) {
  11181. const cached = prefixCache[rawName];
  11182. if (cached) {
  11183. return cached;
  11184. }
  11185. let name = camelize(rawName);
  11186. if (name !== "filter" && name in style) {
  11187. return prefixCache[rawName] = name;
  11188. }
  11189. name = capitalize(name);
  11190. for (let i = 0; i < prefixes.length; i++) {
  11191. const prefixed = prefixes[i] + name;
  11192. if (prefixed in style) {
  11193. return prefixCache[rawName] = prefixed;
  11194. }
  11195. }
  11196. return rawName;
  11197. }
  11198. var xlinkNS = "http://www.w3.org/1999/xlink";
  11199. function patchAttr(el, key, value, isSVG, instance, isBoolean2 = isSpecialBooleanAttr(key)) {
  11200. if (isSVG && key.startsWith("xlink:")) {
  11201. if (value == null) {
  11202. el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
  11203. } else {
  11204. el.setAttributeNS(xlinkNS, key, value);
  11205. }
  11206. } else {
  11207. if (value == null || isBoolean2 && !includeBooleanAttr(value)) {
  11208. el.removeAttribute(key);
  11209. } else {
  11210. el.setAttribute(
  11211. key,
  11212. isBoolean2 ? "" : isSymbol(value) ? String(value) : value
  11213. );
  11214. }
  11215. }
  11216. }
  11217. function patchDOMProp(el, key, value, parentComponent, attrName) {
  11218. if (key === "innerHTML" || key === "textContent") {
  11219. if (value != null) {
  11220. el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
  11221. }
  11222. return;
  11223. }
  11224. const tag = el.tagName;
  11225. if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
  11226. !tag.includes("-")) {
  11227. const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
  11228. const newValue = value == null ? (
  11229. // #11647: value should be set as empty string for null and undefined,
  11230. // but <input type="checkbox"> should be set as 'on'.
  11231. el.type === "checkbox" ? "on" : ""
  11232. ) : String(value);
  11233. if (oldValue !== newValue || !("_value" in el)) {
  11234. el.value = newValue;
  11235. }
  11236. if (value == null) {
  11237. el.removeAttribute(key);
  11238. }
  11239. el._value = value;
  11240. return;
  11241. }
  11242. let needRemove = false;
  11243. if (value === "" || value == null) {
  11244. const type = typeof el[key];
  11245. if (type === "boolean") {
  11246. value = includeBooleanAttr(value);
  11247. } else if (value == null && type === "string") {
  11248. value = "";
  11249. needRemove = true;
  11250. } else if (type === "number") {
  11251. value = 0;
  11252. needRemove = true;
  11253. }
  11254. }
  11255. try {
  11256. el[key] = value;
  11257. } catch (e) {
  11258. if (!needRemove) {
  11259. warn2(
  11260. `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
  11261. e
  11262. );
  11263. }
  11264. }
  11265. needRemove && el.removeAttribute(attrName || key);
  11266. }
  11267. function addEventListener(el, event, handler, options) {
  11268. el.addEventListener(event, handler, options);
  11269. }
  11270. function removeEventListener(el, event, handler, options) {
  11271. el.removeEventListener(event, handler, options);
  11272. }
  11273. var veiKey = Symbol("_vei");
  11274. function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
  11275. const invokers = el[veiKey] || (el[veiKey] = {});
  11276. const existingInvoker = invokers[rawName];
  11277. if (nextValue && existingInvoker) {
  11278. existingInvoker.value = true ? sanitizeEventValue(nextValue, rawName) : nextValue;
  11279. } else {
  11280. const [name, options] = parseName(rawName);
  11281. if (nextValue) {
  11282. const invoker = invokers[rawName] = createInvoker(
  11283. true ? sanitizeEventValue(nextValue, rawName) : nextValue,
  11284. instance
  11285. );
  11286. addEventListener(el, name, invoker, options);
  11287. } else if (existingInvoker) {
  11288. removeEventListener(el, name, existingInvoker, options);
  11289. invokers[rawName] = void 0;
  11290. }
  11291. }
  11292. }
  11293. var optionsModifierRE = /(?:Once|Passive|Capture)$/;
  11294. function parseName(name) {
  11295. let options;
  11296. if (optionsModifierRE.test(name)) {
  11297. options = {};
  11298. let m;
  11299. while (m = name.match(optionsModifierRE)) {
  11300. name = name.slice(0, name.length - m[0].length);
  11301. options[m[0].toLowerCase()] = true;
  11302. }
  11303. }
  11304. const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
  11305. return [event, options];
  11306. }
  11307. var cachedNow = 0;
  11308. var p = Promise.resolve();
  11309. var getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
  11310. function createInvoker(initialValue, instance) {
  11311. const invoker = (e) => {
  11312. if (!e._vts) {
  11313. e._vts = Date.now();
  11314. } else if (e._vts <= invoker.attached) {
  11315. return;
  11316. }
  11317. callWithAsyncErrorHandling(
  11318. patchStopImmediatePropagation(e, invoker.value),
  11319. instance,
  11320. 5,
  11321. [e]
  11322. );
  11323. };
  11324. invoker.value = initialValue;
  11325. invoker.attached = getNow();
  11326. return invoker;
  11327. }
  11328. function sanitizeEventValue(value, propName) {
  11329. if (isFunction(value) || isArray(value)) {
  11330. return value;
  11331. }
  11332. warn2(
  11333. `Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
  11334. Expected function or array of functions, received type ${typeof value}.`
  11335. );
  11336. return NOOP;
  11337. }
  11338. function patchStopImmediatePropagation(e, value) {
  11339. if (isArray(value)) {
  11340. const originalStop = e.stopImmediatePropagation;
  11341. e.stopImmediatePropagation = () => {
  11342. originalStop.call(e);
  11343. e._stopped = true;
  11344. };
  11345. return value.map(
  11346. (fn) => (e2) => !e2._stopped && fn && fn(e2)
  11347. );
  11348. } else {
  11349. return value;
  11350. }
  11351. }
  11352. var isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
  11353. key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
  11354. var patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
  11355. const isSVG = namespace === "svg";
  11356. if (key === "class") {
  11357. patchClass(el, nextValue, isSVG);
  11358. } else if (key === "style") {
  11359. patchStyle(el, prevValue, nextValue);
  11360. } else if (isOn(key)) {
  11361. if (!isModelListener(key)) {
  11362. patchEvent(el, key, prevValue, nextValue, parentComponent);
  11363. }
  11364. } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
  11365. patchDOMProp(el, key, nextValue);
  11366. if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
  11367. patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
  11368. }
  11369. } else if (
  11370. // #11081 force set props for possible async custom element
  11371. el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
  11372. ) {
  11373. patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
  11374. } else {
  11375. if (key === "true-value") {
  11376. el._trueValue = nextValue;
  11377. } else if (key === "false-value") {
  11378. el._falseValue = nextValue;
  11379. }
  11380. patchAttr(el, key, nextValue, isSVG);
  11381. }
  11382. };
  11383. function shouldSetAsProp(el, key, value, isSVG) {
  11384. if (isSVG) {
  11385. if (key === "innerHTML" || key === "textContent") {
  11386. return true;
  11387. }
  11388. if (key in el && isNativeOn(key) && isFunction(value)) {
  11389. return true;
  11390. }
  11391. return false;
  11392. }
  11393. if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
  11394. return false;
  11395. }
  11396. if (key === "form") {
  11397. return false;
  11398. }
  11399. if (key === "list" && el.tagName === "INPUT") {
  11400. return false;
  11401. }
  11402. if (key === "type" && el.tagName === "TEXTAREA") {
  11403. return false;
  11404. }
  11405. if (key === "width" || key === "height") {
  11406. const tag = el.tagName;
  11407. if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
  11408. return false;
  11409. }
  11410. }
  11411. if (isNativeOn(key) && isString(value)) {
  11412. return false;
  11413. }
  11414. return key in el;
  11415. }
  11416. var REMOVAL = {};
  11417. function defineCustomElement(options, extraOptions, _createApp) {
  11418. const Comp = defineComponent(options, extraOptions);
  11419. if (isPlainObject(Comp)) extend(Comp, extraOptions);
  11420. class VueCustomElement extends VueElement {
  11421. constructor(initialProps) {
  11422. super(Comp, initialProps, _createApp);
  11423. }
  11424. }
  11425. VueCustomElement.def = Comp;
  11426. return VueCustomElement;
  11427. }
  11428. var defineSSRCustomElement = (options, extraOptions) => {
  11429. return defineCustomElement(options, extraOptions, createSSRApp);
  11430. };
  11431. var BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
  11432. };
  11433. var VueElement = class _VueElement extends BaseClass {
  11434. constructor(_def, _props = {}, _createApp = createApp) {
  11435. super();
  11436. this._def = _def;
  11437. this._props = _props;
  11438. this._createApp = _createApp;
  11439. this._isVueCE = true;
  11440. this._instance = null;
  11441. this._app = null;
  11442. this._nonce = this._def.nonce;
  11443. this._connected = false;
  11444. this._resolved = false;
  11445. this._numberProps = null;
  11446. this._styleChildren = /* @__PURE__ */ new WeakSet();
  11447. this._ob = null;
  11448. if (this.shadowRoot && _createApp !== createApp) {
  11449. this._root = this.shadowRoot;
  11450. } else {
  11451. if (this.shadowRoot) {
  11452. warn2(
  11453. `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
  11454. );
  11455. }
  11456. if (_def.shadowRoot !== false) {
  11457. this.attachShadow({ mode: "open" });
  11458. this._root = this.shadowRoot;
  11459. } else {
  11460. this._root = this;
  11461. }
  11462. }
  11463. }
  11464. connectedCallback() {
  11465. if (!this.isConnected) return;
  11466. if (!this.shadowRoot && !this._resolved) {
  11467. this._parseSlots();
  11468. }
  11469. this._connected = true;
  11470. let parent = this;
  11471. while (parent = parent && (parent.parentNode || parent.host)) {
  11472. if (parent instanceof _VueElement) {
  11473. this._parent = parent;
  11474. break;
  11475. }
  11476. }
  11477. if (!this._instance) {
  11478. if (this._resolved) {
  11479. this._mount(this._def);
  11480. } else {
  11481. if (parent && parent._pendingResolve) {
  11482. this._pendingResolve = parent._pendingResolve.then(() => {
  11483. this._pendingResolve = void 0;
  11484. this._resolveDef();
  11485. });
  11486. } else {
  11487. this._resolveDef();
  11488. }
  11489. }
  11490. }
  11491. }
  11492. _setParent(parent = this._parent) {
  11493. if (parent) {
  11494. this._instance.parent = parent._instance;
  11495. this._inheritParentContext(parent);
  11496. }
  11497. }
  11498. _inheritParentContext(parent = this._parent) {
  11499. if (parent && this._app) {
  11500. Object.setPrototypeOf(
  11501. this._app._context.provides,
  11502. parent._instance.provides
  11503. );
  11504. }
  11505. }
  11506. disconnectedCallback() {
  11507. this._connected = false;
  11508. nextTick(() => {
  11509. if (!this._connected) {
  11510. if (this._ob) {
  11511. this._ob.disconnect();
  11512. this._ob = null;
  11513. }
  11514. this._app && this._app.unmount();
  11515. if (this._instance) this._instance.ce = void 0;
  11516. this._app = this._instance = null;
  11517. }
  11518. });
  11519. }
  11520. /**
  11521. * resolve inner component definition (handle possible async component)
  11522. */
  11523. _resolveDef() {
  11524. if (this._pendingResolve) {
  11525. return;
  11526. }
  11527. for (let i = 0; i < this.attributes.length; i++) {
  11528. this._setAttr(this.attributes[i].name);
  11529. }
  11530. this._ob = new MutationObserver((mutations) => {
  11531. for (const m of mutations) {
  11532. this._setAttr(m.attributeName);
  11533. }
  11534. });
  11535. this._ob.observe(this, { attributes: true });
  11536. const resolve2 = (def2, isAsync = false) => {
  11537. this._resolved = true;
  11538. this._pendingResolve = void 0;
  11539. const { props, styles } = def2;
  11540. let numberProps;
  11541. if (props && !isArray(props)) {
  11542. for (const key in props) {
  11543. const opt = props[key];
  11544. if (opt === Number || opt && opt.type === Number) {
  11545. if (key in this._props) {
  11546. this._props[key] = toNumber(this._props[key]);
  11547. }
  11548. (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
  11549. }
  11550. }
  11551. }
  11552. this._numberProps = numberProps;
  11553. this._resolveProps(def2);
  11554. if (this.shadowRoot) {
  11555. this._applyStyles(styles);
  11556. } else if (styles) {
  11557. warn2(
  11558. "Custom element style injection is not supported when using shadowRoot: false"
  11559. );
  11560. }
  11561. this._mount(def2);
  11562. };
  11563. const asyncDef = this._def.__asyncLoader;
  11564. if (asyncDef) {
  11565. this._pendingResolve = asyncDef().then((def2) => {
  11566. def2.configureApp = this._def.configureApp;
  11567. resolve2(this._def = def2, true);
  11568. });
  11569. } else {
  11570. resolve2(this._def);
  11571. }
  11572. }
  11573. _mount(def2) {
  11574. if (!def2.name) {
  11575. def2.name = "VueElement";
  11576. }
  11577. this._app = this._createApp(def2);
  11578. this._inheritParentContext();
  11579. if (def2.configureApp) {
  11580. def2.configureApp(this._app);
  11581. }
  11582. this._app._ceVNode = this._createVNode();
  11583. this._app.mount(this._root);
  11584. const exposed = this._instance && this._instance.exposed;
  11585. if (!exposed) return;
  11586. for (const key in exposed) {
  11587. if (!hasOwn(this, key)) {
  11588. Object.defineProperty(this, key, {
  11589. // unwrap ref to be consistent with public instance behavior
  11590. get: () => unref(exposed[key])
  11591. });
  11592. } else if (true) {
  11593. warn2(`Exposed property "${key}" already exists on custom element.`);
  11594. }
  11595. }
  11596. }
  11597. _resolveProps(def2) {
  11598. const { props } = def2;
  11599. const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
  11600. for (const key of Object.keys(this)) {
  11601. if (key[0] !== "_" && declaredPropKeys.includes(key)) {
  11602. this._setProp(key, this[key]);
  11603. }
  11604. }
  11605. for (const key of declaredPropKeys.map(camelize)) {
  11606. Object.defineProperty(this, key, {
  11607. get() {
  11608. return this._getProp(key);
  11609. },
  11610. set(val) {
  11611. this._setProp(key, val, true, true);
  11612. }
  11613. });
  11614. }
  11615. }
  11616. _setAttr(key) {
  11617. if (key.startsWith("data-v-")) return;
  11618. const has = this.hasAttribute(key);
  11619. let value = has ? this.getAttribute(key) : REMOVAL;
  11620. const camelKey = camelize(key);
  11621. if (has && this._numberProps && this._numberProps[camelKey]) {
  11622. value = toNumber(value);
  11623. }
  11624. this._setProp(camelKey, value, false, true);
  11625. }
  11626. /**
  11627. * @internal
  11628. */
  11629. _getProp(key) {
  11630. return this._props[key];
  11631. }
  11632. /**
  11633. * @internal
  11634. */
  11635. _setProp(key, val, shouldReflect = true, shouldUpdate = false) {
  11636. if (val !== this._props[key]) {
  11637. if (val === REMOVAL) {
  11638. delete this._props[key];
  11639. } else {
  11640. this._props[key] = val;
  11641. if (key === "key" && this._app) {
  11642. this._app._ceVNode.key = val;
  11643. }
  11644. }
  11645. if (shouldUpdate && this._instance) {
  11646. this._update();
  11647. }
  11648. if (shouldReflect) {
  11649. const ob = this._ob;
  11650. ob && ob.disconnect();
  11651. if (val === true) {
  11652. this.setAttribute(hyphenate(key), "");
  11653. } else if (typeof val === "string" || typeof val === "number") {
  11654. this.setAttribute(hyphenate(key), val + "");
  11655. } else if (!val) {
  11656. this.removeAttribute(hyphenate(key));
  11657. }
  11658. ob && ob.observe(this, { attributes: true });
  11659. }
  11660. }
  11661. }
  11662. _update() {
  11663. const vnode = this._createVNode();
  11664. if (this._app) vnode.appContext = this._app._context;
  11665. render(vnode, this._root);
  11666. }
  11667. _createVNode() {
  11668. const baseProps = {};
  11669. if (!this.shadowRoot) {
  11670. baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
  11671. }
  11672. const vnode = createVNode(this._def, extend(baseProps, this._props));
  11673. if (!this._instance) {
  11674. vnode.ce = (instance) => {
  11675. this._instance = instance;
  11676. instance.ce = this;
  11677. instance.isCE = true;
  11678. if (true) {
  11679. instance.ceReload = (newStyles) => {
  11680. if (this._styles) {
  11681. this._styles.forEach((s) => this._root.removeChild(s));
  11682. this._styles.length = 0;
  11683. }
  11684. this._applyStyles(newStyles);
  11685. this._instance = null;
  11686. this._update();
  11687. };
  11688. }
  11689. const dispatch = (event, args) => {
  11690. this.dispatchEvent(
  11691. new CustomEvent(
  11692. event,
  11693. isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
  11694. )
  11695. );
  11696. };
  11697. instance.emit = (event, ...args) => {
  11698. dispatch(event, args);
  11699. if (hyphenate(event) !== event) {
  11700. dispatch(hyphenate(event), args);
  11701. }
  11702. };
  11703. this._setParent();
  11704. };
  11705. }
  11706. return vnode;
  11707. }
  11708. _applyStyles(styles, owner) {
  11709. if (!styles) return;
  11710. if (owner) {
  11711. if (owner === this._def || this._styleChildren.has(owner)) {
  11712. return;
  11713. }
  11714. this._styleChildren.add(owner);
  11715. }
  11716. const nonce = this._nonce;
  11717. for (let i = styles.length - 1; i >= 0; i--) {
  11718. const s = document.createElement("style");
  11719. if (nonce) s.setAttribute("nonce", nonce);
  11720. s.textContent = styles[i];
  11721. this.shadowRoot.prepend(s);
  11722. if (true) {
  11723. if (owner) {
  11724. if (owner.__hmrId) {
  11725. if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();
  11726. let entry = this._childStyles.get(owner.__hmrId);
  11727. if (!entry) {
  11728. this._childStyles.set(owner.__hmrId, entry = []);
  11729. }
  11730. entry.push(s);
  11731. }
  11732. } else {
  11733. (this._styles || (this._styles = [])).push(s);
  11734. }
  11735. }
  11736. }
  11737. }
  11738. /**
  11739. * Only called when shadowRoot is false
  11740. */
  11741. _parseSlots() {
  11742. const slots = this._slots = {};
  11743. let n;
  11744. while (n = this.firstChild) {
  11745. const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
  11746. (slots[slotName] || (slots[slotName] = [])).push(n);
  11747. this.removeChild(n);
  11748. }
  11749. }
  11750. /**
  11751. * Only called when shadowRoot is false
  11752. */
  11753. _renderSlots() {
  11754. const outlets = (this._teleportTarget || this).querySelectorAll("slot");
  11755. const scopeId = this._instance.type.__scopeId;
  11756. for (let i = 0; i < outlets.length; i++) {
  11757. const o = outlets[i];
  11758. const slotName = o.getAttribute("name") || "default";
  11759. const content = this._slots[slotName];
  11760. const parent = o.parentNode;
  11761. if (content) {
  11762. for (const n of content) {
  11763. if (scopeId && n.nodeType === 1) {
  11764. const id = scopeId + "-s";
  11765. const walker = document.createTreeWalker(n, 1);
  11766. n.setAttribute(id, "");
  11767. let child;
  11768. while (child = walker.nextNode()) {
  11769. child.setAttribute(id, "");
  11770. }
  11771. }
  11772. parent.insertBefore(n, o);
  11773. }
  11774. } else {
  11775. while (o.firstChild) parent.insertBefore(o.firstChild, o);
  11776. }
  11777. parent.removeChild(o);
  11778. }
  11779. }
  11780. /**
  11781. * @internal
  11782. */
  11783. _injectChildStyle(comp) {
  11784. this._applyStyles(comp.styles, comp);
  11785. }
  11786. /**
  11787. * @internal
  11788. */
  11789. _removeChildStyle(comp) {
  11790. if (true) {
  11791. this._styleChildren.delete(comp);
  11792. if (this._childStyles && comp.__hmrId) {
  11793. const oldStyles = this._childStyles.get(comp.__hmrId);
  11794. if (oldStyles) {
  11795. oldStyles.forEach((s) => this._root.removeChild(s));
  11796. oldStyles.length = 0;
  11797. }
  11798. }
  11799. }
  11800. }
  11801. };
  11802. function useHost(caller) {
  11803. const instance = getCurrentInstance();
  11804. const el = instance && instance.ce;
  11805. if (el) {
  11806. return el;
  11807. } else if (true) {
  11808. if (!instance) {
  11809. warn2(
  11810. `${caller || "useHost"} called without an active component instance.`
  11811. );
  11812. } else {
  11813. warn2(
  11814. `${caller || "useHost"} can only be used in components defined via defineCustomElement.`
  11815. );
  11816. }
  11817. }
  11818. return null;
  11819. }
  11820. function useShadowRoot() {
  11821. const el = true ? useHost("useShadowRoot") : useHost();
  11822. return el && el.shadowRoot;
  11823. }
  11824. function useCssModule(name = "$style") {
  11825. {
  11826. const instance = getCurrentInstance();
  11827. if (!instance) {
  11828. warn2(`useCssModule must be called inside setup()`);
  11829. return EMPTY_OBJ;
  11830. }
  11831. const modules = instance.type.__cssModules;
  11832. if (!modules) {
  11833. warn2(`Current instance does not have CSS modules injected.`);
  11834. return EMPTY_OBJ;
  11835. }
  11836. const mod = modules[name];
  11837. if (!mod) {
  11838. warn2(`Current instance does not have CSS module named "${name}".`);
  11839. return EMPTY_OBJ;
  11840. }
  11841. return mod;
  11842. }
  11843. }
  11844. var positionMap = /* @__PURE__ */ new WeakMap();
  11845. var newPositionMap = /* @__PURE__ */ new WeakMap();
  11846. var moveCbKey = Symbol("_moveCb");
  11847. var enterCbKey2 = Symbol("_enterCb");
  11848. var decorate = (t) => {
  11849. delete t.props.mode;
  11850. return t;
  11851. };
  11852. var TransitionGroupImpl = decorate({
  11853. name: "TransitionGroup",
  11854. props: extend({}, TransitionPropsValidators, {
  11855. tag: String,
  11856. moveClass: String
  11857. }),
  11858. setup(props, { slots }) {
  11859. const instance = getCurrentInstance();
  11860. const state = useTransitionState();
  11861. let prevChildren;
  11862. let children;
  11863. onUpdated(() => {
  11864. if (!prevChildren.length) {
  11865. return;
  11866. }
  11867. const moveClass = props.moveClass || `${props.name || "v"}-move`;
  11868. if (!hasCSSTransform(
  11869. prevChildren[0].el,
  11870. instance.vnode.el,
  11871. moveClass
  11872. )) {
  11873. prevChildren = [];
  11874. return;
  11875. }
  11876. prevChildren.forEach(callPendingCbs);
  11877. prevChildren.forEach(recordPosition);
  11878. const movedChildren = prevChildren.filter(applyTranslation);
  11879. forceReflow();
  11880. movedChildren.forEach((c) => {
  11881. const el = c.el;
  11882. const style = el.style;
  11883. addTransitionClass(el, moveClass);
  11884. style.transform = style.webkitTransform = style.transitionDuration = "";
  11885. const cb = el[moveCbKey] = (e) => {
  11886. if (e && e.target !== el) {
  11887. return;
  11888. }
  11889. if (!e || /transform$/.test(e.propertyName)) {
  11890. el.removeEventListener("transitionend", cb);
  11891. el[moveCbKey] = null;
  11892. removeTransitionClass(el, moveClass);
  11893. }
  11894. };
  11895. el.addEventListener("transitionend", cb);
  11896. });
  11897. prevChildren = [];
  11898. });
  11899. return () => {
  11900. const rawProps = toRaw(props);
  11901. const cssTransitionProps = resolveTransitionProps(rawProps);
  11902. let tag = rawProps.tag || Fragment;
  11903. prevChildren = [];
  11904. if (children) {
  11905. for (let i = 0; i < children.length; i++) {
  11906. const child = children[i];
  11907. if (child.el && child.el instanceof Element) {
  11908. prevChildren.push(child);
  11909. setTransitionHooks(
  11910. child,
  11911. resolveTransitionHooks(
  11912. child,
  11913. cssTransitionProps,
  11914. state,
  11915. instance
  11916. )
  11917. );
  11918. positionMap.set(
  11919. child,
  11920. child.el.getBoundingClientRect()
  11921. );
  11922. }
  11923. }
  11924. }
  11925. children = slots.default ? getTransitionRawChildren(slots.default()) : [];
  11926. for (let i = 0; i < children.length; i++) {
  11927. const child = children[i];
  11928. if (child.key != null) {
  11929. setTransitionHooks(
  11930. child,
  11931. resolveTransitionHooks(child, cssTransitionProps, state, instance)
  11932. );
  11933. } else if (child.type !== Text) {
  11934. warn2(`<TransitionGroup> children must be keyed.`);
  11935. }
  11936. }
  11937. return createVNode(tag, null, children);
  11938. };
  11939. }
  11940. });
  11941. var TransitionGroup = TransitionGroupImpl;
  11942. function callPendingCbs(c) {
  11943. const el = c.el;
  11944. if (el[moveCbKey]) {
  11945. el[moveCbKey]();
  11946. }
  11947. if (el[enterCbKey2]) {
  11948. el[enterCbKey2]();
  11949. }
  11950. }
  11951. function recordPosition(c) {
  11952. newPositionMap.set(c, c.el.getBoundingClientRect());
  11953. }
  11954. function applyTranslation(c) {
  11955. const oldPos = positionMap.get(c);
  11956. const newPos = newPositionMap.get(c);
  11957. const dx = oldPos.left - newPos.left;
  11958. const dy = oldPos.top - newPos.top;
  11959. if (dx || dy) {
  11960. const s = c.el.style;
  11961. s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
  11962. s.transitionDuration = "0s";
  11963. return c;
  11964. }
  11965. }
  11966. function hasCSSTransform(el, root, moveClass) {
  11967. const clone = el.cloneNode();
  11968. const _vtc = el[vtcKey];
  11969. if (_vtc) {
  11970. _vtc.forEach((cls) => {
  11971. cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
  11972. });
  11973. }
  11974. moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
  11975. clone.style.display = "none";
  11976. const container = root.nodeType === 1 ? root : root.parentNode;
  11977. container.appendChild(clone);
  11978. const { hasTransform } = getTransitionInfo(clone);
  11979. container.removeChild(clone);
  11980. return hasTransform;
  11981. }
  11982. var getModelAssigner = (vnode) => {
  11983. const fn = vnode.props["onUpdate:modelValue"] || false;
  11984. return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn;
  11985. };
  11986. function onCompositionStart(e) {
  11987. e.target.composing = true;
  11988. }
  11989. function onCompositionEnd(e) {
  11990. const target = e.target;
  11991. if (target.composing) {
  11992. target.composing = false;
  11993. target.dispatchEvent(new Event("input"));
  11994. }
  11995. }
  11996. var assignKey = Symbol("_assign");
  11997. var vModelText = {
  11998. created(el, { modifiers: { lazy, trim, number } }, vnode) {
  11999. el[assignKey] = getModelAssigner(vnode);
  12000. const castToNumber = number || vnode.props && vnode.props.type === "number";
  12001. addEventListener(el, lazy ? "change" : "input", (e) => {
  12002. if (e.target.composing) return;
  12003. let domValue = el.value;
  12004. if (trim) {
  12005. domValue = domValue.trim();
  12006. }
  12007. if (castToNumber) {
  12008. domValue = looseToNumber(domValue);
  12009. }
  12010. el[assignKey](domValue);
  12011. });
  12012. if (trim) {
  12013. addEventListener(el, "change", () => {
  12014. el.value = el.value.trim();
  12015. });
  12016. }
  12017. if (!lazy) {
  12018. addEventListener(el, "compositionstart", onCompositionStart);
  12019. addEventListener(el, "compositionend", onCompositionEnd);
  12020. addEventListener(el, "change", onCompositionEnd);
  12021. }
  12022. },
  12023. // set value on mounted so it's after min/max for type="range"
  12024. mounted(el, { value }) {
  12025. el.value = value == null ? "" : value;
  12026. },
  12027. beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
  12028. el[assignKey] = getModelAssigner(vnode);
  12029. if (el.composing) return;
  12030. const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
  12031. const newValue = value == null ? "" : value;
  12032. if (elValue === newValue) {
  12033. return;
  12034. }
  12035. if (document.activeElement === el && el.type !== "range") {
  12036. if (lazy && value === oldValue) {
  12037. return;
  12038. }
  12039. if (trim && el.value.trim() === newValue) {
  12040. return;
  12041. }
  12042. }
  12043. el.value = newValue;
  12044. }
  12045. };
  12046. var vModelCheckbox = {
  12047. // #4096 array checkboxes need to be deep traversed
  12048. deep: true,
  12049. created(el, _, vnode) {
  12050. el[assignKey] = getModelAssigner(vnode);
  12051. addEventListener(el, "change", () => {
  12052. const modelValue = el._modelValue;
  12053. const elementValue = getValue(el);
  12054. const checked = el.checked;
  12055. const assign = el[assignKey];
  12056. if (isArray(modelValue)) {
  12057. const index = looseIndexOf(modelValue, elementValue);
  12058. const found = index !== -1;
  12059. if (checked && !found) {
  12060. assign(modelValue.concat(elementValue));
  12061. } else if (!checked && found) {
  12062. const filtered = [...modelValue];
  12063. filtered.splice(index, 1);
  12064. assign(filtered);
  12065. }
  12066. } else if (isSet(modelValue)) {
  12067. const cloned = new Set(modelValue);
  12068. if (checked) {
  12069. cloned.add(elementValue);
  12070. } else {
  12071. cloned.delete(elementValue);
  12072. }
  12073. assign(cloned);
  12074. } else {
  12075. assign(getCheckboxValue(el, checked));
  12076. }
  12077. });
  12078. },
  12079. // set initial checked on mount to wait for true-value/false-value
  12080. mounted: setChecked,
  12081. beforeUpdate(el, binding, vnode) {
  12082. el[assignKey] = getModelAssigner(vnode);
  12083. setChecked(el, binding, vnode);
  12084. }
  12085. };
  12086. function setChecked(el, { value, oldValue }, vnode) {
  12087. el._modelValue = value;
  12088. let checked;
  12089. if (isArray(value)) {
  12090. checked = looseIndexOf(value, vnode.props.value) > -1;
  12091. } else if (isSet(value)) {
  12092. checked = value.has(vnode.props.value);
  12093. } else {
  12094. if (value === oldValue) return;
  12095. checked = looseEqual(value, getCheckboxValue(el, true));
  12096. }
  12097. if (el.checked !== checked) {
  12098. el.checked = checked;
  12099. }
  12100. }
  12101. var vModelRadio = {
  12102. created(el, { value }, vnode) {
  12103. el.checked = looseEqual(value, vnode.props.value);
  12104. el[assignKey] = getModelAssigner(vnode);
  12105. addEventListener(el, "change", () => {
  12106. el[assignKey](getValue(el));
  12107. });
  12108. },
  12109. beforeUpdate(el, { value, oldValue }, vnode) {
  12110. el[assignKey] = getModelAssigner(vnode);
  12111. if (value !== oldValue) {
  12112. el.checked = looseEqual(value, vnode.props.value);
  12113. }
  12114. }
  12115. };
  12116. var vModelSelect = {
  12117. // <select multiple> value need to be deep traversed
  12118. deep: true,
  12119. created(el, { value, modifiers: { number } }, vnode) {
  12120. const isSetModel = isSet(value);
  12121. addEventListener(el, "change", () => {
  12122. const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
  12123. (o) => number ? looseToNumber(getValue(o)) : getValue(o)
  12124. );
  12125. el[assignKey](
  12126. el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
  12127. );
  12128. el._assigning = true;
  12129. nextTick(() => {
  12130. el._assigning = false;
  12131. });
  12132. });
  12133. el[assignKey] = getModelAssigner(vnode);
  12134. },
  12135. // set value in mounted & updated because <select> relies on its children
  12136. // <option>s.
  12137. mounted(el, { value }) {
  12138. setSelected(el, value);
  12139. },
  12140. beforeUpdate(el, _binding, vnode) {
  12141. el[assignKey] = getModelAssigner(vnode);
  12142. },
  12143. updated(el, { value }) {
  12144. if (!el._assigning) {
  12145. setSelected(el, value);
  12146. }
  12147. }
  12148. };
  12149. function setSelected(el, value) {
  12150. const isMultiple = el.multiple;
  12151. const isArrayValue = isArray(value);
  12152. if (isMultiple && !isArrayValue && !isSet(value)) {
  12153. warn2(
  12154. `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
  12155. );
  12156. return;
  12157. }
  12158. for (let i = 0, l = el.options.length; i < l; i++) {
  12159. const option = el.options[i];
  12160. const optionValue = getValue(option);
  12161. if (isMultiple) {
  12162. if (isArrayValue) {
  12163. const optionType = typeof optionValue;
  12164. if (optionType === "string" || optionType === "number") {
  12165. option.selected = value.some((v) => String(v) === String(optionValue));
  12166. } else {
  12167. option.selected = looseIndexOf(value, optionValue) > -1;
  12168. }
  12169. } else {
  12170. option.selected = value.has(optionValue);
  12171. }
  12172. } else if (looseEqual(getValue(option), value)) {
  12173. if (el.selectedIndex !== i) el.selectedIndex = i;
  12174. return;
  12175. }
  12176. }
  12177. if (!isMultiple && el.selectedIndex !== -1) {
  12178. el.selectedIndex = -1;
  12179. }
  12180. }
  12181. function getValue(el) {
  12182. return "_value" in el ? el._value : el.value;
  12183. }
  12184. function getCheckboxValue(el, checked) {
  12185. const key = checked ? "_trueValue" : "_falseValue";
  12186. return key in el ? el[key] : checked;
  12187. }
  12188. var vModelDynamic = {
  12189. created(el, binding, vnode) {
  12190. callModelHook(el, binding, vnode, null, "created");
  12191. },
  12192. mounted(el, binding, vnode) {
  12193. callModelHook(el, binding, vnode, null, "mounted");
  12194. },
  12195. beforeUpdate(el, binding, vnode, prevVNode) {
  12196. callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
  12197. },
  12198. updated(el, binding, vnode, prevVNode) {
  12199. callModelHook(el, binding, vnode, prevVNode, "updated");
  12200. }
  12201. };
  12202. function resolveDynamicModel(tagName, type) {
  12203. switch (tagName) {
  12204. case "SELECT":
  12205. return vModelSelect;
  12206. case "TEXTAREA":
  12207. return vModelText;
  12208. default:
  12209. switch (type) {
  12210. case "checkbox":
  12211. return vModelCheckbox;
  12212. case "radio":
  12213. return vModelRadio;
  12214. default:
  12215. return vModelText;
  12216. }
  12217. }
  12218. }
  12219. function callModelHook(el, binding, vnode, prevVNode, hook) {
  12220. const modelToUse = resolveDynamicModel(
  12221. el.tagName,
  12222. vnode.props && vnode.props.type
  12223. );
  12224. const fn = modelToUse[hook];
  12225. fn && fn(el, binding, vnode, prevVNode);
  12226. }
  12227. function initVModelForSSR() {
  12228. vModelText.getSSRProps = ({ value }) => ({ value });
  12229. vModelRadio.getSSRProps = ({ value }, vnode) => {
  12230. if (vnode.props && looseEqual(vnode.props.value, value)) {
  12231. return { checked: true };
  12232. }
  12233. };
  12234. vModelCheckbox.getSSRProps = ({ value }, vnode) => {
  12235. if (isArray(value)) {
  12236. if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) {
  12237. return { checked: true };
  12238. }
  12239. } else if (isSet(value)) {
  12240. if (vnode.props && value.has(vnode.props.value)) {
  12241. return { checked: true };
  12242. }
  12243. } else if (value) {
  12244. return { checked: true };
  12245. }
  12246. };
  12247. vModelDynamic.getSSRProps = (binding, vnode) => {
  12248. if (typeof vnode.type !== "string") {
  12249. return;
  12250. }
  12251. const modelToUse = resolveDynamicModel(
  12252. // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
  12253. vnode.type.toUpperCase(),
  12254. vnode.props && vnode.props.type
  12255. );
  12256. if (modelToUse.getSSRProps) {
  12257. return modelToUse.getSSRProps(binding, vnode);
  12258. }
  12259. };
  12260. }
  12261. var systemModifiers = ["ctrl", "shift", "alt", "meta"];
  12262. var modifierGuards = {
  12263. stop: (e) => e.stopPropagation(),
  12264. prevent: (e) => e.preventDefault(),
  12265. self: (e) => e.target !== e.currentTarget,
  12266. ctrl: (e) => !e.ctrlKey,
  12267. shift: (e) => !e.shiftKey,
  12268. alt: (e) => !e.altKey,
  12269. meta: (e) => !e.metaKey,
  12270. left: (e) => "button" in e && e.button !== 0,
  12271. middle: (e) => "button" in e && e.button !== 1,
  12272. right: (e) => "button" in e && e.button !== 2,
  12273. exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
  12274. };
  12275. var withModifiers = (fn, modifiers) => {
  12276. const cache = fn._withMods || (fn._withMods = {});
  12277. const cacheKey = modifiers.join(".");
  12278. return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
  12279. for (let i = 0; i < modifiers.length; i++) {
  12280. const guard = modifierGuards[modifiers[i]];
  12281. if (guard && guard(event, modifiers)) return;
  12282. }
  12283. return fn(event, ...args);
  12284. });
  12285. };
  12286. var keyNames = {
  12287. esc: "escape",
  12288. space: " ",
  12289. up: "arrow-up",
  12290. left: "arrow-left",
  12291. right: "arrow-right",
  12292. down: "arrow-down",
  12293. delete: "backspace"
  12294. };
  12295. var withKeys = (fn, modifiers) => {
  12296. const cache = fn._withKeys || (fn._withKeys = {});
  12297. const cacheKey = modifiers.join(".");
  12298. return cache[cacheKey] || (cache[cacheKey] = (event) => {
  12299. if (!("key" in event)) {
  12300. return;
  12301. }
  12302. const eventKey = hyphenate(event.key);
  12303. if (modifiers.some(
  12304. (k) => k === eventKey || keyNames[k] === eventKey
  12305. )) {
  12306. return fn(event);
  12307. }
  12308. });
  12309. };
  12310. var rendererOptions = extend({ patchProp }, nodeOps);
  12311. var renderer;
  12312. var enabledHydration = false;
  12313. function ensureRenderer() {
  12314. return renderer || (renderer = createRenderer(rendererOptions));
  12315. }
  12316. function ensureHydrationRenderer() {
  12317. renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions);
  12318. enabledHydration = true;
  12319. return renderer;
  12320. }
  12321. var render = (...args) => {
  12322. ensureRenderer().render(...args);
  12323. };
  12324. var hydrate = (...args) => {
  12325. ensureHydrationRenderer().hydrate(...args);
  12326. };
  12327. var createApp = (...args) => {
  12328. const app = ensureRenderer().createApp(...args);
  12329. if (true) {
  12330. injectNativeTagCheck(app);
  12331. injectCompilerOptionsCheck(app);
  12332. }
  12333. const { mount } = app;
  12334. app.mount = (containerOrSelector) => {
  12335. const container = normalizeContainer(containerOrSelector);
  12336. if (!container) return;
  12337. const component = app._component;
  12338. if (!isFunction(component) && !component.render && !component.template) {
  12339. component.template = container.innerHTML;
  12340. }
  12341. if (container.nodeType === 1) {
  12342. container.textContent = "";
  12343. }
  12344. const proxy = mount(container, false, resolveRootNamespace(container));
  12345. if (container instanceof Element) {
  12346. container.removeAttribute("v-cloak");
  12347. container.setAttribute("data-v-app", "");
  12348. }
  12349. return proxy;
  12350. };
  12351. return app;
  12352. };
  12353. var createSSRApp = (...args) => {
  12354. const app = ensureHydrationRenderer().createApp(...args);
  12355. if (true) {
  12356. injectNativeTagCheck(app);
  12357. injectCompilerOptionsCheck(app);
  12358. }
  12359. const { mount } = app;
  12360. app.mount = (containerOrSelector) => {
  12361. const container = normalizeContainer(containerOrSelector);
  12362. if (container) {
  12363. return mount(container, true, resolveRootNamespace(container));
  12364. }
  12365. };
  12366. return app;
  12367. };
  12368. function resolveRootNamespace(container) {
  12369. if (container instanceof SVGElement) {
  12370. return "svg";
  12371. }
  12372. if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
  12373. return "mathml";
  12374. }
  12375. }
  12376. function injectNativeTagCheck(app) {
  12377. Object.defineProperty(app.config, "isNativeTag", {
  12378. value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
  12379. writable: false
  12380. });
  12381. }
  12382. function injectCompilerOptionsCheck(app) {
  12383. if (isRuntimeOnly()) {
  12384. const isCustomElement = app.config.isCustomElement;
  12385. Object.defineProperty(app.config, "isCustomElement", {
  12386. get() {
  12387. return isCustomElement;
  12388. },
  12389. set() {
  12390. warn2(
  12391. `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.`
  12392. );
  12393. }
  12394. });
  12395. const compilerOptions = app.config.compilerOptions;
  12396. const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead.
  12397. - For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
  12398. - For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
  12399. - For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;
  12400. Object.defineProperty(app.config, "compilerOptions", {
  12401. get() {
  12402. warn2(msg);
  12403. return compilerOptions;
  12404. },
  12405. set() {
  12406. warn2(msg);
  12407. }
  12408. });
  12409. }
  12410. }
  12411. function normalizeContainer(container) {
  12412. if (isString(container)) {
  12413. const res = document.querySelector(container);
  12414. if (!res) {
  12415. warn2(
  12416. `Failed to mount app: mount target selector "${container}" returned null.`
  12417. );
  12418. }
  12419. return res;
  12420. }
  12421. if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") {
  12422. warn2(
  12423. `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`
  12424. );
  12425. }
  12426. return container;
  12427. }
  12428. var ssrDirectiveInitialized = false;
  12429. var initDirectivesForSSR = () => {
  12430. if (!ssrDirectiveInitialized) {
  12431. ssrDirectiveInitialized = true;
  12432. initVModelForSSR();
  12433. initVShowForSSR();
  12434. }
  12435. };
  12436. // node_modules/vue/dist/vue.runtime.esm-bundler.js
  12437. function initDev() {
  12438. {
  12439. initCustomFormatter();
  12440. }
  12441. }
  12442. if (true) {
  12443. initDev();
  12444. }
  12445. var compile2 = () => {
  12446. if (true) {
  12447. warn2(
  12448. `Runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  12449. );
  12450. }
  12451. };
  12452. export {
  12453. __commonJS,
  12454. __toESM,
  12455. NOOP,
  12456. hasOwn,
  12457. isArray,
  12458. isDate,
  12459. isFunction,
  12460. isString,
  12461. isObject,
  12462. isPromise,
  12463. isPlainObject,
  12464. camelize,
  12465. hyphenate,
  12466. capitalize,
  12467. toHandlerKey,
  12468. normalizeStyle,
  12469. normalizeClass,
  12470. normalizeProps,
  12471. toDisplayString,
  12472. EffectScope,
  12473. effectScope,
  12474. getCurrentScope,
  12475. onScopeDispose,
  12476. ReactiveEffect,
  12477. effect,
  12478. stop,
  12479. reactive,
  12480. shallowReactive,
  12481. readonly,
  12482. shallowReadonly,
  12483. isReactive,
  12484. isReadonly,
  12485. isShallow,
  12486. isProxy,
  12487. toRaw,
  12488. markRaw,
  12489. isRef2 as isRef,
  12490. ref,
  12491. shallowRef,
  12492. triggerRef,
  12493. unref,
  12494. toValue,
  12495. proxyRefs,
  12496. customRef,
  12497. toRefs,
  12498. toRef,
  12499. TrackOpTypes,
  12500. TriggerOpTypes,
  12501. getCurrentWatcher,
  12502. onWatcherCleanup,
  12503. assertNumber,
  12504. ErrorCodes,
  12505. callWithErrorHandling,
  12506. callWithAsyncErrorHandling,
  12507. handleError,
  12508. nextTick,
  12509. queuePostFlushCb,
  12510. pushScopeId,
  12511. popScopeId,
  12512. withScopeId,
  12513. withCtx,
  12514. withDirectives,
  12515. Teleport,
  12516. useTransitionState,
  12517. BaseTransitionPropsValidators,
  12518. BaseTransition,
  12519. resolveTransitionHooks,
  12520. setTransitionHooks,
  12521. getTransitionRawChildren,
  12522. defineComponent,
  12523. useId,
  12524. useTemplateRef,
  12525. hydrateOnIdle,
  12526. hydrateOnVisible,
  12527. hydrateOnMediaQuery,
  12528. hydrateOnInteraction,
  12529. defineAsyncComponent,
  12530. KeepAlive,
  12531. onActivated,
  12532. onDeactivated,
  12533. onBeforeMount,
  12534. onMounted,
  12535. onBeforeUpdate,
  12536. onUpdated,
  12537. onBeforeUnmount,
  12538. onUnmounted,
  12539. onServerPrefetch,
  12540. onRenderTriggered,
  12541. onRenderTracked,
  12542. onErrorCaptured,
  12543. resolveComponent,
  12544. resolveDynamicComponent,
  12545. resolveDirective,
  12546. renderList,
  12547. createSlots,
  12548. renderSlot,
  12549. toHandlers,
  12550. defineProps,
  12551. defineEmits,
  12552. defineExpose,
  12553. defineOptions,
  12554. defineSlots,
  12555. defineModel,
  12556. withDefaults,
  12557. useSlots,
  12558. useAttrs,
  12559. mergeDefaults,
  12560. mergeModels,
  12561. createPropsRestProxy,
  12562. withAsyncContext,
  12563. provide,
  12564. inject,
  12565. hasInjectionContext,
  12566. createRenderer,
  12567. createHydrationRenderer,
  12568. ssrContextKey,
  12569. useSSRContext,
  12570. watchEffect,
  12571. watchPostEffect,
  12572. watchSyncEffect,
  12573. watch2 as watch,
  12574. useModel,
  12575. Suspense,
  12576. Fragment,
  12577. Text,
  12578. Comment,
  12579. Static,
  12580. openBlock,
  12581. setBlockTracking,
  12582. createElementBlock,
  12583. createBlock,
  12584. isVNode,
  12585. transformVNodeArgs,
  12586. createBaseVNode,
  12587. createVNode,
  12588. guardReactiveProps,
  12589. cloneVNode,
  12590. createTextVNode,
  12591. createStaticVNode,
  12592. createCommentVNode,
  12593. mergeProps,
  12594. getCurrentInstance,
  12595. registerRuntimeCompiler,
  12596. isRuntimeOnly,
  12597. computed2 as computed,
  12598. h,
  12599. initCustomFormatter,
  12600. withMemo,
  12601. isMemoSame,
  12602. version,
  12603. warn2 as warn,
  12604. ErrorTypeStrings,
  12605. devtools,
  12606. setDevtoolsHook,
  12607. ssrUtils,
  12608. resolveFilter,
  12609. compatUtils,
  12610. DeprecationTypes,
  12611. Transition,
  12612. vShow,
  12613. useCssVars,
  12614. defineCustomElement,
  12615. defineSSRCustomElement,
  12616. VueElement,
  12617. useHost,
  12618. useShadowRoot,
  12619. useCssModule,
  12620. TransitionGroup,
  12621. vModelText,
  12622. vModelCheckbox,
  12623. vModelRadio,
  12624. vModelSelect,
  12625. vModelDynamic,
  12626. withModifiers,
  12627. withKeys,
  12628. render,
  12629. hydrate,
  12630. createApp,
  12631. createSSRApp,
  12632. initDirectivesForSSR,
  12633. compile2 as compile
  12634. };
  12635. /*! Bundled license information:
  12636. @vue/shared/dist/shared.esm-bundler.js:
  12637. (**
  12638. * @vue/shared v3.5.18
  12639. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12640. * @license MIT
  12641. **)
  12642. (*! #__NO_SIDE_EFFECTS__ *)
  12643. @vue/reactivity/dist/reactivity.esm-bundler.js:
  12644. (**
  12645. * @vue/reactivity v3.5.18
  12646. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12647. * @license MIT
  12648. **)
  12649. @vue/runtime-core/dist/runtime-core.esm-bundler.js:
  12650. (**
  12651. * @vue/runtime-core v3.5.18
  12652. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12653. * @license MIT
  12654. **)
  12655. (*! #__NO_SIDE_EFFECTS__ *)
  12656. @vue/runtime-dom/dist/runtime-dom.esm-bundler.js:
  12657. (**
  12658. * @vue/runtime-dom v3.5.18
  12659. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12660. * @license MIT
  12661. **)
  12662. (*! #__NO_SIDE_EFFECTS__ *)
  12663. vue/dist/vue.runtime.esm-bundler.js:
  12664. (**
  12665. * vue v3.5.18
  12666. * (c) 2018-present Yuxi (Evan) You and Vue contributors
  12667. * @license MIT
  12668. **)
  12669. */
  12670. //# sourceMappingURL=chunk-GFV24RRW.js.map